How to perform Molecular Docking using AutoDock Vina?
- Raja Karmakar
- Oct 6, 2024
- 4 min read
Updated: Oct 8, 2024

Molecular docking is a computational technique employed to predict the three-dimensional structure of a ligand bound to a receptor. By simulating the interactions between potential drug candidates and their target molecules, this approach plays a pivotal role in drug discovery and development.
This demonstration will utilize a Linux system to showcase the process of ligand docking, providing insights into the molecular interactions involved.
Step #1 - Download and install PyMOL
To start with molecular docking, visualization is one of the most important parts. PyMOL is one of the most popular visualization software to visualize, modify and export molecular structures.
To download PyMOL, you can refer to their original webpage.

Step #2 - Download and Install Autodock Vina
AutoDock Vina is an open-source program developed by the Scripps Research Institute. It is one of the lightweight and highly used molecular docking programs globally.
To download AutoDock Vina, you can download the encrypted file from their website or a stable version from the GitHub repository.

Step #3 - Protein Data Bank (RCSB PDB)
To perform a molecular docking, you need the structures of the targeted protein and a ligand. A Protein Data bank is an open database of all the molecular structures known to humans.
To get started, download the structure of the targeted protein in .pdb format, which we use later to dock the ligand onto the active site of the targeted protein.

Step #4 - Ligand Structure
Ligand structures can be found in many different repositories. For ease let's consider DrugBank to download the desired ligand in .sdf format. It is a 2D structure, which is then to be processed to make it compatible for docking and mimic real-world interactions with the targeted protein.
Step #5 - Visualizing the Ligand structure with PyMOL
After you have completed the download of the ligand in .sdf format. Open the file using PyMOL. Then save it as pdb format for further use. Make a dedicated folder to store all the files in one location, which then can be fetched later at once.

Step #6 - Protein preparation using AutoDock Tools.
For molecular docking, one first needs to prepare the protein. First, you have to open the AutoDock Tools. Then add the protein macromolecular structure to the opened application. After the protein structure is loaded in AutoDock Tools successfully, carefully follow the mentioned steps one by one:
Click on "Edit" and delete Water.
Click on "Edit" again. Then click on "Hydrogen". Select "Add". Then add "Polar only" Hydrogens. Then enter "Ok".
Click on "Edit" and add charges. Specifically, add "Kollman charges".
Protein preparation is complete after all these steps. Now, you have to convert the protein .pdb into .pdbqt for further use. For docking, you need a .pdbqt file extension.
To convert the macromolecule into .pdbqt format, click on the "Grid" option. Then choose the macromolecule you have been working with till now. After you select the molecule, hit enter. This will let you save the file in .pdbqt format.

Step #7 - Ligand preparation to pdbqt format.
In ligand preparation, you don't need to take the previous steps. Simply add the ligand file in pdb format to AutoDock Tools.
Select "Ligand", then click on "Input" and then "Open". Finally, save the ligand in pdbqt format.
Now your ligand and protein are both prepared and ready to be used as inputs for molecular docking.
Step #8 - Preparation of the Grid.
After completing the previous steps, clear the panel by deleting all the selected molecules. Then add both the generated pdbqt molecule (protein & ligand) to the AutoDock Tools panel.
Click on the "Grid". Then create a grid box with X, Y, and Z coordinates. Then save the grid box output in the same directory where you have contained other files.

Step #9 - Generating configuration file
Create a new text file using the text editor, and copy the exact format.
Do not forget to change the coordinates in the config file.
receptor = protein.pdbqt
ligand = ligand.pdbqt
center_x = gridCenter_x
center_y = gridCenter_y
center_z = gridCenter_z
size_x = gridSize_x
size_y = gridSize_y
size_z = gridSize_z
energy_range = 4
exhaustiveness = 16
The energy range can be a variable number. Energy range 4 is an optimal selection.
Exhaustiveness increases docking accuracy. But beyond 16, docked structures' accuracy does not increase or is minimally increased.
Step #10 - Molecular Docking using AutoDock Vina.
First, you need to download Vina from their official website. Then, extract the files and paste them into the same directory where your prepared ligand, protein, and all other files are located. If you are a Windows user, you have to install the vina.exe file on your device, and then you will be able to execute the below command.
Then open your Linux terminal and execute the following command:
<file path>/vina --receptor protein.pdbqt --ligand ligand.pdbqt --config config.txt --log log.txt --output docked.pdbqt
If you are using Windows, then I suggest you open your device command prompt as administrator and execute the following command:
"C:\Program Files= <x86>\The Scripps Research Institute\Vina\Vina.exe" --receptor protein.pdbqt --ligand ligand.pdbqt --config config.txt --log log.txt --output docked.pdbqt
This will generate all the output files you need to assess your docked structures. Drag the docked.pdbqt to visualise the outputs in PyMOL for better visualization and analysis.

We hope this article really fulfils your needs and have a great scientific career ahead.
In seeking professional research assistance, consider Kapsid Simulations, a prominent emerging company dedicated to streamlining and cost-effectively facilitating the research process. Our team is readily available to assist you; simply send an email to info@kapsid.com.