# PREREQUISITES: # # You must use moltemplate.sh to create 3 files: # system.data system.in.init system.in.settings # (Follow the instructions in README_setup.sh, # or run the file as a script using ./README_setup.sh) # ------------------------------- Initialization Section -------------------- include system.in.init # ------------------------------- Atom Definition Section ------------------- read_data system_after_min.data # ------------------------------- Settings Section -------------------------- include system.in.settings # ------------------------------- Run Section ------------------------------- # To avoid explosions, I have a 4-step equilibraion process (expand, minimize, # reorient, compress). The system (as defined in the "system.data" file) # is already expanded. That means there are 3 steps left: thermo_style custom step temp pe etotal epair ebond eangle edihed press vol thermo 100 thermo_modify norm yes # -- Equilibration part 1: reorienting the molecules (NVT) -- timestep 1.0 # Give each atom a random initial velocity consistent with a system at 900K. velocity all create 900.0 12345 # Run the system at high temperature (at constant volume) to reorient the # the molecules (which would otherwise be pointing in the same direction). # To speed it up, I randomize the atomic positions for a few thousand steps # using fix langevin (and fix nve). Then I switch to fix nvt (Nose-Hoover). # (If I start with fix nvt (Nose-Hoover), it seems to get "stuck" for a while.) fix fxlan all langevin 900.0 900.0 120 48279 fix fxnve all nve run 4000 unfix fxlan unfix fxnve # Now continue the simulation at high temperature using fix nvt (Nose-Hoover). fix fxnvt all nvt temp 900.0 900.0 100.0 run 6000 unfix fxnvt # -- Equilibration part 2: Equilibrating the density (NPT) -- # Originally, the simulation box (in "system.data" and "system.lt") was # unrealistically large. The spacing between the molecules was large also. # I did this to enable the molecules to move freely and reorient themselves. # After doing that, we should run the simulation under NPT conditions to # allow the simulation box to contract to it's natural size. # To help it collapse, we begin the simulation at a relatively high pressure # Later on, we will slowly decrease it to 1 bar. # First cool the system. (Do this at high pressure to avoid bubble formation.) dump dumpeq2 all custom 500 traj_npt.lammpstrj id mol type x y z ix iy iz fix fxnpt all npt temp 900.0 260.0 100.0 iso 2000.0 2000.0 1000.0 drag 2.0 timestep 1.0 run 20000 # At the very end of the previous simulation, the temperature dropped below # the boiling point. Run the simulation for longer at these conditions to # give it a chance for the vapor -> liquid transition to complete. # We will also slowly decrease the pressure to 200 bar. unfix fxnpt fix fxnpt all npt temp 260.0 260.0 100.0 iso 2000.0 200.0 1000.0 drag 2.0 timestep 1.0 run 100000 write_data system_after_npt.data