Coverage for gpaw/test/pseudopotential/test_sg15_ni.py: 64%
11 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 gpaw.setup import create_setup
5def test_sg15_ni():
6 try:
7 s = create_setup('Ni', 'PBE', type='sg15')
8 except FileNotFoundError:
9 pytest.skip('No SG15 PP for Ni found')
10 f_sJ = s.calculate_initial_occupation_numbers(2.0, False, 0.0, 2)
11 print(f_sJ)
12 up, dn = f_sJ.sum(axis=1)
13 assert up - dn == pytest.approx(2.0)