End-to-end molecular docking pipeline. Target preparation, pocket detection, protein-ligand docking (DiffDock/Vina), scoring, interaction analysis, and pose ranking.
63
75%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./backend/cli/skills/chemistry/molecular-docking/SKILL.mdThis skill provides a complete end-to-end molecular docking workflow covering every stage from raw protein structure to ranked, annotated binding poses. It integrates classical physics-based docking (AutoDock Vina) with modern deep-learning approaches (DiffDock), and includes protein-ligand interaction fingerprinting for downstream analysis.
Pipeline Stages:
Use this skill when the user requests any of the following:
Do NOT use this skill for:
Python version: Python 3.11 required. rdkit-pypi has no wheels for Python 3.12+. Create your venv with uv venv --python 3.11 or python3.11 -m venv .venv.
# Core (required for all stages) — pin numpy<2 for rdkit-pypi compatibility
pip install rdkit-pypi biopython "numpy<2" scipy
# PDBQT conversion — OpenBabel provides reliable Gasteiger charge computation.
# Recommended: install openbabel-wheel for best docking accuracy.
pip install openbabel-wheel
# Target preparation
pip install biopython
# Ligand preparation
pip install rdkit-pypi
# Docking -- Vina pathway
# Note: meeko 0.7.x requires rdkit >= 2023.x. If using rdkit-pypi 2022.9.5,
# install meeko 0.5.x instead: pip install "meeko<0.6"
pip install meeko vina
# Docking -- DiffDock pathway (optional, GPU recommended)
# See https://github.com/gcorso/DiffDock for installation
# Interaction analysis
pip install prolif
# Recommended extras
pip install pandaspython -c "from rdkit import Chem; print('RDKit OK')"
python -c "from Bio.PDB import PDBParser; print('BioPython OK')"
python -c "from vina import Vina; print('Vina OK')"
python -c "import meeko; print('Meeko OK')"
python -c "import prolif; print('ProLIF OK')"
python -c "import shutil; print('OpenBabel:', 'OK' if shutil.which('obabel') else 'not found (fallback charges used)')"Dock one ligand to one protein target from start to finish.
# Step 1: Prepare target
python scripts/prepare_target.py \
--input protein.pdb \
--output prepared_protein.pdb \
--detect-pockets
# Step 2: Prepare ligand
python scripts/prepare_ligands.py \
--input "CCO" \
--output ligand.sdf
# Step 3: Dock
python scripts/dock.py \
--protein prepared_protein.pdb \
--ligand ligand.sdf \
--output-dir docking_results/ \
--method vina \
--center_x 10.0 --center_y 20.0 --center_z 15.0
# Step 4: Score and analyze interactions
python scripts/score.py \
--protein prepared_protein.pdb \
--poses docking_results/poses.sdf \
--output interactions.json
# Step 5: Rank
python scripts/rank.py \
--scores docking_results/scores.csv \
--interactions interactions.json \
--output ranked_results.csv \
--top-n 5Screen a library of compounds against a single target.
# Prepare target once
python scripts/prepare_target.py \
--input target.pdb \
--output prepared_target.pdb \
--detect-pockets
# Prepare compound library (CSV with name,smiles columns)
python scripts/prepare_ligands.py \
--input compounds.csv \
--output library.sdf
# Dock entire library
python scripts/dock.py \
--protein prepared_target.pdb \
--ligand library.sdf \
--output-dir vs_results/ \
--method vina \
--exhaustiveness 32 \
--num-poses 5
# Score all results
python scripts/score.py \
--protein prepared_target.pdb \
--poses vs_results/poses.sdf \
--output vs_interactions.json
# Rank and get top hits
python scripts/rank.py \
--scores vs_results/scores.csv \
--interactions vs_interactions.json \
--output vs_ranked.csv \
--top-n 20Rescore and re-rank poses from a previous docking run or from an external tool.
# Score existing poses
python scripts/score.py \
--protein protein.pdb \
--poses existing_poses.sdf \
--output rescored.json
# Rank with interaction data
python scripts/rank.py \
--scores original_scores.csv \
--interactions rescored.json \
--output reranked.csvUse --pockets or --auto-detect-pockets for automatic pocket-aware docking without manually specifying box coordinates.
# Option A: Use pre-computed pockets from pocket-detection skill
python ../pocket-detection/scripts/detect.py \
--input protein.pdb --output pockets.json
python scripts/dock.py \
--protein protein.pdb \
--ligand ligand.sdf \
--output-dir results/ \
--pockets pockets.json
# Option B: Auto-detect pockets on the fly
python scripts/dock.py \
--protein protein.pdb \
--ligand ligand.sdf \
--output-dir results/ \
--auto-detect-pocketsPocket discovery priority: --pockets flag > protein_pockets.json > pockets.json > druggability.json > auto-detect > geometric center.
| Script | Purpose | Key Inputs | Key Outputs |
|---|---|---|---|
scripts/prepare_target.py | Clean protein, detect pockets | PDB file | Prepared PDB + pocket JSON |
scripts/prepare_ligands.py | SMILES/SDF to 3D conformers | SMILES, CSV, or SDF | Multi-molecule SDF |
scripts/dock.py | Run docking (Vina/DiffDock) | Protein PDB + Ligand SDF | Poses SDF + scores CSV |
scripts/score.py | Interaction fingerprinting | Protein PDB + Poses SDF | Interaction JSON/CSV |
scripts/rank.py | Composite ranking | Scores CSV + Interactions JSON | Ranked summary CSV |
The ranking script combines docking score (normalized) with interaction quality metrics. A compound ranking highly should have both a favorable docking score AND meaningful protein-ligand interactions -- this reduces false positives from scoring function artifacts.
See references/pocket_detection.md for detailed guidance on interpreting detected pockets, druggability assessment, and manual pocket specification strategies.
prepare_target.py first.--ph 7.0 or check SMILES validity.--method vina.--center_x/y/z in the docking step.pip install prolif. Requires RDKit and MDAnalysis.3a6c3a9
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.