You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NVT context created during minimization leads to GPU memory issues in the ABFE protocol. #817
# TODO the NVT Context created above for barostat-free minimization is left in
# energy_context_cache indefinitely (capacity=None means it's never evicted) even
# though nothing else reuses it after this point. Consider explicitly removing it
# from the cache here.
) we're not removing the NVT context after minimization:
This leads to GPU memory issues as reported here: OpenFreeEnergy/openfe#2222. This was seen in the ABFE protocol where we have many lambda windows, so this would create many context caches.
Instead of removing the caches, I was wondering whether it would make sense to instead preserve the original thermodynamic-state type during minimization, and setting the pressure/barostat to None (as we originally did here https://github.com/choderalab/openmmtools/pull/773/changes). To make that work for the MonteCarloMembraneBarostat, we could then change the pressure setter to always set the surface tension to None when the pressure is set to None, since the membrane surface tension cannot exist without a barostat. I was not thinking about this when I implemented the temporary removal of the barostat here. I'm working on drafting a PR for this to look at for more discussion on how we would want to fix this!
As @jthorton pointed out, the LocalEnergyMinimizer is not a CustomIntegrator and does not take any steps, so we shouldn't need to remove the barostat. I tried this out here #818 and added to the test to check for the box vectors, and with the LocalEnergyMinimizer, the box vectors don't change, even when the barostat is present. This test failed when using the FireMinimizer.
Activity
hannahbaumann commentedon Oct 9, 2026
As @jthorton pointed out, the LocalEnergyMinimizer is not a CustomIntegrator and does not take any steps, so we shouldn't need to remove the barostat. I tried this out here #818 and added to the test to check for the box vectors, and with the LocalEnergyMinimizer, the box vectors don't change, even when the barostat is present. This test failed when using the FireMinimizer.