Introduction

The advent of large databases of computed material properties, such as the Materials Project1, AFLOW2, the Open Quantum Materials Database (OQMD)3,4, and the Joint Automated Repository for Various Integrated Simulations (JARVIS)5, has paved the way for a new era of data-driven materials science6. These databases now contain computed properties derived from millions of individual calculations, the vast majority of which employ density functional theory (DFT) due to its efficient compromise between computational cost and accuracy. For example, the Materials Project1 contains computed formation energies for more than 140,000 materials calculated using the Perdew–Burke–Ernzerhof (PBE)7 generalized gradient approximation (GGA)8 functional, with a Hubbard U, value9,10 and empirical energy corrections11 applied to some chemical systems. This data is widely used in machine learning and computational materials screening efforts in which the thermodynamic (meta)stablility of a material is often among the first selection criteria12.

Despite its versatility and historical success, PBE has well-documented systematic errors related to electron self-interaction13,14 that are particularly notable in diatomic gases15,16 and transition metal compounds with localized electronic states1,16,17. PBE also fails to capture medium- and long-range dispersion interactions18, which are important for describing the properties of weakly-bound systems. Even when adjusted using empirical correction schemes, the mean absolute error (MAE) in formation energies predicted by this level of theory is still on the order of 50–200 meV per atom11,15,16,19,20,21,22,23, although the error in energy differences among polymorphs is typically lower (e.g., 25 meV per atom)24.

Today, more than a decade after most materials databases were established6, theoretical advances and growth in computing power have made it feasible to compute large numbers of formation energies at higher levels of theory19, which could substantially increase their accuracy. For example, we recently showed that the restored-regularized Strongly Constrained and Appropriately Normed (r2SCAN) meta-GGA functional25 reduced the error in predicted formation energies of strongly-bound and weakly-bound materials by 50% and 15%, respectively, compared to the PBEsol26 GGA functional, while simultaneously exhibiting reliable convergence19. The original SCAN functional27 on which it is based has also been shown to predict volumes, lattice constants, and ground-state structures of many materials more accurately than PBE23,28,29,30,31,32.

Carrying out enough higher-fidelity calculations to comprehensively cover technologically-relevant chemical spaces, as is required for the construction of compositional phase diagrams and the discovery of new structure–property relationships, could clearly benefit the many materials discovery efforts that depend on such data. However, replacing all of the existing lower-fidelity (GGA) calculations in large materials databases with higher-fidelity (e.g., meta-GGA) calculations would consume an enormous amount of energy and computing time, since SCAN and r2SCAN, for example, have 4–5× the computational cost of PBE19,23,33. Even if resources were unlimited, there is likely to be little benefit in recomputing materials that are highly unstable (i.e., far from the convex energy hull), since predicting (meta)stability is often of primary importance. Furthermore, meta-GGA calculations will not improve formation energy predictions to an equal extent for all materials. For example, SCAN has been shown to be slightly less accurate than PBE in predicting the formation energies of weakly-bound materials (e.g., intermetallics23), and r2SCAN improves the predictions for these materials to a much lesser extent than for strongly-bound materials19.

Therefore, instead of recomputing materials en masse, higher-fidelity calculations should be targeted at the materials for which they are likely to improve the accuracy of the phase diagrams the most (e.g., strongly-bound materials, materials close to the convex energy hull). Adopting this strategy will economize future use of resources and preserve the massive investment embodied in existing lower-fidelity calculations. Notably, however, such an approach will require phase stability predictions to be based on a mixture of formation energies computed at different levels of theory. The most straightforward way to systematically improve upon GGA phase diagrams in a high-throughput manner, which we refer to here as “naive mixing”, is simply to build each phase diagram using formation energies from lower-level calculations, and then replace them with higher-level calculations whenever they are available. However, as we will show, constructing mixed phase diagrams this way can result in severe distortions to the shape of the convex energy hull and dramatically worsen phase stability predictions.

As an alternative to naive mixing, we propose in this work a scheme to construct phase diagrams that mix calculations from different density functionals comprising a lower-fidelity, higher coverage, and a higher-fidelity, lower coverage set of calculations (here, PBE(+U) and r2SCAN) with minimal risk of distortion. By defining the reference state at each point in compositional space as the ground-state PBE(+U) structure, we build a framework in which energies from any two functionals can be mixed in a robust and scalable manner that preserves the shape of the convex hull. After presenting our mixing scheme, we assess how a transition from PBE(+U) to r2SCAN affects predicted polymorph stability and energy above hull by analyzing a set of ~33,900 r2SCAN calculations and discuss strategies for prioritizing r2SCAN calculations such that the mixed phase diagram most closely approximates the full r2SCAN phase diagram. We conclude by using our mixing scheme to analyze solid and aqueous phase stability in two example systems. The mixed phase diagrams presented in this work, along with the 33,000+ new r2SCAN calculations, are made publicly available in the Materials Project database1 to increase the accuracy of future computational material science efforts.

Theoretical framework for mixing formation energies from different functionals

Mixing rules

The computed energy of formation for a material, ΔHf, is defined with respect to the elements by10,20,22,34

$${{\Delta }}{H}_{f}^{{{{\rm{298K,DFT}}}}}\approx {E}^{{{{\rm{0K,DFT}}}}}-\mathop{\sum}\limits_{{{{\rm{el}}}}}{n}_{{{{\rm{el}}}}}{E}_{{{{\rm{el}}}}}^{{{{\rm{0K,DFT}}}}}$$
(1)

where E0K,DFT is the total electronic energy computed from DFT at 0 K, subscript ‘el’ represents each of the constituent elements in the material, and n are stoichiometric coefficients. We note that E can include empirical corrections and that this formulation assumes that differences in finite-temperature enthalpy between materials are negligible. Electronic energies E are not intrinsically meaningful, and their energy scales differ substantially among functionals for the same material. However, the differences in electronic energy among materials and elements, and hence the value of ΔHf, define a consistent, physically-meaningful quantity that can be compared among different levels of theory.

In this manuscript, we consider mixing PBE(+U) and r2SCAN calculations; although the scheme we present here can be used to mix energies from any two functionals. Note that we use ‘PBE(+U)’ to refer to the mixture of empirically-corrected PBE and PBE+U calculations that currently populate the Materials Project Database. Specifically, the Materials Project uses PBE for all materials except those containing Co, Cr, Fe, Mn, Mo, Ni, V, and W, which are calculated with a Hubbard U value (See https://docs.materialsproject.org/methodology/gga-plus-u/). These calculations are combined using the mixing scheme of Jain et al.10 to yield a consistent set of formation energies. In this work, we use this combination of adjusted PBE and PBE+U GGA calculations as our high-coverage, low-fidelity set of calculations, while ‘r2SCAN’ denotes unadjusted meta-GGA energies that comprise the low-coverage, higher-fidelity calculations. Additional details regarding the computational methods for each calculation type are provided in the Methods section.

As noted in the Introduction, the most straightforward approach to constructing mixed r2SCAN/PBE(+U) phase diagrams is ‘naive mixing’, where we simply replace PBE(+U) formation energies with r2SCAN formation energies whenever r2SCAN calculations are available, while using PBE(+U) formation energies everywhere else. There are two drawbacks to naive mixing. First, in chemical systems where r2SCAN predicts significantly smaller or larger formation energies than PBE(+U) for most compounds, inserting a single r2SCAN formation energy onto a PBE(+U) phase diagram can either cause that single phase to move off the hull (if \({{\Delta }}{H}_{f}^{{{{{\rm{r}}}}}^{2}{{{\rm{SCAN}}}}}\gg {{\Delta }}{H}_{f}^{{{{\rm{PBE}}}}(+U)}\)), or cause adjacent phases to disappear from the hull (if \({{\Delta }}{H}_{f}^{{{{{\rm{r}}}}}^{2}{{{\rm{SCAN}}}}}\ll {{\Delta }}{H}_{f}^{{{{\rm{PBE}}}}(+U)}\)), when neither would occur on a full r2SCAN phase diagram. Second, in many cases, r2SCAN stabilizes a different ground-state structure for the elements than PBE(+U) (see Supplementary Note 2). Naive mixing of formation energies in chemical systems containing one of these elements is not rigorously consistent, because the formation energies are being referenced to different structures.

To circumvent these issues, we build our mixing scheme by considering all electronic energies to be the sum of a reference energy and a relative energy. We define the reference energy, Eref, for each functional as the electronic energy of the PBE(+U) ground-state structure at each point in compositional space. The energy of any material in either functional may then be expressed as a difference, ΔEref, relative to the corresponding reference energy. Formation energies are calculated in the usual manner by subtracting the electronic energies of elemental endpoints in each respective functional. Note, however, that ΔEref is calculated directly from the difference in polymorph energies, and hence does not depend on the energies of the elemental endpoints. Our mixing scheme is similar in spirit to the previous GGA/GGA+U mixing scheme as well as the combined computational–experimental Pourbaix diagrams of the Materials Project10,35, but extends these approaches to be applicable to any two functionals without relying on pre-fitted energy correction parameters.

Using this framework, we propose two ‘mixing rules’ that define our scheme for constructing mixed r2SCAN/PBE(+U) phase diagrams. These mixing rules are summarized schematically in Fig. 1 and briefly elaborated below. In sections that follow, we will illustrate each rule with an example.

  1. 1.

    Beginning with a PBE(+U) convex energy hull, replace PBE(+U) energies with r2SCAN energies by adding their ΔEref to the corresponding PBE(+U) reference energy.

  2. 2.

    Construct the convex energy hull using \({{\Delta }}{H}_{f}^{{{{\rm{{r}}}^{2}SCAN}}}\) only when there are r2SCAN calculations corresponding to every reference structure (every PBE(+U) stable structure). In this case, add any missing PBE(+U) materials by adding their ΔEref to the corresponding r2SCAN reference energy.

Fig. 1: Rules for mixing PBE(+U) (blue) and r2SCAN (red) energies onto a single phase diagram.
figure 1

Left r2SCAN energies can be placed onto a PBE(+U) hull by referencing them to the r2SCAN energy of the PBE(+U) ground state via ΔEref. In the diagram, A, B, C, and D represent different polymorphs at a single composition, and polymorph A is the PBE(+U) ground state. \({E}_{{{{\rm{ref}}}}}^{{{{\rm{PBE}}}}+(U)}\) and \({E}_{{{{\rm{ref}}}}}^{{{{{\rm{r}}}}}^{2}{{{\rm{SCAN}}}}}\) are the electronic (DFT) energies of polymorph A in the two functionals. PBE(+U) energies of polymorphs that also exist in r2SCAN (e.g., polymorphs B and C) are removed. Right The convex hull is built with r2SCAN formation energies only when there are r2SCAN calculations for every PBE(+U) ground state.

Rule #1 provides a means to introduce r2SCAN energies onto PBE(+U) phase diagrams when r2SCAN calculations are only available for one or a few compositions. In Fig. 1, polymorph A represents the reference structure (PBE(+U) ground state). Since the reference structure is, by definition, on the PBE(+U) hull, the electronic energy of the r2SCAN relaxed structure corresponding to this reference structure (as determined by the pymatgen36 StructureMatcher algorithm) is adjusted to match \({E}_{{{{\rm{ref}}}}}^{{{{\rm{PBE}}}}(+U)}\), thereby guaranteeing it will be on the PBE(+U) hull with a formation energy equal to \({{\Delta }}{H}_{f}^{{{{\rm{PBE(+U)}}}}}\). Electronic energies of Polymorphs B and C, calculated in r2SCAN, are adjusted to maintain their energy difference with respect to the reference structure, ΔEref. For example, if polymorph C is 10 meV per atom higher in energy than polymorph A in r2SCAN, its energy would be adjusted to \({E}_{{{{\rm{ref}}}}}^{{{{\rm{PBE}}}}(+U)}\) +10 meV per atom. It is also possible for this method to place a polymorph below the PBE(+U) hull. Polymorph B is unstable with respect to the reference structure in PBE(+U) but is lower in energy than the reference structure in r2SCAN. If it were 10 meV per atom lower than the reference structure in r2SCAN, its energy would be adjusted to \({E}_{{{{\rm{ref}}}}}^{{{{\rm{PBE}}}}(+U)}\) –10 meV per atom, placing it below the original (PBE(+U)) hull and slightly changing its shape. Finally, polymorphs that do not have a r2SCAN energy (such as polymorph D) maintain their energy with respect to the PBE(+U) hull.

When r2SCAN calculations become available for every reference state, then, by Rule #2, the convex hull is computed directly with r2SCAN formation energies (\({{\Delta }}{H}_{f}^{{{{\rm{{r}}}^{2}SCAN}}}\)). Now, any unstable PBE(+U) phases that have not been calculated in r2SCAN can be added to the diagram by adding their ΔEref to the \({{\Delta }}{H}_{f}^{{{{{\rm{r}}}}}^{2}{{{\rm{SCAN}}}}}\) of the corresponding reference structure. This preserves the energy differences between the unstable PBE(+U) phases and the corresponding PBE(+U) ground state, whose formation energy has now been replaced with an r2SCAN value. In other words, we invert Rule #1 so that r2SCAN structures become the reference structures.

Note that a central assumption of our mixing scheme is that r2SCAN energies are always preferable to PBE(+U) energies. This assumption is well-justified by the generally superior accuracy of SCAN and r2SCAN formation energies reported in many studies19,23,28,29,30,31,32. In general, the application of our mixing scheme should be restricted to pairs of functionals where one has an a priori reason to prefer one energy over another. The scheme should also only be used when the lower-fidelity calculations make reasonably accurate predictions about the size and shape of the convex energy hull. If this is not the case, the lower-fidelity phase diagram will not be accurate enough to use in the first place and there is no need for a mixing scheme. Finally, we note that in principle it is possible to use our framework to mix energies from more than two functionals, provided that reference energies are available within each functional and that a clear hierarchy can be established among them.

Mixed diagrams for relative polymorph stability (Rule #1)

We illustrate the motivation behind Rules #1 and 2 using the Sn–Br phase diagram, which is shown in Fig. 2. In general, when constructing phase diagrams we seek to determine 1) the shape of the convex energy hull (i.e., stable compositions and their formation energies), and 2) the stable polymorph at each composition. Figure 2a and b compare the Sn–Br phase diagram with the formation energy of all phases calculated in PBE(+U) and r2SCAN, respectively, and show that the accuracy of both aspects is improved by r2SCAN. PBE(+U) incorrectly predicts the ground-state polymorph of SnBr2 as rocksalt (spacegroup \(P\bar{3}m1\)) and overpredicts the magnitude of ΔHf as –1.136 eV per atom, whereas the experimental value is estimated at –0.84 to –0.92 eV per atom37 (indicated by the shaded band in Fig. 2). By contrast, r2SCAN correctly predicts the SnBr2 ground state as Pnma29 and makes a substantially more accurate prediction of its formation energy (−0.833 eV per atom).

Fig. 2: Sn–Br phase diagram constructed using different mixing strategies for PBE(+U) and r2SCAN calculations.
figure 2

a PBE(+U) only; b r2SCAN only; c naive mixing of formation energies, where all SnBr2 polymorphs are computed in r2SCAN and all other materials are in PBE; d the same set of energies as c, but employing our mixing scheme (Rule #2); e r2SCAN for all reference states (i.e., PBE(+U) ground states) and PBE(+U) for all other materials; f r2SCAN for all materials within 20 meV per atom of the PBE(+U) convex hull. The numerical value in parentheses indicates the energy above hull of the experimental ground state Pnma polymorph of SnBr2. The shaded blue regions represent the estimated range of experimental formation energies for SnBr237. Tabulated r2SCAN and PBE(+U) energies for all materials are available as Supplementary Data (see Supplementary Note 4).

As we have discussed, it is not always feasible to recompute an entire chemical system using r2SCAN (as we have done to construct Fig. 2b). When improving predictions of polymorph stability is a primary research objective, it makes sense to prioritize r2SCAN calculations for all known polymorphs at the composition of interest. However, if we were to apply this strategy to SnBr2 and replace all PBE(+U) formation energies of SnBr2 polymorphs with r2SCAN energies using naive mixing (Fig. 2c), SnBr2 would no longer be predicted as stable. This occurs because the entire hull is shallower (smaller magnitude of ΔHf) in r2SCAN than in PBE(+U), and hence using an r2SCAN formation energy for SnBr2 causes it to move off the hull. Instead, we must apply Rule #1 to make the r2SCAN energies compatible with the PBE(+U) hull. We do so by positioning r2SCAN formation energies relative to the PBE(+U) ground state polymorph (\(P\bar{3}m1\)), as shown in Fig. 2d. Because we maintain the energy differences relative to this reference energy, the correct polymorph is now stabilized.

Compared to naive mixing of formation energies, applying Rule #1 preserves the overall shape of the PBE(+U) convex hull while enabling improvement in phase stability predictions using as few as two r2SCAN calculations (one for the polymorph of interest and one for the reference structure). However, because r2SCAN stabilizes the Pnma polymorph instead of the \(P\bar{3}m1\) polymorph stabilized by PBE(+U), ΔHf is lowered (and made less accurate) by 37 meV per atom, which is the difference in energy between the \(P\bar{3}m1\) and Pnma polymorphs in r2SCAN. Hence, although use of Rule #1 for study of a single composition may yield more accurate relative polymorph energies, it carries the risk of making the magnitude of the formation energy slightly less accurate compared to a full r2SCAN phase diagram.

Mixed diagrams for formation energy (Rule #2)

When identifying stable compositions or predicting accurate formation energies is the primary research objective, it makes sense to prioritize recomputing all PBE(+U) ground states in r2SCAN, as shown in Fig. 2e. Applying Rule #2, this strategy allows the entire convex hull to be constructed using \({{\Delta }}{H}_{f}^{{{{\rm{{r}}}^{2}SCAN}}}\). Unstable PBE(+U) polymorphs are then positioned relative to the corresponding reference structures. Several unstable polymorphs of Sn that were mixed in this manner are visible in Fig. 2e.

In this chemical system, recomputing the hull when only the PBE(+U) ground states have been calculated in r2SCAN will still not recover the exact r2SCAN formation energy for SnBr2, because PBE(+U) stabilizes the incorrect ground state, and Rule #2 treats this incorrect ground state as the reference energy. Hence, the formation energy of SnBr2 predicted by the mixed phase diagram in Fig. 2e is too high by 37 meV per atom (the difference in energy between the \(P\bar{3}m1\) and Pnma polymorphs in r2SCAN).

Because there is no way to know a priori whether r2SCAN will stabilize a different ground state than PBE(+U), a more robust strategy is to compute all polymorphs within some tolerance of the PBE(+U) convex energy hull. Computing both ground states and slightly metastable polymorphs with r2SCAN makes it more likely that the shape of the convex energy hull in the mixed phase diagram will be identical to that in a full r2SCAN diagram. We apply this strategy in Fig. 2f, in which we mix r2SCAN energies for all materials within 20 meV per atom of the PBE(+U) hull, and use PBE(+U) energies for all other materials. The value of 20 meV per atom is motivated by analysis presented later (see Section “Definition of materials ‘close to the hull’”) indicating that materials with higher \({{\Delta }}{E}_{{{{\rm{hull}}}}}^{{{{\rm{PBE}}}}(+U)}\) are rarely stabilized by r2SCAN. With this strategy, the shape of the resulting energy hull (Fig. 2f) exactly matches that of the pure r2SCAN hull (Fig. 2b).

Comparing Fig. 2a, c, e illustrates the importance of Rule #2 when mixing r2SCAN and PBE(+U) calculations. Formation energies cannot be naively mixed without carrying a substantial risk of over- or under-stabilizing certain compositions. The convex energy hull must remain in PBE(+U) until there are r2SCAN calculation corresponding to every reference state. Even in that case, it is preferable to include slightly unstable polymorphs in order to achieve better accuracy in cases where r2SCAN stabilizes different polymorphs.

Practical considerations

Mixed diagrams for ternary and higher systems

Ternary or higher-dimensional chemical spaces present special challenges for mixing energies between functionals, because strict application of mixing rules #1 and #2 can introduce inconsistencies between the full phase diagrams and those of constituent subsystems. For example, consider a case in which all of the PBE(+U) ground states in chemical system A–B are computed in r2SCAN. According to Rule #2, the binary A–B phase diagram would be constructed using \({{\Delta }}{H}_{f}^{{{{\rm{{r}}}^{2}SCAN}}}\). This may result in different formation energies and/or predicted stable phases than the PBE(+U) phase diagram, as illustrated previously for the Sn–Br system. Now suppose that we wish to construct a ternary phase diagram for the A–B–C system, in which there are multiple ternary ground states that have not been computed in r2SCAN. Since the A–B–C system does not satisfy the requirements for Rule #2, we would construct this ternary phase diagram using \({{\Delta }}{H}_{f}^{{{{\rm{PBE}}}}(+U)}\). This could result in the ternary A–B–C diagram predicting different formation energies and/or stable phases in the A–B subsystem than the binary A–B diagram. Such inconsistency may be problematic depending on the use case. Note that if all reference energies in the full A–B–C system have been recomputed in r2SCAN, then strict application of the mixing rules will not result in any inconsistencies. However, due to the much larger number of ternary and higher materials (compared to binaries), it becomes progressively more difficult to recompute all the reference energies needed to apply Rule #2 as the size of the chemical system increases.

In cases where consistency between lower- and higher-dimension phase diagrams is essential, one may apply the mixing rules individually to each chemical subsystem, in order of increasing dimensionality. To continue the example above, Rule #1 and Rule #2 would be applied individually to each of the A–B, B–C, and A–C chemical systems. The ternary phase diagram would then be constructed by combining these pre-adjusted binary formation energies with PBE(+U) formation energies. An example of such a diagram is presented in Supplementary Fig. 9.

Applying the mixing scheme to binary subsystems before treating the ternary system amounts to a modified form of naive mixing because it involves directly combining formation energies obtained from PBE(+U) (for ternaries) with those calculated with r2SCAN for binaries, without considering whether r2SCAN energies are available for all ternary ground states. As such, mixed phase diagrams for high-dimensional chemical systems that are constructed in this manner should be used sparingly and interpreted with care. However, due to the inherently larger number of phases involved in higher-dimensional systems, we expect this modified form of naive mixing to be less likely to cause severe distortions of the hull compared to binary systems.

To test this hypothesis, we compared ternary phase stability predictions from ~6000 ternary phase diagrams computed in PBE(+U) to mixed versions constructed using \({{\Delta }}{H}_{f}^{{{{\rm{{r}}}^{2}SCAN}}}\) values for all binary subsystems and \({{\Delta }}{H}_{f}^{{{{\rm{PBE}}}}(+U)}\) for all ternary materials (see Supplementary Figs. 8 and 9). We evaluated how frequently these ‘edged’ diagrams either 1) destabilized a known experimental ternary phase (i.e., a phase reported in the Inorganic Crystal Structure Database38) that was stable in pure PBE(+U) or 2) stabilized a known experimental ternary phase that was unstable in pure PBE(+U). For the majority of chemical systems (83%), experimental ternary materials predicted stable by the pure PBE(+U) diagram remained so in the mixed phase diagram, while in another 14% of cases exactly one material was destabilized. Similarly, for 94% of chemical systems, experimental materials predicted unstable by the pure PBE(+U) diagram remain so in the mixed diagram, while for 6% of chemical systems exactly one unstable experimental material was stabilized (see Supplementary Fig. 8). Thus, although employing modified naive mixing (i.e., ‘edged’ phase diagrams) to achieve consistency between lower- and higher-dimensional phase diagrams carries a modest risk of destabilizing known experimental phases for some chemical systems, there are many other cases in which the mixed diagrams stabilize experimental phases that pure PBE(+U) does not. Altogether, these results suggest that modified naive mixing is unlikely to severely distort phase stability predictions for ternary or higher dimensional chemical systems.

Definition of materials ‘close to the hull’

In the previous section “Theoretical framework for mixing formation energies from different functionals” we observed that it is preferable to recompute not just PBE(+U) ground states, but also materials close to the convex energy hull in order to ensure that the mixed energy hull has the correct shape (compare Fig. 2e, f). This begs the question of how to define ‘close to the hull’. More specifically, we can rephrase the question as ‘how likely is r2SCAN to stabilize a material that is X meV per atom above the hull in PBE(+U)?’ For example, a material that is 500 meV per atom above hull in PBE(+U) will almost certainly not become stable in r2SCAN, but a material that is unstable by 3 meV per atom could (as was the case with Pnma SnBr2 in Fig. 2). Determining an appropriate threshold is necessary to properly target r2SCAN calculations.

To inform this question, in Supplementary Note 1 we evaluate the extent to which r2SCAN changes the energy above hull of unstable polymorphs. Examining approximately 7300 unstable materials with a PBE(+U) energy above hull of 50 meV per atom or less, we find that in 95% of cases, the energy above hull either increases or decreases by no more than 19 meV per atom (see Supplementary Fig. 1). This means that materials more than 19 meV per atom above the PBE(+U) hull would only be stabilized by r2SCAN in rare cases. Hence, we adopt a threshold of 20 meV per atom as our definition of ‘close to the hull’ for purposes of prioritizing calculations.

By way of comparison, we note that among 16 systems identified by Yang et al.29 in which SCAN stabilized the correct ground state and PBE(+U) did not, the energies above hull of the experimental ground states in PBE(+U) ranged from 2 to 50 meV per atom. Another study showed that SCAN mispredicted the ground states of TiO2 and FeS2, with misprediction on the order of 50 meV per atom as well39. Thus, although based on analysis of a large set of materials, our selection of 20 meV per atom as a safe threshold is not guaranteed to capture the r2SCAN ground state polymorph in every case. A higher threshold could certainly be chosen if greater confidence in capturing the correct ground states is required.

Failures of structure matching

In the Section “Mixing rules” we established the need to obtain r2SCAN energies of PBE(+U) ground states, which serve as reference energies for constructing mixed phase diagrams. To obtain the most accurate r2SCAN energies, we generally perform r2SCAN structure optimizations calculations and then use the pymatgen36 StructureMatcher algorithm to determine whether the r2SCAN-relaxed structure is the same (within tolerances) as the PBE(+U) starting structure.

In the vast majority of cases, the r2SCAN-relaxed structure and the PBE(+U) starting structure match, allowing us to use the r2SCAN energy as reference energy. However, in selected cases (some 1% of all materials we have computed thus far), r2SCAN will optimize to a structure that is no longer considered equivalent to the starting structure. This is especially common for the crystal structures of diatomic molecules (e.g., H2, Cl2, O2) in which the different treatment of short- and medium-range interactions by r2SCAN compared to PBE is particularly significant.

We address this issue in two ways. In some cases, manual inspection of the structures allows us to establish that they represent the same material, and hence that the r2SCAN energy can be used as a reference energy. However, manual inspection is not feasible for high-throughput work. Instead, we perform single-point calculations for any materials in which the r2SCAN-relaxed structure no longer matches the input structure. The r2SCAN single point calculation is guaranteed to match the corresponding PBE(+U)-optimized structure and provides an r2SCAN energy that can serve as a reference energy. Meanwhile, an r2SCAN optimization of the same structure (which may no longer be the same according to the StructureMatcher) is guaranteed to have a similar or lower energy than the single point and will be added to the hull at the correct position by application of Rule #1. Performing r2SCAN single points also provides a means of obtaining reference energies for large structures that would be impractical to optimize in r2SCAN within reasonable computational limits (see next Section).

Prioritizing r2SCAN calculations for maximum benefit

We conclude our discussion of practical considerations by considering the best strategy for prioritizing r2SCAN calculations, given that computational resources are limited and that its cost is still ~5× that of PBE19.

We can define several levels of "calculation coverage" (meaning, subsets of materials that have all been recomputed with r2SCAN, Fig. 3) based on the mixing rules we have established. In order to apply Mixing Rule #1, at least two r2SCAN optimizations at a single composition are needed: one for the PBE(+U) ground state and one for another polymorph. To apply Rule #2, we require r2SCAN energies for every PBE(+U) ground state or (ideally) every PBE(+U) material within 20 meV per atom of the hull. These energies are preferably obtained from structure optimizations, although as elaborated below, single-point calculations can be used in select cases, with the risk of a slightly less accurate hull shape. The pinnacle of calculation coverage (which may have less value than its computational cost, as noted in the Introduction) is full recomputation of all materials using r2SCAN.

Fig. 3: Strategies for prioritizing higher level calculations in large materials databases.
figure 3

Left different stages of calculation coverage. The first level enables application of Mixing Rule #1, while the second and third levels facilitate application of Rule #2. The fourth level (re-optimizing all materials with higher-level calculations) is not necessary. Right methods used by the Materials Project to pursue second- and third-level coverage of r2SCAN calculations. Optimizations of small, strongly-bound materials have the highest priority. single point calculations are used for large structures. Weakly-bound materials have lower priority. See Section “Prioritizing r2SCAN calculations for maximum benefit” for further details.

With a goal of achieving second- or third-level coverage, we can identify several strategies for prioritizing which materials to calculate in order to maximize the benefits of the mixing scheme for formation energy prediction. To do so, we classify materials close to the hull as (1) strongly- or weakly-bound and (2) small or large.

Previous studies19,23 established that SCAN and r2SCAN predict substantially more accurate formation energies than PBE or PBEsol for "strongly-bound" materials, i.e., materials whose PBE(+U)-predicted formation energy is lower than –1 eV per atom. The improvement in accuracy for weakly-bound materials is more modest. As such, creating mixed phase diagrams for strongly bound systems is likely to improve overall accuracy the most, and hence we assign higher priority to strongly-bound materials.

With respect to size, experience indicates that optimizations of large structures (e.g., larger than ~40 sites) with r2SCAN will often exceed typical maximum wall time limits at supercomputing centers (e.g., 48 hr). This is not to say optimization is impossible; rather, in a high-throughput computing context, it does not usually make sense to invest an excessive amount of computing nodes or wall time into a single material. As such, in these cases, we may perform single-point calculations in order to obtain reference energy (albeit a less accurate one) so that Rule #2 can be applied. Fully-optimized structures can be obtained as computational resources allow, and added into the mixed phase diagrams according to Rule #1. We emphasize that single-point calculations are only used in very limited cases as a practical necessity, and all r2SCAN energies presented herein are based on full optimizations rather than single points. In general, a formation energy derived from an r2SCAN single point energy cannot be assumed to be more accurate than one derived from a PBE(+U) relaxation; hence it is not advisable to rely exclusively on such calculations in order to apply the mixing scheme. However, phase diagrams of technologically-relevant chemical systems often contain many small structures and only a few large ones that are impractical to optimize with r2SCAN. In such cases, the use of single-point calculations for the large structures makes it possible to apply Rule #2 and build the convex energy hull using r2SCAN energies, which presumably offers an overall improvement in predictive accuracy for the chemical system that outweighs the possible loss of accuracy in the formation energy of the few large structures.

Examples

Application to a metastable ternary nitride system

As a practical example of our complete mixing scheme, we use it to investigate compound metastability in the ternary Zn–Sb–N system. Nitrides remain relatively unexplored compared to other chemical spaces, even though they exhibit the largest range of thermodynamically-accessible metastable states among inorganic materials40,41, which is thought to be a consequence of the large cohesive energy of metal-nitrogen bonds that kinetically traps metastable structures42. Compared to stable nitrides, metastable nitrides are more likely to contain metal cations in high oxidation states, which imparts unique semiconducting properties that make these materials interesting for electronic and photovoltaic applications, among others30,41,42.

Metastable nitrides are relatively rare in nature and difficult to synthesize experimentally due to the high stability of molecular N2. However, the use of reactive nitrogen precursors such as ammonia, azide compounds, or plasma-cracked atomic N allows nitrogen chemical potentials of up to +1 eV perN above the convex energy hull to be reached in laboratory synthesis30,42,43. Recent experimental studies44,45,46 have reported synthesis of several metastable nitrides (Cu3N, Sn3N4, and Ti-alloyed Sn3N4). Ternary Wurtzite-based nitrides, such as MgSnN2, ZnSnN2, ZnGeN2, and ZnSiN2, have received specific attention recently as potential alternatives to III-V semiconductors43,44. Computational screening studies30,42 recently predicted three new metastable ternary phases (ZnSb2N4, Zn2SbN3, and Zn3SbN3) and a new metastable binary phase (SbN) in the Zn–Sb–N chemical space. Zn2SbN3, the first Sb-based nitride semiconductor ever reported, was experimentally realized42,43,47 and exhibited promising electronic properties for photovoltaic and water-splitting applications. SbN was predicted to be relatively close to the metastability limit (requiring +0.8 eV perN to stabilize)30 and is the subject of ongoing investigations as another potential Sb-based nitride semiconductor.

Given the diverse bonding characteristics of nitrogen compounds, computational predictions of metastability can be particularly sensitive to the choice of functional and energy correction scheme (e.g., PBE vs. PBE+U vs. r2SCAN). For example, Sun et al.30 showed that for many binary nitride systems, PBE overstabilizes the nitrogen-rich region of the convex energy hull, while PBE+U overstabilized the nitrogen-poor region. SCAN was found to predict formation enthlapies with good accuracy across both portions of the hull30. To expand on this previous work and inform future high-throughput screening studies, we evaluate how the use of a mixed r2SCAN/PBE(+U) ternary phase diagram would affect these predictions.

Figure 4a and b show the phase diagrams computed entirely using PBE(+U) and r2SCAN calculations, respectively. Both the pure PBE(+U) and pure r2SCAN phase diagrams predict that Zn2SbN3 and SbN are metastable, consistent with the previous studies. However, the energy above hull of both metastable compositions of interest is higher in r2SCAN. r2SCAN predicts 30 meV per atom above hull for Zn2SbN3 (vs. 20 meV per atom in PBE), reflecting the overstabilization of the N-rich region of the phase diagram in PBE(+U) noted by Sun et al.30 r2SCAN predicts 260 meV per atom above hull for SbN (vs. 172 meV per atom in PBE), but in the r2SCAN diagram this material falls within the metastable synthesizability limit, consistent with experimental reports30. The other notable differences between the PBE(+U) and r2SCAN phase diagrams are that Zn3SbN3, which has not been synthesized to the best of our knowledge and is not in the ICSD, is predicted stable by PBE(+U) but unstable by r2SCAN, while ZnSb2N4 is unstable in PBE(+U) but metastable in r2SCAN. The stable/metastable/unstable classification for all other compositions is the same in both diagrams.

Fig. 4: Zn–Sb–N phase diagrams illustrating different mixing strategies for PBE(+U) and r2SCAN calculations.
figure 4

a PBE(+U) only; b r2SCAN only; c strict application of Rule #1 and #2 to calculations comprising r2SCAN energies for all elements and binary phases with PBE(+U) energies for all ternary phases (d) same set of calculations as (c), but using modified naive mixing in which binary hulls are constructed from r2SCAN formation energies. Phases labeled `metastable' are phases that can be stabilized by a +1 eV perN increase in the nitrogen chemical potential, which is achievable in laboratory synthesis30,42,43. Tabulated r2SCAN and PBE(+U) energies for all materials are available as Supplementary Data (see Supplementary Note 4).

Moving to mixed phase diagrams, we now consider a situation in which only the elements and binary compositions have been computed with r2SCAN, while all ternary phases remain in PBE(+U). We compare two methods of constructing this mixed ternary phase diagram in Fig. 4c, d. In Fig. 4c, we apply Mixing Rule #1 and #2 strictly (i.e., considering the entire phase diagram at once). In this scenario, because we do not have a r2SCAN calculation for the PBE(+U) reference structure Zn3SbN3, the hull is still calculated using PBE(+U) energies (with the exception of polymorphs stablized by r2SCAN, as discussed later). r2SCAN polymorphs for each element or binary composition are placed on this PBE(+U) hull by anchoring to the respective reference states according to Rule #1.

Inspection of Fig. 4c shows broad similarity to the pure r2SCAN diagram (Fig. 4b), with a few notable differences. Zn3SbN3 is predicated unstable in the pure r2SCAN diagram yet metastable in the mixed diagram. For SbN the reverse is true: this material is predicted metastable in the pure r2SCAN diagram but unstable in this mixed diagram. The convex energy hull in Fig. 4c is constructed with PBE(+U) energies, so it is identical to that of Fig. 4a with one significant exception. As noted in Section “Mixed diagrams for relative polymorph stability (Rule #1)”, Rule #1 can cause the energy of the convex hull to decrease in cases where r2SCAN stabilizes a different polymorph than PBE(+U). In this case, r2SCAN stabilizes a different structure for N2 (which is a crystalline solid at 0 K) that is 1.8 meV per atom lower in energy than the reference energy (see Supplementary Fig. 2), causing it to be placed below the PBE(+U) hull and thereby lowering the hull energy of the N-rich region in the mixed phase diagram. This causes Zn3SbN3, which is predicted stable in the pure PBE(+U) phase diagram, to move off the hull by 0.4 meV per atom and become metastable. The energy above hull for SbN increases by 1 meV per atom, and hence it retains its classification as unstable consistent with the PBE(+U) phase diagram.

Figure 4d presents an alternative phase diagram constructed by fully applying Rules #1 and #2 to the binary edges and then adding PBE(+U) energies for ternary phases by modified naive mixing, as discussed in the Section “Mixed diagrams for ternary and higher systems”. Here, the edges of the diagram are identical to those predicted by a pure r2SCAN diagram because we have full coverage of all PBE(+U) ground states and hence Rule #2 applies. In the interior of the diagram, three of the four ternary compositions retain the same stable/unstable/metastable classification they have in the pure r2SCAN diagram, while Zn3SbN3 is predicted to be stable in the PBE(+U) diagram (whereas it is predicted unstable in the pure r2SCAN diagram).

As noted above in the Section “Mixed diagrams for ternary and higher systems”, the modified form of naive mixing employed to construct Fig. 4d is thermodynamically less consistent than strict application of Rule #1 and #2 (Fig. 4c), and should only be invoked when consistency between binary and higher-dimension phase diagrams is essential. In this example, where the metastability of phases is of primary interest, it would be advisable to apply the mixing rules strictly to ensure that the entire convex hull is constructed in a consistent manner. Indeed, among the two mixed diagrams, Fig. 4c shows the most consistency with the pure r2SCAN diagram.

Application to aqueous phase stability

Finally, we demonstrate how the mixing scheme presented here can be used to inform aqueous phase stability predictions. The computational Pourbaix diagram formalism of Persson et al.35,48 generates aqueous stability (pH–pE) diagrams by referencing experimental free energies of dissolved ions to DFT-predicted formation energies derived from solid phase diagrams. As such, the mixing scheme presented here can be applied to the creation of Pourbaix diagrams in addition to solid phase diagrams. SCAN-derived Pourbaix diagrams, for example, were shown to be systematically more accurate for transition metal oxides49. However, the large number of stable phases needed to build computational Pourbaix diagrams may preclude calculating entire chemical spaces in SCAN or r2SCAN, motivating the usefulness of our mixing scheme in this context.

We illustrate the mixing scheme on the SeO system, for which the PBE-derived Pourbaix diagram is known to be inaccurate with respect to experiment49. Specifically, it predicts a stable SeO2 phase that is not observed experimentally (Fig. 5a). Creating a computational Pourbaix diagram of this system requires a solid phase diagram of the Se-O–H chemical system, which contains 85 individual materials, according to the Materials Project database. Five of these materials contain >40 sites, and hence could be particularly challenging to recompute in r2SCAN (see Section “Prioritizing r2SCAN calculations for maximum benefit”). Use of the mixing scheme allows us to construct the hull in r2SCAN by performing calculations only for the ground states (9 materials) while retaining information from PBE(+U) about the metastability of other phases.

Fig. 5: Application of the mixing scheme to aqueous phase stability.
figure 5

Pourbaix diagram of Se–O constructed using PBE(+U) calculations (left) and the mixing scheme presented in this work (right) at a total Se concentration of 10−6 mol/L. Shaded regions predict stable solid phases. Tabulated r2SCAN and PBE(+U) energies for all materials are available as Supplementary Data (see Supplementary Note 4).

The resulting Pourbaix diagram built from mixed r2SCAN and PBE(+U) energies (Fig. 5b) correctly predicts that the oxide phase SeO2 is unstable (unlike the pure PBE(+U) diagram), in agreement with Pourbaix diagrams presented by Wang et al.49 that were prepared from both experimental data and pure SCAN calculations. Hence for this system, our mixing scheme has made it possible to leverage a relatively small number of calculations and achieve similar predictive accuracy as full recalculation of all materials with SCAN.

In summary, we have developed a mixing scheme to enable construction of phase diagrams that combine formation energies from any two DFT functionals. Such a capability is important to high-throughput materials screening efforts because it allows a relatively low-coverage, high-fidelity set of calculations (here, r2SCAN) to be used in concert with existing high-coverage, lower-fidelity calculations (here, PBE(+U)) to improve the accuracy of phase stability predictions. Our scheme allows mixing r2SCAN and PBE(+U) calculations when as few as two r2SCAN calculations (one corresponding to a PBE(+U) ground state) are available, and scales smoothly to cases where entire binary, ternary, or higher-dimensional chemical systems are calculated in r2SCAN. We identified specific guidelines that can be used to target limited computational resources towards materials where r2SCAN calculations are likely to improve accuracy the most, and illustrated how the mixing scheme can be applied to solid and aqueous phase stability predictions.

Methods

We employed the Vienna ab initio Simulation Package (VASP)50,51 v.6.1.1 in conjunction with v.54 of the projector-augmented wave (PAW) PBE pseudopotentials52 for all r2SCAN calculations in this work. We employed a two-step high-throughput workflow described in greater detail elsewhere19, which comprises a structure optimization with PBEsol26 to generate an initial guess of the charge density, followed by a subsequent structure optimization with r2SCAN25. Briefly, these calculations were carried out with a plane-wave energy cutoff of 680 eV, a bandgap-dependent k-point density19,53, and force-convergence tolerance of 0.02 eV per Å (EDIFFG=−0.02 in VASP), which were developed to achieve formation energy converged to within ~1 meV per atom. The ACCURATE precision keyword was enabled in VASP, aspherical contributions to the PAW spheres were included, and the self-consistent field was converged to at least 10−5 eV. Spin-polarization was considered for all calculations.

We do not apply any energy corrections to the resulting r2SCAN energies. For context regarding corrections, in Supplementary Note 3 we fit energy corrections to diatomic gases and show that the corrections that would be applied to r2SCAN are substantially smaller than those that have been widely used for PBE(+U)15,16.

PBE calculations were retrieved from the Materials Project REST API54. Calculations for transition metal oxides and fluorides contained a Hubbard U value and incorporated the GGA/GGA+U mixing scheme of Jain et al.10, in addition to empirical corrections applied to some chemical systems11. We refer to these calculations as PBE(+U) throughout this work.