chemcoord.xyz_functions.get_kabsch_rotation

chemcoord.xyz_functions.get_kabsch_rotation(Q, P, weights=None)[source]

Calculate the optimal rotation from P unto Q.

Using the Kabsch algorithm the optimal rotation matrix for the rotation of other unto self is calculated. [1] The algorithm is described very well in wikipedia.

Parameters:
Returns:

The optimal rotation matrix as a numpy array.

Return type:

ndarray[tuple[int, …], dtype[float64]]