File size: 467 Bytes
1c7cd6c
 
 
52c1bfb
1c7cd6c
 
 
5b87ae4
1c7cd6c
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import pytest
from ase import Atoms

from mlip_arena.models import MLIPEnum


@pytest.mark.parametrize("model", MLIPEnum)
def test_calculate(model: MLIPEnum):
    calc = MLIPEnum[model.name].value()

    atoms = Atoms(
        "OO",
        positions=[[0, 0, 0], [1.5, 0, 0]],
        cell=[10, 10 + 0.001, 10 + 0.002],
        pbc=True,
    )

    atoms.calc = calc

    print(atoms.get_potential_energy())
    assert isinstance(atoms.get_potential_energy(), float)