fairchem
Use AI to model and discover new catalysts for use in renewable energy storage to help in addressing climate change.
https://github.com/facebookresearch/fairchem
Category: Renewable Energy
Sub Category: Hydro Energy
Keywords from Contributors
archiving measur autograd transforms optimize animals compose projection observation conversion
Last synced: about 8 hours ago
JSON representation
Repository metadata
FAIR Chemistry's library of machine learning methods for chemistry
- Host: GitHub
- URL: https://github.com/facebookresearch/fairchem
- Owner: facebookresearch
- License: other
- Created: 2019-09-26T04:47:27.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-10-28T00:41:48.000Z (6 days ago)
- Last Synced: 2025-10-28T16:38:43.218Z (5 days ago)
- Language: Python
- Homepage: https://fair-chem.github.io/
- Size: 59.4 MB
- Stars: 1,799
- Watchers: 37
- Forks: 400
- Open Issues: 66
- Releases: 53
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
README.md
fairchem by the FAIR Chemistry team
fairchem is the FAIR Chemistry's centralized repository of all its data, models,
demos, and application efforts for materials science and quantum chemistry.
⚠️ FAIRChem version 2 is a breaking change from version 1 and is not compatible with our previous pretrained models and code.
If you want to use an older model or code from version 1 you will need to install version 1,
as detailed here.
[!CAUTION]
UMA models and legacy inorganic bulk models trained using OMat24 are trained with DFT and DFT+U total energy labels.
These are not compatible with Materials Project calculations. If you are using UMA or models trained on OMat24 only
for such calculations, you can find a OMat24 specific calculations of reference unary compounds and MP2020-style
anion and GGA/GGA+U mixing corrections in the OMat24 Hugging Face repo.
Do not use MP2020 corrections or use the MP references compounds when using OMat24 trained models. Additional care
must be taken when computing energy differences, such as formation and energy above hull and comparing with calculations
in the Materials Project since DFT pseudopotentials are different and magnetic ground states may differ as well.
Latest news
Oct 2025 - check out our seamless Multi-node, Multi-GPU and LAMMPs interfaces to run large scale dynamics!
Read our latest release post!
Read about the UMA model and OMol25 dataset release.
Try the demo!
If you want to explore model capabilities check out our
educational demo
Installation
Although not required, we highly recommend installing using a package manager and virtualenv such as uv, it is much faster and better at resolving dependencies than standalone pip.
Install fairchem-core using pip
pip install fairchem-core
If you want to contribute or make modifications to the code, clone the repo and install in edit mode
git clone git@github.com:facebookresearch/fairchem.git
pip install -e fairchem/packages/fairchem-core[dev]
Quick Start
The easiest way to use pretrained models is via the ASE FAIRChemCalculator.
A single uma model can be used for a wide range of applications in chemistry and materials science by picking the
appropriate task name for domain specific prediction.
Instantiate a calculator from a pretrained model
Make sure you have a Hugging Face account, have already applied for model access to the
UMA model repository, and have logged in to Hugging Face using an access token.
You can use the following to save an auth token,
huggingface-cli login
Models are referenced by their name, below are the currently supported models:
| Model Name | Description |
|---|---|
| uma-s-1p1 | Latest version of the UMA small model, fastest of the UMA models while still SOTA on most benchmarks (6.6M/150M active/total params) |
| uma-m-1p1 | Best in class UMA model across all metrics, but slower and more memory intensive than uma-s (50M/1.4B active/total params) |
Set the task for your application and calculate
- oc20: use this for catalysis
- omat: use this for inorganic materials
- omol: use this for molecules
- odac: use this for MOFs
- omc: use this for molecular crystals
Relax an adsorbate on a catalytic surface,
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-1p1", device="cuda")
calc = FAIRChemCalculator(predictor, task_name="oc20")
# Set up your system as an ASE atoms object
slab = fcc100("Cu", (3, 3, 3), vacuum=8, periodic=True)
adsorbate = molecule("CO")
add_adsorbate(slab, adsorbate, 2.0, "bridge")
slab.calc = calc
# Set up LBFGS dynamics object
opt = LBFGS(slab)
opt.run(0.05, 100)
Relax an inorganic crystal,
from ase.build import bulk
from ase.optimize import FIRE
from ase.filters import FrechetCellFilter
from fairchem.core import pretrained_mlip, FAIRChemCalculator
predictor = pretrained_mlip.get_predict_unit("uma-s-1p1", device="cuda")
calc = FAIRChemCalculator(predictor, task_name="omat")
atoms = bulk("Fe")
atoms.calc = calc
opt = FIRE(FrechetCellFilter(atoms))
opt.run(0.05, 100)
Run molecular MD,
from ase import units
from ase.io import Trajectory
from ase.md.langevin import Langevin
from ase.build import molecule
from fairchem.core import pretrained_mlip, FAIRChemCalculator
predictor = pretrained_mlip.get_predict_unit("uma-s-1p1", device="cuda")
calc = FAIRChemCalculator(predictor, task_name="omol")
atoms = molecule("H2O")
atoms.calc = calc
dyn = Langevin(
atoms,
timestep=0.1 * units.fs,
temperature_K=400,
friction=0.001 / units.fs,
)
trajectory = Trajectory("my_md.traj", "w", atoms)
dyn.attach(trajectory.write, interval=1)
dyn.run(steps=1000)
Calculate a spin gap,
from ase.build import molecule
from fairchem.core import pretrained_mlip, FAIRChemCalculator
predictor = pretrained_mlip.get_predict_unit("uma-s-1p1", device="cuda")
# singlet CH2
singlet = molecule("CH2_s1A1d")
singlet.info.update({"spin": 1, "charge": 0})
singlet.calc = FAIRChemCalculator(predictor, task_name="omol")
# triplet CH2
triplet = molecule("CH2_s3B1d")
triplet.info.update({"spin": 3, "charge": 0})
triplet.calc = FAIRChemCalculator(predictor, task_name="omol")
triplet.get_potential_energy() - singlet.get_potential_energy()
Multi-GPU Inference and LAMMPs
If you have multiple gpus (or multiple nodes), we handle all the parallelism for you under the hood by a single flag (workers=N). For example, you can run the following 8000 atom md simulation with ~10 qps (8x H100 GPU), ~10x faster than single-gpu inference! This is also compatible with LAMMPs to perform large scale MD. See our docs for more details. This requires the Ray package to be installed and comes with the extras bundle.
pip install fairchem-core[extras]
from ase import units
from ase.md.langevin import Langevin
from fairchem.core import pretrained_mlip, FAIRChemCalculator
import time
from fairchem.core.datasets.common_structures import get_fcc_carbon_xtal
predictor = pretrained_mlip.get_predict_unit(
"uma-s-1p1", inference_settings="turbo", device="cuda", workers=8
)
calc = FAIRChemCalculator(predictor, task_name="omat")
atoms = get_fcc_carbon_xtal(8000)
atoms.calc = calc
dyn = Langevin(
atoms,
timestep=0.1 * units.fs,
temperature_K=400,
friction=0.001 / units.fs,
)
# warmup 10 steps
dyn.run(steps=10)
start_time = time.time()
dyn.attach(
lambda: print(
f"Step: {dyn.get_number_of_steps()}, E: {atoms.get_potential_energy():.3f} eV, "
f"QPS: {dyn.get_number_of_steps()/(time.time()-start_time):.2f}"
),
interval=1,
)
dyn.run(steps=1000)
LICENSE
fairchem is available under a MIT License. Models/checkpoint licenses vary by application area.
Citation (CITATION.cff)
cff-version: 1.2.0 title: "FAIRChem" version: 2.2.0 message: "If you use this software, please cite it as below." doi: 10.5281/zenodo.15587498 url: "https://github.com/facebookresearch/fairchem" license: - MIT authors: - affiliation: FAIR, Meta family-names: Muhammed Shuaibi - affiliation: FAIR, Meta AI family-names: Abhishek Das - affiliation: FAIR, Meta family-names: Anuroop Sriram - family-names: Misko - affiliation: FAIR, Meta AI family-names: Luis Barroso-Luque - family-names: Ray Gao - family-names: Siddharth Goyal - affiliation: FAIR, Meta AI family-names: Zachary Ulissi - affiliation: FAIR, Meta family-names: Brandon Wood - affiliation: Microsoft family-names: Tian Xie - affiliation: Carnegie Mellon University family-names: Junwoong Yoon - family-names: Brook Wander - affiliation: Radical AI family-names: Adeesh Kolluru - family-names: Richard Barnes - affiliation: Carnegie Mellon University family-names: Ethan Sunshine - affiliation: Toyota Research Institute family-names: Kevin Tran - family-names: Xiang - affiliation: FAIR, Meta AI family-names: Daniel Levine - family-names: Nima Shoghi - family-names: Ilias Chair - affiliation: FAIR, Meta AI - family-names: Janice Lan - affiliation: Georgia Institute of Technology family-names: Kaylee Tian - affiliation: Carnegie Mellon University family-names: Joseph Musielewicz - family-names: clz55 - family-names: Weihua Hu - affiliation: FAIR, Meta AI - family-names: Kyle Michel - family-names: willis - family-names: vbttchr message: If you use this software, please cite it using the metadata from this file. repository-code: https://github.com/facebookresearch/fairchem type: software
Owner metadata
- Name: Meta Research
- Login: facebookresearch
- Email:
- Kind: organization
- Description:
- Website: https://opensource.fb.com
- Location: Menlo Park, California
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/16943930?v=4
- Repositories: 1060
- Last ynced at: 2024-12-17T01:36:52.238Z
- Profile URL: https://github.com/facebookresearch
GitHub Events
Total
- Fork event: 86
- Discussion event: 1
- Create event: 242
- Release event: 20
- Issues event: 210
- Watch event: 558
- Delete event: 209
- Member event: 1
- Issue comment event: 379
- Push event: 835
- Pull request review event: 329
- Pull request event: 352
- Pull request review comment event: 189
Last Year
- Fork event: 86
- Discussion event: 1
- Create event: 242
- Release event: 20
- Issues event: 210
- Watch event: 558
- Delete event: 209
- Member event: 1
- Issue comment event: 379
- Push event: 835
- Pull request review event: 329
- Pull request event: 352
- Pull request review comment event: 189
Committers metadata
Last synced: 2 days ago
Total Commits: 1,109
Total Committers: 60
Avg Commits per committer: 18.483
Development Distribution Score (DDS): 0.789
Commits in past year: 300
Committers in past year: 30
Avg Commits per committer in past year: 10.0
Development Distribution Score (DDS) in past year: 0.797
| Name | Commits | |
|---|---|---|
| Muhammed Shuaibi | 4****i | 234 |
| Abhishek Das | d****k@g****m | 232 |
| Luis Barroso-Luque | l****e | 89 |
| Misko | m****o@m****m | 89 |
| anuroopsriram | a****s@f****m | 85 |
| rayg1234 | 7****4 | 84 |
| zulissimeta | 1****a | 40 |
| dependabot[bot] | 4****] | 35 |
| Siddharth Goyal | s****l@f****m | 28 |
| Brandon Wood | b****d@b****u | 20 |
| Tian Xie | t****e@g****m | 13 |
| Adeesh Kolluru | 4****u | 12 |
| Brook Wander | 7****r | 12 |
| junwoony | j****n@g****m | 11 |
| Richard Barnes | r****s@u****u | 10 |
| Kyle Michel | 5****l | 10 |
| Nima Shoghi | n****i@f****m | 10 |
| Ethan Sunshine | 9****e | 8 |
| Daniel Levine | l****s@m****m | 8 |
| Kevin Tran | k****1@g****m | 7 |
| Johannes Klicpera | j****a@m****g | 6 |
| Xiang | 3****x | 5 |
| Nima Shoghi | n****i@g****m | 4 |
| Vahe Gharakhanyan | v****g@m****m | 4 |
| Lucca Bertoncini | 3****b | 4 |
| Ilias Chair | 8****r | 3 |
| Janice Lan | j****n@f****m | 3 |
| Andrew S. Rosen | a****3@g****m | 2 |
| Artur Toshev | 4****v | 2 |
| Benjamin Kurt Miller | 1****i | 2 |
| and 30 more... | ||
Committer domains:
- fb.com: 4
- meta.com: 4
- mailbox.org: 2
- berkeley.edu: 2
- hitachi.com: 1
- umich.edu: 1
- gatech.edu: 1
- qq.com: 1
- devfair0331.h2.fair: 1
- mail.mcgill.ca: 1
- andrew.cmu.edu: 1
- umn.edu: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 164
Total pull requests: 364
Average time to close issues: 19 days
Average time to close pull requests: 8 days
Total issue authors: 111
Total pull request authors: 33
Average comments per issue: 1.69
Average comments per pull request: 0.44
Merged pull request: 186
Bot issues: 0
Bot pull requests: 51
Past year issues: 162
Past year pull requests: 364
Past year average time to close issues: 11 days
Past year average time to close pull requests: 8 days
Past year issue authors: 109
Past year pull request authors: 33
Past year average comments per issue: 1.65
Past year average comments per pull request: 0.44
Past year merged pull request: 186
Past year bot issues: 0
Past year bot pull requests: 51
Top Issue Authors
- anyangml (6)
- 2506363862 (5)
- XYxiyang (4)
- brunosamp4 (4)
- ericyuan00000 (4)
- zulissimeta (4)
- brunosamp-usp (3)
- Zhangzhiwei39 (3)
- nevinngyt (3)
- luispintoc (3)
- Seunghyo-Noh (2)
- MauricioCafiero (2)
- kyonofx (2)
- misko (2)
- hn-yu (2)
Top Pull Request Authors
- lbluque (64)
- misko (51)
- dependabot[bot] (51)
- rayg1234 (51)
- zulissimeta (37)
- mshuaibii (24)
- kjmichel (9)
- levineds (8)
- gvahe (6)
- wood-b (6)
- arturtoshev (5)
- luccabb (5)
- amorehead (5)
- ericyuan00000 (4)
- santi921 (4)
Top Issue Labels
- bug (37)
- stale (15)
- enhancement (4)
- question (4)
- documentation (1)
- dont-close (1)
- feature in progress (1)
- feature request (1)
- patch (1)
- cla signed (1)
Top Pull Request Labels
- cla signed (277)
- patch (111)
- minor (100)
- enhancement (99)
- dependencies (65)
- no-op (65)
- documentation (60)
- python (44)
- bug (44)
- github_actions (21)
- stale (13)
- test (12)
- major (8)
- refactor (4)
- do not merge (4)
- deprecation (3)
Package metadata
- Total packages: 4
-
Total downloads:
- pypi: 24,178 last-month
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 0 (may contain duplicates)
- Total versions: 41
- Total maintainers: 1
pypi.org: fairchem-data-omol
Code for generating OMOL input configurations
- Homepage:
- Documentation: https://fairchem-data-omol.readthedocs.io/
- Licenses: MIT License
- Latest release: 0.1.1 (published about 2 months ago)
- Last Synced: 2025-10-31T07:33:46.950Z (2 days ago)
- Versions: 2
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 42 Last month
-
Rankings:
- Stargazers count: 2.513%
- Forks count: 3.555%
- Dependent packages count: 8.651%
- Average: 15.867%
- Dependent repos count: 48.748%
- Maintainers (1)
pypi.org: fairchem-lammps
Fairchem extension package to use LAMMPs with fairchem models
- Homepage:
- Documentation: https://fairchem-lammps.readthedocs.io/
- Licenses: GnuV2 License
- Latest release: 0.3.0 (published 9 days ago)
- Last Synced: 2025-10-31T07:34:25.408Z (2 days ago)
- Versions: 3
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 298 Last month
-
Rankings:
- Stargazers count: 2.483%
- Forks count: 3.494%
- Dependent packages count: 8.523%
- Average: 16.097%
- Downloads: 17.947%
- Dependent repos count: 48.039%
- Maintainers (1)
pypi.org: fairchem-data-oc
Code for generating adsorbate-catalyst input configurations
- Homepage:
- Documentation: https://fairchem-data-oc.readthedocs.io/
- Licenses: MIT License
- Latest release: 1.0.2 (published 2 months ago)
- Last Synced: 2025-10-31T07:33:44.436Z (2 days ago)
- Versions: 7
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 993 Last month
-
Rankings:
- Dependent packages count: 9.376%
- Average: 35.613%
- Dependent repos count: 61.849%
- Maintainers (1)
pypi.org: fairchem-core
Machine learning models for chemistry and materials science by the FAIR Chemistry team
- Homepage:
- Documentation: https://fairchem-core.readthedocs.io/
- Licenses: MIT License
- Latest release: 2.10.0 (published 10 days ago)
- Last Synced: 2025-10-31T07:34:25.397Z (2 days ago)
- Versions: 29
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 22,845 Last month
-
Rankings:
- Dependent packages count: 9.415%
- Average: 35.762%
- Dependent repos count: 62.109%
- Maintainers (1)
Dependencies
- actions/download-artifact v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- ase *
- fairchem-core *
- fairchem-data-oc *
- networkx *
- numpy >=1.25.0
- scipy *
- torch >=2.2
- actions/stale v8.0.0 composite
- actions/checkout v4 composite
- actions/upload-artifact v4 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/download-artifact v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/cache v4 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- codecov/codecov-action v4 composite
- ase *
- e3nn >=0.5
- lmdb *
- numba *
- numpy >=1.25.0
- orjson *
- pymatgen >=2023.10.3
- pyyaml *
- submitit *
- tensorboard *
- torch >=2.2
- tqdm *
- urllib3 *
- wandb *
- ase @git+https://gitlab.com/ase/ase.git@dc86a19a280741aa2b42a08d0fa63a8d0348e225
- quacc [sella]>=0.7.6
- sella ==2.3.3
- dataclasses-json == 0.6.0
- inquirer == 3.1.3
- requests == 2.31.0
- responses == 0.23.2
- tenacity == 8.2.3
- tqdm == 4.66.1
- torch_cluster ==1.6.3
- torch_geometric ==2.3.0
- torch_scatter ==2.1.2
- torch_sparse ==0.6.18
- ase ==3.22.1
- numpy ==1.23.5
- torch ==2.2.0
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/upload-artifact v4 composite
- actions/download-artifact v4 composite
- peaceiris/actions-gh-pages v3 composite
- peaceiris/actions-gh-pages v4 composite
- actions/cache v4 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/checkout v4 composite
- release-drafter/release-drafter v6 composite
- release-drafter/release-drafter v6 composite
- release-drafter/release-drafter v6 composite
- release-drafter/release-drafter v6 composite
Score: 21.718600661120625