stko.TorsionCalculator
- class stko.TorsionCalculator[source]
Bases:
objectUses rdkit to extract all torsions in a molecule.
Note that the rdkit [1] function we use only outputs one torsion for each rotatable bond. We use the TorsionFingerprints.CalculateTorsionLists method.
Examples
import stk import stko # Create a molecule whose torsions we want to know. mol1 = stk.BuildingBlock('CCCNCCCN') # Create the calculator. tc = stko.TorsionCalculator() # Extract the torsions. tc_results = tc.get_results(mol1) for torsion, torsion_angle in tc_results.get_torsion_angles(): atom_ids = torsion.get_atom_ids() # Can now do something with the torsion.
References
Methods
Calculate the torsions of mol.