What do I do when I don't see density in my gromacs energy selection?

GROMACS version: 2023.2
GROMACS modification: No

I tried to proceed with NPT as usual in protein MD simulation in water and get the density for the whole system.

However, I don’t see any “density” items in my “gmx energy” selection.

The same symptoms appear when I transfer a project file to my desktop because I suspect an abnormality in the installed equipment.

I can be sure that I did not confuse NVT result file with NPT result file.

How can I solve this problem?

I attach the output of the terminal and the contents of the mdp file used for the NPT.


$ gmx energy -f npt.edr -o density-after-npt.xvg
:-) GROMACS - gmx energy, 2023.2 (-:

Executable: /usr/local/gromacs/bin/gmx
Data prefix: /usr/local/gromacs
Working dir: /home/user1/gmx-workdata/TEAD-YAP-80mM
Command line:
gmx energy -f npt.edr -o density-after-npt.xvg

Opened npt.edr as single precision energy file

Select the terms you want from the following list by
selecting either (part of) the name or the number or a combination.
End your selection with an empty line or a zero.

1 Bond 2 U-B 3 Proper-Dih. 4 Improper-Dih.
5 CMAP-Dih. 6 LJ-14 7 Coulomb-14 8 LJ-(SR)
9 Disper.-corr. 10 Coulomb-(SR) 11 Coul.-recip. 12 Position-Rest.
13 Potential 14 Kinetic-En. 15 Total-Energy 16 Conserved-En.
17 Temperature 18 Pres.-DC 19 Pressure 20 Constr.-rmsd
21 Vir-XX 22 Vir-XY 23 Vir-XZ 24 Vir-YX
25 Vir-YY 26 Vir-YZ 27 Vir-ZX 28 Vir-ZY
29 Vir-ZZ 30 Pres-XX 31 Pres-XY 32 Pres-XZ
33 Pres-YX 34 Pres-YY 35 Pres-YZ 36 Pres-ZX
37 Pres-ZY 38 Pres-ZZ 39 #Surf*SurfTen 40 T-Protein
41 T-non-Protein 42 Lamb-Protein
43 Lamb-non-Protein


title = OPLS Lysozyme NPT equilibration
define = -DPOSRES ; position restrain the protein
; Run parameters
integrator = md ; leap-frog integrator
nsteps = 2500000 ; 2 * 2500000 = 5000 ps = 5 ns
dt = 0.002 ; 2 fs
; Output control
nstxout = 500 ; save coordinates every 1.0 ps
nstvout = 500 ; save velocities every 1.0 ps
nstenergy = 500 ; save energies every 1.0 ps
nstlog = 500 ; update log file every 1.0 ps
; Bond parameters
continuation = yes ; Restarting after NVT
constraint_algorithm = lincs ; holonomic constraints
constraints = h-bonds ; bonds involving H are constrained
lincs_iter = 1 ; accuracy of LINCS
lincs_order = 4 ; also related to accuracy
; Nonbonded settings
cutoff-scheme = Verlet ; Buffered neighbor searching
ns_type = grid ; search neighboring grid cells
nstlist = 10 ; 20 fs, largely irrelevant with Verlet scheme
rcoulomb = 1.0 ; short-range electrostatic cutoff (in nm)
rvdw = 1.0 ; short-range van der Waals cutoff (in nm)
DispCorr = EnerPres ; account for cut-off vdW scheme
; Electrostatics
coulombtype = PME ; Particle Mesh Ewald for long-range electrostatics
pme_order = 4 ; cubic interpolation
fourierspacing = 0.16 ; grid spacing for FFT
; Temperature coupling is on
tcoupl = V-rescale ; modified Berendsen thermostat
tc-grps = Protein Non-Protein ; two coupling groups - more accurate
tau_t = 0.1 0.1 ; time constant, in ps
ref_t = 310.15 310.15 ; reference temperature, one for each group, in K = 310.15k = 37C
; Pressure coupling is on
pcoupl = Parrinello-Rahman ; Pressure coupling on in NPT
pcoupltype = isotropic ; uniform scaling of box vectors
tau_p = 2.0 ; time constant, in ps
ref_p = 1.0 ; reference pressure, in bar = 1bar
compressibility = 4.5e-5 ; isothermal compressibility of water, bar^-1
refcoord_scaling = com
; Periodic boundary conditions
pbc = xyz ; 3-D PBC
; Velocity generation
gen_vel = no ; Velocity generation is off

Hi, you can use gmx density or gmx densmap.

This question is double posted. This must be an NVT simulation.

gmx density or densmap does not get you the scalar density of the system.
I thought we printed the mass of the system in the log file, at the COM motion removal initialization, but this is no longer the case. It would be useful to print the mass somewhere again.