What Is AutoDock Vina?
AutoDock Vina is a molecular docking program used to predict how small molecules bind to protein targets. Originally developed at The Scripps Research Institute, Vina has become one of the most cited tools in computational drug discovery. Researchers use it to screen potential drug candidates, predict binding poses, and estimate binding affinities before committing to laboratory experiments.
Molecular docking answers a fundamental question in drug discovery: does this molecule fit into the protein's binding pocket, and if so, how tightly? Vina approaches this by sampling millions of possible orientations and conformations of the small molecule within a defined search region on the protein surface, scoring each one with a physics-based function that estimates binding energy.
Why Vina Is Hard to Set Up Locally
Despite its popularity, running AutoDock Vina on a local machine involves a painful setup process that has frustrated researchers for over a decade:
- Download and compile the Vina binary (or find a prebuilt version for your OS)
- Install the ADFR Suite or MGLTools for receptor and ligand preparation
- Convert receptor PDB files to PDBQT format with correct partial charges
- Generate 3D conformers for ligands and convert them to PDBQT
- Manually define the search box coordinates using a molecular viewer
- Write a configuration file specifying all parameters
- Parse the PDBQT output to extract scores and poses
Many of these dependencies rely on Python 2.7 or older system libraries that conflict with modern environments. For someone who wants to answer a simple question about whether a molecule binds a target, this setup overhead is disproportionate.
Running Vina Through the SciRouter API
SciRouter hosts AutoDock Vina as a managed cloud API. You send a SMILES string for your ligand and a PDB identifier for your receptor. The API handles every preparation step internally: SMILES to 3D conversion, PDBQT generation, binding pocket detection, search box configuration, and Vina execution. Results come back as structured JSON with scored poses.
Prerequisites
You need Python 3.7 or later and a SciRouter API key. Sign up at scirouter.ai/register for 500 free credits per month with no credit card required.
pip install requestsComplete Docking Example
This example docks caffeine against the adenosine A2A receptor. Caffeine is a well-known adenosine receptor antagonist, so we expect reasonable binding affinity predictions.
import requests
import time
import os
API_KEY = os.environ.get("SCIROUTER_API_KEY", "sk-sci-your-api-key")
BASE = "https://api.scirouter.ai/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}
# Submit a Vina docking job
# Caffeine SMILES docked against adenosine A2A receptor (PDB: 3EML)
response = requests.post(
f"{BASE}/docking/vina",
headers=headers,
json={
"ligand_smiles": "CN1C=NC2=C1C(=O)N(C(=O)N2C)C",
"receptor_pdb": "3EML",
"exhaustiveness": 8,
"num_poses": 5
}
)
job = response.json()
job_id = job["job_id"]
print(f"Docking job submitted: {job_id}")
# Poll for results with timeout
start = time.time()
while time.time() - start < 300:
result = requests.get(
f"{BASE}/docking/vina/{job_id}",
headers=headers
).json()
if result["status"] == "completed":
print(f"\nDocking complete. {len(result['poses'])} poses returned:\n")
for i, pose in enumerate(result["poses"]):
print(f" Pose {i+1}: {pose['affinity']:>6.1f} kcal/mol")
# Save best pose for visualization
with open("caffeine_a2a_best.sdf", "w") as f:
f.write(result["poses"][0]["sdf"])
print("\nBest pose saved to caffeine_a2a_best.sdf")
break
elif result["status"] == "failed":
print(f"Docking failed: {result['error']}")
break
time.sleep(5)
else:
print("Timeout waiting for docking results")Understanding the Results
The API returns a list of docked poses sorted by predicted binding affinity. Each pose includes:
- affinity: predicted binding energy in kcal/mol (more negative means stronger binding)
- sdf: the 3D coordinates of the docked ligand in SDF format
- rmsd_lb / rmsd_ub: lower and upper bounds of RMSD relative to the best pose
As a general guideline, scores below -7.0 kcal/mol suggest moderate binding, and scores below -9.0 kcal/mol suggest strong binding. These values are most useful for ranking multiple compounds against the same target rather than as absolute thermodynamic measurements.
Comparison: Local Vina vs API Vina
The traditional local workflow requires 30 to 60 minutes of setup before your first docking run. The API approach reduces this to a single HTTP request:
- Local: install Vina, install ADFR Suite, prepare receptor PDBQT, prepare ligand PDBQT, define search box, write config, run Vina, parse output (30-60 min setup)
- API: send one POST request with SMILES and PDB ID, poll for results (2 min total)
The underlying Vina binary and scoring function are identical. The API simply automates all the preparation and format conversion steps that make local Vina tedious.
Next Steps
Now that you can run Vina docking without any installation, explore these related resources:
- Read the beginner's guide to molecular docking for deeper concepts like scoring functions and search boxes
- Compare Vina to commercial alternatives in our Vina vs Glide vs GOLD comparison
- Try AI-based docking with DiffDock which eliminates the need for a predefined search box
Try AutoDock Vina directly from the SciRouter tools page. Sign up for a free API key and run your first docking in under two minutes.