Coverage for gpaw/test/fileio/test_wfs_auto.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.7.1, created at 2025-07-20 00:19 +0000

1"""Test automagical calculation of wfs""" 

2 

3from gpaw import GPAW 

4from ase import Atoms 

5 

6# H2 

7 

8 

9def test_fileio_wfs_auto(in_tmp_dir): 

10 H = Atoms('HH', [(0, 0, 0), (0, 0, 1)]) 

11 H.center(vacuum=2.0) 

12 

13 calc = GPAW(mode='fd', 

14 nbands=2, 

15 convergence={'eigenstates': 1e-3}) 

16 H.calc = calc 

17 H.get_potential_energy() 

18 calc.write('tmp') 

19 

20 calc = GPAW('tmp') 

21 calc.converge_wave_functions()