run consecutive simulations in a single job

Hi, ALL

When I run a NVE simulation following a NVE simulation, could I write the script file like this :

units real
atom_style full
read_data mh.data
velocity        all create 300.0 4928450 rot yes dist gaussian
fix             1 all nvt temp 300.0 300.0 100
run 20000
unfix           1

fix             1 all nve
fix             2 all temp/rescale 100 300.0 300.0 30.0 1.0

restart         0
reset_timestep  0
dump            1 all custom 1000 [dump.md](http://dump.md) id mol type q x y z
restart         10000 nve1.1 nve1.2
run             20000

undump    1

  I didn't specify writing a restart file in the 1st (NVT) simulation. Will the 2nd (NVE) simulation read some internal temporary file 
otherwise ? If not, then what data file did the 2nd run actually read ? Thanks a lot and Happy Holidays !



Hi, ALL

 When I run a NVE simulation following a NVE simulation, could I write

the script file like this :

units real
atom_style full
read_data mh.data

velocity all create 300.0 4928450 rot yes dist gaussian

fix 1 all nvt temp 300.0 300.0 100
run 20000

unfix 1

fix 1 all nve
fix 2 all temp/rescale 100 300.0 300.0 30.0 1.0

restart 0
reset_timestep 0
dump 1 all custom 1000 dump.md id mol type q x y z
restart 10000 nve1.1 nve1.2
run 20000

undump 1

  I didn't specify writing a restart file in the 1st (NVT) simulation. Will
the 2nd (NVE) simulation read some internal temporary file

no.

otherwise ? If not, then what data file did the 2nd run actually read ?

none. you are simply continuing the calculation
where you left off after the first run. unless you
use the "clear" command, the entire system remains
defined as it was.

axel.

Thanks, Alex !

Am I right to think that the script I write enable the program to run the NVE simulation right after the NVT simulation as I would like to do ?

Guozhen

Thanks, Alex !

Am I right to think that the script I write enable the program to run the
NVE simulation right after the NVT simulation as I would like to do ?

feel free to debug *your* script *yourself*.
it is easy enough to do.

thanks,
    axel.

From the log file, I could not tell either NVE ensemble or NVT ensemble is actually applied.

From the log file, I could not tell either NVE ensemble or NVT ensemble is
actually applied.

with the default settings all script commands are echoed
into the log file as they are parsed and processed. so
you should see them being executed. outside of that
it is an *elementary* debugging method to just comment
out a statement and monitor the difference, if you are
unsure if a parameter or statement has an effect. it is
just common sense, not anything specific to lammps.

that being said, i would like to point out a certain
sloppiness in wording. no ensemble is ever "applied"
in lammps. fix nve or fix nvt are integrators that
will result in an NVE or NVT ensemble for a system
with periodic boundaries and *no other* manipulations.

in your specific case, fix temp/rescale with
_cancel_ any hope to run a system in NVE.
it will result in the simulation being in no specific
named statistical mechanical ensemble at all.
at best the system will be NVE *between*
the rescaling.

axel.