How can i use mpr.summary.search for filtering out the data for this in jupyter notebook. I am unable to use nelements, and also has_props=bandstructure not working.
or is there anyway to exclude more than 20 elements on the site itself.
Hi @bhavuk,
Here is a code snippet to do what you want:
from mp_api.client import MPRester
from emmet.core.summary import HasProps
with MPRester("your_api_key") as mpr:
exclude_eles = ["H", "Rb", "Cs", "Be",
"Mn", "Tc", "Re", "Fe",
"Ru", "Os", "Co", "Rh",
"Ir", "Ni", "Pd", "Pt",
"Ag", "Au", "Cd", "Hg"]
docs = mpr.summary.search(num_elements=3,
is_gap_direct=True,
exclude_elements=exclude_eles,
has_props=[HasProps.bandstructure],
fields=["material_id"])
– Jason
Thanks Jason for the help.