BioSimSpace.Align.rmsdAlign

BioSimSpace.Align.rmsdAlign(molecule0, molecule1, mapping=None, property_map0={}, property_map1={})

Align atoms in molecule0 to those in molecule1 using the mapping between matched atom indices. The molecule is aligned based on a root mean squared displacement (RMSD) fit to find the optimal translation vector (as opposed to merely taking the difference of centroids).

Parameters
  • molecule0 (Molecule) – The molecule to align.

  • molecule1 (Molecule) – The reference molecule.

  • mapping (dict) – A dictionary mapping atoms in molecule0 to those in molecule1.

  • property_map0 (dict) – A dictionary that maps “properties” in molecule0 to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }

  • property_map1 (dict) – A dictionary that maps “properties” in molecule1 to their user defined values.

Returns

molecule – The aligned molecule.

Return type

Molecule

Examples

Align molecule0 to molecule1 based on a precomputed mapping.

>>> import BioSimSpace as BSS
>>> molecule0 = BSS.Align.rmsdAlign(molecule0, molecule1, mapping)

Align molecule0 to molecule1. Since no mapping is passed one will be autogenerated using matchAtoms with default options.

>>> import BioSimSpace as BSS
>>> molecule0 = BSS.Align.rmsdAlign(molecule0, molecule1)