stko.RmsdCalculator
- class stko.RmsdCalculator(initial_molecule, ignore_hydrogens=False)[source]
Bases:
objectCalculates the root mean square distance between molecules.
This calculator will only work if the two molecules are the same and have the same atom ordering.
No alignment of the two molecules occurs. However, both molecules are moved to a centroid position of (0, 0, 0).
- Parameters:
initial_molecule (Molecule) – The
stk.Moleculeto calculate RMSD from.ignore_hydrogens (bool) –
Trueto ignore hydrogen atoms.
Examples
import stk import stko import numpy as np bb1 = stk.BuildingBlock('C1CCCCC1') calculator = stko.RmsdCalculator(bb1) results = calculator.get_results(stko.UFF().optimize(bb1)) rmsd = results.get_rmsd()
Methods
Calculate the RMSD between mol and the initial molecule.