Constant-acceleration MD (anti-bug)

GROMACS version: 2019 and 2021
GROMACS modification: No
I am using acceleration groups in GROMACS extensively. (keywords: “acc-grps”, “accelerate”)

I was slightly surprised to read that “constant-acceleration MD” would be removed in GROMACS 2021 and that it has been broken for a long time, as my results seemed to make sense. Perhaps this is not exactly the same functionality as I have been using?

At any rate, I ran some trial runs where I had a water box with 1 Na+ and 1 Cl- ion, and I’d apply four forces in total:
1, 2) equal and opposite constant forces using the acceleration groups
3, 4) a restoring variable force with a spring on each ion (pull code)
As expected, the forces in 3, 4 match the ones in 1, 2 up to some small noise. So at least in my hands, the acceleration groups behaved as expected.

I would also like to add that I think the acceleration groups are a very useful feature, for example for adding a directional hydrostatic pressure. The pull code can only partially reproduce it, as if the acceleration group is sufficiently large, the definition of the COM will be error-prone.

As mentioned before though, maybe “Constant-acceleration MD” refers to another feature that I did not know about? In fact, I also ran my test with GROMACS 2021 and it worked as well, so maybe this is a misunderstanding on my part after all.

Thanks in advance!

It is not removed in GROMACS 2021, only deprecated, so it might be removed in a future version. But there is discussion on this, because as you say its functionality is not fully covered by the pull code.

A bug has been found, but now I can’t actually find it in the issues in gitlab. @pbauer is there an issue for this?

But others have reported that there setups work fine.

There is Constant acceleration NEMD is broken. - Redmine #1354 (#1354) · Issues · GROMACS / GROMACS · GitLab that was our reason to remove the code in master with

If this is actually working we need examples and test cases an figure out why this seems to work when we can be quite sure that it is broken :)

Hi Paul,

I sent you my test cases in an email on 18/2. Should I send some more information beyond that?

Thanks for the replies!


I got the files, thank you!

For people that are interested in this, I updated the issue in GitLab with more information about what the code does with the accelerated MD option being enabled.

Short story, the velocity of the group is simply being scaled by whatever is in the mdp file under the accelerate section for the group. If this is working as designed is a separate question.