New API for GPAW?

Input-parameter naming and grouping

  • initial guess:

    • random

    • basis

    • hund

    • magmoms

  • environment (SolvationGPAW, SJM (solvated jellium model), CDFT):

    • background_charge

    • external

  • wave-function representation (basis set or grid-spacing):

    • mode

  • real-space wave-function grid:

    • h

    • gpts

  • more things:

    • kpts

    • nbands

    • setups

    • soc

    • xc

    • charge

    • symmetry

    • poissonsolver

  • can be changed on the fly:

    • occupations

    • convergence

    • eigensolver

    • mixer

  • not really parameters:

    • parallel

    • txt

DFT-calculation objects and ASE-calculators

atoms.calc = GPAW(...)  # ASE-calculator
e = atoms.get_potential_energy()
dft = atoms.calc.dft  # DFT-calculation (new-GPAW only)
from gpaw.dft import DFT, FermiDirac, MonkhorstPack, ...

dft = DFT(
    atoms=...
    mode=PW(600),
    xc='PBE',
    occupations=FermiDirac(0.2),
    # occupations={'name': 'fermi-dirac', 'width': 0.2},
    kpts=MonkhorstPack((4, 4, 1), include_gamma=True),
    txt='...')

e = dft.calculate_energy()

# Use ASE to do structure optimization:
atoms.calc = dft.create_ase_calculator()

# Magic tricks:
dft.converge(steps=4, mixer=..., eigensolver=...)
for ctx in dft.iconverge():
    dft.occupations = ...

Breaking backwards compatibility

  • Blöchl Poisson-solver?

  • ecut defaults?

  • GGA gradients with FFT?