Repository navigation
Expand file tree
/
Copy pathSimCode.lmp
More file actions
163 lines (118 loc) · 4.47 KB
/
Copy pathSimCode.lmp
File metadata and controls
163 lines (118 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# ===========================================
# Amorphous molecular-box equilibration
# ==========================================
clear
# ---------------- General settings ----------------
units real
dimension 3
boundary p p p
atom_style full
# ---------------- Read the packed structure ----------------
read_restart restart_after_500ps_650K.restart
# ---------------- Force-field styles ----------------
pair_style lj/cut/coul/long 12.0
bond_style harmonic
angle_style harmonic
dihedral_style opls
improper_style cvff
kspace_style pppm 1e-4
include coeff.in.mapped
neighbor 2.0 bin
neigh_modify delay 0 every 1 check yes
# ---------------- Output ----------------
thermo 10000
thermo_style custom step time temp press density vol &
pe ke etotal ebond eangle edihed eimp evdwl ecoul &
elong
thermo_modify flush yes lost warn
# ============================================
# 1. Energy minimization: steepest descent
# ============================================
min_style sd
min_modify dmax 0.1
minimize 1.0e-4 1.0e-6 10000 100000
write_data system_after_sd.data
# =============================================
# 2. Energy minimization: conjugate gradient
# =============================================
min_style cg
min_modify dmax 0.1
minimize 1.0e-6 1.0e-8 50000 500000
write_data system_minimized.data
write_restart system_minimized.restart
# ===========================================
# 3. Initial stabilization
# ===========================================
reset_timestep 0
timestep 0.1
velocity all create 650.0 4928459 mom yes rot yes dist gaussian
fix NPT1 all npt temp 650.0 650.0 100.0 &
iso 1.0 1.0 1000.0
dump D1 all custom 100000 traj_650K_01fs.lammpstrj &
id mol type q xu yu zu
dump_modify D1 sort id
run 5000000
unfix NPT1
undump D1
write_restart restart_after_500ps_650K.restart
write_data system_after_500ps_650K.data
# ================================================
# 4. Apply SHAKE
# ================================================
fix SHAKE all shake 1.0e-4 20 10000 m 1.008
# ================================================
# 5. NPT equilibration
# ================================================
timestep 2.0
fix NPT2 all npt temp 650.0 650.0 100.0 &
iso 1.0 1.0 4000.0
dump D2 all custom 100000 traj_20ns_650K.lammpstrj &
id mol type q x y z
dump_modify D2 sort id
run 10000000
unfix NPT2
undump D2
write_restart restart_after_20ns_650K.restart
write_data system_after_20ns_650K.data
# ===============================================
# 6. Cooling
# ================================================
fix COOL all npt temp 650.0 300.0 100.0 &
iso 1.0 1.0 1000.0
dump DC all custom 100000 traj_cooling_650_to_300K.lammpstrj &
id mol type q xu yu zu
dump_modify DC sort id
run 3500000
unfix COOL
undump DC
write_restart restart_after_cooling.restart
write_data system_after_cooling.data
# ==============================================
# 7. NPT equilibration at 300 K
# ==============================================
fix NPT3 all npt temp 300.0 300.0 100.0 &
iso 1.0 1.0 1000.0
dump D3 all custom 100000 traj_300K_first20ns.lammpstrj &
id mol type q xu yu zu
dump_modify D3 sort id
run 10000000
undump D3
write_restart restart_300K_after_20ns.restart
# ==============================================
# 8. Final 10 ns production sampling
# ==============================================
variable firstdump equal step+500000
dump PROD all custom 500000 traj_last10ns.lammpstrj &
id mol type q xu yu zu
dump_modify PROD sort id delay ${firstdump}
run 5000000
undump PROD
unfix NPT3
unfix SHAKE
write_restart system_final_300K.restart
write_data system_final_300K.data
print "=================================================="
print "Simulation completed"
print "Final 10 ns sampled every 1 ns"
print "Expected number of production frames: 10"
print "=================================================="