Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.26 KB

File metadata and controls

22 lines (16 loc) · 1.26 KB

Compare small molecule parm@frosst energies between SMIRNOFF and AMBER prmtop/inpcrd

This example demonstrates how to compare parm@frosst energies of molecules from the AlkEthOH set between systems generated from a SMIRNOFF .offxml file and systems generated from AMBER prmtop/inpcrd files.

The key idea here is to use the utility compare_system_energies to compare the molecule parameterized by ForceField with a corresponding system constructed via an AMBER prmtop/inpcrd pair:

# Load molecule
from openmmtools.topology import Molecule
molecule = Molecule.from_file(mol_filename)

# Load force field
from openff.toolkit.typing.engines.smirnoff import ForceField
forcefield = ForceField(offxml_filename)

# Compare energies
from openff.toolkit.tests.utils import compare_molecule_energies
energies = compare_amber_smirnoff(prmtop_filename, inpcrd_filename, forcefield, molecule)