api
api copied to clipboard
New API client for the Materials Project
- [x] `surface_properties` moved to atlas - [x] Surface properties endpoint added - [x] `wulff` moved to atlas - [x] Wulff endpoint added
- [ ] An endpoint to return either (a) BibTeX strings or (b) formatted references for a given mp-id (see `MPRester.get_materials_id_references` - [ ] Return DOIs for references - [...
- [ ] Collection moved to atlas - [ ] Endpoint added
### Code snippet ```python # given some task id: task_id = "mp-1805669" # used to be able to do this with MPRester(MP_API_KEY, monty_decode=deserialize) as mpr: results = mpr.materials.search(task_ids=[task_id]) assert len(results)...
### Code snippet ```python from mp_api.client import MPRester with MPRester(use_document_model=False) as mpr: bs = mpr.get_bandstructure_by_material_id("mp-23") ``` ### What happened? I am attempting to get the bandstructure of a material using...
### Code snippet ```python from mp_api.client import MPRester with MPRester(api_key) as mpr: docs = mpr.molecules.summary.search() ``` ### What happened? I am attempting to get molecules from API using the attached...
### Problem I would like to cache the results of API calls, as documented as point 4 in https://docs.materialsproject.org/downloading-data/using-the-api/tips-for-large-downloads When I try the call `mpr.get_entries(["Si-O"], additional_criteria=dict(energy_above_hull=(None, 0.001)), compatible_only=True)` I get...
### Code snippet ```python # new API: with MPRester("new_MP_API_key") as mpr: Cd_Te_PD_docs = mpr.materials.summary.search(chemsys="Cd-Te") print(len(Cd_Te_PD_docs)) # should be 23, returns 11 ``` ### What happened? Related to the bug report...
### Code snippet ```python mpr.get_entries({"e_above_hull": {"$lte": 0.001}}, compatible_only=True) ``` ### What happened? I'm porting some old code to the new API, but ended up on an error from within mp_api....