Class SuperPositionAbstract
- java.lang.Object
-
- org.biojava.nbio.structure.geometry.SuperPositionAbstract
-
- All Implemented Interfaces:
SuperPosition
- Direct Known Subclasses:
SuperPositionQCP
,SuperPositionQuat
,SuperPositionSVD
public abstract class SuperPositionAbstract extends Object implements SuperPosition
The SuperPositionAbstract contains common code shared by all SuperPosition algorithm implementations.- Since:
- 5.0.0
- Author:
- Aleix Lafita
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
centered
-
Constructor Summary
Constructors Constructor Description SuperPositionAbstract(boolean centered)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 Detail
-
centered
protected boolean centered
-
-
Constructor Detail
-
SuperPositionAbstract
public SuperPositionAbstract(boolean centered)
-
-
Method Detail
-
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
protected void checkInput(javax.vecmath.Point3d[] fixed, javax.vecmath.Point3d[] moved)
Check that the input to the superposition algorithms is valid.- Parameters:
fixed
-moved
-
-
setCentered
public void setCentered(boolean centered)
- Parameters:
centered
- true if the point arrays are centered at the origin (faster), false otherwise
-
-