update kim command examples

This commit is contained in:
Yaser Afshar
2021-02-12 08:03:21 -06:00
parent 6769ded03c
commit 10a48f18d0
6 changed files with 137 additions and 137 deletions

View File

@ -1,35 +1,35 @@
# 3d Lennard-Jones melt
#
# This example requires that the example models provided with
# the kim-api package are installed. see the ./lib/kim/README or
# ./lib/kim/Install.py files for details on how to install these
# the kim-api package are installed. see the `./lib/kim/README` or
# `./lib/kim/Install.py` files for details on how to install these
# example models.
#
variable x index 1
variable y index 1
variable z index 1
variable x index 1
variable y index 1
variable z index 1
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
kim_init LennardJones_Ar real
kim init LennardJones_Ar real
lattice fcc 4.4300
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
lattice fcc 4.4300
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
kim_interactions Ar
kim interactions Ar
mass 1 39.95
velocity all create 200.0 232345 loop geom
mass 1 39.95
velocity all create 200.0 232345 loop geom
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
run 100
run 100

View File

@ -1,34 +1,34 @@
# kim-property example
# kim property example
#
# For detailed information of this example please refer to:
# https://openkim.org/doc/evaluation/tutorial-lammps/
# `https://openkim.org/doc/evaluation/tutorial-lammps/`
#
# Description:
#
# This example is designed to calculate the cohesive energy corresponding to
# the equilibrium FCC lattice constant for
# `LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004` model for
# argon. The material properties computed in LAMMPS are represented as a
# standard KIM property instance format. (See
# https://openkim.org/doc/schema/properties-framework/ and
# https://lammps.sandia.gov/doc/kim_commands.html for further details).
# Then the created property instance is written to a file named results.edn
# using the `kim_property dump` commands.
# This example is designed to calculate the cohesive energy corresponding to
# the equilibrium FCC lattice constant for
# `LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004` model for
# argon. The material properties computed in LAMMPS are represented as a
# standard KIM property instance format. (See
# `https://openkim.org/doc/schema/properties-framework/` and
# `https://lammps.sandia.gov/doc/kim_commands.html` for further details).
# Then the created property instance is written to a file named `results.edn`
# using the `kim property dump` command.
#
# Requirement:
#
# This example requires LAMMPS built with the Python 3.6 or later package
# installed. See the `https://lammps.sandia.gov/doc/python.html` doc page for
#
# This example requires LAMMPS built with the Python 3.6 or later package
# installed. See the `https://lammps.sandia.gov/doc/python.html` doc page for
# more info on building LAMMPS with the version of Python on your system.
# After successfully building LAMMPS with Python, you need to install the
# kim-property Python package, See the
# `https://lammps.sandia.gov/doc/Build_extras.html#kim` doc page for
# After successfully building LAMMPS with Python, you need to install the
# kim-property Python package, See the
# `https://lammps.sandia.gov/doc/Build_extras.html#kim` doc page for
# further details.
#
# This example requires that the KIM Portable Model (PM)
# `LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004`
# is installed. This can be done with the command
# `kim-api-collections-management install user LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004`
# is installed. This can be done with the command
# kim-api-collections-management install user LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004
# If this command does not work, you may need to setup your PATH to find the utility.
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
# (where the current working directory is assumed to be the LAMMPS build directory)
@ -38,14 +38,14 @@
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
#
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
#
# Initialize interatomic potential (KIM model) and units
atom_style atomic
# Set the OpenKIM model that will be used
kim_init LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004 metal
kim init LJ_Shifted_Bernardes_1958MedCutoff_Ar__MO_126566794224_004 metal
# the equilibrium lattice constant for the fcc structure
variable lattice_constant equal 5.248509056866169
@ -55,14 +55,14 @@ boundary p p p
# Create an FCC lattice with the lattice spacing
# using a single conventional (orthogonal) unit cell
lattice fcc ${lattice_constant}
region box block 0 1 0 1 0 1 units lattice
create_box 1 box
lattice fcc ${lattice_constant}
region box block 0 1 0 1 0 1 units lattice
create_box 1 box
create_atoms 1 box
mass 1 39.948
mass 1 39.948
# Specify the KIM interactions
kim_interactions Ar
kim interactions Ar
# Compute energy
run 0
@ -72,10 +72,10 @@ variable natoms equal "count(all)"
variable ecohesive equal "-pe/v_natoms"
# Create a property instance
kim_property create 1 cohesive-potential-energy-cubic-crystal
kim property create 1 cohesive-potential-energy-cubic-crystal
# Set all the key-value pairs for this property instance
kim_property modify 1 key short-name source-value 1 fcc &
kim property modify 1 key short-name source-value 1 fcc &
key species source-value 1 Ar &
key a source-value ${lattice_constant} &
source-unit angstrom &
@ -88,4 +88,4 @@ kim_property modify 1 key short-name source-value 1 fcc
source-unit eV
# Dump the results in a file
kim_property dump "results.edn"
kim property dump "results.edn"

View File

@ -1,7 +1,7 @@
# 3d Lennard-Jones melt
#
# This example requires that the KIM Portable Model (PM)
# SW_StillingerWeber_1985_Si__MO_405512056662_005
# `SW_StillingerWeber_1985_Si__MO_405512056662_005`
# is installed. This can be done with the command
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
# If this command does not work, you may need to setup your PATH to find the utility.
@ -13,34 +13,34 @@
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
#
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
#
variable x index 1
variable y index 1
variable z index 1
variable x index 1
variable y index 1
variable z index 1
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
kim_query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Si"] units=["angstrom"]
kim init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
kim query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Si"] units=["angstrom"]
lattice fcc ${a0}
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
lattice fcc ${a0}
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
kim_interactions Si
kim interactions Si
mass 1 39.95
velocity all create 200.0 232345 loop geom
mass 1 39.95
velocity all create 200.0 232345 loop geom
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
run 100
run 100

View File

@ -1,7 +1,7 @@
# 3d Lennard-Jones melt
#
# This example requires that the KIM Portable Model (PM)
# SW_StillingerWeber_1985_Si__MO_405512056662_005
# `SW_StillingerWeber_1985_Si__MO_405512056662_005`
# is installed. This can be done with the command
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005
# If this command does not work, you may need to setup your PATH to find the utility.
@ -13,33 +13,33 @@
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
#
# Or, see https://openkim.org/doc/obtaining-models for alternative options.
# Or, see `https://openkim.org/doc/obtaining-models` for alternative options.
#
variable x index 1
variable y index 1
variable z index 1
variable x index 1
variable y index 1
variable z index 1
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
kim init SW_StillingerWeber_1985_Si__MO_405512056662_005 real
lattice fcc 4.4300
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
lattice fcc 4.4300
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
kim_interactions Si
kim interactions Si
mass 1 39.95
velocity all create 200.0 232345 loop geom
mass 1 39.95
velocity all create 200.0 232345 loop geom
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
run 100
run 100

View File

@ -1,8 +1,8 @@
# 3d Lennard-Jones melt
#
# This example requires that the KIM Simulator Model (PM)
# Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
# is installed. This can be done with the command
# `Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000`
# is installed. This can be done with the command
# kim-api-collections-management install user Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000
# If this command does not work, you may need to setup your PATH to find the utility.
# If you installed the kim-api using the LAMMPS CMake build, you can do the following
@ -13,33 +13,33 @@
# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate
# (where you should relplace X.Y.Z with the appropriate kim-api version number).
#
# See https://openkim.org/doc/obtaining-models for alternative options.
# See `https://openkim.org/doc/obtaining-models` for alternative options.
#
variable x index 1
variable y index 1
variable z index 1
variable x index 1
variable y index 1
variable z index 1
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
kim init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
lattice fcc 4.4300
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
lattice fcc 4.4300
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
kim_interactions O
kim interactions O
mass 1 39.95
velocity all create 200.0 232345 loop geom
mass 1 39.95
velocity all create 200.0 232345 loop geom
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
run 100
run 100

View File

@ -1,33 +1,33 @@
# 3d Lennard-Jones melt
variable x index 1
variable y index 1
variable z index 1
variable x index 1
variable y index 1
variable z index 1
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
variable xx equal 20*$x
variable yy equal 20*$y
variable zz equal 20*$z
units real
units real
lattice fcc 4.4300
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
lattice fcc 4.4300
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
pair_style lj/cut 8.1500
pair_coeff 1 1 0.0104 3.4000
pair_style lj/cut 8.1500
pair_coeff 1 1 0.0104 3.4000
#pair_style kim LennardJones_Ar
#pair_coeff * * Ar
#pair_style kim LennardJones_Ar
#pair_coeff * * Ar
mass 1 39.95
velocity all create 200.0 232345 loop geom
mass 1 39.95
velocity all create 200.0 232345 loop geom
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
fix 1 all nve
#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0
run 100
run 100