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

**URL:** <https://gromacs.bioexcel.eu/t/what-do-i-do-when-i-dont-see-density-in-my-gromacs-energy-selection/8282>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [February 8, 2024, 5:08am UTC](https://gromacs.bioexcel.eu/t/what-do-i-do-when-i-dont-see-density-in-my-gromacs-energy-selection/8282 "2024-02-08T05:08:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlwlrma](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@dlwlrma](https://gromacs.bioexcel.eu/u/dlwlrma)\
**Post date:** [February 8, 2024, 5:08am UTC](https://gromacs.bioexcel.eu/t/what-do-i-do-when-i-dont-see-density-in-my-gromacs-energy-selection/8282/1 "2024-02-08T05:08:08Z")

</div>

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.

```auto
---
 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                  

```

```auto

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 

```

---

<div class="post-metadata">

**Author:** ![throughalfanoir](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@throughalfanoir](https://gromacs.bioexcel.eu/u/throughalfanoir)\
**Post date:** [February 8, 2024, 11:55am UTC](https://gromacs.bioexcel.eu/t/what-do-i-do-when-i-dont-see-density-in-my-gromacs-energy-selection/8282/2 "2024-02-08T11:55:21Z")

</div>

What happens if you try to run gmx density on your system?

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [February 8, 2024, 12:03pm UTC](https://gromacs.bioexcel.eu/t/what-do-i-do-when-i-dont-see-density-in-my-gromacs-energy-selection/8282/3 "2024-02-08T12:03:40Z")

</div>

You must have mixed up your energy file with one from a non-NPT simultion. With NPT you always get the volume and density and without pressure coupling you don’t.
