stko.MatchedTorsionCalculator

class stko.MatchedTorsionCalculator[source]

Bases: ConstructedMoleculeTorsionCalculator

Matches rdkit generated torsions with building block torsions.

Methods

calculate

Extract torsions with rdkit, then match to building blocks.

get_results

Calculate the torsions of mol.

calculate(mol)[source]

Extract torsions with rdkit, then match to building blocks.

This method loops through each rdkit generated torsion. For each torsion, it checks if the two interior atoms of the torsion come from the two interior (central) atoms of some torsion in a building block. If so, it replaces the end atoms of the torsion with the atoms corresponding to the end atoms of the underlying building block torsion.

Parameters:

mol (ConstructedMolecule) – The stk.ConstructedMolecule whose torsions are to be calculated.

Return type:

Generator

get_results(mol)

Calculate the torsions of mol.

Parameters:

mol (ConstructedMolecule) – The molecule whose torsions are to be calculated.

Returns:

The torsions of the molecule.

Return type:

ConstructedMoleculeTorsionResults