Code

fairchem

Machine-learned interatomic potentials and the Open Catalyst models.

openmaterials.ai / codes / fairchem

fairchem: machine-learned potentials for catalysis and materials

The FAIR Chemistry library of graph neural network potentials and the Open Catalyst datasets they learn from, OC20 for adsorbates on stable surfaces and OC22 for oxides.

What it is and how it works

Adsorbates on surfaces at scale

OC20 holds 1,281,040 DFT relaxations of 82 adsorbates on surfaces from 55 elements, about 264,890,000 single points. Models trained on it predict energies and forces for unseen adsorbates and catalysts (Chanussot 2021).

Three tasks

S2EF maps a structure to energy and forces, IS2RS predicts the relaxed structure from an initial one, IS2RE predicts the relaxed adsorption energy (Chanussot 2021).

Graph neural network models

CGCNN, SchNet and DimeNet++ with a 6 A cutoff and up to 50 neighbours (Chanussot 2021). Forces come from the energy gradient or directly, as in ForceNet and GemNet.

OC22 oxide electrocatalysts

62,331 relaxations of oxide slabs and adsorbate-covered slabs with PBE+U and spin polarization, all atoms free, and the DFT total energy as target (Tran 2023).

Transfer between datasets

Pretraining GemNet-OC on OC20 and fine-tuning on OC22 lowers the in-domain total energy MAE from 0.374 eV to 0.239 eV (Tran 2023).

Code and checkpoints

The ocp repository publishes baseline models, data loaders and training scripts, and its MODELS.md lists pretrained OC20 checkpoints (Chanussot 2021).

What people do with it

Lowest-energy adsorbate placements

OC20-trained potentials plus one DFT single point per pick matched dense DFT within 0.1 eV, or went lower, for 87.36% of OC20-Dense systems at a 2290x speedup. Lan 2023

OER scaling on oxide surfaces

In the OC22 paper, GemNet-OC gives the OOH against OH Gibbs scaling with slope 0.73 and intercept 3.44 eV, against the literature 0.73 and 3.49 eV. Tran 2023

Adsorption energies on rutile oxides

In the OC22 paper, predicted O, H and OH adsorption energies on rutile surfaces correlate with BEEF-vdW literature values at 75% or better, most within 0.6 eV. Tran 2023

How it is used

  1. Pick a pretrained model

    Choose a checkpoint trained on OC20, OC22 or both, matched to metals or oxides.

  2. Build slab and adsorbate

    Cut a surface from a bulk cell, add vacuum and place the adsorbate on a site.

  3. Predict energy and forces

    The calculator returns the energy and per-atom forces of the structure in one pass.

  4. Relax or screen

    Iterate forces to a relaxed geometry, or rank many adsorbate placements by energy.

  5. Confirm with DFT

    A single DFT point on the relaxed structure checks the model prediction.

What fairchem is, how it works and what it is used for, from the papers listed as sources. Every number links to its paper.Poster pageDownload the poster (PNG, 1920 x 1080)

What fairchem is

fairchem is the FAIR Chemistry library of machine-learned interatomic potentials. Its training sets include OC20 and OC22 for catalysis and OMat24 for bulk materials. It provides pretrained models and a calculator interface for energies, forces and stresses. On the map it serves the quantities those models predict.

In more detail

Datasets and tasks

OC20 places one of 82 adsorbates on a random low Miller index facet of a stable Materials Project bulk and relaxes it in VASP with RPBE until forces fall below 0.03 eV/A, with subsurface atoms fixed. Adsorption energies are referenced to the relaxed slab and gas-phase molecules. The training set holds 640,081 relaxations and over 133 million structures, with validation and test splits for unseen adsorbates, unseen catalysts and both (Chanussot 2021). OC22 samples 4,286 oxides, enumerates terminations up to Miller index 3, removes some surface oxygens and places O, H, N, C, OH, OOH, H2O, CO or O2 adsorbates at several coverages, all relaxed with PBE+U and spin polarization (Tran 2023).

Numerics and scale

The OC20 baselines use 128, 1024 and 192 hidden channels for CGCNN, SchNet and DimeNet++, 3.6, 7.4 and 1.8 million parameters, graphs cut at 6 A with up to 50 neighbours, and a loss that sums the energy error and the per-structure mean force error. The best in-domain S2EF force MAE is 0.0280 eV/A for a force-only DimeNet++-Large, and the best energy MAE is 0.3585 eV for an energy-only DimeNet++ (Chanussot 2021). OC22 cost over 240 million core-hours. On its S2EF-Total test, GemNet-OC with a 12 A cutoff reaches 0.374 eV in-domain energy MAE and 0.029 eV/A force MAE, ahead of SchNet, DimeNet++, ForceNet, SpinConv, PaiNN and GemNet-dT (Tran 2023).

Interfaces and code

pymatgen enumerates the surfaces, and CatKit and ASE place the adsorbates. The Open-Catalyst-Dataset repository holds all source for dataset generation. The ocp repository publishes baseline models, data loaders and training scripts, and its MODELS.md lists pretrained OC20 checkpoints (Chanussot 2021, Tran 2023). On the map fairchem serves energy, forces and stress through FAIRChemCalculator, the ASE calculator that wraps a pretrained predictor.

Validation

OC20 scores models by energy MAE, force MAE on free atoms, force cosine and EFwT, the fraction of structures with energy within 0.02 eV and all forces within 0.03 eV/A of DFT. ADwT judges relaxed structures by the fraction within a distance threshold of the DFT geometry (Chanussot 2021). On OC22, GemNet-OC reproduces published O, H and OH adsorption energies on rutile surfaces with at least 75% linear correlation. Its OOH versus OH Gibbs scaling has slope 0.73 and intercept 3.44 eV against the literature 0.73 and 3.49 eV. Fine-tuning from OC20 improves energy MAE at every fraction of OC22 training data (Tran 2023).

What it computes on the map

4 quantities, drawn by tier with the data flow between them. Dashed boxes are intermediate quantities. Select one for its formula and the other codes that compute it.

Open the full mapShare this submap
Embed this submap
<iframe src="https://openmaterials.ai/m/c56731602651/80000000000000e0?embed=1" title="fairchem on the OpenMaterials map" width="100%" height="480" loading="lazy" style="border:1px solid #EBEBEB;border-radius:6px"></iframe>

Each quantity with the interface the representation records.

  • Forcesatoms.get_forces() with a FAIRChemCalculator (eV/A, shape (n_atoms, 3), base.py:636)eV_per_A
  • Potentialsrc/utils/mlips/fairchem/fairchem_wrapper.py create_calculator() -> fairchem.core.FAIRChemCalculator(predict_unit=model, task_name=target_task) (fairchem_wrapper.py:222-255)
  • Stressatoms.get_stress() with a FAIRChemCalculator (eV/A^3, ASE Voigt 6-vector, base.py:642; ase_calculator.py:254)eV_per_A3
  • TotalEnergyatoms.get_potential_energy() with a FAIRChemCalculator (eV per cell, base.py:635)ev

References

The code

The papers that describe the code; cite them when you use it.

  1. L. Chanussot, A. Das, S. Goyal et al., Open Catalyst 2020 (OC20) Dataset and Community Challenges, ACS Catalysis, 2021. doi.org/10.1021/acscatal.0c04525
  2. R. Tran, J. Lan, M. Shuaibi et al., The Open Catalyst 2022 (OC22) Dataset and Challenges for Oxide Electrocatalysts, ACS Catalysis, 2023. doi.org/10.1021/acscatal.2c05426
  3. L. Barroso-Luque, M. Shuaibi, X. Fu et al., Open Materials 2024 (OMat24) Inorganic Materials Dataset and Models, arXiv, 2024. doi.org/10.48550/arXiv.2410.12771

Applications

Highly cited studies that cite the code, with a few picked by hand.

  1. J. Lan, A. Palizhati, M. Shuaibi et al., AdsorbML: a leap in efficiency for adsorption energy calculations using generalizable machine learning potentials, npj Computational Materials, 2023. doi.org/10.1038/s41524-023-01121-5

How to cite

B. M. Wood, M. Dzamba, X. Fu, et al., UMA: A Family of Universal Models for Atoms (2025), arXiv:2506.23971

doi.org/10.48550/arXiv.2506.23971