e3fp.conformer.generator module
Conformer generation.
Author: Seth Axen E-mail: seth.axen@gmail.com
- class ConformerGenerator(num_conf: int = -1, first: int = -1, rmsd_cutoff: float = 0.5, max_energy_diff: float = -1.0, forcefield: str = 'uff', pool_multiplier: int = 1, seed: int = -1, get_values: bool = False, sparse_rmsd: bool = True, store_energies: bool = True)[source]
Bases:
objectGenerate conformers using RDKit.
Procedure
Generate a pool of conformers.
Minimize conformers.
Filter conformers using an RMSD threshold and optional minimum energy difference.
Note that pruning is done _after_ minimization, which differs from the protocol described in the references.
References
http://rdkit.org/docs/GettingStartedInPython.html #working-with-3d-molecules
https://github.com/skearnes/rdkit-utils/blob/master/rdkit_utils/ conformers.py
- embed_molecule(mol)[source]
Generate conformers, possibly with pruning.
- Parameters:
mol (RDKit Mol) – Molecule.
- filter_conformers(mol)[source]
Filter conformers which do not meet an RMSD threshold.
- Parameters:
mol (RDKit Mol) – Molecule.
- Returns:
A new RDKit Mol containing the chosen conformers, sorted by
increasing energy.
- generate_conformers(mol)[source]
Generate conformers for a molecule.
- Parameters:
mol (RDKit Mol) – Molecule.
- Returns:
RDKit Mol
- Return type:
copy of the input molecule with embedded conformers
- get_conformer_energies(mol)[source]
Calculate conformer energies.
- Parameters:
mol (RDKit Mol) – Molecule.
- Returns:
energies – Minimized conformer energies.
- Return type:
array_like
- get_molecule_force_field(mol, conf_id=None, **kwargs)[source]
Get a force field for a molecule.
- Parameters:
mol (RDKit Mol) – Molecule.
conf_id (int, optional) – ID of the conformer to associate with the force field.
**kwargs (dict, optional) – Keyword arguments for force field constructor.
- static get_num_conformers(mol)[source]
Return ideal number of conformers from rotatable bond number in model.
- Parameters:
mol (Mol) – RDKit Mol object for molecule
- Yields:
num_conf (int) – Target number of conformers to accept