openff.interchange.drivers.openmm.get_openmm_energies

openff.interchange.drivers.openmm.get_openmm_energies(off_sys: openff.interchange.components.interchange.Interchange, round_positions=None, hard_cutoff: bool = False, electrostatics: bool = True, combine_nonbonded_forces: bool = False) openff.interchange.drivers.report.EnergyReport[source]

Given an OpenFF Interchange object, return single-point energies as computed by OpenMM.

Warning

This API is experimental and subject to change.

Parameters
  • off_sys (openff.interchange.components.interchange.Interchange) – An OpenFF Interchange object to compute the single-point energy of

  • round_positions (int, optional) – The number of decimal places, in nanometers, to round positions. This can be useful when comparing to i.e. GROMACS energies, in which positions may be rounded.

  • writer (str, default=”internal”) – A string key identifying the backend to be used to write OpenMM files. The default value of “internal” results in this package’s exporters being used.

  • hard_cutoff (bool, default=True) – Whether or not to apply a hard cutoff (no switching function or disperson correction) to the openmm.NonbondedForce in the generated openmm.System. Note that this will truncate electrostatics to the non-bonded cutoff.

  • electrostatics (bool, default=True) – A boolean indicating whether or not electrostatics should be included in the energy calculation.

  • combine_nonbonded_forces (bool, default=False) – Whether or not to combine all non-bonded interactions (vdW, short- and long-range ectrostaelectrostatics, and 1-4 interactions) into a single openmm.NonbondedForce.

Returns

report – An EnergyReport object containing the single-point energies.

Return type

EnergyReport