# NPT fatal error

**URL:** <https://gromacs.bioexcel.eu/t/npt-fatal-error/9196>\
**Category:** User discussions\
**Created:** [May 21, 2024, 7:53pm UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196 "2024-05-21T19:53:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SP06](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@SP06](https://gromacs.bioexcel.eu/u/SP06)\
**Post date:** [May 21, 2024, 7:53pm UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196/1 "2024-05-21T19:53:43Z")

</div>

GROMACS version: 2021.4  
GROMACS modification: Yes/No  
Here post your question : While running the NPT equilibration for a protein-cyclohexane system at temperature of 310K (charmm36 ff), I am getting the following error  
Program: gmx mdrun, version 2021.4-Ubuntu-2021.4-2  
Source file: src/gromacs/domdec/cellsizes.cpp (line 143)  
MPI rank: 0 (out of 20)  
Fatal error:  
The X-size of the box (5.953902) times the triclinic skew factor (1.000000) is  
smaller than the number of DD cells (4) times the smallest allowed cell size  
(1.488750).

The following is npt.mdp file for your reference:  
title = charmm36 Protein-CYHE system NPT equilibration  
define = -DPOSRES ; position restrain the protein  
; Run parameters  
integrator = md ; leap-frog integrator  
nsteps = 2500000 ; 2 \* 2500000 = 5000 ps  
dt = 0.002 ; 2 fs  
; Output control  
nstenergy = 500 ; save energies every 1.0 ps  
nstlog = 500 ; update log file every 1.0 ps  
nstxout-compressed = 500 ; save coordinates every 1.0 ps  
; Bond parameters  
continuation = yes ; continuing from NVT  
constraint\_algorithm = lincs ; holonomic constraints  
constraints = h-bonds ; bonds to H are constrained  
lincs\_iter = 1 ; accuracy of LINCS  
lincs\_order = 4 ; also related to accuracy  
; Neighbor searching and vdW  
cutoff-scheme = Verlet  
ns\_type = grid ; search neighboring grid cells  
nstlist = 20 ; largely irrelevant with Verlet  
rlist = 1.2  
vdwtype = cutoff  
vdw-modifier = force-switch  
rvdw-switch = 1.0  
rvdw = 1.2 ; short-range van der Waals cutoff (in nm)  
; Electrostatics  
coulombtype = PME ; Particle Mesh Ewald for long-range electrostatics  
rcoulomb = 1.2  
pme\_order = 4 ; cubic interpolation  
fourierspacing = 0.16 ; grid spacing for FFT  
; Temperature coupling  
tcoupl = V-rescale ; modified Berendsen thermostat  
tc-grps = Protein Non-Protein ; two coupling groups - more accurate  
tau\_t = 1.0 1.0 ; time constant, in ps  
ref\_t = 310 310 ; reference temperature, one for each group, in K  
; Pressure coupling  
pcoupl = C-rescale ; pressure coupling is on for NPT  
pcoupltype = isotropic ; uniform scaling of box vectors  
tau\_p = 5.0 ; time constant, in ps  
ref\_p = 1.0 ; reference pressure, in bar  
compressibility = 4.5e-5 ; isothermal compressibility of water, bar^-1  
refcoord\_scaling = com  
; Periodic boundary conditions  
pbc = xyz ; 3-D PBC  
; Dispersion correction is not used for proteins with the C36 additive FF  
DispCorr = no  
; Velocity generation  
gen\_vel = no ; velocity generation off after NVT

I used these npt.mdp parameters for the same system at 290K temperature, it worked. I have to compare the 2 systems.

Can anyone please help me resolve this issue?

---

<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:** [May 22, 2024, 8:18am UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196/2 "2024-05-22T08:18:57Z")

</div>

The minimum cell size is large. I don’t understand why this is so high. Could you post the lines at the beginning of the log file that pertain to the domain decomposition and detection of distances that affect this?

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 23, 2024, 1:22pm UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196/3 "2024-05-23T13:22:05Z")

</div>

Did you use as many MPI ranks (20) when you ran the 290K simulation?  
How many atoms are there in the system? Does it work if you run one, two or four MPI ranks?

---

<div class="post-metadata">

**Author:** ![SP06](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@SP06](https://gromacs.bioexcel.eu/u/SP06)\
**Post date:** [May 24, 2024, 5:03am UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196/4 "2024-05-24T05:03:22Z")

</div>

I tried to run the NPT equilibration again and again, and it finally got completed without any error. But I got this error again for 300K.  
I have attached the npt.log file.  
[npt.log](https://gromacs.bioexcel.eu/uploads/short-url/vzxuVAuT2fERRkyw4vEcLgHBNSt.log) (1.6 MB)

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 24, 2024, 5:09am UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196/5 "2024-05-24T05:09:34Z")

</div>

Does it help if you use fewer MPI ranks? Do you really need that many? I think 2 or 4 would be enough, i.e., 5-10 logical cores per MPI rank.

---

<div class="post-metadata">

**Author:** ![SP06](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@SP06](https://gromacs.bioexcel.eu/u/SP06)\
**Post date:** [May 24, 2024, 5:09am UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196/6 "2024-05-24T05:09:54Z")

</div>

Yes, as I am comparing the system at different temperatures of 290K, 300K and 310K, so all parameters of equilibration (except time step) is kept same. But I tried running the npt equilibration again (twice), and it finally got completed without any error, but then again I got same error for 300K.

---

<div class="post-metadata">

**Author:** ![SP06](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@SP06](https://gromacs.bioexcel.eu/u/SP06)\
**Post date:** [May 24, 2024, 5:12am UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196/7 "2024-05-24T05:12:14Z")

</div>

I have been using all the available cores on my PC. I will try using fewer and see if it works. Thank you for helping.

---

<div class="post-metadata">

**Author:** ![MagnusL](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/magnusl/32/2380_2.png) [@MagnusL](https://gromacs.bioexcel.eu/u/MagnusL)\
**Post date:** [May 24, 2024, 5:13am UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196/8 "2024-05-24T05:13:13Z")

</div>

You can still use all available cores, but you don’t need to use separate MPI ranks for them. Try with `-ntmpi 2`.

---

<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:** [May 24, 2024, 7:31am UTC](https://gromacs.bioexcel.eu/t/npt-fatal-error/9196/9 "2024-05-24T07:31:41Z")

</div>

I see now that the unusual situation is that your box volume decreases by a factor 2.6. This makes the domain decomposition smaller than what the initial margin accounted for.

Adding the option -dds 0.6 to mdrun should give sufficient margin. But I would expect that continuing your run from the last checkpoint file should also work, even without the -dds option.
