question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with coordinates after equilibration

See original GitHub issue

Description I have recently ported over my workflow to use openff.toolkit instead of the old openforcefield module. This is meant to take in a small molecule mol2 file and a receptor pdb file, parameterize them, minimize, equilibrate, and export to Gromacs (gro/top).

The old version (openforcefield) still works just fine, but the new version (openff-toolkit) produces bad coordinate files after equilibration. Both directories can be found in the attached tarball: openff-issue.tar.gz

The resulting topology files look very similar, with seemingly minor changes to the ligand parameters, but the structure file (conf.gro) for the openff-toolkit script seems to explode after equilibration! Note that the ligand name “<0>” is NOT an issue and is present in both cases.

    1<0>     C1    1518214.8142654.199576.66
    1<0>     C2    2-374233.817505.7462426.0
    1<0>     C3    3545191.3-497387.72653.99
    1<0>     C4    4383505.2-211521.144098.6
    1<0>     C5    5-149680.-202533.374189.9
    1<0>     C6    6-577753.-201560.-223641.
    1<0>     C7    7290914.0-12141.3-333546.
    1<0>     C8    8-177329.563956.8-276489.
    1<0>     C9    9294280.5670759.4-407819.

Steps To Reproduce All files needed to re-produce including the requirements.txt for re-creating the exact conda environments used in both cases are included in their respective directories. Only necessary files for running each one are the ligand mol2 file and receptor pdb file, at which point the output files can be generated by running example.py.

Output No error message is shown. The issue is found in the output files after equilibration as noted above.

Computing environment (please complete the following information):

  • Operating system: Both examples were run on Ubuntu 20
  • Output of running conda list: Environments are found in the requirements.txt files in the attached directories.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
yabmtmcommented, Jul 15, 2021

Nice catch, @j-wags! I actually thought all my scripts used 4amu/4fs, but you’re right. Using hydrogenMass=3amu on the openff-toolkit script produces normal output… But so does using 4amu on the older openforcefield script…

I didn’t realize that hydrogen masses are subtracted from their bonded heavy atom. Is that generally true across MD engines, e.g. Gromacs?

As long as the forces and integration are stable with 3amu/4fs I see no problem using that for our simulations, but it would still nice to be able to use the more widely accepted mass partitioning scheme of hydrogenMass=4 with a 4fs time-step.

1reaction
j-wagscommented, Jul 15, 2021

Thanks for the awesome reproducing example, @yabmtm. I was able to reproduce this on my computer. It looks like the problem is that the old script sets a hydrogen mass of 3 amu, while the new one sets a hydrogen mass of 4 amu. Since the hydrogen mass is subtracted from its bonded heavy atom, it looked like the crashes were being caused by a methyl carbon having too much mass subtracted by its three hydrogens, leading to unstable dynamics. I’m able to run the equilibration using the openff-toolkit-produced system with a hydrogen mass of 3 amu instead of 4.

I don’t know what best practices for hydrogen mass repartitioning are, but a 3 amu carbon simulated with a 4 fs timestep seems dangerous. I’m seeing this hydrogenMass=4 used in other repos, though, so maybe this is standard. It’s also possible that the minimization for this system left a bit of a clash behind that exacerbated the problem, and that a more thorough minimization or gentler heating would resolve this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

6.6: Reaction Coordinate Diagrams
This should make intuitive sense: when there is more heat energy in the system, more of the reactant molecules are able to get...
Read more >
The relationship between flux coordinates and equilibrium ...
A key issue for magnetized plasmas is resolving the anisotropy of the magnetic ... Flux coordinate systems make use of the two properties...
Read more >
Theory of Elasticity-Lecture 29-Equilibrium in Polar Coordinates
Your browser can't play this video. Learn more. Switch camera.
Read more >
Find equilibrium points when given polar coordinates
I know that when a system is given in cartesian coordinates then we convert to polar coordinates. And to find equilibria, we just...
Read more >
energy increase during equilibration
Only the coordinates of the cofactor are changed to any significant extent in the new crystal structure, and there are two extra Cl-...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found