Kabsch Algorithm
   HOME

TheInfoList



OR:

The Kabsch algorithm, named after
Wolfgang Kabsch Wolfgang is a German male given name traditionally popular in Germany, Austria and Switzerland. The name is a combination of the Old High German words ''wolf'', meaning "wolf", and ''gang'', meaning "path", "journey", "travel". Besides the regula ...
, is a method for calculating the optimal
rotation matrix In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space. For example, using the convention below, the matrix :R = \begin \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \en ...
that minimizes the
RMSD The root-mean-square deviation (RMSD) or root-mean-square error (RMSE) is a frequently used measure of the differences between values (sample or population values) predicted by a model or an estimator and the values observed. The RMSD represents ...
( root mean squared deviation) between two paired sets of points. It is useful in graphics, cheminformatics to compare molecular structures, and also bioinformatics for comparing
protein Proteins are large biomolecules and macromolecules that comprise one or more long chains of amino acid residues. Proteins perform a vast array of functions within organisms, including catalysing metabolic reactions, DNA replication, res ...
structures (in particular, see root-mean-square deviation (bioinformatics)). The algorithm only computes the rotation matrix, but it also requires the computation of a translation vector. When both the translation and rotation are actually performed, the algorithm is sometimes called partial
Procrustes superimposition In statistics, Procrustes analysis is a form of statistical shape analysis used to analyse the distribution of a set of shapes. The name ''Procrustes'' ( el, Προκρούστης) refers to a bandit from Greek mythology who made his victims fi ...
(see also
orthogonal Procrustes problem The orthogonal Procrustes problem is a matrix approximation problem in linear algebra. In its classical form, one is given two matrices A and B and asked to find an orthogonal matrix \Omega which most closely maps A to B. Specifically, :R = \arg\m ...
).


Description

The algorithm for the rotation of into starts with two sets of paired points, and . Each set of points can be represented as an
matrix Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** ''The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
. The first row is the coordinates of the first point, the second row is the coordinates of the second point, the th row is the coordinates of the th point. Check the matrix below :\begin x_1 & y_1 & z_1 \\ x_2 & y_2 & z_2 \\ \vdots & \vdots & \vdots \\ x_N & y_N & z_N \end The algorithm works in three steps: a translation, the computation of a covariance matrix, and the computation of the optimal rotation matrix.


Translation

Both sets of coordinates must be translated first, so that their
centroid In mathematics and physics, the centroid, also known as geometric center or center of figure, of a plane figure or solid figure is the arithmetic mean position of all the points in the surface of the figure. The same definition extends to any ...
coincides with the origin of the coordinate system. This is done by subtracting from the point coordinates of the respective centroid.


Computation of the covariance matrix

The second step consists of calculating a matrix . In matrix notation, : H = P^\mathsfQ \, or, using summation notation, : H_ = \sum_^N P_ Q_, which is a
cross-covariance matrix In probability theory and statistics, a cross-covariance matrix is a matrix whose element in the ''i'', ''j'' position is the covariance between the ''i''-th element of a random vector and ''j''-th element of another random vector. A random vect ...
when and are seen as data matrices.


Computation of the optimal rotation matrix

It is possible to calculate the optimal rotation based on the matrix formula : R = \left(H^\mathsf H\right)^\frac12 H^ but implementing a numerical solution to this formula becomes complicated when all special cases are accounted for (for example, the case of not having an inverse). If
singular value decomposition In linear algebra, the singular value decomposition (SVD) is a factorization of a real or complex matrix. It generalizes the eigendecomposition of a square normal matrix with an orthonormal eigenbasis to any \ m \times n\ matrix. It is re ...
(SVD) routines are available, the optimal rotation, , can be calculated using the following simple algorithm. First, calculate the SVD of the covariance matrix . : H = U \Sigma V^\mathsf Next, decide whether we need to correct our rotation matrix to ensure a right-handed coordinate system : d = \mathrm\left(\det\left(V U^\mathsf\right)\right) Finally, calculate our optimal rotation matrix, , as : R = V \begin 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & d \end U^\mathsf The optimal rotation matrix can also be expressed in terms of quaternions. This alternative description has been used in the development of a rigorous method for removing rigid-body motions from
molecular dynamics Molecular dynamics (MD) is a computer simulation method for analyzing the physical movements of atoms and molecules. The atoms and molecules are allowed to interact for a fixed period of time, giving a view of the dynamic "evolution" of t ...
trajectories of flexible molecules. In 2002 a generalization for the application to probability distributions (continuous or not) was also proposed.


Generalizations

The algorithm was described for points in a three-dimensional space. The generalization to dimensions is immediate.


External links

This SVD algorithm is described in more detail at http://cnx.org/content/m11608/latest/ A
Matlab MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementa ...
function is available at http://www.mathworks.com/matlabcentral/fileexchange/25746-kabsch-algorithm
C++ implementation
(and unit test) using
Eigen Eigen may refer to: * Eigen (C++ library), computer programming library for matrix and linear algebra operations * Eigen Technologies, the Document AI software company * Eigen, Schwyz, settlement in the municipality of Alpthal in the canton of S ...
A
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
script is available at https://github.com/charnley/rmsd. Another implementation can be found i
SciPy
A free
PyMol PyMOL is an open source but proprietary molecular visualization system created by Warren Lyford DeLano. It was commercialized initially by DeLano Scientific LLC, which was a private software company dedicated to creating useful tools that becom ...
plugin easily implementing Kabsch i

(This previously linked to CEalig

but this uses the Cross-entropy method , CE Algorithm. ) VMD uses the Kabsch algorithm for its alignment. The
FoldX FoldX is a protein design algorithm that uses an empirical force field. It can determine the energetic effect of point mutations as well as the interaction energy of protein complexes (including Protein- DNA). FoldX can mutate protein and DNA ...
modeling toolsuite incorporates the Kabsch algorithm to measure RMSD between Wild Type and Mutated protein structures.


See also

*
Wahba's Problem In applied mathematics, Wahba's problem, first posed by Grace Wahba in 1965, seeks to find a rotation matrix ( special orthogonal matrix) between two coordinate systems from a set of (weighted) vector observations. Solutions to Wahba's problem are ...
*
Orthogonal Procrustes problem The orthogonal Procrustes problem is a matrix approximation problem in linear algebra. In its classical form, one is given two matrices A and B and asked to find an orthogonal matrix \Omega which most closely maps A to B. Specifically, :R = \arg\m ...


References

* ** With a correction in * * {{cite journal, last=Umeyama, first=Shinji, date=1991, title=Least-Squares Estimation of Transformation Parameters Between Two Point Patterns, journal=IEEE Trans. Pattern Anal. Mach. Intell., volume=13, issue=4, page=376–380, doi=10.1109/34.88573 Bioinformatics algorithms