DockingAutoDock Vina

AutoDock Vina Tutorial: Molecular Docking for Beginners

Learn molecular docking from scratch with AutoDock Vina. Understand scoring functions, search boxes, exhaustiveness, and run your first docking via API with Python.

Ryan Bethencourt
March 23, 2026
9 min read

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.

Complete beginner docking tutorial
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"])
Note
Vina returns poses sorted by binding affinity, so the first pose is always the highest-ranked prediction. The number of poses returned is controlled by the num_poses parameter (default: 9).

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
Warning
Docking scores should not be treated as absolute binding affinities. Vina scores correlate with experimental binding energies (R = 0.5 to 0.6 on benchmark sets), but they are best used for relative ranking rather than predicting exact Kd values.

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.

Frequently Asked Questions

What is a good binding affinity score in AutoDock Vina?

Binding affinity scores in Vina are reported as negative kcal/mol values. More negative means stronger predicted binding. Generally, scores below -7.0 kcal/mol suggest moderate binding, and scores below -9.0 kcal/mol suggest strong binding. However, Vina scores are best used for relative ranking of compounds against the same target rather than as absolute binding predictions.

How do I choose the docking search box?

The search box should enclose the known or suspected binding site with a margin of 5 to 8 angstroms around the pocket. If a co-crystallized ligand exists in the PDB structure, center the box on that ligand. If not, use a pocket detection tool to identify likely binding sites. When using the SciRouter API, the binding pocket is auto-detected from the receptor structure.

How does AutoDock Vina compare to other docking tools?

Vina offers a good balance of speed and accuracy for high-throughput screening. It is free and open-source, unlike commercial tools such as Glide or GOLD. For AI-based docking that does not require a predefined search box, consider DiffDock. See our comparison post for detailed benchmarks.

What is exhaustiveness in AutoDock Vina?

Exhaustiveness controls how thoroughly Vina searches conformational space. The default value is 8. Higher values (16, 32) explore more poses and are less likely to miss the correct binding mode, but increase runtime proportionally. For screening campaigns, 8 is standard. For lead optimization where accuracy matters more, use 16 or 32.

Try It Free

No Login Required

Try this yourself

500 free credits. No credit card required.