chemcoord.Cartesian.align¶

Cartesian.
align
(other, indices=None, ignore_hydrogens=False)¶ Align two Cartesians.
Minimize the RMSD (root mean squared deviation) between
self
andother
. Returns a tuple of copies ofself
andother
where both are centered around their centroid andother
is rotated untoself
. The rotation minimises the distances between the atom pairs of same label. Uses the Kabsch algorithm implemented withinget_kabsch_rotation()
Note
If
indices is None
, thenlen(self) == len(other)
must be true and the elements in each index have to be the same.Parameters:  other (Cartesian) –
 indices (sequence) –
It is possible to specify a subset of indices that is used for the determination of the best rotation matrix:
[[i1, i2,...], [j1, j2,...]]
If
indices
is given in this form, the rotation matrix minimises the distance betweeni1
andj1
,i2
andj2
and so on.  ignore_hydrogens (bool) –
Returns: Return type: tuple