Communitygithub.com

diffdock

DiffDock 및 DiffDock-L 분자 도킹. PDB 또는 서열과 SMILES/SDF/MOL2로부터 단백질-소분자 포즈 예측, 배치 도킹, 가상 스크리닝 및 포즈 신뢰도 해석에 사용됩니다. 결합 친화도 예측에는 사용되지 않습니다.

diffdock란 무엇인가요?

DiffDock은 확산 기반 딥러닝 분자 도킹 도구로, 단백질 표적에 대한 소분자 리간드의 3D 결합 포즈를 예측합니다. 구조 기반 신약 발견 및 화학 생물학에 중요한 최첨단 기술을 대표하며, 높은 정확도로 리간드 결합 포즈를 예측하고, 신뢰도 점수를 제공하여 예측의 신뢰성을 평가할 수 있습니다. 이 스킬은 단일 복합체 도킹, 배치 가상 스크리닝, 단백질 서열을 통한 ESMFold 기반 구조 예측 등 다양한 워크플로우를 지원합니다. 분석 스크립트를 통해 신뢰도 점수를 해석하고, 예측 순위를 매길 수 있으며, GNINA 또는 MM/GBSA와 같은 채점 함수와 결합하여 결합 친화도를 추가로 평가할 수 있습니다. 단, DiffDock은 결합 포즈와 신뢰도(예측 확실성)만 예측하며 결합 친화도(ΔG, Kd)는 예측하지 않는다는 점을 유의해야 합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/diffdock

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

DiffDock: 확산 모델을 이용한 분자 도킹

개요

DiffDock은 단백질 표적에 대한 소분자 리간드의 3D 결합 포즈를 예측하는 확산 기반 딥러닝 분자 도킹 도구입니다. 구조 기반 신약 발견 및 화학 생물학에 중요한 최첨단 기술을 대표합니다.

핵심 기능:

  • 딥러닝을 사용하여 높은 정확도로 리간드 결합 포즈 예측
  • 단백질 구조(PDB 파일) 또는 서열(ESMFold 사용) 지원
  • 단일 복합체 또는 배치 가상 스크리닝 캠페인 처리
  • 예측 신뢰도 평가를 위한 신뢰도 점수 생성
  • 다양한 리간드 입력(SMILES, SDF, MOL2) 처리

주요 차이점: DiffDock은 결합 포즈(3D 구조)와 신뢰도(예측 확실성)는 예측하지만, 결합 친화도(ΔG, Kd)는 예측하지 않습니다. 친화도 평가를 위해 항상 채점 함수(GNINA, MM/GBSA)와 함께 사용하십시오.

이 스킬을 사용해야 하는 경우

이 스킬은 다음과 같은 경우에 사용됩니다.

  • "이 리간드를 단백질에 도킹해줘" 또는 "결합 포즈를 예측해줘"
  • "분자 도킹 실행" 또는 "단백질-리간드 도킹 수행"
  • "가상 스크리닝" 또는 "화합물 라이브러리 스크리닝"
  • "이 분자가 어디에 결합하나요?" 또는 "결합 부위 예측"
  • 구조 기반 신약 설계 또는 선도 물질 최적화 작업
  • PDB 파일 + SMILES 문자열 또는 리간드 구조와 관련된 작업
  • 여러 단백질-리간드 쌍의 배치 도킹

설치 및 환경 설정

환경 상태 확인

DiffDock 작업을 진행하기 전에 환경 설정을 확인하십시오.

# 제공된 설정 확인 스크립트 사용
python scripts/setup_check.py

이 스크립트는 Python 버전, PyTorch with CUDA, PyTorch Geometric, RDKit, ESM 및 기타 종속성을 확인합니다.

설치 옵션

옵션 1: Conda (권장)

git clone https://github.com/gcorso/DiffDock.git
cd DiffDock
conda env create --file environment.yml
conda activate diffdock

옵션 2: Docker

docker pull rbgcsail/diffdock
docker run -it --gpus all --entrypoint /bin/bash rbgcsail/diffdock
micromamba activate diffdock

중요 참고 사항:

  • GPU 강력 권장 (CPU 대비 10-100배 속도 향상)
  • 첫 실행 시 SO(2)/SO(3) 조회 테이블 사전 계산 (~2-5분 소요)
  • 모델 체크포인트(~500MB)는 없으면 자동 다운로드
  • 현재 최신 릴리스는 DiffDock v1.1.3입니다. DiffDock-L은 default_inference_args.yaml의 기본 모델 라인입니다.

핵심 워크플로우

워크플로우 1: 단일 단백질-리간드 도킹

사용 사례: 하나의 리간드를 하나의 단백질 표적에 도킹

입력 요구 사항:

  • 단백질: PDB 파일 또는 아미노산 서열
  • 리간드: SMILES 문자열 또는 구조 파일(SDF/MOL2)

명령어:

python -m inference \
  --config default_inference_args.yaml \
  --protein_path protein.pdb \
  --ligand_description "CC(=O)Oc1ccccc1C(=O)O" \
  --out_dir results/single_docking/

대안 (단백질 서열):

python -m inference \
  --config default_inference_args.yaml \
  --protein_sequence "MSKGEELFTGVVPILVELDGDVNGHKF..." \
  --ligand_description ligand.sdf \
  --out_dir results/sequence_docking/

출력 구조:

results/single_docking/
└── complex_0/
    ├── rank1.sdf                    # 최상위 포즈의 편의 사본
    ├── rank1_confidence0.87.sdf     # 파일 이름에 신뢰도가 포함된 최상위 포즈
    ├── rank2_confidence0.42.sdf     # 두 번째 순위 포즈
    ├── ...
    └── rank10_confidence-1.23.sdf   # 10번째 포즈 (기본값: 10개 샘플)

현재 inference.py는 단일 복합체 실행을 위해 --ligand_description을 등록합니다. 일부 상위 README 텍스트에는 여전히 --ligand라고 표시되어 있습니다. 로컬 체크아웃에서 --ligand 별칭을 명시적으로 지원하지 않는 한 --ligand_description을 사용하십시오.

워크플로우 2: 여러 복합체 배치 처리

사용 사례: 여러 리간드를 단백질에 도킹, 가상 스크리닝 캠페인

1단계: 배치 CSV 준비

제공된 스크립트를 사용하여 배치 입력을 생성하거나 검증합니다.

# 템플릿 생성
python scripts/prepare_batch_csv.py --create --output batch_input.csv

# 기존 CSV 검증
python scripts/prepare_batch_csv.py my_input.csv --validate

CSV 형식:

complex_name,protein_path,ligand_description,protein_sequence
complex1,protein1.pdb,CC(=O)Oc1ccccc1C(=O)O,
complex2,,COc1ccc(C#N)cc1,MSKGEELFT...
complex3,protein3.pdb,ligand3.sdf,

필수 열:

  • complex_name: 고유 식별자
  • protein_path: PDB 파일 경로 (서열을 사용하는 경우 비워 둠)
  • ligand_description: SMILES 문자열 또는 리간드 파일 경로
  • protein_sequence: 아미노산 서열 (PDB를 사용하는 경우 비워 둠)

2단계: 배치 도킹 실행

python -m inference \
  --config default_inference_args.yaml \
  --protein_ligand_csv batch_input.csv \
  --out_dir results/batch/ \
  --batch_size 10

대규모 가상 스크리닝(>100개 화합물)의 경우:

더 빠른 처리를 위해 단백질 임베딩을 사전 계산합니다.

# 임베딩 사전 계산
python datasets/esm_embedding_preparation.py \
  --protein_ligand_csv screening_input.csv \
  --out_file protein_embeddings.pt

# 사전 계산된 임베딩으로 실행
python -m inference \
  --config default_inference_args.yaml \
  --protein_ligand_csv screening_input.csv \
  --esm_embeddings_path protein_embeddings.pt \
  --out_dir results/screening/

워크플로우 3: 결과 분석

도킹이 완료된 후 신뢰도 점수를 분석하고 예측 순위를 매깁니다.

# 모든 결과 분석
python scripts/analyze_results.py results/batch/

# 복합체당 상위 5개 표시
python scripts/analyze_results.py results/batch/ --top 5

# 신뢰도 임계값으로 필터링
python scripts/analyze_results.py results/batch/ --threshold 0.0

# CSV로 내보내기
python scripts/analyze_results.py results/batch/ --export summary.csv

# 모든 복합체에서 상위 20개 예측 표시
python scripts/analyze_results.py results/batch/ --best 20

분석 스크립트:

  • 모든 예측에서 신뢰도 점수 파싱
  • 높음(>0), 보통(-1.5 ~ 0), 낮음(<-1.5)으로 분류
  • 복합체 내 및 복합체 간 예측 순위 지정
  • 통계 요약 생성
  • 다운스트림 분석을 위해 결과를 CSV로 내보내기

신뢰도 점수 해석

점수 이해하기:

점수 범위신뢰도 수준해석
> 0높음강력한 예측, 정확할 가능성 높음
-1.5 ~ 0보통합리적인 예측, 주의 깊게 검증
< -1.5낮음불확실한 예측, 검증 필요

중요 참고 사항:

  1. 신뢰도 ≠ 친화도: 높은 신뢰도는 모델이 구조에 대해 확신한다는 의미이지, 강한 결합을 의미하지 않습니다.
  2. 맥락 중요: 다음과 같은 경우 기대치를 조정하십시오.
    • 큰 리간드(>500 Da): 낮은 신뢰도 예상
    • 여러 단백질 사슬: 신뢰도 감소 가능
    • 새로운 단백질 패밀리: 성능 저하 가능
  3. 여러 샘플: 상위 3-5개 예측을 검토하고 일관성을 확인하십시오.

자세한 지침은: Read 도구를 사용하여 references/confidence_and_limitations.md를 읽으십시오.

매개변수 사용자 지정

사용자 구성 사용

특정 사용 사례에 대한 사용자 구성을 만듭니다.

# 템플릿 복사
cp assets/custom_inference_config.yaml my_config.yaml

# 매개변수 편집 (사전 설정은 템플릿 참조)
# 그런 다음 사용자 구성으로 실행
python -m inference \
  --config my_config.yaml \
  --protein_ligand_csv input.csv \
  --out_dir results/

조정할 주요 매개변수

샘플링 밀도:

  • samples_per_complex: 10 → 어려운 경우 20-40으로 증가
  • 더 많은 샘플 = 더 나은 적용 범위이지만 런타임 증가

추론 단계:

  • inference_steps: 20 → 더 높은 정확도를 위해 25-30으로 증가
  • 더 많은 단계 = 잠재적으로 더 나은 품질이지만 속도 저하

온도 매개변수 (다양성 제어):

  • temp_sampling_tor: 7.04 → 유연한 리간드에 대해 증가 (8-10)
  • temp_sampling_tor: 7.04 → 강성 리간드에 대해 감소 (5-6)
  • 더 높은 온도 = 더 다양한 포즈

템플릿에서 사용 가능한 사전 설정:

  1. 높은 정확도: 더 많은 샘플 + 단계, 낮은 온도
  2. 빠른 스크리닝: 더 적은 샘플, 더 빠름
  3. 유연한 리간드: 증가된 비틀림 온도
  4. 강성 리간드: 감소된 비틀림 온도

완전한 매개변수 참조는: Read 도구를 사용하여 references/parameters_reference.md를 읽으십시오.

고급 기술

앙상블 도킹 (단백질 유연성)

알려진 유연성을 가진 단백질의 경우 여러 형태에 도킹합니다.

# 앙상블 CSV 생성
import pandas as pd

conformations = ["conf1.pdb", "conf2.pdb", "conf3.pdb"]
ligand = "CC(=O)Oc1ccccc1C(=O)O"

data = {
    "complex_name": [f"ensemble_{i}" for i in range(len(conformations))],
    "protein_path": conformations,
    "ligand_description": [ligand] * len(conformations),
    "protein_sequence": [""] * len(conformations)
}

pd.DataFrame(data).to_csv("ensemble_input.csv", index=False)

증가된 샘플링으로 도킹 실행:

python -m inference \
  --config default_inference_args.yaml \
  --protein_ligand_csv ensemble_input.csv \
  --samples_per_complex 20 \
  --out_dir results/ensemble/

채점 함수와의 통합

DiffDock은 포즈를 생성합니다. 친화도 평가를 위해 다른 도구와 결합하십시오.

GNINA (빠른 신경망 채점):

for pose in results/single_docking/complex_0/*confidence*.sdf; do
    gnina -r protein.pdb -l "$pose" --score_only
done

MM/GBSA (더 정확하지만 느림): 에너지 최소화 후 AmberTools MMPBSA.py 또는 gmx_MMPBSA 사용

자유 에너지 계산 (가장 정확): FEP/TI 계산을 위해 OpenMM + OpenFE 또는 GROMACS 사용

권장 워크플로우:

  1. DiffDock → 신뢰도 점수로 포즈 생성
  2. 육안 검사 → 구조적 타당성 확인
  3. GNINA 또는 MM/GBSA → 친화도로 재채점 및 순위 지정
  4. 실험적 검증 → 생화학적 분석

제한 사항 및 범위

DiffDock은 다음과 같은 용도로 설계되었습니다:

  • 소분자 리간드 (일반적으로 100-1000 Da)
  • 약물 유사 유기 화합물
  • 작은 펩타이드 (<20개 잔기)
  • 단일 또는 다중 사슬 단백질

DiffDock은 다음과 같은 용도로 설계되지 않았습니다:

  • 큰 생체 분자 (단백질-단백질 도킹) → DiffDock-PP 또는 AlphaFold-Multimer 사용
  • 큰 펩타이드 (>20개 잔기) → 대체 방법 사용
  • 공유 결합 도킹 → 전문화된 공유 결합 도킹 도구 사용
  • 결합 친화도 예측 → 채점 함수와 결합하여 사용
  • 막 단백질 → 특별히 훈련되지 않음, 주의해서 사용

전체 제한 사항은: Read 도구를 사용하여 references/confidence_and_limitations.md를 읽으십시오.

문제 해결

일반적인 문제

문제: 모든 예측에서 낮은 신뢰도 점수

  • 원인: 크거나 특이한 리간드, 불명확한 결합 부위, 단백질 유연성
  • 해결 방법: samples_per_complex 증가 (20-40), 앙상블 도킹 시도, 단백질 구조 검증

문제: 메모리 부족 오류

  • 원인: 배치 크기에 비해 GPU 메모리 부족
  • 해결 방법: --batch_size 2로 줄이거나 한 번에 처리하는 복합체 수 줄이기

문제: 느린 성능

  • 원인: GPU 대신 CPU에서 실행
  • 해결 방법: python -c "import torch; print(torch.cuda.is_available())"로 CUDA 확인, GPU 사용

문제: 비현실적인 결합 포즈

  • 원인: 잘못된 단백질 준비, 너무 큰 리간드, 잘못된 결합 부위
  • 해결 방법: 단백질에서 누락된 잔기 확인, 먼 물 분자 제거, 결합 부위 지정 고려

문제: "Module not found" 오류

  • 원인: 종속성 누락 또는 잘못된 환경
  • 해결 방법: python scripts/setup_check.py를 실행하여 진단

성능 최적화

최상의 결과를 위해:

  1. GPU 사용 (실용적으로 필수적)
  2. 반복적인 단백질 사용을 위해 ESM 임베딩 사전 계산
  3. 여러 복합체를 함께 배치 처리
  4. 기본 매개변수로 시작한 다음 필요에 따라 조정
  5. 단백질 구조 검증 (누락된 잔기 해결)
  6. 리간드에 대해 정규 SMILES 사용

그래픽 사용자 인터페이스

대화형 사용을 위해 웹 인터페이스를 시작합니다.

python app/main.py
# http://localhost:7860 으로 이동

또는 설치 없이 온라인 데모 사용:

리소스

도우미 스크립트 (scripts/)

prepare_batch_csv.py: 배치 입력 CSV 파일 생성 및 검증

  • 예제 항목이 있는 템플릿 생성
  • 파일 경로 및 SMILES 문자열 검증
  • 필수 열 및 형식 문제 확인

analyze_results.py: 신뢰도 점수 분석 및 예측 순위 지정

  • 단일 또는 배치 실행 결과 파싱
  • 통계 요약 생성
  • 다운스트림 분석을 위해 CSV로 내보내기
  • 복합체 간 최고 예측 식별

setup_check.py: DiffDock 환경 설정 확인

  • Python 버전 및 종속성 확인
  • PyTorch 및 CUDA 가용성 확인
  • RDKit 및 PyTorch Geometric 설치 테스트
  • 필요한 경우 설치 지침 제공

참고 문서 (references/)

parameters_reference.md: 전체 매개변수 문서

  • 모든 명령줄 옵션 및 구성 매개변수
  • 기본값 및 허용 범위
  • 다양성 제어를 위한 온도 매개변수
  • 모델 체크포인트 위치 및 버전 플래그

사용자가 다음을 필요로 할 때 이 파일을 읽으십시오:

  • 자세한 매개변수 설명
  • 특정 시스템에 대한 미세 조정 지침
  • 대체 샘플링 전략

confidence_and_limitations.md: 신뢰도 점수 해석 및 도구 제한 사항

  • 자세한 신뢰도 점수 해석
  • 예측을 신뢰해야 하는 경우
  • DiffDock의 범위 및 제한 사항
  • 보완 도구와의 통합
  • 예측 품질 문제 해결

사용자가 다음을 필요로 할 때 이 파일을 읽으십시오:

  • 신뢰도 점수 해석 도움말
  • DiffDock을 사용하지 말아야 할 때 이해
  • 다른 도구와 결합하는 방법에 대한 지침
  • 검증 전략

workflows_examples.md: 포괄적인 워크플로우 예제

  • 자세한 설치 지침
  • 모든 워크플로우에 대한 단계별 예제
  • 고급 통합 패턴
  • 일반적인 문제 해결
  • 모범 사례 및 최적화 팁

사용자가 다음을 필요로 할 때 이 파일을 읽으십시오:

  • 코드가 포함된 전체 워크플로우 예제
  • GNINA, OpenMM 또는 기타 도구와의 통합
  • 가상 스크리닝 워크플로우
  • 앙상블 도킹 절차

자산 (assets/)

batch_template.csv: 템플릿

…

[번역을 위해 잘림]

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

alphagenome

Look up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), score variants or scan windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and build Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

analytical-method-validation

Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include

anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

arbor

Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g.

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

autoskill

Observe the user

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

bgpt-paper-search

Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.

bids

>

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and publication figures (scientific-visualization). Use whenever the user has bulk RNA-seq reads or quant output and wants a complete, reproducible differential-expression workflow — e.g.

cellxgene-census

Query the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local single-cell data use scanpy, anndata, or scvi-tools.

cirq

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

citation-management

Comprehensive citation management for academic research. Search OpenAlex, PubMed, and Google Scholar for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.

clinical-decision-support

Prepare and validate research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Use for aggregate or synthetic research documentation and traceability—not patient care or live clinical operation.

clinical-reports

Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports. Use only with synthetic, de-identified, or aggregate inputs and verified source-fact manifests; every output requires qualified review.

관련 스킬