Skip to main content

Access pre-trained MACE models

Project description

ZnTrack PyPI version

MACE models

Effortlessly integrate pre-trained MACE models into your projects with the user-friendly mace-models package.

pip install mace-models

Loading models is simple with a few lines of code:

import mace_models

# Load a default MACE model
model = mace_models.load()
torch_model = model.get_model()
ase_calculator = model.get_calculator()
# get the model file 
model.get_file()

Customize your model selection by loading models from various repositories or specific revisions:

model = mace_models.load(
    "<model-name>",
    rev="<branch-or-sha>",
    remote="https://github.com/<user>/<repo>"
)

Ensure a seamless integration by first installing the MACE library and upgrading your PyTorch installation:

pip install --upgrade torch --extra-index-url https://download.pytorch.org/whl/cu116
pip install git+https://github.com/ACEsuit/mace.git

Models

Example usages with ASE

import mace_models
from ase.build import molecule

model = mace_models.load("medium_spice")

water = molecule("H2O")
water.calc = model.get_calculator(dtype="float64")

print(water.get_potential_energy())
>>> -14.159366

References

Models are taken from https://github.com/ACEsuit/mace/blob/docs/docs/examples/ANI_trained_MACE.zip and from

@misc{kovacsMACEOFF23TransferableMachine2023,
  title = {MACE-OFF23: Transferable Machine Learning Force Fields for Organic Molecules},
  author = {Kov{\'a}cs, D{\'a}vid P{\'e}ter and Moore, J. Harry and Browning, Nicholas J. and Batatia, Ilyes and Horton, Joshua T. and Kapil, Venkat and Witt, William C. and Magd{\u a}u, Ioan-Bogdan and Cole, Daniel J. and Cs{\'a}nyi, G{\'a}bor},
  year = {2023},
  number = {arXiv:2312.15211},
}

MACE is described in

@misc{batatiaMACEHigherOrder2022,
  title = {{{MACE}}: {{Higher Order Equivariant Message Passing Neural Networks}} for {{Fast}} and {{Accurate Force Fields}}},
  shorttitle = {{{MACE}}},
  author = {Batatia, Ilyes and Kov{\'a}cs, D{\'a}vid P{\'e}ter and Simm, Gregor N. C. and Ortner, Christoph and Cs{\'a}nyi, G{\'a}bor},
  year = {2022},
  number = {arXiv:2206.07697},
  eprint = {2206.07697},
  primaryclass = {cond-mat, physics:physics, stat},
  publisher = {{arXiv}},
  urldate = {2022-06-19},
  archiveprefix = {arxiv},
  langid = {english}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mace_models-0.1.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

mace_models-0.1.1-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page