Coverage for gpaw/test/hybridlcao/test_hydrogen.py: 85%
13 statements
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-14 00:18 +0000
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-14 00:18 +0000
1import pytest
2from ase import Atoms
3from ase.units import Ha
5from gpaw.new.ase_interface import GPAW
8@pytest.mark.serial
9@pytest.mark.xfail
10def test_h_exx_lcao():
11 atoms = Atoms('H', magmoms=[1])
12 atoms.center(vacuum=2.5)
13 atoms.calc = GPAW(mode='lcao', xc='EXX')
14 atoms.get_potential_energy()
15 eig = atoms.calc.get_eigenvalues(spin=0)[0]
16 assert eig == pytest.approx(-0.5 * Ha, abs=0.05)