[gmx-users] about the output of g_density

ibrahim khalil ibrahim.khalil.chem at gmail.com
Wed Jan 6 14:26:56 CET 2016


Dear GROMACS users,

I am simulating a graphene sheet in gromacs. I was trying to use the
g_density function to determine the density of distribution of carbon atoms
along the z axis.
I used the following line-

g_density -f traj.xtc -o density.xvg -n index.ndx -d Z

The sheet is placed in the XY plane, so g_density gives me a peak at a
certain z co-ordinate (which is okay).

But i have a problem with the value of the density. My box size is 100 nm x
100 nm x 100 nm and there is 16502 carbon atoms. As all the carbon atoms
are placed in a certain Z value-

my density should be equal to *(16502 x 1.99e-26 x e27)/ (100 x 100 x 100) *=
0.328 kg/m^3

(Assuming, mass of carbon atom = 1.99e-26 kg)

But g_density is giving me a value of 16.454.

I notice if i multiply 0.328 by 50 I get just about 16.454 and there are 50
points in the density.xvg file. Does it mean I have to divdie the result by
50 to get the correct result?

Am I making any mistake here?

Thanks in advance.


More information about the gromacs.org_gmx-users mailing list