Hi,
When I search for Pr on materials project, all materials have energy above hull greater than 0.
When I do this api query, I get the same
el = 'Pr'
with MPRester() as mpr:
docs = mpr.materials.summary.search(
elements=[el],
num_elements=1,
is_stable=True,
)
assert len(docs) == 1, f"Expected 1 summary document for {el}, got {len(docs)}"
I believe this is not expected behaviour, sorry if it is.
Best wishes,
Tom
Thanks for catching this, @Thomas_Warford. This looks like an unintentional effect of the mixing scheme used to align the (already mixed+corrected) PBE GGA/+U hulls and the r2SCAN hull:
from mp_api.client import MPRester
with MPRester() as mpr:
thermo_docs = {
k : mpr.materials.thermo.search(chemsys = ["Pr"],thermo_types=[k])
for k in ("R2SCAN", "GGA_GGA+U_R2SCAN")
}
by_ehull = {
k : sorted(v, key = lambda doc : doc.energy_above_hull) for k, v in thermo_docs.items()
}
print(f"r2SCAN only hull ({by_ehull["R2SCAN"][0].material_id}): {by_ehull["R2SCAN"][0].energy_above_hull}")
print(f"Default MP hull ({by_ehull["GGA_GGA+U_R2SCAN"][0].material_id}): {by_ehull["GGA_GGA+U_R2SCAN"][0].energy_above_hull}")
>>> r2SCAN only hull (mp-97): 0.0
>>> Default MP hull (mp-97): 0.008044545
Which tells us that internally (the calculations without any corrections) the thermodynamic hulls make sense, but something is going wrong in the corrections.
We’ll be transitioning to r2SCAN-only data (without any corrections) so this shouldn’t be an issue, but I’ll look into why this is happening in the meantime
1 Like