Radial density

GROMACS version: 2020.1
GROMACS modification: No
Hi all,

I have a water system where the molecules are flat-bottom restrained to make a partition. Those whose oxygen atom is at r < 1 nm from the system’s COM are restrained inside the sphere of that radius, and for those at r > 1 nm the restraints are inverted so they do not mix with the firsts. The visualization of the trajectory shows that the restraints are effective and the waters do not mix. However, when I plot the radial density with gmx density (gmx density -s system.tpr -f system.xtc -o density_mass.xvg -dens mass -ng 3 -n index.ndx -center -symm, either mass or number), there are density values at r < 1 (see attached graph, blue curve). I was expecting a gap at -1 < r < 1 nm. Is this an error/bug of the command?

Best.

Hi,
gmx density computes partial densities across the box (see http://manual.gromacs.org/current/onlinehelp/gmx-density.html?highlight=gmx%20density), not the radial density. Your graph looks fine to me.
Best regards
Alessandra

Hi,
Thank you for your reply.

In the command I used the -center and -symm options to analyze the density across the box but centered in the system’s COM (x = 0, that’s why I called radial). The red and blue curves belongs to different water groups. Those corresponding to the blue curve, never reach the region -1 < r < 1, so I don’t understand why I get values for the blue curve in that region.

Best regards

The density you are seeing is from the region of water outside of the sphere but inside the box. The tool does not give you a radial density; it will just slice along the box in the specified dimension.