diff --git a/examples/mliap/Ta06A.snap b/examples/mliap/Ta06A.mliap similarity index 69% rename from examples/mliap/Ta06A.snap rename to examples/mliap/Ta06A.mliap index d9feae0b46..5c1776d01e 100644 --- a/examples/mliap/Ta06A.snap +++ b/examples/mliap/Ta06A.mliap @@ -1,4 +1,4 @@ -# DATE: 2014-09-05 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014) +# DATE: 2020-04-04 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014) # Definition of SNAP potential Ta_Cand06A # Assumes 1 LAMMPS atom type @@ -11,7 +11,7 @@ variable zblz equal 73 pair_style hybrid/overlay & zbl ${zblcutinner} ${zblcutouter} & -snap +mliap model linear Ta06A.mliap.model descriptor sna Ta06A.mliap.descriptor pair_coeff 1 1 zbl ${zblz} ${zblz} -pair_coeff * * snap Ta06A.snapcoeff Ta06A.snapparam Ta +pair_coeff * * mliap Ta diff --git a/examples/mliap/Ta06A.snapparam b/examples/mliap/Ta06A.mliap.descriptor similarity index 83% rename from examples/mliap/Ta06A.snapparam rename to examples/mliap/Ta06A.mliap.descriptor index 629d96d708..6e7a10f9d1 100644 --- a/examples/mliap/Ta06A.snapparam +++ b/examples/mliap/Ta06A.mliap.descriptor @@ -6,9 +6,16 @@ rcutfac 4.67637 twojmax 6 +# elements + +nelems 1 +elems Ta +radelems 0.5 +welems 1 + # optional rfac0 0.99363 rmin0 0 bzeroflag 0 -quadraticflag 0 + diff --git a/examples/mliap/Ta06A.snapcoeff b/examples/mliap/Ta06A.mliap.model similarity index 96% rename from examples/mliap/Ta06A.snapcoeff rename to examples/mliap/Ta06A.mliap.model index ad2dfa4bc5..12761d94c8 100644 --- a/examples/mliap/Ta06A.snapcoeff +++ b/examples/mliap/Ta06A.mliap.model @@ -2,8 +2,8 @@ # LAMMPS SNAP coefficients for Ta_Cand06A +# nelements ncoeff 1 31 -Ta 0.5 1 -2.92477 -0.01137 -0.00775 diff --git a/examples/mliap/W.snap.quadratic b/examples/mliap/W.quadratic.mliap similarity index 69% rename from examples/mliap/W.snap.quadratic rename to examples/mliap/W.quadratic.mliap index 75892ad1a0..a2fc84c50f 100644 --- a/examples/mliap/W.snap.quadratic +++ b/examples/mliap/W.quadratic.mliap @@ -1,5 +1,3 @@ -# -# # Definition of SNAP+ZBL potential. variable zblcutinner equal 4 variable zblcutouter equal 4.8 @@ -9,7 +7,7 @@ variable zblz equal 74 pair_style hybrid/overlay & zbl ${zblcutinner} ${zblcutouter} & -snap +mliap model quadratic W.quadratic.mliap.model descriptor sna W.quadratic.mliap.descriptor pair_coeff 1 1 zbl ${zblz} ${zblz} -pair_coeff * * snap W.quadratic.snapcoeff W.quadratic.snapparam W +pair_coeff * * mliap W diff --git a/examples/mliap/W.quadratic.snapparam b/examples/mliap/W.quadratic.mliap.descriptor similarity index 60% rename from examples/mliap/W.quadratic.snapparam rename to examples/mliap/W.quadratic.mliap.descriptor index 63728b6bd0..cc47dafd39 100644 --- a/examples/mliap/W.quadratic.snapparam +++ b/examples/mliap/W.quadratic.mliap.descriptor @@ -1,10 +1,18 @@ # required + rcutfac 4.73442 twojmax 6 +# elements + +nelems 1 +elems W +radelems 0.5 +welems 1 + # optional rfac0 0.99363 rmin0 0 bzeroflag 1 -quadraticflag 1 + diff --git a/examples/mliap/W.quadratic.snapcoeff b/examples/mliap/W.quadratic.mliap.model similarity index 99% rename from examples/mliap/W.quadratic.snapcoeff rename to examples/mliap/W.quadratic.mliap.model index 6cc4fc5c19..713e07eb61 100644 --- a/examples/mliap/W.quadratic.snapcoeff +++ b/examples/mliap/W.quadratic.mliap.model @@ -1,7 +1,7 @@ # LAMMPS SNAP coefficients for Quadratic W +# nelements ncoeff 1 496 -W 0.5 1 0.000000000000 -0.000019342340 0.000039964908 diff --git a/examples/mliap/WBe_Wood_PRB2019.mliap b/examples/mliap/WBe_Wood_PRB2019.mliap new file mode 100644 index 0000000000..0ad35747dc --- /dev/null +++ b/examples/mliap/WBe_Wood_PRB2019.mliap @@ -0,0 +1,16 @@ +# DATE: 2020-04-04 CONTRIBUTOR: Mary Alice Cusentino mcusent@sandia.gov CITATION: M.A. Wood, M.A. Cusentino, B.D. Wirth, and A.P. Thompson, "Data-driven material models for atomistic simulation", Physical Review B 99, 184305 (2019) +# Definition of SNAP+ZBL potential. +variable zblcutinner equal 4 +variable zblcutouter equal 4.8 +variable zblz1 equal 74 +variable zblz2 equal 4 + +# Specify hybrid with SNAP and ZBL + +pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} & +mliap model linear WBe_Wood_PRB2019.mliap.model descriptor sna WBe_Wood_PRB2019.mliap.descriptor +pair_coeff 1 1 zbl ${zblz1} ${zblz1} +pair_coeff 1 2 zbl ${zblz1} ${zblz2} +pair_coeff 2 2 zbl ${zblz2} ${zblz2} +pair_coeff * * mliap W Be + diff --git a/examples/mliap/WBe_Wood_PRB2019.mliap.descriptor b/examples/mliap/WBe_Wood_PRB2019.mliap.descriptor new file mode 100644 index 0000000000..855e5ec97a --- /dev/null +++ b/examples/mliap/WBe_Wood_PRB2019.mliap.descriptor @@ -0,0 +1,18 @@ +# required + +rcutfac 4.8123 +twojmax 8 + +# elements + +nelems 2 +elems W Be +radelems 0.5 0.417932 +welems 1 0.959049 + +# optional + +rfac0 0.99363 +rmin0 0 +bzeroflag 1 + diff --git a/examples/mliap/WBe_Wood_PRB2019.mliap.model b/examples/mliap/WBe_Wood_PRB2019.mliap.model new file mode 100644 index 0000000000..6b96561ed0 --- /dev/null +++ b/examples/mliap/WBe_Wood_PRB2019.mliap.model @@ -0,0 +1,116 @@ +# LAMMPS SNAP coefficients for WBe + +# nelements ncoeff +2 56 + -0.000000000000 # B[0] + -0.001487061994 # B[1, 0, 0, 0] + 0.075808306870 # B[2, 1, 0, 1] + 0.538735683870 # B[3, 1, 1, 2] + -0.074148039366 # B[4, 2, 0, 2] + 0.602629813770 # B[5, 2, 1, 3] + -0.147022424344 # B[6, 2, 2, 2] + 0.117756828488 # B[7, 2, 2, 4] + -0.026490439049 # B[8, 3, 0, 3] + -0.035162708767 # B[9, 3, 1, 4] + 0.064315385091 # B[10, 3, 2, 3] + -0.131936948089 # B[11, 3, 2, 5] + -0.021272860272 # B[12, 3, 3, 4] + -0.091171134054 # B[13, 3, 3, 6] + -0.024396224398 # B[14, 4, 0, 4] + -0.059813132803 # B[15, 4, 1, 5] + 0.069585393203 # B[16, 4, 2, 4] + -0.085344044181 # B[17, 4, 2, 6] + -0.155425254597 # B[18, 4, 3, 5] + -0.117031758367 # B[19, 4, 3, 7] + -0.040956258020 # B[20, 4, 4, 4] + -0.084465000389 # B[21, 4, 4, 6] + -0.020367513630 # B[22, 4, 4, 8] + -0.010730484318 # B[23, 5, 0, 5] + -0.054777575658 # B[24, 5, 1, 6] + 0.050742893747 # B[25, 5, 2, 5] + -0.004686334611 # B[26, 5, 2, 7] + -0.116372907121 # B[27, 5, 3, 6] + 0.005542497708 # B[28, 5, 3, 8] + -0.126526795635 # B[29, 5, 4, 5] + -0.080163926221 # B[30, 5, 4, 7] + -0.082426250179 # B[31, 5, 5, 6] + -0.010558777281 # B[32, 5, 5, 8] + -0.001939058038 # B[33, 6, 0, 6] + -0.027907949962 # B[34, 6, 1, 7] + 0.049483908476 # B[35, 6, 2, 6] + 0.005103754385 # B[36, 6, 2, 8] + -0.054751505141 # B[37, 6, 3, 7] + -0.055556071011 # B[38, 6, 4, 6] + -0.006026917619 # B[39, 6, 4, 8] + -0.060889030109 # B[40, 6, 5, 7] + -0.029977673973 # B[41, 6, 6, 6] + -0.014987527280 # B[42, 6, 6, 8] + -0.006697686658 # B[43, 7, 0, 7] + 0.017369624409 # B[44, 7, 1, 8] + 0.047864358817 # B[45, 7, 2, 7] + -0.001989812679 # B[46, 7, 3, 8] + 0.000153530925 # B[47, 7, 4, 7] + -0.003862356345 # B[48, 7, 5, 8] + -0.009754314198 # B[49, 7, 6, 7] + 0.000777958970 # B[50, 7, 7, 8] + -0.003031424287 # B[51, 8, 0, 8] + 0.015612715209 # B[52, 8, 2, 8] + 0.003210129646 # B[53, 8, 4, 8] + -0.013088799947 # B[54, 8, 6, 8] + 0.001465970755 # B[55, 8, 8, 8] + 0.000000000000 # B[0] + -0.000112143918 # B[1, 0, 0, 0] + 0.002449805180 # B[2, 1, 0, 1] + 0.189705916830 # B[3, 1, 1, 2] + -0.019967429692 # B[4, 2, 0, 2] + 0.286015704682 # B[5, 2, 1, 3] + 0.072864063124 # B[6, 2, 2, 2] + 0.108748154196 # B[7, 2, 2, 4] + -0.005203284351 # B[8, 3, 0, 3] + 0.043948598532 # B[9, 3, 1, 4] + 0.105425889093 # B[10, 3, 2, 3] + 0.060460134045 # B[11, 3, 2, 5] + -0.003406205141 # B[12, 3, 3, 4] + 0.002306765306 # B[13, 3, 3, 6] + -0.003845115174 # B[14, 4, 0, 4] + 0.029471162073 # B[15, 4, 1, 5] + 0.054901130330 # B[16, 4, 2, 4] + 0.010910192753 # B[17, 4, 2, 6] + 0.033885210622 # B[18, 4, 3, 5] + 0.008053439551 # B[19, 4, 3, 7] + -0.001432298168 # B[20, 4, 4, 4] + 0.017478027729 # B[21, 4, 4, 6] + -0.003402034990 # B[22, 4, 4, 8] + -0.002655339820 # B[23, 5, 0, 5] + 0.012668749892 # B[24, 5, 1, 6] + 0.037521561888 # B[25, 5, 2, 5] + -0.000682693314 # B[26, 5, 2, 7] + 0.008525913627 # B[27, 5, 3, 6] + 0.008977936348 # B[28, 5, 3, 8] + 0.006922732235 # B[29, 5, 4, 5] + 0.003031883044 # B[30, 5, 4, 7] + -0.000345577975 # B[31, 5, 5, 6] + -0.001041600679 # B[32, 5, 5, 8] + -0.001407625493 # B[33, 6, 0, 6] + 0.004211558640 # B[34, 6, 1, 7] + 0.014450875461 # B[35, 6, 2, 6] + -0.007033326252 # B[36, 6, 2, 8] + 0.004998742185 # B[37, 6, 3, 7] + -0.002824617682 # B[38, 6, 4, 6] + 0.003831871934 # B[39, 6, 4, 8] + -0.005700892700 # B[40, 6, 5, 7] + 0.000184422409 # B[41, 6, 6, 6] + 0.001592696824 # B[42, 6, 6, 8] + -0.000804927645 # B[43, 7, 0, 7] + 0.008465358642 # B[44, 7, 1, 8] + 0.005460531160 # B[45, 7, 2, 7] + -0.000639605094 # B[46, 7, 3, 8] + -0.002403948393 # B[47, 7, 4, 7] + -0.001267042453 # B[48, 7, 5, 8] + 0.003836940623 # B[49, 7, 6, 7] + 0.002333141437 # B[50, 7, 7, 8] + -0.000665360637 # B[51, 8, 0, 8] + -0.003460637865 # B[52, 8, 2, 8] + -0.001598726043 # B[53, 8, 4, 8] + 0.001478744304 # B[54, 8, 6, 8] + 0.000806643203 # B[55, 8, 8, 8] diff --git a/examples/mliap/dump.quadratic.0 b/examples/mliap/dump.quadratic.0 deleted file mode 100644 index 761b1e4451..0000000000 --- a/examples/mliap/dump.quadratic.0 +++ /dev/null @@ -1,11 +0,0 @@ -ITEM: TIMESTEP -0 -ITEM: NUMBER OF ATOMS -2 -ITEM: BOX BOUNDS pp pp pp -0.0000000000000000e+00 3.1802999999999999e+00 -0.0000000000000000e+00 3.1802999999999999e+00 -0.0000000000000000e+00 3.1802999999999999e+00 -ITEM: ATOMS id type fx fy fz c_eatom -1 1 -0.00995108 -0.61461 0.688381 -1.15754 -2 1 0.00995108 0.61461 -0.688381 -1.15754 diff --git a/examples/mliap/dump.quadratic.100 b/examples/mliap/dump.quadratic.100 deleted file mode 100644 index 321c1b17df..0000000000 --- a/examples/mliap/dump.quadratic.100 +++ /dev/null @@ -1,11 +0,0 @@ -ITEM: TIMESTEP -100 -ITEM: NUMBER OF ATOMS -2 -ITEM: BOX BOUNDS pp pp pp -0.0000000000000000e+00 3.1802999999999999e+00 -0.0000000000000000e+00 3.1802999999999999e+00 -0.0000000000000000e+00 3.1802999999999999e+00 -ITEM: ATOMS id type fx fy fz c_eatom -1 1 -0.373431 0.0494017 -1.17879 -1.14648 -2 1 0.373431 -0.0494017 1.17879 -1.14648 diff --git a/examples/mliap/in.snap.Ta06A b/examples/mliap/in.mliap.Ta06A similarity index 69% rename from examples/mliap/in.snap.Ta06A rename to examples/mliap/in.mliap.Ta06A index 0ca5275e97..2c8c7932df 100644 --- a/examples/mliap/in.snap.Ta06A +++ b/examples/mliap/in.mliap.Ta06A @@ -24,10 +24,18 @@ mass 1 180.88 # choose potential -include Ta06A.snap +include Ta06A.mliap # Setup output +compute eatom all pe/atom +compute energy all reduce sum c_eatom + +compute satom all stress/atom NULL +compute str all reduce sum c_satom[1] c_satom[2] c_satom[3] +variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol) + +thermo_style custom step temp epair c_energy etotal press v_press thermo 10 thermo_modify norm yes diff --git a/examples/mliap/in.mliap.snap.Ta06A b/examples/mliap/in.mliap.WBe.PRB2019 similarity index 52% rename from examples/mliap/in.mliap.snap.Ta06A rename to examples/mliap/in.mliap.WBe.PRB2019 index dcf5272591..24a212b2c6 100644 --- a/examples/mliap/in.mliap.snap.Ta06A +++ b/examples/mliap/in.mliap.WBe.PRB2019 @@ -1,10 +1,10 @@ -# Demonstrate SNAP Ta potential +# Demonstrate SNAP W-Be potential # Initialize simulation variable nsteps index 100 variable nrep equal 4 -variable a equal 3.316 +variable a equal 3.1803 units metal # generate the box and atom positions using a BCC lattice @@ -17,29 +17,28 @@ boundary p p p lattice bcc $a region box block 0 ${nx} 0 ${ny} 0 ${nz} -create_box 1 box +create_box 2 box create_atoms 1 box +mass 1 183.84 +mass 2 9.012182 -mass 1 180.88 - +set group all type/fraction 2 0.05 3590153 # Change 5% of W to He +group tungsten type 1 +group beryllium type 2 # choose potential -# Assumes 1 LAMMPS atom type - -variable zblcutinner equal 4 -variable zblcutouter equal 4.8 -variable zblz equal 73 - -# Specify hybrid with SNAP, ZBL - -pair_style hybrid/overlay & -zbl ${zblcutinner} ${zblcutouter} & -mliap/snap -pair_coeff 1 1 zbl ${zblz} ${zblz} -pair_coeff * * mliap/snap Ta06A.snapcoeff Ta06A.snapparam Ta +include WBe_Wood_PRB2019.mliap # Setup output +compute eatom all pe/atom +compute energy all reduce sum c_eatom + +compute satom all stress/atom NULL +compute str all reduce sum c_satom[1] c_satom[2] c_satom[3] +variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol) + +thermo_style custom step temp epair c_energy etotal press v_press thermo 10 thermo_modify norm yes diff --git a/examples/mliap/in.snap.quadratic b/examples/mliap/in.mliap.quadratic similarity index 69% rename from examples/mliap/in.snap.quadratic rename to examples/mliap/in.mliap.quadratic index dd50e90bfb..636d0de3e6 100644 --- a/examples/mliap/in.snap.quadratic +++ b/examples/mliap/in.mliap.quadratic @@ -25,15 +25,20 @@ mass 1 183.84 # choose potential -include W.snap.quadratic +include W.quadratic.mliap # Setup output +compute eatom all pe/atom +compute energy all reduce sum c_eatom + +compute satom all stress/atom NULL +compute str all reduce sum c_satom[1] c_satom[2] c_satom[3] +variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol) + +thermo_style custom step temp epair c_energy etotal press v_press thermo 10 thermo_modify norm yes -compute eatom all pe/atom - -dump 1 all custom 100 dump.quadratic.* id type fx fy fz c_eatom # Set up NVE run diff --git a/examples/mliap/in.mliap.snap.quadratic b/examples/mliap/in.mliap.snap.quadratic deleted file mode 100644 index 028a2d3ad7..0000000000 --- a/examples/mliap/in.mliap.snap.quadratic +++ /dev/null @@ -1,60 +0,0 @@ -# Demonstrate SNAP Ta potential - -# Initialize simulation - -variable nsteps index 100 -variable nrep equal 1 -variable a equal 3.1803 -units metal - -# generate the box and atom positions using a BCC lattice - -variable nx equal ${nrep} -variable ny equal ${nrep} -variable nz equal ${nrep} - -boundary p p p - -lattice bcc $a -region box block 0 ${nx} 0 ${ny} 0 ${nz} -create_box 1 box -create_atoms 1 box -displace_atoms all random 0.01 0.01 0.01 12345 - -mass 1 183.84 - -# choose potential - -# Definition of SNAP+ZBL potential. -variable zblcutinner equal 4 -variable zblcutouter equal 4.8 -variable zblz equal 74 - -# Specify hybrid with SNAP and ZBL - -pair_style hybrid/overlay & -zbl ${zblcutinner} ${zblcutouter} & -mliap/snap -pair_coeff 1 1 zbl ${zblz} ${zblz} -pair_coeff * * mliap/snap W.quadratic.snapcoeff W.quadratic.snapparam W - -# Setup output - -thermo 10 -thermo_modify norm yes -compute eatom all pe/atom - -dump 1 all custom 100 dump.quadratic.* id type fx fy fz c_eatom - -# Set up NVE run - -timestep 0.5e-3 -neighbor 1.0 bin -neigh_modify once no every 1 delay 0 check no - -# Run MD - -velocity all create 300.0 4928459 -fix 1 all nve -run ${nsteps} - diff --git a/examples/mliap/in.snap.compute.quadratic b/examples/mliap/in.snap.compute.quadratic deleted file mode 100644 index 00e46bd3a8..0000000000 --- a/examples/mliap/in.snap.compute.quadratic +++ /dev/null @@ -1,100 +0,0 @@ -# Demonstrate bispectrum computes - -# initialize simulation - -variable nsteps index 0 -variable nrep equal 1 -variable a equal 2.0 -units metal - -# generate the box and atom positions using a BCC lattice - -variable nx equal ${nrep} -variable ny equal ${nrep} -variable nz equal ${nrep} - -boundary p p p - -atom_modify map hash -lattice bcc $a -region box block 0 ${nx} 0 ${ny} 0 ${nz} -create_box 2 box -create_atoms 2 box - -mass * 180.88 - -displace_atoms all random 0.1 0.1 0.1 123456 - -# choose SNA parameters - -variable twojmax equal 2 -variable rcutfac equal 1.0 -variable rfac0 equal 0.99363 -variable rmin0 equal 0 -variable radelem1 equal 2.3 -variable radelem2 equal 2.0 -variable wj1 equal 1.0 -variable wj2 equal 0.96 -variable quadratic equal 1 -variable bzero equal 0 -variable switch equal 0 -variable snap_options string & -"${rcutfac} ${rfac0} ${twojmax} ${radelem1} ${radelem2} ${wj1} ${wj2} rmin0 ${rmin0} quadraticflag ${quadratic} bzeroflag ${bzero} switchflag ${switch}" - -# set up dummy potential to satisfy cutoff - -pair_style zero ${rcutfac} -pair_coeff * * - -# set up reference potential - -variable zblcutinner equal 4 -variable zblcutouter equal 4.8 -variable zblz equal 73 -pair_style zbl ${zblcutinner} ${zblcutouter} -pair_coeff * * ${zblz} ${zblz} - -# set up per-atom computes - -compute b all sna/atom ${snap_options} -compute vb all snav/atom ${snap_options} -compute db all snad/atom ${snap_options} - -# perform sums over atoms - -group snapgroup1 type 1 -group snapgroup2 type 2 -compute bsum1 snapgroup1 reduce sum c_b[*] -compute bsum2 snapgroup2 reduce sum c_b[*] -# fix bsum1 all ave/time 1 1 1 c_bsum1 file bsum1.dat mode vector -# fix bsum2 all ave/time 1 1 1 c_bsum2 file bsum2.dat mode vector -compute vbsum all reduce sum c_vb[*] -# fix vbsum all ave/time 1 1 1 c_vbsum file vbsum.dat mode vector -variable db_2_120 equal c_db[2][120] - -# set up compute snap generating global array - -compute snap all snap ${snap_options} -fix snap all ave/time 1 1 1 c_snap[*] file compute.snap.dat mode vector - -thermo 100 - -# test output: 1: total potential energy -# 2: xy component of stress tensor -# 3: Sum(0.5*(B_{222}^i)^2, all i of type 2) -# 4: xy component of Sum(Sum(r_j*(0.5*(dB_{222}^i)^2/dR[j]), all i of type 2), all j) -# 5: z component of -Sum(d(0.5*(B_{222}^i)^2/dR[2]), all i of type 2) -# -# followed by 5 counterparts from compute snap - -thermo_style custom & - pe pxy c_bsum2[20] c_vbsum[240] v_db_2_120 & - c_snap[1][41] c_snap[13][41] c_snap[1][40] c_snap[13][40] c_snap[7][40] -thermo_modify norm no - -# dump mydump_db all custom 1000 dump_db id c_db[*] -# dump_modify mydump_db sort id - -# Run MD - -run ${nsteps} diff --git a/examples/mliap/log.snap.Ta06A.ref b/examples/mliap/log.snap.Ta06A.ref index 76cdc8641a..8c89ac1957 100644 --- a/examples/mliap/log.snap.Ta06A.ref +++ b/examples/mliap/log.snap.Ta06A.ref @@ -1,5 +1,4 @@ -LAMMPS (27 Nov 2018) - using 1 OpenMP thread(s) per MPI task +LAMMPS (19 Mar 2020) # Demonstrate SNAP Ta potential # Initialize simulation @@ -7,7 +6,7 @@ LAMMPS (27 Nov 2018) variable nsteps index 100 variable nrep equal 4 variable a equal 3.316 -units metal +units metal # generate the box and atom positions using a BCC lattice @@ -18,21 +17,21 @@ variable ny equal 4 variable nz equal ${nrep} variable nz equal 4 -boundary p p p +boundary p p p lattice bcc $a lattice bcc 3.316 Lattice spacing in x,y,z = 3.316 3.316 3.316 -region box block 0 ${nx} 0 ${ny} 0 ${nz} -region box block 0 4 0 ${ny} 0 ${nz} -region box block 0 4 0 4 0 ${nz} -region box block 0 4 0 4 0 4 -create_box 1 box +region box block 0 ${nx} 0 ${ny} 0 ${nz} +region box block 0 4 0 ${ny} 0 ${nz} +region box block 0 4 0 4 0 ${nz} +region box block 0 4 0 4 0 4 +create_box 1 box Created orthogonal box = (0 0 0) to (13.264 13.264 13.264) 1 by 1 by 1 MPI processor grid -create_atoms 1 box +create_atoms 1 box Created 128 atoms - Time spent = 0.000350714 secs + create_atoms CPU = 0.000254 secs mass 1 180.88 @@ -56,7 +55,7 @@ pair_style hybrid/overlay zbl 4 4.8 snap pair_coeff 1 1 zbl ${zblz} ${zblz} pair_coeff 1 1 zbl 73 ${zblz} pair_coeff 1 1 zbl 73 73 -pair_coeff * * snap Ta06A.snapcoeff Ta Ta06A.snapparam Ta +pair_coeff * * snap Ta06A.snapcoeff Ta06A.snapparam Ta Reading potential file Ta06A.snapcoeff with DATE: 2014-09-05 SNAP Element = Ta, Radius 0.5, Weight 1 Reading potential file Ta06A.snapparam with DATE: 2014-09-05 @@ -64,14 +63,21 @@ SNAP keyword rcutfac 4.67637 SNAP keyword twojmax 6 SNAP keyword rfac0 0.99363 SNAP keyword rmin0 0 -SNAP keyword diagonalstyle 3 SNAP keyword bzeroflag 0 SNAP keyword quadraticflag 0 # Setup output -thermo 10 +compute eatom all pe/atom +compute energy all reduce sum c_eatom + +compute satom all stress/atom NULL +compute str all reduce sum c_satom[1] c_satom[2] c_satom[3] +variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol) + +thermo_style custom step temp epair c_energy etotal press v_press +thermo 10 thermo_modify norm yes # Set up NVE run @@ -103,33 +109,33 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 4.138 | 4.138 | 4.138 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 300 -11.85157 0 -11.813095 2717.1661 - 10 295.96579 -11.851053 0 -11.813095 2696.1559 - 20 284.32535 -11.84956 0 -11.813095 2301.3713 - 30 266.04602 -11.847215 0 -11.813095 1832.1745 - 40 242.2862 -11.844168 0 -11.813095 1492.6765 - 50 214.48968 -11.840603 0 -11.813094 1312.8908 - 60 184.32523 -11.836734 0 -11.813094 1284.582 - 70 153.58055 -11.832791 0 -11.813094 1374.4457 - 80 124.04276 -11.829003 0 -11.813094 1537.703 - 90 97.37622 -11.825582 0 -11.813094 1734.9662 - 100 75.007873 -11.822714 0 -11.813094 1930.8005 -Loop time of 5.03244 on 1 procs for 100 steps with 128 atoms +Per MPI rank memory allocation (min/avg/max) = 6.591 | 6.591 | 6.591 Mbytes +Step Temp E_pair c_energy TotEng Press v_press + 0 300 -11.85157 -11.85157 -11.813095 2717.1661 -2717.1661 + 10 295.96579 -11.851053 -11.851053 -11.813095 2696.1559 -2696.1559 + 20 284.32535 -11.84956 -11.84956 -11.813095 2301.3713 -2301.3713 + 30 266.04602 -11.847215 -11.847215 -11.813095 1832.1745 -1832.1745 + 40 242.2862 -11.844168 -11.844168 -11.813095 1492.6765 -1492.6765 + 50 214.48968 -11.840603 -11.840603 -11.813094 1312.8908 -1312.8908 + 60 184.32523 -11.836734 -11.836734 -11.813094 1284.582 -1284.582 + 70 153.58055 -11.832791 -11.832791 -11.813094 1374.4457 -1374.4457 + 80 124.04276 -11.829003 -11.829003 -11.813094 1537.703 -1537.703 + 90 97.37622 -11.825582 -11.825582 -11.813094 1734.9662 -1734.9662 + 100 75.007873 -11.822714 -11.822714 -11.813094 1930.8005 -1930.8005 +Loop time of 0.995328 on 1 procs for 100 steps with 128 atoms -Performance: 0.858 ns/day, 27.958 hours/ns, 19.871 timesteps/s -98.9% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4.340 ns/day, 5.530 hours/ns, 100.469 timesteps/s +99.5% CPU use with 1 MPI tasks x no OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 5.0308 | 5.0308 | 5.0308 | 0.0 | 99.97 +Pair | 0.99426 | 0.99426 | 0.99426 | 0.0 | 99.89 Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0.00070858 | 0.00070858 | 0.00070858 | 0.0 | 0.01 -Output | 0.00024676 | 0.00024676 | 0.00024676 | 0.0 | 0.00 -Modify | 0.0002749 | 0.0002749 | 0.0002749 | 0.0 | 0.01 -Other | | 0.0004299 | | | 0.01 +Comm | 0.000305 | 0.000305 | 0.000305 | 0.0 | 0.03 +Output | 0.000413 | 0.000413 | 0.000413 | 0.0 | 0.04 +Modify | 0.000159 | 0.000159 | 0.000159 | 0.0 | 0.02 +Other | | 0.000191 | | | 0.02 Nlocal: 128 ave 128 max 128 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -145,4 +151,4 @@ Ave neighs/atom = 58 Neighbor list builds = 0 Dangerous builds = 0 -Total wall time: 0:00:05 +Total wall time: 0:00:01 diff --git a/examples/mliap/log.snap.WBe.ref b/examples/mliap/log.snap.WBe.ref new file mode 100644 index 0000000000..f689c7e6b1 --- /dev/null +++ b/examples/mliap/log.snap.WBe.ref @@ -0,0 +1,163 @@ +LAMMPS (19 Mar 2020) +# Demonstrate SNAP W-Be potential + +# Initialize simulation + +variable nsteps index 100 +variable nrep equal 4 +variable a equal 3.1803 +units metal + +# generate the box and atom positions using a BCC lattice + +variable nx equal ${nrep} +variable nx equal 4 +variable ny equal ${nrep} +variable ny equal 4 +variable nz equal ${nrep} +variable nz equal 4 + +boundary p p p + +lattice bcc $a +lattice bcc 3.1803 +Lattice spacing in x,y,z = 3.1803 3.1803 3.1803 +region box block 0 ${nx} 0 ${ny} 0 ${nz} +region box block 0 4 0 ${ny} 0 ${nz} +region box block 0 4 0 4 0 ${nz} +region box block 0 4 0 4 0 4 +create_box 2 box +Created orthogonal box = (0 0 0) to (12.7212 12.7212 12.7212) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 128 atoms + create_atoms CPU = 0.000231 secs +mass 1 183.84 +mass 2 9.012182 + +set group all type/fraction 2 0.05 3590153 # Change 5% of W to He + 5 settings made for type/fraction +group tungsten type 1 +123 atoms in group tungsten +group beryllium type 2 +5 atoms in group beryllium +# choose potential + +include WBe_Wood_PRB2019.snap +# DATE: 2019-09-18 CONTRIBUTOR: Mary Alice Cusentino mcusent@sandia.gov CITATION: M.A. Wood, M.A. Cusentino, B.D. Wirth, and A.P. Thompson, "Data-driven material models for atomistic simulation", Physical Review B 99, 184305 (2019) +# Definition of SNAP+ZBL potential. +variable zblcutinner equal 4 +variable zblcutouter equal 4.8 +variable zblz1 equal 74 +variable zblz2 equal 4 + +# Specify hybrid with SNAP and ZBL + +pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap +pair_style hybrid/overlay zbl 4 ${zblcutouter} snap +pair_style hybrid/overlay zbl 4 4.8 snap +pair_coeff 1 1 zbl ${zblz1} ${zblz1} +pair_coeff 1 1 zbl 74 ${zblz1} +pair_coeff 1 1 zbl 74 74 +pair_coeff 1 2 zbl ${zblz1} ${zblz2} +pair_coeff 1 2 zbl 74 ${zblz2} +pair_coeff 1 2 zbl 74 4 +pair_coeff 2 2 zbl ${zblz2} ${zblz2} +pair_coeff 2 2 zbl 4 ${zblz2} +pair_coeff 2 2 zbl 4 4 +pair_coeff * * snap WBe_Wood_PRB2019.snapcoeff WBe_Wood_PRB2019.snapparam W Be +SNAP Element = W, Radius 0.5, Weight 1 +SNAP Element = Be, Radius 0.417932, Weight 0.959049 +SNAP keyword rcutfac 4.8123 +SNAP keyword twojmax 8 +SNAP keyword rfac0 0.99363 +SNAP keyword rmin0 0 +SNAP keyword bzeroflag 1 +SNAP keyword quadraticflag 0 + + +# Setup output + +compute eatom all pe/atom +compute energy all reduce sum c_eatom + +compute satom all stress/atom NULL +compute str all reduce sum c_satom[1] c_satom[2] c_satom[3] +variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol) + +thermo_style custom step temp epair c_energy etotal press v_press +thermo 10 +thermo_modify norm yes + +# Set up NVE run + +timestep 0.5e-3 +neighbor 1.0 bin +neigh_modify once no every 1 delay 0 check yes + +# Run MD + +velocity all create 300.0 4928459 +fix 1 all nve +run ${nsteps} +run 100 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 5.8123 + ghost atom cutoff = 5.8123 + binsize = 2.90615, bins = 5 5 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair zbl, perpetual, half/full from (2) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none + (2) pair snap, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 6.893 | 6.893 | 6.893 Mbytes +Step Temp E_pair c_energy TotEng Press v_press + 0 300 -8.5980876 -8.5980876 -8.5596125 -35284.855 35284.855 + 10 299.29029 -8.5979965 -8.5979965 -8.5596125 -35299.259 35299.259 + 20 288.99334 -8.5966759 -8.5966759 -8.5596124 -35004.093 35004.093 + 30 269.91027 -8.5942284 -8.5942284 -8.5596123 -34447.077 34447.077 + 40 243.57361 -8.5908505 -8.5908505 -8.5596121 -33687.105 33687.105 + 50 212.21385 -8.5868284 -8.5868284 -8.5596119 -32821.864 32821.864 + 60 178.77144 -8.5825391 -8.5825391 -8.5596116 -31971.17 31971.17 + 70 146.71854 -8.578428 -8.578428 -8.5596113 -31245.51 31245.51 + 80 119.50956 -8.5749383 -8.5749383 -8.5596111 -30724.137 30724.137 + 90 99.872785 -8.5724197 -8.5724197 -8.559611 -30440.244 30440.244 + 100 89.604584 -8.5711027 -8.5711027 -8.5596109 -30392.805 30392.805 +Loop time of 3.17984 on 1 procs for 100 steps with 128 atoms + +Performance: 1.359 ns/day, 17.666 hours/ns, 31.448 timesteps/s +99.6% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 3.1748 | 3.1748 | 3.1748 | 0.0 | 99.84 +Neigh | 0.000314 | 0.000314 | 0.000314 | 0.0 | 0.01 +Comm | 0.000371 | 0.000371 | 0.000371 | 0.0 | 0.01 +Output | 0.00386 | 0.00386 | 0.00386 | 0.0 | 0.12 +Modify | 0.000236 | 0.000236 | 0.000236 | 0.0 | 0.01 +Other | | 0.000289 | | | 0.01 + +Nlocal: 128 ave 128 max 128 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 727 ave 727 max 727 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 3710 ave 3710 max 3710 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 7420 ave 7420 max 7420 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 7420 +Ave neighs/atom = 57.9688 +Neighbor list builds = 1 +Dangerous builds = 0 + +Total wall time: 0:00:03 diff --git a/examples/mliap/log.snap.quadratic.ref b/examples/mliap/log.snap.quadratic.ref index 24bceba9ec..472080f7a4 100644 --- a/examples/mliap/log.snap.quadratic.ref +++ b/examples/mliap/log.snap.quadratic.ref @@ -31,7 +31,7 @@ Created orthogonal box = (0 0 0) to (3.1803 3.1803 3.1803) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 2 atoms - create_atoms CPU = 0.000348 secs + create_atoms CPU = 0.000215 secs displace_atoms all random 0.01 0.01 0.01 12345 mass 1 183.84 @@ -66,9 +66,16 @@ SNAP keyword quadraticflag 1 # Setup output +compute eatom all pe/atom +compute energy all reduce sum c_eatom + +compute satom all stress/atom NULL +compute str all reduce sum c_satom[1] c_satom[2] c_satom[3] +variable press equal (c_str[1]+c_str[2]+c_str[3])/(3*vol) + +thermo_style custom step temp epair c_energy etotal press v_press thermo 10 thermo_modify norm yes -compute eatom all pe/atom dump 1 all custom 100 dump.quadratic.* id type fx fy fz c_eatom @@ -101,33 +108,33 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 5.04 | 5.04 | 5.04 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 300 -1.1575362 0 -1.1381472 600966 - 10 349.32287 -1.1607243 0 -1.1381475 599985.48 - 20 384.27065 -1.1629832 0 -1.1381478 599287.89 - 30 399.34846 -1.1639578 0 -1.1381478 598986.42 - 40 392.19413 -1.1634953 0 -1.1381478 599130.05 - 50 363.93932 -1.161669 0 -1.1381476 599694.93 - 60 319.03014 -1.1587663 0 -1.1381473 600588.89 - 70 264.53512 -1.1552439 0 -1.138147 601667.76 - 80 209.04294 -1.1516571 0 -1.1381466 602760.01 - 90 161.3157 -1.1485722 0 -1.1381463 603694.49 - 100 128.9054 -1.1464773 0 -1.1381461 604326.7 -Loop time of 0.032082 on 1 procs for 100 steps with 2 atoms +Per MPI rank memory allocation (min/avg/max) = 7.284 | 7.284 | 7.284 Mbytes +Step Temp E_pair c_energy TotEng Press v_press + 0 300 -1.1575362 -1.1575362 -1.1381472 600966 -600966 + 10 349.32287 -1.1607243 -1.1607243 -1.1381475 599985.48 -599985.48 + 20 384.27065 -1.1629832 -1.1629832 -1.1381478 599287.89 -599287.89 + 30 399.34846 -1.1639578 -1.1639578 -1.1381478 598986.42 -598986.42 + 40 392.19413 -1.1634953 -1.1634953 -1.1381478 599130.05 -599130.05 + 50 363.93932 -1.161669 -1.161669 -1.1381476 599694.93 -599694.93 + 60 319.03014 -1.1587663 -1.1587663 -1.1381473 600588.89 -600588.89 + 70 264.53512 -1.1552439 -1.1552439 -1.138147 601667.76 -601667.76 + 80 209.04294 -1.1516571 -1.1516571 -1.1381466 602760.01 -602760.01 + 90 161.3157 -1.1485722 -1.1485722 -1.1381463 603694.49 -603694.49 + 100 128.9054 -1.1464773 -1.1464773 -1.1381461 604326.7 -604326.7 +Loop time of 0.030198 on 1 procs for 100 steps with 2 atoms -Performance: 134.655 ns/day, 0.178 hours/ns, 3117.013 timesteps/s -98.3% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 143.056 ns/day, 0.168 hours/ns, 3311.478 timesteps/s +98.4% 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.030667 | 0.030667 | 0.030667 | 0.0 | 95.59 -Neigh | 0.000584 | 0.000584 | 0.000584 | 0.0 | 1.82 -Comm | 0.000307 | 0.000307 | 0.000307 | 0.0 | 0.96 -Output | 0.000447 | 0.000447 | 0.000447 | 0.0 | 1.39 -Modify | 2.8e-05 | 2.8e-05 | 2.8e-05 | 0.0 | 0.09 -Other | | 4.9e-05 | | | 0.15 +Pair | 0.028723 | 0.028723 | 0.028723 | 0.0 | 95.12 +Neigh | 0.000515 | 0.000515 | 0.000515 | 0.0 | 1.71 +Comm | 0.000263 | 0.000263 | 0.000263 | 0.0 | 0.87 +Output | 0.000618 | 0.000618 | 0.000618 | 0.0 | 2.05 +Modify | 2.7e-05 | 2.7e-05 | 2.7e-05 | 0.0 | 0.09 +Other | | 5.2e-05 | | | 0.17 Nlocal: 2 ave 2 max 2 min Histogram: 1 0 0 0 0 0 0 0 0 0