Skip to content

SummaryRester.search does not support formulae for chemsys any longer? #859

@e-kwsm

Description

@e-kwsm

mp-api version: 0.37.5

According to the docstring of SummaryRester.search, chemsys argument may be formulae.

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions