-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
mp-api version: 0.37.5
According to the docstring of SummaryRester.search
, chemsys
argument may be formulae.
api/mp_api/client/routes/materials/summary.py
Lines 93 to 94 in 47fc608
chemsys (str, List[str]): A chemical system, list of chemical systems | |
(e.g., Li-Fe-O, Si-*, [Si-O, Li-Fe-P]), or single formula (e.g., Fe2O3, Si*). |
However it does not work—the following prints 0 26
:
import warnings
from pymatgen.ext.matproj import MPRester
warnings.filterwarnings("ignore")
MP_API_KEY = ... # key for new API
with MPRester(MP_API_KEY) as mpr:
r_c = mpr.summary.search(chemsys="Fe2O3")
r_f = mpr.summary.search(formula="Fe2O3")
print(len(r_c), len(r_f)) # 0 26
# chemical system works as expected
r_c_cs = mpr.summary.search(chemsys="Fe-O")
# print(len(r_c_cs)) # 136
Is the docstring outdated?
Metadata
Metadata
Assignees
Labels
No labels