min_trans_rot
esta.general.min_trans_rot
¶
this module is from ASE, freely available under the GNU LGPL license. For details of ASE, see https://wiki.fysik.dtu.dk/ase/
modified to adapt to the EStA calling modules. Note: easy to implement from scratch as the needed routines are scattered already in the EStA directories .. TODO!!
rotation_matrix_from_points(m0, m1)
¶
Returns a rigid transformation/rotation matrix that minimizes the RMSD between two set of points.
m0 and m1 should be (3, npoints) numpy arrays with coordinates as columns::
(x1 x2 x3 ... xN
y1 y2 y3 ... yN
z1 z2 z3 ... zN)
The centeroids should be set to origin prior to computing the rotation matrix.
The rotation matrix is computed using quaternion algebra as detailed in::
Melander et al. J. Chem. Theory Comput., 2015, 11,1055
quaternion_to_matrix(q)
¶
Returns a rotation matrix.
Computed from a unit quaternion Input as (4,) numpy array.
minimize_rotation_and_translation(target, atoms)
¶
Minimize RMSD between atoms and target.
Rotate and translate atoms to best match target. For more details, see::
Melander et al. J. Chem. Theory Comput., 2015, 11,1055