Help with freeze groups in Gromacs: holding a surface fixed in space

Hi,

So-called “freeze groups” can be useful for holding a surface fixed in space (e.g., a solvent interacting with a graphene surface). I have two graphene electrodes in the prototypical parallel plate configuration. Each electrode consists of explicit carbon atoms. I’ve chosen to use the residue names GR1 and GR2, respectively, for the two electrodes in my topology. I have the following entries in my .mdp file:

freezegrps = GR1 GR2
freezedim = Y Y Y Y Y Y

… and I think that these entries are in accordance with the .mdp options specified in the manual ( https://manual.gromacs.org/documentation/current/user-guide/mdp-options.html#non-equilibrium-md ).

In a previous version of Gromacs (4.5.5, which is quite old now), Gromacs seemed to recognize freezegrps = GR1 GR2 as containing the residue names GR1 and GR2. Gromacs froze the positions of those residues in MD runs, even though I didn’t supply an index file to grompp. I think that was an undocumented feature in Gromacs 4.5.5, because the manual seems to suggest that one needs to EITHER (i) supply an index file to grompp, via -n, with entries [ GR1 ] and [ GR2 ]; OR (ii) have [ moleculetype ] entries in the topology with (molecule) names GR1 and GR2. But Gromacs 4.5.5 freezes the residues GR1 and GR2 without doing either (i) or (ii). So it’s a neat undocumented feature in Gromacs 4.5.5.

Now, however, the research group in which I’m working is using a somewhat newer version of Gromacs, 2018.1. In this version, Gromacs apparently still recognizes freezegrps = GR1 GR2 as containing residue names GR1 and GR2, because grompp does not throw any error messages. However, when I run the simulation, residues GR1 and GR2 are not frozen in space. That behavior made me think that the undocumented feature of residue names being recognized in the freezegrps option is not present in 2018.1, even though no error message was thrown.

So, I reran both grompp and mdrun, this time supplying an index file to grompp, via -n, with entries [ GR1 ] and [ GR2 ] specifying the indices of the atoms in residues GR1 and GR2. But when I ran the simulation, those atoms were not frozen in space. This made me think that I’m not specifying the freeze groups correctly… Unfortunately, having molecule types with names GR1 and GR2 is not really an option for me, because my graphene electrodes (i.e., molecules) contain surface functionalities that I do NOT want to be frozen. So, as far as I can see, I’m stuck with specifying freeze groups by supplying an index file to grompp… that’s fine, but how do I do it correctly?

In case Gromacs 2018.1 is somehow getting confused because my freeze groups have the same names as residues, I tried giving my freeze groups “dummy” names like Apples and Oranges: freezegrps = Apples Oranges in the mdp file and entries [ Apples ] and [ Oranges ] in the index file. But, again, the atoms with indices specified by [ Apples ] and [ Oranges ] do not remain fixed in space, and neither grompp nor mdrun throws any error messages. The drift of these atoms is significant, on the order of 0.02 nm per ps.

Does anyone have any ideas as to why the atoms in the freeze groups, supplied with an index file to grompp via -n, are not being frozen in space? What other tests can I run to help diagnose the problem? Or does anyone know if this is a bug that was fixed in a later version of Gromacs? I’m not sure if there’s a straightforward way to search the release notes.

One may justifiably ask why we don’t simply use Gromacs 4.5.5 (in which Gromacs correctly freezes the desired atoms) or the latest version of Gromacs. Unfortunately, the nodes that our group needs to use only have 2018.1 on them, and it would require approval from leadership to either downgrade to 4.5.5 or upgrade to the latest version.

Thank you very much in advance for any help or insight you can provide. Thank you for your time!

Andrew

Andrew DeYoung, PhD
Department of Chemistry
Carnegie Mellon University

Hi,

It’s possible that your issues are related to bugs in the freeze code that were fixed in 2018.2. In which case you will have to convince your leadership to update (which will fix more bugs, and if you’re upgrading all the way to 2022.3 get you more performance).

https://manual.gromacs.org/2018.2/release-notes/2018/2018.2.html

Do you also need permission to compile a local build to use for yourselves? That could otherwise be a solution.

Regards,
Petter