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