Input.Lammps
Requirements:
To start with the following sections you need to have Lammps installed with following packages enabled:
Copy of all option by running “ccmake ../cmake” in lammps/build directory.
BUILD_MPI | ON |
---|---|
BUILD_OMP | ON |
BUILD_TESTING | ON |
CMAKE_POSITION_INDEPENDENT_COD | ON |
Kokkos_ENABLE_COMPLEX_ALIGN | ON |
Kokkos_ENABLE_DEPRECATED_CODE_ | ON |
Kokkos_ENABLE_DEPRECATION_WARN | ON |
Kokkos_ENABLE_IMPL_DESUL_ATOMI | ON |
Kokkos_ENABLE_LAUNCH_COMPILER | ON |
Kokkos_ENABLE_LIBDL | ON |
Kokkos_ENABLE_SERIAL | ON |
PKG_COMPRESS | ON |
PKG_EXTRA-COMPUTE | ON |
PKG_EXTRA-DUMP | ON |
PKG_EXTRA-FIX | ON |
PKG_EXTRA-MOLECULE | ON |
PKG_EXTRA-PAIR | ON |
PKG_KOKKOS | ON |
PKG_KSPACE | ON |
PKG_MANYBODY | ON |
PKG_MEAM | ON |
PKG_MOLECULE | ON |
PKG_MOLFILE | ON |
PKG_MPIIO | ON |
PKG_OPENMP | ON |
PKG_RIGID | ON |
WITH_GZIP | ON |
Note: Best way to write lammps input script based on your needs is to look for the documentation on official lammps website, here i have taken a simple simulation of cyclohexylamine in a periodic box of 60*60*60 cubic units. For this system we already have the data files which was created in DATA.LAMMPS section.
- Here we are not using the in.lmp file created by fftool instead we will write our own script from scratch
Data file
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
Main Parameters
units real # based on requirements choose one
atom\_style full # out of lots of option choose one
dimension 3 # 3 dimension x y z
boundary p p p # periodic boundary condition in all direction
#------------this is comment LAMMPS will ignore this line --------------------------------
Pair\_style lj/cut/coul/long 12 # lj potential having cutoff 12 ang
pair\_modify mix geometric tail yes # will calculate average values ε and σ b/w atoms
bond\_style harmonic # bond will interact harmonically
angle\_style harmonic # angle will interact in same manner
dihedral\_style opls # another style for interaction
kspace\_style pppm 1.0e-4 # required when atoms have charge
## Reading Data from .data files
read\_data data.lmp # datafile should be present in same directory
#read\_restart restart.\* # start simulation from latest restart file
## Atoms Settings
These parameters define the lj parameter for interaction between the individual atoms
For these parameters directly copy and paste from the file generated by fftool
pair\_coeff 1 1 0.170000 3.300000 # N00 N00
pair\_coeff 2 2 0.066000 3.500000 # C01 C01
pair\_coeff 3 3 0.066000 3.500000 # C02 C02
pair\_coeff 4 4 0.066000 3.500000 # C03 C03
pair\_coeff 5 5 0.066000 3.500000 # C04 C04
pair\_coeff 6 6 0.066000 3.500000 # C05 C05
pair\_coeff 7 7 0.066000 3.500000 # C06 C06
pair\_coeff 8 8 0.000000 0.000000 # H07 H07
pair\_coeff 9 9 0.000000 0.000000 # H08 H08
pair\_coeff 10 10 0.030000 2.500000 # H09 H09
pair\_coeff 11 11 0.030000 2.500000 # H0A H0A
pair\_coeff 12 12 0.030000 2.500000 # H0B H0B
pair\_coeff 13 13 0.030000 2.500000 # H0C H0C
pair\_coeff 14 14 0.030000 2.500000 # H0D H0D
pair\_coeff 15 15 0.030000 2.500000 # H0E H0E
pair\_coeff 16 16 0.030000 2.500000 # H0F H0F
pair\_coeff 17 17 0.030000 2.500000 # H0G H0G
pair\_coeff 18 18 0.030000 2.500000 # H0H H0H
pair\_coeff 19 19 0.030000 2.500000 # H0I H0I
pair\_coeff 20 20 0.030000 2.500000 # H0J H0J
## Simulation Settings
thermo\_style custom step time etotal ke pe evdwl ecoul elong temp press vol density
timestep 1 # timestep is 1 femtosecond
thermo 100 # will print thermodynamics output every 100 steps
dump dcd all dcd 5000 cha.dcd # this will take snapshot of all atom every 5000 steps
dump\_modify dcd unwrap yes # will not wrap the coordinate of atoms inside the P. box
## Minimisation
minimize 1.0e-4 1.0e-6 1000 10000
## Dynamics
fix mynve all nve # run in nve ensample
run 1000000 # run for 1000000 steps
unfix mynve
write\_restart restart.equil.\* # write restart file after 10 nano second
fix mynpt all npt temp 298.15 298.15 100.0 iso 1.0 1.0 1000
run 1000000
unfix mynpt
write\_restart restart.equil.\*
For the original version of input script please refer to git repository
Structure of data file
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
created by fftool
2000 atoms
2000 bonds
3900 angles
6100 dihedrals
20 atom types
20 bond types
39 angle types
61 dihedral types
0.000000 60.000000 xlo xhi
0.000000 60.000000 ylo yhi
0.000000 60.000000 zlo zhi
Masses
1 14.007 # N00
2 12.011 # C01
3 12.011 # C02
4 12.011 # C03
5 12.011 # C04
6 12.011 # C05
7 12.011 # C06
8 1.008 # H07
9 1.008 # H08
10 1.008 # H09
11 1.008 # H0A
12 1.008 # H0B
13 1.008 # H0C
14 1.008 # H0D
15 1.008 # H0E
16 1.008 # H0F
17 1.008 # H0G
18 1.008 # H0H
19 1.008 # H0I
20 1.008 # H0J
Bond Coeffs
1 381.999578 1.448000 # C01-N00
2 267.999704 1.529000 # C02-C01
3 267.999704 1.529000 # C03-C02
4 267.999704 1.529000 # C04-C03
5 267.999704 1.529000 # C05-C04
6 267.999704 1.529000 # C06-C05
7 433.999521 1.010000 # H07-N00
8 433.999521 1.010000 # H08-N00
9 339.999625 1.090000 # H09-C01
10 339.999625 1.090000 # H0A-C02
11 339.999625 1.090000 # H0B-C02
12 339.999625 1.090000 # H0C-C03
13 339.999625 1.090000 # H0D-C03
14 339.999625 1.090000 # H0E-C04
15 339.999625 1.090000 # H0F-C04
16 339.999625 1.090000 # H0G-C05
17 339.999625 1.090000 # H0H-C05
18 339.999625 1.090000 # H0I-C06
19 339.999625 1.090000 # H0J-C06
20 267.999704 1.529000 # C06-C01
Angle Coeffs
1 34.999961 109.500000 # C01-N00-H07
2 34.999961 109.500000 # C01-N00-H08
3 43.599952 106.400000 # H07-N00-H08
4 56.199938 109.470000 # N00-C01-C02
5 34.999961 109.500000 # N00-C01-H09
6 56.199938 109.470000 # N00-C01-C06
7 37.499959 110.700000 # C02-C01-H09
8 58.349936 112.700000 # C02-C01-C06
9 37.499959 110.700000 # C06-C01-H09
10 58.349936 112.700000 # C01-C02-C03
11 37.499959 110.700000 # C01-C02-H0A
12 37.499959 110.700000 # C01-C02-H0B
13 37.499959 110.700000 # C03-C02-H0A
14 37.499959 110.700000 # C03-C02-H0B
15 32.999964 107.800000 # H0A-C02-H0B
16 58.349936 112.700000 # C02-C03-C04
17 37.499959 110.700000 # C02-C03-H0C
18 37.499959 110.700000 # C02-C03-H0D
19 37.499959 110.700000 # C04-C03-H0C
20 37.499959 110.700000 # C04-C03-H0D
21 32.999964 107.800000 # H0C-C03-H0D
22 58.349936 112.700000 # C03-C04-C05
23 37.499959 110.700000 # C03-C04-H0E
24 37.499959 110.700000 # C03-C04-H0F
25 37.499959 110.700000 # C05-C04-H0E
26 37.499959 110.700000 # C05-C04-H0F
27 32.999964 107.800000 # H0E-C04-H0F
28 58.349936 112.700000 # C04-C05-C06
29 37.499959 110.700000 # C04-C05-H0G
30 37.499959 110.700000 # C04-C05-H0H
31 37.499959 110.700000 # C06-C05-H0G
32 37.499959 110.700000 # C06-C05-H0H
33 32.999964 107.800000 # H0G-C05-H0H
34 37.499959 110.700000 # C05-C06-H0I
35 37.499959 110.700000 # C05-C06-H0J
36 58.349936 112.700000 # C01-C06-C05
37 32.999964 107.800000 # H0I-C06-H0J
38 37.499959 110.700000 # C01-C06-H0I
39 37.499959 110.700000 # C01-C06-H0J
Dihedral Coeffs
1 -0.190000 -0.417000 0.418000 0.000000 # H07-N00-C01-C02
2 -0.190000 -0.417000 0.418000 0.000000 # H08-N00-C01-C02
3 0.000000 0.000000 0.400000 0.000000 # H09-C01-N00-H07
4 0.000000 0.000000 0.400000 0.000000 # H09-C01-N00-H08
5 -0.190000 -0.417000 0.418000 0.000000 # H07-N00-C01-C06
6 -0.190000 -0.417000 0.418000 0.000000 # H08-N00-C01-C06
7 2.391997 -0.673999 0.549999 0.000000 # C03-C02-C01-N00
8 0.000000 0.000000 0.300000 0.000000 # H09-C01-C02-C03
9 1.299999 -0.200000 0.200000 0.000000 # C06-C01-C02-C03
10 -1.012999 -0.708999 0.472999 0.000000 # H0A-C02-C01-N00
11 0.000000 0.000000 0.300000 0.000000 # H0A-C02-C01-H09
12 0.000000 0.000000 0.300000 0.000000 # H0A-C02-C01-C06
13 -1.012999 -0.708999 0.472999 0.000000 # H0B-C02-C01-N00
14 0.000000 0.000000 0.300000 0.000000 # H0B-C02-C01-H09
15 0.000000 0.000000 0.300000 0.000000 # H0B-C02-C01-C06
16 1.299999 -0.200000 0.200000 0.000000 # C04-C03-C02-C01
17 0.000000 0.000000 0.300000 0.000000 # H0A-C02-C03-C04
18 0.000000 0.000000 0.300000 0.000000 # H0B-C02-C03-C04
19 0.000000 0.000000 0.300000 0.000000 # H0C-C03-C02-C01
20 0.000000 0.000000 0.300000 0.000000 # H0C-C03-C02-H0A
21 0.000000 0.000000 0.300000 0.000000 # H0C-C03-C02-H0B
22 0.000000 0.000000 0.300000 0.000000 # H0D-C03-C02-C01
23 0.000000 0.000000 0.300000 0.000000 # H0D-C03-C02-H0A
24 0.000000 0.000000 0.300000 0.000000 # H0D-C03-C02-H0B
25 1.299999 -0.200000 0.200000 0.000000 # C05-C04-C03-C02
26 0.000000 0.000000 0.300000 0.000000 # H0C-C03-C04-C05
27 0.000000 0.000000 0.300000 0.000000 # H0D-C03-C04-C05
28 0.000000 0.000000 0.300000 0.000000 # H0E-C04-C03-C02
29 0.000000 0.000000 0.300000 0.000000 # H0E-C04-C03-H0C
30 0.000000 0.000000 0.300000 0.000000 # H0E-C04-C03-H0D
31 0.000000 0.000000 0.300000 0.000000 # H0F-C04-C03-C02
32 0.000000 0.000000 0.300000 0.000000 # H0F-C04-C03-H0C
33 0.000000 0.000000 0.300000 0.000000 # H0F-C04-C03-H0D
34 1.299999 -0.200000 0.200000 0.000000 # C06-C05-C04-C03
35 0.000000 0.000000 0.300000 0.000000 # H0E-C04-C05-C06
36 0.000000 0.000000 0.300000 0.000000 # H0F-C04-C05-C06
37 0.000000 0.000000 0.300000 0.000000 # H0G-C05-C04-C03
38 0.000000 0.000000 0.300000 0.000000 # H0G-C05-C04-H0E
39 0.000000 0.000000 0.300000 0.000000 # H0G-C05-C04-H0F
40 0.000000 0.000000 0.300000 0.000000 # H0H-C05-C04-C03
41 0.000000 0.000000 0.300000 0.000000 # H0H-C05-C04-H0E
42 0.000000 0.000000 0.300000 0.000000 # H0H-C05-C04-H0F
43 0.000000 0.000000 0.300000 0.000000 # H0I-C06-C05-C04
44 0.000000 0.000000 0.300000 0.000000 # H0I-C06-C05-H0G
45 0.000000 0.000000 0.300000 0.000000 # H0I-C06-C05-H0H
46 0.000000 0.000000 0.300000 0.000000 # H0J-C06-C05-C04
47 0.000000 0.000000 0.300000 0.000000 # H0J-C06-C05-H0G
48 0.000000 0.000000 0.300000 0.000000 # H0J-C06-C05-H0H
49 1.299999 -0.200000 0.200000 0.000000 # C04-C05-C06-C01
50 0.000000 0.000000 0.300000 0.000000 # H0G-C05-C06-C01
51 0.000000 0.000000 0.300000 0.000000 # H0H-C05-C06-C01
52 2.391997 -0.673999 0.549999 0.000000 # C05-C06-C01-N00
53 -1.012999 -0.708999 0.472999 0.000000 # H0I-C06-C01-N00
54 -1.012999 -0.708999 0.472999 0.000000 # H0J-C06-C01-N00
55 1.299999 -0.200000 0.200000 0.000000 # C05-C06-C01-C02
56 0.000000 0.000000 0.300000 0.000000 # H0I-C06-C01-C02
57 0.000000 0.000000 0.300000 0.000000 # H0J-C06-C01-C02
58 0.000000 0.000000 0.300000 0.000000 # H09-C01-C06-C05
59 0.000000 0.000000 0.300000 0.000000 # H0I-C06-C01-H09
60 0.000000 0.000000 0.300000 0.000000 # H0J-C06-C01-H09
61 0.000000 -1.000000 2.000000 0.000000 # H08-H07-N00-C01
Atoms
1 1 1 -0.916800 3.076601e+01 4.590737e+00 4.946386e+01 # N00 CHA
2 1 2 0.149700 3.010625e+01 4.901799e+00 5.073436e+01 # C01 CHA
3 1 3 -0.221000 2.980605e+01 6.402759e+00 5.085200e+01 # C02 CHA
4 1 4 -0.174200 2.868936e+01 6.864835e+00 4.991549e+01 # C03 CHA
5 1 5 -0.177100 2.742514e+01 6.029512e+00 5.009537e+01 # C04 CHA
6 1 6 -0.177600 2.770199e+01 4.534283e+00 4.995951e+01 # C05 CHA
7 1 7 -0.169300 2.882034e+01 4.078164e+00 5.088615e+01 # C06 CHA
8 1 8 0.330300 3.159215e+01 5.177764e+00 4.935588e+01 # H07 CHA
9 1 9 0.330300 3.015568e+01 4.820911e+00 4.868126e+01 # H08 CHA
10 1 10 0.112900 3.079897e+01 4.619586e+00 5.153570e+01 # H09 CHA
11 1 11 0.092200 3.071181e+01 6.991601e+00 5.066157e+01 # H0A CHA
12 1 12 0.092200 2.950896e+01 6.619343e+00 5.188662e+01 # H0B CHA
13 1 13 0.086300 2.902616e+01 6.805048e+00 4.887350e+01 # H0C CHA
14 1 14 0.086300 2.846138e+01 7.918687e+00 5.011317e+01 # H0D CHA
15 1 15 0.088900 2.667505e+01 6.334417e+00 4.935671e+01 # H0E CHA
16 1 16 0.088900 2.699822e+01 6.229823e+00 5.108605e+01 # H0F CHA
17 1 17 0.090400 2.796150e+01 4.303612e+00 4.891923e+01 # H0G CHA
18 1 18 0.090400 2.678929e+01 3.972739e+00 5.018800e+01 # H0H CHA
19 1 19 0.098600 2.902707e+01 3.014109e+00 5.071552e+01 # H0I CHA
20 1 20 0.098600 2.847147e+01 4.163155e+00 5.192378e+01 # H0J CHA
Log.lammps
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
LAMMPS (23 Jun 2022 - Update 2)
using 1 OpenMP thread(s) per MPI task
#========================Main Parameters==============================
clear
using 1 OpenMP thread(s) per MPI task
units real
atom\_style full
dimension 3
boundary p p p
#-------------------------------------------------------------------------
pair\_style lj/cut/coul/long 12
pair\_modify mix geometric tail yes
bond\_style harmonic
angle\_style harmonic
dihedral\_style opls
kspace\_style pppm 1.0e-4
#=======================Reading Data from .data files========================
read\_data data.lmp
Reading data file ...
orthogonal box = (0 0 0) to (60 60 60)
1 by 2 by 2 MPI processor grid
reading atoms ...
2000 atoms
scanning bonds ...
2 = max bonds/atom
scanning angles ...
6 = max angles/atom
scanning dihedrals ...
15 = max dihedrals/atom
reading bonds ...
2000 bonds
reading angles ...
3900 angles
reading dihedrals ...
6100 dihedrals
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
4 = max # of 1-2 neighbors
8 = max # of 1-3 neighbors
14 = max # of 1-4 neighbors
17 = max # of special neighbors
special bonds CPU = 0.001 seconds
read\_data CPU = 0.022 seconds
#read\_restart restart.min.\*
#========================Atoms Settings======================================
pair\_coeff 1 1 0.170000 3.300000 # N00 N00
pair\_coeff 2 2 0.066000 3.500000 # C01 C01
pair\_coeff 3 3 0.066000 3.500000 # C02 C02
pair\_coeff 4 4 0.066000 3.500000 # C03 C03
pair\_coeff 5 5 0.066000 3.500000 # C04 C04
pair\_coeff 6 6 0.066000 3.500000 # C05 C05
pair\_coeff 7 7 0.066000 3.500000 # C06 C06
pair\_coeff 8 8 0.000000 0.000000 # H07 H07
pair\_coeff 9 9 0.000000 0.000000 # H08 H08
pair\_coeff 10 10 0.030000 2.500000 # H09 H09
pair\_coeff 11 11 0.030000 2.500000 # H0A H0A
pair\_coeff 12 12 0.030000 2.500000 # H0B H0B
pair\_coeff 13 13 0.030000 2.500000 # H0C H0C
pair\_coeff 14 14 0.030000 2.500000 # H0D H0D
pair\_coeff 15 15 0.030000 2.500000 # H0E H0E
pair\_coeff 16 16 0.030000 2.500000 # H0F H0F
pair\_coeff 17 17 0.030000 2.500000 # H0G H0G
pair\_coeff 18 18 0.030000 2.500000 # H0H H0H
pair\_coeff 19 19 0.030000 2.500000 # H0I H0I
pair\_coeff 20 20 0.030000 2.500000 # H0J H0J
neighbor 4.0 bin
neigh\_modify every 1 delay 0 check yes
#=======================Simulation Settings=============================================
thermo\_style custom step time etotal ke pe evdwl ecoul elong temp press vol density
thermo\_modify flush yes
timestep 1
thermo 100
dump dcd all dcd 5000 water.dcd
dump\_modify dcd unwrap yes
#=======================Minimisation=====
minimize 1.0e-4 1.0e-6 1000 10000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 0.17877424
grid = 15 15 15
stencil order = 5
estimated absolute RMS force accuracy = 0.017636853
estimated relative force accuracy = 5.311286e-05
using double precision KISS FFT
3d grid and FFT values/proc = 4116 960
Generated 190 of 190 mixed pair\_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 16
ghost atom cutoff = 16
binsize = 8, bins = 8 8 8
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 15.51 | 15.51 | 15.52 Mbytes
Step Time TotEng KinEng PotEng E\_vdwl E\_coul E\_long Temp Press Volume Density
0 0 940.80977 0 940.80977 -152.46208 4922.5173 -4495.2708 0 -929.99957 216000 0.076244106
39 39 726.29374 0 726.29374 -75.721068 4679.1156 -4495.0257 0 -62.319773 216000 0.076244106
Loop time of 0.16002 on 4 procs for 39 steps with 2000 atoms
94.3% CPU use with 4 MPI tasks x 1 OpenMP threads
This is the output of above system