# C-rescale barostat

**URL:** <https://gromacs.bioexcel.eu/t/c-rescale-barostat/9448>\
**Category:** User discussions\
**Tags:** mdp-parameters, mdrun, analysis-tools, simulation-setup\
**Created:** [June 20, 2024, 12:23am UTC](https://gromacs.bioexcel.eu/t/c-rescale-barostat/9448 "2024-06-20T00:23:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shreya](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@shreya](https://gromacs.bioexcel.eu/u/shreya)\
**Post date:** [June 20, 2024, 12:23am UTC](https://gromacs.bioexcel.eu/t/c-rescale-barostat/9448/1 "2024-06-20T00:23:43Z")

</div>

GROMACS version:2023.2  
GROMACS modification: No

Hello,

I am working on a system with 700 glycerol molecules using OPLS FF. With the time-step of **1 fs** , I am running NPT simulation using C-rescale (tau\_p= 3ps) barostat with a reference pressure of 1 bar and NH (tau\_t=0.1) thermostat with a reference temperature of 300 K.

Here is the  
[C-r.mdp](https://gromacs.bioexcel.eu/uploads/short-url/2RKlj9rsxVHjSJpqyAabaMP1ZRa.mdp) (3.4 KB)  
file for reference.

Reading this post from GitLab, where @hess  
explained the approach to choose tau values [https://gitlab.com/gromacs/gromacs/-/merge\_requests/2624](https://gitlab.com/gromacs/gromacs/-/merge_requests/2624) and the thread of this [discussion](https://gromacs.bioexcel.eu/t/what-is-the-recommended-value-for-tau-p-and-tau-t-with-gromacs2023-0-when-using-pr-and-nh/5840), I understood that tau\_t has to be a smaller value compared to tau\_p.

The problem with my simulation is that **once the system reaches the reference pressure, it attains the desired density** but on running the simulation for a longer time using the same barostat (C-rescale) to reach equilibrium, the density decreases. I am assuming that the configuration of the system is not at equilibrium and is showing this behaviour to be at equilibrium but is this normal?

I have tried testing my hypothesis with different values of tau\_p and tau\_t to see the impact of oscillation but the result remains persistent.

@hess I tested the simulation with tau\_t= 1ps and tau=5 ps for V-rescale thermostat and C-rescale barostat (as per this [thread](https://gromacs.bioexcel.eu/t/what-is-the-recommended-value-for-tau-p-and-tau-t-with-gromacs2023-0-when-using-pr-and-nh/5840)) but the density hiked up drastically and then decreased eventually.

Could you please suggest to me if my approach is wrong for using the barostat?

---

<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:** [June 20, 2024, 8:03am UTC](https://gromacs.bioexcel.eu/t/c-rescale-barostat/9448/2 "2024-06-20T08:03:54Z")

</div>

You are now generating velocities in your NPT stage. Have you run an NVT equilibration before? I would recommend doing that and set `gen-vel = no`. I think tau\_t=1ps and tau\_p=5ps are reasonable. But you might want to try running it in separate stages, e.g.:  
NVT with tau-t=0.1 (perhaps 0.5 - 1 ns)  
NPT with tau-t=0.2 and tau-p=1 (perhaps 1-2 ns)  
NPT with tau-t=1 and tau-p=5 (2-50 ns, depending on when it is stable)

By the way, I just noticed from your mdp file that you are writing uncompressed and compressed trajectory output very often. Do you even take a look at force output at all? Do you use velocity output? Unless you’ve got very large storage capacity, I’d recommend something along the lines of:

```auto
; OUTPUT CONTROL OPTIONS
; Output frequency for coords (x), velocities (v) and forces (f)
nstxout = 0
nstvout = 0
nstfout = 0
; Output frequency for energies to log file and energy file
nstlog = 10000
nstenergy = 100000
; Output frequency and precision for xtc file
nstxtcout = 100000

```

But that is just my recommendation. There can be all sorts of valid reasons for outputting more often than that, as well as uncompressed positions and velocities (e.g. if you are generating starting configurations for umbrella sampling). But during equilibration you usually only need such detailed output if you need to analyze crashes.

---

<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:** [June 20, 2024, 9:36am UTC](https://gromacs.bioexcel.eu/t/c-rescale-barostat/9448/3 "2024-06-20T09:36:33Z")

</div>

Dynamics of pure glycerol is extremely slow; it’s viscosity is a factor 140 higher than that of water. How fast things equilibrate will depend on how close to equilibrium your initial configuration is.
