00001 // 00002 // Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC 00003 // 00004 // @@ All Rights Reserved @@ 00005 // This file is part of the RDKit. 00006 // The contents are covered by the terms of the BSD license 00007 // which is included in the file license.txt, found at the root 00008 // of the RDKit source tree. 00009 // 00010 #ifndef __RD_ALIGN_POINTS_H__ 00011 #define __RD_ALIGN_POINTS_H__ 00012 00013 #include <Geometry/point.h> 00014 #include <Geometry/Transform3D.h> 00015 #include <Numerics/Vector.h> 00016 00017 namespace RDNumeric { 00018 00019 namespace Alignments { 00020 00021 //! \brief Compute an optimal alignment (minimum sum of squared distance) between 00022 //! two sets of points in 3D 00023 /*! 00024 \param refPoints A vector of pointers to the reference points 00025 \param probePoints A vector of pointers to the points to be aligned to the refPoints 00026 \param trans A RDGeom::Transform3D object to capture the necessary transformation 00027 \param weights A vector of weights for each of the points 00028 \param reflect Add reflection is true 00029 \param maxIterations Maximum number of iterations 00030 00031 \return The sum of squared distances between the points 00032 00033 <b>Note</b> 00034 This function returns the sum of squared distance (SSR) not the RMSD 00035 RMSD = sqrt(SSR/numPoints) 00036 */ 00037 double AlignPoints(const RDGeom::Point3DConstPtrVect &refPoints, 00038 const RDGeom::Point3DConstPtrVect &probePoints, 00039 RDGeom::Transform3D &trans, 00040 const DoubleVector *weights=0, bool reflect=false, 00041 unsigned int maxIterations=50); 00042 } 00043 } 00044 00045 #endif 00046
1.7.1