rdkit_utilities.rdDistGeom
- rdkit_utilities.rdDistGeom.CalculateElectrostaticEnergy(mol, forcefield='MMFF94')[source]
Calculate electrostatic energy of all conformers using force field
- Returns
energies – Array of energies, one for each conformer
- Return type
numpy.ndarray
- Parameters
mol (Mol) –
forcefield (Literal['MMFF94', 'MMFF94s']) –
- rdkit_utilities.rdDistGeom.CalculateMMFFCharges(mol, forcefield='MMFF94', normalize_partial_charges=True)[source]
Calculate MMFF charges for molecule
- Parameters
mol (Mol) –
forcefield (Literal['MMFF94', 'MMFF94s']) –
normalize_partial_charges (bool) –
- Return type
ndarray
- rdkit_utilities.rdDistGeom.GenerateConformers(mol, numConfs=10, numConfPool=None, maximizeDiversity=False, selectELFConfs=False, ELFPercentage=2.0, pruneRmsThresh=-1.0, diverseRmsThresh=0.05, energyWindow=-1.0, maxAttempts=0, randomSeed=-1, clearConfs=True, useRandomCoords=False, boxSizeMult=2.0, randNegEig=True, numZeroFail=1, coordMap={}, forceTol=0.001, ignoreSmoothingFailures=False, enforceChirality=True, numThreads=1, useExpTorsionAnglePrefs=True, useBasicKnowledge=True, printExpTorsionAngles=False, useSmallRingTorsions=False, useMacrocycleTorsions=False, ETversion=1, optimizeConfs=False, forcefield='MMFF94', optMaxIters=200, ffVdwThresh=10.0, ffNonBondedThresh=100, ffIgnoreInterfragInteractions=True, removeTransAcidConformers=True)[source]
Generate conformers on molecule in-place.
- Parameters
numConfs (int) – Max number of conformers to end up with
numConfPool (Optional[int]) – Max number of conformers to initially generate, for ELF or RMS selection.
maximizeDiversity (bool) – Whether to maximize diversity via heavy-atom RMS
selectELFConfs (bool) – Whether to select conformers using the electrostatically least-interacting functional group (ELF) technique
ELFPercentage (float) – % (out of 100) of conformers to keep from numConfPool when selecting ELF conformers
pruneRmsThresh (float) – RMS threshold to keep conformers initially generated from numConfPool
diverseRmsThresh (float) – Minimum RMS threshold for distinguishing conformers when selecting maximally diverse conformers
energyWindow (float) – If positive, only conformers within this energy window as determined by forcefield will be kept.
optimizeConfs (bool) – Whether to optimize conformers generated initially, prior to selecting ELF and RMS diverse conformers.
forcefield (Literal[“UFF”, “MMFF94”, “MMFF94S”]) – Which force field to use for optimizing conformers and calculating energies for energyWindow.
optMaxIters (int) – Maximum iterations for optimization
ffVdwThresh (float) – VdW threshold for optimization and calculating energies using force field
ffNonBondedThresh (float) – Non-bonded threshold for optimization and calculating energies using force field
ffIgnoreInterfragInteractions (bool) – If True, nonbonded terms between fragments will not be added to the forcefield.
**kwargs – See the RDKit documentation for
rdkit.Chem.rdDistGeom.EmbedMultipleConfs
for more.
- Parameters
mol (Mol) –
numConfs (int) –
numConfPool (Optional[int]) –
maximizeDiversity (bool) –
selectELFConfs (bool) –
ELFPercentage (float) –
pruneRmsThresh (float) –
diverseRmsThresh (float) –
energyWindow (float) –
maxAttempts (int) –
randomSeed (int) –
clearConfs (bool) –
useRandomCoords (bool) –
boxSizeMult (float) –
randNegEig (bool) –
numZeroFail (int) –
coordMap (Dict[int, Union[ndarray, List[float]]]) –
forceTol (float) –
ignoreSmoothingFailures (bool) –
enforceChirality (bool) –
numThreads (int) –
useExpTorsionAnglePrefs (bool) –
useBasicKnowledge (bool) –
printExpTorsionAngles (bool) –
useSmallRingTorsions (bool) –
useMacrocycleTorsions (bool) –
ETversion (int) –
optimizeConfs (bool) –
forcefield (Union[ForceField, Literal['UFF', 'MMFF', 'MMFF94', 'MMFF94S']]) –
optMaxIters (int) –
ffVdwThresh (float) –
ffNonBondedThresh (float) –
ffIgnoreInterfragInteractions (bool) –
removeTransAcidConformers (bool) –
- Return type
List[int]
- rdkit_utilities.rdDistGeom.GetExclusions(mol)[source]
Get exclusions with a molecule between atoms 2- and 3- sites away
- Parameters
mol (Mol) –
- Return type
Set[Tuple[int, int]]
- rdkit_utilities.rdDistGeom.RemoveConformersOutsideEnergyWindow(mol, energyWindow=30.0, forcefield='MMFF94', numThreads=1, ffVdwThresh=10.0, ffNonBondedThresh=100, ffIgnoreInterfragInteractions=True)[source]
Remove conformers outside energy window using force field, in-place
The window covers an energy range from the conformer with the lowest energy. The molecule also has its conformers sorted by force field energy.
- Returns
numConfs – The number of remaining conformers
- Return type
int
- Parameters
mol (Mol) –
energyWindow (float) –
forcefield (Union[ForceField, Literal['UFF', 'MMFF', 'MMFF94', 'MMFF94S']]) –
numThreads (int) –
ffVdwThresh (float) –
ffNonBondedThresh (float) –
ffIgnoreInterfragInteractions (bool) –
- rdkit_utilities.rdDistGeom.RemoveTransAcidConformers(mol)[source]
Remove conformers from molecule if they contain a trans carboxylic acid
- Parameters
mol (Mol) –
- rdkit_utilities.rdDistGeom.SelectDiverseConformers(mol, numConfs=10, diverseRmsThresh=0.05)[source]
Select conformers for max diversity by RMS, in-place.
This uses a greedy algorithm. Unselected conformers are deleted.
- Parameters
mol (Mol) –
numConfs (int) –
diverseRmsThresh (float) –
- rdkit_utilities.rdDistGeom.SelectDiverseELFConformers(mol, numConfs=10, ELFPercentage=2.0, diverseRmsThresh=0.05, removeTransAcidConformers=True)[source]
Select diverse conformers using the ELF technique, in-place.
Other conformers are deleted from the molecule.
- Parameters
mol (Mol) –
numConfs (int) –
ELFPercentage (float) –
diverseRmsThresh (float) –
removeTransAcidConformers (bool) –
- rdkit_utilities.rdDistGeom.SelectELFConformers(mol, ELFPercentage=2.0, removeTransAcidConformers=True)[source]
Keep percentage of conformers, ranked by electrostatic energy, in-place.
The other conformers are deleted.
- Parameters
mol (Mol) –
ELFPercentage (float) –
removeTransAcidConformers (bool) –
- rdkit_utilities.rdDistGeom.SortConformersByElectrostaticInteraction(mol, forcefield='MMFF94')[source]
Sort conformers in-place by electrostatic energy using MMFF
- Parameters
mol (Mol) –
forcefield (Literal['MMFF94', 'MMFF94s']) –
- rdkit_utilities.rdDistGeom.SortConformersByEnergy(mol, forcefield='MMFF94', numThreads=1, ffVdwThresh=10.0, ffNonBondedThresh=100, ffIgnoreInterfragInteractions=True, reverse=False)[source]
Sort conformers in-place on molecule by force field energy.
- Returns
energies
- Return type
List[float]
- Raises
ValueError – If the force field cannot calculate energies
- Parameters
mol (Mol) –
forcefield (Union[ForceField, Literal['UFF', 'MMFF', 'MMFF94', 'MMFF94S']]) –
numThreads (int) –
ffVdwThresh (float) –
ffNonBondedThresh (float) –
ffIgnoreInterfragInteractions (bool) –
reverse (bool) –