How to control the temperature

Dear all,
I want to perform an NVT-MD with the temperature controlled by Berendsen thermostat.
My script is:

fix 2 all nvt temp 1500 2500 100.0
fix 3 all temp/berendsen 1500.0 2500.0 100.0

I want to know whether the fix 3 will override the temperature control method used in fix 2 nvt which have a default
temperature control method of Nose/Hoover
Because I have noticed that "
this fix temp/berendsen should not normally be used on atoms that also have their temperature
controlled by another fix - e.g. by fix nvt or fix langevin commands.
" in manual
If NO, how can I define an NVT-MD with a Berendsen thermostat?
I have tried NVT without “temp” keyword and with
Best regards.
Youzhao Lan
China

Defining these two fixes will lead to your atoms being time integrated twice.

If you want to do NVT with Berendsen, use fix nve in conjunction with fix berendsen.

[...]

Because I have noticed that "
this fix temp/berendsen should not normally be used on atoms that also have
their temperature
controlled by another fix - e.g. by fix nvt or fix langevin commands.
" in manual
If NO, how can I define an NVT-MD with a Berendsen thermostat?

you cannot. a berendsen thermostat does not generate an NVT ensemble.
full stop. there have been numerous discussions on this subject in the
published literature.

I have tried NVT without "temp" keyword and with Berendsen thermostat fix,
but the script fails to run with an prompt of "fix nvt error"

and for a good reason. it has been explained numerous times on this
very mailing list, that the nve,nvt,npt,nph fixes do not "enforce" a
specific statistical mechanical ensemble, but rather are compatible
with it *if there is no _other_ fix interfering with it*. that is fix
nve will only result in an NVE ensemble, if your simulation is
periodic in all directions, has suitable parameters and no other fix
that manipulates energy or volume or number of particles. it does so
by providing a plain velocity verlet time integration. similarly, fix
nvt will generate an NVT ensemble by providing a time integration that
also couples the particles to nose-hoover chains and thus lead to an
NVT ensemble where replacing it with with fix nve would result in an
NVE ensemble. and so on.

now, to generate a system where you have temperature control via fix
temp/berendsen would thus require you to use it in combination with
fix nve, *as it is said in the documentation*. please re-read the
manual and have a careful look at these topics.

please also note, that a berendsen thermostat is in most cases an
inferior choice to the alternatives.

axel.

1 Like