choderalab / openmmtools

A batteries-included toolkit for the GPU-accelerated OpenMM molecular simulation engine.
http://openmmtools.readthedocs.io
MIT License
253 stars 81 forks source link

Potential Data Inconsistency in MultiStateSampler:equilibrate #759

Open manglav opened 3 weeks ago

manglav commented 3 weeks ago

https://github.com/choderalab/openmmtools/blob/9334bc9cf7d31be62926a3867503d6c65e0a305a/openmmtools/multistate/multistatesampler.py#L704C18-L704C47

At the bottom of the function, the sampler states are saved to the checkpoint. However, even though the replica thermodynamic states are updated during equilibration, they are not saved into the checkpoint.

I would imagine we would want to keep the file consistent with the simulation, but I could be missing something. Is this expected/desired behavior?

I ask because I am running in unreliable environments, and am seeing lots of NaNs whenever a long-running simulation needs to restart.

mikemhenry commented 1 week ago

This is a good question. @ijpulidos Do you know if there is a reason we do it this way? I am trying to think of a scenario where this behavior would be desirable.