-
Notifications
You must be signed in to change notification settings - Fork 11
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
somd-freenrg crashes when ligand atoms are completely non-interacting #100
Comments
hi @fjclark - do you also observe crashes with MIF inputs from the MDR paper repo (that presumably did not cause runtime errors with earlier versions of sire used for the MDR paper) ? |
Can confirm that I see the same segmentation fault at lambda = 1. Will see if I can trace it. |
Just to note that I don't see a mapping from dummy ambertype to dummy ambertype in your example pert files, but this doesn't seem to be the source of the problem:
|
Hi @jmichel80 I'll check now (yes I did not observe these crashes previously). |
For lambda = 1, I can confirm that the segfault occurs on this line of |
Sorry, I should have explained - this is because the standard version of sire doesn't allow atoms to start and end as dummy atoms, so I've had to modify the pert file. For my modified version of sire, this is allowed (4513564) and the pert file is as shown in my original post. |
Also, the pert files are missing an
|
Ah, I see, there is no space in
After fixing this, the lambda = 1 window runs. Not sure if will NaN at a later date, though. |
Sorry about this - it looks like I've messed up editing a few of the pert files so that initial LJ terms remain for O. The pert file does seem to be correct for lambda = 0 though, where the Nans occur. |
No problem. I'll look at that one to see if I can get it to fail. |
No crashes yet, but I can confirm that I see the ligand "jump" after 50 frames. It almost looks like everything is slightly rotated within the box. It's visible for the protein and ions too, but harder to tell when waters are included. Not sure if this is some buffering error, i.e. there is a larger jump in time between frames 49-50, 99-100, ..., than any other pair of frames, or whether something else is going on. |
It seems like this is due to the use of OFF vs GAFF. When I reparameterise the ligand with GAFF2, keeping the initial coordinates identical, I haven't yet observed any crashes. I think the original ligand FF is OFF2 (set up by a collaborator - I have asked for confirmation). Tests run:
The input systems are here. This is another example of the issue discussed here, where Thanks. |
Is this still an open issue? I'm doing some spring cleaning ;-) |
I'm afraid this is still an open issue - using GAFF instead of any OFF seems to improve things substantially, but with more tests I still get the occasional crash with a fully decoupled ligand. I would also prefer to use OFF2 with |
Would it be worth trying this in somd2? If you don't see the crash then we can debug where in somd things are going wrong. And if you still see the crash then this is definitely something we need to fix in somd2 :-) |
Yes, definitely. As discussed, I'll have a shot in the next few weeks. |
I've tried some similar tests with SOMD2: Overall Set-Up
Software BioSimSpace: 2024.1.0.dev TestsGAFF2Sanity check with many windows Carried out once to check that we got a free energy change of roughly the expected size:
"Standard" Settings 10 repeats with two windows each:
OFF2"Standard" Settings 10 repeats with two windows each, same config as for GAFF2.
With timestep of 0.5 fs Config the same as "standard", but with a 0.5 fs timestep.
With timestep of 0.5 fs and perturbable_constraint=none Config the same as "standard", but with a 0.5 fs timestep and constraints removed via "perturbable_constraint=none".
Overall Points
ConclusionConstraints on heavy bonds cause the OFF2 system to blow up at all values of lambda, but can be used on the GAFF2 system. Without constraints on heavy bonds, both systems seem stable when the ligand is fully interacting, but show crashes when the ligand is fully decoupled (and unrestrained). |
Could you try with Also, it might be worth checking what constraints are applied for the different force fields, and whether things are better if you use the |
hi @fjclark - you could try using a Nose Hoover integrator and add a sub-thermostat to control the temperature of the solute separately from the rest of the system, see http://docs.openmm.org/development/api-python/generated/openmm.openmm.NoseHooverIntegrator.html see also openmm/openmm#2910 |
Thanks for the suggestions. h_bonds constraints
OFF2 h_bonds_not_heavy_perturbed Same as "standard" protocol other than
GAFF2 h_bonds_not_perturbed
OFF2 with SOMD1 Compatibility Mode
OFF2 with SOMD1 Compatibility Mode and h_bonds_not_perturbed
Constraints AppliedThere are 33 bonds in the ligand: 11 to H and 22 with only heavy atoms: OFF2/GAFF2 with So as with SOMD1, constraints between heavy atoms are unusable with OFF2 but don't seem to make the GAFF2 simulations any less stable. |
I'm going to bump this to 2024.2.0 as we've made a lot of progress, but more is needed before we put in all the fixes for 2024.1.0 |
I am bumping this to 2024.3.0. Could you check if the latest fixes in 2024.2.0.dev have fixed the instabilities. They have fixed instabilities in other systems. |
I retested the OFF2 simulations above (10 repeats, "standard" settings) with sire 2024.2.0.dev, but unfortunately all 10 simulations fail with NaN, as before. |
Just to check. Are you still using the |
Thanks - I wasn't. However, they all still crash when I turn on
|
No problem. Thanks for confirming. |
Describe the bug
I've recently been trying to implement multiple distance restraints for absolute binding free energy calculations in BioSimSpace and SOMD (modified BSS, modified sire, and an example of how to run a complete calculation). The idea is that the ligand intermolecular interactions are removed with many distance restraints active, then there's a final stage where all but one of the restraints are released. The correction for releasing the ligand to the standard state volume can then easily be calculated.
During the final release stage, where the ligand is completely non-interacting I've been getting crashes. The config file I was using with my modified version of sire was:
And the pert file just mapped dummy atoms to dummy atoms, e.g.:
I still observed crashes at random values of lambda if I dropped the timestep to 1 fs and if I switched to Langevin dynamics.
To check if this was due to changes I had made to sire or the restraints, I ran some sets of calculations with Sire 2023.4.0 (a073701/GitHub/2023-08-07T17:45:41+01:00 | UNCLEAN) but with ligand still non-interacting and with no restraints. Please see the input files. For each test I ran four repeats of each window. I got two crashes at lambda = 0 (Nan) and all simulations at lambda =1 resulted in
Segmentation fault (core dumped) somd-freenrg -C somd.cfg -p CUDA -m somd.pert -c somd.rst7 -t somd.prm7
.Have I chosen some configuration parameters poorly, or should this not be happening?
Also, when I watch the trajectories back, the ligand makes large jumps after every 50th frame. There are 600 frames, and 600 / 50 =12 and ncycles / ncycles_per_snap = 12.5, so I assume this is an artifact of how the trajectories are written?
To Reproduce
Please see the input files. Run run.sh. with sire 2023.4.0. (I observed two crashes in four repeats of the stage).
Expected behavior
Stable MD.
(please complete the following information):
Thank you.
The text was updated successfully, but these errors were encountered: