Updated kim_query documentation to new format

This commit is contained in:
Ellad Tadmor
2019-07-16 15:02:24 -05:00
parent 9718b99af9
commit 658cda9b67

View File

@ -35,8 +35,7 @@ kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657
kim_interactions C H O
kim_init Sim_LAMMPS_IFF_OtherInfo_AuthorList_Year_Species__SM_064312669787_000 real
kim_interactions fixed_types
kim_query a0 get_lattice_constant_fcc species=\["Al"\] units=\["angstrom"\] :pre
kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\] :pre
[Description:]
@ -104,16 +103,12 @@ The URL for the Model Page is constructed from the
"extended KIM ID"_https://openkim.org/about-kim-ids/ of the IM:
https://openkim.org/id/extended_KIM_ID
or
https://openkim.org/id/short_KIM_ID
:pre
For example for the Stillinger-Weber potential
listed above the Model Page is located at:
"https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005"_https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005
or
"https://openkim.org/id/MO_405512056662_005"_https://openkim.org/id/MO_405512056662_005
:pre
See the "current list of KIM PMs and SMs archived in OpenKIM"_https://openkim.org/browse/models/by-species.
@ -354,16 +349,34 @@ of the IM set by {kim_init} for material properties archived in
"OpenKIM"_https://openkim.org. The {kim_query} command must be preceded
by a {kim_init} command. The result of the query is stored in a
"string style variable"_variable.html, the name of which is given as the first
argument of the {kim_query command}. The second required argument
{query_function} is the name of the query function to be called
(e.g. {get_lattice_constant_fcc}).
All following arguments are parameters handed over to the web query
in the format {keyword=value}. The list of supported keywords and
the type and format of their values depend on the query function
used.
argument of the {kim_query command}. (For the case of multiple
return values, the optional {split} keyword can be used after the
variable name to separate the results into multiple variables; see
the "example"_#split_example below.)
The second required argument {query_function} is the name of the
query function to be called (e.g. {get_lattice_constant_cubic}).
All following "arguments"_Commands_parse.html are parameters handed over to
the web query in the format {keyword=value}, where {value} is always
an array of one or more comma-separated items in brackets.
The list of supported keywords and the type and format of their values
depend on the query function used. The current list of query functions
is available on the OpenKIM webpage at
"https://openkim.org/doc/repository/kim-query"_https://openkim.org/doc/repository/kim-query.
NOTE: The current list of supported query functions is available on the OpenKIM
webpage at "https://query.openkim.org"_https://query.openkim.org/
NOTE: All query functions require the {model} keyword, which identifies
the IM whose predictions are being queried. This keyword is automatically
generated by {kim_query} based on the IM set in {kim_init} and must not
be specified as an argument to {kim_query}.
NOTE: Each {query_function} is associated with a default method (implemented
as a "KIM Test"_https://openkim.org/getting-started/kim-tests/)
used to compute this property. In cases where there are multiple
methods in OpenKIM for computing a property, a {method} keyword can
be provided to select the method of choice. See the
"query documentation"_https://openkim.org/doc/repository/kim-query
to see which methods are available for a given {query function}.
{kim_query} Usage Examples and Further Clarifications: :h6
The data obtained by {kim_query} commands can be used as part of the setup
or analysis phases of LAMMPS simulations. Some examples are given below.
@ -372,7 +385,7 @@ or analysis phases of LAMMPS simulations. Some examples are given below.
kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
boundary p p p
kim_query a0 get_lattice_constant_fcc species=\["Al"\] units=\["angstrom"\]
kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\]
lattice fcc $\{a0\}
... :pre
@ -389,11 +402,12 @@ Note that in {unit_conversion_mode} the results obtained from a
For example, in the above script, the lattice command would need to be
changed to: "lattice fcc $\{a0\}*$\{_u_distance\}".
:link(split_example)
[Define an equilibrium hcp crystal]
kim_init EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000 metal
boundary p p p
kim_query latconst split get_lattice_constant_hcp species=\["Zr"\] units=\["angstrom"\]
kim_query latconst split get_lattice_constant_hexagonal crystal=\["hcp"\] species=\["Zr"\] units=\["angstrom"\]
variable a0 equal latconst_1
variable c0 equal latconst_2
variable c_to_a equal $\{c0\}/$\{a0\}
@ -414,16 +428,27 @@ the returned values is determined by the type of query performed.
kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
boundary p p p
kim_query a0 get_lattice_constant_fcc species=\["Al"\] units=\["angstrom"\]
kim_query alpha get_linear_thermal_expansion_fcc species=\["Al"\] units=\{"1/K"\}
kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\]
kim_query alpha get_linear_thermal_expansion_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\{"1/K"\} temperature=[293.15] temperature_units=["K"]
variable DeltaT equal 300
lattice fcc $\{a0\}*$\{alpha\}*$\{DeltaT\}
... :pre
As in the previous example, the equilibrium lattice constant is obtained
for the Ercolessi and Adams (1994) potential. However, in this case the
crystal is scaled to the appropriate lattice constant at 300 K by using
the linear thermal expansion coefficient predicted by the potential.
crystal is scaled to the appropriate lattice constant at room temperature
(293.15 K) by using the linear thermal expansion constant predicted by the
potential.
NOTE: When passing numerical values as arguments (as in the case
of the temperature in the above example) it is also possible to pass a
tolerance indicating how close to the value is considered a match.
If no tolerance is passed a default value is used. If multiple results
are returned (indicating that the tolerance is too large), {kim_query}
will return an error. See the
"query documentation"_https://openkim.org/doc/repository/kim-query
to see which numerical arguments and tolerances are available for a
given {query function}.
[Compute defect formation energy]
@ -432,7 +457,7 @@ kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
... Build fcc crystal containing some defect and compute the total energy
... which is stored in the variable {Etot}
...
kim_query Ec get_cohesive_energy_fcc species=\["Al"\] units=\["eV"\]
kim_query Ec get_cohesive_energy_cubic crystal=\["fcc"\] species=\["Al"\] units=\["eV"\]
variable Eform equal $\{Etot\} - count(all)*$\{Ec\}
... :pre