Skip to content

Commit

Permalink
refactor test eos
Browse files Browse the repository at this point in the history
  • Loading branch information
chiang-yuan committed Oct 8, 2024
1 parent 79e5bd9 commit c3e45ae
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_eos.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
import numpy as np
import pytest
from ase.build import bulk

from mlip_arena.models.utils import MLIPEnum
from mlip_arena.tasks.eos.run import fit as EOS

atoms = bulk("Cu", "fcc", a=3.6)

def test_eos():
@pytest.mark.parametrize("model", [MLIPEnum["MACE-MP(M)"]])
def test_eos(model: MLIPEnum):
"""
Test EOS prefect workflow with a simple cubic lattice.
"""

result = EOS(
atoms=atoms,
calculator_name="MACE-MP(M)",
calculator_name=model.name,
calculator_kwargs={},
device=None,
optimizer="BFGSLineSearch",
optimizer_kwargs=None,
filter="FrechetCell",
filter_kwargs=None,
criterion=dict(
fmax=0.01,
fmax=0.1,
),
max_abs_strain=0.1,
npoints=11,
npoints=6,
)

print(result)
Expand Down

0 comments on commit c3e45ae

Please sign in to comment.