to_openmm
- openff.interchange.interop.openmm.to_openmm(interchange: Interchange, combine_nonbonded_forces: bool = False, add_constrained_forces: bool = False, ewald_tolerance: float = 1e-4, hydrogen_mass: float = 1.007947) openmm.System
Convert an Interchange to an OpenmM System.
- Parameters
interchange (openff.interchange.Interchange) – An OpenFF Interchange object
combine_nonbonded_forces (bool, default=False) – If True, an attempt will be made to combine all non-bonded interactions into a single openmm.NonbondedForce. If False, non-bonded interactions will be split across multiple forces.
add_constrained_forces (bool, default=False,) – If True, add valence forces that might be overridden by constraints, i.e. call addBond or addAngle on a bond or angle that is fully constrained.
ewald_tolerance (float, default=1e-4) – The value passed to NonbondedForce.setEwaldErrorTolerance
hydrogen_mass (float, default=1.007947) – The mass to use for hydrogen atoms if not present in the topology. If non-trivially different than the default value, mass will be transferred from neighboring heavy atoms.
- Returns
system – The corresponding OpenMM System object
- Return type
openmm.System