Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run the tutorial code #1081

Open
maurijr1 opened this issue Mar 25, 2025 · 1 comment
Open

Can't run the tutorial code #1081

maurijr1 opened this issue Mar 25, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@maurijr1
Copy link

Python version

Python 3.12.9

fairchem-core version

1.8.1

pytorch version

2.4.1

cuda version

False None

Operating system version

CentOS Linux 7.6 x86_64

Minimal example

Trying to use this code:
from ase.build import fcc100, add_adsorbate, molecule
from ase.optimize import LBFGS
from fairchem.core import OCPCalculator

# Set up your system as an ASE atoms object
slab = fcc100("Cu", (3, 3, 3), vacuum=8)
adsorbate = molecule("CO")
add_adsorbate(slab, adsorbate, 2.0, "bridge")

calc = OCPCalculator(
    model_name="EquiformerV2-31M-S2EF-OC20-All+MD",
    local_cache="pretrained_models",
    trainer="forces",
    cpu=False,
)
slab.calc = calc

# Set up LBFGS dynamics object
dyn = LBFGS(slab)
dyn.run(0.05, 100)

Current behavior

It's returning this error:
RuntimeError: Failed to find the model 'equiformer_v2'. You may either use a model from the registry (one of 'hydra' or 'schnet') or provide the full import path to the model (e.g., 'fairchem.core.models.schnet.SchNetWrap').

Expected Behavior

The model working corretly, calculating the slab

Relevant files to reproduce this bug

No response

@maurijr1 maurijr1 added the bug Something isn't working label Mar 25, 2025
@mshuaibii
Copy link
Collaborator

Hi - something feels off with your environment, can you try reinstalling it from scratch. I have tested this on my end and is working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants