13.2.9. Fast QCP RMSD structure alignment —
Joshua L. Adelman, University of Pittsburgh
Robert R. Delgado, Cornell University and Arizona State University
PyQCPROT is a python/cython implementation of Douglas Theobald’s QCP method for calculating the minimum RMSD between two structures [Theobald2005] and determining the optimal least-squares rotation matrix [Liu2010].
A full description of the method, along with the original C implementation can be found at http://theobald.brandeis.edu/qcp/
Changed in version 0.16.0: Call signatures were changed to directly interface with MDAnalysis coordinate arrays: shape (N, 3)
If you use this QCP rotation calculation method in a publication, please reference:
Douglas L. Theobald (2005) “Rapid calculation of RMSD using a quaternion-based characteristic polynomial.” Acta Crystallographica A 61(4):478-480.
Pu Liu, Dmitris K. Agrafiotis, and Douglas L. Theobald (2010) “Fast determination of the optimal rotational matrix for macromolecular superpositions.” J. Comput. Chem. 31, 1561-1563.
Users will typically use the
- MDAnalysis.lib.qcprot.CalcRMSDRotationalMatrix(ref, conf, N, rot, weights)
Calculate the RMSD & rotational matrix.
ref (ndarray) – reference structure coordinates, shape (N, 3)
conf (ndarray) – condidate structure coordinates, shape (N, 3)
N (int) – size of the system
rot (ndarray or None) – array to store rotation matrix. If given must be flat and shape (9,)
weights (ndarray or None) – weights for each component
rmsd (float) – RMSD value
.. versionchanged:: 0.16.0 – Array size changed from 3xN to Nx3.
.. versionchanged:: 2.7.0 – Changed arguments to floating type, can accept either float32 or float64 inputs
- MDAnalysis.lib.qcprot.InnerProduct(A, coords1, coords2, N, weight)
Calculate the inner product of two structures.
A (ndarray) – result inner product array, modified in place
coords1 (ndarray) – reference structure
coords2 (ndarray) – candidate structure
N (int) – size of system
weight (ndarray or None) – used to calculate weighted inner product
0.5 * (G1 + G2), can be used as input for
You MUST center the structures, coords1 and coords2, before calling this function.
Coordinates are stored as Nx3 arrays (as everywhere else in MDAnalysis).
Changed in version 0.16.0: Array size changed from 3xN to Nx3.
Changed in version 2.7.0: Updating to allow either float32 or float64 inputs
- MDAnalysis.lib.qcprot.FastCalcRMSDAndRotation(rot, A, E0, N)
Calculate the RMSD, and/or the optimal rotation matrix.
rot (ndarray or None) – result rotation matrix, modified inplace
A (ndarray) – the inner product of two structures
E0 (floating) – 0.5 * (G1 + G2)
N (int) – size of the system
rmsd – RMSD value for two structures
- Return type:
Changed in version 0.16.0: Array sized changed from 3xN to Nx3.
Changed in version 2.7.0: Changed arguments to floating type, can accept either float32 or float64 inputs. Internally still uses double precision for QCP algorithm