~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to tools/moltemplate/examples/all_atom_examples/hexadecane/run.in.npt

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# PREREQUISITES:
2
 
#
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.)
6
 
 
7
 
# ------------------------------- Initialization Section --------------------
8
 
 
9
 
include         system.in.init
10
 
 
11
 
# ------------------------------- Atom Definition Section -------------------
12
 
 
13
 
read_data       system.data
14
 
 
15
 
# ------------------------------- Settings Section --------------------------
16
 
 
17
 
include         system.in.settings
18
 
 
19
 
# ------------------------------- Run Section -------------------------------
20
 
 
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:
24
 
 
25
 
dump            dumpeq1 all custom 50 traj_eq1_min.lammpstrj id mol type x y z ix iy iz
26
 
thermo          50
27
 
 
28
 
# -- Equilibration: part 1: initial minimization --
29
 
 
30
 
# Note: In general, it's always a good idea to minimize the system at first.
31
 
 
32
 
minimize 1.0e-5 1.0e-7 100000 400000
33
 
undump          dumpeq1
34
 
 
35
 
write_data   system_after_eq1_min.data
36
 
 
37
 
# -- Equilibration part 2: reorienting the molecules (NVT) --
38
 
 
39
 
timestep        1.0
40
 
dump dumpeq2 all custom 200 traj_eq2_reorient.lammpstrj id mol type x y z ix iy iz
41
 
 
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).
44
 
 
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.)
48
 
 
49
 
 
50
 
fix fxlan all langevin  900.0 900.0  120 48279
51
 
fix fxnve all nve
52
 
 
53
 
run             2000
54
 
 
55
 
unfix fxlan
56
 
unfix fxnve
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
59
 
 
60
 
run             5000
61
 
undump dumpeq2
62
 
 
63
 
 
64
 
write_data   system_after_eq2_reorient.data
65
 
 
66
 
unfix fxnvt
67
 
 
68
 
# -- equilibration part 3: Equilibrating the density (NPT) --
69
 
 
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.
77
 
 
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
80
 
 
81
 
timestep        1.0
82
 
run             60000
83
 
 
84
 
write_data   system_after_eq3_npt.data
85