Skip to main content
Docs

Search guides and API endpoints, for example “Idempotency-Key” or “submit job”.

    Guides

    Dock ligands with AutoDock Vina

    Dock prepared 3D ligands into a protein, choose the docking box, and read the scored poses.

    Updated October 1, 2026

    On this page

    AutoDock Vina places each ligand in a binding site of your protein and scores the poses (kcal/mol; lower is stronger predicted binding). One job docks up to 100 ligands.

    What you need

    • The protein: upload a PDB file as protein, or give an RCSB pdb_id and CogniChem downloads it.
    • The ligands: 3D structures in SDF, MOL, MOL2, or PDBQT, as ligand (one) or ligands (a list). If you have SMILES, generate 3D structures first with Molecule Conversion (generate_3d), or use the workflow below, which does it for you.
    • Where to dock, one of:
      • pockets: find pockets automatically (with P2Rank) and dock into the top n, or "all";
      • boxes: a table of boxes from Binding-Site Detector;
      • center and size: one box you choose, as [x, y, z] in Å.

    Run it

    import base64
    from pathlib import Path
     
    from cognichem_client import CogniChem
     
    client = CogniChem.from_env()
     
    def file_object(path):
        data = Path(path).read_bytes()
        return {"name": Path(path).name, "content_b64": base64.b64encode(data).decode()}
     
    payload = {
        "pdb_id": "XXXX",                       # your target's RCSB id, or "protein": file_object("target.pdb")
        "ligands": [file_object("ligand_1.sdf"), file_object("ligand_2.sdf")],
        "pockets": 1,                           # dock into the top pocket
        "exhaustiveness": 8,
        "num_modes": 9,
    }
     
    estimate = client.jobs.estimate(job_type="autodockvina", payload=payload)
    print(f"Reserves ${estimate.cost:.2f}")
     
    job = client.jobs.submit(job_name="vina-screen-1", job_type="autodockvina", payload=payload)
    status = client.jobs.wait(job.process_id)
    if status.status == "completed":
        client.jobs.result(job.process_id, save_path=".")

    Settings

    FieldDefaultWhat it does
    exhaustiveness8Search effort per ligand. Higher finds better poses more reliably, and takes longer.
    num_modes9Poses kept per ligand.
    energy_range3Keep poses within this many kcal/mol of the best one.
    box_padding10Å added around detected pockets when building boxes.

    Every field is listed on the AutoDock Vina tool page.

    Results

    The result has a poses port (PDBQT, one or more poses per ligand, each with binding_affinity_kcal_mol) and the full output as a zip. Treat the scores as a ranking aid: docking scores are rough estimates of binding strength.

    Next steps