##################################################
# Box of water
##################################################
#
# define the system being simulated:

# -- init 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.  Otherwise try "read_dump", "dump2data.py", or "restart2data".

read_data       system.data

# ------------------------ Settings section ---------------------

include system.in.settings

# ------------------------ Run section -------------------------


# -- minimization protocol --

# In general, it's always a good idea to minimize the system beforehand.
# fShakeSPCE was defined in system.in.settings. It is incompatible with minimize
unfix         fShakeSPCE
minimize 1.0e-5 1.0e-7 100000 400000
# Now read "system.in.settings" in order to redefine fShakeSPCE 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_style    custom step temp pe etotal press vol epair ebond eangle
thermo          500  # time interval for printing out "thermo" data
#thermo_modify  flush yes

run		10000

# Now that the system's temperature has become more equilibrated,
# we can increase the timestep:

timestep        2.0
run		50000

write_restart  system_after_nvt.rst


