Skip to content

Inconsistency between OpenMM simulation run with interchange AMBER and serialized OpenMM system files #2136

@spencercguo

Description

@spencercguo

I am trying to use the OpenFF interchange to create AMBER input files. I am running
something like

topology = solvate_system("1CSA.pdb", ...)
ff = ForceField("modified_forcefield.offxml")
interchange = Interchange.from_smirnoff(force_field=ff, topology=topology)
# save Amber topology and coordinates
interchange.to_prmtop("1CSA.prmtop)
interchange.to_inpcrd("1CSA.inpcrd")
system = interchange.to_openmm_system()
  with open("1CSA.xml', 'w') as output:
      output.write(openmm.XmlSerializer.serialize(system))

and then creating an OpenMM simulation with either

prmtop = AmberPrmtopFile(args.top_file)
inpcrd = AmberInpcrdFile(args.crd_file)
system = prmtop.createSystem(
    nonbondedMethod=PME,
    nonbondedCutoff=1.0 * nanometer,
    constraints=HBonds,)

or

 with open("1CSA.xml", "r") as f:
    system = XmlSerializer.deserialize(f.read())

Then if I create an OpenMM simulation and minimize, I get very different energies (28058442.497487746 kJ/mol
vs -101695.70501193276 kJ/mol). The AMBER system has much higher energy and crashes immediately if I continue the simulation but the deserialized OpenMM simulation works fine.

integrator = LangevinMiddleIntegrator(
    300 * kelvin,
    1 / picosecond,
    2* femtosecond,
)
simulation = Simulation(prmtop.topology, system, integrator)
simulation.context.setPositions(inpcrd.positions)

simulation.minimizeEnergy()

I've attached the original PDB file I used to solvate the system (essentially following this), as well as the resulting prmtop, inpcrd, and openMM XML files. I've also included the forcefield file (a modified version of the OpenFF 2.0) and my conda environment (env.txt).

Archive.zip

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions