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.363810493268 -0.82 5.5 90.4ms
2 -8.367904551056 -2.39 -1.67 1.0 51.1ms
3 -8.368232144966 -3.48 -2.66 1.9 93.7ms
4 -8.368254995055 -4.64 -3.07 2.5 77.4ms
5 -8.368255315978 -6.49 -3.58 1.2 53.1ms
6 -8.368255353475 -7.43 -4.88 1.6 62.0ms
7 -8.368255355770 -8.64 -5.22 3.1 76.5ms
8 -8.368255355781 -10.95 -6.34 1.1 51.7ms
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.229516417964 -2.20 1.0 4.99s
2 -8.229646661313 -3.89 -2.66 1.0 2.26s
3 -8.229683860192 -4.43 -2.79 5.9 1.50s
4 -8.229684369482 -6.29 -3.34 5.0 1.49s
5 -8.229684382995 -7.87 -4.03 4.6 1.53s
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.