Coverage for gpaw/test/noncollinear/test_GGA.py: 100%
9 statements
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-20 00:19 +0000
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-20 00:19 +0000
1import pytest
2from ase import Atoms
3from gpaw import GPAW
6def test_noncollinear_GGA():
7 a = Atoms('H', [[0, 0, 0]], magmoms=[1])
8 a.center(vacuum=2.5)
9 a.calc = GPAW(mode='pw',
10 xc='PBE',
11 symmetry='off',
12 txt=None,
13 experimental={'magmoms': [[0, 0.5, 0.5]]})
14 with pytest.raises(ValueError, match='Only LDA supported'):
15 a.get_potential_energy()