RDKit
Open-source cheminformatics and machine learning.
AlignPoints.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 #ifndef __RD_ALIGN_POINTS_H__
11 #define __RD_ALIGN_POINTS_H__
12 
13 #include <Geometry/point.h>
14 #include <Geometry/Transform3D.h>
15 #include <Numerics/Vector.h>
16 
17 namespace RDNumeric {
18 
19 namespace Alignments {
20 
21 //! \brief Compute an optimal alignment (minimum sum of squared distance)
22 //between
23 //! two sets of points in 3D
24 /*!
25  \param refPoints A vector of pointers to the reference points
26  \param probePoints A vector of pointers to the points to be aligned to the
27  refPoints
28  \param trans A RDGeom::Transform3D object to capture the necessary
29  transformation
30  \param weights A vector of weights for each of the points
31  \param reflect Add reflection is true
32  \param maxIterations Maximum number of iterations
33 
34  \return The sum of squared distances between the points
35 
36  <b>Note</b>
37  This function returns the sum of squared distance (SSR) not the RMSD
38  RMSD = sqrt(SSR/numPoints)
39 */
40 double AlignPoints(const RDGeom::Point3DConstPtrVect &refPoints,
41  const RDGeom::Point3DConstPtrVect &probePoints,
42  RDGeom::Transform3D &trans, const DoubleVector *weights = 0,
43  bool reflect = false, unsigned int maxIterations = 50);
44 }
45 }
46 
47 #endif
const RDGeom::POINT3D_VECT * reflect(const Conformer &conf)
std::vector< const RDGeom::Point3D * > Point3DConstPtrVect
Definition: point.h:503
A class to represent vectors of numbers.
Definition: Vector.h:28
double AlignPoints(const RDGeom::Point3DConstPtrVect &refPoints, const RDGeom::Point3DConstPtrVect &probePoints, RDGeom::Transform3D &trans, const DoubleVector *weights=0, bool reflect=false, unsigned int maxIterations=50)
Compute an optimal alignment (minimum sum of squared distance)