Class SuperPositionAbstract
java.lang.Object
org.biojava.nbio.structure.geometry.SuperPositionAbstract
- All Implemented Interfaces:
SuperPosition
- Direct Known Subclasses:
SuperPositionQCP
,SuperPositionQuat
,SuperPositionSVD
The SuperPositionAbstract contains common code shared by all SuperPosition
algorithm implementations.
- Since:
- 5.0.0
- Author:
- Aleix Lafita
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkInput
(javax.vecmath.Point3d[] fixed, javax.vecmath.Point3d[] moved) Check that the input to the superposition algorithms is valid.void
setCentered
(boolean centered) javax.vecmath.Matrix4d
superposeAndTransform
(javax.vecmath.Point3d[] fixed, javax.vecmath.Point3d[] moved) Transform an array of points so that the coordinates of its points minimize the RMSD to the other array of equivalent points, and return the transformation matrix applied.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.biojava.nbio.structure.geometry.SuperPosition
getRmsd, superpose
-
Field Details
-
centered
-
-
Constructor Details
-
SuperPositionAbstract
-
-
Method Details
-
superposeAndTransform
public javax.vecmath.Matrix4d superposeAndTransform(javax.vecmath.Point3d[] fixed, javax.vecmath.Point3d[] moved) Description copied from interface:SuperPosition
Transform an array of points so that the coordinates of its points minimize the RMSD to the other array of equivalent points, and return the transformation matrix applied.The two point arrays have to be of the same length and the order of points have to be the same, so that a specific position in the one array is equivalent to the same position in the other array.
- Specified by:
superposeAndTransform
in interfaceSuperPosition
- Parameters:
fixed
- point array as reference, onto which the other point array is superposed. Original coordinates will not be modified.moved
- point array to which the resulting transformation matrix is applied. Original coordinates will be transformed.- Returns:
- transformation matrix as a Matrix4d to superpose moved onto fixed point arrays
-
checkInput
Check that the input to the superposition algorithms is valid.- Parameters:
fixed
-moved
-
-
setCentered
- Parameters:
centered
- true if the point arrays are centered at the origin (faster), false otherwise
-