`SummaryRester.search` does not support formulae for `chemsys` any longer?
e-kwsm opened this issue · 2 comments
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
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?
Yes, it should specify that only formula
will accept single formula entries.
The same goes for the followings?
api/mp_api/client/routes/molecules/bonds.py
Lines 58 to 59 in 47fc608
api/mp_api/client/routes/molecules/molecules.py
Lines 122 to 123 in 47fc608
api/mp_api/client/routes/molecules/orbitals.py
Lines 87 to 88 in 47fc608
api/mp_api/client/routes/molecules/partial_charges.py
Lines 52 to 53 in 47fc608
api/mp_api/client/routes/molecules/partial_spins.py
Lines 52 to 53 in 47fc608
api/mp_api/client/routes/molecules/redox.py
Lines 60 to 61 in 47fc608
api/mp_api/client/routes/molecules/summary.py
Lines 54 to 55 in 47fc608
api/mp_api/client/routes/molecules/thermo.py
Lines 82 to 83 in 47fc608
api/mp_api/client/routes/molecules/vibrations.py
Lines 67 to 68 in 47fc608