# PREREQUISITES: # # 1) You must use moltemplate.sh to create 4 files: # system.data system.in.init system.in.settings system.in.charges # (Follow the instructions in README_setup.sh, # or run the file as a script using ./README_setup.sh) # 2) You must minimize the system beforehand using "run.in.min". # This will create the file "system_after_min.data" which this file reads. # ------------------------------- Initialization Section -------------------- include "system.in.init" # ------------------------------- Atom Definition Section ------------------- read_data "system_after_min.data" # OPLSAA atom charges are stored in a separate file. # Load that file now: include "system.in.charges" # ------------------------------- Settings Section -------------------------- include "system.in.settings" # ------------------------------- Run Section ------------------------------- print "---------------------------------------------------------------------------" print "First, use Langevin dynamics to randomize the initial shape of the molecules" print "(This is not really necessary, but it seems to speed up equilibration.)" print "---------------------------------------------------------------------------" # Give each atom a random initial velocity consistent with a system at 300K. velocity all create 300.0 12345 # Run a short simulation using a Langevin thermostat (for improved stability). fix fxlan all langevin 300.0 300.0 120 123456 # temp: 300 K fix fxnph all nph iso 100.0 100.0 1000.0 # pressure: 100 atm run 2000 unfix fxlan unfix fxnph print "---------------------------------------------------------------------------" print "--- Now continue the simulation using a Nose-Hoover Thermostat/Barostat ---" print "---------------------------------------------------------------------------" dump 1 all custom 1000 traj_npt.lammpstrj id mol type x y z ix iy iz # temperature: 300 K, pressure: 100 atm fix fxnpt all npt temp 300.0 300.0 100.0 iso 100.0 100.0 1000.0 drag 1.0 thermo 100 #thermo_modify flush yes timestep 2.0 run 100000 write_data system_after_npt.data