Docking — Protein-Ligand Docking & Virtual Screening
AutoDock Vina 1.2 · Gnina · pdbfixer · ProLIF · fpocket. For structure-based drug design: binding mode prediction, virtual screening, and lead optimization by docking.
When to Use This Skill
- Predicting how a small molecule binds to a protein (binding mode / pose)
- Virtual screening: ranking a library of compounds by predicted binding affinity
- Validating a pharmacophore hypothesis in 3D structural context
- Ensemble docking to account for protein flexibility
- Re-scoring docking poses with physics-based (MM-GB/SA) or CNN-based scoring
- Fragment-based screening (→ see
fbdd skill for growing/linking)
Decision Tree — Docking vs. Other Methods
Input: protein structure 3D?
NO → ligand-based methods (pharmacophore, QSAR, similarity search)
YES → docking
Compound set size?
> 10 000 → VS pipeline (references/virtual-screening.md)
10–10 000 → standard docking batch (references/vina-gnina.md)
< 10 → manual docking + careful pose analysis
Goal: binding mode accuracy vs. ranking accuracy?
Binding mode → high exhaustiveness, Gnina CNN rescoring
Ranking → standard Vina + clustering + MM-GB/SA rescore
Protein structure source?
X-ray / CryoEM → direct prep (references/protein-prep.md)
Homology model → validate first (→ homology-modeling skill)
AlphaFold → check pLDDT > 80 in pocket region before docking
Quick Start
import subprocess
from pathlib import Path
# 1. Prepare receptor (pdbfixer + obabel → PDBQT)
# See references/protein-prep.md for full workflow
# 2. Prepare ligand
import subprocess
subprocess.run([
"obabel", "ligand.sdf", "-O", "ligand.pdbqt",
"--gen3d", "-h"
], check=True)
# 3. Run Vina
result = subprocess.run([
"vina",
"--receptor", "receptor.pdbqt",
"--ligand", "ligand.pdbqt",
"--center_x", "10.5",
"--center_y", "-2.3",
"--center_z", "14.1",
"--size_x", "20",
"--size_y", "20",
"--size_z", "20",
"--exhaustiveness", "16",
"--num_modes", "9",
"--out", "docked.pdbqt"
], capture_output=True, text=True, check=True)
# 4. Parse best score
for line in result.stdout.splitlines():
if line.strip().startswith("1 "):
print("Best score:", line.split()[1], "kcal/mol")
break
Router — What to Read
| Task |
Reference |
| Clean PDB, add H, assign protonation, define docking box |
references/protein-prep.md |
| AutoDock Vina / Gnina docking, parameters, scoring |
references/vina-gnina.md |
| High-throughput VS pipeline, metrics (BEDROC, EF), filtering |
references/virtual-screening.md |
| Extract interactions (H-bonds, hydrophobic, π), ProLIF, clustering |
references/pose-analysis.md |
| Ensemble docking, protein flexibility, MD snapshots |
references/ensemble-docking.md |
Key Tools
| Tool |
Install |
Role |
vina |
conda install -c conda-forge autodock-vina |
Docking engine (empirical scoring) |
gnina |
prebuilt binary or Docker |
CNN scoring function |
pdbfixer |
conda install -c conda-forge pdbfixer |
PDB cleaning, H addition, missing residues |
openbabel |
conda install -c conda-forge openbabel |
Format conversion → PDBQT |
prolif |
pip install prolif |
Protein-Ligand Interaction Fingerprints |
fpocket |
conda install -c conda-forge fpocket |
Pocket detection / box definition |
propka |
pip install propka |
pKa prediction for protonation |
meeko |
pip install meeko |
Ligand PDBQT prep (better than obabel for Vina) |
Scoring Function Reference
| Method |
Score type |
Precision |
Speed |
Use case |
| Vina empirical |
ΔG (kcal/mol) |
★★★ |
★★★★★ |
VS, binding mode |
| Gnina CNN |
unitless affinity |
★★★★ |
★★★★ |
Rescoring, pose selection |
| MM-GB/SA |
ΔG (kcal/mol) |
★★★★ |
★★ |
Lead opt rescoring |
| FEP/TI |
ΔΔG (kcal/mol) |
★★★★★ |
★ |
Precise relative ranking |
Installation
# Vina + OpenBabel (required)
conda install -c conda-forge autodock-vina openbabel
# pdbfixer + propka (receptor prep)
conda install -c conda-forge pdbfixer
pip install propka
# ProLIF (pose analysis)
pip install prolif
# meeko (better ligand PDBQT prep)
pip install meeko
# fpocket (pocket detection)
conda install -c conda-forge fpocket
# Gnina (CNN rescoring) — prebuilt binary
wget https://github.com/gnina/gnina/releases/latest/download/gnina
chmod +x gnina && mv gnina ~/.local/bin/
# Verify Vina
vina --version # AutoDock Vina 1.2.x
Related Skills
force-fields → MM-GB/SA rescoring after docking
mdanalysis → generate conformational ensemble for ensemble docking
homology-modeling → build receptor when no crystal structure available
pharmacophore → pharmacophore-constrained docking, pose validation
free-energy → FEP/TI for accurate ΔΔG after docking hit identification
py3Dmol → 3D visualization of poses inline
- Scripts:
chem_filter.py --lipinski → pre-filter library before VS
- Scripts:
chem_3d.py → generate 3D conformers for ligand prep
1---2name: docking3description: Use when performing protein-ligand docking, virtual screening, or structure-based drug design. Covers receptor preparation (protonation, pocket definition), AutoDock Vina/Gnina docking engines, high-throughput virtual screening pipelines, pose analysis with interaction fingerprints, and ensemble docking for protein flexibility.4---56# Docking — Protein-Ligand Docking & Virtual Screening78AutoDock Vina 1.2 · Gnina · pdbfixer · ProLIF · fpocket. For structure-based drug design: binding mode prediction, virtual screening, and lead optimization by docking.910## When to Use This Skill1112- Predicting how a small molecule binds to a protein (binding mode / pose)13- Virtual screening: ranking a library of compounds by predicted binding affinity14- Validating a pharmacophore hypothesis in 3D structural context15- Ensemble docking to account for protein flexibility16- Re-scoring docking poses with physics-based (MM-GB/SA) or CNN-based scoring17- Fragment-based screening (→ see `fbdd` skill for growing/linking)1819## Decision Tree — Docking vs. Other Methods2021```22Input: protein structure 3D?23 NO → ligand-based methods (pharmacophore, QSAR, similarity search)24 YES → docking2526Compound set size?27 > 10 000 → VS pipeline (references/virtual-screening.md)28 10–10 000 → standard docking batch (references/vina-gnina.md)29 < 10 → manual docking + careful pose analysis3031Goal: binding mode accuracy vs. ranking accuracy?32 Binding mode → high exhaustiveness, Gnina CNN rescoring33 Ranking → standard Vina + clustering + MM-GB/SA rescore3435Protein structure source?36 X-ray / CryoEM → direct prep (references/protein-prep.md)37 Homology model → validate first (→ homology-modeling skill)38 AlphaFold → check pLDDT > 80 in pocket region before docking39```4041## Quick Start4243```python44import subprocess45from pathlib import Path4647# 1. Prepare receptor (pdbfixer + obabel → PDBQT)48# See references/protein-prep.md for full workflow4950# 2. Prepare ligand51import subprocess52subprocess.run([53 "obabel", "ligand.sdf", "-O", "ligand.pdbqt",54 "--gen3d", "-h"55], check=True)5657# 3. Run Vina58result = subprocess.run([59 "vina",60 "--receptor", "receptor.pdbqt",61 "--ligand", "ligand.pdbqt",62 "--center_x", "10.5",63 "--center_y", "-2.3",64 "--center_z", "14.1",65 "--size_x", "20",66 "--size_y", "20",67 "--size_z", "20",68 "--exhaustiveness", "16",69 "--num_modes", "9",70 "--out", "docked.pdbqt"71], capture_output=True, text=True, check=True)7273# 4. Parse best score74for line in result.stdout.splitlines():75 if line.strip().startswith("1 "):76 print("Best score:", line.split()[1], "kcal/mol")77 break78```7980## Router — What to Read8182| Task | Reference |83|------|-----------|84| Clean PDB, add H, assign protonation, define docking box | `references/protein-prep.md` |85| AutoDock Vina / Gnina docking, parameters, scoring | `references/vina-gnina.md` |86| High-throughput VS pipeline, metrics (BEDROC, EF), filtering | `references/virtual-screening.md` |87| Extract interactions (H-bonds, hydrophobic, π), ProLIF, clustering | `references/pose-analysis.md` |88| Ensemble docking, protein flexibility, MD snapshots | `references/ensemble-docking.md` |8990## Key Tools9192| Tool | Install | Role |93|------|---------|------|94| `vina` | `conda install -c conda-forge autodock-vina` | Docking engine (empirical scoring) |95| `gnina` | prebuilt binary or Docker | CNN scoring function |96| `pdbfixer` | `conda install -c conda-forge pdbfixer` | PDB cleaning, H addition, missing residues |97| `openbabel` | `conda install -c conda-forge openbabel` | Format conversion → PDBQT |98| `prolif` | `pip install prolif` | Protein-Ligand Interaction Fingerprints |99| `fpocket` | `conda install -c conda-forge fpocket` | Pocket detection / box definition |100| `propka` | `pip install propka` | pKa prediction for protonation |101| `meeko` | `pip install meeko` | Ligand PDBQT prep (better than obabel for Vina) |102103## Scoring Function Reference104105| Method | Score type | Precision | Speed | Use case |106|--------|-----------|-----------|-------|----------|107| Vina empirical | ΔG (kcal/mol) | ★★★ | ★★★★★ | VS, binding mode |108| Gnina CNN | unitless affinity | ★★★★ | ★★★★ | Rescoring, pose selection |109| MM-GB/SA | ΔG (kcal/mol) | ★★★★ | ★★ | Lead opt rescoring |110| FEP/TI | ΔΔG (kcal/mol) | ★★★★★ | ★ | Precise relative ranking |111112## Installation113114```bash115# Vina + OpenBabel (required)116conda install -c conda-forge autodock-vina openbabel117118# pdbfixer + propka (receptor prep)119conda install -c conda-forge pdbfixer120pip install propka121122# ProLIF (pose analysis)123pip install prolif124125# meeko (better ligand PDBQT prep)126pip install meeko127128# fpocket (pocket detection)129conda install -c conda-forge fpocket130131# Gnina (CNN rescoring) — prebuilt binary132wget https://github.com/gnina/gnina/releases/latest/download/gnina133chmod +x gnina && mv gnina ~/.local/bin/134135# Verify Vina136vina --version # AutoDock Vina 1.2.x137```138139## Related Skills140141- `force-fields` → MM-GB/SA rescoring after docking142- `mdanalysis` → generate conformational ensemble for ensemble docking143- `homology-modeling` → build receptor when no crystal structure available144- `pharmacophore` → pharmacophore-constrained docking, pose validation145- `free-energy` → FEP/TI for accurate ΔΔG after docking hit identification146- `py3Dmol` → 3D visualization of poses inline147- Scripts: `chem_filter.py --lipinski` → pre-filter library before VS148- Scripts: `chem_3d.py` → generate 3D conformers for ligand prep