# Errors during nvt

**URL:** <https://gromacs.bioexcel.eu/t/errors-during-nvt/10931>\
**Category:** User discussions\
**Created:** [January 2, 2025, 11:36am UTC](https://gromacs.bioexcel.eu/t/errors-during-nvt/10931 "2025-01-02T11:36:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZiruiDong](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@ZiruiDong](https://gromacs.bioexcel.eu/u/ZiruiDong)\
**Post date:** [January 2, 2025, 11:36am UTC](https://gromacs.bioexcel.eu/t/errors-during-nvt/10931/1 "2025-01-02T11:36:14Z")

</div>

GROMACS version: 2024.4  
GROMACS modification: Yes/No  
Hello,experts! When I conduct “gmx grompp -f nvt.mdp -c em.gro -r em.gro -p topol.top -n index.ndx -o nvt.tpr” using nvt.mdp version1. Here is one fatal error:Fatal error: Invalid T coupling input: 0 groups, 1 ref-t values and 1 tau-t values and when I change my nvt.mdp file to version 2, the fatal error becomes: Parameter “tcoupl” doubly defined. The two version of nvt.mdp files are listed below. I guess maybe there are some problems in my molecule str. file generated by CGenFF?

---

<div class="post-metadata">

**Author:** ![ZiruiDong](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@ZiruiDong](https://gromacs.bioexcel.eu/u/ZiruiDong)\
**Post date:** [January 2, 2025, 11:37am UTC](https://gromacs.bioexcel.eu/t/errors-during-nvt/10931/2 "2025-01-02T11:37:05Z")

</div>

The first version of nvt.mdp reads as following:  
; GROMACS .mdp file for NVT equilibration

; Parameters for the run  
integrator = md ; Leap-frog integrator  
nsteps = 50000 ; Number of steps  
dt = 0.002 ; Time step of 2 fs

; Energy minimization and constraints  
emtol = 1000.0 ; Stop minimization when energy change \< 1000 kJ/mol  
emstep = 0.01 ; Initial minimization step size  
niter = 50000 ; Maximum number of iterations

; Temperature coupling  
tcoupl = nose-hoover ; Temperature coupling method  
tau\_t = 0.1 ; Relaxation time constant for temperature coupling  
ref\_t = 300 ; Desired temperature in K

; Pressure coupling (if applicable)  
; If you only want NVT (constant volume), this section can be removed  
; If you need NPT (constant pressure and temperature), use the following  
; tcoupl = nose-hoover ; Pressure coupling method  
; tau\_p = 1.0 ; Relaxation time constant for pressure coupling  
; ref\_p = 1.0 ; Desired pressure in bar  
; compressibility = 4.5e-5 ; Isothermal compressibility

; Neighbor searching  
nstlist = 10 ; Frequency to update the neighbor list  
rlist = 1.0 ; Cut-off for neighbor list  
coulombtype = pme ; PME for long-range electrostatics  
rcoulomb = 1.2 ; Short-range electrostatic cut-off  
vdwtype = cut-off ; Van der Waals interaction cut-off  
rvdw = 1.2 ; Short-range cut-off for van der Waals

; Output control  
nstxout = 5000 ; Save coordinates every 5000 steps  
nstvout = 5000 ; Save velocities every 5000 steps  
nstfout = 0 ; No force output  
nstlog = 1000 ; Save energy and progress every 1000 steps  
nstenergy = 1000 ; Save energy every 1000 steps  
energygrps = BUTYA SOL ; Energy group for analysis

; Constraints  
constraints = h-bonds ; Use only hydrogen bonds constraints

---

<div class="post-metadata">

**Author:** ![ZiruiDong](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@ZiruiDong](https://gromacs.bioexcel.eu/u/ZiruiDong)\
**Post date:** [January 2, 2025, 11:37am UTC](https://gromacs.bioexcel.eu/t/errors-during-nvt/10931/3 "2025-01-02T11:37:52Z")

</div>

The second version of nvt.mdp reads like this:  
; GROMACS .mdp file for NVT equilibration

; Parameters for the run  
integrator = md ; Leap-frog integrator  
nsteps = 50000 ; Number of steps  
dt = 0.002 ; Time step of 2 fs

; Energy minimization and constraints  
emtol = 1000.0 ; Stop minimization when energy change \< 1000 kJ/mol  
emstep = 0.01 ; Initial minimization step size  
niter = 50000 ; Maximum number of iterations

; Temperature coupling  
tcoupl = nose-hoover ; Use Nose-Hoover chain  
tau\_t = 0.1 ; Relaxation time constant for temperature coupling  
ref\_t = 300 ; Desired temperature in K

; Pressure coupling  
tcoupl = nose-hoover ; Recommended for pressure coupling  
tau\_p = 1.0 ; Relaxation time constant for pressure coupling  
ref\_p = 1.0 ; Desired pressure in bar

compressibility = 4.5e-5 ; Isothermal compressibility of water in bar^-1

; Neighbor searching  
nstlist = 10 ; Frequency to update the neighbor list  
rlist = 1.0 ; Cut-off for neighbor list  
coulombtype = pme ; PME for long-range electrostatics  
rcoulomb = 1.2 ; Short-range electrostatic cut-off  
vdwtype = cut-off ; Van der Waals interaction cut-off  
rvdw = 1.2 ; Short-range cut-off for van der Waals

; Output control  
nstxout = 5000 ; Save coordinates every 5000 steps  
nstvout = 5000 ; Save velocities every 5000 steps  
nstfout = 0 ; No force output  
nstlog = 1000 ; Save energy and progress every 1000 steps  
nstenergy = 1000 ; Save energy every 1000 steps  
energygrps = BUTYA SOL ; Energy group for analysis

; Constraints  
constraints = h-bonds ; Use only hydrogen bonds constraints

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [January 2, 2025, 2:05pm UTC](https://gromacs.bioexcel.eu/t/errors-during-nvt/10931/4 "2025-01-02T14:05:32Z")

</div>

> [@ZiruiDong](#):
>
> ; Temperature coupling  
> tcoupl = nose-hoover ; Use Nose-Hoover chain  
> tau\_t = 0.1 ; Relaxation time constant for temperature coupling  
> ref\_t = 300 ; Desired temperature in K
> 
> ; Pressure coupling  
> tcoupl = nose-hoover ; Recommended for pressure coupling  
> tau\_p = 1.0 ; Relaxation time constant for pressure coupling  
> ref\_p = 1.0 ; Desired pressure in bar

The error has nothing to do with the molecule topology. You have defined `tcoupl` twice. The second instance appears to simply be a typo in which you are using `tcoupl` instead of `pcoupl` (and you will also need to set an appropriate method, because Nosé-Hoover is a thermostat not a barostat).

---

<div class="post-metadata">

**Author:** ![ZiruiDong](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@ZiruiDong](https://gromacs.bioexcel.eu/u/ZiruiDong)\
**Post date:** [January 2, 2025, 2:07pm UTC](https://gromacs.bioexcel.eu/t/errors-during-nvt/10931/5 "2025-01-02T14:07:28Z")

</div>

Thanks for replying, I change my nvt.mdp file like this and it seems work:  
; GROMACS .mdp file for NVT equilibration

; Parameters for the run  
integrator = md ; Leap-frog integrator  
nsteps = 50000 ; Number of steps (100 ps)  
dt = 0.002 ; Time step (2 fs)

; Output control  
nstxout = 5000 ; Save coordinates every 5000 steps  
nstvout = 5000 ; Save velocities every 5000 steps  
nstenergy = 5000 ; Save energy every 5000 steps  
nstlog = 5000 ; Save log every 5000 steps

; Bond parameters  
continuation = no ; First dynamics run  
constraint\_algorithm= lincs ; Holonomic constraints  
constraints = all-bonds ; All bonds (even heavy atom-H bonds) constrained  
lincs\_iter = 1 ; Accuracy of LINCS  
lincs\_order = 4 ; LINCS accuracy

; Neighbor search  
cutoff-scheme = Verlet  
ns\_type = grid ; Neighbor search method  
nstlist = 10 ; Frequency for updating the neighbor list  
rcoulomb = 1.2 ; Short-range electrostatic cutoff  
rvdw = 1.2 ; Short-range van der Waals cutoff

; Electrostatics  
coulombtype = PME ; Use Particle Mesh Ewald for long-range electrostatics  
pme\_order = 4 ; PME interpolation order  
fourierspacing = 0.16 ; Grid spacing for PME

; Temperature coupling  
tcoupl = nose-hoover ; Nose-Hoover thermostat  
tau\_t = 0.1 ; Relaxation time constant for temperature coupling  
ref\_t = 298 ; Desired temperature in K  
tc-grps = System ; Group(s) to couple temperature to (e.g., ‘System’)

; Pressure coupling  
pcoupl = no ; No pressure coupling in NVT

; Periodic boundary conditions  
pbc = xyz ; 3D periodic boundary conditions

; Dispersion correction  
DispCorr = EnerPres ; Apply dispersion correction for cut-off scheme

; Velocity generation  
gen\_vel = yes ; Assign velocities from Maxwell distribution  
gen\_temp = 298 ; Temperature for Maxwell distribution  
gen\_seed = -1 ; Random seed for velocity generation

---

<div class="post-metadata">

**Author:** ![ZiruiDong](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@ZiruiDong](https://gromacs.bioexcel.eu/u/ZiruiDong)\
**Post date:** [January 2, 2025, 2:09pm UTC](https://gromacs.bioexcel.eu/t/errors-during-nvt/10931/6 "2025-01-02T14:09:21Z")

</div>

I find it just like what you point out! Thank you! I now understand!!!
