ACEsuit / mace

MACE - Fast and accurate machine learning interatomic potentials with higher order equivariant message passing.
Other
550 stars 205 forks source link

Reproducing Readme #629

Closed and-tos closed 1 month ago

and-tos commented 1 month ago

I am trying to reproduce the example in the Readme with CPU instead of CUDA but get the below error:

from mace.calculators import mace_off
from ase import build
atoms = build.molecule('H2O')
calc = mace_off(model="medium", device='cpu')
print(atoms.get_potential_energy())

mace/lib/python3.9/site-packages/ase/atoms.py", line 750, in get_potential_energy
    raise RuntimeError('Atoms object has no calculator.')
RuntimeError: Atoms object has no calculator.
ilyes319 commented 1 month ago

You removed the line atoms.calc = calc, please add it back.