1LAMMPS (30 Jun 2020) 2# Demonstrate MLIAP quadratic compute 3 4# initialize simulation 5 6variable nsteps index 0 7variable nrep equal 1 8variable a equal 2.0 9units metal 10 11# generate the box and atom positions using a BCC lattice 12 13variable nx equal ${nrep} 14variable nx equal 1 15variable ny equal ${nrep} 16variable ny equal 1 17variable nz equal ${nrep} 18variable nz equal 1 19 20boundary p p p 21 22atom_modify map hash 23lattice bcc $a 24lattice bcc 2 25Lattice spacing in x,y,z = 2 2 2 26region box block 0 ${nx} 0 ${ny} 0 ${nz} 27region box block 0 1 0 ${ny} 0 ${nz} 28region box block 0 1 0 1 0 ${nz} 29region box block 0 1 0 1 0 1 30create_box 2 box 31Created orthogonal box = (0 0 0) to (2 2 2) 32 1 by 2 by 2 MPI processor grid 33create_atoms 2 box 34Created 2 atoms 35 create_atoms CPU = 0.001 seconds 36 37mass * 180.88 38 39displace_atoms all random 0.1 0.1 0.1 123456 40 41# set up reference potential 42 43variable zblcutinner equal 4 44variable zblcutouter equal 4.8 45variable zblz equal 73 46pair_style zbl ${zblcutinner} ${zblcutouter} 47pair_style zbl 4 ${zblcutouter} 48pair_style zbl 4 4.8 49pair_coeff * * ${zblz} ${zblz} 50pair_coeff * * 73 ${zblz} 51pair_coeff * * 73 73 52 53# choose SNA parameters 54 55variable twojmax equal 2 56variable rcutfac equal 1.0 57variable rfac0 equal 0.99363 58variable rmin0 equal 0 59variable radelem1 equal 2.3 60variable radelem2 equal 2.0 61variable wj1 equal 1.0 62variable wj2 equal 0.96 63variable quadratic equal 1 64variable bzero equal 0 65variable switch equal 0 66variable snap_options string "${rcutfac} ${rfac0} ${twojmax} ${radelem1} ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}" 671 ${rfac0} ${twojmax} ${radelem1} ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch} 681 0.99363 ${twojmax} ${radelem1} ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch} 691 0.99363 2 ${radelem1} ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch} 701 0.99363 2 2.3 ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch} 711 0.99363 2 2.3 2 ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch} 721 0.99363 2 2.3 2 1 ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch} 731 0.99363 2 2.3 2 1 0.96 rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch} 741 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch} 751 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 1 bzeroflag ${bzero} switchflag ${switch} 761 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 1 bzeroflag 0 switchflag ${switch} 771 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 1 bzeroflag 0 switchflag 0 78 79# set up per-atom computes 80 81compute b all sna/atom ${snap_options} 82compute b all sna/atom 1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 1 bzeroflag 0 switchflag 0 83compute vb all snav/atom ${snap_options} 84compute vb all snav/atom 1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 1 bzeroflag 0 switchflag 0 85compute db all snad/atom ${snap_options} 86compute db all snad/atom 1 0.99363 2 2.3 2 1 0.96 rmin0 0 quadraticflag 1 bzeroflag 0 switchflag 0 87 88# perform sums over atoms 89 90group snapgroup1 type 1 910 atoms in group snapgroup1 92group snapgroup2 type 2 932 atoms in group snapgroup2 94compute bsum1 snapgroup1 reduce sum c_b[*] 95compute bsum2 snapgroup2 reduce sum c_b[*] 96# fix bsum1 all ave/time 1 1 1 c_bsum1 file bsum1.dat mode vector 97# fix bsum2 all ave/time 1 1 1 c_bsum2 file bsum2.dat mode vector 98compute vbsum all reduce sum c_vb[*] 99# fix vbsum all ave/time 1 1 1 c_vbsum file vbsum.dat mode vector 100variable db_2_100 equal c_db[2][100] 101 102# test output: 1: total potential energy 103# 2: xy component of stress tensor 104# 3: Sum(0.5*(B_{222}^i)^2, all i of type 2) 105# 4: xz component of Sum(Sum(r_j*(0.5*(dB_{222}^i)^2/dR[j]), all i of type 2), all j) 106# 5: y component of -Sum(d(0.5*(B_{222}^i)^2/dR[2]), all i of type 2) 107# 108# followed by 5 counterparts from compute snap 109thermo 100 110 111# run compute mliap with gradgradflag = 1 112 113compute snap all mliap descriptor sna compute.mliap.descriptor model quadratic gradgradflag 1 114SNAP keyword rcutfac 1.0 115SNAP keyword twojmax 2 116SNAP keyword nelems 2 117SNAP keyword elems A 118SNAP keyword radelems 2.3 119SNAP keyword welems 1.0 120SNAP keyword rfac0 0.99363 121SNAP keyword rmin0 0 122SNAP keyword bzeroflag 0 123SNAP keyword switchflag 0 124fix snap all ave/time 1 1 1 c_snap[*] file compute.quadratic.gg1.dat mode vector 125 126thermo_style custom pe pxy c_bsum2[20] c_vbsum[220] v_db_2_100 c_snap[1][43] c_snap[13][43] c_snap[1][42] c_snap[12][42] c_snap[6][42] 127thermo_modify norm no 128 129run ${nsteps} 130run 0 131Neighbor list info ... 132 update every 1 steps, delay 10 steps, check yes 133 max neighbors/atom: 2000, page size: 100000 134 master list distance cutoff = 6.8 135 ghost atom cutoff = 6.8 136 binsize = 3.4, bins = 1 1 1 137 5 neighbor lists, perpetual/occasional/extra = 1 4 0 138 (1) pair zbl, perpetual 139 attributes: half, newton on 140 pair build: half/bin/atomonly/newton 141 stencil: half/bin/3d/newton 142 bin: standard 143 (2) compute sna/atom, occasional 144 attributes: full, newton on 145 pair build: full/bin/atomonly 146 stencil: full/bin/3d 147 bin: standard 148 (3) compute snav/atom, occasional 149 attributes: full, newton on 150 pair build: full/bin/atomonly 151 stencil: full/bin/3d 152 bin: standard 153 (4) compute snad/atom, occasional 154 attributes: full, newton on 155 pair build: full/bin/atomonly 156 stencil: full/bin/3d 157 bin: standard 158 (5) compute mliap, occasional 159 attributes: full, newton on 160 pair build: full/bin/atomonly 161 stencil: full/bin/3d 162 bin: standard 163WARNING: Proc sub-domain size < neighbor skin, could lead to lost atoms (../domain.cpp:964) 164Per MPI rank memory allocation (min/avg/max) = 6.429 | 6.43 | 6.432 Mbytes 165PotEng Pxy c_bsum2[20] c_vbsum[220] v_db_2_100 c_snap[1][43] c_snap[13][43] c_snap[1][42] c_snap[12][42] c_snap[6][42] 166 322.86952 1505558.1 4.2492771e+08 -4952473 28484035 322.86952 1505558.1 4.2492771e+08 -4952473 28484035 167Loop time of 4.25e-06 on 4 procs for 0 steps with 2 atoms 168 16982.4% CPU use with 4 MPI tasks x no OpenMP threads 170 171MPI task timing breakdown: 172Section | min time | avg time | max time |%varavg| %total 173--------------------------------------------------------------- 174Pair | 0 | 0 | 0 | 0.0 | 0.00 175Neigh | 0 | 0 | 0 | 0.0 | 0.00 176Comm | 0 | 0 | 0 | 0.0 | 0.00 177Output | 0 | 0 | 0 | 0.0 | 0.00 178Modify | 0 | 0 | 0 | 0.0 | 0.00 179Other | | 4.25e-06 | | |100.00 180 181Nlocal: 0.5 ave 1.0 max 0.0 min 182Histogram: 2 0 0 0 0 0 0 0 0 2 183Nghost: 734.5 ave 735.0 max 734.0 min 184Histogram: 2 0 0 0 0 0 0 0 0 2 185Neighs: 82.5 ave 177.0 max 0.0 min 186Histogram: 2 0 0 0 0 0 0 0 1 1 187FullNghs: 165.0 ave 330.0 max 0.0 min 188Histogram: 2 0 0 0 0 0 0 0 0 2 189 190Total # of neighbors = 660 191Ave neighs/atom = 330.0 192Neighbor list builds = 0 193Dangerous builds = 0 194 195uncompute snap 196unfix snap 197 198# run compute mliap with gradgradflag = 0 199 200compute snap all mliap descriptor sna compute.mliap.descriptor model quadratic gradgradflag 0 201SNAP keyword rcutfac 1.0 202SNAP keyword twojmax 2 203SNAP keyword nelems 2 204SNAP keyword elems A 205SNAP keyword radelems 2.3 206SNAP keyword welems 1.0 207SNAP keyword rfac0 0.99363 208SNAP keyword rmin0 0 209SNAP keyword bzeroflag 0 210SNAP keyword switchflag 0 211fix snap all ave/time 1 1 1 c_snap[*] file compute.quadratic.gg0.dat mode vector 212 213thermo_style custom pe pxy c_bsum2[20] c_vbsum[220] v_db_2_100 c_snap[1][43] c_snap[13][43] c_snap[1][42] c_snap[12][42] c_snap[6][42] 214WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:694) 215thermo_modify norm no 216 217run ${nsteps} 218run 0 219Neighbor list info ... 220 update every 1 steps, delay 10 steps, check yes 221 max neighbors/atom: 2000, page size: 100000 222 master list distance cutoff = 6.8 223 ghost atom cutoff = 6.8 224 binsize = 3.4, bins = 1 1 1 225 5 neighbor lists, perpetual/occasional/extra = 1 4 0 226 (1) pair zbl, perpetual 227 attributes: half, newton on 228 pair build: half/bin/atomonly/newton 229 stencil: half/bin/3d/newton 230 bin: standard 231 (2) compute sna/atom, occasional 232 attributes: full, newton on 233 pair build: full/bin/atomonly 234 stencil: full/bin/3d 235 bin: standard 236 (3) compute snav/atom, occasional 237 attributes: full, newton on 238 pair build: full/bin/atomonly 239 stencil: full/bin/3d 240 bin: standard 241 (4) compute snad/atom, occasional 242 attributes: full, newton on 243 pair build: full/bin/atomonly 244 stencil: full/bin/3d 245 bin: standard 246 (5) compute mliap, occasional 247 attributes: full, newton on 248 pair build: full/bin/atomonly 249 stencil: full/bin/3d 250 bin: standard 251WARNING: Proc sub-domain size < neighbor skin, could lead to lost atoms (../domain.cpp:964) 252Per MPI rank memory allocation (min/avg/max) = 53.93 | 54.06 | 54.18 Mbytes 253PotEng Pxy c_bsum2[20] c_vbsum[220] v_db_2_100 c_snap[1][43] c_snap[13][43] c_snap[1][42] c_snap[12][42] c_snap[6][42] 254 322.86952 1505558.1 4.2492771e+08 -4952473 28484035 322.86952 1505558.1 4.2492771e+08 -4952473 28484035 255Loop time of 4e-06 on 4 procs for 0 steps with 2 atoms 256 257106.2% CPU use with 4 MPI tasks x no OpenMP threads 258 259MPI task timing breakdown: 260Section | min time | avg time | max time |%varavg| %total 261--------------------------------------------------------------- 262Pair | 0 | 0 | 0 | 0.0 | 0.00 263Neigh | 0 | 0 | 0 | 0.0 | 0.00 264Comm | 0 | 0 | 0 | 0.0 | 0.00 265Output | 0 | 0 | 0 | 0.0 | 0.00 266Modify | 0 | 0 | 0 | 0.0 | 0.00 267Other | | 4e-06 | | |100.00 268 269Nlocal: 0.5 ave 1.0 max 0.0 min 270Histogram: 2 0 0 0 0 0 0 0 0 2 271Nghost: 734.5 ave 735.0 max 734.0 min 272Histogram: 2 0 0 0 0 0 0 0 0 2 273Neighs: 82.5 ave 177.0 max 0.0 min 274Histogram: 2 0 0 0 0 0 0 0 1 1 275FullNghs: 165.0 ave 330.0 max 0.0 min 276Histogram: 2 0 0 0 0 0 0 0 0 2 277 278Total # of neighbors = 660 279Ave neighs/atom = 330.0 280Neighbor list builds = 0 281Dangerous builds = 0 282 283Total wall time: 0:00:00 284