I want to determine if these materials exist in the MP database based on the chemical formula, and secondly, if they do, I want to extract the mechanical properties of the structures with the smallest Ehull or the cubic space group, and finally form a dataframe. Does anyone have any suggestions? Thank you very much.
You should be able to search summary data. Below is an example search using a single formula and space group for the Voigt-Reuss-Hill bulk modulus:
from mp_api.client import MPRester
with MPRester("your_api_key") as mpr:
docs = mpr.summary.search(formula=["CaInBr3"], spacegroup_symbol="Cmcm", fields=["material_id", "structure", "k_vrh"])