Coverage for gpaw/test/pseudopotential/test_ah.py: 100%
14 statements
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-19 00:19 +0000
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-19 00:19 +0000
1from ase.build import bulk
2from gpaw import GPAW, PW
3import pytest
6@pytest.mark.stress
7def test_pseudopotential_ah(in_tmp_dir):
8 si = bulk('Si', 'diamond', a=5.5, cubic=not True)
9 si.calc = GPAW(mode=PW(200),
10 setups='ah',
11 kpts=(2, 2, 2))
12 f = si.get_forces()
13 assert f == pytest.approx(0.0)
14 s = si.get_stress()
15 assert s[3:] == pytest.approx(0.0)
16 assert s[:3] == pytest.approx(0.299, abs=0.001)
17 si.calc.write('Si.gpw', 'all')
18 GPAW('Si.gpw')