Bug #1984

gmx solvate (monoatomic solvents?)

Added by Pim Frederix over 4 years ago. Updated about 4 years ago.

analysis tools
Target version:
Affected version - extra info:
Also found in 4.0.x, 4.5.5 and 4.6.x and possibly others
Affected version:


After making a box using gmx insert-molecules, I want to use gmx solvate to add solvent molecules to my system.
In my case I'm using the Martini force field which means I want to add water molecules consisting of single beads. To get the correct density I have to use flag -radius 0.20. This results in a solvated box that has a strange density inhomogeneity: the box is more dense in a cube near the centre (see image).

Command:> gmx solvate -cp FFF300_box0.gro -cs water-125A_eq.gro -o FFF300_water0.gro -radius 0.2
(or genbox -cp FFF300_box0.gro -cs water-125A_eq.gro -o FFF300_water0.gro -vdwd 0.2 for versions 4.x)

Sometimes minimization and equilibration proceeds (with box size scaling warnings in the first steps as it expands rapidly), but this might be dangerous anyway as you have many more water molecules in your system than you should think you will.

The problem persists with different solutes and "sometimes" gets reduced by using a water box of identical size to the solute box. I noticed some hacks floating around on the www, where someone mentioned this may only be the case for monoatomic solvents (Martini water), but I also get errors using Martini polarisable water (3 atoms), and anyway it seems appropriate to get to the roots of this.
This issue already existed in Gromacs 4.x as well.

FFF300_box0.gro (158 KB) FFF300_box0.gro solute box Pim Frederix, 06/02/2016 02:30 PM
FFF300_water0.gro (894 KB) FFF300_water0.gro strange solvated system Pim Frederix, 06/02/2016 02:31 PM
water-125A_eq.gro (1.02 MB) water-125A_eq.gro martini water used to solvate Pim Frederix, 06/02/2016 02:32 PM
waterbox.tga (1.6 MB) waterbox.tga image of inhomegenous water distribution Pim Frederix, 06/02/2016 02:34 PM


#1 Updated by Teemu Murtola over 4 years ago

Please test with 5.1 or later, the logic in gmx solvate has changed quite a bit leading to that version and might work better.

#2 Updated by Pim Frederix over 4 years ago

Amazing, it works properly with 5.1.2.

Sorry, the problem has been bothering me in so many versions of Gromacs I didn't try it with the very latest version! Thanks, great work.

#3 Updated by Teemu Murtola over 4 years ago

  • Category set to analysis tools
  • Status changed from New to Closed
  • Assignee set to Teemu Murtola

Closed since the issue is fixed in 5.1.

I also remember struggling with the behavior of gmx solvate/genbox with Martini with some old version, so when I essentially rewrote the logic for 5.1, I tried to make it much less surprising. Now, if you provide a solvent box, the only solvent molecules that get removed are those that overlap with your solute, or overlap with a periodic image of the solvent box (in case the size is not an exact multiple). The code no longer removes stuff elsewhere in the box, no matter what the radii of the atoms are. And if you use -maxsol, the atoms are removed throughout the box (assuming they are randomly distributed in the initial configuration). This should give you the same bulk density as in the input box, or something very close to it.

#4 Updated by Mark Abraham about 4 years ago

  • Target version changed from 5.x to 5.1

Also available in: Atom PDF