api
api copied to clipboard
New API client for the Materials Project
When I retrieve task mp-1591459 via the API using ```python task_id = "mp-1591459" with MPRester(api_key) as mpr: task_result = mpr.materials.tasks.get_data_by_id(task_id).dict() print(task_result) ``` and check the output for "NSCF", I get...
-------------script starts------------------- from mp_api.client import MPRester mpr = MPRester("32-digit API key") entries = mpr.get_entries("mp-546794", inc_structure=None, property_data=["material_id", "composition", "energy_above_hull"], #sort_by_e_above_hull=True, additional_criteria={"thermo_types": ["GGA_GGA+U"]}) -------------script ends------------------- The above script returned the entry of...
### Problem The only place where task IDs are mentioned in the docs, https://docs.materialsproject.org/downloading-data/using-the-api/examples#calculation-task-ids-and-types-for-silicon-mp-149, seems to refer to a no-longer existing field type, which appear to be ``` fields ['builder_meta',...
### Problem with MPRester("API_KEY") as mpr: docs = mpr.materials.summary.search(material_ids=['mp-66'],fields=['elements','k_vrh','g_vrh','band_gap']) i = docs[0] print(i.elements) print(i.band_gap) Result: [Element C] 4.1145 But add it after the code: print(i.k_vrh) Result: File "/home/jh/mp/test.py", line 22,...
mp-api version: 0.37.5 According to the docstring of `SummaryRester.search`, `chemsys` argument may be formulae. https://github.com/materialsproject/api/blob/47fc6087da8253f55adb101b5df3251b6347b2ac/mp_api/client/routes/materials/summary.py#L93-L94 However it does not work—the following prints `0 26`: ```python import warnings from pymatgen.ext.matproj import...
``` from mp_api.client import MPRester mpr = MPRester(api_key) all_entries = mpr.get_entries('mp-2858') ``` This will yield two R2SCAN entries and one GGA entry. The two R2SCAN entries seem to be identical....
Hello, I've noticed recently that when using summary.search, that some entries in the return data structure are not correct when compared to the website. `mp_result = mpr.materials.summary.search(chemsys='Mg', energy_above_hull=(0., .5), num_sites=(0,...
### Email (Optional) _No response_ ### Version v0.35.1 ### Which OS(es) are you using? - [ ] MacOS - [X] Windows - [ ] Linux ### What happened? The MPRester.get_entries...
**Describe the bug** When `from pymatgen.ext.matproj import MPRester`, the following errors occur: ``` TypeError: issubclass() arg 1 must be a class ``` **To Reproduce** It can be reproduced in a...
### Email (Optional) _No response_ ### Version 0.33.3 ### Which OS(es) are you using? - [ ] MacOS - [ ] Windows - [X] Linux ### What happened? I am...