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.916428861806                   -0.69    4.6    100ms
  2   -7.921212611805       -2.32       -1.52    1.0   50.3ms
  3   -7.921406295571       -3.71       -2.49    1.4   54.0ms
  4   -7.921440936833       -4.46       -2.82    2.6   72.5ms
  5   -7.921441637750       -6.15       -3.01    1.0   52.7ms
  6   -7.921442007381       -6.43       -4.52    1.0   73.2ms
  7   -7.921442021711       -7.84       -4.55    3.0   89.6ms
  8   -7.921442022124       -9.38       -5.24    1.0   51.6ms
  9   -7.921442022142      -10.74       -5.52    1.5   57.6ms
 10   -7.921442022144      -11.85       -6.04    1.2   55.1ms
 11   -7.921442022144      -12.42       -6.37    1.1   54.5ms
 12   -7.921442022144      -13.39       -6.86    1.2   60.6ms
 13   -7.921442022144      -13.97       -7.22    1.9   62.8ms
 14   -7.921442022144   +  -14.75       -8.28    1.1   55.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]);
110.411308 seconds (110.25 M allocations: 102.157 GiB, 7.53% gc time, 0.00% compilation time)

These are the final phonon frequencies:

phret_q0.frequencies
6-element Vector{Float64}:
 -0.0034981553624545037
 -0.002977451163806809
 -0.0029774511632177734
  0.004302230623137472
  0.004302230624403447
  0.004353201755117235