materialsproject / mapidoc

Public repo for Materials API documentation
BSD 3-Clause "New" or "Revised" License
139 stars 63 forks source link

Retrieving only entries that match experimentally-determined crystal structure. #26

Closed fedeotto closed 2 years ago

fedeotto commented 2 years ago

Hello,

I'm trying to find in the documentation a way to query all entries that match experimentally-determined crystal structure. I'm interested in band gap and formation energy, and made a query like this:

with MPRester("api_key") as mpr:

    entries= mpr.query(criteria = {"band_gap" : {"$gt":0.5}}, properties = ["band_gap", "formation_energy_per_atom"])

Is it possible to add something in the above code to fulfil my request?

Many thanks

tschaume commented 2 years ago

Please search the MP forum or post your question there if it hasn't been asked before. Thanks!