Zero for all temperatures in log file

GROMACS version: 2020.4
i’ve for loop for 10 temperatures and want to run this command for them

for temp in 1 2 3 4 5 6 7 8 9 10
echo "ref_t = $temp " >> nvt_$count.mdp
gmx grompp -f nvt_$count.mdp -p -c em.gro -o nvt_$count.tpr;
gmx mdrun -deffnm nvt_$count -nb gpu

but got in all files of nvt.log zero for all temperatures

ref-t: 0

also, temperatures are changed but in the same file which is nvt_0.mdp and didn’t create nvt.mpd for each temp


this to me seems like an issue with your script, which this isn’t the forum for.

Nevertheless, my guess is that the count variable is not being updated in the loop (since all your modifications are in nvt_0.mdp). How to solve that depends on which type of script or shell you are using. For example, in bash incrementing is not as easy as doing count++.


thanks for replying
does the command “gmx grompp -f nvt_$count.mdp -p -c em.gro -o nvt_$count.tpr;”
creates file called nvt_.mpd for each time ? i mean if the codes runs successfully. is that okay ? i searched for site or link illustrate which this options ( -f , -p ,-o) indicates ! but couldn’t find

also if you please why ref-t = 0 and didn’t read the temperature

Sorry, what do you mean? grompp will not create nvt_.mdp unless you specifically use the -po flag. If the command completes successfully it managed to read the input from -f, if it fails you will see that in the standard error terminal output.

If grompp sets ref-t = 0 it means such a line is in the .mdp file. If that is not what you expect, please ensure that your script is doing what you think it does. I cannot give specific advice for that.


thanks for your time, replying, and helping :) … I mean when I run this command

gmx grompp -f nvt.mdp -p -c em.gro -o nvt.tpr;

I got a file called nvt.log and nvt.mdp

ref-t is equal zero in log file and 300 in .mdp file … does this normal ?

and log files also contains

tau-p = 1
compressibility (3x3):
compressibility[ 0]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
compressibility[ 1]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
compressibility[ 2]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
ref-p (3x3):
ref-p[ 0]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
ref-p[ 1]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
ref-p[ 2]={ 0.00000e+00, 0.00000e+00, 0.00000e+00}
refcoord-scaling = No
posres-com (3):
posres-com[0]= 0.00000e+00
posres-com[1]= 0.00000e+00
posres-com[2]= 0.00000e+00
posres-comB (3):
posres-comB[0]= 0.00000e+00
posres-comB[1]= 0.00000e+00
posres-comB[2]= 0.00000e+00

matrixes is equal zeros also … does this issue ?

You will need to share an actual .mdp file for anyone to be able to comment.

integrator = md ; leap-frog integrator
nsteps = 15000 ; 2 * 15000 = 30000 ps
dt = 0.002 ; 2 fs

nstxout = 5000 ; save coordinates every 0.6 ps
nstvout = 5000 ; save velocities every 0.6 ps
nstenergy = 5000 ; save energies every 0.6 ps
nstlog = 5000 ; update log file every 0.6 ps

continuation = no ; first dynamics run
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
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

; Pressure coupling is off
pcoupl = no ; no pressure coupling in NVT
; Periodic boundary conditions
pbc = xyz ; 3-D PBC

; Velocity generation
gen_vel = yes ; assign velocities from Maxwell distribution
gen_temp = 300 ; temperature for Maxwell distribution
gen_seed = -1 ; generate a random seed

; Temperature coupling
tc-grps = System
ld_seed = -1
tau_t = 0.1
ref_t = 303.07,

Hence all zero parameters related to pressure coupling.

If I had to venture a guess, the trailing comma creates a problem in parsing. I would have thought it would trigger an error when running grompp but maybe not.

thanks for replying i tried it without comma because i’m using for loop like 1,2,3,4,5… i got same result in mdp file like

ref_t = 300.00

and in log file

nrdf: 13095
ref-t: 0
tau-t: 0

the question is
i got results in files but i’m afraid it couldn’t read the temperature … So if i got results , it means it can read temperature ?

The script you showed above has a number of syntax problems and doesn’t use values for temperature like what you’re showing here, so I can’t comment on what’s going on for sure, but if your .log file says the ref-t value was set to 0 K, then your simulation will do a whole lot of nothing. No atoms should move at that temperature, by definition. You need to revisit how you’re generating your .mdp files and verifying their contents before running the simulations.