stko.OpenMMEnergy

class stko.OpenMMEnergy(force_field, box_vectors=None, define_stereo=False, partial_charges_method='am1bcc', platform=None)[source]

Bases: object

Uses OpenMM to calculate energy.

Parameters:
  • force_field (ForceField) – The force field to use.

  • box_vectors (Quantity | None) – The box vectors to use.

  • define_stereo (bool) – Toggle calculation of stereochemistry.

  • partial_charges_method (Literal['am1bcc', 'mmff94', 'gasteiger', 'am1-mulliken', 'espaloma-am1bcc']) – The method to use for calculating partial charges. The default "am1bcc" is semi-empirical and may be slow.

  • platform (Literal['CUDA'] | None) – The platform to use.

Methods

calculate

get_energy

Calculate the energy of mol in kilojoules per mole.

calculate(mol)[source]
Parameters:

mol (Molecule)

Return type:

Generator

get_energy(mol)[source]

Calculate the energy of mol in kilojoules per mole.

Parameters:

mol (Molecule) – The molecule for which to calculate energy.

Returns:

The energy.

Return type:

float