3
# You must use moltemplate.sh to create 3 files:
4
# system.data system.in.init system.in.settings
5
# (Follow the instructions in README_setup.sh, or run it using ./README_sh.)
7
# ------------------------------- Initialization Section --------------------
11
# ------------------------------- Atom Definition Section -------------------
15
# ------------------------------- Settings Section --------------------------
17
include system.in.settings
19
# ------------------------------- Run Section -------------------------------
21
# To avvoid explosions, I have a 4-step equilibraion process (expand, minimize,
22
# reorient, compress). The system (as defined in the "system.data" file)
23
# is already expanded. That means there are 3 steps left:
25
dump dumpeq1 all custom 50 traj_eq1_min.lammpstrj id mol type x y z ix iy iz
28
# -- Equilibration: part 1: initial minimization --
30
# Note: In general, it's always a good idea to minimize the system at first.
32
minimize 1.0e-5 1.0e-7 100000 400000
35
write_data system_after_eq1_min.data
37
# -- Equilibration part 2: reorienting the molecules (NVT) --
40
dump dumpeq2 all custom 200 traj_eq2_reorient.lammpstrj id mol type x y z ix iy iz
42
# Run the system at high temperature (at constant volume) to reorient the
43
# the molecules (which would otherwise be pointing in the same direction).
45
# To speed it up, I randomize the atomic positions for a few thousand steps
46
# using fix langevin (and fix nve). Then I switch to fix nvt (Nose-Hoover).
47
# (If I start with fix nvt (Nose-Hoover), it seems to get "stuck" for a while.)
50
fix fxlan all langevin 900.0 900.0 120 48279
57
# Now continue the simulation at high temperature using fix nvt (Nose-Hoover).
58
fix fxnvt all nvt temp 900.0 900.0 100.0
64
write_data system_after_eq2_reorient.data
68
# -- equilibration part 3: Equilibrating the density (NPT) --
70
# Originally, the simulation box (in "system.data" and "system.lt") was
71
# unrealistically large. The spacing between the molecules was large also.
72
# I did this to enable the molecules to move freely and reorient themselves.
73
# After doing that, we should run the simulation under NPT conditions to
74
# allow the simulation box to contract to it's natural size. We do that here:
75
# We begin the simulation at 100 barr (a relatively low pressure), and
76
# slowly decrease it to 1 barr, maintianing the temperature at 300K.
78
dump dumpeq3 all custom 200 traj_eq3_npt.lammpstrj id mol type x y z ix iy iz
79
fix fxnpt all npt temp 300.0 300.0 100.0 iso 100.0 1.0 1000.0 drag 2.0
84
write_data system_after_eq3_npt.data