get_best_rmsd

openff.nagl.toolkits.openff.get_best_rmsd(molecule: Molecule, reference_conformer: ndarray | Quantity, target_conformer: ndarray | Quantity, toolkit_registry=NAGL_TOOLKIT_REGISTRY) Quantity[source]

Compute the lowest all-atom RMSD between a reference and target conformer, allowing for symmetry-equivalent atoms to be permuted.

Parameters:
  • molecule (openff.toolkit.topology.Molecule) – The molecule to compute the RMSD for

  • reference_conformer (np.ndarray or openff.units.unit.Quantity) – The reference conformer to compare to the target conformer. If a numpy array, it is assumed to be in units of angstrom.

  • target_conformer (np.ndarray or openff.units.unit.Quantity) – The target conformer to compare to the reference conformer. If a numpy array, it is assumed to be in units of angstrom.

  • toolkit_registry – The toolkit registry to use

Returns:

rmsd (unit.Quantity)

Examples

>>> from openff.units import unit
>>> from openff.toolkit.topology import Molecule
>>> from openff.toolkit.utils.openff import get_best_rmsd
>>> molecule = Molecule.from_smiles("CCCCO")
>>> molecule.generate_conformers(n_conformers=2)
>>> rmsd = get_best_rmsd(molecule, molecule.conformers[0], molecule.conformers[1])
>>> print(f"RMSD in angstrom: {rmsd.m_as(unit.angstrom)}")