![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Implementation of the Kabsch algorithm [KABA]. More...
Inheritance diagram for CDPL.Math.FKabschAlgorithm:Public Member Functions | |
| None | __init__ () |
Contructs the FKabschAlgorithm instance. | |
| None | __init__ (FKabschAlgorithm algo) |
Contructs a copy of the FKabschAlgorithm instance algo. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| FKabschAlgorithm | assign (FKabschAlgorithm algo) |
Replaces the current state with a copy of the state of the FKabschAlgorithm instance algo. More... | |
| FMatrix | getTransform () |
| Returns the rigid-body transformation produced by the most recent successful align() call. More... | |
| bool | align (ConstFMatrixExpression points, ConstFMatrixExpression ref_points, bool do_center=True, int max_svd_iter=0) |
| Computes the rigid body transformation that aligns a set of \( N \) \( D \)-dimensional points points with a corresponding set of reference points ref_points at a minimum RMSD. More... | |
| bool | align (ConstDMatrixExpression points, ConstDMatrixExpression ref_points, bool do_center=True, int max_svd_iter=0) |
| Computes the rigid body transformation that aligns a set of \( N \) \( D \)-dimensional points points with a corresponding set of reference points ref_points at a minimum RMSD. More... | |
| bool | align (ConstFMatrixExpression points, ConstFMatrixExpression ref_points, ConstFVectorExpression weights, bool do_center=True, int max_svd_iter=0) |
| Computes the rigid body transformation that aligns a set of \( N \) \( D \)-dimensional points points with a corresponding set of reference points ref_points at a minimum RMSD. More... | |
| bool | align (ConstDMatrixExpression points, ConstDMatrixExpression ref_points, ConstDVectorExpression weights, bool do_center=True, int max_svd_iter=0) |
| Computes the rigid body transformation that aligns a set of \( N \) \( D \)-dimensional points points with a corresponding set of reference points ref_points at a minimum RMSD. More... | |
Properties | |
| objectID = property(getObjectID) | |
| transform = property(getTransform) | |
Implementation of the Kabsch algorithm [KABA].
Finds the least Root Mean Square Distance between two sets of \( N \) points in \( D \) dimensions and the rigid transformation (i.e. translation and rotation) to employ in order to bring one set that close to the other.
Note that the points are paired, i.e. it is known which point in one set should be compared to a given point in the other set. It is possible to give weights to the points. Those weights are determined a priori and do not depend on the distances.
The convention is used that points are column vectors of the input matrices.
| None CDPL.Math.FKabschAlgorithm.__init__ | ( | FKabschAlgorithm | algo | ) |
Contructs a copy of the FKabschAlgorithm instance algo.
| algo | The FKabschAlgorithm instance to copy. |
| int CDPL.Math.FKabschAlgorithm.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python FKabschAlgorithm instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two FKabschAlgorithm instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
| FKabschAlgorithm CDPL.Math.FKabschAlgorithm.assign | ( | FKabschAlgorithm | algo | ) |
Replaces the current state with a copy of the state of the FKabschAlgorithm instance algo.
| algo | The FKabschAlgorithm instance to copy. |
| FMatrix CDPL.Math.FKabschAlgorithm.getTransform | ( | ) |
Returns the rigid-body transformation produced by the most recent successful align() call.
| bool CDPL.Math.FKabschAlgorithm.align | ( | ConstFMatrixExpression | points, |
| ConstFMatrixExpression | ref_points, | ||
| bool | do_center = True, |
||
| int | max_svd_iter = 0 |
||
| ) |
Computes the rigid body transformation that aligns a set of \( N \) \( D \)-dimensional points points with a corresponding set of reference points ref_points at a minimum RMSD.
| points | A D×N-matrix storing the points to align as column vectors. |
| ref_points | A D×N-matrix storing the reference points as column vectors. |
| do_center | True if centering of the data points needs to be performed, and False if not. |
| max_svd_iter | The maximum number of iterations to perform in the SV-decomposition, or 0 if no limit. |
True if convergence in the internal SV-decomposition has been reached in max_svd_iter iterations, and False otherwise.points.getSize1() == ref_points.getSize1()points.getSize2() == ref_points.getSize2()| Base.SizeError | if preconditions got violated. |
| bool CDPL.Math.FKabschAlgorithm.align | ( | ConstDMatrixExpression | points, |
| ConstDMatrixExpression | ref_points, | ||
| bool | do_center = True, |
||
| int | max_svd_iter = 0 |
||
| ) |
Computes the rigid body transformation that aligns a set of \( N \) \( D \)-dimensional points points with a corresponding set of reference points ref_points at a minimum RMSD.
| points | A D×N-matrix storing the points to align as column vectors. |
| ref_points | A D×N-matrix storing the reference points as column vectors. |
| do_center | True if centering of the data points needs to be performed, and False if not. |
| max_svd_iter | The maximum number of iterations to perform in the SV-decomposition, or 0 if no limit. |
True if convergence in the internal SV-decomposition has been reached in max_svd_iter iterations, and False otherwise.points.getSize1() == ref_points.getSize1()points.getSize2() == ref_points.getSize2()| Base.SizeError | if preconditions got violated. |
| bool CDPL.Math.FKabschAlgorithm.align | ( | ConstFMatrixExpression | points, |
| ConstFMatrixExpression | ref_points, | ||
| ConstFVectorExpression | weights, | ||
| bool | do_center = True, |
||
| int | max_svd_iter = 0 |
||
| ) |
Computes the rigid body transformation that aligns a set of \( N \) \( D \)-dimensional points points with a corresponding set of reference points ref_points at a minimum RMSD.
| points | A D×N-matrix storing the points to align as column vectors. |
| ref_points | A D×N-matrix storing the reference points as column vectors. |
| weights | A \( N \)-dimensional vector storing the non-negative weights that are assigned to the points. |
| do_center | True if centering of the data points needs to be performed, and False if not. |
| max_svd_iter | The maximum number of iterations to perform in the SV-decomposition, or 0 if no limit. |
True if convergence in the internal SV-decomposition has been reached in max_svd_iter iterations, and False otherwise.points.getSize1() == ref_points.getSize1()points.getSize2() == ref_points.getSize2()weights().getSize() == points.getSize2()weights()(i) >= 0 && sum(weights) > 0| Base.SizeError | or Base.ValueError if preconditions got violated. |
| bool CDPL.Math.FKabschAlgorithm.align | ( | ConstDMatrixExpression | points, |
| ConstDMatrixExpression | ref_points, | ||
| ConstDVectorExpression | weights, | ||
| bool | do_center = True, |
||
| int | max_svd_iter = 0 |
||
| ) |
Computes the rigid body transformation that aligns a set of \( N \) \( D \)-dimensional points points with a corresponding set of reference points ref_points at a minimum RMSD.
| points | A D×N-matrix storing the points to align as column vectors. |
| ref_points | A D×N-matrix storing the reference points as column vectors. |
| weights | A \( N \)-dimensional vector storing the non-negative weights that are assigned to the points. |
| do_center | True if centering of the data points needs to be performed, and False if not. |
| max_svd_iter | The maximum number of iterations to perform in the SV-decomposition, or 0 if no limit. |
True if convergence in the internal SV-decomposition has been reached in max_svd_iter iterations, and False otherwise.points.getSize1() == ref_points.getSize1()points.getSize2() == ref_points.getSize2()weights().getSize() == points.getSize2()weights()(i) >= 0 && sum(weights) > 0| Base.SizeError | or Base.ValueError if preconditions got violated. |