# Drift of the system in the periodic box during simulations

**URL:** https://gromacs.bioexcel.eu/t/drift-of-the-system-in-the-periodic-box-during-simulations/10829
**Category:** User discussions
**Tags:** mdp-parameters, pbc
**Created:** [December 16, 2024, 9:18am UTC](https://gromacs.bioexcel.eu/t/drift-of-the-system-in-the-periodic-box-during-simulations/10829 "2024-12-16T09:18:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sm.i17](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@sm.i17](https://gromacs.bioexcel.eu/u/sm.i17)
#### Post date: [December 16, 2024, 9:18am UTC](https://gromacs.bioexcel.eu/t/drift-of-the-system-in-the-periodic-box-during-simulations/10829/1 "2024-12-16T09:18:15Z")

</div>

GROMACS version: 2023.2  
(I also tried to use older version - Gromacs 2018.1, but the error remained)

Hello,  
I came across an error during a longtime MD simulation of the layered system based of two different polymers (colored in red and blue in the snapshots).  
As far as I understand from the visual analysis of the trajectory, there is a drift of the center of mass of the system during the longtime simulation (a significant movement of the entire system across the periodic box). The snapshots for some frames of the trajectory during the simulation are attached.  
I used semi-isotropic Parrinello-Rahman barostat and Nose-Hoover thermostat for the simulation. The problem disappeared when I switched to c-rescale barostat and v-rescale thermostat instead of Parrinello-Rahman/Nose-Hoover. There was also no drift for the case of no pressure coupling (Pcoupl = no). What could be the reason for this error? How can this error be fixed for the simulation with Parrinello-Rahman barostat and Nose-Hoover thermostat?

The above-described problem occurred only for one system, for other systems based on other pairs of polymers, there were no drift during the simulations using the same mdp parameters and Parrinello-Rahman barostat.

Some crucial mdp parameters that was used:  
constraints = all-bonds  
integrator = md  
dt = 0.001   
nstcomm = 1  
nstxtcout = 1000  
nstlist = 10  
coulombtype = PME  
Tcoupl = nose-hoover  
tc-grps = System  
tau\_t = 0.5  
ref\_t = 550  
gen\_vel = no  
pbc = xyz  
Pcoupl = Parrinello-Rahman  
Pcoupltype = semiisotropic  
tau\_p = 5  
compressibility = 4.5e-5 0  
ref\_p = 1 1

Help is very much appreciated, thanks in advance!

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/4/45eb4be6fa8b1da5987d70ea25ab9b9bb66ef905.jpeg)

---

<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: [December 16, 2024, 9:43am UTC](https://gromacs.bioexcel.eu/t/drift-of-the-system-in-the-periodic-box-during-simulations/10829/2 "2024-12-16T09:43:46Z")

</div>

I don’t know why this happens. I don’t think this causes any problems though.

tau\_t=0.5 is rather short with a Nose-Hoover thermostat.

We nowadays recommend V-rescale and C-rescale.

Note that nstcomm=1 might case significant overhead. Using the default 100 should be fine for any system.

---

<div class="post-metadata">

### Author: ![sm.i17](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@sm.i17](https://gromacs.bioexcel.eu/u/sm.i17)
#### Post date: [December 17, 2024, 10:59pm UTC](https://gromacs.bioexcel.eu/t/drift-of-the-system-in-the-periodic-box-during-simulations/10829/3 "2024-12-17T22:59:06Z")

</div>

Thank you, Professor Hess, for your reply!
