How do the recipes change: GS-recipeΒΆ

  • Dependencies are not declared explicitly

  • Calculator, atoms are direct inputs.

  • A new data structure: RunRecord has been introduced.

 1@command(module='asr.gs')
 2@option('-a', '--atoms', help='Atomic structure.',
 3        type=AtomsFile(), default='structure.json')
 4@option('-c', '--calculator', help='Calculator params.', type=DictStr())
 5def main(atoms: Atoms,
 6         calculator: dict = {
 7             'name': 'gpaw',
 8             'mode': {'name': 'pw', 'ecut': 800},
 9             'xc': 'PBE',
10             'basis': 'dzp',
11             'kpts': {'density': 12.0, 'gamma': True},
12             'occupations': {'name': 'fermi-dirac',
13                             'width': 0.05},
14             'convergence': {'bands': 'CBM+3.0'},
15             'nbands': '200%',
16             'txt': 'gs.txt',
17             'charge': 0
18         }) -> Result:
19    """Extract derived quantities from groundstate in gs.gpw."""
20    calculaterecord = calculate(atoms=atoms, calculator=calculator)
21    calc = calculaterecord.result.calculation.load(parallel=False)
22    calc.atoms.calc = calc

In the future all recipes probably needs to take atoms as input. Most recipes probably also needs the calculator as input.