New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parlsey 1.2.0 fails on HMR simulations with propyne-containing molecules #19
Comments
Do we know if this happens in both OpenMM and gromacs, or just OpenMM? Also, which integrator was used? |
OpenMM presumably. Unsure about integrator. @cbayly13 indicated that the error happens reliably and quickly, but is unable to share code since it's internal. I'm working on a reproducing case and will upload that once I have it. |
@jchodera Do you have a code snippet using OpenMM+HMR? DIgging through docs now but having an example would save me some time. |
Sure! # Create an openforcefield Molecule object from SMILES
from openforcefield.topology import Molecule
molecule = Molecule.from_smiles('c1ccccc1C#CC')
# Define the keyword arguments to feed to ForceField; use heavy hydrogens and constrained X-H bonds
# (Note that this differs a bit from allowing SMIRNOFF to control masses and cosntraints)
from simtk import openmm, unit
from simtk.openmm import app
forcefield_kwargs = { 'constraints' : app.HBonds, 'rigidWater' : True, 'removeCMMotion' : False, 'hydrogenMass' : 4*unit.amu }
# Initialize a SystemGenerator using GAFF
from openmmforcefields.generators import SystemGenerator
system_generator = SystemGenerator(small_molecule_forcefield='openff-1.2.0', forcefield_kwargs=forcefield_kwargs, molecules=molecule)
# Create an OpenMM System from an Open Force Field toolkit Topology object
system = system_generator.create_system(molecule.to_topology().to_openmm())
# Run a simulation
temperature = 300 * unit.kelvin
collision_rate = 1.0 / unit.picoseconds
timestep = 4.0 * unit.femtoseconds
# Use BAOAB
integrator = openmm.LangevinMiddleIntegrator(temperature, collision_rate, timestep)
context = openmm.Context(system, integrator)
molecule.generate_conformers()
context.setPositions(molecule.conformers[0])
# Integrate
niterations = 1000
nsteps_per_iteration = 250
for iteration in range(niterations):
integrator.step(nsteps_per_iteration)
state = context.getState(getEnergy=True)
print(f'{state.getTime()/unit.picoseconds:12.3f} ps : potential {state.getPotentialEnergy()/unit.kilocalories_per_mole:16.3f} kcal/mol') output with
with
|
That said, I'm not certain this isn't an OpenMM specific numerical instability with angles near |
Thanks @jchodera! Here's the code to make both normal and unconstrained Making the new FF files
Reproducing the error for 1.2.0, and showing it doesn't affect 1.0.0, 1.1.0, and 1.2.1
|
We are deviating from the meeting notes above: They say to rename the modified parameters to We will leave a manual comment in the OFFXML files explaining the change. |
Ah, testing this with the UNCONSTRAINED candidate FF still shows the explosion. Is this acceptable, or should we look at other solutions?
|
Verified with @davidlmobley -- This is expected, and only the constrained version of the new FF should be used with HMR.
|
Progress
openff-1.2.0
, but notopenff-1.0.0
oropenff-1.1.0
openff-1.2.1
candidate (both constrained and unconstrained), with changes described belowProblem Description
On Aug 11, 2020:
(gif from Gaetano Calabro)
Proposed resolution
Per decision in FF-release meeting on September 3, 2020
The text was updated successfully, but these errors were encountered: