Exact exchange and Hybrid DFT

This is a quick sketch how to run a simple hybrid DFT calculation using DFTK.

Preliminary implementation

Hybrid-DFT in DFTK is still in its early stages. MPI parallelisation does not work and all treatment of $k$-point symmetry is disabled when using exact exchange terms. We appreciate any issues, bug reports or PRs.

using AtomsBuilder
using DFTK
using PseudoPotentialData

pseudopotentials = PseudoFamily("dojo.nc.sr.pbe.v0_5.stringent.upf")
system = bulk(:Si)
FlexibleSystem(Si₂, periodicity = TTT):
    cell_vectors      : [       0    2.715    2.715;
                            2.715        0    2.715;
                            2.715    2.715        0]u"Å"

    Atom(Si, [       0,        0,        0]u"Å")
    Atom(Si, [  1.3575,   1.3575,   1.3575]u"Å")

First perform a PBE calculation to get a good starting point.

model  = model_DFT(system; pseudopotentials, functionals=PBE(), symmetries=false)
basis  = PlaneWaveBasis(model; Ecut=15, kgrid=[2, 2, 2])
scfres = self_consistent_field(basis; tol=1e-6);
nothing  # hide
n     Energy            log10(ΔE)   log10(Δρ)   Diag   Δtime 
---   ---------------   ---------   ---------   ----   ------
  1   -8.363845974973                   -0.82    5.6    197ms
  2   -8.367912064040       -2.39       -1.67    1.0   66.2ms
  3   -8.368233427770       -3.49       -2.64    1.9    110ms
  4   -8.368254973886       -4.67       -3.10    2.8    106ms
  5   -8.368255315547       -6.47       -3.74    1.4   73.3ms
  6   -8.368255353937       -7.42       -4.57    2.0   94.2ms
  7   -8.368255355281       -8.87       -5.08    2.4    101ms
  8   -8.368255355368      -10.06       -5.69    1.8   87.4ms
  9   -8.368255355375      -11.15       -6.11    2.1   95.8ms

Then run PBE0, see also PBE0 and HybridFunctional for more documentation.

model  = model_DFT(system; pseudopotentials, functionals=PBE0())
basis  = PlaneWaveBasis(model; basis.Ecut, basis.kgrid)
scfres = self_consistent_field(basis; tol=1e-4, scfres.ρ, scfres.ψ, scfres.occupation,
                               scfres.eigenvalues, solver=DFTK.scf_damping_solver());
nothing  # hide
n     Energy            log10(ΔE)   log10(Δρ)   Diag   Δtime 
---   ---------------   ---------   ---------   ----   ------
  1   -8.229516176320                   -2.20    1.0    6.74s
  2   -8.229646573800       -3.88       -2.66    1.0    2.91s
  3   -8.229683858477       -4.43       -2.79    5.9    2.22s
  4   -8.229684369132       -6.29       -3.34    5.0    1.73s
  5   -8.229684382669       -7.87       -4.03    4.6    2.15s

See also HSE and model_HF for setting up Hartree-Fock calculations and the example Hybrid DFT band structures how to compute band structures using DFTK and Hybrid functionals.