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.916414686365                   -0.69    4.9    101ms
  2   -7.921194891752       -2.32       -1.52    1.0   49.7ms
  3   -7.921408287807       -3.67       -2.49    1.5   55.5ms
  4   -7.921440992798       -4.49       -2.87    2.5   67.9ms
  5   -7.921441751612       -6.12       -3.13    1.1   51.1ms
  6   -7.921442004365       -6.60       -4.50    1.0   50.0ms
  7   -7.921442021966       -7.75       -4.75    2.9   86.6ms
  8   -7.921442022134       -9.77       -5.22    1.0   50.5ms
  9   -7.921442022113   +  -10.69       -4.83    1.6   57.3ms
 10   -7.921442022143      -10.52       -5.89    1.0   52.3ms
 11   -7.921442022144      -12.05       -6.38    1.8   59.8ms
 12   -7.921442022144      -13.34       -6.56    1.2   59.6ms
 13   -7.921442022144      -13.88       -7.64    1.0   50.9ms
 14   -7.921442022144   +    -Inf       -7.59    2.4   70.5ms
 15   -7.921442022144      -15.05       -8.66    1.0   53.1ms

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]);
109.913595 seconds (110.23 M allocations: 102.104 GiB, 8.18% gc time, 0.00% compilation time)

These are the final phonon frequencies:

phret_q0.frequencies
6-element Vector{Float64}:
 -0.003498155353304599
 -0.002977451154161731
 -0.002977451153690431
  0.004302230635468482
  0.004302230635791849
  0.004353201767212687