File size: 761 Bytes
c3e45ae
1effaf5
 
c3e45ae
1effaf5
 
 
 
5b87ae4
c3e45ae
 
1effaf5
 
 
 
 
 
c3e45ae
1effaf5
 
 
 
 
 
 
c3e45ae
1effaf5
 
c3e45ae
1effaf5
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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)


@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=model.name,
        calculator_kwargs={},
        device=None,
        optimizer="BFGSLineSearch",
        optimizer_kwargs=None,
        filter="FrechetCell",
        filter_kwargs=None,
        criterion=dict(
            fmax=0.1,
        ),
        max_abs_strain=0.1,
        npoints=6,
    )

    print(result)

    assert isinstance(result["K"], float)