How to add temperature at some rate

Hi,everyone! In many paper about MD simulation,temperature is added from low Tem. to high Tem. at some rate.
As a newcomer to LAMMPS, I want to repeat the simulation described in the paper— J. Phys. Chem. C, Vol. 114, No. 12, 2010 which
study the process of carbon hydrogen decompose on Ni." Our temperature programmed RD simulations used the velocity Verlet integrator
with a time step of 0.25 fs. The temperature was set to an initial temperature of 500 K and increased every time step at a constant rate of
20 K/ps, leading to a final system temperature of 2500 K after 100 ps. We used a Berendsen thermostat with a damping constant of 100
fs for temperature control. " This is the way to setting temperature in this paper.I wrote a in file in which I use a variable to control tempe-
rature.But the CH4 molecules in the simulation decompose very soon. I think there are some mistakes in the part of temperature controlling
in my in file. The following is my in file:

Reactive ReaxFF sumulation to reactive dynamics of hydrocarbon chemisorption and decomposition

units real

boundary m m m

atom_style full

read_data data.NiCH4

pair_style reax
pair_coeff * * ffield.reax 3 1 2

group all type 1 2 3
group CH4 type 2 3

velocity all create 500 56736438912 dist gaussian

minimize 1.0e-8 1.0e-6 2000 2000
min_style cg

dump min all xyz 1 start.NiCH4.xyz

label addT
variable n loop 1 400000
variable m loop 1 101
variable q loop 1 41
variable wd equal 500+0.005*n velocity all create {wd} 56736438912 dist gaussian

fix tempeture all temp/berendsen {wd} {wd} 100
fix thermostat all nve

print ‘n=$n’
thermo 4000
thermo_style custom step press temp etotal ke v_wd
dump $n all xyz 4000 *.NiCH4.xyz
dump_modify $n sort id pad 8

restart 5000 restart.*

timestep 0.25

run 1

next n
jump in.try addT

Thank you for your time and your help!!!
Z.Y.Qiu
10/14/2012

Hi,everyone! In many paper about MD simulation,temperature is added from low
Tem. to high Tem. at some rate.
As a newcomer to LAMMPS, I want to repeat the simulation described in the
paper--- J. Phys. Chem. C, Vol. 114, No. 12, 2010 which
study the process of carbon hydrogen decompose on Ni." Our temperature
programmed RD simulations used the velocity Verlet integrator
with a time step of 0.25 fs. The temperature was set to an initial
temperature of 500 K and increased every time step at a constant rate of
20 K/ps, leading to a final system temperature of 2500 K after 100 ps. We
used a Berendsen thermostat with a damping constant of 100
fs for temperature control. " This is the way to setting temperature in
this paper.I wrote a in file in which I use a variable to control tempe-
rature.But the CH4 molecules in the simulation decompose very soon. I think
there are some mistakes in the part of temperature controlling
in my in file. The following is my in file:

three things.

1) is the rate of 20K/ps given in the paper? it is very high.
particularly with the long damping constant of 100ps (i.e.
it will take 100ps until the thermostat has properly reacted).
you cannot just insert kinetic energy into the system, you
have to give it some time to adjust to it. you also should
first equilibrate the system at the lower temperature.

2) using a variable with a loop around "run 1" is a hugely
inefficient way to do a temperature ramp, the berendsen
thermostat has this feature integrated. please re-read it
documentation.

3) berendsen is a bad thermostat for such an experiment,
since it will enhance local thermal fluctuations (it does
unbiased velocity rescaling, similar to temp/rescale only
more gradual). fix langevin would be a much better choice.
and also for your system, i would only thermalize the
substrate excluding the top layer and the CH4. that seems
a much more realistic model. however, that requires the
kinetic energy to be conducted properly, which takes time,
i.e. you should reduce your heating rate and also monitor
the temperature of the non-thermalized part for confirmation.

axel.