get_openmm_energies

openff.interchange.drivers.get_openmm_energies(interchange: Interchange, round_positions: int | None = None, combine_nonbonded_forces: bool = True, detailed: bool = False, platform: str = 'Reference') 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
  • interchange (openff.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.

  • 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.

  • platform (str, default=”Reference”) – The name of the platform (openmm.Platform) used by OpenMM in this calculation.

  • detailed (bool, default=False) – Attempt to report energies with more granularity. Not guaranteed to be compatible with all values of other arguments. Useful for debugging.

Returns

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

Return type

EnergyReport