Coverage for gpaw/utilities/agts.py: 42%
12 statements
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-12 00:18 +0000
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-12 00:18 +0000
1from gpaw.utilities.acwf import work
2import json
3from pathlib import Path
6def workflow():
7 from myqueue.workflow import run
8 for mode in ['pw', 'lcao']:
9 with run(function=work, args=['FCC', 'Al'], kwargs={'mode': mode},
10 cores=8, tmax='1h', name=f'Al-{mode}'):
11 run(function=check_lattice_constant, args=[mode],
12 name=f'check-{mode}')
15def check_lattice_constant(mode: str) -> None:
16 dct = json.loads(Path(f'{mode}-FCC.json').read_text())
17 strain = {'pw': 0.0003,
18 'lcao': 0.0086}[mode]
19 assert abs(dct['strain'] - strain) < 0.0001