Thomas-Fermi
This commit is contained in:
committed by
Shern Tee
parent
efa5db4c58
commit
c04f4a913f
3
examples/electrode/thoams-fermi/.gitignore
vendored
Normal file
3
examples/electrode/thoams-fermi/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*.csv
|
||||||
|
log.lammps_*
|
||||||
|
tf.data
|
||||||
600
examples/electrode/thoams-fermi/charged.data
Normal file
600
examples/electrode/thoams-fermi/charged.data
Normal file
@ -0,0 +1,600 @@
|
|||||||
|
LAMMPS data file via write_data, version 24 Dec 2020, timestep = 0
|
||||||
|
|
||||||
|
288 atoms
|
||||||
|
2 atom types
|
||||||
|
|
||||||
|
0.285001 25.325067 xlo xhi
|
||||||
|
-0.368323 24.671743 ylo yhi
|
||||||
|
-1.043333 43.303354 zlo zhi
|
||||||
|
|
||||||
|
Masses
|
||||||
|
|
||||||
|
1 196.966553
|
||||||
|
2 196.966553
|
||||||
|
|
||||||
|
Pair Coeffs # lj/cut/coul/long
|
||||||
|
|
||||||
|
1 0 0
|
||||||
|
2 0 0
|
||||||
|
|
||||||
|
Atoms # full
|
||||||
|
|
||||||
|
1 1 1 -0.00023 25.040066 0 8 0 1 0
|
||||||
|
2 1 1 -0.002921 2.086672 2.086672 8 0 0 0
|
||||||
|
3 1 1 -0.04033 2.086672 0 10.086673 0 1 0
|
||||||
|
4 1 1 -0.012754 25.040066 2.086672 10.086673 0 0 0
|
||||||
|
5 1 1 -0.000757 4.173345 0 8 0 1 0
|
||||||
|
6 1 1 -0.000483 6.260016 2.086672 8 0 0 0
|
||||||
|
7 1 1 -0.02377 6.260016 0 10.086673 0 1 0
|
||||||
|
8 1 1 -0.031311 4.173345 2.086672 10.086673 0 0 0
|
||||||
|
9 1 1 -0.002302 8.346689 0 8 0 1 0
|
||||||
|
10 1 1 -0.000534 10.433361 2.086672 8 0 0 0
|
||||||
|
11 1 1 -0.006246 10.433361 0 10.086673 0 1 0
|
||||||
|
12 1 1 -0.03014 8.346689 2.086672 10.086673 0 0 0
|
||||||
|
13 1 1 0.000222 12.520033 0 8 0 1 0
|
||||||
|
14 1 1 -0.000958 14.606705 2.086672 8 0 0 0
|
||||||
|
15 1 1 -0.024586 14.606705 0 10.086673 0 1 0
|
||||||
|
16 1 1 -0.032305 12.520033 2.086672 10.086673 0 0 0
|
||||||
|
17 1 1 -0.001102 16.693378 0 8 0 1 0
|
||||||
|
18 1 1 0.00046 18.780048 2.086672 8 0 0 0
|
||||||
|
19 1 1 -0.011993 18.780048 0 10.086673 0 1 0
|
||||||
|
20 1 1 -0.015815 16.693378 2.086672 10.086673 0 0 0
|
||||||
|
21 1 1 0.001654 20.86672 0 8 0 1 0
|
||||||
|
22 1 1 0.000999 22.953394 2.086672 8 0 0 0
|
||||||
|
23 1 1 -0.010485 22.953394 0 10.086673 0 1 0
|
||||||
|
24 1 1 -0.038444 20.86672 2.086672 10.086673 0 0 0
|
||||||
|
25 1 1 3.8e-05 25.040066 4.173345 8 0 0 0
|
||||||
|
26 1 1 -3e-05 2.086672 6.260016 8 0 0 0
|
||||||
|
27 1 1 -0.011104 2.086672 4.173345 10.086673 0 0 0
|
||||||
|
28 1 1 -0.032472 25.040066 6.260016 10.086673 0 0 0
|
||||||
|
29 1 1 0.000807 4.173345 4.173345 8 0 0 0
|
||||||
|
30 1 1 -0.000974 6.260016 6.260016 8 0 0 0
|
||||||
|
31 1 1 -0.017105 6.260016 4.173345 10.086673 0 0 0
|
||||||
|
32 1 1 -0.010937 4.173345 6.260016 10.086673 0 0 0
|
||||||
|
33 1 1 0.001587 8.346689 4.173345 8 0 0 0
|
||||||
|
34 1 1 0.001733 10.433361 6.260016 8 0 0 0
|
||||||
|
35 1 1 -0.001065 10.433361 4.173345 10.086673 0 0 0
|
||||||
|
36 1 1 0.004269 8.346689 6.260016 10.086673 0 0 0
|
||||||
|
37 1 1 -0.000623 12.520033 4.173345 8 0 0 0
|
||||||
|
38 1 1 -0.003876 14.606705 6.260016 8 0 0 0
|
||||||
|
39 1 1 -0.030292 14.606705 4.173345 10.086673 0 0 0
|
||||||
|
40 1 1 -0.024863 12.520033 6.260016 10.086673 0 0 0
|
||||||
|
41 1 1 -0.000446 16.693378 4.173345 8 0 0 0
|
||||||
|
42 1 1 -0.002036 18.780048 6.260016 8 0 0 0
|
||||||
|
43 1 1 -0.031052 18.780048 4.173345 10.086673 0 0 0
|
||||||
|
44 1 1 -0.044616 16.693378 6.260016 10.086673 0 0 0
|
||||||
|
45 1 1 -0.001031 20.86672 4.173345 8 0 0 0
|
||||||
|
46 1 1 -0.00021 22.953394 6.260016 8 0 0 0
|
||||||
|
47 1 1 -0.004291 22.953394 4.173345 10.086673 0 0 0
|
||||||
|
48 1 1 -0.020295 20.86672 6.260016 10.086673 0 0 0
|
||||||
|
49 1 1 -0.006345 25.040066 8.346689 8 0 0 0
|
||||||
|
50 1 1 -0.00328 2.086672 10.433361 8 0 0 0
|
||||||
|
51 1 1 -0.037649 2.086672 8.346689 10.086673 0 0 0
|
||||||
|
52 1 1 -0.05504 25.040066 10.433361 10.086673 0 0 0
|
||||||
|
53 1 1 -0.000151 4.173345 8.346689 8 0 0 0
|
||||||
|
54 1 1 -0.000508 6.260016 10.433361 8 0 0 0
|
||||||
|
55 1 1 -0.014809 6.260016 8.346689 10.086673 0 0 0
|
||||||
|
56 1 1 -0.016074 4.173345 10.433361 10.086673 0 0 0
|
||||||
|
57 1 1 0.00092 8.346689 8.346689 8 0 0 0
|
||||||
|
58 1 1 -0.003585 10.433361 10.433361 8 0 0 0
|
||||||
|
59 1 1 -0.015447 10.433361 8.346689 10.086673 0 0 0
|
||||||
|
60 1 1 -0.037118 8.346689 10.433361 10.086673 0 0 0
|
||||||
|
61 1 1 -0.000856 12.520033 8.346689 8 0 0 0
|
||||||
|
62 1 1 0.001309 14.606705 10.433361 8 0 0 0
|
||||||
|
63 1 1 -0.034936 14.606705 8.346689 10.086673 0 0 0
|
||||||
|
64 1 1 -0.022444 12.520033 10.433361 10.086673 0 0 0
|
||||||
|
65 1 1 -0.00144 16.693378 8.346689 8 0 0 0
|
||||||
|
66 1 1 -0.004359 18.780048 10.433361 8 0 0 0
|
||||||
|
67 1 1 -0.02956 18.780048 8.346689 10.086673 0 0 0
|
||||||
|
68 1 1 -0.008916 16.693378 10.433361 10.086673 0 0 0
|
||||||
|
69 1 1 0.0004 20.86672 8.346689 8 0 0 0
|
||||||
|
70 1 1 0.000209 22.953394 10.433361 8 0 0 0
|
||||||
|
71 1 1 -0.017199 22.953394 8.346689 10.086673 0 0 0
|
||||||
|
72 1 1 -0.03354 20.86672 10.433361 10.086673 0 0 0
|
||||||
|
73 1 1 -8e-05 25.040066 12.520033 8 0 0 0
|
||||||
|
74 1 1 -0.000342 2.086672 14.606705 8 0 0 0
|
||||||
|
75 1 1 -0.027442 2.086672 12.520033 10.086673 0 0 0
|
||||||
|
76 1 1 -0.025027 25.040066 14.606705 10.086673 0 0 0
|
||||||
|
77 1 1 0.000536 4.173345 12.520033 8 0 0 0
|
||||||
|
78 1 1 -0.000368 6.260016 14.606705 8 0 0 0
|
||||||
|
79 1 1 -0.022015 6.260016 12.520033 10.086673 0 0 0
|
||||||
|
80 1 1 0.003048 4.173345 14.606705 10.086673 0 0 0
|
||||||
|
81 1 1 -0.002516 8.346689 12.520033 8 0 0 0
|
||||||
|
82 1 1 0.002034 10.433361 14.606705 8 0 0 0
|
||||||
|
83 1 1 -0.012341 10.433361 12.520033 10.086673 0 0 0
|
||||||
|
84 1 1 -0.004673 8.346689 14.606705 10.086673 0 0 0
|
||||||
|
85 1 1 0.000168 12.520033 12.520033 8 0 0 0
|
||||||
|
86 1 1 0.000653 14.606705 14.606705 8 0 0 0
|
||||||
|
87 1 1 0.007996 14.606705 12.520033 10.086673 0 0 0
|
||||||
|
88 1 1 0.015522 12.520033 14.606705 10.086673 0 0 0
|
||||||
|
89 1 1 -2.2e-05 16.693378 12.520033 8 0 0 0
|
||||||
|
90 1 1 0.000716 18.780048 14.606705 8 0 0 0
|
||||||
|
91 1 1 -0.013279 18.780048 12.520033 10.086673 0 0 0
|
||||||
|
92 1 1 -0.001057 16.693378 14.606705 10.086673 0 0 0
|
||||||
|
93 1 1 -0.000971 20.86672 12.520033 8 0 0 0
|
||||||
|
94 1 1 -0.000871 22.953394 14.606705 8 0 0 0
|
||||||
|
95 1 1 -0.014468 22.953394 12.520033 10.086673 0 0 0
|
||||||
|
96 1 1 -0.028593 20.86672 14.606705 10.086673 0 0 0
|
||||||
|
97 1 1 -0.000311 25.040066 16.693378 8 0 0 0
|
||||||
|
98 1 1 -0.001941 2.086672 18.780048 8 0 0 0
|
||||||
|
99 1 1 -0.015815 2.086672 16.693378 10.086673 0 0 0
|
||||||
|
100 1 1 -0.012408 25.040066 18.780048 10.086673 0 0 0
|
||||||
|
101 1 1 0.000289 4.173345 16.693378 8 0 0 0
|
||||||
|
102 1 1 7.1e-05 6.260016 18.780048 8 0 0 0
|
||||||
|
103 1 1 -0.03149 6.260016 16.693378 10.086673 0 0 0
|
||||||
|
104 1 1 -0.033754 4.173345 18.780048 10.086673 0 0 0
|
||||||
|
105 1 1 -0.003025 8.346689 16.693378 8 0 0 0
|
||||||
|
106 1 1 -4.9e-05 10.433361 18.780048 8 0 0 0
|
||||||
|
107 1 1 -0.026304 10.433361 16.693378 10.086673 0 0 0
|
||||||
|
108 1 1 -0.025007 8.346689 18.780048 10.086673 0 0 0
|
||||||
|
109 1 1 0.001185 12.520033 16.693378 8 0 0 0
|
||||||
|
110 1 1 -0.000778 14.606705 18.780048 8 0 0 0
|
||||||
|
111 1 1 -0.020266 14.606705 16.693378 10.086673 0 0 0
|
||||||
|
112 1 1 -0.010312 12.520033 18.780048 10.086673 0 0 0
|
||||||
|
113 1 1 -0.000613 16.693378 16.693378 8 0 0 0
|
||||||
|
114 1 1 -0.000958 18.780048 18.780048 8 0 0 0
|
||||||
|
115 1 1 -0.036602 18.780048 16.693378 10.086673 0 0 0
|
||||||
|
116 1 1 -0.029068 16.693378 18.780048 10.086673 0 0 0
|
||||||
|
117 1 1 -0.005554 20.86672 16.693378 8 0 0 0
|
||||||
|
118 1 1 0.000738 22.953394 18.780048 8 0 0 0
|
||||||
|
119 1 1 -0.027189 22.953394 16.693378 10.086673 0 0 0
|
||||||
|
120 1 1 -0.023111 20.86672 18.780048 10.086673 0 0 0
|
||||||
|
121 1 1 7.5e-05 25.040066 20.86672 8 0 0 0
|
||||||
|
122 1 1 0.000623 2.086672 22.953394 8 0 0 0
|
||||||
|
123 1 1 -0.007516 2.086672 20.86672 10.086673 0 0 0
|
||||||
|
124 1 1 -0.014682 25.040066 22.953394 10.086673 0 0 0
|
||||||
|
125 1 1 0.000878 4.173345 20.86672 8 0 0 0
|
||||||
|
126 1 1 -0.001576 6.260016 22.953394 8 0 0 0
|
||||||
|
127 1 1 -0.029629 6.260016 20.86672 10.086673 0 0 0
|
||||||
|
128 1 1 0.004728 4.173345 22.953394 10.086673 0 0 0
|
||||||
|
129 1 1 -0.003433 8.346689 20.86672 8 0 0 0
|
||||||
|
130 1 1 -0.000577 10.433361 22.953394 8 0 0 0
|
||||||
|
131 1 1 -0.026467 10.433361 20.86672 10.086673 0 0 0
|
||||||
|
132 1 1 -0.043264 8.346689 22.953394 10.086673 0 0 0
|
||||||
|
133 1 1 -0.000921 12.520033 20.86672 8 0 0 0
|
||||||
|
134 1 1 -0.000361 14.606705 22.953394 8 0 0 0
|
||||||
|
135 1 1 -0.017852 14.606705 20.86672 10.086673 0 0 0
|
||||||
|
136 1 1 -0.021653 12.520033 22.953394 10.086673 0 0 0
|
||||||
|
137 1 1 0.000268 16.693378 20.86672 8 0 0 0
|
||||||
|
138 1 1 -0.000345 18.780048 22.953394 8 0 0 0
|
||||||
|
139 1 1 -0.00903 18.780048 20.86672 10.086673 0 0 0
|
||||||
|
140 1 1 -0.01542 16.693378 22.953394 10.086673 0 0 0
|
||||||
|
141 1 1 0.000128 20.86672 20.86672 8 0 0 0
|
||||||
|
142 1 1 0.000334 22.953394 22.953394 8 0 0 0
|
||||||
|
143 1 1 -0.002285 22.953394 20.86672 10.086673 0 0 0
|
||||||
|
144 1 1 -0.00745 20.86672 22.953394 10.086673 0 0 0
|
||||||
|
145 2 2 0.019659 25.040066 0 32.173344 0 1 0
|
||||||
|
146 2 2 0.022955 2.086672 2.086672 32.173344 0 0 0
|
||||||
|
147 2 2 0.000876 2.086672 0 34.260021 0 1 0
|
||||||
|
148 2 2 0.00156 25.040066 2.086672 34.260021 0 0 0
|
||||||
|
149 2 2 0.027435 4.173345 0 32.173344 0 1 0
|
||||||
|
150 2 2 0.020862 6.260016 2.086672 32.173344 0 0 0
|
||||||
|
151 2 2 0.001578 6.260016 0 34.260021 0 1 0
|
||||||
|
152 2 2 0.001014 4.173345 2.086672 34.260021 0 0 0
|
||||||
|
153 2 2 0.021009 8.346689 0 32.173344 0 1 0
|
||||||
|
154 2 2 0.01514 10.433361 2.086672 32.173344 0 0 0
|
||||||
|
155 2 2 0.001872 10.433361 0 34.260021 0 1 0
|
||||||
|
156 2 2 0.001184 8.346689 2.086672 34.260021 0 0 0
|
||||||
|
157 2 2 0.004752 12.520033 0 32.173344 0 1 0
|
||||||
|
158 2 2 0.005408 14.606705 2.086672 32.173344 0 0 0
|
||||||
|
159 2 2 0.000237 14.606705 0 34.260021 0 1 0
|
||||||
|
160 2 2 0.001509 12.520033 2.086672 34.260021 0 0 0
|
||||||
|
161 2 2 0.012702 16.693378 0 32.173344 0 1 0
|
||||||
|
162 2 2 0.017746 18.780048 2.086672 32.173344 0 0 0
|
||||||
|
163 2 2 0.001489 18.780048 0 34.260021 0 1 0
|
||||||
|
164 2 2 0.000611 16.693378 2.086672 34.260021 0 0 0
|
||||||
|
165 2 2 0.034109 20.86672 0 32.173344 0 1 0
|
||||||
|
166 2 2 0.031678 22.953394 2.086672 32.173344 0 0 0
|
||||||
|
167 2 2 0.002473 22.953394 0 34.260021 0 1 0
|
||||||
|
168 2 2 0.002352 20.86672 2.086672 34.260021 0 0 0
|
||||||
|
169 2 2 0.014267 25.040066 4.173345 32.173344 0 0 0
|
||||||
|
170 2 2 0.008185 2.086672 6.260016 32.173344 0 0 0
|
||||||
|
171 2 2 0.001602 2.086672 4.173345 34.260021 0 0 0
|
||||||
|
172 2 2 0.000168 25.040066 6.260016 34.260021 0 0 0
|
||||||
|
173 2 2 0.022473 4.173345 4.173345 32.173344 0 0 0
|
||||||
|
174 2 2 0.03292 6.260016 6.260016 32.173344 0 0 0
|
||||||
|
175 2 2 0.002046 6.260016 4.173345 34.260021 0 0 0
|
||||||
|
176 2 2 0.000803 4.173345 6.260016 34.260021 0 0 0
|
||||||
|
177 2 2 0.032031 8.346689 4.173345 32.173344 0 0 0
|
||||||
|
178 2 2 0.02783 10.433361 6.260016 32.173344 0 0 0
|
||||||
|
179 2 2 0.001241 10.433361 4.173345 34.260021 0 0 0
|
||||||
|
180 2 2 0.002258 8.346689 6.260016 34.260021 0 0 0
|
||||||
|
181 2 2 0.019546 12.520033 4.173345 32.173344 0 0 0
|
||||||
|
182 2 2 0.016796 14.606705 6.260016 32.173344 0 0 0
|
||||||
|
183 2 2 0.00231 14.606705 4.173345 34.260021 0 0 0
|
||||||
|
184 2 2 0.001481 12.520033 6.260016 34.260021 0 0 0
|
||||||
|
185 2 2 0.014646 16.693378 4.173345 32.173344 0 0 0
|
||||||
|
186 2 2 0.008992 18.780048 6.260016 32.173344 0 0 0
|
||||||
|
187 2 2 0.000504 18.780048 4.173345 34.260021 0 0 0
|
||||||
|
188 2 2 0.000878 16.693378 6.260016 34.260021 0 0 0
|
||||||
|
189 2 2 0.021772 20.86672 4.173345 32.173344 0 0 0
|
||||||
|
190 2 2 0.01304 22.953394 6.260016 32.173344 0 0 0
|
||||||
|
191 2 2 0.00118 22.953394 4.173345 34.260021 0 0 0
|
||||||
|
192 2 2 0.001457 20.86672 6.260016 34.260021 0 0 0
|
||||||
|
193 2 2 0.001698 25.040066 8.346689 32.173344 0 0 0
|
||||||
|
194 2 2 0.025689 2.086672 10.433361 32.173344 0 0 0
|
||||||
|
195 2 2 0.000649 2.086672 8.346689 34.260021 0 0 0
|
||||||
|
196 2 2 0.00215 25.040066 10.433361 34.260021 0 0 0
|
||||||
|
197 2 2 0.015557 4.173345 8.346689 32.173344 0 0 0
|
||||||
|
198 2 2 0.025584 6.260016 10.433361 32.173344 0 0 0
|
||||||
|
199 2 2 0.002292 6.260016 8.346689 34.260021 0 0 0
|
||||||
|
200 2 2 0.000819 4.173345 10.433361 34.260021 0 0 0
|
||||||
|
201 2 2 0.035591 8.346689 8.346689 32.173344 0 0 0
|
||||||
|
202 2 2 0.015873 10.433361 10.433361 32.173344 0 0 0
|
||||||
|
203 2 2 0.000758 10.433361 8.346689 34.260021 0 0 0
|
||||||
|
204 2 2 0.002678 8.346689 10.433361 34.260021 0 0 0
|
||||||
|
205 2 2 0.008097 12.520033 8.346689 32.173344 0 0 0
|
||||||
|
206 2 2 0.015646 14.606705 10.433361 32.173344 0 0 0
|
||||||
|
207 2 2 0.001702 14.606705 8.346689 34.260021 0 0 0
|
||||||
|
208 2 2 0.000994 12.520033 10.433361 34.260021 0 0 0
|
||||||
|
209 2 2 0.017819 16.693378 8.346689 32.173344 0 0 0
|
||||||
|
210 2 2 0.029386 18.780048 10.433361 32.173344 0 0 0
|
||||||
|
211 2 2 0.000676 18.780048 8.346689 34.260021 0 0 0
|
||||||
|
212 2 2 0.001677 16.693378 10.433361 34.260021 0 0 0
|
||||||
|
213 2 2 0.020182 20.86672 8.346689 32.173344 0 0 0
|
||||||
|
214 2 2 0.02881 22.953394 10.433361 32.173344 0 0 0
|
||||||
|
215 2 2 0.002276 22.953394 8.346689 34.260021 0 0 0
|
||||||
|
216 2 2 0.003118 20.86672 10.433361 34.260021 0 0 0
|
||||||
|
217 2 2 0.012257 25.040066 12.520033 32.173344 0 0 0
|
||||||
|
218 2 2 0.021343 2.086672 14.606705 32.173344 0 0 0
|
||||||
|
219 2 2 0.001799 2.086672 12.520033 34.260021 0 0 0
|
||||||
|
220 2 2 0.001591 25.040066 14.606705 34.260021 0 0 0
|
||||||
|
221 2 2 0.022952 4.173345 12.520033 32.173344 0 0 0
|
||||||
|
222 2 2 0.012325 6.260016 14.606705 32.173344 0 0 0
|
||||||
|
223 2 2 0.001876 6.260016 12.520033 34.260021 0 0 0
|
||||||
|
224 2 2 0.001718 4.173345 14.606705 34.260021 0 0 0
|
||||||
|
225 2 2 0.023719 8.346689 12.520033 32.173344 0 0 0
|
||||||
|
226 2 2 0.004714 10.433361 14.606705 32.173344 0 0 0
|
||||||
|
227 2 2 0.001251 10.433361 12.520033 34.260021 0 0 0
|
||||||
|
228 2 2 0.000744 8.346689 14.606705 34.260021 0 0 0
|
||||||
|
229 2 2 0.018756 12.520033 12.520033 32.173344 0 0 0
|
||||||
|
230 2 2 -0.00689 14.606705 14.606705 32.173344 0 0 0
|
||||||
|
231 2 2 0.000922 14.606705 12.520033 34.260021 0 0 0
|
||||||
|
232 2 2 -0.002432 12.520033 14.606705 34.260021 0 0 0
|
||||||
|
233 2 2 0.015625 16.693378 12.520033 32.173344 0 0 0
|
||||||
|
234 2 2 -0.009585 18.780048 14.606705 32.173344 0 0 0
|
||||||
|
235 2 2 0.001459 18.780048 12.520033 34.260021 0 0 0
|
||||||
|
236 2 2 0.001044 16.693378 14.606705 34.260021 0 0 0
|
||||||
|
237 2 2 0.020359 20.86672 12.520033 32.173344 0 0 0
|
||||||
|
238 2 2 0.004616 22.953394 14.606705 32.173344 0 0 0
|
||||||
|
239 2 2 0.000697 22.953394 12.520033 34.260021 0 0 0
|
||||||
|
240 2 2 5e-06 20.86672 14.606705 34.260021 0 0 0
|
||||||
|
241 2 2 0.029057 25.040066 16.693378 32.173344 0 0 0
|
||||||
|
242 2 2 0.034403 2.086672 18.780048 32.173344 0 0 0
|
||||||
|
243 2 2 0.002402 2.086672 16.693378 34.260021 0 0 0
|
||||||
|
244 2 2 0.001076 25.040066 18.780048 34.260021 0 0 0
|
||||||
|
245 2 2 0.021827 4.173345 16.693378 32.173344 0 0 0
|
||||||
|
246 2 2 0.011918 6.260016 18.780048 32.173344 0 0 0
|
||||||
|
247 2 2 0.000792 6.260016 16.693378 34.260021 0 0 0
|
||||||
|
248 2 2 0.002071 4.173345 18.780048 34.260021 0 0 0
|
||||||
|
249 2 2 -0.002694 8.346689 16.693378 32.173344 0 0 0
|
||||||
|
250 2 2 -0.000573 10.433361 18.780048 32.173344 0 0 0
|
||||||
|
251 2 2 0.000448 10.433361 16.693378 34.260021 0 0 0
|
||||||
|
252 2 2 0.000351 8.346689 18.780048 34.260021 0 0 0
|
||||||
|
253 2 2 0.001141 12.520033 16.693378 32.173344 0 0 0
|
||||||
|
254 2 2 0.015575 14.606705 18.780048 32.173344 0 0 0
|
||||||
|
255 2 2 0.000258 14.606705 16.693378 34.260021 0 0 0
|
||||||
|
256 2 2 0.000372 12.520033 18.780048 34.260021 0 0 0
|
||||||
|
257 2 2 0.011285 16.693378 16.693378 32.173344 0 0 0
|
||||||
|
258 2 2 0.035183 18.780048 18.780048 32.173344 0 0 0
|
||||||
|
259 2 2 0.0002 18.780048 16.693378 34.260021 0 0 0
|
||||||
|
260 2 2 0.001199 16.693378 18.780048 34.260021 0 0 0
|
||||||
|
261 2 2 0.034083 20.86672 16.693378 32.173344 0 0 0
|
||||||
|
262 2 2 0.036995 22.953394 18.780048 32.173344 0 0 0
|
||||||
|
263 2 2 0.001484 22.953394 16.693378 34.260021 0 0 0
|
||||||
|
264 2 2 0.00377 20.86672 18.780048 34.260021 0 0 0
|
||||||
|
265 2 2 0.024028 25.040066 20.86672 32.173344 0 0 0
|
||||||
|
266 2 2 0.037372 2.086672 22.953394 32.173344 0 0 0
|
||||||
|
267 2 2 0.002492 2.086672 20.86672 34.260021 0 0 0
|
||||||
|
268 2 2 0.001334 25.040066 22.953394 34.260021 0 0 0
|
||||||
|
269 2 2 0.03734 4.173345 20.86672 32.173344 0 0 0
|
||||||
|
270 2 2 0.015818 6.260016 22.953394 32.173344 0 0 0
|
||||||
|
271 2 2 -0.0001 6.260016 20.86672 34.260021 0 0 0
|
||||||
|
272 2 2 0.002801 4.173345 22.953394 34.260021 0 0 0
|
||||||
|
273 2 2 0.017084 8.346689 20.86672 32.173344 0 0 0
|
||||||
|
274 2 2 0.031072 10.433361 22.953394 32.173344 0 0 0
|
||||||
|
275 2 2 -0.00031 10.433361 20.86672 34.260021 0 0 0
|
||||||
|
276 2 2 0.001644 8.346689 22.953394 34.260021 0 0 0
|
||||||
|
277 2 2 -0.004414 12.520033 20.86672 32.173344 0 0 0
|
||||||
|
278 2 2 0.017397 14.606705 22.953394 32.173344 0 0 0
|
||||||
|
279 2 2 0.001344 14.606705 20.86672 34.260021 0 0 0
|
||||||
|
280 2 2 0.000672 12.520033 22.953394 34.260021 0 0 0
|
||||||
|
281 2 2 0.0252 16.693378 20.86672 32.173344 0 0 0
|
||||||
|
282 2 2 0.030927 18.780048 22.953394 32.173344 0 0 0
|
||||||
|
283 2 2 0.002185 18.780048 20.86672 34.260021 0 0 0
|
||||||
|
284 2 2 0.001824 16.693378 22.953394 34.260021 0 0 0
|
||||||
|
285 2 2 0.043618 20.86672 20.86672 32.173344 0 0 0
|
||||||
|
286 2 2 0.030615 22.953394 22.953394 32.173344 0 0 0
|
||||||
|
287 2 2 0.001068 22.953394 20.86672 34.260021 0 0 0
|
||||||
|
288 2 2 0.001887 20.86672 22.953394 34.260021 0 0 0
|
||||||
|
|
||||||
|
Velocities
|
||||||
|
|
||||||
|
2 0 0 0
|
||||||
|
3 0 0 0
|
||||||
|
5 0 0 0
|
||||||
|
6 0 0 0
|
||||||
|
7 0 0 0
|
||||||
|
8 0 0 0
|
||||||
|
9 0 0 0
|
||||||
|
12 0 0 0
|
||||||
|
26 0 0 0
|
||||||
|
27 0 0 0
|
||||||
|
29 0 0 0
|
||||||
|
30 0 0 0
|
||||||
|
31 0 0 0
|
||||||
|
32 0 0 0
|
||||||
|
33 0 0 0
|
||||||
|
36 0 0 0
|
||||||
|
10 0 0 0
|
||||||
|
11 0 0 0
|
||||||
|
13 0 0 0
|
||||||
|
14 0 0 0
|
||||||
|
15 0 0 0
|
||||||
|
16 0 0 0
|
||||||
|
17 0 0 0
|
||||||
|
20 0 0 0
|
||||||
|
34 0 0 0
|
||||||
|
35 0 0 0
|
||||||
|
37 0 0 0
|
||||||
|
38 0 0 0
|
||||||
|
39 0 0 0
|
||||||
|
40 0 0 0
|
||||||
|
41 0 0 0
|
||||||
|
44 0 0 0
|
||||||
|
1 0 0 0
|
||||||
|
4 0 0 0
|
||||||
|
18 0 0 0
|
||||||
|
19 0 0 0
|
||||||
|
21 0 0 0
|
||||||
|
22 0 0 0
|
||||||
|
23 0 0 0
|
||||||
|
24 0 0 0
|
||||||
|
25 0 0 0
|
||||||
|
28 0 0 0
|
||||||
|
42 0 0 0
|
||||||
|
43 0 0 0
|
||||||
|
45 0 0 0
|
||||||
|
46 0 0 0
|
||||||
|
47 0 0 0
|
||||||
|
48 0 0 0
|
||||||
|
50 0 0 0
|
||||||
|
51 0 0 0
|
||||||
|
53 0 0 0
|
||||||
|
54 0 0 0
|
||||||
|
55 0 0 0
|
||||||
|
56 0 0 0
|
||||||
|
57 0 0 0
|
||||||
|
60 0 0 0
|
||||||
|
74 0 0 0
|
||||||
|
75 0 0 0
|
||||||
|
77 0 0 0
|
||||||
|
78 0 0 0
|
||||||
|
79 0 0 0
|
||||||
|
80 0 0 0
|
||||||
|
81 0 0 0
|
||||||
|
84 0 0 0
|
||||||
|
58 0 0 0
|
||||||
|
59 0 0 0
|
||||||
|
61 0 0 0
|
||||||
|
62 0 0 0
|
||||||
|
63 0 0 0
|
||||||
|
64 0 0 0
|
||||||
|
65 0 0 0
|
||||||
|
68 0 0 0
|
||||||
|
82 0 0 0
|
||||||
|
83 0 0 0
|
||||||
|
85 0 0 0
|
||||||
|
86 0 0 0
|
||||||
|
87 0 0 0
|
||||||
|
88 0 0 0
|
||||||
|
89 0 0 0
|
||||||
|
92 0 0 0
|
||||||
|
49 0 0 0
|
||||||
|
52 0 0 0
|
||||||
|
66 0 0 0
|
||||||
|
67 0 0 0
|
||||||
|
69 0 0 0
|
||||||
|
70 0 0 0
|
||||||
|
71 0 0 0
|
||||||
|
72 0 0 0
|
||||||
|
73 0 0 0
|
||||||
|
76 0 0 0
|
||||||
|
90 0 0 0
|
||||||
|
91 0 0 0
|
||||||
|
93 0 0 0
|
||||||
|
94 0 0 0
|
||||||
|
95 0 0 0
|
||||||
|
96 0 0 0
|
||||||
|
98 0 0 0
|
||||||
|
99 0 0 0
|
||||||
|
101 0 0 0
|
||||||
|
102 0 0 0
|
||||||
|
103 0 0 0
|
||||||
|
104 0 0 0
|
||||||
|
105 0 0 0
|
||||||
|
108 0 0 0
|
||||||
|
122 0 0 0
|
||||||
|
123 0 0 0
|
||||||
|
125 0 0 0
|
||||||
|
126 0 0 0
|
||||||
|
127 0 0 0
|
||||||
|
128 0 0 0
|
||||||
|
129 0 0 0
|
||||||
|
132 0 0 0
|
||||||
|
106 0 0 0
|
||||||
|
107 0 0 0
|
||||||
|
109 0 0 0
|
||||||
|
110 0 0 0
|
||||||
|
111 0 0 0
|
||||||
|
112 0 0 0
|
||||||
|
113 0 0 0
|
||||||
|
116 0 0 0
|
||||||
|
130 0 0 0
|
||||||
|
131 0 0 0
|
||||||
|
133 0 0 0
|
||||||
|
134 0 0 0
|
||||||
|
135 0 0 0
|
||||||
|
136 0 0 0
|
||||||
|
137 0 0 0
|
||||||
|
140 0 0 0
|
||||||
|
97 0 0 0
|
||||||
|
100 0 0 0
|
||||||
|
114 0 0 0
|
||||||
|
115 0 0 0
|
||||||
|
117 0 0 0
|
||||||
|
118 0 0 0
|
||||||
|
119 0 0 0
|
||||||
|
120 0 0 0
|
||||||
|
121 0 0 0
|
||||||
|
124 0 0 0
|
||||||
|
138 0 0 0
|
||||||
|
139 0 0 0
|
||||||
|
141 0 0 0
|
||||||
|
142 0 0 0
|
||||||
|
143 0 0 0
|
||||||
|
144 0 0 0
|
||||||
|
146 0 0 0
|
||||||
|
147 0 0 0
|
||||||
|
149 0 0 0
|
||||||
|
150 0 0 0
|
||||||
|
151 0 0 0
|
||||||
|
152 0 0 0
|
||||||
|
153 0 0 0
|
||||||
|
156 0 0 0
|
||||||
|
170 0 0 0
|
||||||
|
171 0 0 0
|
||||||
|
173 0 0 0
|
||||||
|
174 0 0 0
|
||||||
|
175 0 0 0
|
||||||
|
176 0 0 0
|
||||||
|
177 0 0 0
|
||||||
|
180 0 0 0
|
||||||
|
154 0 0 0
|
||||||
|
155 0 0 0
|
||||||
|
157 0 0 0
|
||||||
|
158 0 0 0
|
||||||
|
159 0 0 0
|
||||||
|
160 0 0 0
|
||||||
|
161 0 0 0
|
||||||
|
164 0 0 0
|
||||||
|
178 0 0 0
|
||||||
|
179 0 0 0
|
||||||
|
181 0 0 0
|
||||||
|
182 0 0 0
|
||||||
|
183 0 0 0
|
||||||
|
184 0 0 0
|
||||||
|
185 0 0 0
|
||||||
|
188 0 0 0
|
||||||
|
145 0 0 0
|
||||||
|
148 0 0 0
|
||||||
|
162 0 0 0
|
||||||
|
163 0 0 0
|
||||||
|
165 0 0 0
|
||||||
|
166 0 0 0
|
||||||
|
167 0 0 0
|
||||||
|
168 0 0 0
|
||||||
|
169 0 0 0
|
||||||
|
172 0 0 0
|
||||||
|
186 0 0 0
|
||||||
|
187 0 0 0
|
||||||
|
189 0 0 0
|
||||||
|
190 0 0 0
|
||||||
|
191 0 0 0
|
||||||
|
192 0 0 0
|
||||||
|
194 0 0 0
|
||||||
|
195 0 0 0
|
||||||
|
197 0 0 0
|
||||||
|
198 0 0 0
|
||||||
|
199 0 0 0
|
||||||
|
200 0 0 0
|
||||||
|
201 0 0 0
|
||||||
|
204 0 0 0
|
||||||
|
218 0 0 0
|
||||||
|
219 0 0 0
|
||||||
|
221 0 0 0
|
||||||
|
222 0 0 0
|
||||||
|
223 0 0 0
|
||||||
|
224 0 0 0
|
||||||
|
225 0 0 0
|
||||||
|
228 0 0 0
|
||||||
|
202 0 0 0
|
||||||
|
203 0 0 0
|
||||||
|
205 0 0 0
|
||||||
|
206 0 0 0
|
||||||
|
207 0 0 0
|
||||||
|
208 0 0 0
|
||||||
|
209 0 0 0
|
||||||
|
212 0 0 0
|
||||||
|
226 0 0 0
|
||||||
|
227 0 0 0
|
||||||
|
229 0 0 0
|
||||||
|
230 0 0 0
|
||||||
|
231 0 0 0
|
||||||
|
232 0 0 0
|
||||||
|
233 0 0 0
|
||||||
|
236 0 0 0
|
||||||
|
193 0 0 0
|
||||||
|
196 0 0 0
|
||||||
|
210 0 0 0
|
||||||
|
211 0 0 0
|
||||||
|
213 0 0 0
|
||||||
|
214 0 0 0
|
||||||
|
215 0 0 0
|
||||||
|
216 0 0 0
|
||||||
|
217 0 0 0
|
||||||
|
220 0 0 0
|
||||||
|
234 0 0 0
|
||||||
|
235 0 0 0
|
||||||
|
237 0 0 0
|
||||||
|
238 0 0 0
|
||||||
|
239 0 0 0
|
||||||
|
240 0 0 0
|
||||||
|
242 0 0 0
|
||||||
|
243 0 0 0
|
||||||
|
245 0 0 0
|
||||||
|
246 0 0 0
|
||||||
|
247 0 0 0
|
||||||
|
248 0 0 0
|
||||||
|
249 0 0 0
|
||||||
|
252 0 0 0
|
||||||
|
266 0 0 0
|
||||||
|
267 0 0 0
|
||||||
|
269 0 0 0
|
||||||
|
270 0 0 0
|
||||||
|
271 0 0 0
|
||||||
|
272 0 0 0
|
||||||
|
273 0 0 0
|
||||||
|
276 0 0 0
|
||||||
|
250 0 0 0
|
||||||
|
251 0 0 0
|
||||||
|
253 0 0 0
|
||||||
|
254 0 0 0
|
||||||
|
255 0 0 0
|
||||||
|
256 0 0 0
|
||||||
|
257 0 0 0
|
||||||
|
260 0 0 0
|
||||||
|
274 0 0 0
|
||||||
|
275 0 0 0
|
||||||
|
277 0 0 0
|
||||||
|
278 0 0 0
|
||||||
|
279 0 0 0
|
||||||
|
280 0 0 0
|
||||||
|
281 0 0 0
|
||||||
|
284 0 0 0
|
||||||
|
241 0 0 0
|
||||||
|
244 0 0 0
|
||||||
|
258 0 0 0
|
||||||
|
259 0 0 0
|
||||||
|
261 0 0 0
|
||||||
|
262 0 0 0
|
||||||
|
263 0 0 0
|
||||||
|
264 0 0 0
|
||||||
|
265 0 0 0
|
||||||
|
268 0 0 0
|
||||||
|
282 0 0 0
|
||||||
|
283 0 0 0
|
||||||
|
285 0 0 0
|
||||||
|
286 0 0 0
|
||||||
|
287 0 0 0
|
||||||
|
288 0 0 0
|
||||||
19
examples/electrode/thoams-fermi/charged.settings
Normal file
19
examples/electrode/thoams-fermi/charged.settings
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
atom_style full
|
||||||
|
units real
|
||||||
|
kspace_style pppm/electrode 1.0e-8
|
||||||
|
kspace_modify gewald 0.231
|
||||||
|
kspace_modify mesh 8 8 16
|
||||||
|
kspace_modify order 5
|
||||||
|
|
||||||
|
boundary p p f
|
||||||
|
kspace_modify slab 3.0
|
||||||
|
pair_style lj/cut/coul/long 12 12
|
||||||
|
processors * * 1
|
||||||
|
|
||||||
|
|
||||||
|
read_data "charged.data"
|
||||||
|
|
||||||
|
group ele type 1 2
|
||||||
|
group bot type 1
|
||||||
|
group top type 2
|
||||||
|
pair_coeff * * 0.0 0.0
|
||||||
10
examples/electrode/thoams-fermi/tf.in
Normal file
10
examples/electrode/thoams-fermi/tf.in
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
include charged.settings
|
||||||
|
|
||||||
|
kspace_modify amat onestep
|
||||||
|
|
||||||
|
fix fxupdate bot electrode/conp -1.0 1.805 couple top 1.0 write_mat tf.csv
|
||||||
|
fix_modify fxupdate tf 1 1.0 18.1715745
|
||||||
|
fix_modify fxupdate tf 2 1.0 18.1715745
|
||||||
|
run 0
|
||||||
|
|
||||||
|
write_data tf.data
|
||||||
@ -46,6 +46,7 @@ ElectrodeMatrix::ElectrodeMatrix(LAMMPS *lmp, int electrode_group, double eta) :
|
|||||||
groupbit = group->bitmask[igroup];
|
groupbit = group->bitmask[igroup];
|
||||||
ngroup = group->count(igroup);
|
ngroup = group->count(igroup);
|
||||||
this->eta = eta;
|
this->eta = eta;
|
||||||
|
tfflag = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -63,6 +64,13 @@ void ElectrodeMatrix::setup(std::map<tagint, int> tag_ids, class Pair *fix_pair,
|
|||||||
|
|
||||||
tag_to_iele = tag_ids;
|
tag_to_iele = tag_ids;
|
||||||
}
|
}
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void ElectrodeMatrix::setup_tf(std::map<int, double> tf_types)
|
||||||
|
{
|
||||||
|
tfflag = true;
|
||||||
|
this->tf_types = tf_types;
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
@ -82,6 +90,7 @@ void ElectrodeMatrix::compute_array(double **array)
|
|||||||
pair_contribution(array);
|
pair_contribution(array);
|
||||||
self_contribution(array);
|
self_contribution(array);
|
||||||
electrode_kspace->compute_matrix_corr(&mpos[0], array);
|
electrode_kspace->compute_matrix_corr(&mpos[0], array);
|
||||||
|
if (tfflag) tf_contribution(array);
|
||||||
|
|
||||||
// reduce coulomb matrix with contributions from all procs
|
// reduce coulomb matrix with contributions from all procs
|
||||||
// all procs need to know full matrix for matrix inversion
|
// all procs need to know full matrix for matrix inversion
|
||||||
@ -185,6 +194,17 @@ void ElectrodeMatrix::self_contribution(double **array)
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void ElectrodeMatrix::tf_contribution(double **array)
|
||||||
|
{
|
||||||
|
int nlocal = atom->nlocal;
|
||||||
|
int *type = atom->type;
|
||||||
|
int *mask = atom->mask;
|
||||||
|
for (int i = 0; i < nlocal; i++)
|
||||||
|
if (mask[i] & groupbit) array[mpos[i]][mpos[i]] += tf_types[type[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void ElectrodeMatrix::update_mpos()
|
void ElectrodeMatrix::update_mpos()
|
||||||
{
|
{
|
||||||
int const nall = atom->nlocal + atom->nghost;
|
int const nall = atom->nlocal + atom->nghost;
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class ElectrodeMatrix : protected Pointers {
|
|||||||
ElectrodeMatrix(class LAMMPS *, int, double);
|
ElectrodeMatrix(class LAMMPS *, int, double);
|
||||||
~ElectrodeMatrix() {}
|
~ElectrodeMatrix() {}
|
||||||
void setup(std::map<tagint, int>, class Pair *, class NeighList *);
|
void setup(std::map<tagint, int>, class Pair *, class NeighList *);
|
||||||
|
void setup_tf(std::map<int, double>);
|
||||||
void compute_array(double **);
|
void compute_array(double **);
|
||||||
int igroup;
|
int igroup;
|
||||||
|
|
||||||
@ -35,6 +36,8 @@ class ElectrodeMatrix : protected Pointers {
|
|||||||
bigint ngroup;
|
bigint ngroup;
|
||||||
double **cutsq;
|
double **cutsq;
|
||||||
double g_ewald, eta;
|
double g_ewald, eta;
|
||||||
|
bool tfflag;
|
||||||
|
std::map<int, double> tf_types;
|
||||||
std::map<tagint, int> tag_to_iele;
|
std::map<tagint, int> tag_to_iele;
|
||||||
bool assigned;
|
bool assigned;
|
||||||
std::vector<bigint> mpos;
|
std::vector<bigint> mpos;
|
||||||
@ -45,6 +48,7 @@ class ElectrodeMatrix : protected Pointers {
|
|||||||
void update_mpos();
|
void update_mpos();
|
||||||
void pair_contribution(double **);
|
void pair_contribution(double **);
|
||||||
void self_contribution(double **);
|
void self_contribution(double **);
|
||||||
|
void tf_contribution(double **);
|
||||||
double calc_erfc(double);
|
double calc_erfc(double);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -74,6 +74,7 @@ FixElectrodeConp::FixElectrodeConp(LAMMPS *lmp, int narg, char **arg) : Fix(lmp,
|
|||||||
vector_flag = 1;
|
vector_flag = 1;
|
||||||
top_group = 0;
|
top_group = 0;
|
||||||
intelflag = false;
|
intelflag = false;
|
||||||
|
tfflag = false;
|
||||||
|
|
||||||
update_time = 0;
|
update_time = 0;
|
||||||
mult_time = 0;
|
mult_time = 0;
|
||||||
@ -257,7 +258,40 @@ FixElectrodeConp::FixElectrodeConp(LAMMPS *lmp, int narg, char **arg) : Fix(lmp,
|
|||||||
// fix_modify fxupdate set me [group1] [group2] [var]
|
// fix_modify fxupdate set me [group1] [group2] [var]
|
||||||
int FixElectrodeConp::modify_param(int narg, char **arg)
|
int FixElectrodeConp::modify_param(int narg, char **arg)
|
||||||
{
|
{
|
||||||
if (strcmp(arg[0], "set") == 0) {
|
if (strcmp(arg[0], "tf") == 0) {
|
||||||
|
if (narg != 4)
|
||||||
|
error->all(FLERR, fmt::format("Incorrect number of arguments for fix_modify tf"));
|
||||||
|
tfflag = true;
|
||||||
|
// read atom type, Thomas-Fermi length, and voronoi volume (reciprocal
|
||||||
|
// number density)
|
||||||
|
int const type = utils::inumeric(FLERR, arg[1], false, lmp);
|
||||||
|
double const len = utils::numeric(FLERR, arg[2], false, lmp);
|
||||||
|
double const voronoi = utils::numeric(FLERR, arg[3], false, lmp);
|
||||||
|
// check type exists and is completely in electrode
|
||||||
|
int not_in_ele = 0;
|
||||||
|
int in_ele = 0;
|
||||||
|
for (int i = 0; i < atom->nlocal; i++) {
|
||||||
|
if (atom->type[i] == type) {
|
||||||
|
if (atom->mask[i] & groupbit)
|
||||||
|
in_ele++;
|
||||||
|
else
|
||||||
|
not_in_ele++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MPI_Allreduce(MPI_IN_PLACE, &in_ele, 1, MPI_INT, MPI_SUM, world);
|
||||||
|
if (in_ele == 0) error->all(FLERR, "No atoms of type in electrode");
|
||||||
|
MPI_Allreduce(MPI_IN_PLACE, ¬_in_ele, 1, MPI_INT, MPI_SUM, world);
|
||||||
|
if (not_in_ele)
|
||||||
|
error->warning(FLERR,
|
||||||
|
"Not all atoms of type in electrode; Thomas-Fermi parameters will be ignored "
|
||||||
|
"for electrolyte");
|
||||||
|
// insert into map, replace if already exists
|
||||||
|
auto entry = tf_types.find(type);
|
||||||
|
if (entry != end(tf_types)) tf_types.erase(entry);
|
||||||
|
tf_types.insert(std::pair<int, double>(type, MY_4PI * len * len / voronoi));
|
||||||
|
return 4;
|
||||||
|
|
||||||
|
} else if (strcmp(arg[0], "set") == 0) {
|
||||||
if (strcmp(arg[1], "v") == 0 || strcmp(arg[1], "qsb") == 0) {
|
if (strcmp(arg[1], "v") == 0 || strcmp(arg[1], "qsb") == 0) {
|
||||||
if (narg != 4)
|
if (narg != 4)
|
||||||
error->all(FLERR,
|
error->all(FLERR,
|
||||||
@ -401,9 +435,25 @@ void FixElectrodeConp::post_constructor()
|
|||||||
|
|
||||||
void FixElectrodeConp::setup_post_neighbor()
|
void FixElectrodeConp::setup_post_neighbor()
|
||||||
{
|
{
|
||||||
|
int const nlocal = atom->nlocal;
|
||||||
|
int *mask = atom->mask;
|
||||||
|
|
||||||
// setvars asserts:
|
// setvars asserts:
|
||||||
assert(setvars_groups.size() == setvars_vars.size());
|
assert(setvars_groups.size() == setvars_vars.size());
|
||||||
assert(setvars_groups.size() == setvars_types.size());
|
assert(setvars_groups.size() == setvars_types.size());
|
||||||
|
|
||||||
|
// if Thomas-Fermi, make sure all electrode atoms have parameters
|
||||||
|
if (tfflag) {
|
||||||
|
int unset_tf = 0;
|
||||||
|
int *type = atom->type;
|
||||||
|
for (int i = 0; i < nlocal; i++) {
|
||||||
|
if ((groupbit & mask[i]) && (tf_types.count(type[i]) == 0)) unset_tf++;
|
||||||
|
}
|
||||||
|
MPI_Allreduce(MPI_IN_PLACE, &unset_tf, 1, MPI_INT, MPI_SUM, world);
|
||||||
|
if (unset_tf)
|
||||||
|
error->all(FLERR, fmt::format("Thomas-Fermi parameters not set for all types in electrode"));
|
||||||
|
}
|
||||||
|
|
||||||
// get equal-style variable ids:
|
// get equal-style variable ids:
|
||||||
group_psi_var_ids = std::vector<int>(num_of_groups, -1);
|
group_psi_var_ids = std::vector<int>(num_of_groups, -1);
|
||||||
for (int g = 0; g < num_of_groups; g++) {
|
for (int g = 0; g < num_of_groups; g++) {
|
||||||
@ -418,8 +468,6 @@ void FixElectrodeConp::setup_post_neighbor()
|
|||||||
group_psi_var_ids[g] = var_id;
|
group_psi_var_ids[g] = var_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
int const nlocal = atom->nlocal;
|
|
||||||
int *mask = atom->mask;
|
|
||||||
// pair and list setups:
|
// pair and list setups:
|
||||||
|
|
||||||
evscale = force->qe2f / force->qqrd2e;
|
evscale = force->qe2f / force->qqrd2e;
|
||||||
@ -428,6 +476,7 @@ void FixElectrodeConp::setup_post_neighbor()
|
|||||||
if (!(read_mat || read_inv)) {
|
if (!(read_mat || read_inv)) {
|
||||||
if (etypes_neighlists) neighbor->build_one(mat_neighlist, 0);
|
if (etypes_neighlists) neighbor->build_one(mat_neighlist, 0);
|
||||||
array_compute->setup(tag_to_iele, pair, mat_neighlist);
|
array_compute->setup(tag_to_iele, pair, mat_neighlist);
|
||||||
|
if (tfflag) { array_compute->setup_tf(tf_types); }
|
||||||
}
|
}
|
||||||
// setup psi with target potentials
|
// setup psi with target potentials
|
||||||
std::vector<int> mpos = local_to_matrix();
|
std::vector<int> mpos = local_to_matrix();
|
||||||
@ -851,7 +900,6 @@ double FixElectrodeConp::compute_scalar()
|
|||||||
|
|
||||||
double FixElectrodeConp::compute_vector(int i)
|
double FixElectrodeConp::compute_vector(int i)
|
||||||
{
|
{
|
||||||
assert(i < num_of_groups);
|
|
||||||
return group_psi[i];
|
return group_psi[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -887,11 +935,14 @@ double FixElectrodeConp::self_energy(int eflag)
|
|||||||
int const nlocal = atom->nlocal;
|
int const nlocal = atom->nlocal;
|
||||||
double const pre = eta / sqrt(MY_2PI) * qqrd2e;
|
double const pre = eta / sqrt(MY_2PI) * qqrd2e;
|
||||||
int *mask = atom->mask;
|
int *mask = atom->mask;
|
||||||
|
int *type = atom->type;
|
||||||
double *q = atom->q;
|
double *q = atom->q;
|
||||||
double energy = 0;
|
double energy = 0;
|
||||||
for (int i = 0; i < nlocal; i++) {
|
for (int i = 0; i < nlocal; i++) {
|
||||||
if (groupbit & mask[i]) {
|
if (groupbit & mask[i]) {
|
||||||
double e = pre * q[i] * q[i];
|
double const q2 = q[i] * q[i];
|
||||||
|
double e = pre * q2;
|
||||||
|
if (tfflag && (groupbit & mask[i])) e += 0.5 * qqrd2e * q2 * tf_types[type[i]];
|
||||||
energy += e;
|
energy += e;
|
||||||
if (eflag) {
|
if (eflag) {
|
||||||
force->pair->ev_tally(i, i, nlocal, force->newton_pair, 0., e, 0, 0, 0,
|
force->pair->ev_tally(i, i, nlocal, force->newton_pair, 0., e, 0, 0, 0,
|
||||||
|
|||||||
@ -109,6 +109,8 @@ class FixElectrodeConp : public Fix {
|
|||||||
bool etypes_neighlists;
|
bool etypes_neighlists;
|
||||||
int get_top_group(); // used by ffield
|
int get_top_group(); // used by ffield
|
||||||
int top_group; // used by ffield
|
int top_group; // used by ffield
|
||||||
|
bool tfflag;
|
||||||
|
std::map<int, double> tf_types;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace LAMMPS_NS
|
} // namespace LAMMPS_NS
|
||||||
|
|||||||
Reference in New Issue
Block a user