api icon indicating copy to clipboard operation
api copied to clipboard

More criteria for substrate search

Open goodwilling opened this issue 10 months ago • 1 comments

I am using the following code to search all substrates which are stable and commonly used.

from emmet.core.summary import HasProps from mp_api.client import MPRester

with MPRester() as mpr:
    docs = mpr.materials.summary.search(
        has_props=[HasProps.substrates], fields=["structure", "material_id"], 
        energy_above_hull=(0, 0), exclude_elements=rare_earth_elements
    )
    substrates = [doc.structure for doc in docs]

The above search gives 13783 substrates. After a long time of lattice matching, there are far too many suggested substrates for a given structure, compared with those from mpr.substrates.search by the material ID.

How can we get the same list of suggested substrates for a given structure, compared to the search using the material ID? I wonder if we can use more criteria on the substrate search for this purpose. Thank you very much.

goodwilling avatar Mar 14 '25 09:03 goodwilling

The website uses the following to retrieve a list of substrates for a material ID:

mpr.materials.substrates.search(film_id=<material-id>)

Does that help?

tschaume avatar Mar 14 '25 18:03 tschaume

Thanks for the suggestion to retrieve a list of substrates for a material ID.

I wonder what method can be used to retrieve a list of substrates for a given local structure other than a material ID. Thank you.

goodwilling avatar Apr 25 '25 02:04 goodwilling

Please see these docs for all the parameters available in the substrates search. HTH

tschaume avatar Apr 25 '25 20:04 tschaume