receptor
#
Classes:
-
NoPostMinimisationConformersError–Raise if no conformers survive minimisation (due to e.g. simulation blowing up)
Functions:
-
chimera_protonate–Use Chimera to protonate the receptor.
-
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
NoPostMinimisationConformersError
#
Bases: Exception
Raise if no conformers survive minimisation (due to e.g. simulation blowing up)
chimera_protonate
#
chimera_protonate(input_file: str, output_file: str, verbose: bool = False)
Use Chimera to protonate the receptor.
: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. :param verbose: If True, print the Chimera output.
Source code in fegrow/receptor.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
fix_receptor
#
fix_receptor(input_file: str, output_file: str, pH: float = 7.0, prefer_chimera_protonation: bool = False)
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. :param prefer_chimera_protonation: If True, use Chimera to protonate the receptor instead of PDBFixer.
Source code in fegrow/receptor.py
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 | |
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', ligand_indices_to_freeze: Optional[list[int]] = None) -> 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.
-
ligand_indices_to_freeze(Optional[list[int]], default:None) –The ligand indices to be frozen (relative to the ligand)
Returns:
-
Tuple[Mol, List[float]]–A copy of the input molecule with the optimised positions.
Source code in fegrow/receptor.py
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 246 247 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 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
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
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | |