Phonon computations
This is a quick sketch how to run a simple phonon calculation using DFTK. First we run an SCF calculation.
using AtomsBuilder
using DFTK
using PseudoPotentialData
pseudopotentials = PseudoFamily("cp2k.nc.sr.lda.v0_1.semicore.gth")
model = model_DFT(bulk(:Si); pseudopotentials, functionals=LDA())
basis = PlaneWaveBasis(model; Ecut=10, kgrid=[4, 4, 4])
scfres = self_consistent_field(basis, tol=1e-8);
n Energy log10(ΔE) log10(Δρ) Diag Δtime
--- --------------- --------- --------- ---- ------
1 -7.916436036810 -0.69 4.5 102ms
2 -7.921205765518 -2.32 -1.52 1.0 51.3ms
3 -7.921403165242 -3.70 -2.49 1.4 55.0ms
4 -7.921440928302 -4.42 -2.81 2.5 72.6ms
5 -7.921441556083 -6.20 -2.95 1.1 61.1ms
6 -7.921442007147 -6.35 -4.50 1.0 81.9ms
7 -7.921442021768 -7.84 -4.57 3.0 80.1ms
8 -7.921442022126 -9.45 -5.34 1.0 51.0ms
9 -7.921442022143 -10.76 -6.13 1.9 59.9ms
10 -7.921442022144 -12.16 -6.12 2.1 66.1ms
11 -7.921442022144 -12.81 -6.74 1.0 60.8ms
12 -7.921442022144 -14.05 -7.18 1.1 52.3ms
13 -7.921442022144 + -Inf -7.48 1.2 55.1ms
14 -7.921442022144 + -Inf -8.03 1.0 59.4ms
Next we compute the phonon modes at the q-point [1/4, 1/4, 1/4]
.
scfres = DFTK.unfold_bz(scfres)
phret_q0 = @time DFTK.phonon_modes(scfres; q=[0.25, 0.25, 0.25]);
119.131391 seconds (108.95 M allocations: 101.975 GiB, 9.19% gc time, 0.30% compilation time: 100% of which was recompilation)
These are the final phonon frequencies:
phret_q0.frequencies
6-element Vector{Float64}:
-0.0034981553586915294
-0.002977451163635512
-0.00297745116313852
0.0043022306402171
0.004302230640266441
0.004353201770872342