DockingAutoDock Vina

How to Run AutoDock Vina Without Installing Anything

Skip the painful local setup. Run AutoDock Vina molecular docking in the cloud via API — just send SMILES and a PDB target to get binding poses and affinity scores back.

Ryan Bethencourt
March 19, 2026
8 min read

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.

Install the requests library
pip install requests

Complete 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.

Dock caffeine to the A2A receptor via SciRouter API
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")
Tip
Store your API key as an environment variable rather than hardcoding it. This prevents accidental exposure when sharing scripts or committing code to version control.

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.

Note
Vina scores correlate with experimental binding data but have an average error of approximately 2 kcal/mol. Always use docking as a screening filter followed by experimental validation, not as a standalone predictor of binding affinity.

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:

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.

Frequently Asked Questions

Do I need to install AutoDock Vina to follow this tutorial?

No. This tutorial uses the SciRouter API, which runs AutoDock Vina on managed cloud infrastructure. You only need Python and an API key. There is nothing to download, compile, or configure on your local machine.

What is the difference between AutoDock Vina and AutoDock4?

AutoDock Vina is a complete rewrite of the original AutoDock4. Vina uses a different scoring function and search algorithm that make it significantly faster (10 to 100 times) while maintaining comparable accuracy. Vina also has a simpler setup process and does not require grid map precomputation.

How much does it cost to run Vina through SciRouter?

SciRouter offers 500 free credits per month. Each Vina docking job costs 1 credit. No credit card is required for the free tier. This is enough for hundreds of docking runs per month at no cost.

Can I use my own receptor PDB file instead of a PDB ID?

Yes. The SciRouter API accepts either a four-character PDB ID (which it fetches from the RCSB database) or a raw PDB file uploaded as a string in the request body. This lets you dock against custom or unpublished structures.

What output formats does the API return?

The API returns docked poses as SDF files (one per pose), binding affinity scores in kcal/mol, and a summary JSON with all poses ranked by score. You can save the SDF files and open them in PyMOL, ChimeraX, or any molecular viewer.

Try It Free

No Login Required

Try this yourself

500 free credits. No credit card required.