AnyLearn
All lessons
Scienceintermediate

Screening Funnels and the Convex Hull: Which Crystals Are Worth Making

How computational screening decides which hypothetical crystals deserve a synthesis attempt: building the convex hull, computing energy above the hull, choosing a metastability threshold, why formation-energy accuracy does not mean stability accuracy, and how benchmarks like Matbench Discovery measure an ML pre-filter honestly.

Updated · AI-authored, review-gated · how lessons are made

Progress1 / 10

Stability is a competition, not a number

A hypothetical crystal with a strongly negative formation energy can still be unmakeable. Formation energy compares a compound with its pure elements, but a real sample does not choose between "the compound" and "the elements". It chooses among every combination of phases with the same overall composition, and it will fall apart into whichever combination has the lowest energy.

Definition: The formation energy ΔHf\Delta H_f is the energy per atom of a compound minus the energy of its constituent elements in their reference states. The decomposition energy ΔHd\Delta H_d compares the compound with the most stable mixture of other phases at the same composition. Only ΔHd\Delta H_d decides thermodynamic stability.

So stability is a question about a chemical system, not a property you can compute from one structure alone. To answer it you need the energies of all the competing phases you know about, which is why materials databases such as the Materials Project are the backbone of computational screening. (The previous lesson in this path covers the machine-learned potentials that make computing those energies cheap.)

Sign in free to save your progress and earn certificates.

Full lesson text

All 10 steps on one page, for reading, reference, and search.

Show

1. Stability is a competition, not a number

A hypothetical crystal with a strongly negative formation energy can still be unmakeable. Formation energy compares a compound with its pure elements, but a real sample does not choose between "the compound" and "the elements". It chooses among every combination of phases with the same overall composition, and it will fall apart into whichever combination has the lowest energy.

Definition: The formation energy ΔHf\Delta H_f is the energy per atom of a compound minus the energy of its constituent elements in their reference states. The decomposition energy ΔHd\Delta H_d compares the compound with the most stable mixture of other phases at the same composition. Only ΔHd\Delta H_d decides thermodynamic stability.

So stability is a question about a chemical system, not a property you can compute from one structure alone. To answer it you need the energies of all the competing phases you know about, which is why materials databases such as the Materials Project are the backbone of computational screening. (The previous lesson in this path covers the machine-learned potentials that make computing those energies cheap.)

2. Building the convex hull

Plot every known phase in a binary system A-B as a point: composition xx (fraction of B) on the horizontal axis, formation energy per atom on the vertical. The pure elements sit at zero on each end. Now stretch a string underneath all the points and pull it tight. That lower envelope is the convex hull.

Any phase on the hull is thermodynamically stable at zero kelvin. Any point above it can lower its energy by splitting into the hull phases on either side, in the proportions that preserve the overall composition. The vertical gap is the energy above the hull:

Ehull(c)=Ef(c)−∑kfk Ef(pk),∑kfk x(pk)=x(c)E_{\text{hull}}(c) = E_f(c) - \sum_k f_k \, E_f(p_k), \qquad \sum_k f_k \, x(p_k) = x(c)

Here pkp_k are the hull phases bracketing candidate cc and fkf_k their atom fractions. By construction Ehull≥0E_{\text{hull}} \geq 0, with zero meaning on the hull. In ternary and higher systems the same idea holds with a hull surface over a composition triangle or simplex.

3. Worked example: is the candidate stable?

A binary system has one known compound on its hull besides the elements (toy numbers for illustration): AB at x=0.5x = 0.5 with Ef=−0.40E_f = -0.40 eV/atom. A model proposes a new compound A₂B at x=1/3x = 1/3 with Ef=−0.25E_f = -0.25 eV/atom. It is clearly exothermic relative to the elements.

Predict first

Is A₂B on the hull? If not, how far above it is, and what does it decompose into?

Seventeen meV/atom is small, about the size of the uncertainties discussed below, which is exactly why candidates "just above the hull" are where screening decisions get hard.

4. Code: the hull in pymatgen

Nobody builds hulls by hand. The pymatgen library constructs them in any number of dimensions from a list of entries, each a composition with a total energy. The energies below are illustrative, not database values:

from pymatgen.core import Composition
from pymatgen.analysis.phase_diagram import PhaseDiagram, PDEntry

def entry(formula, ef_per_atom):
    c = Composition(formula)
    return PDEntry(c, ef_per_atom * c.num_atoms)  # total energy per formula

entries = [
    entry("Li", 0.0), entry("O", 0.0),   # elemental references
    entry("Li2O", -2.07),                # known phases
    entry("Li2O2", -1.65),
    entry("LiO2", -0.95),                # candidate
]
pd = PhaseDiagram(entries)
decomp, e_hull = pd.get_decomp_and_e_above_hull(entries[-1])
print(f"E_hull = {e_hull * 1000:.0f} meV/atom")
for phase, frac in decomp.items():
    print(f"  -> {phase.composition.reduced_formula}: {frac:.2f}")

Output:

E_hull = 150 meV/atom
  -> Li2O2: 0.67
  -> O2: 0.33

In real work the entries come from a database query, and every energy must use the same DFT settings and corrections. Mixing energies from different functionals or codes makes the hull meaningless.

5. Why zero is not the cutoff

If screening kept only compounds exactly on the hull, it would throw away much of what chemists actually make. Sun and colleagues (Science Advances, 2016) analysed 29,902 Materials Project entries derived from experimentally reported structures and found 50.5% of them metastable, sitting above the DFT hull. The median energy above the hull across all of them was 15 meV/atom and the 90th percentile 67 meV/atom.

Metastable phases survive because kinetics, not thermodynamics, keeps them intact. So every screening study chooses a tolerance, and the choice shapes the answer:

StudyStability criterion
A-Lab target selection (Szymanski et al., Nature, 2023)On or within 10 meV/atom of the hull
MatterGen generative model (Zeni et al., Nature, 2025)Within 100 meV/atom of the hull
Matbench Discovery benchmark (Riebesell et al.)Classification boundary at 0 eV/atom

A tight threshold misses real metastable materials; a loose one floods the shortlist with phases that will never form. There is no universally correct value, so read the threshold before comparing any two studies' "stable" counts.

6. Formation energy accuracy is not stability accuracy

A model can predict formation energies impressively and still be useless for stability. Bartel and colleagues (npj Computational Materials, 2020) showed why. Across Materials Project compounds, ΔHf\Delta H_f spans a wide range, −1.42 ± 0.95 eV/atom, while the decomposition energy that actually decides stability spans only 0.06 ± 0.12 eV/atom. The stability signal is a small difference between large numbers.

Energy scales that decide stability
meV/atom0501001501201006715Typical spread of ΔHdML error on ΔHd90th pct metastabilityMedian metastability
Source: Bartel et al., npj Comput. Mater. 2020 (spread; composition-only ML error 100-140); Sun et al., Sci. Adv. 2016 (metastability)

DFT gets away with this because its errors are systematic and largely cancel between chemically similar compounds. Models that predict each compound independently from composition do not share that cancellation: Bartel's composition-only models reached errors on ΔHd\Delta H_d of about 0.10 to 0.14 eV/atom, as large as the effect being measured. Only the model that saw the crystal structure detected stable compounds reliably.

Gotcha: Judge a screening model by how it classifies stability near the hull, not by its formation-energy error.

7. The screening funnel

Each stage is cheaper than the next and discards most of what reaches it, so the expensive steps only see promising inputs. The feedback arrow matters: every newly confirmed stable phase joins the reference hull, which can push other candidates off it, and the new DFT results become training data that sharpens the ML filter in the next round.

flowchart TD
A["Generate candidates: substitution, random search, generative models"] --> B["Cheap ML filter: MLIP relaxation and predicted energy"]
B --> C["DFT relaxation of survivors"]
C --> D["Energy above hull against a reference database"]
D --> E["Practical filters: elements, air stability, precursors"]
E --> F["Short list for synthesis"]
D --> G["Add new stable phases to the database"]
G --> B

8. Where candidates come from

The funnel is only as good as its intake. Three generator families dominate, and they fail in different ways:

  • Substitution. Swap chemically similar ions into known structure types. GNoME (Merchant et al., Nature, 2023) used symmetry-aware partial substitutions to produce more than 10910^9 candidates over its active-learning rounds. Cheap and plausible, but it tends to produce close relatives of known compounds.
  • Random structure search. For a promising composition, scatter atoms randomly and relax. GNoME's compositional pipeline relaxed 100 random structures (via AIRSS) for each composition predicted within 50 meV/atom of stability. It finds genuinely new arrangements, at high compute cost.
  • Generative models. A diffusion model learns the distribution of known stable crystals and samples new ones, optionally steered toward a target property. MatterGen (Zeni et al., Nature, 2025) was trained on 607,683 stable structures with up to 20 atoms.

Active learning ties the funnel together. GNoME reported its structural hit rate, the share of candidates DFT confirmed as stable, rising from under 6% to above 80% across rounds, and its energy prediction error falling to 11 meV/atom.

9. Measuring a pre-filter honestly

How do you know an ML filter helps? Matbench Discovery (Riebesell et al., Nature Machine Intelligence) frames the evaluation the way screening actually uses the model: a prospective classification task on crystals the model has not seen, asking whether each one is on or below the hull.

Its headline metric is the discovery acceleration factor, how much more often the model's picks are stable than a random pick from the same pool:

DAF=precision of the model’s stable predictionsfraction of the pool that is truly stable\text{DAF} = \frac{\text{precision of the model's stable predictions}}{\text{fraction of the pool that is truly stable}}

In the published benchmark, universal interatomic potentials were the strongest model class, reaching F1 scores of 0.57 to 0.82 and DAF up to 6x on their first 10,000 stable predictions. The authors also warn that accurate regressors can still give high false-positive rates near the 0 eV/atom decision boundary, the same lesson as Bartel's, measured prospectively.

Key idea: A higher DAF means more of your DFT budget lands on stable crystals. It changes the compute bill, not the need for DFT confirmation.

10. What the hull does not know

A DFT convex hull is a precise answer to a narrow question: which arrangement has the lowest energy at zero kelvin, among the phases in this database, according to this functional? Each qualifier is a way to be wrong.

  • No temperature. The hull uses energy, not free energy. Vibrational and especially configurational entropy can stabilise a phase at synthesis temperatures, and can make a predicted ordered compound appear in the lab as a disordered one.
  • An incomplete reference set. A candidate can look stable only because its true competitor has not been computed yet. Every discovery campaign that adds phases moves the hull.
  • Functional error. Systematic DFT errors, for example in some strongly correlated transition-metal compounds, can shift a borderline candidate across the line.
  • No kinetics. Being on the hull says nothing about whether any reaction pathway reaches the phase at an accessible temperature.

In practice: "Predicted stable" is a hypothesis with a stated threshold, a stated reference database, and a stated functional. The next lesson follows such hypotheses into an autonomous lab, where kinetics gets its say.

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. A candidate compound has a formation energy of −0.8 eV/atom relative to its elements. What can you conclude about its thermodynamic stability?
    • It is stable, because any negative formation energy means stable
    • It is metastable by exactly 0.8 eV/atom
    • It must be unstable, since stable compounds lie near zero
    • Nothing yet: you must compare it with competing phases on the convex hull
  2. Known phase AB sits on the hull at x = 0.5 with −0.40 eV/atom, and the elements are at zero. What is the hull energy at x = 0.25?
    • −0.20 eV/atom
    • −0.10 eV/atom
    • −0.30 eV/atom
    • −0.40 eV/atom
  3. Why did Bartel and colleagues find that composition-only models predict stability poorly despite good formation-energy accuracy?
    • They were trained on too few elements
    • Decomposition energies are small differences between large numbers, and the models lack DFT's error cancellation
    • They predicted energies in the wrong units
    • Formation energies cannot be learned from composition at all
  4. Sun and colleagues found that about half of experimentally known compounds in their dataset sit above the DFT hull. What does this imply for screening?
    • DFT hulls are useless and should be abandoned
    • Only compounds exactly on the hull should ever be synthesised
    • A threshold above zero is needed to avoid discarding makeable metastable phases
    • Metastable compounds always transform within days
  5. What does a discovery acceleration factor of 6 mean in Matbench Discovery?
    • The model runs six times faster than DFT
    • The model's errors are six times smaller than random guessing
    • Six out of every ten predictions are stable
    • The model's stable picks are stable six times as often as random picks from the same pool

Related lessons

Science
intermediate

Predicted, Made, Proven: Judging a Materials Discovery Claim

How to tell a predicted crystal from a validated new material. Builds an evidence ladder from predicted stable to useful, explains why zero-kelvin calculations invent atomic order that real samples lack, and applies the ladder to three documented cases: a large prediction database, an autonomous lab, and a generative model.

10 steps·~15 min
Science
intermediate

Closed-Loop Autonomous Labs for Inorganic Synthesis

How a self-driving lab turns predicted crystals into real powders: choosing targets, borrowing first recipes from the literature, reading products with machine-learned XRD analysis, and using reaction driving forces to decide the next experiment after a failure, with the A-Lab as the worked example of what automation speeds up and what it cannot settle.

10 steps·~15 min
AI
advanced

Measuring Continual Learning: Scenarios, Transfer Metrics, and Honest Baselines

The same method can score 99% or 21% on one benchmark depending on what the model is told at test time. Learn the task-, domain- and class-incremental scenarios, the accuracy matrix with backward and forward transfer, and the protocol choices and baselines that make a continual learning result trustworthy.

9 steps·~14 min
AI
advanced

Fixing Forgetting: Replay, Regularisation, and Parameter Isolation

The three families of continual learning methods, taken apart: experience and generative replay, gradient projection with GEM, weight penalties from EWC and synaptic intelligence, distillation, and per-task adapters. Includes a runnable PyTorch comparison of EWC and replay, and a table for choosing among them.

9 steps·~14 min