How to calculate total NVT density?

GROMACS version: 2016.4

Hi all,

I’ve performed a series of NVT simulations of polymers and want to check whether or not I see an appreciable change in density between them (each simulation has a slightly different chain length). I need to find the total density of each simulation which I can’t do with gmx energy as NPT is required. I’ve also tried gmx density but it only calculates partial densities as a function of distance and not time. Is there any way GROMACS can do what I need?

Thanks.

Both the mass and volume of the simulation system are constant in NVT, so the density is a fixed value that you can compute simply by taking the total mass of your system and dividing by the volume.

I am wondering as well but how about the case of a system w/ vacuum slab and the dimension of the box needs to be fixed? How do we get the density of the group of molecules?

I am an thinking of integrating the area under the curve of gmx density but I am not sure if its an accepted method in gromacs/molecular dynamics or is there a way?