[lammps-users] questions about fix temp/berendsen combined with fix nve

Hi,
I have read the doc page of fix temp/berendsen and fix nve many times, and attempted to combine these two commands together trying to mimic a constant temperture system. But it turn out that I am going on the wrong way since the fix nve command generate a system with constant energy and constant volume but not constant temperature. As all we know, Berendsen thermostat is said to be a better thermostat method that can well equilibrium the simulated system to a certain temperature without much fluctuation rather than Nose-Hoover thermostat. Why couldn’t it work as the way fix nvt command works which finally generate and NVT ensemble? Or maybe there are some other command that has been ignored by me ? Can anyone give me some suggestions to get a NVT ensemble by fix temp/berendsen command? Thank you in advance!

Cheers,
Shuping

Hi,
I have read the doc page of fix temp/berendsen and fix nve many times,
and attempted to combine these two commands together trying to mimic a
constant temperture system. But it turn out that I am going on the wrong way
since the fix nve command generate a system with constant energy and
constant volume but not constant temperature. As all we know, Berendsen

no. your view of the ensemble issue is the wrong way around.
fix nve will simply propagate the system according to the selected
integrator (verlet or respa) and won't do any additional modifications.
if you don't have any other fix active _and_ a proper selection of time
step, this would result in an NVE ensemble. if you use any other fix
that changes forces, velocities or positions, you are no longer in
NVE. there is no ensemble being "generated" it just happens.

thermostat is said to be a better thermostat method that can well
equilibrium the simulated system to a certain temperature without much
fluctuation rather than Nose-Hoover thermostat. Why couldn't it work as the

that is nonsense. the amount of fluctuations are determined mostly
by the size of your system and the shape of the interaction potentials.
in both cases, both thermostats should be ideally used in very weak
coupling mode, or else they will modify your dynamics in more or
less unphysical ways.

way fix nvt command works which finally generate and NVT ensemble? Or maybe
there are some other command that has been ignored by me ? Can anyone give
me some suggestions to get a NVT ensemble by fix temp/berendsen command?

strictly speaking, fix berendsen will never generated a 'proper' nvt
ensemble in the
statistical mechanical sense. the nose-hoover thermostat is also not
entirely rigorous
unless you thermostat the thermostat with another thermostat and so on to reach
proper ergodicity. for dense systems, however, both provide a very
good approximation
of the nvt ensemble, particularly the nose-hoover is pretty much converged with
a thermostat chain length of about 4 (which is the default in lammps, IIRC).

if you expect a truely constant temperature, you should go back to your
textbooks on statistical mechanics and thermodynamics and (re-)read
some more. :wink:

cheers,
    axel.

Can anyone give
me some suggestions to get a NVT ensemble by fix temp/berendsen command?

fix 1 all nve
fix 2 all temp/berendsen 300 300 100

That's all there is to it.

Steve

Thanks, Axel and Steve. I have try again and the temperatue ascend quickly from my desired temperature(298) to a high and undesirable one even up to 500000+. Is it a matter of timestep? Even when I decrease the time step to 0.00005fs, the temperature increase as before but with a slower rate. After 2000 steps the temperature reach to 400+. Why would this happen? Can you give me some more advice? Thank you in advance.
Sincerely,
Shuping

Thanks, Axel and Steve. I have try again and the temperatue ascend quickly
from my desired temperature(298) to a high and undesirable one even up to
500000+. Is it a matter of timestep? Even when I decrease the time step to
0.00005fs, the temperature increase as before but with a slower rate. After
2000 steps the temperature reach to 400+. Why would this happen? Can you
give me some more advice? Thank you in advance.

you system seem seriously messed up.
either your potential parameters are bogus
or you have a _really_ bad initial geometry.
have you visualized the trajectory? are all
atoms behaving as expected?
once you get to "plasma temperatures",
i would expect pure chaos.

it is impossible to say what is causing this without
any information about your system. the high temperatures
are obviously only a symptom for something worse.
no thermostat will be able to cure that.

cheers,
   axel.