RDKit: AlignPoints.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
AlignPoints.h
Go to the documentation of this file.
1//
2// Copyright (C) 2004-2025 Greg Landrum and other RDKit contributors
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#include <RDGeneral/export.h>
11#ifndef RD_ALIGN_POINTS_H
12#define RD_ALIGN_POINTS_H
13
14#include <Geometry/point.h>
15#include <Geometry/Transform3D.h>
16#include <Numerics/Vector.h>
17
18 namespace RDNumeric {
19
20 namespace Alignments {
21
22//! \brief Compute an optimal alignment (minimum sum of squared distance)
23/// between two sets of points in 3D using the quaternion method
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 in the eigen solver
33
34 \return The sum of squared distances between the points
35
36 <b>Note</b>
37 This function returns the sum of squared distances (SSD) not the RMSD
38 RMSD = sqrt(SSD/numPoints)
39*/
40double RDKIT_ALIGNMENT_EXPORT
41AlignPoints(const RDGeom::Point3DConstPtrVect &refPoints,
42 const RDGeom::Point3DConstPtrVect &probePoints,
43 RDGeom::Transform3D &trans, const DoubleVector *weights = nullptr,
44 bool reflect = false, unsigned int maxIterations = 50);
45} // namespace Alignments
46} // namespace RDNumeric
47
48#endif
Transform3D.h
Vector.h
RDGeom::Transform3D
Definition Transform3D.h:23
export.h
RDKIT_ALIGNMENT_EXPORT
#define RDKIT_ALIGNMENT_EXPORT
Definition export.h:17
RDGeom::Point3DConstPtrVect
std::vector< const RDGeom::Point3D * > Point3DConstPtrVect
Definition point.h:548
RDNumeric::Alignments
Definition AlignPoints.h:20
RDNumeric::Alignments::AlignPoints
double RDKIT_ALIGNMENT_EXPORT AlignPoints(const RDGeom::Point3DConstPtrVect &refPoints, const RDGeom::Point3DConstPtrVect &probePoints, RDGeom::Transform3D &trans, const DoubleVector *weights=nullptr, bool reflect=false, unsigned int maxIterations=50)
Compute an optimal alignment (minimum sum of squared distance) between two sets of points in 3D using...
RDNumeric
Definition AlignPoints.h:18
RDNumeric::DoubleVector
Vector< double > DoubleVector
Definition Vector.h:296
point.h