Extracting battery explorer data using MPRester

Hello,

Using the new API I cannot work out how to extract battery data from the MP battery explorer database, as there is no relevant endpoint and nor can I find any relevant documentation. I am hoping to extract a large amount of data dependent on general formula, so extracting using mp_id is not useful in my case.

Any help would be much appreciated. Thanks.

Hi @gplant,

You can use the insertion electrodes search method. You can pass formula, and set a list of fields you want with fields. For example:


from mp_api.client import MPRester

with MPRester("your_api_key") as mpr:
    docs = mpr.insertion_electrodes.search(formula="CoO2", fields=["stability_charge"])

– Jason

1 Like

Thank you Jason. Other than “formula”, what else can be passed to select electrode materials?

Thanks,
George

@gplant, you can see all of the input parameters in the docstring or by taking a look at the code: api/electrodes.py at 9dc27dcb2fd528e985bd99aa512d382bd5babccc · materialsproject/api · GitHub

– Jason

1 Like

Hi jason,

I am now trying to extract the values of space group number for each of the compounds found in the insertion electrodes endpoint. As far as I can tell, I can only extract space group number via summary.search() - could you advise how I could get these for the just insertion electrodes compunds?

Thanks

Hi @gplant,

Sorry for the late reply. I would advise you to extract the material_id values for the compounds from the insertion electrode data, compile a list, and then pass that list to MPRester.summary.search as material_ids=<<your list>> asking for the symmetry data.

– Jason

Thread closed due to inactivity, please open a new thread to address related issues.