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 # hiden Energy log10(ΔE) log10(Δρ) Diag Δtime
--- --------------- --------- --------- ---- ------
1 -8.363770346505 -0.82 5.6 173ms
2 -8.367889225248 -2.39 -1.67 1.0 99.4ms
3 -8.368236126074 -3.46 -2.62 2.0 140ms
4 -8.368255041379 -4.72 -3.20 2.5 127ms
5 -8.368255333679 -6.53 -3.90 1.6 110ms
6 -8.368255354959 -7.67 -4.69 2.1 123ms
7 -8.368255355759 -9.10 -5.94 2.0 117ms
8 -8.368255355781 -10.65 -6.01 3.4 146ms
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.229516108819 -2.20 1.0 7.73s
2 -8.229646579596 -3.88 -2.66 1.0 3.92s
3 -8.229683858915 -4.43 -2.79 6.0 2.61s
4 -8.229684369474 -6.29 -3.34 5.0 2.59s
5 -8.229684382995 -7.87 -4.03 4.6 2.56s
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.