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.916449541161 -0.69 4.8 101ms
2 -7.921209888401 -2.32 -1.52 1.0 49.1ms
3 -7.921403655405 -3.71 -2.49 1.2 52.0ms
4 -7.921440985979 -4.43 -2.82 2.6 71.2ms
5 -7.921441557171 -6.24 -2.95 1.1 50.9ms
6 -7.921442007292 -6.35 -4.49 1.0 49.8ms
7 -7.921442021739 -7.84 -4.56 3.0 89.6ms
8 -7.921442022128 -9.41 -5.24 1.0 50.2ms
9 -7.921442022143 -10.83 -6.05 1.4 54.7ms
10 -7.921442022144 -12.07 -5.97 2.1 65.9ms
11 -7.921442022144 -12.52 -6.87 1.0 50.8ms
12 -7.921442022144 -14.15 -7.08 1.2 134ms
13 -7.921442022144 -14.75 -7.35 1.0 59.6ms
14 -7.921442022144 + -15.05 -8.21 1.1 52.2ms
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]);
113.606321 seconds (109.10 M allocations: 102.234 GiB, 8.60% gc time, 0.29% compilation time: 100% of which was recompilation)
These are the final phonon frequencies:
phret_q0.frequencies
6-element Vector{Float64}:
-0.003498155360712817
-0.002977451163861268
-0.0029774511635105847
0.004302230634527601
0.004302230635236202
0.004353201765385476