DiffDock
Implementation of DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking
Install / Use
/learn @gcorso/DiffDockREADME
DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking

Original paper on arXiv
Implementation of DiffDock, state-of-the-art method for molecular docking, by Gabriele Corso*, Hannes Stark*, Bowen Jing*, Regina Barzilay and Tommi Jaakkola. This repository contains code and instructions to run the method. Since 2024, Jacob Silterra has been leading the effort to maintain and improve the code. If you have any question, feel free to open an issue or reach out to us: gcorso@mit.edu and silterra@mit.edu.
Update February 2024: We have released DiffDock-L, a new version of DiffDock that provides a significant improvement in performance and generalization capacity (see the description of the new version in our new paper). By default the repository now runs the new model, please use GitHub commit history to run the original DiffDock model. Further we now provide instructions for Docker and to set up your own local UI interface.
You can also try out the model on Hugging Face Spaces.
<details><summary><b>Citation</b></summary>If you use this code or the models in your research, please cite the following paper:
@inproceedings{corso2023diffdock,
title={DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking},
author = {Corso, Gabriele and Stärk, Hannes and Jing, Bowen and Barzilay, Regina and Jaakkola, Tommi},
booktitle={International Conference on Learning Representations (ICLR)},
year={2023}
}
If you use the latest version, DiffDock-L, please also cite the following paper:
@inproceedings{corso2024discovery,
title={Deep Confident Steps to New Pockets: Strategies for Docking Generalization},
author={Corso, Gabriele and Deng, Arthur and Polizzi, Nicholas and Barzilay, Regina and Jaakkola, Tommi},
booktitle={International Conference on Learning Representations (ICLR)},
year={2024}
}
</details>
<details open><summary><b>Table of contents</b></summary>
</details>
Usage <a name="usage"></a>
Quick Start <a name="quickstart"></a>
You can directly try out the model without the need of installing anything through Hugging Face Spaces. Credit for the current HF interface goes to Jacob Silterra and for the previous version to Simon Duerr.
Setup Environment <a name="environment"></a>
We will set up the environment using Anaconda. Clone the current repo
git clone https://github.com/gcorso/DiffDock.git
To set up an appropriate environment, navigate to the root of the repository and run the following commands:
conda env create --file environment.yml
conda activate diffdock
See conda documentation for more information.
Using a Docker container
A Dockerfile is provided for building a container:
docker build . -f Dockerfile -t diffdock
Alternatively, you can use a pre-built container to run the code. First, download the container from Docker Hub:
docker pull rbgcsail/diffdock
Check if you have a GPU available
docker run --rm --gpus all nvidia/cuda:11.7.1-devel-ubuntu22.04 nvidia-smi
Then, run the container:
docker run -it --gpus all --entrypoint /bin/bash rbgcsail/diffdock
If you don't have a GPU, run (it will be significantly slower):
docker run -it --entrypoint /bin/bash rbgcsail/diffdock
Inside the container
micromamba activate diffdock
You can now run the code as described below.
Docking Prediction <a name="inference"></a>
We support multiple input formats depending on whether you only want to make predictions for a single complex or for many at once.
The protein inputs need to be .pdb files or sequences that will be folded with ESMFold. The ligand input can either be a SMILES string or a filetype that RDKit can read like .sdf or .mol2.
For a single complex: specify the protein with --protein_path protein.pdb or --protein_sequence GIQSYCTPPYSVLQDPPQPVV and the ligand with --ligand ligand.sdf or --ligand "COc(cc1)ccc1C#N"
For many complexes: create a csv file with paths to proteins and ligand files or SMILES. It contains as columns complex_name (name used to save predictions, can be left empty), protein_path (path to .pdb file, if empty uses sequence), ligand_description (SMILE or file path) and protein_sequence (to fold with ESMFold in case the protein_path is empty).
An example .csv is at data/protein_ligand_example.csv and you would use it with --protein_ligand_csv protein_ligand_example.csv.
And you are ready to run inference:
python -m inference --config default_inference_args.yaml --protein_ligand_csv data/protein_ligand_example.csv --out_dir results/user_predictions_small
When providing the .pdb files you can run DiffDock also on CPU, however, if possible, we recommend using a GPU as the model runs significantly faster. Note that the first time you run DiffDock on a device the program will precompute and store in cache look-up tables for SO(2) and SO(3) distributions (typically takes a couple of minutes), this won't be repeated in following runs.
Graphical UI <a name="gui"></a>
We provide a simple graphical user interface to run DiffDock on a single complex. To use it, run the following command:
python app/main.py
and navigate to http://localhost:7860 in your browser.
FAQ <a name="faq"></a>
<details> <summary><b>How to interpret the DiffDock output confidence score?</b> </summary> It can be hard to interpret and compare confidence score of different complexes or different protein conformations, however, here a rough guideline that we typically use (c is the confidence score of the top pose):- c > 0 high confidence
- -1.5 < c < 0 moderate confidence
- c < -1.5 low confidence
This is assuming the complex is similar to what DiffDock saw in the training set i.e. a not too large drug-like molecule bound to medium size protein (1 or 2 chains) in a conformation that is similar to the bound one (e.g. if it comes from an homologue crystal structure). If you are dealing with a large ligand, a large protein complex and/or an app/unbound protein conformation you should shift these intervals down.
</details> <details> <summary><b>Does DiffDock predict the binding affinity of the ligand to the protein?</b> </summary> No, DiffDock does not predict the binding affinity of the ligand to the protein. It predicts the 3D structure of the complex and it outputs a confidence score. This latter is a measure of the quality of the prediction, i.e. the model's confidence in its prediction of the binding structure. Several of our collaborators have seen this to have some correlation with binding affinity (intuitively if a ligand does not bind there will be no good pose), but it is not a direct measure of it.We are working on better affinity prediction models, but in the meantime we recommend combining DiffDock's prediction with other tools such as docking function (e.g. GNINA), MM/GBSA or absolute binding free energy calculations. For this we recommend to first relax the DiffDock's structure predictions with the tool/force field used for the affinity prediction.
</details> <details> <summary><b>Can I use DiffDock for protein-protein or protein-nucleic acid interactions?</b> </summary> While the program might not throw and error when fed with a large biomolecules as input, the model has only been designed, trained and tested for small molecule docking to proteins. Therefore, DiffDock is only likely to be able to deal with small peptides and nucleic acids as ligands, we do not recommend using DiffDock for the interactions of larger biomolecules. For other interactions we recommend looking at [DiffDock-PP](https://github.com/ketatam/DiffDock-PP) (rigid protein-protein interactions), [AlphaFold-Multimer](https://github.com/google-deepmind/alphafold) (flexible protein-protein interactions) or [RoseTTAFold2NA](https://github.com/uw-ipd/RoseTTAFold2NA) (protein-nucleic acid interactions). </details>Datasets <a name="datasets"></a>
The files in data contain the splits used for the various datasets. Below instructions for how to download each of the different datasets used for training and evaluation:
- PDBBind: download the processed complexes from zenodo, unzip the directory and place it into
datasuch that you have the pathdata/PDBBind_processed. - BindingMOAD: download the processed complexes from zenodo under
BindingMOAD_2020_processed.tar, unzip the directory and place it intodatasuch that you have the pathdata/BindingMOAD_2020_processed. - DockGen: to evaluate the performance of
DiffDock-Lwith this repository you should use directly the data from BindingMOAD above. For other purposes you can download exclusively the complexes of the DockGen benchmark already processed (e.g. chain cutoff) from zenodo downloading theDockGen.tarfile. - PoseBusters: download the processed complexes from zenodo.
- **van d
Related Skills
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
last30days-skill
15.9kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
autoresearch
2.8kClaude Autoresearch Skill — Autonomous goal-directed iteration for Claude Code. Inspired by Karpathy's autoresearch. Modify → Verify → Keep/Discard → Repeat forever.
omg-learn
Learning from user corrections by creating skills and patterns. Patterns can prevent mistakes (block/warn/ask) or inject helpful context into prompts
