Chemical Data Processing Library Python API - Version 1.4.0
Public Member Functions | Properties | List of all members
CDPL.Math.Vector3DArrayAlignmentCalculator Class Reference

Kabsch algorithm [KABA] implementation that operates directly on vector array inputs. More...

+ Inheritance diagram for CDPL.Math.Vector3DArrayAlignmentCalculator:

Public Member Functions

None __init__ ()
 Contructs the Vector3DArrayAlignmentCalculator instance.
 
None __init__ (Vector3DArrayAlignmentCalculator algo)
 Contructs a copy of the Vector3DArrayAlignmentCalculator instance algo. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
Vector3DArrayAlignmentCalculator assign (Vector3DArrayAlignmentCalculator algo)
 Replaces the current state with a copy of the state of the Vector3DArrayAlignmentCalculator instance algo. More...
 
DMatrix getTransform ()
 Returns the rigid-body transformation produced by the most recent successful calculate() call. More...
 
bool calculate (Vector3DArray points, Vector3DArray ref_points, bool do_center=True, int max_svd_iter=0)
 Aligns points onto ref_points (with uniform weights) using the Kabsch algorithm. More...
 
bool calculate (Vector3DArray points, Vector3DArray ref_points, ConstFVectorExpression weights, bool do_center=True, int max_svd_iter=0)
 Aligns points onto ref_points (with per-point weights) using the Kabsch algorithm. More...
 
bool calculate (Vector3DArray points, Vector3DArray ref_points, ConstDVectorExpression weights, bool do_center=True, int max_svd_iter=0)
 Aligns points onto ref_points (with per-point weights) using the Kabsch algorithm. More...
 

Properties

 objectID = property(getObjectID)
 
 transform = property(getTransform)
 

Detailed Description

Kabsch algorithm [KABA] implementation that operates directly on vector array inputs.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Math.Vector3DArrayAlignmentCalculator.__init__ ( Vector3DArrayAlignmentCalculator  algo)

Contructs a copy of the Vector3DArrayAlignmentCalculator instance algo.

Parameters
algoThe Vector3DArrayAlignmentCalculator instance to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.Math.Vector3DArrayAlignmentCalculator.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python Vector3DArrayAlignmentCalculator 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 Vector3DArrayAlignmentCalculator 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().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ assign()

Vector3DArrayAlignmentCalculator CDPL.Math.Vector3DArrayAlignmentCalculator.assign ( Vector3DArrayAlignmentCalculator  algo)

Replaces the current state with a copy of the state of the Vector3DArrayAlignmentCalculator instance algo.

Parameters
algoThe Vector3DArrayAlignmentCalculator instance to copy.
Returns
self.

◆ getTransform()

DMatrix CDPL.Math.Vector3DArrayAlignmentCalculator.getTransform ( )

Returns the rigid-body transformation produced by the most recent successful calculate() call.

Returns
The homogeneous transformation matrix.

◆ calculate() [1/3]

bool CDPL.Math.Vector3DArrayAlignmentCalculator.calculate ( Vector3DArray  points,
Vector3DArray  ref_points,
bool   do_center = True,
int   max_svd_iter = 0 
)

Aligns points onto ref_points (with uniform weights) using the Kabsch algorithm.

Parameters
pointsThe vector array containing the points to align.
ref_pointsThe vector array containing the reference points.
do_centerIf True, the point sets are centered before alignment.
max_svd_iterThe maximum number of iterations for the internal SVD step (0 means unlimited).
Returns
True if the SVD step converged, and False otherwise.

◆ calculate() [2/3]

bool CDPL.Math.Vector3DArrayAlignmentCalculator.calculate ( Vector3DArray  points,
Vector3DArray  ref_points,
ConstFVectorExpression  weights,
bool   do_center = True,
int   max_svd_iter = 0 
)

Aligns points onto ref_points (with per-point weights) using the Kabsch algorithm.

Parameters
pointsThe vector array containing the points to align.
ref_pointsThe vector array containing the reference points.
weightsThe per-point weights.
do_centerIf True, the point sets are centered before alignment.
max_svd_iterThe maximum number of iterations for the internal SVD step (0 means unlimited).
Returns
True if the SVD step converged, and False otherwise.

◆ calculate() [3/3]

bool CDPL.Math.Vector3DArrayAlignmentCalculator.calculate ( Vector3DArray  points,
Vector3DArray  ref_points,
ConstDVectorExpression  weights,
bool   do_center = True,
int   max_svd_iter = 0 
)

Aligns points onto ref_points (with per-point weights) using the Kabsch algorithm.

Parameters
pointsThe vector array containing the points to align.
ref_pointsThe vector array containing the reference points.
weightsThe per-point weights.
do_centerIf True, the point sets are centered before alignment.
max_svd_iterThe maximum number of iterations for the internal SVD step (0 means unlimited).
Returns
True if the SVD step converged, and False otherwise.