Repository navigation
Conversation
Collaborator
|
Thanks for pointing this out @kavanase |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1545 +/- ##
==========================================
+ Coverage 85.37% 85.38% +0.01%
==========================================
Files 216 216
Lines 17793 17793
==========================================
+ Hits 15190 15192 +2
+ Misses 2603 2601 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ThermoDoc.from_entriespicks the entry to use for a material usingentry_quality_scores = {"GGA": 1, "GGA+U": 2, "SCAN": 3, "r2SCAN": 4}(i.e.RunTypevalues), but looked the scores up withentry.data["run_type"]. In MP's corrected entries that field holdsBlessedCalcsfield names (GGA,GGA_U,R2SCAN; the legacy corrected-entries builder sets it from theMaterialsDoc.entrieskeys, and the new one compares it to"R2SCAN"), so GGA+U and r2SCAN entries scored 0 and GGA entries 1:in each case is the GGA+U one.
This only matters when a material has more than one entry, i.e. when the GGA(+U)/r2SCAN mixing scheme keeps
both its GGA(+U) and r2SCAN entries. The thermo doc, and so the summary doc and website, then reports the
GGA(+U) entry. It is also why rutile TiO2 (mp-2657) showed 0.0436 eV/atom (its GGA entry) rather than 0.0095
(r2SCAN) before DB
2026.09.28.This PR uses
entry.parameters["run_type"]instead, which holds the actualRunTypevalues, and whichfrom_entriesalready uses forenergy_typeand theentrieskeys. The r2SCAN key has mismatched since26be1b9 (Sep 2024, "R2SCAN" -> "r2SCAN"), and GGA+U since
BlessedCalcs(#880).Effect on current data (DB 2026.09.28) (with help from Claude)
Rebuilding thermo docs from MP's served phase diagrams with and without this change, the only docs that
change are those of materials with two entries, all now reporting their r2SCAN entry (EaH in eV/atom):
Materials with a single entry don't change. In
GGA_GGA+Udocs, a material with both a GGA and a GGA+U entrynow reports the GGA+U one, as the scores intend; the one case found (in ~87k docs sampled) is mp-15590
(Sr2Nb2O7), whose "GGA+U" entry has no U values and the same energy, so only
energy_typeand provenancechange.
Not fixed here: why these materials have two entries in the mixed phase diagrams, which is down to the
mixing scheme's structure grouping in pymatgen (
MaterialsProjectDFTMixingScheme).Contributor Checklist
- [ ] I have broken down my PR scope into the following TODO tasks~~ - [ ] task 1~~
~~ - [ ] task 2~~