# ------------------------------- Initialization Section --------------------

include         system.in.init

# ------------------------------- Atom Definition Section -------------------


# Normally, I would minimize the system and equilibrate the system at constant
# pressure and temperature beforehand.  If you run lammps with "run.in.npt",
# it will generate a restart file "system_after_npt.rst" with reasonable
# coordinates at that temperature and pressure.  Then we could load it now:
#
#read_restart    system_after_npt.rst
#
# Unfortunately the LAMMPS "read_restart" command has been undependable over
# the past year (2012), and I feel it is safer to remove it from the examples.
# Instead, for this example, I just read the raw coordinates generated by 
# moltemplate (and the default volume).  (I get fewer questions this way.) 
# However you should never run any liquid simulations at constant volume without
# pressure equilibration first.  Hopefully in the future "read_restart" will
# work.  Until then, try "read_dump", "dump2data.py", or "restart2data".

read_data       system.data

# ------------------------------- Settings Section --------------------------

include         system.in.settings

# ------------------------------- Run Section -------------------------------


# -- minimization protocol --
# Note: If you are reading the restart file instead of the data file, 
#       then you should not need to minimize the system beforehand..
# fShakeTIP3P was defined in system.in.settings. 
# (It is incompatible with "minimize".)
unfix         fShakeTIP3P
minimize 1.0e-5 1.0e-7 100000 400000
# Now read "system.in.settings" in order to redefine fShakeTIP3P again:
include       system.in.settings

# -- simulation protocol --


timestep        1.0
dump            1 all custom 500 traj_nvt.lammpstrj id mol type x y z ix iy iz
fix             fxnvt all nvt temp 300.0 300.0 500.0 tchain 1
thermo          500
#thermo_modify  flush yes

run		50000

write_restart   system_after_nvt.rst
