ERROR: Computed temperature for fix temp/berendsen cannot be 0.0

Dear all

After minimization of the simulation box I see the error right in the first step of equilibration with fix nve and rescale with fix temp/scale.

In the manual to solve the problem I can not see any comment to solve this problem.

I set the parameters:

Tstart 298.0
Tstop 298.3
window 0.05
temp/factor 0.95 also 1.0

I would appreciate to have your advice.

This is difficult to answer without input files. Do your particles have an initial velocity? If they are all 0, then it is impossible for the thermostats to rescale these to something non-zero, that might be a problem. You can add a velocity create first to see if that fixes things, or better yet: use a Langevin thermostat.

Dear all

After minimization of the simulation box I see the error right in the first
step of equilibration with fix nve and rescale with fix temp/scale.

1) temp/rescale is a *horribly* bad thermostat, especially for
equilibration and should be avoided at all cost. LAMMPS offers *many*
better suited alternatives.

In the manual to solve the problem I can not see any comment to solve this
problem.

2) the error message is really self explanatory. please answer the
following question:
if your system's temperature is 0.0, by what factor would you have to
multiply it (i.e. rescale) to achieve the desired 298.0 K?

I set the parameters:

Tstart 298.0
Tstop 298.3
window 0.05
temp/factor 0.95 also 1.0

these don't make much sense as well. for all by the most gigantic
systems, your window is too small, thus you will rescale every step
the fix is active and thus usually *defer* equilibration
significantly. just don't use temp/rescale and this doesn't matter.

axel.

Thanks Stefan

I created the initial velocities randomly. now it works.

Thanks Stefan

I created the initial velocities randomly. now it works.

it will still be crap.

axel.

Yes, this cannot be stressed enough. If you want to correctly sample the canonical ensemble, you will have to use either a Nosé-Hoover or Langevin thermostat (or maybe by providing explicit solvent). The former can have ergodicity issues if your system consists only of harmonic forces.

Maybe it makes sense to add a short note about this to the docs of fix temp/rescale and fix temp/berendsen?

Yes,

The equilibration step of my system includes temp/scal, Noze-Hoover NVT and also NPT.

From a theoretical point of view, temp/rescale is no worse than the Berendsen thermostat or just straight NVE dynamics. They all deviate from the canonical ensemble distribution by an amount of order O(1/N). Of course, the big concern with temp/rescale is that it suppresses fluctuations in total kinetic energy. This is particularly bad for MD simulations of activated processes. Nonetheless, for sufficiently small 1/N, it will converge to the NVT result.

There are many things you can do in LAMMPS that will cause deviations of a similar magnitude or greater. Often times, it does not matter. Sometimes it does. Knowing the difference goes way beyond the scope of the LAMMPS user manual.

Aidan

From a theoretical point of view, temp/rescale is no worse than the
Berendsen thermostat or just straight NVE dynamics. They all deviate from
the canonical ensemble distribution by an amount of order O(1/N). Of
course, the big concern with temp/rescale is that it suppresses fluctuations
in total kinetic energy. This is particularly bad for MD simulations of
activated processes. Nonetheless, for sufficiently small 1/N, it will
converge to the NVT result.

i would like to point out that my comments were particularly aimed at
using rescaling for equilibration, and with a very small window (or
short time constant, or both). under these circumstances, rescaling is
especially bad.

axel.