Molecular Docking Basics

Lesson 4 of 12 · 11 min

Preparing the Receptor

A structure straight from the PDB is a snapshot of a crystal, not a docking target: it carries ordered waters, the co-crystallized ligand, and no hydrogens or partial charges. In this lesson you turn that raw file into a docking-ready receptor.pdbqt by stripping the waters and bound ligand, adding polar hydrogens, and assigning Gasteiger charges. We use 1IEP, the Abl kinase domain bound to imatinib, but every command works on the structure you downloaded earlier.

Inspect the heteroatoms

bash
grep '^HETATM' 1iep.pdb | cut -c18-20 | sort | uniq -c
   6  CL
 172 HOH
  74 STI

The protein itself uses ATOM records; everything counted here is a HETATM: 172 ordered waters (HOH), six chloride ions (CL) left from the crystallization buffer, and imatinib (STI) at 37 atoms per copy. There are two copies because 1IEP holds two kinase molecules, chains A and B, in the asymmetric unit, so STI totals 74 atoms and uniq counts atoms, not residues. A focused docking targets one pocket, so we keep only chain A's ATOM (and TER) records, which drops chain B, both ligands, every water, and the chlorides in one step. Still scan the HETATM list first: these chlorides are safe to delete, but a catalytic zinc, a heme, or a covalent cofactor would have to stay, or you would change the pocket you are about to dock into.

bash
awk '($1 == "ATOM" || $1 == "TER") && substr($0, 22, 1) == "A"' 1iep.pdb > 1iep_protein.pdb

Add hydrogens and charges

bash
# prepare_receptor4.py ships with AutoDockTools (MGLTools).
# Add polar hydrogens, merge nonpolar hydrogens, assign Gasteiger
# charges, drop any remaining waters, and write a rigid receptor.
prepare_receptor4.py -r 1iep_protein.pdb -o receptor.pdbqt -A checkhydrogens
grep -c '^ATOM' receptor.pdbqt

# Open Babel alternative: -p protonates at pH 7.4 and -xr writes a
# rigid receptor (no torsion tree); Gasteiger charges are added on output.
# obabel 1iep_protein.pdb -O receptor.pdbqt -xr -p 7.4
adding gasteiger charges to receptor
2607
text
ATOM    236  N   LEU A 248      18.630  64.773   9.241  1.00 58.44    -0.351 N 
ATOM    237  CA  LEU A 248      17.339  64.855   9.904  1.00 59.05     0.176 C 
ATOM    238  C   LEU A 248      17.397  65.620  11.223  1.00 59.56     0.241 C 
ATOM    239  O   LEU A 248      18.366  65.514  11.977  1.00 57.75    -0.268 OA
ATOM    240  H   LEU A 248      19.518  64.717   8.785  1.00  0.00     0.163 HD
ATOM    918  CG  PHE A 317      10.260  60.978   7.456  1.00 47.40     0.017 A 

A PDBQT line is an ordinary PDB record with two extra fields appended after the B-factor column: the Gasteiger partial charge and the AutoDock atom type. AutoDock reads the charge for the electrostatic term and the atom type to choose van der Waals, hydrogen-bond, and desolvation parameters, so the type carries more meaning than the chemical element alone. Here N is a backbone amide nitrogen that does not accept hydrogen bonds, C an aliphatic carbon, A an aromatic carbon, OA an oxygen that accepts hydrogen bonds, and HD a polar hydrogen that donates one.

Try it yourself: run prepare_receptor4.py on the structure you downloaded to build your own receptor.pdbqt, then verify the cleanup. grep -c HOH receptor.pdbqt should print 0, searching for your ligand's residue name should return nothing, and grep '^ATOM' receptor.pdbqt | awk '{print $NF}' | sort | uniq -c should list the AutoDock atom types present, including HD polar hydrogens and OA acceptors.