I would like to apply a constant force to water molecules in a certain region of my system. I see that the option “acc-grps” can apply a constant acceleration (which should be the same as a constant force since the masses are constant), but this is only applicable to static selections. Is there some other mdp option that might allow me to do this (apply a constant force to a geometric region), or should I be using a plugin like PLUMED? It seems like it should be relatively easy to implement, but I’ve seen in other posts that mdrun does not seem to handle dynamic selections.
No, there is currently no implementation of dynamic selections in the code. The reason for this is that dynamic selections will have to be re-evaluated every MD step which is complex when you use domain-decomposition and split your simulation system over multiple nodes and GPUs. There is an easy way to implement this, but there is no easy way to this without slowing down simulations a lot.
Nevertheless, the thought to implement something like this in a performant way and request for this functionality has been around for some time, and it’s good to be able to see when there’s interest for such a thing.