Vina - Python interface to AutoDock Vina

raw JSON →
1.2.7 verified Fri May 01 auth: no python

vina provides a Python interface to AutoDock Vina, a widely used tool for molecular docking and virtual screening. Current version: 1.2.7, release cadence: irregular, last update 2023.

pip install vina
error ImportError: cannot import name 'Vina' from 'vina'
cause The class was renamed to Vino in vina 1.2.0.
fix
Use from vina import Vino instead.
error RuntimeError: Vina executable not found. Please install AutoDock Vina.
cause The Vina binary is missing from PATH.
fix
Install AutoDock Vina binary (e.g., via conda or download from official site) and ensure it's in PATH.
error ValueError: Invalid file format. Expected .pdbqt.
cause Input files must be in PDBQT format.
fix
Convert your receptor and ligand to PDBQT using tools like prepare_receptor4.py and prepare_ligand4.py from AutoDockTools.
gotcha The vina package requires the AutoDock Vina binary installed and accessible in PATH. The Python package is just a wrapper.
fix Install Vina binary (e.g., conda install -c bioconda autodock-vina) before using the Python package.
gotcha Input files (protein, ligand) must be in PDBQT format. Standard PDB or SDF will cause errors.
fix Use tools like Meeko or AutoDockTools to convert ligands to PDBQT.
deprecated The class name changed from 'Vina' to 'Vino' in version 1.2.0. Older tutorials use `from vina import Vina`.
fix Use `from vina import Vino` for version 1.2.x. For compatibility, check `vina.__version__`.

Basic molecular docking using Vina Python interface.

from vina import Vino

v = Vino(sf='vina')
v.set_receptor('protein.pdbqt')
v.set_ligand('ligand.pdbqt')
v.compute_vina(center=[0, 0, 0], box_size=[20, 20, 20])
v.write_poses('output.pdbqt', n_poses=5)
print('Docking complete')