Previous topic

geomm.sasa module

Next topic

geomm.theobald_qcp module

This Page

geomm.superimpose module

geomm.superimpose.superimpose(ref_coords, coords, idxs=None, weights=None)[source]

Superimpose a set of coordinates to reference coordinates using the Theobald-QCP method.

Assumes coordinates are centered appropriately.

Parameters
  • ref_coords (arraylike) – The template coordinates that coords will be aligned to.

  • coords (arraylike) – The coordinates which will be aligned to the template coordinates and have the rotation matrix applied to them and returned.

  • idxs (arraylike, optional) –

    If given will superimpose the coordinates based only on the

    alignment on this subset of atoms to the reference.

    (Default = None)

  • weights (arraylike, optional) –

    Give weights to the coordinates for a weighted centroid

    (‘center of mass’) used in translations to the origin and to the centroid of the reference structure.

    (Default = None)

Returns

  • superimposed_coords (arraylike of float) – The transformed coordinates.

  • rotation_matrix (arraylike) – The rotation matrix from Theobald-QCP that minimized the RMSD

  • qcp_rmsd (float) – The RMSD calculated from Theobald-QCP.

Warning

Assumes that the coordinates are both centered.

geomm.superimpose.alt_superimpose(ref_coords, coords)[source]

Returns the translation and rotation mapping mobile onto target.

Parameters
  • mobile (ndarray, shape = (n_atoms, 3)) – xyz coordinates of a single frame, to be aligned onto target.

  • target (ndarray, shape = (n_atoms, 3)) – xyz coordinates of a single frame

Returns

  • translation (ndarray, shape=(3,)) – Difference between the centroids of the two conformations

  • rotation (ndarray, shape=(3,3)) – Rotation matrix to apply to mobile to carry out the transformation.