Getting Things Done Using OpenKIM In LAMMPS

Transcription

Getting Things Done using OpenKIM in LAMMPSRyan S. Elliott, Ellad B. TadmorDepartment of Aerospace Engineering and MechanicsUniversity of MinnesotaKey Collaborators:Daniel S. Karls (U. Minnesota)Yaser Afshar (U. Minnesota)Noam Bernstein (NRL)George Karypis (U. Minnesota)Yonatan Kurniawan (BYU)Mark Transtrum (BYU)Mingian Wen (LBL)NSF CDI (2009‑2014); NSF CDS&E (2014‑2018); NSF CMMT (2019‑)LAMMPS Workshop, Online, August 13, 2021

Outline Getting Things Done with OpenKIM in LAMMPSLAMMPS Simulation: Nanowire ExtensionOpenKIM Framework and LAMMPSPotential Selection ExerciseObtaining Properties through OpenKIM Web QueriesUnit Conversion HandlingRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)2

Outline Getting Things Done with OpenKIM in LAMMPSLAMMPS Simulation: Nanowire Extension-Setting up and running the simulationResultsOpenKIM Framework and LAMMPSPotential Selection ExerciseObtaining Properties through OpenKIM Web QueriesSummaryRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)3

Nanowire Extension Simulation‣Al nanowire in extensionmissing atom imperfectionz [010]2 unit cellsx [100]y [001]2 unit cells10 unit cellsAluminum (fcc)Aluminum in the face-centered cubic (fcc) structureStress-strain curve obtained using the Embedded Atom Method (EAM) potential forAl due to Zhu et al., Acta Materialia, 49:4005, 2001.Periodic boundary conditions along x-direction; free surfaces along y and z-directionsImperfection introduced by removing one atom to localize deformationDisplacement boundary-conditions applied by stretching cell in x-directionStretching to 100% strain in increments of 1%Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)4

LAMMPS Script#######Aluminum nanowire --- static uniaxial tension along x-directionBased on an example by Mark Tschopp and Nathan Rhodes available p/LAMMPS FractureAuthors: Daniel S. Karls, Ellad B. Tadmor, Ryan S. ElliottLast revision: 8/28/2021# Initializationunits metaldimension 3boundary p p patom style atomic# Simulation variablesvariable latticetype string "fcc"variable a0 equal 4.05variable wire len x equal 10variable wire len y equal 2variable wire len z equal 2variable strain increment equal 0.01variable number load steps equal 100########Other options: "fcc", "bcc", "sc" Equilibrium lattice constantNanowire length in x-direction (in unit cells)Nanowire length in y-direction (in unit cells)Nanowire length in z-direction (in unit cells)Increment of strain relative to ref configat each load stepNumber of load steps# Derived/other variablesvariable vacuum pad equal 5# Set the vacuum along the y and z directionsvariable box min y equal - {vacuum pad}variable box max y equal {wire len y} {vacuum pad}variable box min z equal - {vacuum pad}variable box max z equal {wire len z} {vacuum pad}variable box yz area equal ( {box max y}- {box min y})*( {box max z}- {box min z})* {a0} 2variable wire yz area equal {wire len y}* {wire len z}* {a0} 2Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)5

LAMMPS Script# Construct latticelattice {latticetype} {a0}region supercell block 0 {wire len x} & {box min y} {box max y} & {box min z} {box max z} units latticecreate box 1 supercellregion nanowire block EDGE EDGE 0 {wire len y} 0 {wire len z} units latticecreate atoms 1 region nanowire# Create imperfectionvariable atomx equal floor( {wire len x}/2)variable atomy equal 0.0variable atomz equal 0.0variable atomrad equal 0.1region void sphere {atomx} {atomy} {atomz} {atomrad}delete atoms region void# Set mass to dummy value (not used in static minimization)mass 1 1.0# Specify potentialpair style eam/alloypair coeff * * Al zhou.eam.alloy Al# First, perform a static minimization with respect to all atomic positions# under the condition that the box size relax along the axial (x) direction in# order to achieve zero stress along this dimension.thermo 10thermo style custom step lx ly lz press pxx pyy pzz pemin style cgfix 1 all box/relax x 0.0 fixedpoint 0 0 0minimize 1.0e-16 1.0e-16 5000 10000Ryan S.unfixElliott, Ellad1 B. Tadmor (University of Minnesota)6

LAMMPS Script# Record stressvariable total strain equal 0.0variable pressf1 equal -pxxvariable pressf equal {pressf1}* {box yz area}/ {wire yz area}print "STEP 0; strain: {total strain}; engineering stress (Bar): {pressf}"print " {total strain} {pressf}" file out stress-strain lmp.dat# Dump the relaxed refenence configuration prior to strainingdump dmp1 all atom 1 out config lmp.dumpdump modify dmp1 scale norun 0undump ################ Now execute an incremental strain along the axial ##################### Define looping variablesvariable n loop {number load steps}label loop# Compute stretch factor relative to the deformed length needed to# obtain a strain increment of strain increment relative to the# reference configuration (i.e. engineering or Lagrangian strain)variable stretch factor equal &1.0 {strain increment}/(1 {n}* {strain increment})# Calculate total strain for this stepvariable total strain equal {n}* {strain increment}# Stretch boxchange box all x scale {stretch factor} remapRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)7

LAMMPS Script# Minimize positions of atoms within cellminimize 1.0e-10 1.0e-10 1000 10000# Print out stressvariable pressf1 equal -pxxvariable pressf equal {pressf1}* {box yz area}/ {wire yz area}print "STEP {n}; strain: {total strain}; engineering stress (Bar): {pressf}"print " {total strain} {pressf}" append out stress-strain lmp.dat# Dump relaxed strained configrationdump dmp1 all atom 1 out config lmp.dumpdump modify dmp1 append yes scale norun 0undump dmp1next njump SELF loopprint "Simulation complete"Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)8

EXERCISE: Run the Simulation‣Goal: Run the nanowire extension simulationThe LAMMPS input script is on workshop breakout page as: in.kim.zhoueam.lmp.nanowireExecute the script on your LAMMPS tutorial virtual orial/): cd /home/lammpswget uts/openkim/in.kim.zhoueam.lmp.nanowirewget uts/openkim/Al zhou.eam.alloylmp -in in.kim.zhoueam.lmp.nanowire out.kim.zhoueam.lmp.nanowireThis will create the following files:out config lmp.dump (contains configurations at the end of each load step)out stress-strain lmp.dat (contains stress (bars) vs strain (percent) data)Plot the stress-strain curve using matplotlib, (or gnuplot, etc.). For example: python import numpy as np import matplotlib.pyplot as plt data np.loadtxt(‘out stress-strain lmp.dat’) plt.plot(data[:,0], data[:,1], ‘r-’) plt.show()RaiseRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)your hand when you are done.9

Results‣Results for the Zhou et al. (2001) EAM potential for AlUTS latexit sha1 base64 "nul08DIfGyuH/Ra06L27Iu6Ft2Y " Vk0tMammSG5IxYhrr3Rdy61XdwJy7c AA hell4e1A4Oc//0 qR1Z0FWvlkVG0fn42oAd0v H7vZEzZW1fxS6pGF7b37uh d 68YjYq5TnBMrgJt3yEawgl/o/grLip uOtXTvfKh9UJpgLZJFtkh4RknxySE1IjdcLJPXkkT TZe/BevFfvbRyd8iadDfJjvI8vnfOk2w /latexit 78.3 kBar UTS 14% latexit sha1 base64 "5hikmK5oTFJUt5qHxChvzRHPz74 " klk562wUxmSM6IZSi iFu3 CJ5d3i 5EdNF4M5MnM1U6uW 1qwSZf2Im2PQjpJf2 Ro4yqE1jGth30r5gGnG0VLL hHjknZXJNKqRGOHkkz SFvDpPzpvz7nxMR5ec2c4B SPn8wcxR6Bf /latexit Visualization using OvitoRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)10

Results‣Results for the Zhou et al. (2001) EAM potential for AlUTS latexit sha1 base64 "nul08DIfGyuH/Ra06L27Iu6Ft2Y " Vk0tMammSG5IxYhrr3Rdy61XdwJy7c AA hell4e1A4Oc//0 qR1Z0FWvlkVG0fn42oAd0v H7vZEzZW1fxS6pGF7b37uh d 68YjYq5TnBMrgJt3yEawgl/o/grLip uOtXTvfKh9UJpgLZJFtkh4RknxySE1IjdcLJPXkkT TZe/BevFfvbRyd8iadDfJjvI8vnfOk2w /latexit 78.3 kBar UTS 14% latexit sha1 base64 "5hikmK5oTFJUt5qHxChvzRHPz74 " klk562wUxmSM6IZSi iFu3 CJ5d3i 5EdNF4M5MnM1U6uW 1qwSZf2Im2PQjpJf2 Ro4yqE1jGth30r5gGnG0VLL hHjknZXJNKqRGOHkkz SFvDpPzpvz7nxMR5ec2c4B SPn8wcxR6Bf /latexit Visualization using Ovito‣How do we know if this is the “correct” potential for this simulation?How does the choice of potential affect the results?Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)10

Outline Getting Things Done with OpenKIM in LAMMPSLAMMPS Simulation: Nanowire Extension-Setting up and running the simulationResultsOpenKIM Framework and LAMMPS-What is OpenKIM?Interatomic potentials on OpenKIM.orgRunning LAMMPS with OpenKIM potentialsPotential Selection ExerciseObtaining Properties through OpenKIM Web QueriesSummaryRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)11

Open Knowledegebase of Interatomic ModelsOpenKIM by the numbers‣ The OpenKIM repository currently contains:https://openkim.org543 interatomic potentials2613 property tests10 verification checks74,899 reference data items15 KIM-compliant platforms‣ OpenKIM has 681 members from 50 countries‣ The OpenKIM website (openkim.org) is visited by1500-2000 researchers per month and KIM contentis downloaded 2000-5000 times per month‣ The OpenKIM Directory of Model Developers(openkim.org/model-developer-directory/) includes68 groups involved in interatomic potentialPIs: Ellad Tadmor, Ryan Elliott, George Karypis,development.Mark TranstrumOpenKIM is funded by the NSFOpenKIM is a member of DateCiteRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)Advisory Board: Pietro Asinari, Laura Bartolo,Michael Baskes, Betsy Rice, Sadasivan Shankar,Aidan Thompson12

Models on openkim.orgRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)13

Models on openkim.orgRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)13

Models on openkim.org.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota).14

Models on openkim.org.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota).14

Models on openkim.orgRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)15

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)16

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)17

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)17

Models on openkim.orgRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)18

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)19

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)19

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)19

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)20

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Usertime muliplied by the Whetstone Benchmark. This number can beused (approximately) to compare the performance of different modelsRyan S. Elliott,independentlyEllad B. Tadmor (UniversityMinnesota)of ofthearchitecture on which the test was run.20

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Full results page.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)20

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002Expand a property synopsis.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)20

Models on openkim.orgElastic constants (note that c44 is negativeindicating the sc structure is unstable).Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)21

Models on openkim.orgFurther down the model page forEAM NN Johnson 1988 Cu MO 887933271505 002.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)22

Running LAMMPS with KIM Models‣Only two changes are needed to the LAMMPS script to run with a KIM model:1. Replace the units command with a kim# Initializationunits metalinitcommand:Selects the KIM model and sets the units# Initializationkim init EAM Dynamo ZhouWadleyJohnson 2001 Al MO 049243498555 000 metalRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)23

Running LAMMPS with KIM Models‣Only two changes are needed to the LAMMPS script to run with a KIM model:1. Replace the units command with a kim# Initializationunits metalinitcommand:Selects the KIM model and sets the units# Initializationkim init EAM Dynamo ZhouWadleyJohnson 2001 Al MO 049243498555 000 metal2. Replace the pair style and pair coeff commands with a kim# Specify potentialpair style eam/alloypair coeff * * Al zhou.eam.alloy Alinteractionscommand:Define the atom style to species mapping# Initializationkim interactions AlRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)23

Outline Getting Things Done with OpenKIM in LAMMPSLAMMPS Simulation: Nanowire Extension-Setting up and running the simulationResultsOpenKIM Framework and LAMMPS-What is OpenKIM?Interatomic potentials on OpenKIM.orgRunning LAMMPS with OpenKIM potentialsPotential Selection Exercise-Select a suitable interatomic potential from OpenKIM.orgRerun simulation with new potentialObtaining Properties through OpenKIM Web QueriesSummaryRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)24

EXERCISE: Potential Selection using OpenKIM‣Goal: Select a suitable interatomic potentialMaterial properties that are important for the potential to get right for a tensile test:PropertySymbol [units] DFT value (0 K)Lattice constanta0 [Å]4.049 [1] Vitos et al., Surf. Sci., 411:186, 1992Elastic constantsC11 [GPa]C12 [GPa]108.2 [2] Bercegeay et al., Phys. Rev. B., 72:214101,200556.6 [2]C44 [GPa]30.5 [2]γ100 [eV/Å2]0.0748 [1]γ110 [eV/Å2]0.0793 [1]γ111 [eV/Å2]0.0841 [1]Surface energiesUnstable stacking energy γus [eV/Å2]0.010 [3] Kibey et al., Acta Mater., 55:6843, 2007Look through the Al potentials on openkim.org, select one that you think is best.Raise your hand when you are done.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)25

EXERCISE: Potential Selection using OpenKIM‣Goal: Run the nanowire extension simulation with the selected potentialStep 1: Copy the input script to a new file and save Zhou plot files: cp in.kim.zhoueam.lmp.nanowire in.kim mv out stress-strain lmp.dat out stress-strain lmp zhou.dat mv out config lmp.dump out config lmp zhou.dumpStep 2: Edit the new script to use the KIM model you selected. vim in.kimOR code in.kim# Visual StudioStep 3: Run simulation lmp -in in.kim out.kimStep 4: Plot results, comparing the new potential with Zhou EAM. python import numpy as np Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)Raise your hand when you are done.26

Comparison of Potentials - Errors in %Slide RemovedRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)27

Results with Other PotentialsSlide RemovedRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)28

Citation Information for KIM ModelWhen running LAMMPS with a KIM model, a citation summary is echoed to the screenand full BibTex format citations are logged in the log.lammps file:screenLAMMPS (27 May 2021)OMP NUM THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)using 1 OpenMP thread(s) per MPI taskLattice spacing in x,y,z 4.0500000 4.0500000 4.0500000Created orthogonal box (0.0000000 -20.250000 -20.250000) to (40.500000 28.350000 28.350000)1 by 1 by 1 MPI processor gridCreated 250 atomscreate atoms CPU 0.000 secondsDeleted 1 atoms, new total TE-CITE-CITE-CITEYour simulation uses code contributions which should be cited:- OpenKIM: https://doi.org/10.1007/s11837-011-0102-6- OpenKIM potential: https://openkim.org/cite/MO 049243498555 000#item-citationThe log file lists these citations in BibTeX E-CITE-CITE-CITE-CITEWARNING: Using 'neigh modify every 1 delay 0 check yes' setting during minimization (src/min.cpp:189)Neighbor list info .update every 1 steps, delay 0 steps, check yesmax neighbors/atom: 2000, page size: 100000.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)29

Citation Information for KIM ModelWhen running LAMMPS with a KIM model, a citation summary is echoed to the screenand full BibTex format citations are logged in the log.lammps file:screenLAMMPS (27 May 2021)OMP NUM THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)using 1 OpenMP thread(s) per MPI taskLattice spacing in x,y,z 4.0500000 4.0500000 4.0500000Created orthogonal box (0.0000000 -20.250000 -20.250000) to (40.500000 28.350000 28.350000)1 by 1 by 1 MPI processor gridCreated 250 atomscreate atoms CPU 0.000 secondsDeleted 1 atoms, new total TE-CITE-CITE-CITEYour simulation uses code contributions which should be cited:- OpenKIM: https://doi.org/10.1007/s11837-011-0102-6- OpenKIM potential: https://openkim.org/cite/MO 049243498555 000#item-citationThe log file lists these citations in BibTeX E-CITE-CITE-CITE-CITEWARNING: Using 'neigh modify every 1 delay 0 check yes' setting during minimization (src/min.cpp:189)Neighbor list info .update every 1 steps, delay 0 steps, check yesmax neighbors/atom: 2000, page size: 100000.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)29

Citation Information for KIM ModelWhen running LAMMPS with a KIM model, a citation summary is echoed to the screenand full BibTex format citations are logged in the log.lammps file:screenLAMMPS (27 May 2021)OMP NUM THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)using 1 OpenMP thread(s) per MPI taskLattice spacing in x,y,z 4.0500000 4.0500000 4.0500000Created orthogonal box (0.0000000 -20.250000 -20.250000) to (40.500000 28.350000 28.350000)1 by 1 by 1 MPI processor gridCreated 250 atomscreate atoms CPU 0.000 secondsDeleted 1 atoms, new total TE-CITE-CITE-CITEYour simulation uses code contributions which should be cited:- OpenKIM: https://doi.org/10.1007/s11837-011-0102-6- OpenKIM potential: https://openkim.org/cite/MO 049243498555 000#item-citationThe log file lists these citations in BibTeX E-CITE-CITE-CITE-CITEWARNING: Using 'neigh modify every 1 delay 0 check yes' setting during minimization (src/min.cpp:189)Neighbor list info .update every 1 steps, delay 0 steps, check yesmax neighbors/atom: 2000, page size: 100000.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)29

Citation Information for KIM ModelWhen running LAMMPS with a KIM model, a citation summary is echoed to the screenand full BibTex format citations are logged in the log.lammps CITE-CITE-CITE-CITE-CITE-CITEYour simulation uses code contributions which should be cited:- OpenKIM: tadmor:elliott:2011,author {E. B. Tadmor and R. S. Elliott and J. P. Sethna and R. E. Miller and C. A. Becker},title {The potential of atomistic simulations and the {K}nowledgebase of {I}nteratomic {M}odels},journal {{JOM}},year 2011,volume 63,number 17,pages {17},doi {10.1007/s11837-011-0102-6}}- OpenKIM potential: https://openkim.org/cite/MO 049243498555 usepackage{url}\begin{document}This Model originally published in \cite{MO 049243498555 000a, MO 049243498555 000b} is archived inOpenKIM \cite{MO 049243498555 000, MD 120291908751 005, tadmor:elliott:2011, \bibliography{kimcite-MO 049243498555 000.bib}\end{document}}Ryan S.@Misc{MO 049243498555 000,Elliott, Ellad B. Tadmor (University of. Minnesota). .30

Outline Getting Things Done with OpenKIM in LAMMPSLAMMPS Simulation: Nanowire Extension-Setting up and running the simulationResultsOpenKIM Framework and LAMMPS-What is OpenKIM?Interatomic potentials on OpenKIM.orgRunning LAMMPS with OpenKIM potentialsPotential Selection Exercise-Select a suitable interatomic potential from OpenKIM.orgRerun simulation with new potentialObtaining Properties through OpenKIM Web Queries-LAMMPS “kim query” mechanismQuery exerciseSummaryRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)31

Obtaining Properties through OpenKIM Web Queries‣In the simulation that you ran, a hard-wired lattice constant was used:.# Simulation variablesvariable latticetype string "fcc"variable a0 equal 4.05.lattice {latticetype} {a0}.# Other options: "fcc", "bcc", "sc" # Equilibrium lattice constantBut actually each interatomic potential predicts a different equilibrium lattice constant:EAM CubicNaturalSpline ErcolessiAdams 1994 Al MO 800509458712 0024.032EAM Dynamo AngeloMoodyBaskes 1995 NiAlH MO 418978237058 0054.05EAM Dynamo CaiYe 1996 AlCu MO 942551040047 0054.05EAM Dynamo ErcolessiAdams 1994 Al MO 123629422045 0054.032EAM Dynamo FarkasJones 1996 NbTiAl MO 042691367780 0003.869EAM Dynamo JacobsenNorskovPuska 1987 Al MO 411692133366 0003.988.You can do a simulation to determine a0, look it up and substitute into script, or .Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)32

Obtaining Properties through OpenKIM Web Queries‣Using OpenKIM queries within a LAMMPS script:kim init EAM Dynamo ZhouWadleyJohnson 2001 Al MO 049243498555 000 metal.# Simulation variablesvariable latticetype string "fcc"# Other options: "fcc", "bcc", "sc" kim query a0 get lattice constant cubic crystal ["fcc"] species ["Al"] units ["angstrom"].lattice {latticetype} {a0}.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)33

Obtaining Properties through OpenKIM Web Queries‣Using OpenKIM queries within a LAMMPS script:kim init EAM Dynamo ZhouWadleyJohnson 2001 Al MO 049243498555 000 metal.# Simulation variablesvariable latticetype string "fcc"# Other options: "fcc", "bcc", "sc" kim query a0 get lattice constant cubic crystal ["fcc"] species ["Al"] units ["angstrom"].lattice {latticetype} {a0}.The kimquerycommand performs a web query to openkim.org and retrievesFor the model specified in kim init (EAM Dynami ZhouWadley.)The requested query (get lattice constant cubic) with parameters- crystal [“fcc”]- species [“Al”]- units [“angstrom”]Result placed in the variable a0For the Zhou et al. model this will result in an fcc lattice with a0 4.081654928624631Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)Å33

Obtaining Properties through OpenKIM Web Queries‣Using OpenKIM queries within a LAMMPS script:kim init EAM Dynamo ZhouWadleyJohnson 2001 Al MO 049243498555 000 metal.# Simulation variablesvariable latticetype string "fcc"# Other options: "fcc", "bcc", "sc" kim query a0 get lattice constant cubic crystal ["fcc"] species ["Al"] units ["angstrom"].lattice {latticetype} {a0}.The kimquerycommand performs a web query to openkim.org and retrievesFor the model specified in kim init (EAM Dynami ZhouWadley.)The requested query (get lattice constant cubic) with parameters- crystal [“fcc”]- species [“Al”]- units [“angstrom”]Result placed in the variable a0For the Zhou et al. model this will result in an fcc lattice with a0 4.081654928624631ÅOther queries are available: https://openkim.org/doc/usage/kim-query/Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)33

Obtaining Properties through OpenKIM Web Queries‣Using OpenKIM queries within a LAMMPS script:kim init EAM Dynamo ZhouWadleyJohnson 2001 Al MO 049243498555 000 metal.# Simulation variablesvariable latticetype string "fcc"# Other options: "fcc", "bcc", "sc" kim query a0 get lattice constant cubic crystal ["fcc"] species ["Al"] units ["angstrom"].lattice {latticetype} {a0}.The kimquerycommand performs a web query to openkim.org and retrievesFor the model specified in kim init (EAM Dynami ZhouWadley.)The requested query (get lattice constant cubic) with parameters- crystal [“fcc”]- species [“Al”]- units [“angstrom”]Result placed in the variable a0For the Zhou et al. model this will result in an fcc lattice with a0 4.081654928624631ÅOther queries are available: https://openkim.org/doc/usage/kim-query/Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)33

EXERCISE: Rerun Simulation with Query‣Goal: Run the nanowire extension simulation with the selected potentialStep 1: Copy your input script to a new file and save your plot files: cp in.kim in query.kim mv out stress-strain lmp.dat out stress-strain lmp my.dat mv out config lmp.dump out config lmp my.dumpStep 2: Edit the new script and replace the “variable vim in query.kima0”command with a kimquery:#OR code in query.kimStep 3: Run simulation lmp -in in query.kim out query.kimStep 4: Plot results, comparing the new results with the previous results. python import numpy as np Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)Raise your hand when you are done.34

Results with with QuerySlide RemovedRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)35

Outline Getting Things Done with OpenKIM in LAMMPSLAMMPS Simulation: Nanowire Extension-Setting up and running the simulationResultsOpenKIM Framework and LAMMPS-What is OpenKIM?Interatomic potentials on OpenKIM.orgRunning LAMMPS with OpenKIM potentialsPotential Selection Exercise-Select a suitable interatomic potential from OpenKIM.orgRerun simulation with new potentialObtaining Properties through OpenKIM Web Queries-LAMMPS kim query mechanismQuery exerciseSummaryRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)36

Summary‣‣Simulation results are strongly affected by the choice of interatomic potential.OpenKIM archives many interatomic potentials (models) on openkim.org.Each KIM model has the features:Archival storage with provenance controlA unique KIM ID and a DOI that can be cited in publicationsResults for property predictions and verification checks on coding integrityCan be downloaded and used directly with LAMMPS‣KIM models are integrated with LAMMPS:A command is provided to install KIM models. (Automatic when installing from binary)Usage is simple:kim init EAM Dynamo ZhouWadleyJohnson 2001 Al MO 049243498555 000 metal.kim interactions AlWeb queries can be performed from within LAMMPS scripts to get properties:kim query a0 get lattice constant cubic crystal ["fcc"] species ["Al"] units ["angstrom"]A mechanism for unit conversion is provided.Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota)37

OpenKIM.orghttps://openkim.orgRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)38

OpenKIM.orghttps://openkim.orgStart hereif you arenew to KIMRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)38

OpenKIM.orghttps://openkim.orgStart hereif you arenew to KIMRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)Become a memberto get updates andvote on KIM policy38

OpenKIM.orghttps://openkim.orgStart hereif you arenew to KIMBecome a memberto get updates andvote on KIM policyUpload contentRyan S. Elliott, Ellad B. Tadmor (University of Minnesota)38

Getting Things Done with OpenKIM in LAMMPS. Ryan S. Elliott, Ellad B. Tadmor (University of Minnesota) Open Knowledegebase of Interatomic Models 12 OpenKIM by the numbers ‣ The OpenKIM repository currently contains: 543 interatomic potentials 2613 property tests 10 verification checks 7