agentleFS
naitynaity/FM4Life/skills/diffdock/SKILL.md

diffdock

Skill2 starsChanged 8 months agoMITView on GitHub

Skill for protein-ligand docking with DiffDock, a diffusion model that generates 3D binding poses from protein structure and ligand SMILES. Use this skill when a user wants to dock a small molecule to a protein, predict binding poses, run blind docking (no pocket specification required), or process batches of protein-ligand complexes. Also trigger when the user mentions DiffDock, molecular docking, binding pose prediction, or protein-ligand complex prediction.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always inspect top poses visually — confidence is a heuristic, not ground truth

    line 146

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DiffDock: Diffusion-Based Molecular Docking

Overview

DiffDock predicts 3D protein-ligand binding poses using a diffusion model. Given a protein structure and a ligand SMILES string, it generates multiple candidate poses ranked by a confidence score.

Key properties:

  • Blind docking — no binding site specification required; searches entire protein surface
  • Diffusion model — generates diverse poses via iterative denoising (score-based diffusion)
  • SE(3)-equivariant — architecture respects 3D symmetry (rotations, translations)
  • Confidence model — separate network ranks poses by predicted accuracy (not binding affinity)
  • Current default: DiffDock-L (ICLR 2024) — improved generalization over original (ICLR 2023)

Important distinction: The confidence score predicts pose quality (RMSD to true binding pose), not binding affinity. High confidence ≠ strong binder.

Installation

DiffDock requires a conda environment — no pip-only install available:

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

Or with Docker (includes GPU support):

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

Key dependencies: PyTorch 1.13 + CUDA 11.7, torch-geometric 2.2, e3nn 0.5.1, RDKit, fair-esm (ESM-2 for protein embeddings), pytorch-lightning.

First run: precomputes SO(2)/SO(3) distribution caches (~2 min). Not repeated.

Core Usage

Single complex

cd DiffDock
python -m inference \
  --config default_inference_args.yaml \
  --protein_path protein.pdb \
  --ligand_description "COc(cc1)ccc1C#N" \
  --out_dir results/my_docking

From protein sequence (ESMFold folds it automatically)

python -m inference \
  --config default_inference_args.yaml \
  --protein_sequence "MVHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH" \
  --ligand_description "CC(=O)Nc1ccc(O)cc1" \
  --out_dir results/my_docking

Batch processing (CSV input)

python -m inference \
  --config default_inference_args.yaml \
  --protein_ligand_csv complexes.csv \
  --out_dir results/batch

CSV format (complexes.csv):

complex_name,protein_path,ligand_description,protein_sequence
complex_A,proteins/target_A.pdb,CC(=O)Nc1ccc(O)cc1,
complex_B,proteins/target_B.pdb,data/ligand_B.sdf,
complex_C,,COc1ccc(C#N)cc1,MVHLTPEEKSAVTALWG...

Ligand from SDF file

python -m inference \
  --config default_inference_args.yaml \
  --protein_path protein.pdb \
  --ligand_description ligand.sdf \
  --out_dir results/my_docking

Key Parameters

ParameterDefaultDescription
--samples_per_complex10Poses to generate per complex
--inference_steps20Denoising steps (fewer = faster, less refined)
--batch_size10Parallel complexes (reduce if OOM)
--no_final_step_noiseTrueNo noise in final step (better quality)
--save_visualisationFalseSave reverse-diffusion trajectory PDB

Speed vs quality:

Mode--inference_steps--samples_per_complex--batch_size
Fast screening5520
Default201010
High quality40205

GPU: ~2–5 sec/pose. CPU: ~30–60 sec/pose.

Output Format

results/my_docking/
└── complex_0/
    ├── rank1_confidence0.43.sdf     ← best pose, high confidence
    ├── rank2_confidence-0.12.sdf    ← 2nd best, moderate
    ├── rank3_confidence-1.23.sdf    ← 3rd, low confidence
    └── ...                          ← up to samples_per_complex
  • Files are SDF format — open directly in PyMOL, ChimeraX, or RDKit
  • Ranked by confidence score (rank1 = highest)
  • Confidence score is in the filename: rank{N}_confidence{score}.sdf

Confidence Score Interpretation

ScoreConfidenceMeaning
> 0HighModel is confident the pose is accurate
-1.5 to 0ModeratePlausible but uncertain
< -1.5LowUnreliable; treat with caution

Caveats:

  • Score predicts RMSD accuracy, not binding affinity
  • Thresholds shift downward for large ligands, apo proteins, or unusual binding sites
  • Always inspect top poses visually — confidence is a heuristic, not ground truth
  • For affinity estimation, follow up with MM-PBSA, GNINA, or FEP

Practical Notes

  • No pocket required — DiffDock docks to the entire protein surface
  • One ligand at a time — run separately for each ligand; does not support co-docking
  • Rigid protein — assumes fixed backbone; for flexibility, relax the pose with MD
  • Clean PDB — remove other ligands and waters from the binding site before docking
  • OOM — reduce --batch_size to 1 or 5 for large proteins (>1000 residues)
  • Validate setup — first run on a known PDB complex with its co-crystal ligand; check RMSD

Scripts

  • scripts/dock.py — wrapper that runs DiffDock and parses results; see scripts/dock.py --help

Resources

References

  • references/cli-reference.md — full CLI parameter reference, output format details, confidence model, batch CSV format, DiffDock-L vs original

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.