Skip to content

Commit ee11940

Browse files
committed
Shortened simulation lengths and add reference log output
1 parent 740ba2b commit ee11940

File tree

6 files changed

+1378
-4
lines changed

6 files changed

+1378
-4
lines changed

examples/ELASTIC_T/BORN_MATRIX/Argon/Analytical/in.ljcov

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# adjustable parameters
1111

1212
units real
13-
variable nsteps index 100000 # length of run
13+
variable nsteps index 10000 # length of run
1414
variable nthermo index 1000 # thermo output interval
1515
variable nlat equal 5 # size of box
1616
variable T equal 60. # Temperature in K
@@ -39,7 +39,7 @@ thermo 100
3939
fix aL all ave/time 1 1 1 v_vol ave running
4040
fix NPT all npt temp $T $T 100 aniso 1. 1. 1000 fixedpoint 0. 0. 0.
4141

42-
run 20000
42+
run 2000
4343

4444
unfix NPT
4545

Lines changed: 353 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,353 @@
1+
LAMMPS (10 Sep 2025 - Development - patch_10Sep2025-520-gd2199aa57b-modified)
2+
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread.
3+
using 1 OpenMP thread(s) per MPI task
4+
# Analytical calculation
5+
# of Born matrix
6+
7+
# Note that because of cubic symmetry and central forces, we have:
8+
# C11, pure axial == positive mean value: 1,2,3
9+
# C44==C23, pure shear == positive mean value, exactly match in pairs: (4,12),(5,8),(6,7)
10+
# C14==C56, shear/axial(normal) == zero mean, exactly match in pairs: (9,21),(14,20),(18,19)
11+
# C15, shear/axial(in-plane) == zero mean: 10,11,13,15,16,17
12+
13+
# adjustable parameters
14+
15+
units real
16+
variable nsteps index 10000 # length of run
17+
variable nthermo index 1000 # thermo output interval
18+
variable nlat equal 5 # size of box
19+
variable T equal 60. # Temperature in K
20+
variable rho equal 5.405 # Lattice spacing in A
21+
22+
atom_style atomic
23+
24+
lattice fcc ${rho}
25+
lattice fcc 5.405
26+
Lattice spacing in x,y,z = 5.405 5.405 5.405
27+
region box block 0 ${nlat} 0 ${nlat} 0 ${nlat}
28+
region box block 0 5 0 ${nlat} 0 ${nlat}
29+
region box block 0 5 0 5 0 ${nlat}
30+
region box block 0 5 0 5 0 5
31+
create_box 1 box
32+
Created orthogonal box = (0 0 0) to (27.025 27.025 27.025)
33+
1 by 1 by 1 MPI processor grid
34+
create_atoms 1 box
35+
Created 500 atoms
36+
using lattice units in orthogonal box = (0 0 0) to (27.025 27.025 27.025)
37+
create_atoms CPU = 0.000 seconds
38+
39+
mass * 39.948
40+
41+
velocity all create ${T} 87287 loop geom
42+
velocity all create 60 87287 loop geom
43+
velocity all zero linear
44+
45+
pair_style lj/cut 12.0
46+
pair_coeff 1 1 0.238067 3.405
47+
48+
neighbor 0.0 bin
49+
neigh_modify every 1 delay 0 check no
50+
51+
variable vol equal vol
52+
thermo 100
53+
fix aL all ave/time 1 1 1 v_vol ave running
54+
fix NPT all npt temp $T $T 100 aniso 1. 1. 1000 fixedpoint 0. 0. 0.
55+
fix NPT all npt temp 60 $T 100 aniso 1. 1. 1000 fixedpoint 0. 0. 0.
56+
fix NPT all npt temp 60 60 100 aniso 1. 1. 1000 fixedpoint 0. 0. 0.
57+
58+
run 2000
59+
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
60+
Neighbor list info ...
61+
update: every = 1 steps, delay = 0 steps, check = no
62+
max neighbors/atom: 2000, page size: 100000
63+
master list distance cutoff = 12
64+
ghost atom cutoff = 12
65+
binsize = 6, bins = 5 5 5
66+
1 neighbor lists, perpetual/occasional/extra = 1 0 0
67+
(1) pair lj/cut, perpetual
68+
attributes: half, newton on
69+
pair build: half/bin/atomonly/newton
70+
stencil: half/bin/3d
71+
bin: standard
72+
Per MPI rank memory allocation (min/avg/max) = 2.695 | 2.695 | 2.695 Mbytes
73+
Step Temp E_pair E_mol TotEng Press Volume
74+
0 60 -974.97988 0 -885.73443 -1549.5634 19737.726
75+
100 33.504753 -943.70789 0 -893.87211 968.3116 18369.007
76+
200 26.32504 -930.72444 0 -891.56794 314.3869 18935.888
77+
300 41.132299 -931.36826 0 -870.18708 -617.04719 19632.688
78+
400 41.183387 -912.49497 0 -851.2378 485.3659 19105.509
79+
500 57.063649 -914.95616 0 -830.07831 10.213449 19451.639
80+
600 57.720228 -897.82416 0 -811.96969 -122.66415 19794.9
81+
700 55.117494 -878.27174 0 -796.28864 169.40743 19853.365
82+
800 65.753909 -877.79094 0 -779.98698 -140.35502 20145.428
83+
900 61.5708 -870.58334 0 -779.00144 -6.2782272 20132.09
84+
1000 59.71058 -873.44425 0 -784.62929 18.589753 20063.414
85+
1100 59.887921 -878.67927 0 -789.60053 -53.049476 20034.152
86+
1200 59.121142 -881.97593 0 -794.03771 31.110495 19909.638
87+
1300 60.931065 -887.19784 0 -796.5675 6.5972135 19859.309
88+
1400 60.086091 -890.68151 0 -801.308 -26.605388 19827.013
89+
1500 58.240958 -892.81245 0 -806.18344 32.781814 19743.494
90+
1600 59.997061 -896.10853 0 -806.86745 1.8694388 19731.408
91+
1700 62.500416 -900.56177 0 -807.59714 -58.405946 19717.51
92+
1800 60.950957 -905.28688 0 -814.62695 13.287333 19580.499
93+
1900 57.643425 -908.35702 0 -822.61679 80.300088 19476.931
94+
2000 54.860033 -904.52282 0 -822.92268 28.955012 19564.956
95+
Loop time of 3.77963 on 1 procs for 2000 steps with 500 atoms
96+
97+
Performance: 45.719 ns/day, 0.525 hours/ns, 529.153 timesteps/s, 264.576 katom-step/s
98+
100.0% CPU use with 1 MPI tasks x 1 OpenMP threads
99+
100+
MPI task timing breakdown:
101+
Section | min time | avg time | max time |%varavg| %total
102+
---------------------------------------------------------------
103+
Pair | 1.4902 | 1.4902 | 1.4902 | 0.0 | 39.43
104+
Neigh | 2.1869 | 2.1869 | 2.1869 | 0.0 | 57.86
105+
Comm | 0.062232 | 0.062232 | 0.062232 | 0.0 | 1.65
106+
Output | 0.00039628 | 0.00039628 | 0.00039628 | 0.0 | 0.01
107+
Modify | 0.030281 | 0.030281 | 0.030281 | 0.0 | 0.80
108+
Other | | 0.009542 | | | 0.25
109+
110+
Nlocal: 500 ave 500 max 500 min
111+
Histogram: 1 0 0 0 0 0 0 0 0 0
112+
Nghost: 2930 ave 2930 max 2930 min
113+
Histogram: 1 0 0 0 0 0 0 0 0 0
114+
Neighs: 46401 ave 46401 max 46401 min
115+
Histogram: 1 0 0 0 0 0 0 0 0 0
116+
117+
Total # of neighbors = 46401
118+
Ave neighs/atom = 92.802
119+
Neighbor list builds = 2000
120+
Dangerous builds not checked
121+
122+
unfix NPT
123+
124+
variable newL equal "f_aL^(1./3.)"
125+
change_box all x final 0 ${newL} y final 0. ${newL} z final 0. ${newL} remap units box
126+
change_box all x final 0 26.9850129540338 y final 0. ${newL} z final 0. ${newL} remap units box
127+
change_box all x final 0 26.9850129540338 y final 0. 26.9850129540338 z final 0. ${newL} remap units box
128+
change_box all x final 0 26.9850129540338 y final 0. 26.9850129540338 z final 0. 26.9850129540338 remap units box
129+
Changing box ...
130+
orthogonal box = (0 0 0) to (26.985013 26.94049 27.008247)
131+
orthogonal box = (0 0 0) to (26.985013 26.985013 27.008247)
132+
orthogonal box = (0 0 0) to (26.985013 26.985013 26.985013)
133+
134+
unfix aL
135+
136+
reset_timestep 0
137+
138+
# Conversion variables
139+
variable kb equal 1.38065e-23 # J/K
140+
variable Myvol equal "vol*10^-30" # Volume in m^3
141+
variable kbt equal "v_kb*v_T"
142+
variable Nat equal atoms
143+
variable Rhokbt equal "v_kbt*v_Nat/v_Myvol"
144+
variable at2Pa equal 101325
145+
variable kcalmol2J equal "4183.9954/(6.022e23)"
146+
variable C1 equal "v_kcalmol2J/v_Myvol" # Convert Cb from energy to pressure units
147+
variable C2 equal "v_Myvol/v_kbt" # Factor for Cfl terms
148+
variable Pa2GPa equal 1e-9
149+
150+
# Born compute giving <C^b> terms
151+
compute born all born/matrix
152+
# The six virial stress component to compute <C^fl>
153+
compute VIR all pressure NULL virial
154+
variable s1 equal "-c_VIR[1]*v_at2Pa"
155+
variable s2 equal "-c_VIR[2]*v_at2Pa"
156+
variable s3 equal "-c_VIR[3]*v_at2Pa"
157+
variable s6 equal "-c_VIR[4]*v_at2Pa"
158+
variable s5 equal "-c_VIR[5]*v_at2Pa"
159+
variable s4 equal "-c_VIR[6]*v_at2Pa"
160+
variable press equal press
161+
162+
163+
# Average of Born term and vector to store stress
164+
# for post processing
165+
fix CB all ave/time 1 ${nthermo} ${nthermo} c_born[*] ave running file born.out overwrite
166+
fix CB all ave/time 1 1000 ${nthermo} c_born[*] ave running file born.out overwrite
167+
fix CB all ave/time 1 1000 1000 c_born[*] ave running file born.out overwrite
168+
fix CPR all ave/time 1 1 1 c_VIR[*] file vir.out
169+
fix APR all ave/time 1 1 1 v_press ave running
170+
fix VEC all vector 1 v_s1 v_s2 v_s3 v_s4 v_s5 v_s6
171+
172+
thermo ${nthermo}
173+
thermo 1000
174+
thermo_style custom step temp press f_APR c_born[1] f_CB[1] c_born[12] f_CB[12] c_born[4] f_CB[4]
175+
thermo_modify line multi
176+
177+
fix 1 all nvt temp $T $T 100
178+
fix 1 all nvt temp 60 $T 100
179+
fix 1 all nvt temp 60 60 100
180+
181+
run ${nsteps}
182+
run 10000
183+
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
184+
Neighbor list info ...
185+
update: every = 1 steps, delay = 0 steps, check = no
186+
max neighbors/atom: 2000, page size: 100000
187+
master list distance cutoff = 12
188+
ghost atom cutoff = 12
189+
binsize = 6, bins = 5 5 5
190+
2 neighbor lists, perpetual/occasional/extra = 1 1 0
191+
(1) pair lj/cut, perpetual
192+
attributes: half, newton on
193+
pair build: half/bin/atomonly/newton
194+
stencil: half/bin/3d
195+
bin: standard
196+
(2) compute born/matrix, occasional
197+
attributes: full, newton on
198+
pair build: full/bin/atomonly
199+
stencil: full/bin/3d
200+
bin: standard
201+
Per MPI rank memory allocation (min/avg/max) = 3.326 | 3.326 | 3.326 Mbytes
202+
------------ Step 0 ----- CPU = 0 (sec) -------------
203+
Step = 0 Temp = 54.8600 Press = -74.9874
204+
f_APR = -74.9874 c_born[1] = 9269.2848 f_CB[1] = 0.0000
205+
c_born[12] = 5315.9657 f_CB[12] = 0.0000 c_born[4] = 5315.9657
206+
f_CB[4] = 0.0000
207+
------------ Step 1000 ----- CPU = 9.120759 (sec) -------------
208+
Step = 1000 Temp = 56.1005 Press = 93.2723
209+
f_APR = 104.8993 c_born[1] = 9899.7837 f_CB[1] = 9738.6101
210+
c_born[12] = 5515.1091 f_CB[12] = 5497.0605 c_born[4] = 5515.1091
211+
f_CB[4] = 5497.0605
212+
------------ Step 2000 ----- CPU = 18.76019 (sec) -------------
213+
Step = 2000 Temp = 59.2245 Press = 164.2019
214+
f_APR = 90.3569 c_born[1] = 10127.7921 f_CB[1] = 9762.5811
215+
c_born[12] = 5582.5570 f_CB[12] = 5512.1775 c_born[4] = 5582.5570
216+
f_CB[4] = 5512.1775
217+
------------ Step 3000 ----- CPU = 27.88892 (sec) -------------
218+
Step = 3000 Temp = 62.3421 Press = 138.9920
219+
f_APR = 103.8105 c_born[1] = 9784.0632 f_CB[1] = 9805.4617
220+
c_born[12] = 5558.8869 f_CB[12] = 5514.3234 c_born[4] = 5558.8869
221+
f_CB[4] = 5514.3234
222+
------------ Step 4000 ----- CPU = 36.92665 (sec) -------------
223+
Step = 4000 Temp = 58.1487 Press = 136.4624
224+
f_APR = 107.3823 c_born[1] = 9996.9126 f_CB[1] = 9821.2552
225+
c_born[12] = 5439.8328 f_CB[12] = 5518.8966 c_born[4] = 5439.8328
226+
f_CB[4] = 5518.8966
227+
------------ Step 5000 ----- CPU = 45.77529 (sec) -------------
228+
Step = 5000 Temp = 60.3351 Press = -21.9127
229+
f_APR = 101.0136 c_born[1] = 9631.2101 f_CB[1] = 9798.9441
230+
c_born[12] = 5352.0607 f_CB[12] = 5519.0345 c_born[4] = 5352.0607
231+
f_CB[4] = 5519.0345
232+
------------ Step 6000 ----- CPU = 54.63388 (sec) -------------
233+
Step = 6000 Temp = 57.7282 Press = 157.6900
234+
f_APR = 100.3234 c_born[1] = 10030.8342 f_CB[1] = 9800.1967
235+
c_born[12] = 5740.8579 f_CB[12] = 5521.0716 c_born[4] = 5740.8579
236+
f_CB[4] = 5521.0716
237+
------------ Step 7000 ----- CPU = 63.63728 (sec) -------------
238+
Step = 7000 Temp = 59.5948 Press = 135.9651
239+
f_APR = 101.9810 c_born[1] = 10058.4542 f_CB[1] = 9817.6242
240+
c_born[12] = 5511.2599 f_CB[12] = 5521.8274 c_born[4] = 5511.2599
241+
f_CB[4] = 5521.8274
242+
------------ Step 8000 ----- CPU = 73.14265 (sec) -------------
243+
Step = 8000 Temp = 61.7547 Press = 41.1860
244+
f_APR = 105.3152 c_born[1] = 9554.9451 f_CB[1] = 9830.6704
245+
c_born[12] = 5292.0749 f_CB[12] = 5520.3055 c_born[4] = 5292.0749
246+
f_CB[4] = 5520.3055
247+
------------ Step 9000 ----- CPU = 82.2176 (sec) -------------
248+
Step = 9000 Temp = 59.2478 Press = 146.6808
249+
f_APR = 104.7030 c_born[1] = 9860.2050 f_CB[1] = 9823.1198
250+
c_born[12] = 5543.4620 f_CB[12] = 5518.4889 c_born[4] = 5543.4620
251+
f_CB[4] = 5518.4889
252+
------------ Step 10000 ----- CPU = 91.68689 (sec) -------------
253+
Step = 10000 Temp = 59.4645 Press = 96.1963
254+
f_APR = 107.2322 c_born[1] = 9779.2285 f_CB[1] = 9836.0535
255+
c_born[12] = 5617.0229 f_CB[12] = 5525.6584 c_born[4] = 5617.0229
256+
f_CB[4] = 5525.6584
257+
Loop time of 91.6869 on 1 procs for 10000 steps with 500 atoms
258+
259+
Performance: 9.423 ns/day, 2.547 hours/ns, 109.067 timesteps/s, 54.533 katom-step/s
260+
99.3% CPU use with 1 MPI tasks x 1 OpenMP threads
261+
262+
MPI task timing breakdown:
263+
Section | min time | avg time | max time |%varavg| %total
264+
---------------------------------------------------------------
265+
Pair | 7.8446 | 7.8446 | 7.8446 | 0.0 | 8.56
266+
Neigh | 11.559 | 11.559 | 11.559 | 0.0 | 12.61
267+
Comm | 0.37942 | 0.37942 | 0.37942 | 0.0 | 0.41
268+
Output | 0.047699 | 0.047699 | 0.047699 | 0.0 | 0.05
269+
Modify | 71.807 | 71.807 | 71.807 | 0.0 | 78.32
270+
Other | | 0.04957 | | | 0.05
271+
272+
Nlocal: 500 ave 500 max 500 min
273+
Histogram: 1 0 0 0 0 0 0 0 0 0
274+
Nghost: 2930 ave 2930 max 2930 min
275+
Histogram: 1 0 0 0 0 0 0 0 0 0
276+
Neighs: 46195 ave 46195 max 46195 min
277+
Histogram: 1 0 0 0 0 0 0 0 0 0
278+
FullNghs: 92390 ave 92390 max 92390 min
279+
Histogram: 1 0 0 0 0 0 0 0 0 0
280+
281+
Total # of neighbors = 92390
282+
Ave neighs/atom = 184.78
283+
Neighbor list builds = 10000
284+
Dangerous builds not checked
285+
286+
# Compute vector averages
287+
# Note the indice switch.
288+
# LAMMPS convention is NOT the Voigt notation.
289+
variable aves1 equal "ave(f_VEC[1])"
290+
variable aves2 equal "ave(f_VEC[2])"
291+
variable aves3 equal "ave(f_VEC[3])"
292+
variable aves4 equal "ave(f_VEC[6])"
293+
variable aves5 equal "ave(f_VEC[5])"
294+
variable aves6 equal "ave(f_VEC[4])"
295+
296+
# Computing the covariance through the <s_{i}s_{j}>-<s_i><s_j>
297+
# is numerically instable. Here we go through the <(s-<s>)^2>
298+
# definition.
299+
300+
# Computing difference relative to average values
301+
variable ds1 vector "f_VEC[1]-v_aves1"
302+
variable ds2 vector "f_VEC[2]-v_aves2"
303+
variable ds3 vector "f_VEC[3]-v_aves3"
304+
variable ds4 vector "f_VEC[4]-v_aves4"
305+
variable ds5 vector "f_VEC[5]-v_aves5"
306+
variable ds6 vector "f_VEC[6]-v_aves6"
307+
308+
# Squaring and averaging
309+
variable dds1 vector "v_ds1*v_ds1"
310+
variable dds2 vector "v_ds2*v_ds2"
311+
variable dds3 vector "v_ds3*v_ds3"
312+
variable vars1 equal "ave(v_dds1)"
313+
variable vars2 equal "ave(v_dds2)"
314+
variable vars3 equal "ave(v_dds3)"
315+
variable C11 equal "v_Pa2GPa*(v_C1*f_CB[1] - v_C2*v_vars1 + 2*v_Rhokbt)"
316+
variable C22 equal "v_Pa2GPa*(v_C1*f_CB[2] - v_C2*v_vars2 + 2*v_Rhokbt)"
317+
variable C33 equal "v_Pa2GPa*(v_C1*f_CB[3] - v_C2*v_vars3 + 2*v_Rhokbt)"
318+
319+
variable dds12 vector "v_ds1*v_ds2"
320+
variable dds13 vector "v_ds1*v_ds3"
321+
variable dds23 vector "v_ds2*v_ds3"
322+
variable vars12 equal "ave(v_dds12)"
323+
variable vars13 equal "ave(v_dds13)"
324+
variable vars23 equal "ave(v_dds23)"
325+
variable C12 equal "v_Pa2GPa*(v_C1*f_CB[7] - v_C2*v_vars12)"
326+
variable C13 equal "v_Pa2GPa*(v_C1*f_CB[8] - v_C2*v_vars13)"
327+
variable C23 equal "v_Pa2GPa*(v_C1*f_CB[12] - v_C2*v_vars23)"
328+
329+
variable dds4 vector "v_ds4*v_ds4"
330+
variable dds5 vector "v_ds5*v_ds5"
331+
variable dds6 vector "v_ds6*v_ds6"
332+
variable vars4 equal "ave(v_dds4)"
333+
variable vars5 equal "ave(v_dds5)"
334+
variable vars6 equal "ave(v_dds6)"
335+
variable C44 equal "v_Pa2GPa*(v_C1*f_CB[4] - v_C2*v_vars4 + v_Rhokbt)"
336+
variable C55 equal "v_Pa2GPa*(v_C1*f_CB[5] - v_C2*v_vars5 + v_Rhokbt)"
337+
variable C66 equal "v_Pa2GPa*(v_C1*f_CB[6] - v_C2*v_vars6 + v_Rhokbt)"
338+
339+
variable aC11 equal "(v_C11 + v_C22 + v_C33)/3."
340+
variable aC12 equal "(v_C12 + v_C13 + v_C23)/3."
341+
variable aC44 equal "(v_C44 + v_C55 + v_C66)/3."
342+
343+
print """
344+
C11 = ${aC11}
345+
C12 = ${aC12}
346+
C44 = ${aC44}
347+
"""
348+
349+
C11 = 2.43259565469463
350+
C12 = 1.31707509521887
351+
C44 = 1.46049163278008
352+
353+
Total wall time: 0:01:35

0 commit comments

Comments
 (0)