From 39c8a7de6e8f4e36f5dc87b775445e7c1c93fd0d Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Tue, 9 Jul 2019 07:35:50 -0400 Subject: [PATCH] Updated kim_commands doc to descript kim_query split mode --- doc/src/kim_commands.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 66319d7a08..16d8ea785d 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -14,13 +14,14 @@ kim_query command :h3 kim_init model user_units unitarg kim_interactions typeargs -kim_query variable query_function queryargs :pre +kim_query variable formatarg query_function queryargs :pre model = name of the KIM interatomic model (the KIM ID for models archived in OpenKIM) user_units = the LAMMPS "units"_units.html style assumed in the LAMMPS input script unitarg = {unit_conversion_mode} (optional) typeargs = atom type to species mapping (one entry per atom type) variable = name of a (string style) variable where the result of the query is stored +formatarg = {split} (optional) query_function = name of the OpenKIM web API query function to be used queryargs = a series of {keyword=value} pairs that represent the web query; supported keywords depend on the query function :ul @@ -377,7 +378,7 @@ changed to: "lattice fcc $\{a0\}*$\{_u_distance\}". kim_init EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000 metal boundary p p p -kim_query latconst get_lattice_constant_hcp species=\["Zr"\] units=\["angstrom"\] +kim_query latconst split get_lattice_constant_hcp species=\["Zr"\] units=\["angstrom"\] variable a0 equal latconst_1 variable c0 equal latconst_2 variable c_to_a equal $\{c0\}/$\{a0\} @@ -387,6 +388,13 @@ lattice custom $\{a0\} a1 0.5 -0.866025 0 a2 0.5 0.866025 0 a3 0 0 $\{c In this case the {kim_query} returns two arguments (since the hexagonal close packed (hcp) structure has two independent lattice constants). +The default behavior of {kim_query} returns the result as a string +with the values separated by commas. The optional keyword {split} +separates the result values into individual variables of the form +{prefix_I}, where {prefix} is set to the the {kim_query} {variable} argument +and {I} ranges from 1 to the number of returned values. The number and order of +the returned values is determined by the type of query performed. + In the case where a query returns multiple results, the default behavior for {kim_query} is to split these into individual variables of the form {prefix_I}, where {prefix} is set to the the {kim_query} {variable} argument