Predicts protein-ligand binding poses using DiffDock diffusion-based molecular docking from PDB structures and SMILES, producing confidence scores for virtual screening and structure-based drug design.
Ships in alterlab-cheminformatics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
DiffDock is a diffusion-based deep learning tool for molecular docking that predicts 3D binding poses of small molecule ligands to protein targets. The repository's default model is DiffDock-L (Feb 2024); it is widely used for blind docking, though co-folding models (Boltz-2, Chai-1) and physics-based rescoring are now common complements, and predicted poses should be checked for physical validity (e.g. with PoseBusters).
Core Capabilities:
Key Distinction: DiffDock predicts binding poses (3D structure) and confidence (prediction certainty), NOT binding affinity (ΔG, Kd). Always combine with scoring functions (GNINA, MM/GBSA) for affinity assessment.
This skill should be used when:
| Scenario | Use Instead |
|---|---|
| Binding affinity / docking score on a cloud platform (AutoDock Vina) | alterlab-rowan |
| MD simulation of a complex, pose-stability / RMSD over a trajectory | alterlab-molecular-dynamics |
| Protein–protein or protein–nucleic-acid complex structure prediction | alterlab-boltz or alterlab-chai |
| Predicting the apo protein structure itself (no ligand) | alterlab-alphafold |
| Looking up measured protein–ligand affinities for the target | alterlab-bindingdb |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-rowan) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
Before proceeding with DiffDock tasks, verify the environment setup:
# Use the provided setup checker
python scripts/setup_check.py
This script validates Python version, PyTorch with CUDA, PyTorch Geometric, RDKit, ESM, and other dependencies.
Option 1: Conda (Recommended)
git clone https://github.com/gcorso/DiffDock.git
cd DiffDock
conda env create --file environment.yml
conda activate diffdock
Option 2: Docker
docker pull rbgcsail/diffdock
docker run -it --gpus all --entrypoint /bin/bash rbgcsail/diffdock
micromamba activate diffdock
Important Notes:
Use Case: Dock one ligand to one protein target
Input Requirements:
Command:
python -m inference \
--config default_inference_args.yaml \
--protein_path protein.pdb \
--ligand "CC(=O)Oc1ccccc1C(=O)O" \
--out_dir results/single_docking/
Alternative (protein sequence):
python -m inference \
--config default_inference_args.yaml \
--protein_sequence "MSKGEELFTGVVPILVELDGDVNGHKF..." \
--ligand ligand.sdf \
--out_dir results/sequence_docking/
Output Structure: DiffDock writes one subdirectory per complex (even for a single run), with the confidence embedded in each pose's filename:
results/single_docking/
└── complex_0/
├── rank1.sdf # Top pose (no score in name)
├── rank1_confidence-0.42.sdf # Same pose, confidence in filename
├── rank2_confidence-1.10.sdf # 2nd-ranked pose
├── ...
└── rank10_confidence-3.05.sdf # 10th pose (default: 10 samples)
There is no separate confidence_scores.txt; the confidence value is the confidenceN.NN suffix. Poses are ranked by descending confidence (rank1 = best).
Use Case: Dock multiple ligands to proteins, virtual screening campaigns
Step 1: Prepare Batch CSV
Use the provided script to create or validate batch input:
# Create template
python scripts/prepare_batch_csv.py --create --output batch_input.csv
# Validate existing CSV
python scripts/prepare_batch_csv.py my_input.csv --validate
CSV Format:
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,
Required Columns:
complex_name: Unique identifierprotein_path: PDB file path (leave empty if using sequence)ligand_description: SMILES string or ligand file pathprotein_sequence: Amino acid sequence (leave empty if using PDB)Step 2: Run Batch Docking
python -m inference \
--config default_inference_args.yaml \
--protein_ligand_csv batch_input.csv \
--out_dir results/batch/ \
--batch_size 10
For Large Virtual Screening (>100 compounds):
Put every protein–ligand pair in one CSV and run a single inference call. At start-up
inference.py computes the ESM2 (esm2_t33_650M_UR50D) embeddings for all complexes in the
CSV in one batched pass and reuses them for the confidence model — there is no separate
pre-computation step and no --esm_embeddings_path flag for inference.
(datasets/esm_embedding_preparation.py / esm_embeddings_to_pt.py exist only for the
training/evaluation benchmarks.) Split very large libraries into several CSVs if GPU memory
or run time is a concern.
Config gotcha: values in the --config YAML are applied after the CLI flags and
override them. samples_per_complex, inference_steps, and the temp_* parameters are in
default_inference_args.yaml, so passing e.g. --samples_per_complex 20 alongside
--config default_inference_args.yaml has no effect — edit a copy of the YAML instead
(--batch_size is not in the default YAML, so the CLI flag works).
After docking completes, analyze confidence scores and rank predictions:
# Analyze all results
python scripts/analyze_results.py results/batch/
# Show top 5 per complex
python scripts/analyze_results.py results/batch/ --top 5
# Filter by confidence threshold
python scripts/analyze_results.py results/batch/ --threshold 0.0
# Export to CSV
python scripts/analyze_results.py results/batch/ --export summary.csv
# Show top 20 predictions across all complexes
python scripts/analyze_results.py results/batch/ --best 20
The analysis script:
Understanding Scores:
| Score Range | Confidence Level | Interpretation |
|---|---|---|
| > 0 | High | Strong prediction, likely accurate |
| -1.5 to 0 | Moderate | Reasonable prediction, validate carefully |
| < -1.5 | Low | Uncertain prediction, requires validation |
Critical Notes:
For detailed guidance: Read references/confidence_and_limitations.md using the Read tool
Create custom configuration for specific use cases:
# Copy template
cp assets/custom_inference_config.yaml my_config.yaml
# Edit parameters (see template for presets)
# Then run with custom config
python -m inference \
--config my_config.yaml \
--protein_ligand_csv input.csv \
--out_dir results/
Sampling Density:
samples_per_complex: 10 → Increase to 20-40 for difficult casesInference Steps:
inference_steps: 20 → Increase to 25-30 for higher accuracyTemperature Parameters (control diversity):
temp_sampling_tor: 7.04 → Increase for flexible ligands (8-10)temp_sampling_tor: 7.04 → Decrease for rigid ligands (5-6)Presets Available in Template:
For complete parameter reference: Read references/parameters_reference.md using the Read tool
For proteins with known flexibility, dock to multiple conformations:
# Create ensemble 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)
Run docking with increased sampling (set samples_per_complex: 20 in a copy of the YAML —
a --samples_per_complex flag would be overwritten by the default config):
cp default_inference_args.yaml ensemble_args.yaml # edit: samples_per_complex: 20
python -m inference \
--config ensemble_args.yaml \
--protein_ligand_csv ensemble_input.csv \
--out_dir results/ensemble/
DiffDock generates poses; combine with other tools for affinity:
GNINA (Fast neural network scoring):
for pose in results/*.sdf; do
gnina -r protein.pdb -l "$pose" --score_only
done
MM/GBSA (More accurate, slower): Use AmberTools MMPBSA.py or gmx_MMPBSA after energy minimization
Free Energy Calculations (Most accurate): Use OpenMM + OpenFE or GROMACS for FEP/TI calculations
Recommended Workflow:
DiffDock IS Designed For:
DiffDock IS NOT Designed For:
For complete limitations: Read references/confidence_and_limitations.md using the Read tool
Issue: Low confidence scores across all predictions
samples_per_complex (20-40), try ensemble docking, validate protein structureIssue: Out of memory errors
--batch_size 2 or process fewer complexes at onceIssue: Slow performance
python -c "import torch; print(torch.cuda.is_available())", use GPUIssue: Unrealistic binding poses
Issue: "Module not found" errors
python scripts/setup_check.py to diagnoseFor Best Results:
For interactive use, launch the web interface:
python app/main.py
# Navigate to http://localhost:7860
Or try the online demo (https://huggingface.co/spaces/reginabarzilaygroup/DiffDock-Web), though the Space is often down — prefer a local or Docker install for reliable runs.
scripts/)prepare_batch_csv.py: Create and validate batch input CSV files
analyze_results.py: Analyze confidence scores and rank predictions
setup_check.py: Verify DiffDock environment setup
references/)parameters_reference.md: Complete parameter documentation
Read this file when users need:
confidence_and_limitations.md: Confidence score interpretation and tool limitations
Read this file when users need:
workflows_examples.md: Comprehensive workflow examples
Read this file when users need:
assets/)batch_template.csv: Template for batch processing
custom_inference_config.yaml: Configuration template
setup_check.py before starting large jobsprepare_batch_csv.py to catch errors earlyWhen using DiffDock, cite the appropriate papers:
DiffDock-L (current default model):
Corso et al. (2024) "Deep Confident Steps to New Pockets: Strategies for Docking Generalization"
ICLR 2024, arXiv:2402.18396
Original DiffDock:
Corso et al. (2023) "DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking"
ICLR 2023, arXiv:2210.01776
Part of the AlterLab Academic Skills suite.
assets/batch_template.csv (opens in a new tab)assets/custom_inference_config.yaml (opens in a new tab)evals/evals.json (opens in a new tab)evals/fixtures/protein.pdb (opens in a new tab)references/confidence_and_limitations.md (opens in a new tab)references/parameters_reference.md (opens in a new tab)references/workflows_examples.md (opens in a new tab)scripts/analyze_results.py (opens in a new tab)scripts/prepare_batch_csv.py (opens in a new tab)scripts/setup_check.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
12 skills in this plugin
/alterlab-datamolWraps RDKit in a high-level, pandas-friendly datamol interface with sensible defaults for everyday drug discovery — SMILES/SDF loading into DataFrames, molecule standardization, descriptors, fingerprints, Butina clustering, 3D conformer generation, scaffold analysis, and parallel batch processing, returning native rdkit.Chem.Mol objects. Use when running standard cheminformatics pipelines on molecule tables with minimal boilerplate; for low-level control, custom sanitization, or specialized algorithms prefer alterlab-rdkit. Part of the AlterLab Academic Skills suite./alterlab-deepchemRuns molecular machine learning with DeepChem — diverse featurizers, pre-built MoleculeNet benchmark datasets, and pre-trained models (ChemBERTa, GROVER) for property prediction (ADMET, toxicity, solubility) via traditional ML or graph neural networks. Use when running end-to-end molecular ML experiments that need MoleculeNet benchmarks, scaffold splitting, or ready-made models with minimal setup; for building custom PyTorch graph architectures prefer alterlab-torch-geometric, and for standalone molecule-to-feature-vector generation prefer alterlab-molfeat. Part of the AlterLab Academic Skills suite./alterlab-cheminformatics:alterlab-diffdockfrom alterlab-cheminformatics
npx claudepluginhub alterlab-ieu/alterlab-academic-skills --plugin alterlab-cheminformaticsOther plugins' skills for the same job