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.916456098405 -0.69 4.6 102ms
2 -7.921208929673 -2.32 -1.52 1.0 50.7ms
3 -7.921403835683 -3.71 -2.49 1.2 53.1ms
4 -7.921440860463 -4.43 -2.82 2.6 71.1ms
5 -7.921441556003 -6.16 -2.96 1.0 58.7ms
6 -7.921442005493 -6.35 -4.47 1.0 50.2ms
7 -7.921442021610 -7.79 -4.50 2.9 77.7ms
8 -7.921442022120 -9.29 -5.16 1.0 50.6ms
9 -7.921442022142 -10.66 -5.57 1.4 55.7ms
10 -7.921442022143 -11.89 -5.85 1.6 65.0ms
11 -7.921442022144 -12.18 -7.30 1.0 52.3ms
12 -7.921442022144 -13.40 -7.63 3.0 79.1ms
13 -7.921442022144 -14.75 -7.40 1.0 51.3ms
14 -7.921442022144 + -Inf -8.70 1.0 58.0ms
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]);
111.315994 seconds (107.35 M allocations: 102.086 GiB, 7.21% gc time, 0.31% compilation time: 100% of which was recompilation)
These are the final phonon frequencies:
phret_q0.frequencies
6-element Vector{Float64}:
-0.0034981553599279336
-0.0029774511620988616
-0.0029774511619724458
0.004302230630767245
0.004302230630981391
0.0043532017608360375