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.363752301213 -0.82 5.6 172ms
2 -8.367895747080 -2.38 -1.67 1.0 95.9ms
3 -8.368236629596 -3.47 -2.62 2.0 113ms
4 -8.368255041496 -4.73 -3.20 2.5 164ms
5 -8.368255333126 -6.54 -3.88 1.8 112ms
6 -8.368255354935 -7.66 -4.68 2.1 119ms
7 -8.368255355762 -9.08 -5.93 2.1 146ms
8 -8.368255355781 -10.71 -6.03 3.4 144ms
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.229516112846 -2.20 1.0 7.34s
2 -8.229646580198 -3.88 -2.66 1.0 3.83s
3 -8.229683858928 -4.43 -2.79 5.9 2.63s
4 -8.229684369470 -6.29 -3.34 5.0 2.61s
5 -8.229684382995 -7.87 -4.03 4.6 2.61s
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.