smog-server / OpenSMOG

OpenSMOG is a Python library for performing molecular dynamics simulations using Structure-Based Models. OpenSMOG uses OpenMM.
MIT License
11 stars 6 forks source link

shorter cutoffs in opensmog #49

Closed Whitford closed 2 years ago

Whitford commented 2 years ago

one question that we really need to answer is: how short can the cutoff be in openMM? In gromacs, the cutoff was set at a rather large value, so that the domain-decomposed cell size is larger than the desired contact cutoff. But, the cutoff value also applied to vdw terms. In opeMM, since there is no domain decomposition, the same logic does not apply. Instead, all bonded terms are evaluated, always, regardless of the cutoff. So, with openMM, we can reduce the length of the cutoff values. I just realized that the opensmog-check code was already verifying that a shorter cutoff can apply. In the test, I use a cutoff of 1.2 for all models (aa and ca). And, the forces are identical to those obtained with gromacs (no domain decomposition). So, this means we should be able to use 1.2 as the cutoff. So, I can the script again, using 1.1. Again, all tests are passed, even CA. At 1.05, the CA tests start to fail for some frames. The AA model continues to pass all tests, all the way to a cutoff of 0.65. Based on this, I think we can probably recommend a cutoff of 1.1 for CA and 0.65 for AA (default models). I am creating this as an issue, so that we have a record of where things are at, as well as for discussion. Next, I will expand the tests, so they will be more broad and systematic. To me, these cutoffs are reasonable, since the CA non-contacts have a lengthscale of 4Å and aa is 2.1Å. Accordingly, the non-contact potentials have values of around 10^-6 at the cutoff.

Now, the questions: 1) How does the performance depend on the cutoff in opensmog? Is the dependence similar for all models? 2) How do thermodynamics depend on the cutoff? It is possible that the answers are probably ok, down to lower cutoffs.

Whitford commented 2 years ago

Ok, a quick test gave the following results for the ribosome (150k atoms). Both tests on 1 MI50 GPU, using HIP.

cutoff 1.2: 40M steps/day cutoff 0.65: 48M steps/day

20% improvement is a HUGE deal, if this is true, generally. It's like taking 1 year off of a PhD!

Whitford commented 2 years ago

At a minimum, we need to change the comment about recommended values. Rather than checking a specific value, we should check a range. We can also say that the longer cutoff was required in gromacs, but our testing has found it is ok to use shorter values with openSMOG

Whitford commented 2 years ago

the message has been changed to reflect 0.65 and 1.1