Retrieving GGA energy_above_hull, rather than r2scan with mpr

I’m part of a team working with a material that is stable. In the legacy Materials Project it is on the convex hull and this works for what we see, but in the new version it is more that 90 meV above the hull. Now I’m looking for compatible systems but we would rather stick to the old data. Here is the code I am using right now to search for other stable systems (below). Could someone please help me modify for it to work with the old GGA data?

Many thanks, Lee

with MPRester(API_KEY) as mpr:
docs = mpr.summary.search(crystal_system=“Hexagonal”, fields=[“material_id”, “energy_above_hull”])

@Lee1 currently we by default serve up the mixed GGA/GGA+U/r2SCAN hull. If you would like the previous GGA/GGA+U only hull you can query for it with the thermo endpoint as such:

with MPRester(API_KEY) as mpr:
    docs = mpr.materials.thermo.search(material_ids=LIST_OF_RELEVANT_MPIDS, 
                                       thermo_types=["GGA_GGA+U"])

– Jason

Dear Munrojm, thank you for your reply. I’m sorry I’m getting the error “AttributeError: ‘MaterialsRester’ object has no attribute ‘thermo’” when I run this code. Do you have another suggestion?

You may have to update mp-api (pip install mp-api --upgrade). Do you know which version you are running?

– Jason

thank you its working now!
Best
Lee

1 Like

I’m sorry @munrojm, I’m still not getting the result I expected.

If you look on the legacy materials project here you see an energy above hull of zero:

if you look at the new materials project here you see an energy above hull of 0.09 eV

When I run the code you suggested for this MPID, I get a returned “energy_above_hull=0.09071444863636202”. which is from the dataset I’m trying to avoid. Do you have any other suggestions?

Best,
Lee