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.916399484911 -0.69 4.6 107ms
2 -7.921197328461 -2.32 -1.52 1.0 63.3ms
3 -7.921400952127 -3.69 -2.49 1.4 53.0ms
4 -7.921440824058 -4.40 -2.81 2.8 70.7ms
5 -7.921441532189 -6.15 -2.95 1.0 49.2ms
6 -7.921442002958 -6.33 -4.42 1.0 58.2ms
7 -7.921442021703 -7.73 -4.54 2.9 76.6ms
8 -7.921442022124 -9.38 -5.19 1.0 49.9ms
9 -7.921442022131 -11.21 -5.11 1.8 57.8ms
10 -7.921442022143 -10.90 -5.79 1.0 50.0ms
11 -7.921442022144 -12.12 -6.92 1.1 57.6ms
12 -7.921442022144 -13.32 -6.49 2.8 72.0ms
13 -7.921442022144 -13.82 -7.39 1.0 50.3ms
14 -7.921442022144 -14.75 -8.08 1.6 240ms
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]);
107.449567 seconds (110.19 M allocations: 102.050 GiB, 7.34% gc time, 0.00% compilation time)
These are the final phonon frequencies:
phret_q0.frequencies
6-element Vector{Float64}:
-0.00349815535484936
-0.00297745115424265
-0.0029774511536448957
0.004302230626879498
0.004302230627075558
0.004353201756931132