# fairchem: Meta's machine learning potentials for catalysis, materials and molecules

> The FAIR Chemistry repository packages the UMA models as an ASE calculator, so a neural network potential replaces DFT in existing simulation scripts. The parts to read carefully are the task names and the warning about mixing it with Materials Project references.

**facebookresearch/fairchem** — FAIR Chemistry's library of machine learning methods for chemistry 

- Repository: https://github.com/facebookresearch/fairchem
- Website: https://facebookresearch.github.io/fairchem/
- Stars: 2,279 · Forks: 511
- Language: Python
- License: NOASSERTION
- Published: 2026-10-06 · Updated: 2026-10-06 · Language: en
- Canonical page: https://hysenlabs.com/projects/facebookresearch-fairchem

## A model exposed as an ASE calculator, not an API

`fairchem` is described as the FAIR Chemistry team's centralised repository of its data, models, demos and application efforts for materials science and quantum chemistry. The design decision that matters is how the models are exposed.

The README calls the easiest route to pretrained models the ASE `FAIRChemCalculator`, and the framing is that a single UMA model covers a wide range of applications once you pick the right task name. In practice that means the integration is at the level ASE already defines: you attach a calculator to an `Atoms` object and the rest of your script, whether that is LBFGS relaxation, FIRE dynamics, or a LAMMPS run, keeps working unchanged.

That is a much smaller ask than learning a new simulation interface. It also explains the emphasis on ASE in the installation notes and the existence of LAMMPS interfaces for large scale dynamics. The cost of the approach is that task selection becomes a decision you must get right, since the same model produces different quantities depending on which task you name, and nothing in an ASE script tells you that you picked the wrong one.

## Installing fairchem-core and authenticating to Hugging Face

Installation is a single pip command for the core package:

```bash
pip install fairchem-core
```

The README recommends using a package manager and virtual environment such as `uv`, and gives a concrete reason rather than a generic preference: it is faster and better at resolving dependencies than standalone pip. That is worth taking seriously here, since the dependency set behind a machine learning potential is large.

For contributors or anyone modifying the code, the repository is cloned and installed in edit mode with the extra dependencies:

```bash
git clone git@github.com:facebookresearch/fairchem.git

pip install -e fairchem/packages/fairchem-core[dev]
```

Note that the path is `fairchem/packages/fairchem-core`, which tells you the repository is a monorepo with a `packages/` directory holding separately versioned distributions. The release tags confirm it: they are namespaced per package, with `fairchem_core-2.23.0` and `fairchem_data_omol-0.1.2` appearing as distinct releases.

Model weights live on Hugging Face, and getting them is a separate step with a gate in front of it. You need a Hugging Face account, you have to apply for access to the UMA model repository, and you have to be logged in with an access token:

```bash
huggingface-cli login
```

So the install is not the last step before you can run anything. Budget for the access request.

## Task names decide what the model predicts

The models are selected by name, and two are documented. `uma-s-1p2p1` is the latest UMA small model, described as the fastest of the UMA models while still state of the art on most benchmarks, with 6.6M active parameters out of 290M total. `uma-m-1p1` is the best in class across all metrics, but slower and more memory intensive, at 50M active out of 1.4B total.

The sparse-versus-dense structure is worth pausing on. Both figures are given as active over total parameters, which means most of each network is not evaluated for a given prediction. If that ratio holds in your workload, `uma-s` gives you a large model's quality at a small model's cost, and the speed gap is the main axis on which to choose.

The task name then selects the domain-specific prediction:

- `oc20` for catalysis
- `oc22` for oxide catalysis, noted as 1p2 only
- `oc25` for electrocatalysis, also 1p2 only
- `omat` for inorganic materials
- `omol` for molecules and polymers
- `odac` for MOFs
- `omc` for molecular crystals

Those seven names are the interface's real surface. The suffix conventions carry information too: the `1p2`-only tasks exclude the medium model, so choosing `uma-m-1p1` with `oc22` or `oc25` is not a valid combination.

## Relaxing an adsorbate on a copper surface

The README's first worked example is a catalytic relaxation, and it reads like ordinary ASE code with two extra lines at the top. You build the system, attach the calculator, and run an optimiser:

```python
from ase.build import fcc100, add_adsorbate, molecule
from ase.optimize import LBFGS
from fairchem.core import pretrained_mlip, FAIRChemCalculator

predictor = pretrained_mlip.get_predict_unit("uma-s-1p2p1", device="cuda")
calc = FAIRChemCalculator(predictor, task_name="oc20")

slab = fcc100("Cu", (3, 3, 3), vacuum=8, periodic=True)
adsorbate = molecule("CO")
add_adsorbate(slab, adsorbate, 2.0, "bridge")

slab.calc = calc

opt = LBFGS(slab)
opt.run(0.05, 100)
```

The two lines that matter are `get_predict_unit`, which loads the model and picks a device, and the `FAIRChemCalculator` construction, which binds that predictor to a task name. Everything after `slab.calc = calc` is ASE, which is the point: the optimiser, the convergence criterion and the surface construction are all yours to choose.

The example builds a three by three by three periodic copper slab with an eight angstrom vacuum layer and places a CO molecule at a bridge site two angstroms above the surface, then relaxes with LBFGS to a force convergence of 0.05 over at most 100 steps. Adsorbate site and geometry matter chemically, so the bridge placement is a real modelling decision rather than boilerplate.

The second example in the README relaxes an inorganic crystal instead, importing `bulk`, `FIRE` and `FrechetCellFilter`, which is the shape you want for bulk materials where the cell itself should relax rather than being held fixed.

## The Materials Project compatibility warning is the most important paragraph

Somewhere between the feature list and the install command, the README includes a warning that deserves to be read by anyone doing computational materials work. UMA models, and legacy inorganic bulk models trained using OMat24, are trained with DFT and DFT+U total energy labels. Those are not compatible with Materials Project calculations.

The README then gets specific about the consequence. If you are using UMA or OMat24 trained models for Materials Project style calculations, you should use OMat24 specific reference unary compounds and MP2020 style anion and GGA/GGA+U mixing corrections from the OMat24 Hugging Face dataset instead. Do not use MP2020 corrections or MP reference compounds with OMat24 trained models.

The reason is not subtle. Materials Project and OMat24 use different DFT pseudopotentials, and magnetic ground states may differ between them. That means absolute energies sit on different references, so any quantity computed as a difference between them, including formation energy and energy above hull, is wrong if you mix them.

This is the kind of error that produces plausible numbers rather than a crash. An energy above hull that looks reasonable but is systematically offset will propagate into phase stability conclusions and screening decisions, which is why the warning is stated at length rather than as a footnote.

## Multi GPU, LAMMPS and a moving release line

Beyond the ASE calculator path, the repository documents interfaces for running large scale dynamics, described as multi node, multi GPU and LAMMPS interfaces. That matters for the intended use case: machine learning potentials earn their keep on systems where DFT is infeasible, and those systems usually do not fit on one GPU.

The project also maintains public accuracy comparisons. The README leads with a force MAE versus runtime plot for the OMol25 validation set against ASE NVE step timing on a water system using an NVIDIA H200, and points to a benchmark directory holding the reproduction scripts. Further comparisons live on the FAIR Chemistry leaderboard hosted on Hugging Face Spaces. The presence of reproduction scripts is the detail that raises confidence: a benchmark you can re-run is a different kind of claim from one you have to take on trust.

The release cadence is fast and package-scoped. `fairchem_core-2.23.0` came on 2026-09-24, `fairchem_data_omol-0.1.2` on 2026-08-19, and `fairchem_core-2.22.0` on 2026-08-17. The 2.23.0 notes optimise UMA SO2 and Wigner inference kernels, add a D3 calculator wrapper, and add model spec dataclasses and batching enhancements for a multiplexed server. Optimising specific kernels for specific molecules is the shape of a project doing real inference engineering.

Model versions move on their own schedule: UMA 1.2 shipped in March 2026 with roughly 50 percent higher speed and roughly 40 percent better accuracy on the Open Molecules test set, plus wider data coverage for catalysts, molecules and polymers, and UMA first released with the OMol25 dataset in June 2025. The repository is not archived and the last push was on 2026-09-25. The Python floor is 3.10 per the README badge, and there is a DOI and a CITATION.cff for referencing the work.

## Conclusion

fairchem is worth adopting when you have DFT in a loop that a machine learning potential can replace, which in practice means catalysis relaxations, inorganic crystal optimisation and molecular dynamics over systems too large for DFT in reasonable time. The interface choice is the strongest argument for it: the models arrive as an ASE calculator, so existing ASE scripts change by a few lines rather than by a rewrite. Two cautions come straight from the README. UMA and OMat24 trained models use DFT and DFT+U labels that are not compatible with Materials Project calculations, so mixing the two corrupts formation energies, and access to the model weights requires a Hugging Face account with approved access. Install `fairchem-core`, log in with `huggingface-cli login`, then pick the task name that matches your system before you run any optimisation.

## FAQ

### How do you install fairchem?

Install the core package with `pip install fairchem-core`. The README recommends using a package manager and virtual environment such as uv instead of standalone pip, since it resolves the dependency set faster and more reliably. To modify the code, clone the repository and install `fairchem/packages/fairchem-core[dev]` in edit mode.

### How do you get access to the UMA model weights?

You need a Hugging Face account and must apply for access to the UMA model repository. Once approved, log in locally with `huggingface-cli login` so the client can authenticate when loading a pretrained model.

### Which fairchem model should I use, uma-s-1p2p1 or uma-m-1p1?

`uma-s-1p2p1` is the smaller and faster model, with 6.6M active out of 290M total parameters, and the README describes it as still state of the art on most benchmarks. `uma-m-1p1` is best in class across all metrics but slower and more memory intensive, at 50M active out of 1.4B total.

### Can I use fairchem UMA models with Materials Project reference data?

No. The README states that UMA and OMat24 trained models use DFT and DFT+U labels that are not compatible with Materials Project calculations, because the pseudopotentials and magnetic ground states differ. Use the OMat24 specific reference compounds and mixing corrections instead, otherwise formation energies and energy above hull come out wrong.

### What are the fairchem task names and what are they for?

A task name selects the domain specific prediction for the shared model: `oc20` for catalysis, `oc22` for oxide catalysis, `oc25` for electrocatalysis, `omat` for inorganic materials, `omol` for molecules and polymers, `odac` for MOFs, and `omc` for molecular crystals. The `oc22` and `oc25` tasks are marked as 1p2 only.

## Sources

- [facebookresearch/fairchem on GitHub](https://github.com/facebookresearch/fairchem)
- [Issues](https://github.com/facebookresearch/fairchem/issues)
- [Project website](https://facebookresearch.github.io/fairchem/)
- [README](https://github.com/facebookresearch/fairchem/blob/main/README.md)
- [Releases](https://github.com/facebookresearch/fairchem/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/facebookresearch-fairchem
