stko.KabschRmsdCalculator

class stko.KabschRmsdCalculator(initial_molecule)[source]

Bases: object

Calculates the root mean square distance between molecules.

This calculator uses the rmsd package with the default settings and no reordering.

This calculator will only work if the two molecules are the same and have the same atom ordering.

Parameters:

initial_molecule (Molecule) – The stk.Molecule to calculate RMSD from.

Examples

import stk
import stko
import numpy as np

bb1 = stk.BuildingBlock('C1CCCCC1')
calculator = stko.KabschRmsdCalculator(bb1)
results = calculator.get_results(stko.UFF().optimize(bb1))
rmsd  = results.get_rmsd()

Methods

calculate

get_results

Calculate the RMSD between mol and the initial molecule.

calculate(mol)[source]
Parameters:

mol (Molecule)

Return type:

float

get_results(mol)[source]

Calculate the RMSD between mol and the initial molecule.

Parameters:

mol (Molecule) – The stk.Molecule to calculate RMSD to.

Returns:

The RMSD between the molecules.

Return type:

RmsdResults