Possible inclusion of PLUMED interface

Dear GROMACS developers,

we (PLUMED developers) noticed that GROMACS now makes it possible to easily add plugins modifying forces. We would like to investigate if it makes sense for us to implement an interface for PLUMED in the spirit of the one introduced for the Colvars package in this commit:

Before starting we would like to have an answer to the following questions:

  • Is it possible (or planned) to pass an intra-replica MPI communicator to the plugin so that PLUMED would be able to use its parallelization capabilities?
  • Is it possible (or planned) to pass an inter-replica MPI communicator to the plugin so that PLUMED would be able to perform inter-replica communication?
  • Is it possible (or planned) to call the plugin when computing acceptance probabilities for replica exchange, to enable inclusion of the plugin energy in the acceptance?

If answers to these questions are positive, we might be able to replicate almost all the features that are in the GROMACS patch that we are currently maintaining. One important exception would be the hrex implementation, which might need to be implemented natively in GROMACS, shipped separately or dismissed.

Finally, considering these points:

  • we would like to keep PLUMED I/O separate from GROMACS (e.g., we prefer the plumed.dat file to be read separately and not as additional options in the mdp file, and we want to continue to be able to write arbitrary files from PLUMED)
  • we would not include the full PLUMED code base in GROMACS, but only a thin loader, so that PLUMED can be loaded at runtime with dlopen (as currently done e.g. in AMBER).

Would a native integration of PLUMED in GROMACS done in this way be considerable for inclusion in the official GROMACS version (possibly for GROMACS 2025)?

The last question is important because we might avoid investing time in the process if we know a priori that the result would not satisfy the proper criteria for inclusion.

Giovanni (on behalf of PLUMED developers)

PS I hope this is the right place to post this message, otherwise please apologise and re-rout it where it is most appropriate

2 Likes

I just brought up the same point yesterday at our internal meeting!

The developer forum would be a slightly better location for this discussion, but if we decide to do this, we should anyhow move to an issue on gitlab.

I think it would be a benefit to our users, as well as us developers to have an API interface between GROMACS and PLUMED.

There is access to the intra-replica communicators. This is currently through legacy data. We might want to modernize this.
There is no access yet to the intra-replica communicator, AFIAK. But this should be made available.
There is no API yet for replica exchangre. But we would like the GROMACS internal replica exchange to go through an API, which could then also be used by external modules.

I don’t know what flavors of HREx you are referring to. I would very much like to have native REST2 support in GROMACS, combinable with enhanced sampling, but we currently don’t have resources to work on that.

I don’t think have an module external is an issue. We would only need to have a mdp parameter to toggle PLUMED off or on.

Thanks for contacting us!

I created two issues on Gitlab. Lets continue the discussion there.