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 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. Some keys may be Optional in certain Property Definitions, if the requested optional key is not present in the returned test result, a value of null will be returned.

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).

See A Practical Guide to Raw MongoDB queries. Example queries:
Get all Test Drivers in the database Get all fcc Al lattice constants and the Model that ran them Get the lowest energy crystal structure for each Model using Si

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

Results

[
    {
        "_id": {
            "model": "Tersoff_LAMMPS_ErhartAlbe_2005SiII_SiC__MO_408791041969_004"
        },
        "name": "A_cF8_227_a",
        "energy": -4.624347749990883
    },
    {
        "_id": {
            "model": "TorchML_MACE_GuptaTadmorMartiniani_2024_Si__MO_781946209112_000"
        },
        "name": "A_hP2_194_c",
        "energy": 0.5569940549814589
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_ModifiedTersoff_PurjaPunMishin_2017_Si__SM_184524061456_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629999979504947
    },
    {
        "_id": {
            "model": "SW_BalamaneHauchShi_2017Brittle_Si__MO_381114941873_003"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629999799911674
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_KangEunJun_2014_SiC__MO_477506997611_002"
        },
        "name": "A_cF8_227_a",
        "energy": -4.6300000000450785
    },
    {
        "_id": {
            "model": "ThreeBodyBondOrder_WR_WangRockett_1991_Si__MO_081872846741_000"
        },
        "name": "A_oF16_69_gh",
        "energy": -4.6520254983695
    },
    {
        "_id": {
            "model": "PolyMLP_Seko_2022p1_SiIn__MO_197188842574_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.550878750064475
    },
    {
        "_id": {
            "model": "ThreeBodyBondOrder_PPM_PurjaPunMishin_2017_Si__MO_566683736730_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.6299999275574475
    },
    {
        "_id": {
            "model": "Tersoff_LAMMPS_ErhartAlbe_2005_SiC__MO_903987585848_005"
        },
        "name": "A_cF8_227_a",
        "energy": -4.628414662852906
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_GWZBL_Samolyuk_2016_SiC__SM_720598599889_000"
        },
        "name": "A_hR8_148_cf",
        "energy": -3.1884690084987684
    },
    {
        "_id": {
            "model": "Tersoff_LAMMPS_PlummerTucker_2019_TiSiC__MO_751442731010_000"
        },
        "name": "A_hP4_194_f",
        "energy": -4.624353470931103
    },
    {
        "_id": {
            "model": "DUNN_Gupta_2026N3_Si__MO_798099350634_000"
        },
        "name": "A_cF8_227_a",
        "energy": -6.114962701629651
    },
    {
        "_id": {
            "model": "ThreeBodyCluster_BH_BiswasHamann_1987_Si__MO_019616213550_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.6044456741296464
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_Wagner_2007_SiC__MO_430846853065_002"
        },
        "name": "A_cF8_227_a",
        "energy": -4.6299999999359995
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_ModifiedTersoff_KumagaiIzumiHara_2007_Si__SM_773333226968_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.62999929234636
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_ReaxFF_ManzanoMoeiniMarinelli_2012_CaSiOH__SM_714124634215_000"
        },
        "name": "A_hR8_148_cf",
        "energy": -4.5477185523476615
    },
    {
        "_id": {
            "model": "Tersoff_LAMMPS_Tersoff_1988T2_Si__MO_245095684871_004"
        },
        "name": "A_cF8_227_a",
        "energy": -4.630412163496892
    },
    {
        "_id": {
            "model": "ThreeBodyCluster_Gong_Gong_1993_Si__MO_407755720412_000"
        },
        "name": "A_hP2_194_c",
        "energy": -6.646738594801856
    },
    {
        "_id": {
            "model": "SW_ZhangXieHu_2014OptimizedSW2_Si__MO_475612090600_005"
        },
        "name": "A_hP4_194_f",
        "energy": -3.5888770310093663
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_GW_GaoWeber_2002_SiC__SM_606253546840_000"
        },
        "name": "A_hR8_148_cf",
        "energy": -3.188469117539447
    },
    {
        "_id": {
            "model": "PolyMLP_Seko_2022p1_LiSi__MO_246471043381_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.551149347977369
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_EDIP_LucasBertolusPizzagalli_2009_SiC__SM_435704953434_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.647223337947563
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_CuiGaoCui_2012_LiSi__MO_557492625287_002"
        },
        "name": "A_cF8_227_a",
        "energy": -4.628760275393971
    },
    {
        "_id": {
            "model": "Tersoff_LAMMPS_Tersoff_1988T3_Si__MO_186459956893_004"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629725503248426
    },
    {
        "_id": {
            "model": "ThreeBodyCluster_KP_KaxirasPandey_1988_Si__MO_072486242437_000"
        },
        "name": "A_hP68_194_ef2h2kl",
        "energy": -5.497704429776294
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_MEAM_DuLenoskyHennig_2011_Si__SM_662785656123_000"
        },
        "name": "A_hP4_194_f",
        "energy": -4.635801250936817
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_Buckingham_FreitasSantosColaco_2015_SiCaOAl__SM_154093256665_000"
        },
        "name": "A_hP2_194_c",
        "energy": -49.28470768988617
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_DuLenoskyHennig_2011_Si__MO_883726743759_001"
        },
        "name": "A_hP4_194_f",
        "energy": -4.63580125093682
    },
    {
        "_id": {
            "model": "Tersoff_LAMMPS_Tersoff_1989_SiC__MO_171585019474_004"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629595012705602
    },
    {
        "_id": {
            "model": "TorchML_NequIP_GuptaTadmorMartiniani_2024_Si__MO_196181738937_000"
        },
        "name": "A_cF8_227_a",
        "energy": -3.344642798052515
    },
    {
        "_id": {
            "model": "SW_HauchHollandMarder_1999Brittle_Si__MO_119167353542_005"
        },
        "name": "A_hP4_194_f",
        "energy": -4.336399999917268
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_MEAM_CuiGaoCui_2012_LiSi__SM_562938628131_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.628760275393972
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_JelinekGrohHorstemeyer_2012_AlSiMgCuFe__MO_262519520678_001"
        },
        "name": "A_cF8_227_a",
        "energy": -4.630000000667423
    },
    {
        "_id": {
            "model": "EDIP_JustoBazantKaxiras_1998_Si__MO_958932894036_002"
        },
        "name": "A_hP4_194_f",
        "energy": -4.649953816460917
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_AslamBaskesDickel_2019_FeMnSiC__MO_427873955970_001"
        },
        "name": "A_cF8_227_a",
        "energy": -4.6299999339564275
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_KangEunJun_2014_SiC__MO_477506997611_001"
        },
        "name": "A_cF8_227_a",
        "energy": -4.6300000000450785
    },
    {
        "_id": {
            "model": "DUNN_Gupta_2026N1_Si__MO_246333365926_000"
        },
        "name": "A_hP4_194_f",
        "energy": -4.528358355879135
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_ADP_StarikovLopanitsynaSmirnova_2018_SiAu__SM_985135773293_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.628136528883463
    },
    {
        "_id": {
            "model": "DUNN_Gupta_2026N2_Si__MO_433917300633_000"
        },
        "name": "A_cF8_227_a",
        "energy": -2.6179931800933787
    },
    {
        "_id": {
            "model": "PolyMLP_Seko_2022p1_SiSn__MO_118151700862_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.554028920625712
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_MEAM_Wagner_2007_SiC__SM_264944083668_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629999999936
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_HuangDongLiu_2018_Si__MO_050147023220_002"
        },
        "name": "A_cF8_227_a",
        "energy": -4.630000028117055
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_ReaxFF_BrugnoliMiyataniAkaji_SiCeNaClHO_2023__SM_282799919035_000"
        },
        "name": "A_hR8_148_cf",
        "energy": -4.5477185523476615
    },
    {
        "_id": {
            "model": "LJ_ElliottAkerson_2015_Universal__MO_959249795837_003"
        },
        "name": "A_hP2_194_c",
        "energy": -26.43271405904788
    },
    {
        "_id": {
            "model": "PolyMLP_Seko_2022p1_BeSi__MO_788283766723_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.551118225506809
    },
    {
        "_id": {
            "model": "EDIP_LAMMPS_LucasBertolusPizzagalli_2009_SiC__MO_634310164305_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.647223337947563
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_HuangDongLiu_2018_Si__MO_050147023220_001"
        },
        "name": "A_cF8_227_a",
        "energy": -4.630000028117055
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_JelinekGrohHorstemeyer_2012_AlSiMgCuFe__MO_262519520678_002"
        },
        "name": "A_hP4_194_f",
        "energy": -4.630000000667423
    },
    {
        "_id": {
            "model": "ThreeBodyCluster_SRS_StephensonRadnySmith_1996_Si__MO_604248666067_000"
        },
        "name": "A_cF8_227_a",
        "energy": -5.269496210193675
    },
    {
        "_id": {
            "model": "Tersoff_LAMMPS_MunetohMotookaMoriguchi_2007_SiO__MO_501246546792_000"
        },
        "name": "A_hP4_194_f",
        "energy": -4.628872713879843
    },
    {
        "_id": {
            "model": "SW_LeeHwang_2012GGA_Si__MO_040570764911_001"
        },
        "name": "A_cF8_227_a",
        "energy": -2.83983999994582
    },
    {
        "_id": {
            "model": "SW_ZhangXieHu_2014OptimizedSW1_Si__MO_800412945727_005"
        },
        "name": "A_hP4_194_f",
        "energy": -3.4294766880110834
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_Lee_2007_Si__MO_774917820956_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.630000000205695
    },
    {
        "_id": {
            "model": "PolyMLP_Seko_2022p1_SiAg__MO_558818721890_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.551136690027589
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_MEAM_LenoskySadighAlonso_2000_Si__SM_622320990752_000"
        },
        "name": "A_hP4_194_f",
        "energy": -4.616042592216106
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_AslamBaskesDickel_2019_FeMnSiC__MO_427873955970_002"
        },
        "name": "A_cF8_227_a",
        "energy": -4.6299999339564275
    },
    {
        "_id": {
            "model": "Tersoff_LAMMPS_Tersoff_1990_SiC__MO_444207127575_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629595012705605
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_LenoskySadighAlonso_2000_Si__MO_533426548156_002"
        },
        "name": "A_hP4_194_f",
        "energy": -4.616042592216103
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_Buckingham_CarreHorbachIspas_2008_SiO__SM_886641404623_000"
        },
        "name": "A_hP2_194_c",
        "energy": -34.018298870682855
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_MEAM_JelinekGrohHorstemeyer_2012_AlSiMgCuFe__SM_656517352485_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.6300000006674225
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_DuLenoskyHennig_2011_Si__MO_883726743759_002"
        },
        "name": "A_hP4_194_f",
        "energy": -4.63580125093682
    },
    {
        "_id": {
            "model": "EDIP_LAMMPS_JiangMorganSzlufarska_2012_SiC__MO_667792548433_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.647223337947563
    },
    {
        "_id": {
            "model": "SW_StillingerWeber_1985_Si__MO_405512056662_006"
        },
        "name": "A_cF8_227_a",
        "energy": -4.336399999917268
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_LenoskySadighAlonso_2000_Si__MO_533426548156_001"
        },
        "name": "A_hP4_194_f",
        "energy": -4.6160425922161
    },
    {
        "_id": {
            "model": "MFF_MistriotisFlytzanisFarantos_1989_Si__MO_080526771943_001"
        },
        "name": "A_cF8_227_a",
        "energy": -4.630000272628002
    },
    {
        "_id": {
            "model": "SW_BalamaneHaliciogluTiller_1992_Si__MO_113686039439_005"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629999999911666
    },
    {
        "_id": {
            "model": "SW_LeeHwang_2012LDA_Si__MO_517338295712_001"
        },
        "name": "A_hP4_194_f",
        "energy": -2.993239999942893
    },
    {
        "_id": {
            "model": "Tersoff_LAMMPS_Tersoff_1994_SiC__MO_794973922560_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629595012705605
    },
    {
        "_id": {
            "model": "SNAP_ZuoChenLi_2019_Si__MO_869330304805_000"
        },
        "name": "A_hP4_194_f",
        "energy": -2.2591769181259984
    },
    {
        "_id": {
            "model": "ThreeBodyBondOrder_KDS_KhorDasSarma_1988_Si__MO_722489435928_000"
        },
        "name": "A_mC16_12_4i",
        "energy": -4.825996515801223
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_ADP_StarikovGordeevLysogorskiy_2020_SiAuAl__SM_113843830602_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.599977561124165
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_Vashishta_BroughtonMeliVashishta_1997_SiO__SM_422553794879_000"
        },
        "name": "A_cP46_223_cik",
        "energy": -1.4481169886415085e-17
    },
    {
        "_id": {
            "model": "SNAP_ZuoChenLi_2019quadratic_Si__MO_721469752060_000"
        },
        "name": "A_cF4_225_a",
        "energy": -2.776652039646289
    },
    {
        "_id": {
            "model": "EDIP_LAMMPS_JustoBazantKaxiras_1998_Si__MO_315965276297_000"
        },
        "name": "A_hP4_194_f",
        "energy": -4.649953801748493
    },
    {
        "_id": {
            "model": "PolyMLP_Seko_2022p1_AlSi__MO_772463641678_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.554046152702958
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_Lee_2007_Si__MO_774917820956_001"
        },
        "name": "A_cF8_227_a",
        "energy": -4.630000000205695
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_Vashishta_VashishtaKaliaRino_1990_SiO__SM_887826436433_000"
        },
        "name": "A_cF4_225_a",
        "energy": -9.769962616701378e-15
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_Wagner_2007_SiC__MO_430846853065_001"
        },
        "name": "A_hP4_194_f",
        "energy": -60.87053386927555
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_Vashishta_VashishtaKaliaNakano_2007_SiC__SM_196548226654_000"
        },
        "name": "A_cP46_223_cik",
        "energy": -9.654113257610057e-18
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_TersoffZBL_DevanathanDiazdelaRubiaWeber_1998_SiC__SM_578912636995_000"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629594992778735
    },
    {
        "_id": {
            "model": "MEAM_LAMMPS_CuiGaoCui_2012_LiSi__MO_557492625287_001"
        },
        "name": "A_cF8_227_a",
        "energy": -4.628760275393958
    },
    {
        "_id": {
            "model": "Sim_LAMMPS_Vashishta_NakanoKaliaVashishta_1994_SiO__SM_503555646986_000"
        },
        "name": "A_tI4_141_a",
        "energy": -1.7763568394002505e-15
    },
    {
        "_id": {
            "model": "Tersoff_LAMMPS_Tersoff_1989_SiGe__MO_350526375143_004"
        },
        "name": "A_cF8_227_a",
        "energy": -4.629595012705602
    }
]

Query Link

https://query.openkim.org/raw?database=data&query=%7B%22meta.type%22%3A%22tr%22%7D&aggregate=%5B%7B%22%24match%22+%3A+%0D%0A++++++++%7B%22%24and%22%3A+%5B%0D%0A++++++++++++%7B%22property-id%22%3A+%22tag%3Astaff%40noreply.openkim.org%2C2023-02-21%3Aproperty%2Fbinding-energy-crystal%22%7D%2C%0D%0A++++++++++++%7B%22stoichiometric-species.source-value%22%3A+%7B%22%24eq%22%3A+%22Si%22%2C+%22%24size%22%3A+1%7D%7D%2C%0D%0A++++++++++++%7B%22meta.type%22%3A+%22tr%22%7D%5D%7D%7D%2C%0D%0A%7B%22%24project%22%3A+%7B%22meta.subject.kimcode%22%3A+1%2C%0D%0A++++++++++++%22prototype-label.source-value%22%3A+1%2C%0D%0A++++++++++++%22binding-potential-energy-per-atom.source-value%22%3A+1%7D%7D%2C%0D%0A%7B%22%24sort%22%3A+%7B%22meta.subject.kimcode%22%3A+1%2C+%22binding-potential-energy-per-atom.source-value%22%3A+1%7D+%7D%2C%0D%0A%7B%22%24group%22%3A+%7B%22_id%22%3A+%7B%22model%22%3A+%22%24meta.subject.kimcode%22%7D%2C%0D%0A++++++++++++%22name%22%3A+%7B%22%24first%22%3A+%22%24prototype-label.source-value%22%7D%2C%0D%0A++++++++++++%22energy%22%3A+%7B%22%24first%22%3A+%22%24binding-potential-energy-per-atom.source-value%22%7D%0D%0A++++++++%7D%0D%0A++++%7D%0D%0A%5D

Curl

curl --data-urlencode 'database=data' --data-urlencode 'query={"meta.type":"tr"}' --data-urlencode 'aggregate=%5B%7B%22%24match%22+%3A+%0D%0A++++++++%7B%22%24and%22%3A+%5B%0D%0A++++++++++++%7B%22property-id%22%3A+%22tag%3Astaff%40noreply.openkim.org%2C2023-02-21%3Aproperty%2Fbinding-energy-crystal%22%7D%2C%0D%0A++++++++++++%7B%22stoichiometric-species.source-value%22%3A+%7B%22%24eq%22%3A+%22Si%22%2C+%22%24size%22%3A+1%7D%7D%2C%0D%0A++++++++++++%7B%22meta.type%22%3A+%22tr%22%7D%5D%7D%7D%2C%0D%0A%7B%22%24project%22%3A+%7B%22meta.subject.kimcode%22%3A+1%2C%0D%0A++++++++++++%22prototype-label.source-value%22%3A+1%2C%0D%0A++++++++++++%22binding-potential-energy-per-atom.source-value%22%3A+1%7D%7D%2C%0D%0A%7B%22%24sort%22%3A+%7B%22meta.subject.kimcode%22%3A+1%2C+%22binding-potential-energy-per-atom.source-value%22%3A+1%7D+%7D%2C%0D%0A%7B%22%24group%22%3A+%7B%22_id%22%3A+%7B%22model%22%3A+%22%24meta.subject.kimcode%22%7D%2C%0D%0A++++++++++++%22name%22%3A+%7B%22%24first%22%3A+%22%24prototype-label.source-value%22%7D%2C%0D%0A++++++++++++%22energy%22%3A+%7B%22%24first%22%3A+%22%24binding-potential-energy-per-atom.source-value%22%7D%0D%0A++++++++%7D%0D%0A++++%7D%0D%0A%5D' https://query.openkim.org/api

GET

https://query.openkim.org/api?database=data&query=%7B%22meta.type%22%3A%22tr%22%7D&aggregate=%5B%7B%22%24match%22+%3A+%0D%0A++++++++%7B%22%24and%22%3A+%5B%0D%0A++++++++++++%7B%22property-id%22%3A+%22tag%3Astaff%40noreply.openkim.org%2C2023-02-21%3Aproperty%2Fbinding-energy-crystal%22%7D%2C%0D%0A++++++++++++%7B%22stoichiometric-species.source-value%22%3A+%7B%22%24eq%22%3A+%22Si%22%2C+%22%24size%22%3A+1%7D%7D%2C%0D%0A++++++++++++%7B%22meta.type%22%3A+%22tr%22%7D%5D%7D%7D%2C%0D%0A%7B%22%24project%22%3A+%7B%22meta.subject.kimcode%22%3A+1%2C%0D%0A++++++++++++%22prototype-label.source-value%22%3A+1%2C%0D%0A++++++++++++%22binding-potential-energy-per-atom.source-value%22%3A+1%7D%7D%2C%0D%0A%7B%22%24sort%22%3A+%7B%22meta.subject.kimcode%22%3A+1%2C+%22binding-potential-energy-per-atom.source-value%22%3A+1%7D+%7D%2C%0D%0A%7B%22%24group%22%3A+%7B%22_id%22%3A+%7B%22model%22%3A+%22%24meta.subject.kimcode%22%7D%2C%0D%0A++++++++++++%22name%22%3A+%7B%22%24first%22%3A+%22%24prototype-label.source-value%22%7D%2C%0D%0A++++++++++++%22energy%22%3A+%7B%22%24first%22%3A+%22%24binding-potential-energy-per-atom.source-value%22%7D%0D%0A++++++++%7D%0D%0A++++%7D%0D%0A%5D

Python

result = requests.post("https://query.openkim.org/api",data={'database': 'data', 'query': '{"meta.type":"tr"}', 'aggregate': '[{"$match" : \r\n        {"$and": [\r\n            {"property-id": "tag:staff@noreply.openkim.org,2023-02-21:property/binding-energy-crystal"},\r\n            {"stoichiometric-species.source-value": {"$eq": "Si", "$size": 1}},\r\n            {"meta.type": "tr"}]}},\r\n{"$project": {"meta.subject.kimcode": 1,\r\n            "prototype-label.source-value": 1,\r\n            "binding-potential-energy-per-atom.source-value": 1}},\r\n{"$sort": {"meta.subject.kimcode": 1, "binding-potential-energy-per-atom.source-value": 1} },\r\n{"$group": {"_id": {"model": "$meta.subject.kimcode"},\r\n            "name": {"$first": "$prototype-label.source-value"},\r\n            "energy": {"$first": "$binding-potential-energy-per-atom.source-value"}\r\n        }\r\n    }\r\n]'}).json()

d3

d3.json('https://query.openkim.org/api?database=data&query=%7B%22meta.type%22%3A%22tr%22%7D&aggregate=%5B%7B%22%24match%22+%3A+%0D%0A++++++++%7B%22%24and%22%3A+%5B%0D%0A++++++++++++%7B%22property-id%22%3A+%22tag%3Astaff%40noreply.openkim.org%2C2023-02-21%3Aproperty%2Fbinding-energy-crystal%22%7D%2C%0D%0A++++++++++++%7B%22stoichiometric-species.source-value%22%3A+%7B%22%24eq%22%3A+%22Si%22%2C+%22%24size%22%3A+1%7D%7D%2C%0D%0A++++++++++++%7B%22meta.type%22%3A+%22tr%22%7D%5D%7D%7D%2C%0D%0A%7B%22%24project%22%3A+%7B%22meta.subject.kimcode%22%3A+1%2C%0D%0A++++++++++++%22prototype-label.source-value%22%3A+1%2C%0D%0A++++++++++++%22binding-potential-energy-per-atom.source-value%22%3A+1%7D%7D%2C%0D%0A%7B%22%24sort%22%3A+%7B%22meta.subject.kimcode%22%3A+1%2C+%22binding-potential-energy-per-atom.source-value%22%3A+1%7D+%7D%2C%0D%0A%7B%22%24group%22%3A+%7B%22_id%22%3A+%7B%22model%22%3A+%22%24meta.subject.kimcode%22%7D%2C%0D%0A++++++++++++%22name%22%3A+%7B%22%24first%22%3A+%22%24prototype-label.source-value%22%7D%2C%0D%0A++++++++++++%22energy%22%3A+%7B%22%24first%22%3A+%22%24binding-potential-energy-per-atom.source-value%22%7D%0D%0A++++++++%7D%0D%0A++++%7D%0D%0A%5D')

jQuery

$.post("https://query.openkim.org/api",{"database": "data", "query": "{\"meta.type\":\"tr\"}", "aggregate": "[{\"$match\" : \r\n        {\"$and\": [\r\n            {\"property-id\": \"tag:staff@noreply.openkim.org,2023-02-21:property/binding-energy-crystal\"},\r\n            {\"stoichiometric-species.source-value\": {\"$eq\": \"Si\", \"$size\": 1}},\r\n            {\"meta.type\": \"tr\"}]}},\r\n{\"$project\": {\"meta.subject.kimcode\": 1,\r\n            \"prototype-label.source-value\": 1,\r\n            \"binding-potential-energy-per-atom.source-value\": 1}},\r\n{\"$sort\": {\"meta.subject.kimcode\": 1, \"binding-potential-energy-per-atom.source-value\": 1} },\r\n{\"$group\": {\"_id\": {\"model\": \"$meta.subject.kimcode\"},\r\n            \"name\": {\"$first\": \"$prototype-label.source-value\"},\r\n            \"energy\": {\"$first\": \"$binding-potential-energy-per-atom.source-value\"}\r\n        }\r\n    }\r\n]"});

pipeline.stdin.tpl

@< query({"database": "data", "query": {"meta.type": "tr"}, "aggregate": [{"$match": {"$and": [{"property-id": "tag:staff@noreply.openkim.org,2023-02-21:property/binding-energy-crystal"}, {"stoichiometric-species.source-value": {"$eq": "Si", "$size": 1}}, {"meta.type": "tr"}]}}, {"$project": {"meta.subject.kimcode": 1, "prototype-label.source-value": 1, "binding-potential-energy-per-atom.source-value": 1}}, {"$sort": {"meta.subject.kimcode": 1, "binding-potential-energy-per-atom.source-value": 1}}, {"$group": {"_id": {"model": "$meta.subject.kimcode"}, "name": {"$first": "$prototype-label.source-value"}, "energy": {"$first": "$binding-potential-energy-per-atom.source-value"}}}]}) >@