- qcelemental.molutil.kabsch_align(rgeom, cgeom, weight=None)
Finds optimal translation and rotation to align cgeom onto rgeom via Kabsch algorithm by minimizing the norm of the residual, \(|| R - U * C ||\).
ndarray) – (nat, 3) array of reference/target/unchanged geometry. Assumed [a0] for RMSD purposes.
ndarray) – (nat, 3) array of concern/changeable geometry. Assumed [a0] for RMSD purposes. Must have same Natom, units, and 1-to-1 atom ordering as rgeom.
ndarray]) – (nat,) array of weights applied to rgeom. Note that definitions of weights (nothing to do with atom masses) are several, and I haven’t seen one yet that can make centroid the center-of-mass and also make the RMSD match the usual mass-wtd-RMSD definition. Also, only one weight vector used rather than split btwn R & C, which may be invalid if not 1-to-1. Weighting is not recommended.
First item is RMSD [A] between rgeom and the optimally aligned geometry computed. Second item is (3, 3) rotation matrix to optimal alignment. Third item is (3,) translation vector [a0] to optimal alignment.
- Return type:
Kabsch: Acta Cryst. (1978). A34, 827-828 http://journals.iucr.org/a/issues/1978/05/00/a15629/a15629.pdf
protein wRMSD code: https://pharmacy.umich.edu/sites/default/files/global_wrmsd_v8.3.py.txt