[gmx-users] Calculating number density using g_density

Mark Abraham Mark.Abraham at anu.edu.au
Tue May 29 07:39:06 CEST 2012


On 27/05/2012 2:00 AM, Andrew DeYoung wrote:
> Hi,
>
> It is possible to compute the number density using g_density, with the
> switch "-dens number".  Do you know if this is the number density of
> molecules?  Or is it the number density of atoms?

I'd expect atoms, but you should be able to test for this easily.

> Ideally, I would like to compute the number density of _molecules_.
> Specifically, I would like to use the center of mass of each molecule to
> represent that molecule's position.  Then the center of mass of each
> molecule should be used to calculate the number density of molecules.  Do
> you know if this is possible using any of the Gromacs utilities?

Not natively. g_traj -com can compute centers of mass of groups, which 
you could assemble into a pseudo-trajectory using a script you wrote 
yourself. g_density -dens number should then work on molecules as you 
intend.

Mark



More information about the gromacs.org_gmx-users mailing list