Exact exchange and Hybrid DFT
This is a quick sketch how to run a simple hybrid DFT calculation using DFTK.
Hybrid-DFT in DFTK is still in its early stages. MPI parallelisation does not work and $k$-point symmetry cannot yet be used to reduce the $k$-point grid when using exact exchange terms, hence the use_symmetries_for_kpoint_reduction=false argument below. 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())
basis = PlaneWaveBasis(model; Ecut=15, kgrid=[2, 2, 2],
use_symmetries_for_kpoint_reduction=false)
scfres = self_consistent_field(basis; tol=1e-6);
nothing # hide Downloading artifact: dojo.nc.sr.pbe.v0_5.stringent.upf
n Energy log10(ΔE) log10(Δρ) Diag Δtime
--- --------------- --------- --------- ---- ------
1 -8.363844520890 -0.82 5.8 172ms
2 -8.367912700648 -2.39 -1.67 1.0 118ms
3 -8.368235476136 -3.49 -2.64 2.0 112ms
4 -8.368255022045 -4.71 -3.16 2.5 128ms
5 -8.368255333250 -6.51 -3.79 1.9 115ms
6 -8.368255354631 -7.67 -4.78 1.9 117ms
7 -8.368255355771 -8.94 -5.86 2.8 146ms
8 -8.368255355782 -10.98 -6.27 2.6 134ms
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,
use_symmetries_for_kpoint_reduction=false)
scfres = self_consistent_field(basis; tol=1e-4, scfres.ρ, scfres.ψ, scfres.occupation,
scfres.eigenvalues, solver=DFTK.scf_damping_solver());
nothing # hiden Energy log10(ΔE) log10(Δρ) Diag Δtime
--- --------------- --------- --------- ---- ------
1 -8.229516166353 -2.20 1.0 7.11s
2 -8.229646597638 -3.88 -2.66 1.0 3.66s
3 -8.229683859470 -4.43 -2.79 5.9 2.42s
4 -8.229684369496 -6.29 -3.34 5.0 2.42s
5 -8.229684382996 -7.87 -4.03 4.6 2.40s
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.