OEConfRMSD¶
class OEConfRMSD
The OEConfRMSD
class provides fast RMSD calculation
of conformers of the same molecule.
During the RMSD calculation the automorphisms of the molecule graph is taken into
consideration.
Automorphisms are the symmetry related
transformations of a molecule which can result in anomalously high
RMSDs if not properly treated. For instance, t-butyl-benzene has a
three-fold automorphism around the t-butyl group and a two-fold
automorphism around the benzene ring.
Constructors¶
OEConfRMSD(const OEMolBase& mol,
const OEConfRMSDOptions &opts=OEConfRMSDOptions())
Constructs an OEConfRMSD
object using a
OEMolBase
and an optional
OEConfRMSDOptions
.
See also
OEConfRMSDOptions
class
CalculateRMSD¶
double CalculateRMSD(const OEConfBase *refconf, const OEConfBase *fitconf) const
double CalculateRMSD(const double* refcoords, const double* fitcoords) const
Calculates the RMSD between the two conformations. The inputs can be
either the OEConfRMSD
objects or their coordinates.
For the second overload, the length of the arrays should be 3*MaxAtomIdx
and
should contain the Cartesian coordinates of the two conformers being assessed.
GetOptions¶
OEConfRMSDOptions GetOptions() const
Returns the options used to set up the OEConfRMSD
object.
See also
OEConfRMSDOptions
class
MinimizeRMSD¶
double MinimizeRMSD(const OEConfBase *refconf, const OEConfBase *fitconf,
OETrans &trans) const
double MinimizeRMSD(const double* refcoords, const double* fitcoords,
OETrans& trans) const
The function returns the minimum RMSD between the two conformations and reports the translation and rotation, trans, required to give this minimum RMSD.
For the second overload, the length of the arrays should be 3*MaxAtomIdx
and
should contain the Cartesian coordinates of the two conformers being assessed.
NumAutomorphs¶
unsigned int NumAutomorphs() const
The function returns the number of automorphisms taken into account during the RMSD calculation.
Example:
The following example finds the two conformers of a molecule that have the smallest RMSD.
OEMol mol = new OEMol();
oechem.OEReadMolecule(ifs, mol);
OEConfRMSD crmsd = new OEConfRMSD(mol);
double minRMSD = Double.MAX_VALUE;
OEConfBase confi;
OEConfBase confj;
int confiIdx = 0;
int confjIdx = 0;
for (OEConfBaseIter ciiter = mol.GetConfs(); ciiter.hasNext(); ciiter.Increment()) {
for (OEConfBaseIter cjiter = ciiter.Increment(); cjiter.hasNext(); cjiter.Increment()) {
confi = ciiter.next();
confj = cjiter.next();
OETrans trans = new OETrans();
double dist = crmsd.MinimizeRMSD(confi, confj, trans);
if (dist < minRMSD)
{
minRMSD = dist;
confiIdx = confi.GetIdx();
confjIdx = confj.GetIdx();
}
}
}
System.out.println("The closest conformers are " + confiIdx + " and " + confjIdx +
" with RMSD = " + minRMSD);
See also
OERMSD
functionOEWeightedRMSD
function