OpenKIM Query

Examples
Basic usage Specifying SI units Retrieving multiple keys

A square-bracketed list containing the Test name. The following formats are accepted: ["CC_DDDDDDDDDDDD"], ["TestName__CC_DDDDDDDDDDDD"], ["CC_DDDDDDDDDDDD_VVV"], ["TestName__CC_DDDDDDDDDDDD_VVV"]. Generally, the three digit version extension (VVV) should be omitted so that the latest version of the Test will be queried on. For more on KIM IDs, refer to the Guide to KIM IDs.

Accepted formats are identical to those above and, similar to above, the three digit version extension should generally be omitted.

A square-bracketed, comma-separated list of quoted strings corresponding to standard elemental symbols (case sensitive). Test Results returned will be required to contain each element listed. If an empty array list is requested, only properties that specifically lack a "species" field will match.

A square-bracketed list containing the property name. May be specified as either the short name of a Property Definition, e.g. structure-cubic-crystal-npt, or the full property ID, e.g. ["tag:staff@noreply.openkim.org,2014-04-15:property/structure-cubic-crystal-npt"]. Only the short name should generally be used so that the latest version of the Property Definition is queried on. See here for a current list of Property Definitions.

Ordered array of keys specified as a square-bracketed, comma-separated list of quoted strings. The order of the keys must correspond to the order of the entries in the 'Units' field below.

A square-bracketed, comma-separated list of quoted strings indicating the desired units that the value of each key should be returned in. The order of the entries in this list should correspond to the order of the entries in the 'Keys' field above. Valid strings for units are any of those recognized by the GNU units utility, or the special string "SI". Keys which are unitless must have a value of null (case-sensitive and unquoted).

Results

{"error": "string indices must be integers"}

Query Link

https://query.openkim.org/get_test_result?test=%5B%22LatticeConstantCubicEnergy_diamond_Si__TE_849680434885%22%5D&model=%5B%22EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036%22%5D&species=%5B%22Si%22%5D&prop=%5B%22cohesive-potential-energy-cubic-crystal%22%5D&keys=%5B%22a%22%2C+%22cohesive-potential-energy%22%5D&units=%5B%22angstrom%22%2C+%22eV%22%5D

Curl

curl --data-urlencode 'test=["LatticeConstantCubicEnergy_diamond_Si__TE_849680434885"]' --data-urlencode 'model=["EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036"]' --data-urlencode 'species=["Si"]' --data-urlencode 'prop=["cohesive-potential-energy-cubic-crystal"]' --data-urlencode 'keys=["a","cohesive-potential-energy"]' --data-urlencode 'units=["angstrom","eV"]' https://query.openkim.org/api/get_test_result

GET

https://query.openkim.org/api/get_test_result?test=%5B%22LatticeConstantCubicEnergy_diamond_Si__TE_849680434885%22%5D&model=%5B%22EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036%22%5D&species=%5B%22Si%22%5D&prop=%5B%22cohesive-potential-energy-cubic-crystal%22%5D&keys=%5B%22a%22%2C+%22cohesive-potential-energy%22%5D&units=%5B%22angstrom%22%2C+%22eV%22%5D

Python

result = requests.post("https://query.openkim.org/api/get_test_result",data={'test': '["LatticeConstantCubicEnergy_diamond_Si__TE_849680434885"]', 'model': '["EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036"]', 'species': '["Si"]', 'prop': '["cohesive-potential-energy-cubic-crystal"]', 'keys': '["a","cohesive-potential-energy"]', 'units': '["angstrom","eV"]'}).json()

d3

d3.json('https://query.openkim.org/api/get_test_result?test=%5B%22LatticeConstantCubicEnergy_diamond_Si__TE_849680434885%22%5D&model=%5B%22EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036%22%5D&species=%5B%22Si%22%5D&prop=%5B%22cohesive-potential-energy-cubic-crystal%22%5D&keys=%5B%22a%22%2C+%22cohesive-potential-energy%22%5D&units=%5B%22angstrom%22%2C+%22eV%22%5D')

jQuery

$.post("https://query.openkim.org/api/get_test_result",{"test": "[\"LatticeConstantCubicEnergy_diamond_Si__TE_849680434885\"]", "model": "[\"EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036\"]", "species": "[\"Si\"]", "prop": "[\"cohesive-potential-energy-cubic-crystal\"]", "keys": "[\"a\",\"cohesive-potential-energy\"]", "units": "[\"angstrom\",\"eV\"]"});

pipeline.stdin.tpl

@< get_test_result(test=["LatticeConstantCubicEnergy_diamond_Si__TE_849680434885"], model=["EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036"], species=["Si"], prop=["cohesive-potential-energy-cubic-crystal"], keys=["a", "cohesive-potential-energy"], units=["angstrom", "eV"]) >@
Examples
Get all jobs that are currently running Get all Test Drivers in the database Get all fcc Al lattice constants and the Model that ran them
Longest running Test name and time Get a 10 line tail of the logs Get the lowest energy crystal structure for each Model using Al

Things you want true, as a dictionary of key value pairs, e.g. {"type": "td"} makes sure that all objects are test drivers.

Things you want back, as a dictionary of booleans, e.g. {"type":1, "path":1} returns just type and path (and '_id')

A mongodb aggregation pipeline. Use $sort, $limit, $skip, and $distinct aggregation pipeline stages instead of entering in their respective fields below if using aggregate(). For more information, check the docs

Database you want, valid options are [obj, data, job, log, agent]

Things you want sorted on, as a string, or a list with direction, e.g. "kimcode" sorts on kimcode, [["kimcode", -1]] gives reverse kimcode

How many you want, an integer, how it stops, leave empty for all

How many you want to skip, relevant if ordered

Things you want distinct, just a key, e.g. "type" would return distinct type fields. Note, this doesn't play well with others.

Reduce result to an array where the columns are ordered by this list i.e. ["meta.kimcode", "crystal-structure.a.source-value"]. Implies flatten.

Whether or not to flatten the keys in the dictionary

Return full database history. By default, only returns latest data

Return only count of number results created by query