[lammps-users] Fix temp/csvr and fix shake

Hello everyone,

I want to simulate the system that contains the water molecules, however,
I have encountered that there is a conflict between a fix shake and

the Bussi, Donadio, Parinello thermostat (fix temp/csvr).

This algorithm is similar or rather a combination
of the Langevin and Berendsen thermostats
which have no problem to be connected with the shake algorithm.

Therefore, I would like to ask what is the origin of the problem?

Best wishes,

How does this conflict manifest itself?

And please always report the LAMMPS version you are using.

My LAMMPS version is 3Mar20.

The first thing I have noticed is that it is already specified in the documentation site (https://docs.lammps.org/fix_temp_csvr.html)## Restrictions

These fixes are not compatible with fix shake.

The error I get is
ERROR on proc 0: Non-numeric box dimensions - simulation unstable (…/pppm_tip4p.cpp:76)
Last command: run ${Nrun}

when using the following definition of NPT ensemble

if “{npt}==yes" then "fix verlet all nve" & "fix trescale all temp/csvr {Temp} {Temp} {StepRescale} 123321” &
“fix prescale all press/berendsen iso {Press} {Press} ${StepRescale}”

Whenever I switch this off and turn the Nose-Hoover chains it is working fine
if “{nhchains}==yes" then "fix integrate all npt temp {Temp} {Temp} {StepRescale} iso {Press} {Press} ${StepRescale}”

What I have noticed in general is that whenever I comment the press/berendsen thermostat command, the script will be executed.

The entire input scripts are enclosed to this message.

temperature (104 Bytes)

in_water_equil.in (2.4 KB)

interactions (270 Bytes)

restart.wat (60.3 KB)

What you report is inconsistent. The issue is, obviously, with fix press/berendsen. This is quite common. The problem is that your relaxation time is not suitable for your system and will lead to a NaN value when computing the box rescale factor, which will turn all coordinates non-numeric.

Please also note that fix press/berendsen will never give you an NPT ensemble, at best a (crude) approximation.


I am aware that it does not give a NPT ensemble.

So what is the reason it works with the NH-chains barostat then?

Do you presume that the pressure fluctuations are way too large to be held by Berendsen barostat,
therefore the rescaling factors are not being computed?

Nose-Hoover barostat is a different algorithm with different characteristics.
The same symptoms can happen there as well, just for different relaxation time constants and systems.

…and to clarify one more thing: fix temp/csvr is compatible with fix shake (same as fix temp/berendsen), only fix temp/csld is not.
It looks like a mistake was made when merging the documentation for the two fixes. The documentation will be updated accordingly in the next patch release.