openmaterials.ai / codes / MatterGen

MatterGen: a diffusion model that generates stable inorganic crystals

A diffusion model denoising atom types, coordinates and lattice together, pretrained on stable crystals and fine-tuned with adapters toward a chemistry, symmetry or property.

What it is and how it works

Noise to crystal in one process

The forward process masks atom types, spreads coordinates to a uniform wrapped distribution and pulls the lattice toward a cubic cell at the training-set density. An equivariant score network reverses all three at once.

Adapter fine-tuning

Adapter modules injected into every layer take an encoded property label. Classifier-free guidance then steers sampling to a chemistry, space group or scalar target.

Training data

Alex-MP-20 has 607,683 structures of up to 20 atoms from the Materials Project and Alexandria. Stability is judged on the 850,384-structure Alex-MP-ICSD hull (Zeni 2025).

Outputs and filters

MatterGen writes unit cells as CIF files. MatterSim pre-relaxes and filters them before DFT, and a structure matcher checks uniqueness and novelty.

Property targets

Fine-tuned on 605,000 magnetic density labels, 42,000 band gaps and 5,000 bulk moduli, then sampled at targets of 0.20 A^-3, 3.0 eV and 400 GPa (Zeni 2025).

Results in the papers

  • 78%samples within 0.1 eV/atom of the MP hullZeni 2025
  • 0.076 ARMSD to the DFT minimum for 95% of structuresZeni 2025
  • >2,000ICSD structures rediscovered, unseen in trainingZeni 2025

TaCr2O6 synthesised to a bulk modulus target

In the MatterGen paper, sampling at a 200 GPa target gave TaCr2O6, 222 GPa by DFT. The synthesised, disordered sample measured up to 169 GPa, within 20% of the target. Zeni 2025

New phases on the V-Sr-O hull

In the MatterGen paper, the model found three new structures, four overall, on the combined V-Sr-O hull, where substitution found three and random structure search one. Zeni 2025

Low supply-chain-risk magnets

In the MatterGen paper, a model tuned to magnetic density 0.2 A^-3 and HHI 1,250 generated SUN structures near both targets and nearly removed Co and Gd from its proposals. Zeni 2025

How it is used

  1. Choose a model

    The base model for open sampling, or one fine-tuned for a chemistry, symmetry or property.

  2. Set the target

    A chemical system such as Li-Co-O, a space group, or a value such as 400 GPa bulk modulus.

  3. Sample structures

    Generate batches of unit cells by reverse diffusion and write them as CIF files.

  4. Pre-relax and filter

    Relax with MatterSim, drop unstable candidates, then compute energy above hull with DFT.

  5. Match against databases

    Keep structures that are unique among samples and new against Alex-MP-ICSD.