forked from lijiext/lammps
Added Kolmogorov-Crespi potential
This commit is contained in:
parent
49e83b4348
commit
a1b40b902d
|
@ -0,0 +1,12 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{eqnarray*}
|
||||
E & = & \frac{1}{2} \sum_i \sum_{j \neq i} V_{ij} \\
|
||||
V_{ij} & = & e^{-\lambda(r_{ij} -z_0}) \left[ C + f(\rho_{ij}) + f(\rho_{ji}) - A \left( \frac{r_{ij}}{z_0}\right)^{-6}\right] \\
|
||||
\rho_{ij}^2 & = & x_{ij}^2 + y_{ij}^2 \\
|
||||
f(\rho) & = & e^{-(\rho/\delta)^2} \sum_{n=0}^2 C_{2n} { \rho/\delta }^{2n}
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,55 @@
|
|||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
pair_style kolmogorov/crespi/z command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
pair_style kolmogorov/crespi/z cutoff :pre
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style hybrid/overlay kolmogorov/crespi/z 20.0
|
||||
pair_coeff * * none
|
||||
pair_coeff 1 2 kolmogorov/crespi/z CC.KC C C :pre
|
||||
|
||||
pair_style hybrid/overlay rebo kolmogorov/crespi/z 14.0
|
||||
pair_coeff * * rebo CH.airebo C C
|
||||
pair_coeff 1 2 kolmogorov/crespi/z CC.KC C C :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {kolmogorov/crespi/z} style computes the Kolmogorov-Crespi interaction potential as
|
||||
described in "(KC)"_#KC. An important simplification is made, which is to
|
||||
take all normals along the z-axis.
|
||||
|
||||
:c,image(Eqs/pair_kolmogorov_crespi_z.jpg)
|
||||
|
||||
The parameter file (e.g. CC.KC), is intended for use with metal
|
||||
"units"_units.html, with energies in meV.
|
||||
|
||||
This potential must be used in combination with hybrid/overlay.
|
||||
Other interactions can be set to zero using pair_style {none}.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This fix is part of the USER-MISC package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"pair_coeff"_pair_coeff.html
|
||||
"pair_none"_pair_none.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(KC)
|
||||
[(KC)] Kolmogorov, Crespi, Phys. Rev. B 71, 235415 (2005)
|
|
@ -39,6 +39,7 @@ Pair Styles :h1
|
|||
pair_hbond_dreiding
|
||||
pair_hybrid
|
||||
pair_kim
|
||||
pair_kolmogorov_crespi_z
|
||||
pair_lcbop
|
||||
pair_line_lj
|
||||
pair_list
|
||||
|
|
|
@ -0,0 +1,266 @@
|
|||
info: xyz2data 18:31, Mon 27-02-2017
|
||||
256 atoms
|
||||
2 atom types
|
||||
|
||||
0.00000000 17.04000000 xlo xhi
|
||||
0.00000000 19.67609717 ylo yhi
|
||||
-20.00000000 40.00000000 zlo zhi
|
||||
|
||||
Atoms
|
||||
|
||||
1 1 0.00000000 0.00000000 0.00000000
|
||||
2 1 1.42000000 0.00000000 0.00000000
|
||||
3 2 1.42000000 0.00000000 3.30000000
|
||||
4 2 2.84000000 0.00000000 3.30000000
|
||||
5 1 2.13000000 1.22975607 0.00000000
|
||||
6 1 3.55000000 1.22975607 0.00000000
|
||||
7 2 3.55000000 1.22975607 3.30000000
|
||||
8 2 4.97000000 1.22975607 3.30000000
|
||||
9 1 0.00000000 2.45951215 0.00000000
|
||||
10 1 1.42000000 2.45951215 0.00000000
|
||||
11 2 1.42000000 2.45951215 3.30000000
|
||||
12 2 2.84000000 2.45951215 3.30000000
|
||||
13 1 2.13000000 3.68926822 0.00000000
|
||||
14 1 3.55000000 3.68926822 0.00000000
|
||||
15 2 3.55000000 3.68926822 3.30000000
|
||||
16 2 4.97000000 3.68926822 3.30000000
|
||||
17 1 0.00000000 4.91902429 0.00000000
|
||||
18 1 1.42000000 4.91902429 0.00000000
|
||||
19 2 1.42000000 4.91902429 3.30000000
|
||||
20 2 2.84000000 4.91902429 3.30000000
|
||||
21 1 2.13000000 6.14878037 0.00000000
|
||||
22 1 3.55000000 6.14878037 0.00000000
|
||||
23 2 3.55000000 6.14878037 3.30000000
|
||||
24 2 4.97000000 6.14878037 3.30000000
|
||||
25 1 0.00000000 7.37853644 0.00000000
|
||||
26 1 1.42000000 7.37853644 0.00000000
|
||||
27 2 1.42000000 7.37853644 3.30000000
|
||||
28 2 2.84000000 7.37853644 3.30000000
|
||||
29 1 2.13000000 8.60829251 0.00000000
|
||||
30 1 3.55000000 8.60829251 0.00000000
|
||||
31 2 3.55000000 8.60829251 3.30000000
|
||||
32 2 4.97000000 8.60829251 3.30000000
|
||||
33 1 0.00000000 9.83804859 0.00000000
|
||||
34 1 1.42000000 9.83804859 0.00000000
|
||||
35 2 1.42000000 9.83804859 3.30000000
|
||||
36 2 2.84000000 9.83804859 3.30000000
|
||||
37 1 2.13000000 11.06780466 0.00000000
|
||||
38 1 3.55000000 11.06780466 0.00000000
|
||||
39 2 3.55000000 11.06780466 3.30000000
|
||||
40 2 4.97000000 11.06780466 3.30000000
|
||||
41 1 0.00000000 12.29756073 0.00000000
|
||||
42 1 1.42000000 12.29756073 0.00000000
|
||||
43 2 1.42000000 12.29756073 3.30000000
|
||||
44 2 2.84000000 12.29756073 3.30000000
|
||||
45 1 2.13000000 13.52731681 0.00000000
|
||||
46 1 3.55000000 13.52731681 0.00000000
|
||||
47 2 3.55000000 13.52731681 3.30000000
|
||||
48 2 4.97000000 13.52731681 3.30000000
|
||||
49 1 0.00000000 14.75707288 0.00000000
|
||||
50 1 1.42000000 14.75707288 0.00000000
|
||||
51 2 1.42000000 14.75707288 3.30000000
|
||||
52 2 2.84000000 14.75707288 3.30000000
|
||||
53 1 2.13000000 15.98682895 0.00000000
|
||||
54 1 3.55000000 15.98682895 0.00000000
|
||||
55 2 3.55000000 15.98682895 3.30000000
|
||||
56 2 4.97000000 15.98682895 3.30000000
|
||||
57 1 0.00000000 17.21658503 0.00000000
|
||||
58 1 1.42000000 17.21658503 0.00000000
|
||||
59 2 1.42000000 17.21658503 3.30000000
|
||||
60 2 2.84000000 17.21658503 3.30000000
|
||||
61 1 2.13000000 18.44634110 0.00000000
|
||||
62 1 3.55000000 18.44634110 0.00000000
|
||||
63 2 3.55000000 18.44634110 3.30000000
|
||||
64 2 4.97000000 18.44634110 3.30000000
|
||||
65 1 4.26000000 0.00000000 0.00000000
|
||||
66 1 5.68000000 0.00000000 0.00000000
|
||||
67 2 5.68000000 0.00000000 3.30000000
|
||||
68 2 7.10000000 0.00000000 3.30000000
|
||||
69 1 6.39000000 1.22975607 0.00000000
|
||||
70 1 7.81000000 1.22975607 0.00000000
|
||||
71 2 7.81000000 1.22975607 3.30000000
|
||||
72 2 9.23000000 1.22975607 3.30000000
|
||||
73 1 4.26000000 2.45951215 0.00000000
|
||||
74 1 5.68000000 2.45951215 0.00000000
|
||||
75 2 5.68000000 2.45951215 3.30000000
|
||||
76 2 7.10000000 2.45951215 3.30000000
|
||||
77 1 6.39000000 3.68926822 0.00000000
|
||||
78 1 7.81000000 3.68926822 0.00000000
|
||||
79 2 7.81000000 3.68926822 3.30000000
|
||||
80 2 9.23000000 3.68926822 3.30000000
|
||||
81 1 4.26000000 4.91902429 0.00000000
|
||||
82 1 5.68000000 4.91902429 0.00000000
|
||||
83 2 5.68000000 4.91902429 3.30000000
|
||||
84 2 7.10000000 4.91902429 3.30000000
|
||||
85 1 6.39000000 6.14878037 0.00000000
|
||||
86 1 7.81000000 6.14878037 0.00000000
|
||||
87 2 7.81000000 6.14878037 3.30000000
|
||||
88 2 9.23000000 6.14878037 3.30000000
|
||||
89 1 4.26000000 7.37853644 0.00000000
|
||||
90 1 5.68000000 7.37853644 0.00000000
|
||||
91 2 5.68000000 7.37853644 3.30000000
|
||||
92 2 7.10000000 7.37853644 3.30000000
|
||||
93 1 6.39000000 8.60829251 0.00000000
|
||||
94 1 7.81000000 8.60829251 0.00000000
|
||||
95 2 7.81000000 8.60829251 3.30000000
|
||||
96 2 9.23000000 8.60829251 3.30000000
|
||||
97 1 4.26000000 9.83804859 0.00000000
|
||||
98 1 5.68000000 9.83804859 0.00000000
|
||||
99 2 5.68000000 9.83804859 3.30000000
|
||||
100 2 7.10000000 9.83804859 3.30000000
|
||||
101 1 6.39000000 11.06780466 0.00000000
|
||||
102 1 7.81000000 11.06780466 0.00000000
|
||||
103 2 7.81000000 11.06780466 3.30000000
|
||||
104 2 9.23000000 11.06780466 3.30000000
|
||||
105 1 4.26000000 12.29756073 0.00000000
|
||||
106 1 5.68000000 12.29756073 0.00000000
|
||||
107 2 5.68000000 12.29756073 3.30000000
|
||||
108 2 7.10000000 12.29756073 3.30000000
|
||||
109 1 6.39000000 13.52731681 0.00000000
|
||||
110 1 7.81000000 13.52731681 0.00000000
|
||||
111 2 7.81000000 13.52731681 3.30000000
|
||||
112 2 9.23000000 13.52731681 3.30000000
|
||||
113 1 4.26000000 14.75707288 0.00000000
|
||||
114 1 5.68000000 14.75707288 0.00000000
|
||||
115 2 5.68000000 14.75707288 3.30000000
|
||||
116 2 7.10000000 14.75707288 3.30000000
|
||||
117 1 6.39000000 15.98682895 0.00000000
|
||||
118 1 7.81000000 15.98682895 0.00000000
|
||||
119 2 7.81000000 15.98682895 3.30000000
|
||||
120 2 9.23000000 15.98682895 3.30000000
|
||||
121 1 4.26000000 17.21658503 0.00000000
|
||||
122 1 5.68000000 17.21658503 0.00000000
|
||||
123 2 5.68000000 17.21658503 3.30000000
|
||||
124 2 7.10000000 17.21658503 3.30000000
|
||||
125 1 6.39000000 18.44634110 0.00000000
|
||||
126 1 7.81000000 18.44634110 0.00000000
|
||||
127 2 7.81000000 18.44634110 3.30000000
|
||||
128 2 9.23000000 18.44634110 3.30000000
|
||||
129 1 8.52000000 0.00000000 0.00000000
|
||||
130 1 9.94000000 0.00000000 0.00000000
|
||||
131 2 9.94000000 0.00000000 3.30000000
|
||||
132 2 11.36000000 0.00000000 3.30000000
|
||||
133 1 10.65000000 1.22975607 0.00000000
|
||||
134 1 12.07000000 1.22975607 0.00000000
|
||||
135 2 12.07000000 1.22975607 3.30000000
|
||||
136 2 13.49000000 1.22975607 3.30000000
|
||||
137 1 8.52000000 2.45951215 0.00000000
|
||||
138 1 9.94000000 2.45951215 0.00000000
|
||||
139 2 9.94000000 2.45951215 3.30000000
|
||||
140 2 11.36000000 2.45951215 3.30000000
|
||||
141 1 10.65000000 3.68926822 0.00000000
|
||||
142 1 12.07000000 3.68926822 0.00000000
|
||||
143 2 12.07000000 3.68926822 3.30000000
|
||||
144 2 13.49000000 3.68926822 3.30000000
|
||||
145 1 8.52000000 4.91902429 0.00000000
|
||||
146 1 9.94000000 4.91902429 0.00000000
|
||||
147 2 9.94000000 4.91902429 3.30000000
|
||||
148 2 11.36000000 4.91902429 3.30000000
|
||||
149 1 10.65000000 6.14878037 0.00000000
|
||||
150 1 12.07000000 6.14878037 0.00000000
|
||||
151 2 12.07000000 6.14878037 3.30000000
|
||||
152 2 13.49000000 6.14878037 3.30000000
|
||||
153 1 8.52000000 7.37853644 0.00000000
|
||||
154 1 9.94000000 7.37853644 0.00000000
|
||||
155 2 9.94000000 7.37853644 3.30000000
|
||||
156 2 11.36000000 7.37853644 3.30000000
|
||||
157 1 10.65000000 8.60829251 0.00000000
|
||||
158 1 12.07000000 8.60829251 0.00000000
|
||||
159 2 12.07000000 8.60829251 3.30000000
|
||||
160 2 13.49000000 8.60829251 3.30000000
|
||||
161 1 8.52000000 9.83804859 0.00000000
|
||||
162 1 9.94000000 9.83804859 0.00000000
|
||||
163 2 9.94000000 9.83804859 3.30000000
|
||||
164 2 11.36000000 9.83804859 3.30000000
|
||||
165 1 10.65000000 11.06780466 0.00000000
|
||||
166 1 12.07000000 11.06780466 0.00000000
|
||||
167 2 12.07000000 11.06780466 3.30000000
|
||||
168 2 13.49000000 11.06780466 3.30000000
|
||||
169 1 8.52000000 12.29756073 0.00000000
|
||||
170 1 9.94000000 12.29756073 0.00000000
|
||||
171 2 9.94000000 12.29756073 3.30000000
|
||||
172 2 11.36000000 12.29756073 3.30000000
|
||||
173 1 10.65000000 13.52731681 0.00000000
|
||||
174 1 12.07000000 13.52731681 0.00000000
|
||||
175 2 12.07000000 13.52731681 3.30000000
|
||||
176 2 13.49000000 13.52731681 3.30000000
|
||||
177 1 8.52000000 14.75707288 0.00000000
|
||||
178 1 9.94000000 14.75707288 0.00000000
|
||||
179 2 9.94000000 14.75707288 3.30000000
|
||||
180 2 11.36000000 14.75707288 3.30000000
|
||||
181 1 10.65000000 15.98682895 0.00000000
|
||||
182 1 12.07000000 15.98682895 0.00000000
|
||||
183 2 12.07000000 15.98682895 3.30000000
|
||||
184 2 13.49000000 15.98682895 3.30000000
|
||||
185 1 8.52000000 17.21658503 0.00000000
|
||||
186 1 9.94000000 17.21658503 0.00000000
|
||||
187 2 9.94000000 17.21658503 3.30000000
|
||||
188 2 11.36000000 17.21658503 3.30000000
|
||||
189 1 10.65000000 18.44634110 0.00000000
|
||||
190 1 12.07000000 18.44634110 0.00000000
|
||||
191 2 12.07000000 18.44634110 3.30000000
|
||||
192 2 13.49000000 18.44634110 3.30000000
|
||||
193 1 12.78000000 0.00000000 0.00000000
|
||||
194 1 14.20000000 0.00000000 0.00000000
|
||||
195 2 14.20000000 0.00000000 3.30000000
|
||||
196 2 15.62000000 0.00000000 3.30000000
|
||||
197 1 14.91000000 1.22975607 0.00000000
|
||||
198 1 16.33000000 1.22975607 0.00000000
|
||||
199 2 16.33000000 1.22975607 3.30000000
|
||||
200 2 17.75000000 1.22975607 3.30000000
|
||||
201 1 12.78000000 2.45951215 0.00000000
|
||||
202 1 14.20000000 2.45951215 0.00000000
|
||||
203 2 14.20000000 2.45951215 3.30000000
|
||||
204 2 15.62000000 2.45951215 3.30000000
|
||||
205 1 14.91000000 3.68926822 0.00000000
|
||||
206 1 16.33000000 3.68926822 0.00000000
|
||||
207 2 16.33000000 3.68926822 3.30000000
|
||||
208 2 17.75000000 3.68926822 3.30000000
|
||||
209 1 12.78000000 4.91902429 0.00000000
|
||||
210 1 14.20000000 4.91902429 0.00000000
|
||||
211 2 14.20000000 4.91902429 3.30000000
|
||||
212 2 15.62000000 4.91902429 3.30000000
|
||||
213 1 14.91000000 6.14878037 0.00000000
|
||||
214 1 16.33000000 6.14878037 0.00000000
|
||||
215 2 16.33000000 6.14878037 3.30000000
|
||||
216 2 17.75000000 6.14878037 3.30000000
|
||||
217 1 12.78000000 7.37853644 0.00000000
|
||||
218 1 14.20000000 7.37853644 0.00000000
|
||||
219 2 14.20000000 7.37853644 3.30000000
|
||||
220 2 15.62000000 7.37853644 3.30000000
|
||||
221 1 14.91000000 8.60829251 0.00000000
|
||||
222 1 16.33000000 8.60829251 0.00000000
|
||||
223 2 16.33000000 8.60829251 3.30000000
|
||||
224 2 17.75000000 8.60829251 3.30000000
|
||||
225 1 12.78000000 9.83804859 0.00000000
|
||||
226 1 14.20000000 9.83804859 0.00000000
|
||||
227 2 14.20000000 9.83804859 3.30000000
|
||||
228 2 15.62000000 9.83804859 3.30000000
|
||||
229 1 14.91000000 11.06780466 0.00000000
|
||||
230 1 16.33000000 11.06780466 0.00000000
|
||||
231 2 16.33000000 11.06780466 3.30000000
|
||||
232 2 17.75000000 11.06780466 3.30000000
|
||||
233 1 12.78000000 12.29756073 0.00000000
|
||||
234 1 14.20000000 12.29756073 0.00000000
|
||||
235 2 14.20000000 12.29756073 3.30000000
|
||||
236 2 15.62000000 12.29756073 3.30000000
|
||||
237 1 14.91000000 13.52731681 0.00000000
|
||||
238 1 16.33000000 13.52731681 0.00000000
|
||||
239 2 16.33000000 13.52731681 3.30000000
|
||||
240 2 17.75000000 13.52731681 3.30000000
|
||||
241 1 12.78000000 14.75707288 0.00000000
|
||||
242 1 14.20000000 14.75707288 0.00000000
|
||||
243 2 14.20000000 14.75707288 3.30000000
|
||||
244 2 15.62000000 14.75707288 3.30000000
|
||||
245 1 14.91000000 15.98682895 0.00000000
|
||||
246 1 16.33000000 15.98682895 0.00000000
|
||||
247 2 16.33000000 15.98682895 3.30000000
|
||||
248 2 17.75000000 15.98682895 3.30000000
|
||||
249 1 12.78000000 17.21658503 0.00000000
|
||||
250 1 14.20000000 17.21658503 0.00000000
|
||||
251 2 14.20000000 17.21658503 3.30000000
|
||||
252 2 15.62000000 17.21658503 3.30000000
|
||||
253 1 14.91000000 18.44634110 0.00000000
|
||||
254 1 16.33000000 18.44634110 0.00000000
|
||||
255 2 16.33000000 18.44634110 3.30000000
|
||||
256 2 17.75000000 18.44634110 3.30000000
|
|
@ -0,0 +1,139 @@
|
|||
info: xyz2data 11:52, Tue 28-02-2017
|
||||
129 atoms
|
||||
2 atom types
|
||||
|
||||
0.00000000 17.04000000 xlo xhi
|
||||
0.00000000 19.67609717 ylo yhi
|
||||
-10.00000000 40.00000000 zlo zhi
|
||||
|
||||
Atoms
|
||||
|
||||
1 1 0.00000000 0.00000000 0.00000000
|
||||
2 1 1.42000000 0.00000000 0.00000000
|
||||
3 1 2.13000000 1.22975607 0.00000000
|
||||
4 1 3.55000000 1.22975607 0.00000000
|
||||
5 1 0.00000000 2.45951215 0.00000000
|
||||
6 1 1.42000000 2.45951215 0.00000000
|
||||
7 1 2.13000000 3.68926822 0.00000000
|
||||
8 1 3.55000000 3.68926822 0.00000000
|
||||
9 1 0.00000000 4.91902429 0.00000000
|
||||
10 1 1.42000000 4.91902429 0.00000000
|
||||
11 1 2.13000000 6.14878037 0.00000000
|
||||
12 1 3.55000000 6.14878037 0.00000000
|
||||
13 1 0.00000000 7.37853644 0.00000000
|
||||
14 1 1.42000000 7.37853644 0.00000000
|
||||
15 1 2.13000000 8.60829251 0.00000000
|
||||
16 1 3.55000000 8.60829251 0.00000000
|
||||
17 1 0.00000000 9.83804859 0.00000000
|
||||
18 1 1.42000000 9.83804859 0.00000000
|
||||
19 1 2.13000000 11.06780466 0.00000000
|
||||
20 1 3.55000000 11.06780466 0.00000000
|
||||
21 1 0.00000000 12.29756073 0.00000000
|
||||
22 1 1.42000000 12.29756073 0.00000000
|
||||
23 1 2.13000000 13.52731681 0.00000000
|
||||
24 1 3.55000000 13.52731681 0.00000000
|
||||
25 1 0.00000000 14.75707288 0.00000000
|
||||
26 1 1.42000000 14.75707288 0.00000000
|
||||
27 1 2.13000000 15.98682895 0.00000000
|
||||
28 1 3.55000000 15.98682895 0.00000000
|
||||
29 1 0.00000000 17.21658503 0.00000000
|
||||
30 1 1.42000000 17.21658503 0.00000000
|
||||
31 1 2.13000000 18.44634110 0.00000000
|
||||
32 1 3.55000000 18.44634110 0.00000000
|
||||
33 1 4.26000000 0.00000000 0.00000000
|
||||
34 1 5.68000000 0.00000000 0.00000000
|
||||
35 1 6.39000000 1.22975607 0.00000000
|
||||
36 1 7.81000000 1.22975607 0.00000000
|
||||
37 1 4.26000000 2.45951215 0.00000000
|
||||
38 1 5.68000000 2.45951215 0.00000000
|
||||
39 1 6.39000000 3.68926822 0.00000000
|
||||
40 1 7.81000000 3.68926822 0.00000000
|
||||
41 1 4.26000000 4.91902429 0.00000000
|
||||
42 1 5.68000000 4.91902429 0.00000000
|
||||
43 1 6.39000000 6.14878037 0.00000000
|
||||
44 1 7.81000000 6.14878037 0.00000000
|
||||
45 1 4.26000000 7.37853644 0.00000000
|
||||
46 1 5.68000000 7.37853644 0.00000000
|
||||
47 1 6.39000000 8.60829251 0.00000000
|
||||
48 1 7.81000000 8.60829251 0.00000000
|
||||
49 1 4.26000000 9.83804859 0.00000000
|
||||
50 1 5.68000000 9.83804859 0.00000000
|
||||
51 1 6.39000000 11.06780466 0.00000000
|
||||
52 1 7.81000000 11.06780466 0.00000000
|
||||
53 1 4.26000000 12.29756073 0.00000000
|
||||
54 1 5.68000000 12.29756073 0.00000000
|
||||
55 1 6.39000000 13.52731681 0.00000000
|
||||
56 1 7.81000000 13.52731681 0.00000000
|
||||
57 1 4.26000000 14.75707288 0.00000000
|
||||
58 1 5.68000000 14.75707288 0.00000000
|
||||
59 1 6.39000000 15.98682895 0.00000000
|
||||
60 1 7.81000000 15.98682895 0.00000000
|
||||
61 1 4.26000000 17.21658503 0.00000000
|
||||
62 1 5.68000000 17.21658503 0.00000000
|
||||
63 1 6.39000000 18.44634110 0.00000000
|
||||
64 1 7.81000000 18.44634110 0.00000000
|
||||
65 1 8.52000000 0.00000000 0.00000000
|
||||
66 1 9.94000000 0.00000000 0.00000000
|
||||
67 1 10.65000000 1.22975607 0.00000000
|
||||
68 1 12.07000000 1.22975607 0.00000000
|
||||
69 1 8.52000000 2.45951215 0.00000000
|
||||
70 1 9.94000000 2.45951215 0.00000000
|
||||
71 1 10.65000000 3.68926822 0.00000000
|
||||
72 1 12.07000000 3.68926822 0.00000000
|
||||
73 1 8.52000000 4.91902429 0.00000000
|
||||
74 1 9.94000000 4.91902429 0.00000000
|
||||
75 1 10.65000000 6.14878037 0.00000000
|
||||
76 1 12.07000000 6.14878037 0.00000000
|
||||
77 1 8.52000000 7.37853644 0.00000000
|
||||
78 1 9.94000000 7.37853644 0.00000000
|
||||
79 1 10.65000000 8.60829251 0.00000000
|
||||
80 1 12.07000000 8.60829251 0.00000000
|
||||
81 1 8.52000000 9.83804859 0.00000000
|
||||
82 1 9.94000000 9.83804859 0.00000000
|
||||
83 1 10.65000000 11.06780466 0.00000000
|
||||
84 1 12.07000000 11.06780466 0.00000000
|
||||
85 1 8.52000000 12.29756073 0.00000000
|
||||
86 1 9.94000000 12.29756073 0.00000000
|
||||
87 1 10.65000000 13.52731681 0.00000000
|
||||
88 1 12.07000000 13.52731681 0.00000000
|
||||
89 1 8.52000000 14.75707288 0.00000000
|
||||
90 1 9.94000000 14.75707288 0.00000000
|
||||
91 1 10.65000000 15.98682895 0.00000000
|
||||
92 1 12.07000000 15.98682895 0.00000000
|
||||
93 1 8.52000000 17.21658503 0.00000000
|
||||
94 1 9.94000000 17.21658503 0.00000000
|
||||
95 1 10.65000000 18.44634110 0.00000000
|
||||
96 1 12.07000000 18.44634110 0.00000000
|
||||
97 1 12.78000000 0.00000000 0.00000000
|
||||
98 1 14.20000000 0.00000000 0.00000000
|
||||
99 1 14.91000000 1.22975607 0.00000000
|
||||
100 1 16.33000000 1.22975607 0.00000000
|
||||
101 1 12.78000000 2.45951215 0.00000000
|
||||
102 1 14.20000000 2.45951215 0.00000000
|
||||
103 1 14.91000000 3.68926822 0.00000000
|
||||
104 1 16.33000000 3.68926822 0.00000000
|
||||
105 1 12.78000000 4.91902429 0.00000000
|
||||
106 1 14.20000000 4.91902429 0.00000000
|
||||
107 1 14.91000000 6.14878037 0.00000000
|
||||
108 1 16.33000000 6.14878037 0.00000000
|
||||
109 1 12.78000000 7.37853644 0.00000000
|
||||
110 1 14.20000000 7.37853644 0.00000000
|
||||
111 1 14.91000000 8.60829251 0.00000000
|
||||
112 1 16.33000000 8.60829251 0.00000000
|
||||
113 1 12.78000000 9.83804859 0.00000000
|
||||
114 1 14.20000000 9.83804859 0.00000000
|
||||
115 1 14.91000000 11.06780466 0.00000000
|
||||
116 1 16.33000000 11.06780466 0.00000000
|
||||
117 1 12.78000000 12.29756073 0.00000000
|
||||
118 1 14.20000000 12.29756073 0.00000000
|
||||
119 1 14.91000000 13.52731681 0.00000000
|
||||
120 1 16.33000000 13.52731681 0.00000000
|
||||
121 1 12.78000000 14.75707288 0.00000000
|
||||
122 1 14.20000000 14.75707288 0.00000000
|
||||
123 1 14.91000000 15.98682895 0.00000000
|
||||
124 1 16.33000000 15.98682895 0.00000000
|
||||
125 1 12.78000000 17.21658503 0.00000000
|
||||
126 1 14.20000000 17.21658503 0.00000000
|
||||
127 1 14.91000000 18.44634110 0.00000000
|
||||
128 1 16.33000000 18.44634110 0.00000000
|
||||
129 2 10.00000000 10.00000000 3.30000000
|
|
@ -0,0 +1,45 @@
|
|||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style atomic
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data data.graphene-adsorbant # read lammps data file
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
# Separate atom groups
|
||||
group membrane type 1
|
||||
group adsorbant type 2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay kolmogorov/crespi/z 14.0
|
||||
####################################################################
|
||||
pair_coeff * * none
|
||||
pair_coeff 1 2 kolmogorov/crespi/z CC.KC C C # long-range
|
||||
####################################################################
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.0001
|
||||
fix thermostat adsorbant nve
|
||||
fix rigid_membrane membrane setforce 0 0 0
|
||||
compute COM1 membrane com
|
||||
compute COM2 adsorbant com
|
||||
############################
|
||||
|
||||
# Output
|
||||
#dump 1 all xyz 100 trajec.xyz
|
||||
#dump_modify 1 format line "%s %12.6f %12.6f %12.6f" element "C" "C"
|
||||
thermo 100
|
||||
thermo_style custom step time etotal pe temp c_COM1[3] c_COM2[3] # spcpu
|
||||
thermo_modify line one format float %14.8f
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 10000
|
|
@ -0,0 +1,45 @@
|
|||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style atomic
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data data.bilayer-graphene # read lammps data file
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
# Separate atom groups
|
||||
group membrane type 1
|
||||
group adsorbant type 2
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo kolmogorov/crespi/z 14.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.airebo C C # chemical
|
||||
pair_coeff 1 2 kolmogorov/crespi/z CC.KC C C # long-range
|
||||
####################################################################
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.0001
|
||||
velocity all create 300.0 12345
|
||||
fix thermostat all nve
|
||||
compute COM1 membrane com
|
||||
compute COM2 adsorbant com
|
||||
############################
|
||||
|
||||
# Output
|
||||
#dump 1 all xyz 100 trajec.xyz
|
||||
#dump_modify 1 format line "%s %12.6f %12.6f %12.6f" element "C" "C"
|
||||
thermo 10
|
||||
thermo_style custom step time etotal pe temp c_COM1[3] c_COM2[3] # spcpu
|
||||
thermo_modify line one format float %14.8f
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
|
@ -0,0 +1,189 @@
|
|||
LAMMPS (17 Nov 2016)
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style atomic
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data data.graphene-adsorbant # read lammps data file
|
||||
orthogonal box = (0 0 -10) to (17.04 19.6761 40)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
129 atoms
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
# Separate atom groups
|
||||
group membrane type 1
|
||||
128 atoms in group membrane
|
||||
group adsorbant type 2
|
||||
1 atoms in group adsorbant
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay kolmogorov/crespi/z 14.0
|
||||
####################################################################
|
||||
pair_coeff * * none
|
||||
pair_coeff 1 2 kolmogorov/crespi/z CC.KC C C # long-range
|
||||
####################################################################
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.0001
|
||||
fix thermostat adsorbant nve
|
||||
fix rigid_membrane membrane setforce 0 0 0
|
||||
compute COM1 membrane com
|
||||
compute COM2 adsorbant com
|
||||
############################
|
||||
|
||||
# Output
|
||||
#dump 1 all xyz 100 trajec.xyz
|
||||
#dump_modify 1 format line "%s %12.6f %12.6f %12.6f" element "C" "C"
|
||||
thermo 100
|
||||
thermo_style custom step time etotal pe temp c_COM1[3] c_COM2[3] # spcpu
|
||||
thermo_modify line one format float %14.8f
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 10000
|
||||
Neighbor list info ...
|
||||
2 neighbor list requests
|
||||
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 = 3 3 7
|
||||
Memory usage per processor = 2.48399 Mbytes
|
||||
Step Time TotEng PotEng Temp c_COM1[3] c_COM2[3]
|
||||
0 0.00000000 -0.02562011 -0.02562011 0.00000000 0.00000000 3.30000000
|
||||
100 0.01000000 -0.02562011 -0.02584808 0.01377831 0.00000000 3.30302413
|
||||
200 0.02000000 -0.02562011 -0.02650010 0.05318658 0.00000000 3.31198892
|
||||
300 0.03000000 -0.02562011 -0.02748822 0.11290898 0.00000000 3.32658305
|
||||
400 0.04000000 -0.02562011 -0.02868854 0.18545625 0.00000000 3.34632324
|
||||
500 0.05000000 -0.02562011 -0.02996656 0.26269978 0.00000000 3.37059992
|
||||
600 0.06000000 -0.02562011 -0.03120006 0.33725276 0.00000000 3.39872815
|
||||
700 0.07000000 -0.02562011 -0.03229421 0.40338328 0.00000000 3.42999603
|
||||
800 0.08000000 -0.02562011 -0.03318758 0.45737874 0.00000000 3.46370507
|
||||
900 0.09000000 -0.02562011 -0.03385069 0.49745690 0.00000000 3.49919977
|
||||
1000 0.10000000 -0.02562011 -0.03428002 0.52340564 0.00000000 3.53588638
|
||||
1100 0.11000000 -0.02562011 -0.03449041 0.53612164 0.00000000 3.57324216
|
||||
1200 0.12000000 -0.02562011 -0.03450775 0.53717016 0.00000000 3.61081749
|
||||
1300 0.13000000 -0.02562011 -0.03436312 0.52842859 0.00000000 3.64823296
|
||||
1400 0.14000000 -0.02562011 -0.03408851 0.51183115 0.00000000 3.68517357
|
||||
1500 0.15000000 -0.02562011 -0.03371417 0.48920613 0.00000000 3.72138134
|
||||
1600 0.16000000 -0.02562011 -0.03326714 0.46218758 0.00000000 3.75664759
|
||||
1700 0.17000000 -0.02562011 -0.03277063 0.43217815 0.00000000 3.79080541
|
||||
1800 0.18000000 -0.02562011 -0.03224395 0.40034589 0.00000000 3.82372274
|
||||
1900 0.19000000 -0.02562011 -0.03170282 0.36763982 0.00000000 3.85529629
|
||||
2000 0.20000000 -0.02562011 -0.03115972 0.33481494 0.00000000 3.88544626
|
||||
2100 0.21000000 -0.02562011 -0.03062440 0.30246010 0.00000000 3.91411185
|
||||
2200 0.22000000 -0.02562011 -0.03010433 0.27102702 0.00000000 3.94124749
|
||||
2300 0.23000000 -0.02562011 -0.02960514 0.24085558 0.00000000 3.96681976
|
||||
2400 0.24000000 -0.02562011 -0.02913096 0.21219623 0.00000000 3.99080483
|
||||
2500 0.25000000 -0.02562011 -0.02868478 0.18522907 0.00000000 4.01318637
|
||||
2600 0.26000000 -0.02562011 -0.02826867 0.16007955 0.00000000 4.03395384
|
||||
2700 0.27000000 -0.02562011 -0.02788403 0.13683143 0.00000000 4.05310113
|
||||
2800 0.28000000 -0.02562011 -0.02753171 0.11553708 0.00000000 4.07062542
|
||||
2900 0.29000000 -0.02562011 -0.02721220 0.09622581 0.00000000 4.08652629
|
||||
3000 0.30000000 -0.02562011 -0.02692571 0.07891041 0.00000000 4.10080498
|
||||
3100 0.31000000 -0.02562011 -0.02667226 0.06359229 0.00000000 4.11346382
|
||||
3200 0.32000000 -0.02562011 -0.02645177 0.05026555 0.00000000 4.12450573
|
||||
3300 0.33000000 -0.02562011 -0.02626406 0.03892009 0.00000000 4.13393390
|
||||
3400 0.34000000 -0.02562011 -0.02610893 0.02954399 0.00000000 4.14175142
|
||||
3500 0.35000000 -0.02562011 -0.02598618 0.02212545 0.00000000 4.14796110
|
||||
3600 0.36000000 -0.02562011 -0.02589566 0.01665409 0.00000000 4.15256529
|
||||
3700 0.37000000 -0.02562011 -0.02583722 0.01312208 0.00000000 4.15556569
|
||||
3800 0.38000000 -0.02562011 -0.02581079 0.01152492 0.00000000 4.15696329
|
||||
3900 0.39000000 -0.02562011 -0.02581636 0.01186148 0.00000000 4.15675830
|
||||
4000 0.40000000 -0.02562011 -0.02585398 0.01413478 0.00000000 4.15495012
|
||||
4100 0.41000000 -0.02562011 -0.02592375 0.01835185 0.00000000 4.15153731
|
||||
4200 0.42000000 -0.02562011 -0.02602587 0.02452390 0.00000000 4.14651764
|
||||
4300 0.43000000 -0.02562011 -0.02616057 0.03266513 0.00000000 4.13988811
|
||||
4400 0.44000000 -0.02562011 -0.02632813 0.04279292 0.00000000 4.13164506
|
||||
4500 0.45000000 -0.02562011 -0.02652889 0.05492664 0.00000000 4.12178432
|
||||
4600 0.46000000 -0.02562011 -0.02676317 0.06908643 0.00000000 4.11030130
|
||||
4700 0.47000000 -0.02562011 -0.02703129 0.08529164 0.00000000 4.09719124
|
||||
4800 0.48000000 -0.02562011 -0.02733352 0.10355859 0.00000000 4.08244950
|
||||
4900 0.49000000 -0.02562011 -0.02767004 0.12389788 0.00000000 4.06607186
|
||||
5000 0.50000000 -0.02562011 -0.02804086 0.14631034 0.00000000 4.04805502
|
||||
5100 0.51000000 -0.02562011 -0.02844575 0.17078211 0.00000000 4.02839708
|
||||
5200 0.52000000 -0.02562011 -0.02888415 0.19727899 0.00000000 4.00709829
|
||||
5300 0.53000000 -0.02562011 -0.02935502 0.22573844 0.00000000 3.98416189
|
||||
5400 0.54000000 -0.02562011 -0.02985670 0.25605986 0.00000000 3.95959511
|
||||
5500 0.55000000 -0.02562011 -0.03038669 0.28809268 0.00000000 3.93341053
|
||||
5600 0.56000000 -0.02562011 -0.03094143 0.32162137 0.00000000 3.90562766
|
||||
5700 0.57000000 -0.02562011 -0.03151597 0.35634628 0.00000000 3.87627492
|
||||
5800 0.58000000 -0.02562011 -0.03210361 0.39186361 0.00000000 3.84539210
|
||||
5900 0.59000000 -0.02562011 -0.03269556 0.42764084 0.00000000 3.81303330
|
||||
6000 0.60000000 -0.02562011 -0.03328042 0.46299030 0.00000000 3.77927044
|
||||
6100 0.61000000 -0.02562011 -0.03384380 0.49704060 0.00000000 3.74419758
|
||||
6200 0.62000000 -0.02562011 -0.03436783 0.52871353 0.00000000 3.70793588
|
||||
6300 0.63000000 -0.02562011 -0.03483104 0.55670974 0.00000000 3.67063945
|
||||
6400 0.64000000 -0.02562011 -0.03520832 0.57951248 0.00000000 3.63250187
|
||||
6500 0.65000000 -0.02562011 -0.03547159 0.59542438 0.00000000 3.59376331
|
||||
6600 0.66000000 -0.02562011 -0.03559125 0.60265655 0.00000000 3.55471782
|
||||
6700 0.67000000 -0.02562011 -0.03553879 0.59948637 0.00000000 3.51572023
|
||||
6800 0.68000000 -0.02562011 -0.03529110 0.58451568 0.00000000 3.47719153
|
||||
6900 0.69000000 -0.02562011 -0.03483635 0.55703035 0.00000000 3.43962129
|
||||
7000 0.70000000 -0.02562011 -0.03418150 0.51745146 0.00000000 3.40356509
|
||||
7100 0.71000000 -0.02562011 -0.03336032 0.46781889 0.00000000 3.36963482
|
||||
7200 0.72000000 -0.02562011 -0.03243997 0.41219328 0.00000000 3.33847933
|
||||
7300 0.73000000 -0.02562011 -0.03152342 0.35679665 0.00000000 3.31075400
|
||||
7400 0.74000000 -0.02562011 -0.03074422 0.30970201 0.00000000 3.28707906
|
||||
7500 0.75000000 -0.02562011 -0.03025182 0.27994115 0.00000000 3.26798907
|
||||
7600 0.76000000 -0.02562011 -0.03018799 0.27608346 0.00000000 3.25387900
|
||||
7700 0.77000000 -0.02562011 -0.03065928 0.30456818 0.00000000 3.24495492
|
||||
7800 0.78000000 -0.02562011 -0.03171321 0.36826788 0.00000000 3.24119821
|
||||
7900 0.79000000 -0.02562011 -0.03332635 0.46576624 0.00000000 3.24235091
|
||||
8000 0.80000000 -0.02562011 -0.03540847 0.59160963 0.00000000 3.24792582
|
||||
8100 0.81000000 -0.02562011 -0.03782107 0.73742737 0.00000000 3.25723999
|
||||
8200 0.82000000 -0.02562011 -0.04040358 0.89351498 0.00000000 3.26946524
|
||||
8300 0.83000000 -0.02562011 -0.04299943 1.05040805 0.00000000 3.28368734
|
||||
8400 0.84000000 -0.02562011 -0.04547588 1.20008497 0.00000000 3.29896495
|
||||
8500 0.85000000 -0.02562011 -0.04773539 1.33664998 0.00000000 3.31438148
|
||||
8600 0.86000000 -0.02562011 -0.04971913 1.45654768 0.00000000 3.32908572
|
||||
8700 0.87000000 -0.02562011 -0.05140498 1.55844058 0.00000000 3.34231951
|
||||
8800 0.88000000 -0.02562011 -0.05280154 1.64284923 0.00000000 3.35343297
|
||||
8900 0.89000000 -0.02562011 -0.05394019 1.71166905 0.00000000 3.36188901
|
||||
9000 0.90000000 -0.02562011 -0.05486563 1.76760281 0.00000000 3.36725955
|
||||
9100 0.91000000 -0.02562011 -0.05562624 1.81357448 0.00000000 3.36921674
|
||||
9200 0.92000000 -0.02562011 -0.05626439 1.85214388 0.00000000 3.36752214
|
||||
9300 0.93000000 -0.02562011 -0.05680723 1.88495335 0.00000000 3.36201704
|
||||
9400 0.94000000 -0.02562011 -0.05725852 1.91222952 0.00000000 3.35261669
|
||||
9500 0.95000000 -0.02562011 -0.05759110 1.93233038 0.00000000 3.33931122
|
||||
9600 0.96000000 -0.02562011 -0.05774152 1.94142215 0.00000000 3.32217490
|
||||
9700 0.97000000 -0.02562011 -0.05760814 1.93336063 0.00000000 3.30138553
|
||||
9800 0.98000000 -0.02562012 -0.05705439 1.89989139 0.00000000 3.27725394
|
||||
9900 0.99000000 -0.02562012 -0.05592079 1.83137685 0.00000000 3.25026233
|
||||
10000 1.00000000 -0.02562012 -0.05404919 1.71825669 0.00000000 3.22110695
|
||||
Loop time of 0.381846 on 1 procs for 10000 steps with 129 atoms
|
||||
|
||||
Performance: 226.269 ns/day, 0.106 hours/ns, 26188.568 timesteps/s
|
||||
131.8% CPU use with 1 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.30936 | 0.30936 | 0.30936 | 0.0 | 81.02
|
||||
Neigh | 0.000139 | 0.000139 | 0.000139 | 0.0 | 0.04
|
||||
Comm | 0.051287 | 0.051287 | 0.051287 | 0.0 | 13.43
|
||||
Output | 0.00181 | 0.00181 | 0.00181 | 0.0 | 0.47
|
||||
Modify | 0.005645 | 0.005645 | 0.005645 | 0.0 | 1.48
|
||||
Other | | 0.01361 | | | 3.56
|
||||
|
||||
Nlocal: 129 ave 129 max 129 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 1867 ave 1867 max 1867 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 290 ave 290 max 290 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 290
|
||||
Ave neighs/atom = 2.24806
|
||||
Neighbor list builds = 1
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:00
|
|
@ -0,0 +1,192 @@
|
|||
LAMMPS (17 Nov 2016)
|
||||
# Initialization
|
||||
units metal
|
||||
boundary p p p
|
||||
atom_style atomic
|
||||
processors * * 1 # domain decomposition over x and y
|
||||
|
||||
# System and atom definition
|
||||
# we use 2 atom types so that inter- and intra-layer
|
||||
# interactions can be specified separately
|
||||
read_data data.bilayer-graphene # read lammps data file
|
||||
orthogonal box = (0 0 -20) to (17.04 19.6761 40)
|
||||
2 by 2 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
256 atoms
|
||||
mass 1 12.0107 # carbon mass (g/mole) | membrane
|
||||
mass 2 12.0107 # carbon mass (g/mole) | adsorbate
|
||||
# Neighbor update settings
|
||||
neighbor 2.0 bin
|
||||
neigh_modify every 1
|
||||
neigh_modify delay 0
|
||||
neigh_modify check yes
|
||||
# Separate atom groups
|
||||
group membrane type 1
|
||||
128 atoms in group membrane
|
||||
group adsorbant type 2
|
||||
128 atoms in group adsorbant
|
||||
|
||||
######################## Potential defition ########################
|
||||
pair_style hybrid/overlay rebo kolmogorov/crespi/z 14.0
|
||||
####################################################################
|
||||
pair_coeff * * rebo CH.airebo C C # chemical
|
||||
Reading potential file CH.airebo with DATE: 2011-10-25
|
||||
pair_coeff 1 2 kolmogorov/crespi/z CC.KC C C # long-range
|
||||
####################################################################
|
||||
|
||||
#### Simulation settings ####
|
||||
timestep 0.0001
|
||||
velocity all create 300.0 12345
|
||||
fix thermostat all nve
|
||||
compute COM1 membrane com
|
||||
compute COM2 adsorbant com
|
||||
############################
|
||||
|
||||
# Output
|
||||
#dump 1 all xyz 100 trajec.xyz
|
||||
#dump_modify 1 format line "%s %12.6f %12.6f %12.6f" element "C" "C"
|
||||
thermo 10
|
||||
thermo_style custom step time etotal pe temp c_COM1[3] c_COM2[3] # spcpu
|
||||
thermo_modify line one format float %14.8f
|
||||
|
||||
###### Run molecular dynamics ######
|
||||
run 1000
|
||||
Neighbor list info ...
|
||||
3 neighbor list requests
|
||||
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 = 3 3 8
|
||||
Memory usage per processor = 3.22197 Mbytes
|
||||
Step Time TotEng PotEng Temp c_COM1[3] c_COM2[3]
|
||||
0 0.00000000 -1888.67041214 -1898.55881323 300.00000000 0.00000000 3.30000000
|
||||
10 0.00100000 -1888.67037221 -1898.21029897 289.42778520 -0.00020126 3.30020126
|
||||
20 0.00200000 -1888.67021541 -1897.22943612 259.67456089 -0.00041357 3.30041357
|
||||
30 0.00300000 -1888.66999308 -1895.86681311 218.34126559 -0.00063673 3.30063673
|
||||
40 0.00400000 -1888.66978354 -1894.47163830 176.02000692 -0.00087055 3.30087055
|
||||
50 0.00500000 -1888.66966068 -1893.37123377 142.63902862 -0.00111486 3.30111486
|
||||
60 0.00600000 -1888.66966132 -1892.75822749 124.04127205 -0.00136952 3.30136952
|
||||
70 0.00700000 -1888.66976974 -1892.63445751 120.28297808 -0.00163441 3.30163441
|
||||
80 0.00800000 -1888.66992867 -1892.83467462 126.35245792 -0.00190946 3.30190946
|
||||
90 0.00900000 -1888.67006868 -1893.11387069 134.81862145 -0.00219458 3.30219458
|
||||
100 0.01000000 -1888.67013621 -1893.25481851 139.09272853 -0.00248973 3.30248973
|
||||
110 0.01100000 -1888.67011201 -1893.15155790 135.96068294 -0.00279489 3.30279489
|
||||
120 0.01200000 -1888.67001496 -1892.84002960 126.51230266 -0.00311004 3.30311004
|
||||
130 0.01300000 -1888.66988997 -1892.47004238 115.29120968 -0.00343519 3.30343519
|
||||
140 0.01400000 -1888.66979230 -1892.23503116 108.16426723 -0.00377038 3.30377038
|
||||
150 0.01500000 -1888.66976478 -1892.28630583 109.72070257 -0.00411562 3.30411562
|
||||
160 0.01600000 -1888.66982054 -1892.66640611 121.25071190 -0.00447099 3.30447099
|
||||
170 0.01700000 -1888.66993790 -1893.28862637 140.12442721 -0.00483654 3.30483654
|
||||
180 0.01800000 -1888.67007017 -1893.97029258 160.80119589 -0.00521235 3.30521235
|
||||
190 0.01900000 -1888.67016712 -1894.50458787 177.00801243 -0.00559851 3.30559851
|
||||
200 0.02000000 -1888.67019459 -1894.73890106 184.11590729 -0.00599512 3.30599512
|
||||
210 0.02100000 -1888.67014420 -1894.62906014 180.78501932 -0.00640230 3.30640230
|
||||
220 0.02200000 -1888.67003680 -1894.25249103 169.36370738 -0.00682016 3.30682016
|
||||
230 0.02300000 -1888.66991386 -1893.77601613 154.91186767 -0.00724883 3.30724883
|
||||
240 0.02400000 -1888.66982525 -1893.38995084 143.20188490 -0.00768845 3.30768845
|
||||
250 0.02500000 -1888.66980630 -1893.23138936 138.39193056 -0.00813913 3.30813913
|
||||
260 0.02600000 -1888.66986130 -1893.32993923 141.38012476 -0.00860097 3.30860097
|
||||
270 0.02700000 -1888.66996305 -1893.60070606 149.59171763 -0.00907408 3.30907408
|
||||
280 0.02800000 -1888.67006686 -1893.88587226 158.24010433 -0.00955849 3.30955849
|
||||
290 0.02900000 -1888.67012981 -1894.02402669 162.42960292 -0.01005424 3.31005424
|
||||
300 0.03000000 -1888.67012722 -1893.91715234 159.18726627 -0.01056129 3.31056129
|
||||
310 0.03100000 -1888.67005731 -1893.57037242 148.66857852 -0.01107957 3.31107957
|
||||
320 0.03200000 -1888.66994573 -1893.09358619 134.20694883 -0.01160898 3.31160898
|
||||
330 0.03300000 -1888.66983589 -1892.66132663 121.09614207 -0.01214935 3.31214935
|
||||
340 0.03400000 -1888.66977410 -1892.44446345 114.51869676 -0.01270046 3.31270046
|
||||
350 0.03500000 -1888.66978826 -1892.53901235 117.38674604 -0.01326207 3.31326207
|
||||
360 0.03600000 -1888.66987439 -1892.92337288 129.04508371 -0.01383390 3.31383390
|
||||
370 0.03700000 -1888.66999800 -1893.46445570 145.45701555 -0.01441561 3.31441561
|
||||
380 0.03800000 -1888.67010960 -1893.97065516 160.81100020 -0.01500688 3.31500688
|
||||
390 0.03900000 -1888.67016540 -1894.26835818 169.84119247 -0.01560734 3.31560734
|
||||
400 0.04000000 -1888.67014667 -1894.26967975 169.88185546 -0.01621664 3.31621664
|
||||
410 0.04100000 -1888.67006166 -1894.00321069 161.80014280 -0.01683442 3.31683442
|
||||
420 0.04200000 -1888.66994367 -1893.60086324 149.59707418 -0.01746033 3.31746033
|
||||
430 0.04300000 -1888.66984058 -1893.24559841 138.82197275 -0.01809405 3.31809405
|
||||
440 0.04400000 -1888.66979399 -1893.09727874 134.32357877 -0.01873527 3.31873527
|
||||
450 0.04500000 -1888.66982139 -1893.22837442 138.30000378 -0.01938373 3.31938373
|
||||
460 0.04600000 -1888.66990972 -1893.59670383 149.47191354 -0.02003918 3.32003918
|
||||
470 0.04700000 -1888.67002173 -1894.06542598 163.68887743 -0.02070143 3.32070143
|
||||
480 0.04800000 -1888.67011389 -1894.46010842 175.66018439 -0.02137030 3.32137030
|
||||
490 0.04900000 -1888.67015175 -1894.63688098 181.02206322 -0.02204565 3.32204565
|
||||
500 0.05000000 -1888.67012158 -1894.53632221 177.97216882 -0.02272740 3.32272740
|
||||
510 0.05100000 -1888.67003762 -1894.20444731 167.90610436 -0.02341547 3.32341547
|
||||
520 0.05200000 -1888.66993151 -1893.77231066 154.79891353 -0.02410981 3.32410981
|
||||
530 0.05300000 -1888.66984505 -1893.40525927 143.66572038 -0.02481040 3.32481040
|
||||
540 0.05400000 -1888.66981408 -1893.23762083 138.58074854 -0.02551724 3.32551724
|
||||
550 0.05500000 -1888.66985005 -1893.31793594 141.01630317 -0.02623032 3.32623032
|
||||
560 0.05600000 -1888.66993737 -1893.59069013 149.28862751 -0.02694963 3.32694963
|
||||
570 0.05700000 -1888.67003852 -1893.92089571 159.30352588 -0.02767517 3.32767517
|
||||
580 0.05800000 -1888.67011322 -1894.15124753 166.28980524 -0.02840691 3.32840691
|
||||
590 0.05900000 -1888.67013192 -1894.16548041 166.72104345 -0.02914478 3.32914478
|
||||
600 0.06000000 -1888.67008713 -1893.93443318 159.71275856 -0.02988871 3.32988871
|
||||
610 0.06100000 -1888.66999438 -1893.52841656 147.39760646 -0.03063856 3.33063856
|
||||
620 0.06200000 -1888.66988809 -1893.09235021 134.17119963 -0.03139416 3.33139416
|
||||
630 0.06300000 -1888.66980996 -1892.79172016 125.05288240 -0.03215531 3.33215531
|
||||
640 0.06400000 -1888.66979261 -1892.74755390 123.71346730 -0.03292176 3.33292176
|
||||
650 0.06500000 -1888.66984332 -1892.98665459 130.96590324 -0.03369323 3.33369323
|
||||
660 0.06600000 -1888.66994245 -1893.42999868 144.41332389 -0.03446937 3.33446937
|
||||
670 0.06700000 -1888.67005233 -1893.92310681 159.37018806 -0.03524986 3.33524986
|
||||
680 0.06800000 -1888.67013309 -1894.29451581 170.63575808 -0.03603430 3.33603430
|
||||
690 0.06900000 -1888.67015452 -1894.41878117 174.40514192 -0.03682229 3.33682229
|
||||
700 0.07000000 -1888.67010897 -1894.26288036 169.67671530 -0.03761343 3.33761343
|
||||
710 0.07100000 -1888.67001367 -1893.89812904 158.61357114 -0.03840729 3.33840729
|
||||
720 0.07200000 -1888.66990378 -1893.47348746 145.73388454 -0.03920344 3.33920344
|
||||
730 0.07300000 -1888.66982212 -1893.15984839 136.22099960 -0.04000148 3.34000148
|
||||
740 0.07400000 -1888.66980109 -1893.08373746 133.91254029 -0.04080098 3.34080098
|
||||
750 0.07500000 -1888.66984794 -1893.27755511 139.79127024 -0.04160156 3.34160156
|
||||
760 0.07600000 -1888.66994215 -1893.66837365 151.64528967 -0.04240282 3.34240282
|
||||
770 0.07700000 -1888.67004554 -1894.10941206 165.02263027 -0.04320441 3.34320441
|
||||
780 0.07800000 -1888.67011702 -1894.43947545 175.03411436 -0.04400599 3.34400599
|
||||
790 0.07900000 -1888.67013297 -1894.54590471 178.26254255 -0.04480726 3.34480726
|
||||
800 0.08000000 -1888.67008751 -1894.40384142 173.95392406 -0.04560792 3.34560792
|
||||
810 0.08100000 -1888.66999923 -1894.08389003 164.24973321 -0.04640773 3.34640773
|
||||
820 0.08200000 -1888.66990447 -1893.72313979 153.30795965 -0.04720647 3.34720647
|
||||
830 0.08300000 -1888.66984367 -1893.46839190 145.58111626 -0.04800393 3.34800393
|
||||
840 0.08400000 -1888.66984156 -1893.41412536 143.93481093 -0.04879995 3.34879995
|
||||
850 0.08500000 -1888.66989670 -1893.56426154 148.48805553 -0.04959439 3.34959439
|
||||
860 0.08600000 -1888.66998222 -1893.83463719 156.68827294 -0.05038713 3.35038713
|
||||
870 0.08700000 -1888.67006171 -1894.09325045 164.53181920 -0.05117805 3.35117805
|
||||
880 0.08800000 -1888.67010273 -1894.21712661 168.28880100 -0.05196706 3.35196706
|
||||
890 0.08900000 -1888.67008993 -1894.14263950 166.02935656 -0.05275408 3.35275408
|
||||
900 0.09000000 -1888.67002891 -1893.89014571 158.37090587 -0.05353904 3.35353904
|
||||
910 0.09100000 -1888.66994326 -1893.55535709 148.21649469 -0.05432186 3.35432186
|
||||
920 0.09200000 -1888.66986526 -1893.27257949 139.63979178 -0.05510247 3.35510247
|
||||
930 0.09300000 -1888.66982730 -1893.16330891 136.32582949 -0.05588078 3.35588078
|
||||
940 0.09400000 -1888.66984631 -1893.28643285 140.06065785 -0.05665670 3.35665670
|
||||
950 0.09500000 -1888.66991503 -1893.61245342 149.94957268 -0.05743015 3.35743015
|
||||
960 0.09600000 -1888.67000691 -1894.03423922 162.74316516 -0.05820101 3.35820101
|
||||
970 0.09700000 -1888.67008649 -1894.40848025 174.09469037 -0.05896915 3.35896915
|
||||
980 0.09800000 -1888.67012436 -1894.61056767 180.22458605 -0.05973444 3.35973444
|
||||
990 0.09900000 -1888.67010608 -1894.58107659 179.33042338 -0.06049672 3.36049672
|
||||
1000 0.10000000 -1888.67003981 -1894.34773305 172.25312330 -0.06125581 3.36125581
|
||||
Loop time of 2.21183 on 4 procs for 1000 steps with 256 atoms
|
||||
|
||||
Performance: 3.906 ns/day, 6.144 hours/ns, 452.115 timesteps/s
|
||||
120.2% CPU use with 4 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 1.9363 | 1.9928 | 2.0303 | 2.5 | 90.10
|
||||
Neigh | 0 | 0 | 0 | 0.0 | 0.00
|
||||
Comm | 0.16714 | 0.20465 | 0.26123 | 7.8 | 9.25
|
||||
Output | 0.002469 | 0.0028505 | 0.003949 | 1.2 | 0.13
|
||||
Modify | 0.002423 | 0.0026275 | 0.002853 | 0.4 | 0.12
|
||||
Other | | 0.008904 | | | 0.40
|
||||
|
||||
Nlocal: 64 ave 64 max 64 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 1265 ave 1265 max 1265 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 11824 ave 11824 max 11824 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
FullNghs: 23648 ave 23648 max 23648 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 94592
|
||||
Ave neighs/atom = 369.5
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
Total wall time: 0:00:02
|
|
@ -0,0 +1,8 @@
|
|||
# Kolmogorov-Crespi Potential
|
||||
#
|
||||
# Cite as A.N. Kolmogorov & V. H. Crespi,
|
||||
# Registry-dependent interlayer potential for graphitic systems
|
||||
# Physical Review B 71, 2354150 (2005)
|
||||
#
|
||||
# z0 C0 C2 C4 C delta lambda A S
|
||||
C C 3.34 15.71 12.29 4.933 3.030 0.578 3.629 10.238 1.0
|
|
@ -0,0 +1,438 @@
|
|||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author: Jaap Kroes (Radboud Universiteit)
|
||||
based on previous versions by Merel van Wijk and by Marco Raguzzoni
|
||||
|
||||
This is a simplified version of the potential described in
|
||||
[Kolmogorov & Crespi, Phys. Rev. B 71, 235415 (2005)]
|
||||
The simplification is that all normals are taken along the z-direction
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "pair_kolmogorov_crespi_z.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "neigh_list.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define DELTA 4
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairKolmogorovCrespiZ::PairKolmogorovCrespiZ(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
writedata = 1;
|
||||
|
||||
// initialize element to parameter maps
|
||||
nelements = 0;
|
||||
elements = NULL;
|
||||
nparams = maxparam = 0;
|
||||
params = NULL;
|
||||
elem2param = NULL;
|
||||
map = NULL;
|
||||
|
||||
// always compute energy offset
|
||||
offset_flag = true;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PairKolmogorovCrespiZ::~PairKolmogorovCrespiZ()
|
||||
{
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(cutsq);
|
||||
memory->destroy(cut);
|
||||
memory->destroy(offset);
|
||||
}
|
||||
|
||||
if (elements)
|
||||
for (int i = 0; i < nelements; i++) delete [] elements[i];
|
||||
delete [] elements;
|
||||
memory->destroy(params);
|
||||
memory->destroy(elem2param);
|
||||
if (allocated) delete [] map;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairKolmogorovCrespiZ::compute(int eflag, int vflag)
|
||||
{
|
||||
int i,j,ii,jj,inum,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair, fpair1;
|
||||
double rsq,r,rhosq,exp1,exp2,r6,r8;
|
||||
double frho,sumC,sumC2,sumCff,fsum,rdsq;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
evdwl = 0.0;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = vflag_fdotr = 0;
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// loop over neighbors of my atoms
|
||||
for (ii = 0; ii < inum; ii++) {
|
||||
i = ilist[ii];
|
||||
xtmp = x[i][0];
|
||||
ytmp = x[i][1];
|
||||
ztmp = x[i][2];
|
||||
itype = type[i];
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
for (jj = 0; jj < jnum; jj++) {
|
||||
j = jlist[jj];
|
||||
j &= NEIGHMASK;
|
||||
jtype = type[j];
|
||||
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
// rho^2 = r^2 - (n,r) = r^2 - z^2
|
||||
rhosq = delx*delx + dely*dely;
|
||||
rsq = rhosq + delz*delz;
|
||||
|
||||
if (rsq < cutsq[itype][jtype]) {
|
||||
|
||||
int iparam_ij = elem2param[map[itype]][map[jtype]];
|
||||
Param& p = params[iparam_ij];
|
||||
|
||||
r = sqrt(rsq);
|
||||
r6 = rsq*rsq*rsq;
|
||||
r8 = r6*rsq;
|
||||
rdsq = rhosq*p.delta2inv; // (rho/delta)^2
|
||||
|
||||
// store exponents
|
||||
exp1 = exp(-p.lambda*(r-p.z0));
|
||||
exp2 = exp(-rdsq);
|
||||
|
||||
// note that f(rho_ij) equals f(rho_ji) as normals are all along z
|
||||
sumC = p.C0+p.C2*rdsq+p.C4*rdsq*rdsq;
|
||||
sumC2 = (2*p.C2+4*p.C4*rdsq)*p.delta2inv;
|
||||
frho = exp2*sumC;
|
||||
sumCff = p.C + 2*frho;
|
||||
|
||||
// derivatives
|
||||
fpair = -6.0*p.A*p.z06/r8+p.lambda*exp1/r*sumCff;
|
||||
fpair1 = exp1*exp2*(4.0*p.delta2inv*sumC-2.0*sumC2);
|
||||
fsum = fpair + fpair1;
|
||||
|
||||
f[i][0] += delx*fsum;
|
||||
f[i][1] += dely*fsum;
|
||||
// fi_z does not contain contributions from df/dr
|
||||
// because rho_ij does not depend on z_i or z_j
|
||||
f[i][2] += delz*fpair;
|
||||
if (newton_pair || j < nlocal) {
|
||||
f[j][0] -= delx*fsum;
|
||||
f[j][1] -= dely*fsum;
|
||||
f[j][2] -= delz*fpair;
|
||||
}
|
||||
|
||||
if (eflag) {
|
||||
evdwl = -p.A*p.z06/r6+ exp1*sumCff+offset[itype][jtype];
|
||||
}
|
||||
|
||||
if (evflag){
|
||||
ev_tally(i,j,nlocal,newton_pair,evdwl,0.0,fpair,delx,dely,delz);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (vflag_fdotr) virial_fdotr_compute();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
allocate all arrays
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairKolmogorovCrespiZ::allocate()
|
||||
{
|
||||
allocated = 1;
|
||||
int n = atom->ntypes;
|
||||
|
||||
memory->create(setflag,n+1,n+1,"pair:setflag");
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = i; j <= n; j++)
|
||||
setflag[i][j] = 0;
|
||||
|
||||
memory->create(cutsq,n+1,n+1,"pair:cutsq");
|
||||
memory->create(cut,n+1,n+1,"pair:cut");
|
||||
memory->create(offset,n+1,n+1,"pair:offset");
|
||||
map = new int[atom->ntypes+1];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
global settings
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairKolmogorovCrespiZ::settings(int narg, char **arg)
|
||||
{
|
||||
if (narg != 1) error->all(FLERR,"Illegal pair_style command");
|
||||
if (strcmp(force->pair_style)!="hybrid/overlay")
|
||||
error->all(FLERR,"ERROR: requires hybrid/overlay pair_style");
|
||||
|
||||
cut_global = force->numeric(FLERR,arg[0]);
|
||||
|
||||
// reset cutoffs that have been explicitly set
|
||||
|
||||
if (allocated) {
|
||||
int i,j;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
for (j = i+1; j <= atom->ntypes; j++)
|
||||
if (setflag[i][j]) cut[i][j] = cut_global;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set coeffs for one or more type pairs
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairKolmogorovCrespiZ::coeff(int narg, char **arg)
|
||||
{
|
||||
int i,j,n;
|
||||
|
||||
if (narg != 3 + atom->ntypes)
|
||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
if (!allocated) allocate();
|
||||
|
||||
int ilo,ihi,jlo,jhi;
|
||||
force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi);
|
||||
force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi);
|
||||
|
||||
// read args that map atom types to elements in potential file
|
||||
// map[i] = which element the Ith atom type is, -1 if NULL
|
||||
// nelements = # of unique elements
|
||||
// elements = list of element names
|
||||
|
||||
if (elements) {
|
||||
for (i = 0; i < nelements; i++) delete [] elements[i];
|
||||
delete [] elements;
|
||||
}
|
||||
elements = new char*[atom->ntypes];
|
||||
for (i = 0; i < atom->ntypes; i++) elements[i] = NULL;
|
||||
|
||||
nelements = 0;
|
||||
for (i = 3; i < narg; i++) {
|
||||
if (strcmp(arg[i],"NULL") == 0) {
|
||||
map[i-2] = -1;
|
||||
continue;
|
||||
}
|
||||
for (j = 0; j < nelements; j++)
|
||||
if (strcmp(arg[i],elements[j]) == 0) break;
|
||||
map[i-2] = j;
|
||||
if (j == nelements) {
|
||||
n = strlen(arg[i]) + 1;
|
||||
elements[j] = new char[n];
|
||||
strcpy(elements[j],arg[i]);
|
||||
nelements++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
read_file(arg[2]);
|
||||
|
||||
double cut_one = cut_global;
|
||||
|
||||
int count = 0;
|
||||
for (int i = ilo; i <= ihi; i++) {
|
||||
for (int j = MAX(jlo,i); j <= jhi; j++) {
|
||||
cut[i][j] = cut_one;
|
||||
setflag[i][j] = 1;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init for one type pair i,j and corresponding j,i
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double PairKolmogorovCrespiZ::init_one(int i, int j)
|
||||
{
|
||||
if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
|
||||
|
||||
if (offset_flag) {
|
||||
int iparam_ij = elem2param[map[i]][map[j]];
|
||||
offset[i][j] = params[iparam_ij].A*pow(params[iparam_ij].z0/cut[i][j],6);
|
||||
} else offset[i][j] = 0.0;
|
||||
offset[j][i] = offset[i][j];
|
||||
|
||||
return cut[i][j];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
read Kolmogorov-Crespi potential file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairKolmogorovCrespiZ::read_file(char *filename)
|
||||
{
|
||||
int params_per_line = 11;
|
||||
char **words = new char*[params_per_line+1];
|
||||
memory->sfree(params);
|
||||
params = NULL;
|
||||
nparams = maxparam = 0;
|
||||
|
||||
// open file on proc 0
|
||||
|
||||
FILE *fp;
|
||||
if (comm->me == 0) {
|
||||
fp = force->open_potential(filename);
|
||||
if (fp == NULL) {
|
||||
char str[128];
|
||||
sprintf(str,"Cannot open KC potential file %s",filename);
|
||||
error->one(FLERR,str);
|
||||
}
|
||||
}
|
||||
|
||||
// read each line out of file, skipping blank lines or leading '#'
|
||||
// store line of params if all 3 element tags are in element list
|
||||
|
||||
int i,j,n,m,nwords,ielement,jelement;
|
||||
char line[MAXLINE],*ptr;
|
||||
int eof = 0;
|
||||
|
||||
while (1) {
|
||||
if (comm->me == 0) {
|
||||
ptr = fgets(line,MAXLINE,fp);
|
||||
if (ptr == NULL) {
|
||||
eof = 1;
|
||||
fclose(fp);
|
||||
} else n = strlen(line) + 1;
|
||||
}
|
||||
MPI_Bcast(&eof,1,MPI_INT,0,world);
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
// concatenate additional lines until have params_per_line words
|
||||
|
||||
while (nwords < params_per_line) {
|
||||
n = strlen(line);
|
||||
if (comm->me == 0) {
|
||||
ptr = fgets(&line[n],MAXLINE-n,fp);
|
||||
if (ptr == NULL) {
|
||||
eof = 1;
|
||||
fclose(fp);
|
||||
} else n = strlen(line) + 1;
|
||||
}
|
||||
MPI_Bcast(&eof,1,MPI_INT,0,world);
|
||||
if (eof) break;
|
||||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
}
|
||||
|
||||
if (nwords != params_per_line)
|
||||
error->all(FLERR,"Insufficient format in KC potential file");
|
||||
|
||||
// words = ptrs to all words in line
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line," \t\n\r\f");
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
|
||||
// ielement,jelement = 1st args
|
||||
// if these 2 args are in element list, then parse this line
|
||||
// else skip to next line (continue)
|
||||
|
||||
for (ielement = 0; ielement < nelements; ielement++)
|
||||
if (strcmp(words[0],elements[ielement]) == 0) break;
|
||||
if (ielement == nelements) continue;
|
||||
for (jelement = 0; jelement < nelements; jelement++)
|
||||
if (strcmp(words[1],elements[jelement]) == 0) break;
|
||||
if (jelement == nelements) continue;
|
||||
|
||||
// load up parameter settings and error check their values
|
||||
|
||||
if (nparams == maxparam) {
|
||||
maxparam += DELTA;
|
||||
params = (Param *) memory->srealloc(params,maxparam*sizeof(Param),
|
||||
"pair:params");
|
||||
}
|
||||
|
||||
params[nparams].ielement = ielement;
|
||||
params[nparams].jelement = jelement;
|
||||
params[nparams].z0 = atof(words[2]);
|
||||
params[nparams].C0 = atof(words[3]);
|
||||
params[nparams].C2 = atof(words[4]);
|
||||
params[nparams].C4 = atof(words[5]);
|
||||
params[nparams].C = atof(words[6]);
|
||||
params[nparams].delta = atof(words[7]);
|
||||
params[nparams].lambda = atof(words[8]);
|
||||
params[nparams].A = atof(words[9]);
|
||||
// S provides a convenient scaling of all energies
|
||||
params[nparams].S = atof(words[10]);
|
||||
|
||||
// energies in meV further scaled by S
|
||||
double meV = 1.0e-3*params[nparams].S;
|
||||
params[nparams].C *= meV;
|
||||
params[nparams].A *= meV;
|
||||
params[nparams].C0 *= meV;
|
||||
params[nparams].C2 *= meV;
|
||||
params[nparams].C4 *= meV;
|
||||
|
||||
// precompute some quantities
|
||||
params[nparams].delta2inv = pow(params[nparams].delta,-2);
|
||||
params[nparams].z06 = pow(params[nparams].z0,6);
|
||||
|
||||
nparams++;
|
||||
if(nparams >= pow(atom->ntypes,3)) break;
|
||||
}
|
||||
memory->destroy(elem2param);
|
||||
memory->create(elem2param,nelements,nelements,"pair:elem2param");
|
||||
for (i = 0; i < nelements; i++) {
|
||||
for (j = 0; j < nelements; j++) {
|
||||
n = -1;
|
||||
for (m = 0; m < nparams; m++) {
|
||||
if (i == params[m].ielement && j == params[m].jelement) {
|
||||
if (n >= 0) error->all(FLERR,"Potential file has duplicate entry");
|
||||
n = m;
|
||||
}
|
||||
}
|
||||
if (n < 0) error->all(FLERR,"Potential file is missing an entry");
|
||||
elem2param[i][j] = n;
|
||||
}
|
||||
}
|
||||
delete [] words;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
|
@ -0,0 +1,83 @@
|
|||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(kolmogorov/crespi/z,PairKolmogorovCrespiZ)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_KolmogorovCrespiZ_H
|
||||
#define LMP_PAIR_KolmogorovCrespiZ_H
|
||||
|
||||
#include "pair.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairKolmogorovCrespiZ : public Pair {
|
||||
public:
|
||||
PairKolmogorovCrespiZ(class LAMMPS *);
|
||||
virtual ~PairKolmogorovCrespiZ();
|
||||
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
double init_one(int, int);
|
||||
|
||||
protected:
|
||||
int me;
|
||||
|
||||
struct Param {
|
||||
double z0,C0,C2,C4,C,delta,lambda,A,S;
|
||||
double delta2inv,z06;
|
||||
int ielement,jelement;
|
||||
};
|
||||
Param *params; // parameter set for I-J interactions
|
||||
char **elements; // names of unique elements
|
||||
int **elem2param; // mapping from element pairs to parameters
|
||||
int *map; // mapping from atom types to elements
|
||||
int nelements; // # of unique elements
|
||||
int nparams; // # of stored parameter sets
|
||||
int maxparam; // max # of parameter sets
|
||||
|
||||
double cut_global;
|
||||
double **cut;
|
||||
double **offset;
|
||||
void read_file( char * );
|
||||
void allocate();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
E: Illegal ... command
|
||||
|
||||
Self-explanatory. Check the input script syntax and compare to the
|
||||
documentation for the command. You can use -echo screen as a
|
||||
command-line option when running LAMMPS to see the offending line.
|
||||
|
||||
E: Incorrect args for pair coefficients
|
||||
|
||||
Self-explanatory. Check the input script or data file.
|
||||
|
||||
E: All pair coeffs are not set
|
||||
|
||||
All pair coefficients must be set in the data file or by the
|
||||
pair_coeff command before running a simulation.
|
||||
|
||||
*/
|
||||
|
Loading…
Reference in New Issue