My watch list  

Kabsch algorithm

The Kabsch algorithm is a method for calculating the optimal alignment of two sets of points. It is useful in graphics, and also in bioinformatics for calculating the RMSD (root mean squared deviation) of two proteins.

The algorithm works by calculating a matrix of multiplied components. The destination matrix, A, is a 3 × 3 matrix with x, y and z components for each side. The source is two sets of paired points, P and Q.

Aij = PkiQkj

(sum over the points and multiply components).

The formula is

(AtA)1 / 2A − 1

or take the square root of the product of the transpose of A and A itself, then multiply by the inverse of A.

The algorithm calculates only the rotation matix. You must transform both sets of coordinates to their centroid first.

C source is available at

A free PyMol plugin easily implementing Kabsch is Cealign.


  • Kabsch, Wolfgang, (1976) "A solution of the best rotation to relate two sets of vectors", Acta Crystallographica 32:922.
  • Lin Ying-Hung, Chang Hsun-Chang, Lin Yaw-Ling (2004) "A Study on Tools and Algorithms for 3-D Protein Structures Alignment and Comparison", International Computer Symposium, Dec 15-17, Taipei, Taiwan.
This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Kabsch_algorithm". A list of authors is available in Wikipedia.
Your browser is not current. Microsoft Internet Explorer 6.0 does not support some functions on Chemie.DE