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) between
22  //! two sets of points in 3D
23  /*!
24  \param refPoints A vector of pointers to the reference points
25  \param probePoints A vector of pointers to the points to be aligned to the refPoints
26  \param trans A RDGeom::Transform3D object to capture the necessary transformation
27  \param weights A vector of weights for each of the points
28  \param reflect Add reflection is true
29  \param maxIterations Maximum number of iterations
30 
31  \return The sum of squared distances between the points
32 
33  <b>Note</b>
34  This function returns the sum of squared distance (SSR) not the RMSD
35  RMSD = sqrt(SSR/numPoints)
36  */
37  double AlignPoints(const RDGeom::Point3DConstPtrVect &refPoints,
38  const RDGeom::Point3DConstPtrVect &probePoints,
39  RDGeom::Transform3D &trans,
40  const DoubleVector *weights=0, bool reflect=false,
41  unsigned int maxIterations=50);
42  }
43 }
44 
45 #endif
46 
const RDGeom::POINT3D_VECT * reflect(const Conformer &conf)
std::vector< const RDGeom::Point3D * > Point3DConstPtrVect
Definition: point.h:525
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) between two sets of points in 3D...