fairchem-core

FAIR Chemistry's library of machine learning methods for chemistry

https://github.com/facebookresearch/fairchem

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    6 of 55 committers (10.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (19.1%) to scientific vocabulary

Keywords from Contributors

materials-informatics materials-science optimizer materials mesh transformer interpretability interactive profiles distribution
Last synced: 6 months ago · JSON representation ·

Repository

FAIR Chemistry's library of machine learning methods for chemistry

Basic Info
  • Host: GitHub
  • Owner: facebookresearch
  • License: other
  • Language: Python
  • Default Branch: main
  • Homepage: https://fair-chem.github.io/
  • Size: 46.2 MB
Statistics
  • Stars: 1,689
  • Watchers: 37
  • Forks: 377
  • Open Issues: 37
  • Releases: 37
Created over 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

![tests](https://github.com/facebookresearch/fairchem/actions/workflows/test.yml/badge.svg?branch=main&event=push) ![PyPI - Version](https://img.shields.io/pypi/v/fairchem-core) ![Static Badge](https://img.shields.io/badge/python-3.10%2B-blue) [![codecov](https://codecov.io/gh/facebookresearch/fairchem/graph/badge.svg)](https://codecov.io/gh/facebookresearch/fairchem) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15587498.svg)](https://doi.org/10.5281/zenodo.15587498) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/facebookresearch/fairchem?quickstart=1)

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.

:warning: 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.

:warning: Some of the docs and new features in FAIRChem version 2 are still being updated so you may see some changes over the next few weeks. Check back here for the latest instructions. Thank you for your patience!

Read our latest release post!

Read about the UMA model and OMol25 dataset release.

Meta FAIR Science Release

Try the demo!

If you want to explore model capabilities check out our educational demo

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 bash pip install fairchem-core

If you want to contribute or make modifications to the code, clone the repo and install in edit mode ```bash 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, bash 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,

```python from ase.build import fcc100, addadsorbate, molecule from ase.optimize import LBFGS from fairchem.core import pretrainedmlip, FAIRChemCalculator

predictor = pretrainedmlip.getpredictunit("uma-s-1p1", device="cuda") calc = FAIRChemCalculator(predictor, taskname="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,

```python from ase.build import bulk from ase.optimize import FIRE from ase.filters import FrechetCellFilter from fairchem.core import pretrained_mlip, FAIRChemCalculator

predictor = pretrainedmlip.getpredictunit("uma-s-1p1", device="cuda") calc = FAIRChemCalculator(predictor, taskname="omat")

atoms = bulk("Fe") atoms.calc = calc

opt = LBFGS(FrechetCellFilter(atoms)) opt.run(0.05, 100) ```

Run molecular MD,

```python 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 = pretrainedmlip.getpredictunit("uma-s-1p1", device="cuda") calc = FAIRChemCalculator(predictor, taskname="omol")

atoms = molecule("H2O") atoms.calc = calc

dyn = Langevin( atoms, timestep=0.1 * units.fs, temperatureK=400, friction=0.001 / units.fs, ) trajectory = Trajectory("mymd.traj", "w", atoms) dyn.attach(trajectory.write, interval=1) dyn.run(steps=1000) ```

Calculate a spin gap,

```python from ase.build import molecule from fairchem.core import pretrained_mlip, FAIRChemCalculator

predictor = pretrainedmlip.getpredict_unit("uma-s-1p1", device="cuda")

singlet CH2

singlet = molecule("CH2s1A1d") singlet.info.update({"spin": 1, "charge": 0}) singlet.calc = FAIRChemCalculator(predictor, taskname="omol")

triplet CH2

triplet = molecule("CH2s3B1d") triplet.info.update({"spin": 3, "charge": 0}) triplet.calc = FAIRChemCalculator(predictor, taskname="omol")

triplet.getpotentialenergy() - singlet.getpotentialenergy() ```

LICENSE

fairchem is available under a MIT License. Models/checkpoint licenses vary by application area.

Owner

  • Name: Meta Research
  • Login: facebookresearch
  • Kind: organization
  • Location: Menlo Park, California

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

GitHub Events

Total
  • Create event: 157
  • Release event: 10
  • Issues event: 180
  • Watch event: 501
  • Delete event: 126
  • Member event: 1
  • Issue comment event: 312
  • Push event: 605
  • Pull request review comment event: 133
  • Pull request review event: 229
  • Pull request event: 245
  • Fork event: 79
Last Year
  • Create event: 157
  • Release event: 10
  • Issues event: 180
  • Watch event: 501
  • Delete event: 126
  • Member event: 1
  • Issue comment event: 312
  • Push event: 605
  • Pull request review comment event: 133
  • Pull request review event: 229
  • Pull request event: 245
  • Fork event: 79

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 1,011
  • Total Committers: 55
  • Avg Commits per committer: 18.382
  • Development Distribution Score (DDS): 0.771
Past Year
  • Commits: 261
  • Committers: 25
  • Avg Commits per committer: 10.44
  • Development Distribution Score (DDS): 0.774
Top Committers
Name Email Commits
Abhishek Das d****k@g****m 232
Muhammed Shuaibi 4****i 228
anuroopsriram a****s@f****m 83
Misko m****o@m****m 72
rayg1234 7****4 70
Luis Barroso-Luque l****e 69
zulissimeta 1****a 36
Siddharth Goyal s****l@f****m 28
Brandon Wood b****d@b****u 19
dependabot[bot] 4****] 18
Tian Xie t****e@g****m 13
Brook Wander 7****r 12
Adeesh Kolluru 4****u 12
junwoony j****n@g****m 11
Richard Barnes r****s@u****u 10
Nima Shoghi n****i@f****m 10
Ethan Sunshine 9****e 8
Kevin Tran k****1@g****m 7
Daniel Levine l****s@m****m 7
Johannes Klicpera j****a@m****g 6
Kyle Michel 5****l 6
Xiang 3****x 5
Nima Shoghi n****i@g****m 4
Ilias Chair 8****r 3
Janice Lan j****n@f****m 3
Vahe Gharakhanyan v****g@m****m 3
Artur Toshev 4****v 2
Facebook Community Bot f****t 2
Weihua Hu w****6@g****m 2
clz55 5****5 2
and 25 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 135
  • Total pull requests: 296
  • Average time to close issues: 19 days
  • Average time to close pull requests: 6 days
  • Total issue authors: 93
  • Total pull request authors: 30
  • Average comments per issue: 1.6
  • Average comments per pull request: 0.39
  • Merged pull requests: 161
  • Bot issues: 0
  • Bot pull requests: 38
Past Year
  • Issues: 133
  • Pull requests: 296
  • Average time to close issues: 9 days
  • Average time to close pull requests: 6 days
  • Issue authors: 91
  • Pull request authors: 30
  • Average comments per issue: 1.56
  • Average comments per pull request: 0.39
  • Merged pull requests: 161
  • Bot issues: 0
  • Bot pull requests: 38
Top Authors
Issue Authors
  • 2506363862 (5)
  • anyangml (5)
  • XYxiyang (4)
  • brunosamp4 (4)
  • ericyuan00000 (4)
  • nevinngyt (3)
  • zulissimeta (3)
  • Zhangzhiwei39 (3)
  • yang-lin430 (2)
  • caolz (2)
  • kaijiz (2)
  • 1716757342 (2)
  • runtian97 (2)
  • GuideBariri (2)
  • leifjacobson (2)
Pull Request Authors
  • lbluque (52)
  • rayg1234 (42)
  • dependabot[bot] (38)
  • zulissimeta (35)
  • misko (33)
  • mshuaibii (22)
  • levineds (8)
  • kjmichel (7)
  • wood-b (6)
  • arturtoshev (5)
  • gvahe (5)
  • EricZQu (4)
  • santi921 (4)
  • ericyuan00000 (4)
  • anuroopsriram (4)
Top Labels
Issue Labels
bug (30) stale (8) enhancement (2) documentation (1) dont-close (1) question (1)
Pull Request Labels
cla signed (235) patch (92) minor (81) enhancement (79) no-op (58) documentation (55) dependencies (50) bug (39) python (34) github_actions (17) test (12) major (6) stale (5) refactor (4) do not merge (4)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 11,961 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 30
  • Total maintainers: 1
pypi.org: fairchem-data-omol

Code for generating OMOL input configurations

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 157 Last month
Rankings
Stargazers count: 2.5%
Forks count: 3.6%
Dependent packages count: 8.7%
Average: 15.9%
Dependent repos count: 48.7%
Maintainers (1)
Last synced: 6 months ago
pypi.org: fairchem-data-oc

Code for generating adsorbate-catalyst input configurations

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,332 Last month
Rankings
Dependent packages count: 9.4%
Average: 35.6%
Dependent repos count: 61.8%
Maintainers (1)
Last synced: 6 months ago
pypi.org: fairchem-core

Machine learning models for chemistry and materials science by the FAIR Chemistry team

  • Versions: 22
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 10,472 Last month
Rankings
Dependent packages count: 9.4%
Average: 35.8%
Dependent repos count: 62.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/test-release.yml actions
  • actions/download-artifact v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
packages/fairchem-applications-cattsunami/pyproject.toml pypi
  • ase *
  • fairchem-core *
  • fairchem-data-oc *
  • networkx *
  • numpy >=1.25.0
  • scipy *
  • torch >=2.2
.github/workflows/stale.yml actions
  • actions/stale v8.0.0 composite
.github/workflows/build.yml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
.github/workflows/lint.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/release.yml actions
  • actions/download-artifact v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/test.yml actions
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • codecov/codecov-action v4 composite
packages/fairchem-applications-AdsorbML/pyproject.toml pypi
packages/fairchem-core/pyproject.toml pypi
  • ase *
  • e3nn >=0.5
  • lmdb *
  • numba *
  • numpy >=1.25.0
  • orjson *
  • pymatgen >=2023.10.3
  • pyyaml *
  • submitit *
  • tensorboard *
  • torch >=2.2
  • tqdm *
  • urllib3 *
  • wandb *
packages/fairchem-data-oc/pyproject.toml pypi
packages/fairchem-data-om/pyproject.toml pypi
  • ase @git+https://gitlab.com/ase/ase.git@dc86a19a280741aa2b42a08d0fa63a8d0348e225
  • quacc [sella]>=0.7.6
  • sella ==2.3.3
packages/fairchem-demo-ocpapi/pyproject.toml pypi
  • 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
packages/requirements-optional.txt pypi
  • torch_cluster ==1.6.3
  • torch_geometric ==2.3.0
  • torch_scatter ==2.1.2
  • torch_sparse ==0.6.18
packages/requirements.txt pypi
  • ase ==3.22.1
  • numpy ==1.23.5
  • torch ==2.2.0
.github/workflows/build_docs.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • actions/upload-artifact v4 composite
.github/workflows/deploy_docs.yml actions
  • actions/download-artifact v4 composite
  • peaceiris/actions-gh-pages v3 composite
  • peaceiris/actions-gh-pages v4 composite
.github/workflows/integration-test.yml actions
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/label_checker.yml actions
  • actions/checkout v4 composite
.github/workflows/release-drafter-applications_cattsunami.yml actions
  • release-drafter/release-drafter v6 composite
.github/workflows/release-drafter-core.yml actions
  • release-drafter/release-drafter v6 composite
.github/workflows/release-drafter-data_oc.yml actions
  • release-drafter/release-drafter v6 composite
.github/workflows/release-drafter-demo_ocpapi.yml actions
  • release-drafter/release-drafter v6 composite