receptor
#
Functions:
-
fix_receptor
–Use PDBFixer to correct the input and add hydrogens with the given pH.
-
optimise_in_receptor
–For each of the input molecule conformers optimise the system using the chosen force field with the receptor held fixed.
-
sort_conformers
–For the given molecule and the conformer energies order the energies and only keep any conformers with in the energy
fix_receptor
#
fix_receptor(input_file: str, output_file: str, pH: float = 7.0)
Use PDBFixer to correct the input and add hydrogens with the given pH.
:param input_file: The name of the pdb file which contains the receptor. :param output_file: The name of the pdb file the fixed receptor should be wrote to. :param pH:The ph the pronation state should be fixed for.
Source code in fegrow/receptor.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
_can_use_ani2x
#
_can_use_ani2x(molecule: Molecule) -> bool
Check if ani2x can be used for this molecule by inspecting the elements.
Source code in fegrow/receptor.py
44 45 46 47 48 49 50 51 52 53 |
|
_scale_system
#
_scale_system(system: System, sigma_scale_factor: float, relative_permittivity: float)
Scale the sigma and charges of the openMM system in place.
Source code in fegrow/receptor.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
optimise_in_receptor
#
optimise_in_receptor(ligand: Mol, receptor_file: Union[str, PDBFile], ligand_force_field: ForceField, use_ani: bool = True, sigma_scale_factor: float = 0.8, relative_permittivity: float = 4, water_model: str = 'tip3p.xml', platform_name: str = 'CPU') -> Tuple[Mol, List[float]]
For each of the input molecule conformers optimise the system using the chosen force field with the receptor held fixed.
Parameters:
-
ligand
(Mol
) –The ligand with starting conformers already filtered for clashes with the receptor.
-
receptor_file
(Union[str, PDBFile]
) –The pdb file of the fixed and pronated receptor.
-
ligand_force_field
(ForceField
) –The base ligand force field that should be used.
-
use_ani
(bool
, default:True
) –If we should try and use ani2x for the internal energy of the ligand.
-
sigma_scale_factor
(float
, default:0.8
) –The factor by which all sigma values should be scaled
-
relative_permittivity
(float
, default:4
) –The relativity permittivity which should be used to scale all charges 1/sqrt(permittivity)
-
water_model
(str
, default:'tip3p.xml'
) –If set to None, the water model is ignored. Acceptable can be found in the openmmforcefields package.
-
platform_name
(str
, default:'CPU'
) –The OpenMM platform name, 'cuda' if available, with the 'cpu' used by default. See the OpenMM documentation of Platform.
Returns:
-
Tuple[Mol, List[float]]
–A copy of the input molecule with the optimised positions.
Source code in fegrow/receptor.py
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 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
|
sort_conformers
#
sort_conformers(ligand: Mol, energies: List[float], energy_range: float = 5) -> Tuple[Mol, List[float]]
For the given molecule and the conformer energies order the energies and only keep any conformers with in the energy range of the lowest energy conformer.
Note
This sorting is done on a copy of the molecule.
Parameters:
-
ligand
(Mol
) –A molecule instance whose optimised conformers should be sorted.
-
energies
(List[float]
) –The list of energies in the same order as the conformers.
-
energy_range
(float
, default:5
) –The energy range (kcal/mol), above the minimum, for which conformers should be kept.
Source code in fegrow/receptor.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
|