rdkit.Chem.rdMolTransforms module

Module containing functions to perform 3D operations like rotate and translate conformations

rdkit.Chem.rdMolTransforms.CanonicalizeConformer((Conformer)conf[, (Point3D)center=None[, (bool)normalizeCovar=False[, (bool)ignoreHs=True]]]) None :
Canonicalize the orientation of a conformer so that its principal axes

around the specified center point coincide with the x, y, z axes

ARGUMENTS:
  • conf : conformer of interest

  • centeroptionally center point about which the principal axes are computed

    if not specified the centroid of the conformer will be used

  • normalizeCovar : Optionally normalize the covariance matrix by the number of atoms

C++ signature :

void CanonicalizeConformer(RDKit::Conformer {lvalue} [,RDGeom::Point3D const*=None [,bool=False [,bool=True]]])

rdkit.Chem.rdMolTransforms.CanonicalizeMol((Mol)mol[, (bool)normalizeCovar=False[, (bool)ignoreHs=True]]) None :

Loop over the conformers in a molecule and canonicalize their orientation

C++ signature :

void CanonicalizeMol(RDKit::ROMol {lvalue} [,bool=False [,bool=True]])

rdkit.Chem.rdMolTransforms.ComputeCanonicalTransform((Conformer)conf[, (Point3D)center=None[, (bool)normalizeCovar=False[, (bool)ignoreHs=True]]]) object :
Compute the transformation required aligna conformer so that

the principal axes align up with the x,y, z axes The conformer itself is left unchanged

ARGUMENTS:
  • conf : the conformer of interest

  • center : optional center point to compute the principal axes around (defaults to the centroid)

  • normalizeCovar : optionally normalize the covariance matrix by the number of atoms

C++ signature :

_object* ComputeCanonicalTransform(RDKit::Conformer [,RDGeom::Point3D const*=None [,bool=False [,bool=True]]])

rdkit.Chem.rdMolTransforms.ComputeCentroid((Conformer)conf[, (bool)ignoreHs=True[, (_vectd)weights=None]]) Point3D :
Compute the centroid of the conformation - hydrogens are ignored and no attention

is paid to the difference in sizes of the heavy atoms; however, an optional vector of weights can be passed.

C++ signature :

RDGeom::Point3D ComputeCentroid(RDKit::Conformer [,bool=True [,std::vector<double, std::allocator<double> > const*=None]])

rdkit.Chem.rdMolTransforms.ComputePrincipalAxesAndMoments((Conformer)conf[, (bool)ignoreHs=True[, (AtomPairsParameters)weights=None]]) object :
Compute principal axes and moments of inertia for a conformer

These values are calculated from the inertia tensor: Iij = - sum_{s=1..N}(w_s * r_{si} * r_{sj}) i != j Iii = sum_{s=1..N} sum_{j!=i} (w_s * r_{sj} * r_{sj}) where the coordinates are relative to the center of mass.

ARGUMENTS:
  • conf : the conformer of interest

  • ignoreHs : if True, ignore hydrogen atoms

  • weights : if present, used to weight the atomic coordinates

Returns a (principal axes, principal moments) tuple

C++ signature :

_object* ComputePrincipalAxesAndMoments(RDKit::Conformer [,bool=True [,boost::python::api::object=None]])

rdkit.Chem.rdMolTransforms.ComputePrincipalAxesAndMomentsFromGyrationMatrix((Conformer)conf[, (bool)ignoreHs=True[, (AtomPairsParameters)weights=None]]) object :
Compute principal axes and moments from the gyration matrix of a conformer

These values are calculated from the gyration matrix/tensor: Iij = sum_{s=1..N}(w_s * r_{si} * r_{sj}) i != j Iii = sum_{s=1..N} sum_{t!=s}(w_s * r_{si} * r_{ti}) where the coordinates are relative to the center of mass.

ARGUMENTS:
  • conf : the conformer of interest

  • ignoreHs : if True, ignore hydrogen atoms

  • weights : if present, used to weight the atomic coordinates

Returns a (principal axes, principal moments) tuple

C++ signature :

_object* ComputePrincipalAxesAndMomentsFromGyrationMatrix(RDKit::Conformer [,bool=True [,boost::python::api::object=None]])

rdkit.Chem.rdMolTransforms.GetAngleDeg((Conformer)conf, (int)iAtomId, (int)jAtomId, (int)kAtomId) float :

Returns the angle in degrees between atoms i, j, k

C++ signature :

double GetAngleDeg(RDKit::Conformer,unsigned int,unsigned int,unsigned int)

rdkit.Chem.rdMolTransforms.GetAngleRad((Conformer)conf, (int)iAtomId, (int)jAtomId, (int)kAtomId) float :

Returns the angle in radians between atoms i, j, k

C++ signature :

double GetAngleRad(RDKit::Conformer,unsigned int,unsigned int,unsigned int)

rdkit.Chem.rdMolTransforms.GetBondLength((Conformer)conf, (int)iAtomId, (int)jAtomId) float :

Returns the bond length in angstrom between atoms i, j

C++ signature :

double GetBondLength(RDKit::Conformer,unsigned int,unsigned int)

rdkit.Chem.rdMolTransforms.GetDihedralDeg((Conformer)conf, (int)iAtomId, (int)jAtomId, (int)kAtomId, (int)lAtomId) float :

Returns the dihedral angle in degrees between atoms i, j, k, l

C++ signature :

double GetDihedralDeg(RDKit::Conformer,unsigned int,unsigned int,unsigned int,unsigned int)

rdkit.Chem.rdMolTransforms.GetDihedralRad((Conformer)conf, (int)iAtomId, (int)jAtomId, (int)kAtomId, (int)lAtomId) float :

Returns the dihedral angle in radians between atoms i, j, k, l

C++ signature :

double GetDihedralRad(RDKit::Conformer,unsigned int,unsigned int,unsigned int,unsigned int)

rdkit.Chem.rdMolTransforms.SetAngleDeg((Conformer)conf, (int)iAtomId, (int)jAtomId, (int)kAtomId, (float)value) None :

Sets the angle in degrees between atoms i, j, k; all atoms bonded to atom k are moved

C++ signature :

void SetAngleDeg(RDKit::Conformer {lvalue},unsigned int,unsigned int,unsigned int,double)

rdkit.Chem.rdMolTransforms.SetAngleRad((Conformer)conf, (int)iAtomId, (int)jAtomId, (int)kAtomId, (float)value) None :

Sets the angle in radians between atoms i, j, k; all atoms bonded to atom k are moved

C++ signature :

void SetAngleRad(RDKit::Conformer {lvalue},unsigned int,unsigned int,unsigned int,double)

rdkit.Chem.rdMolTransforms.SetBondLength((Conformer)conf, (int)iAtomId, (int)jAtomId, (float)value) None :

Sets the bond length in angstrom between atoms i, j; all atoms bonded to atom j are moved

C++ signature :

void SetBondLength(RDKit::Conformer {lvalue},unsigned int,unsigned int,double)

rdkit.Chem.rdMolTransforms.SetDihedralDeg((Conformer)conf, (int)iAtomId, (int)jAtomId, (int)kAtomId, (int)lAtomId, (float)value) None :

Sets the dihedral angle in degrees between atoms i, j, k, l; all atoms bonded to atom l are moved

C++ signature :

void SetDihedralDeg(RDKit::Conformer {lvalue},unsigned int,unsigned int,unsigned int,unsigned int,double)

rdkit.Chem.rdMolTransforms.SetDihedralRad((Conformer)conf, (int)iAtomId, (int)jAtomId, (int)kAtomId, (int)lAtomId, (float)value) None :

Sets the dihedral angle in radians between atoms i, j, k, l; all atoms bonded to atom l are moved

C++ signature :

void SetDihedralRad(RDKit::Conformer {lvalue},unsigned int,unsigned int,unsigned int,unsigned int,double)

rdkit.Chem.rdMolTransforms.TransformConformer((Conformer)conf, (AtomPairsParameters)trans) None :

Transform the coordinates of a conformer

C++ signature :

void TransformConformer(RDKit::Conformer {lvalue},boost::python::api::object)