docking Module
The docking module provides utilities for preparing synthetic protein structures for molecular docking simulations and electrostatic calculations.
Overview
Molecular docking requires structures to be in specific formats that include physical parameters beyond simple coordinates. The docking module focuses on converting standard PDB files into PQR format, which includes partial atomic charges and Van der Waals radii.
Key Features
- PQR Export: Converts PDB files to PQR format using OpenMM for charge assignment.
- Charge Assignment: Automatically adds missing hydrogens and assigns partial charges based on the
AMBERforcefield. - Radii Calculation: Derives atomic radii from Lennard-Jones parameters (\(\sigma / 2\)).
- PTM Handling: Standardizes non-standard or modified residues for compatibility with standard forcefields.
API Reference
docking
Classes
DockingPrep
Utilities for preparing PDB structures for molecular docking.
Source code in synth_pdb/docking.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
Functions
write_pqr(input_pdb, output_pqr)
Converts a PDB file to PQR format (adding partial charges and radii).
Uses OpenMM to assign charges based on the selected forcefield. Radii are derived from Lennard-Jones sigma (sigma / 2).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_pdb
|
str
|
Path to input PDB. |
required |
output_pqr
|
str
|
Path to output PQR. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if successful. |
Source code in synth_pdb/docking.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
Scientific Principles
The PQR Format
The PQR format is a variation of PDB where: 1. The Occupancy column is replaced by the Partial Charge (\(q\)) of the atom. 2. The B-factor column is replaced by the Atomic Radius (\(r\)) in Angstroms.
This format is the standard input for electrostatic solvers like APBS (Adaptive Poisson-Boltzmann Solver) and many docking engines.
Charge Assignment Logic
The module uses OpenMM to:
1. Standardize: Map modified residues (like phosphorylated Serine) to their parent residues if necessary.
2. Protonate: Add hydrogens at a specific pH (default 7.4).
3. Parameterize: Apply a forcefield (default amber14-all.xml) to look up the partial charge for each atom type in its specific chemical environment.
Usage Example
from synth_pdb.docking import DockingPrep
# 1. Initialize the preparation tool
prep = DockingPrep(forcefield_name="amber14-all.xml")
# 2. Convert a synthetic PDB to PQR
# This will add hydrogens and assign charges
success = prep.write_pqr(
input_pdb="synthetic_protein.pdb",
output_pqr="ready_for_docking.pqr"
)
if success:
print("PQR file created successfully.")