how to make several runs in one input script

Hi Everyone,

I want to do a exercise about 2D LJ system.
First I want to the run at density 0.8 and temperature about 0.7(NVE).
Then I want to the run at density 0.905 and temperature about 0.125.

But I found that I can’t get correct temperature for the second run.
Because I am using NVE, the system will be about 0.125 if I use 0.25 as
the temperature parameter for the “velocity” command. But for now
I got the temperature is about 1.0 if I didn’t use “minimize” command
before the second “run” and I got the temperature is about 0.25 if
I use “minimize” command before the second “run”.

What is wrong with my input script? Thanks in advance.

/YC

Here is my input script:

units lj
atom_style atomic
dimension 2
boundary p p p

read_data data.lj
mass 1 1.0

velocity all create 1.4 76329 loop geom mom yes rot yes

pair_style lj/gromacs 2.45 2.5
pair_coeff 1 1 1.0 1.0

neighbor 0.3 bin
neigh_modify delay 0 every 10 check no

fix 1 all nve
fix 3 all enforce2d

timestep 0.005

minimize 1.0e-4 1.0e-6 100 1000

run 10000
unfix 1
unfix 3

change_box all x scale 0.94 y scale 0.94 boundary p p p remap units box

velocity all create 0.25 76329 loop geom mom yes rot yes

fix 1 all nve
fix 3 all enforce2d

#minimize 1.0e-4 1.0e-6 100 1000
reset_timestep 0

dump 1 all xtc 200 lj-lammps.xtc

run 20000

Hi Everyone,

I want to do a exercise about 2D LJ system.
First I want to the run at density 0.8 and temperature about 0.7(NVE).
Then I want to the run at density 0.905 and temperature about 0.125.

But I found that I can't get correct temperature for the second run.
Because I am using NVE, the system will be about 0.125 if I use 0.25 as
the temperature parameter for the "velocity" command. But for now
I got the temperature is about 1.0 if I didn't use "minimize" command
before the second "run" and I got the temperature is about 0.25 if
I use "minimize" command before the second "run".

What is wrong with my input script? Thanks in advance.

nothing. the problem is in your thinking. before the first MD your
system seemed to be in the global minimum of a perfect crystal and
hence the 2x temperture initialization works. after your first MD,
your system is no longer in that state and a minimization will not
take you there. without a minimization, you keep the kinetic energy
and in addition compress the system, i.e. add potential energy, so the
increase of temperature is quite understandable.

axel.