public final class SuperPositionQCP extends Object
Usage:
The input consists of 2 Point3d arrays of equal length. The input coordinates are not changed.
Point3d[] x = ...
Point3d[] y = ...
SuperPositionQCP qcp = new SuperPositionQCP();
qcp.set(x, y);
or with weighting factors [0 - 1]]
double[] weights = ...
qcp.set(x, y, weights);
For maximum efficiency, create a SuperPositionQCP object once and reuse it.
A. Calculate rmsd only
double rmsd = qcp.getRmsd();
B. Calculate a 4x4 transformation (rotation and translation) matrix
Matrix4d rottrans = qcp.getTransformationMatrix();
C. Get transformated points (y superposed onto the reference x)
Point3d[] ySuperposed = qcp.getTransformedCoordinates();
Citations:
Liu P, Agrafiotis DK, & Theobald DL (2011) Reply to comment on: "Fast determination of the optimal rotation matrix for macromolecular superpositions." Journal of Computational Chemistry 32(1):185-186. [http://dx.doi.org/10.1002/jcc.21606]
Liu P, Agrafiotis DK, & Theobald DL (2010) "Fast determination of the optimal rotation matrix for macromolecular superpositions." Journal of Computational Chemistry 31(7):1561-1563. [http://dx.doi.org/10.1002/jcc.21439]
Douglas L Theobald (2005) "Rapid calculation of RMSDs using a quaternion-based characteristic polynomial." Acta Crystallogr A 61(4):478-480. [http://dx.doi.org/10.1107/S0108767305015266 ]
This is an adoption of the original C code QCProt 1.4 (2012, October 10) to Java. The original C source code is available from http://theobald.brandeis.edu/qcp/ and was developed by
Douglas L. Theobald Department of Biochemistry MS 009 Brandeis University 415 South St Waltham, MA 02453 USA
dtheobald@brandeis.edu
Pu Liu Johnson & Johnson Pharmaceutical Research and Development, L.L.C. 665 Stockton Drive Exton, PA 19341 USA
pliu24@its.jnj.com
| Constructor and Description |
|---|
SuperPositionQCP()
Default constructor
|
SuperPositionQCP(boolean centered)
Constructor with option to set centered flag.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getRmsd()
Return the RMSD of the superposition of input coordinate set y onto x.
|
javax.vecmath.Matrix3d |
getRotationMatrix() |
javax.vecmath.Matrix4d |
getTransformationMatrix()
Returns a 4x4 transformation matrix that transforms the y coordinates onto the x coordinates.
|
javax.vecmath.Point3d[] |
getTransformedCoordinates()
Returns the transformed (superposed) y coordinates
TODO this is actually returning a transformation of the x coordinates, we should review if that's correct and change it if not
|
void |
set(javax.vecmath.Point3d[] x,
javax.vecmath.Point3d[] y)
Sets the two input coordinate arrays.
|
void |
set(javax.vecmath.Point3d[] x,
javax.vecmath.Point3d[] y,
double[] weight)
Sets the two input coordinate arrays and weight array.
|
void |
setCentered(boolean centered) |
public SuperPositionQCP()
public SuperPositionQCP(boolean centered)
centered - if set true, the input coordinates are already centered at the originpublic void set(javax.vecmath.Point3d[] x,
javax.vecmath.Point3d[] y)
x - 3d points of reference coordinate sety - 3d points of coordinate set for superpositionpublic void set(javax.vecmath.Point3d[] x,
javax.vecmath.Point3d[] y,
double[] weight)
x - 3d points of reference coordinate sety - 3d points of coordinate set for superpositionweight - a weight in the inclusive range [0,1] for each pointpublic void setCentered(boolean centered)
public double getRmsd()
public javax.vecmath.Matrix4d getTransformationMatrix()
public javax.vecmath.Matrix3d getRotationMatrix()
public javax.vecmath.Point3d[] getTransformedCoordinates()
Copyright © 2000–2016 BioJava. All rights reserved.