Hello PyMOL, AutoDock Vina-GPU and Open Babel
Run a basic molecular docking simulation using Human Serum Albumin (HSA) and Warfarin as a test case.
This is the moment everything from the install guide either pays off or falls apart — a basic sanity check
to make sure the software from step one actually works, using Human Serum Albumin and Warfarin as a simple
test case.
PyMOL - for visualizing molecules
AutoDock Vina-GPU - for performing fast, GPU-accelerated docking
Open Babel - for converting file formats
Prerequisites: you've already installed the required software (see the Software Installation Guide) and set up your environment.
PyMOL - for visualizing molecules
AutoDock Vina-GPU - for performing fast, GPU-accelerated docking
Open Babel - for converting file formats
Prerequisites: you've already installed the required software (see the Software Installation Guide) and set up your environment.
Step 1: Create and Activate Your Conda Environment
conda create -n biolab -c conda-forge pymol-open-source openbabel -y
conda activate biolab
Step 2: Set Up Your Project Directory
cd ~/Documents
mkdir MolecularDocking
cd MolecularDocking
mkdir locks keys
Step 3: Download the Protein and Ligand
Get Human Serum Albumin (PDB ID: 1H9Z) and Warfarin (from PubChem).
cd locks
wget https://files.rcsb.org/download/1H9Z.pdb
cd ..
cd keys
wget -O warfarin.sdf "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/6691/SDF?record_type=3d"
cd ..
Step 4: Open PyMOL to View the Molecules
pymol
Once PyMOL launches, type the following in the terminal window:
load locks/1H9Z.pdb
load keys/warfarin.sdf
Step 5: Convert Files to PDBQT Format
Open a new terminal and activate the environment:
cd ~/Documents/MolecularDocking
conda activate biolab
cd keys
obabel warfarin.sdf -O warfarin.pdbqt --gen3d
cd ..
cd locks
obabel 1H9Z.pdb -O receptor.pdbqt -xr
Note: You may see warnings about aromatic bonds. These can be ignored for this test, but should be fixed in real research using ADFR Suite.
Step 6: Create the Configuration File
geany config.txt
Enter the following text into the file:
receptor = ./locks/receptor.pdbqt
ligand = ./keys/warfarin.pdbqt
center_x = 29.0
center_y = 31.8
center_z = 23.4
size_x = 20.0
size_y = 20.0
size_z = 20.0
thread = 8000
search_depth = 10
Step 7: Create a Symbolic Link to the GPU Binary
ln -s ~/software/Vina-GPU-2.1/AutoDock-Vina-GPU-2.1/OpenCL ./OpenCL
Step 8: Run the Docking Simulation
~/software/Vina-GPU-2.1/AutoDock-Vina-GPU-2.1/AutoDock-Vina-GPU-2.1 --config config.txt
Output Example:
#################################################################
# If you used AutoDockVina-GPU 2.1 in your work, please cite: #
# #
# Ding, Ji, et al. Vina-GPU 2.0: Further Accelerating AutoDock #
# Vina and Its Derivatives with Graphics Processing Units. #
# Journal of Chemical Information and Modeling (2023). #
# #
# DOI https://doi.org/10.1021/acs.jcim.2c01504 #
# #
# Shidi, Tang, Chen Ruiqi, Lin Mengru, Lin Qingde, #
# Zhu Yanxiang, Wu Jiansheng, Hu Haifeng, and Ling Ming. #
# Accelerating AutoDock Vina with GPUs. #
# Molecules 27.9 (2022): 3041. #
# #
# DOI https://doi.org/10.3390/molecules27093041 #
# #
# And also the origin AutoDock Vina paper: #
# O. Trott, A. J. Olson, #
# AutoDock Vina: improving the speed and accuracy of docking #
# with a new scoring function, efficient optimization and #
# multithreading, Journal of Computational Chemistry 31 (2010) #
# 455-461 #
# #
# DOI 10.1002/jcc.21334 #
# #
#################################################################
Using single ligand docking mode
Output will be ./keys/warfarin_out.pdbqt
Reading input ... done.
Setting up the scoring function ... done.
Search_depth is fixed to 10
Analyzing the binding site ... done.
GPU Platform: NVIDIA CUDA
GPU Device: NVIDIA GeForce RTX 3090 Ti
Using random seed: 1295178484
Build kernel 1 from source
OpenCL version: 3.0
Build kernel 2 from source
OpenCL version: 3.0
Perform docking|================done=================|
Refining ligand ./keys/warfarin results...done.
mode | affinity | dist from best mode
| (kcal/mol) | rmsd l.b.| rmsd u.b.
-----+------------+----------+----------
1 -5.3 0.000 0.000
2 -5.2 1.613 6.221
3 -5.1 0.710 1.270
4 -5.1 1.726 5.767
5 -5.1 1.826 5.814
6 -5.1 1.694 6.126
7 -5.1 1.847 5.875
8 -5.0 3.245 6.233
9 -5.0 1.370 1.738
Writing ligand ./keys/warfarin output...done.
Interpreting the Output:
- Mode 1 has the best affinity (-5.3 kcal/mol), meaning it’s the most stable binding configuration.
- The dist from best mode (rmsd) values show how different the poses are from the top-scoring one. A low rmsd (like 0.000) means the pose is very similar to the best one.
- Higher affinity (more negative) = stronger binding.
- Multiple modes are returned because the algorithm explores different possible binding orientations.
Viewing the Results in PyMOL:
- Start PyMOL:
pymol - In the PyMOL terminal:
load ./locks/1H9Z.pdb, protein load ./keys/warfarin_out.pdbqt, docking_results hide everything show cartoon, protein color white, protein show sticks, docking_results color marine, docking_results set all_states, off center docking_results zoom docking_results, 10 - Observe the marine-colored ligand (warfarin) bound in the protein’s binding pocket.
Summary:
This "Hello World" example demonstrates this full workflow:
- Using PyMOL to visualize molecular structures.
- Using Open Babel to convert file formats (SDF to PDBQT).
- Using AutoDock Vina-GPU to perform molecular docking.
- Using conda to manage software environments.
Next up: using fPocket to figure out where on the protein to actually target the ligand, along with more of the theory behind what these numbers in the output mean.