How to control the cooling rate in lammps

Dear All,

I use

fix 2 all nve

fix 3 all temp/berendsen 4000 0 100

run 2000000

to simulate a cooling process with lammps. A I know, the cooling rate
depends how long the time I run the simulation.

Thus, if the temperature decreases from 4000k to 0K in 400ps, the fooling
rate will be 40K/ps, while running in 2000ps, the cooling rate would be
2k/ps, right?

no. you are discounting the fact, that the berendsen
thermostat is approximating the temperature decrease
with an exponential decay using a time constant
(100 in your case). the smaller this time constant,
the closer the cooling is to your desired linear
temperature decrease.

But, from the output file, I found that after 400ps, the temperature just
decreased to 2000K, not 0K. It means the cooling process did not finish.

are you by any chance running in metal units?
then the 100 of the berendsen time constant would be
100ps, which is fairly long considering your total
simulation time and would explain the behavior you see.

axel.

But, from the output file, I found that after 400ps, the temperature just
decreased to 2000K, not 0K. It means the cooling process did not finish.

are you by any chance running in metal units?
then the 100 of the berendsen time constant would be
100ps, which is fairly long considering your total
simulation time and would explain the behavior you see.

axel.
---------------------------------------------------------

Yes, i ran it in metal units in 400ps and 2000ps, seperately. So, does it
mean longer simulation time needs a longer berendsen time constant?

no. *shorter*. that time constant 100 will mean
that it will take *at least* 100ps until any *initial*
temperature difference has be reduced to a
fraction of 1/e. since you keep changing the
temperature target, this will become even worse.

I am not sure how to control a linear decrement of temperature. Or, does NVT
work in such situation?

fix NVT has the problem, that the amount of kinetic
energy that can be transferred out of a system is
limited. i.e. it is more likely to work for a slow
cooling process than a fast one.

just try temp/berendsen with a time constant of
1 or 0.1 and see how that works out.

also have a closer look at the documentation.

axel.