What Is Molecular Docking?
Molecular docking is a computational method that predicts how a small molecule (the ligand) fits into the binding site of a protein (the receptor). The goal is to find the optimal orientation and position of the ligand within the protein pocket and estimate the strength of the interaction. Docking is foundational in drug discovery because it allows researchers to screen thousands of compounds computationally before committing to expensive lab experiments.
AutoDock Vina is one of the most popular docking programs in academic research. Released in 2010 by Oleg Trott and Arthur Olson at The Scripps Research Institute, Vina combines a physics-based scoring function with an efficient search algorithm to predict binding poses and estimate binding free energies.
How the Vina Scoring Function Works
Vina uses an empirical scoring function that combines several interaction terms to estimate the binding affinity between a ligand and a receptor. Understanding these terms helps you interpret docking results:
- Van der Waals interactions: attractive forces between atoms at close range, representing shape complementarity between ligand and receptor
- Hydrogen bonds: directional interactions between donor and acceptor atoms that stabilize binding
- Hydrophobic contacts: favorable interactions when nonpolar ligand atoms pack against nonpolar receptor atoms
- Torsional penalty: an entropic cost for each rotatable bond in the ligand that becomes constrained upon binding
The final score is reported in kcal/mol. More negative values indicate stronger predicted binding. The scoring function was trained on experimental binding affinity data from the PDBbind database.
Key Concepts Before You Start
The Search Box
Vina searches for ligand binding poses within a defined 3D box in the receptor structure. This box must enclose the binding site you want to target. If the box is too small, Vina may miss valid poses. If the box is too large, the search becomes less efficient and more prone to false positives. A typical box extends 5 to 8 angstroms beyond the binding pocket in each direction.
Exhaustiveness
The exhaustiveness parameter controls how many independent runs Vina performs internally. Each run starts from a random initial configuration and uses an iterated local search to find good poses. Higher exhaustiveness means more runs, better sampling, and longer runtime. The default value of 8 is a reasonable trade-off for most applications.
Binding Affinity
Vina outputs a predicted binding affinity in kcal/mol for each pose. These scores are most useful for ranking compounds against the same target. A compound scoring -9.5 kcal/mol is predicted to bind more strongly than one scoring -6.2 kcal/mol. Absolute values should be treated as rough estimates rather than precise thermodynamic measurements.
Step-by-Step: Your First Docking Run
This tutorial uses the SciRouter API, which handles receptor and ligand preparation automatically. You only need a SMILES string for your ligand and a PDB code for your target protein.
import requests
import time
API_KEY = "sk-sci-your-api-key"
BASE = "https://api.scirouter.ai/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}
# Step 1: Submit a docking job
# Docking aspirin against COX-2 (PDB: 5KIR)
response = requests.post(
f"{BASE}/docking/vina",
headers=headers,
json={
"ligand_smiles": "CC(=O)OC1=CC=CC=C1C(=O)O", # Aspirin
"receptor_pdb": "5KIR", # COX-2
"exhaustiveness": 8,
"num_poses": 9
}
)
job = response.json()
print(f"Job submitted: {job['job_id']}")
# Step 2: Poll for results
while True:
result = requests.get(
f"{BASE}/docking/vina/{job['job_id']}",
headers=headers
).json()
if result["status"] == "completed":
break
elif result["status"] == "failed":
raise RuntimeError(result["error"])
time.sleep(5)
# Step 3: Interpret results
print(f"\nDocking completed. {len(result['poses'])} poses found:\n")
for i, pose in enumerate(result["poses"]):
print(f" Pose {i+1}: {pose['affinity']:>6.1f} kcal/mol")
print(f"\nBest binding affinity: {result['poses'][0]['affinity']:.1f} kcal/mol")
# Step 4: Save the best pose as SDF for visualization
with open("best_pose.sdf", "w") as f:
f.write(result["poses"][0]["sdf"])How to Interpret Your Results
After a docking run completes, you receive a set of ranked poses. Here is how to evaluate them effectively:
- Check the top score: values below -7 kcal/mol suggest the compound fits the pocket well
- Compare across compounds: rank multiple ligands against the same target to identify hits
- Inspect pose diversity: if the top 3 poses are very different, the binding mode may be uncertain
- Visualize the pose: load the SDF output into PyMOL, ChimeraX, or Mol* to check for sensible interactions
- Look for hydrogen bonds: key hydrogen bonds between the ligand and active-site residues increase confidence in the pose
Next Steps
Now that you understand the fundamentals of Vina docking, there are several directions to explore:
- Screen a library of compounds by iterating over a list of SMILES strings
- Compare Vina results with AI-based docking using DiffDock
- Predict protein structures for targets without crystal structures using ESMFold
Try AutoDock Vina from the SciRouter tools page, or read our comparison of Vina, Glide, and GOLD to understand how Vina stacks up against commercial docking software.