RDKit: MolTransforms Namespace Reference

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Functions
MolTransforms Namespace Reference

## Functions
void | transformMolsAtoms (RDKit::ROMol *mol, RDGeom::Transform3D &tform)
void | transformAtom (RDKit::Atom *atom, RDGeom::Transform3D &tform)
RDGeom::Point3D | computeCentroid (const RDKit::Conformer &conf, bool ignoreHs=true)
| Compute the centroid of a conformer. More...
RDNumeric::DoubleSymmMatrix * | computeCovarianceMatrix (const RDKit::Conformer &conf, const RDGeom::Point3D &center, bool normalize=false, bool ignoreHs=true)
| Compute the covariance matrix for a conformer. More...
RDGeom::Transform3D * | computeCanonicalTransform (const RDKit::Conformer &conf, const RDGeom::Point3D *center=0, bool normalizeCovar=false, bool ignoreHs=true)
| origin, the largest princiapl axis with the x-axis, the next largest with More...
void | transformConformer (RDKit::Conformer &conf, const RDGeom::Transform3D &trans)
| Transform the conformation using the specified transformation. More...
void | canonicalizeConformer (RDKit::Conformer &conf, const RDGeom::Point3D *center=0, bool normalizeCovar=false, bool ignoreHs=true)
void | canonicalizeMol (RDKit::ROMol &mol, bool normalizeCovar=false, bool ignoreHs=true)
| Canonicalize all the conformations in a molecule. More...
double | getBondLength (const RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId)
| Get the bond length between the specified atoms i, j. More...
void | setBondLength (RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId, double value)
double | getAngleRad (const RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId, unsigned int kAtomId)
| Get the angle in radians among the specified atoms i, j, k. More...
double | getAngleDeg (const RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId, unsigned int kAtomId)
| Get the angle in degrees among the specified atoms i, j, k. More...
void | setAngleRad (RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId, unsigned int kAtomId, double value)
void | setAngleDeg (RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId, unsigned int kAtomId, double value)
double | getDihedralRad (const RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId, unsigned int kAtomId, unsigned int lAtomId)
| Get the dihedral angle in radians among the specified atoms i, j, k, l. More...
double | getDihedralDeg (const RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId, unsigned int kAtomId, unsigned int lAtomId)
| Get the dihedral angle in degrees among the specified atoms i, j, k, l. More...
void | setDihedralRad (RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId, unsigned int kAtomId, unsigned int lAtomId, double value)
void | setDihedralDeg (RDKit::Conformer &conf, unsigned int iAtomId, unsigned int jAtomId, unsigned int kAtomId, unsigned int lAtomId, double value)

## Function Documentation

void MolTransforms::canonicalizeConformer | ( | RDKit::Conformer & | conf,
|  | const RDGeom::Point3D * | center = `0`,
|  | bool | normalizeCovar = `false`,
|  | bool | ignoreHs = `true`
| ) |  |

Canonicalize the orientation of a conformer so that its principal axes around the specified center point coincide with the x, y, z axes

Parameters

  conf | The conformer of interest
  center | Optional 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
  ignoreHs | If true, ignore hydrogen atoms

void MolTransforms::canonicalizeMol | ( | RDKit::ROMol & | mol,
|  | bool | normalizeCovar = `false`,
|  | bool | ignoreHs = `true`
| ) |  |

Canonicalize all the conformations in a molecule.

Parameters

  mol | the molecule of interest
  normalizeCovar | Optionally normalize the covariance matrix by the number of atoms
  ignoreHs | If true, ignore hydrogens

RDGeom::Transform3D* MolTransforms::computeCanonicalTransform | ( | const RDKit::Conformer & | conf,
|  | const RDGeom::Point3D * | center = `0`,
|  | bool | normalizeCovar = `false`,
|  | bool | ignoreHs = `true`
| ) |  |

origin, the largest princiapl axis with the x-axis, the next largest with

Compute the transformation require to orient the conformation along the principal axes about the center; i.e. center is made to coincideand the smallest with the z-axis

If center is not specified the the centroid of the conformer will be used

Parameters

  conf | Conformer of interest
  center | Center to be used for canonicalization, defaults to the centroid of the conformation
  normalizeCovar | Normalize the covariance matrix with the number of atoms
  ignoreHs | Optinally ignore hydrogens

RDGeom::Point3D MolTransforms::computeCentroid | ( | const RDKit::Conformer & | conf,
|  | bool | ignoreHs = `true`
| ) |  |

Compute the centroid of a conformer.

This is simple the average of the heavy atom locations in the conformer, not attention is paid to hydrogens or the differences in atomic radii

Parameters

  conf | Conformer of interest
  ignoreHs | If true, ignore hydrogen atoms

RDNumeric::DoubleSymmMatrix* MolTransforms::computeCovarianceMatrix | ( | const RDKit::Conformer & | conf,
|  | const RDGeom::Point3D & | center,
|  | bool | normalize = `false`,
|  | bool | ignoreHs = `true`
| ) |  |

Compute the covariance matrix for a conformer.

Parameters

  conf | Conformer of interest
  center | Center to be used for covariance matrix calculation
  normalize | If true, normalize the covariance matrix by the number of atoms
  ignoreHs | If true, ignore hydrogen atoms

double MolTransforms::getAngleDeg | ( | const RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId,
|  | unsigned int | kAtomId
| ) |  |
| inline

Get the angle in degrees among the specified atoms i, j, k.

Definition at line 118 of file MolTransforms.h.

References getAngleRad(), and M_PI.

double MolTransforms::getAngleRad | ( | const RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId,
|  | unsigned int | kAtomId
| ) |  |

Get the angle in radians among the specified atoms i, j, k.

Referenced by getAngleDeg().

double MolTransforms::getBondLength | ( | const RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId
| ) |  |

Get the bond length between the specified atoms i, j.

double MolTransforms::getDihedralDeg | ( | const RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId,
|  | unsigned int | kAtomId,
|  | unsigned int | lAtomId
| ) |  |
| inline

Get the dihedral angle in degrees among the specified atoms i, j, k, l.

Definition at line 142 of file MolTransforms.h.

References getDihedralRad(), and M_PI.

double MolTransforms::getDihedralRad | ( | const RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId,
|  | unsigned int | kAtomId,
|  | unsigned int | lAtomId
| ) |  |

Get the dihedral angle in radians among the specified atoms i, j, k, l.

Referenced by getDihedralDeg().

void MolTransforms::setAngleDeg | ( | RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId,
|  | unsigned int | kAtomId,
|  | double | value
| ) |  |
| inline

Set the angle in degrees among the specified atoms i, j, k (all atoms bonded to atom k are moved)

Definition at line 130 of file MolTransforms.h.

References M_PI, and setAngleRad().

void MolTransforms::setAngleRad | ( | RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId,
|  | unsigned int | kAtomId,
|  | double | value
| ) |  |

Set the angle in radians among the specified atoms i, j, k (all atoms bonded to atom k are moved)

Referenced by setAngleDeg().

void MolTransforms::setBondLength | ( | RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId,
|  | double | value
| ) |  |

Set the bond length between the specified atoms i, j (all atoms bonded to atom j are moved)

void MolTransforms::setDihedralDeg | ( | RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId,
|  | unsigned int | kAtomId,
|  | unsigned int | lAtomId,
|  | double | value
| ) |  |
| inline

Set the dihedral angle in degrees among the specified atoms i, j, k, l (all atoms bonded to atom l are moved)

Definition at line 157 of file MolTransforms.h.

References M_PI, and setDihedralRad().

void MolTransforms::setDihedralRad | ( | RDKit::Conformer & | conf,
|  | unsigned int | iAtomId,
|  | unsigned int | jAtomId,
|  | unsigned int | kAtomId,
|  | unsigned int | lAtomId,
|  | double | value
| ) |  |

Set the dihedral angle in radians among the specified atoms i, j, k, l (all atoms bonded to atom l are moved)

Referenced by setDihedralDeg().

void MolTransforms::transformAtom | ( | RDKit::Atom * | atom,
|  | RDGeom::Transform3D & | tform
| ) |  |

void MolTransforms::transformConformer | ( | RDKit::Conformer & | conf,
|  | const RDGeom::Transform3D & | trans
| ) |  |

Transform the conformation using the specified transformation.

void MolTransforms::transformMolsAtoms | ( | RDKit::ROMol * | mol,
|  | RDGeom::Transform3D & | tform
| ) |  |