Polarizability by linear response
We compute the polarizability of a Helium atom. The polarizability is defined as the change in dipole moment
\[μ = ∫ r ρ(r) dr\]
with respect to a small uniform electric field $E = -x$.
We compute this in two ways: first by finite differences (applying a finite electric field), then by linear response. Note that DFTK is not really adapted to isolated atoms because it uses periodic boundary conditions. Nevertheless we can simply embed the Helium atom in a large enough box (although this is computationally wasteful).
As in other tests, this is not fully converged, convergence parameters were simply selected for fast execution on CI,
using DFTK
using LinearAlgebra
using PseudoPotentialData
a = 10.
lattice = a * I(3) # cube of ``a`` bohrs
pseudopotentials = PseudoFamily("cp2k.nc.sr.lda.v0_1.largecore.gth")
# Helium at the center of the box
atoms = [ElementPsp(:He, pseudopotentials)]
positions = [[1/2, 1/2, 1/2]]
kgrid = [1, 1, 1] # no k-point sampling for an isolated system
Ecut = 30
tol = 1e-8
# dipole moment of a given density (assuming the current geometry)
function dipole(basis, ρ)
rr = [(r[1] - a/2) for r in r_vectors_cart(basis)]
sum(rr .* ρ) * basis.dvol
end;Using finite differences
We first compute the polarizability by finite differences. First compute the dipole moment at rest:
model = model_DFT(lattice, atoms, positions;
functionals=LDA(), symmetries=false)
basis = PlaneWaveBasis(model; Ecut, kgrid)
scfres = self_consistent_field(basis; tol)
μref = dipole(basis, scfres.ρ)-0.0001345737909289779Then in a small uniform field:
ε = .01
model_ε = model_DFT(lattice, atoms, positions;
functionals=LDA(),
extra_terms=[ExternalFromReal(r -> -ε * (r[1] - a/2))],
symmetries=false)
basis_ε = PlaneWaveBasis(model_ε; Ecut, kgrid)
res_ε = self_consistent_field(basis_ε; tol)
με = dipole(basis_ε, res_ε.ρ)0.017612222490006643polarizability = (με - μref) / ε
println("Reference dipole: $μref")
println("Displaced dipole: $με")
println("Polarizability : $polarizability")Reference dipole: -0.0001345737909289779
Displaced dipole: 0.017612222490006643
Polarizability : 1.774679628093562The result on more converged grids is very close to published results. For example DOI 10.1039/C8CP03569E quotes 1.65 with LSDA and 1.38 with CCSD(T).
Using linear response
Now we use linear response (also known as density-functional perturbation theory) to compute this analytically; we refer to standard textbooks for the formalism. In the following, $χ_0$ is the independent-particle polarizability, and $K$ the Hartree-exchange-correlation kernel. We denote with $δV_{\rm ext}$ an external perturbing potential (like in this case the uniform electric field).
# `δVext` is the potential from a uniform field interacting with the dielectric dipole
# of the density.
δVext = [-(r[1] - a/2) for r in r_vectors_cart(basis)]
δVext = cat(δVext; dims=4)54×54×54×1 Array{Float64, 4}:
[:, :, 1, 1] =
5.0 5.0 5.0 5.0 … 5.0 5.0 5.0
4.81481 4.81481 4.81481 4.81481 4.81481 4.81481 4.81481
4.62963 4.62963 4.62963 4.62963 4.62963 4.62963 4.62963
4.44444 4.44444 4.44444 4.44444 4.44444 4.44444 4.44444
4.25926 4.25926 4.25926 4.25926 4.25926 4.25926 4.25926
4.07407 4.07407 4.07407 4.07407 … 4.07407 4.07407 4.07407
3.88889 3.88889 3.88889 3.88889 3.88889 3.88889 3.88889
3.7037 3.7037 3.7037 3.7037 3.7037 3.7037 3.7037
3.51852 3.51852 3.51852 3.51852 3.51852 3.51852 3.51852
3.33333 3.33333 3.33333 3.33333 3.33333 3.33333 3.33333
⋮ ⋱
-3.33333 -3.33333 -3.33333 -3.33333 … -3.33333 -3.33333 -3.33333
-3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852
-3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037
-3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889
-4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407
-4.25926 -4.25926 -4.25926 -4.25926 … -4.25926 -4.25926 -4.25926
-4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444
-4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963
-4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481
[:, :, 2, 1] =
5.0 5.0 5.0 5.0 … 5.0 5.0 5.0
4.81481 4.81481 4.81481 4.81481 4.81481 4.81481 4.81481
4.62963 4.62963 4.62963 4.62963 4.62963 4.62963 4.62963
4.44444 4.44444 4.44444 4.44444 4.44444 4.44444 4.44444
4.25926 4.25926 4.25926 4.25926 4.25926 4.25926 4.25926
4.07407 4.07407 4.07407 4.07407 … 4.07407 4.07407 4.07407
3.88889 3.88889 3.88889 3.88889 3.88889 3.88889 3.88889
3.7037 3.7037 3.7037 3.7037 3.7037 3.7037 3.7037
3.51852 3.51852 3.51852 3.51852 3.51852 3.51852 3.51852
3.33333 3.33333 3.33333 3.33333 3.33333 3.33333 3.33333
⋮ ⋱
-3.33333 -3.33333 -3.33333 -3.33333 … -3.33333 -3.33333 -3.33333
-3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852
-3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037
-3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889
-4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407
-4.25926 -4.25926 -4.25926 -4.25926 … -4.25926 -4.25926 -4.25926
-4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444
-4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963
-4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481
[:, :, 3, 1] =
5.0 5.0 5.0 5.0 … 5.0 5.0 5.0
4.81481 4.81481 4.81481 4.81481 4.81481 4.81481 4.81481
4.62963 4.62963 4.62963 4.62963 4.62963 4.62963 4.62963
4.44444 4.44444 4.44444 4.44444 4.44444 4.44444 4.44444
4.25926 4.25926 4.25926 4.25926 4.25926 4.25926 4.25926
4.07407 4.07407 4.07407 4.07407 … 4.07407 4.07407 4.07407
3.88889 3.88889 3.88889 3.88889 3.88889 3.88889 3.88889
3.7037 3.7037 3.7037 3.7037 3.7037 3.7037 3.7037
3.51852 3.51852 3.51852 3.51852 3.51852 3.51852 3.51852
3.33333 3.33333 3.33333 3.33333 3.33333 3.33333 3.33333
⋮ ⋱
-3.33333 -3.33333 -3.33333 -3.33333 … -3.33333 -3.33333 -3.33333
-3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852
-3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037
-3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889
-4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407
-4.25926 -4.25926 -4.25926 -4.25926 … -4.25926 -4.25926 -4.25926
-4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444
-4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963
-4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481
;;; …
[:, :, 52, 1] =
5.0 5.0 5.0 5.0 … 5.0 5.0 5.0
4.81481 4.81481 4.81481 4.81481 4.81481 4.81481 4.81481
4.62963 4.62963 4.62963 4.62963 4.62963 4.62963 4.62963
4.44444 4.44444 4.44444 4.44444 4.44444 4.44444 4.44444
4.25926 4.25926 4.25926 4.25926 4.25926 4.25926 4.25926
4.07407 4.07407 4.07407 4.07407 … 4.07407 4.07407 4.07407
3.88889 3.88889 3.88889 3.88889 3.88889 3.88889 3.88889
3.7037 3.7037 3.7037 3.7037 3.7037 3.7037 3.7037
3.51852 3.51852 3.51852 3.51852 3.51852 3.51852 3.51852
3.33333 3.33333 3.33333 3.33333 3.33333 3.33333 3.33333
⋮ ⋱
-3.33333 -3.33333 -3.33333 -3.33333 … -3.33333 -3.33333 -3.33333
-3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852
-3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037
-3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889
-4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407
-4.25926 -4.25926 -4.25926 -4.25926 … -4.25926 -4.25926 -4.25926
-4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444
-4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963
-4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481
[:, :, 53, 1] =
5.0 5.0 5.0 5.0 … 5.0 5.0 5.0
4.81481 4.81481 4.81481 4.81481 4.81481 4.81481 4.81481
4.62963 4.62963 4.62963 4.62963 4.62963 4.62963 4.62963
4.44444 4.44444 4.44444 4.44444 4.44444 4.44444 4.44444
4.25926 4.25926 4.25926 4.25926 4.25926 4.25926 4.25926
4.07407 4.07407 4.07407 4.07407 … 4.07407 4.07407 4.07407
3.88889 3.88889 3.88889 3.88889 3.88889 3.88889 3.88889
3.7037 3.7037 3.7037 3.7037 3.7037 3.7037 3.7037
3.51852 3.51852 3.51852 3.51852 3.51852 3.51852 3.51852
3.33333 3.33333 3.33333 3.33333 3.33333 3.33333 3.33333
⋮ ⋱
-3.33333 -3.33333 -3.33333 -3.33333 … -3.33333 -3.33333 -3.33333
-3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852
-3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037
-3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889
-4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407
-4.25926 -4.25926 -4.25926 -4.25926 … -4.25926 -4.25926 -4.25926
-4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444
-4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963
-4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481
[:, :, 54, 1] =
5.0 5.0 5.0 5.0 … 5.0 5.0 5.0
4.81481 4.81481 4.81481 4.81481 4.81481 4.81481 4.81481
4.62963 4.62963 4.62963 4.62963 4.62963 4.62963 4.62963
4.44444 4.44444 4.44444 4.44444 4.44444 4.44444 4.44444
4.25926 4.25926 4.25926 4.25926 4.25926 4.25926 4.25926
4.07407 4.07407 4.07407 4.07407 … 4.07407 4.07407 4.07407
3.88889 3.88889 3.88889 3.88889 3.88889 3.88889 3.88889
3.7037 3.7037 3.7037 3.7037 3.7037 3.7037 3.7037
3.51852 3.51852 3.51852 3.51852 3.51852 3.51852 3.51852
3.33333 3.33333 3.33333 3.33333 3.33333 3.33333 3.33333
⋮ ⋱
-3.33333 -3.33333 -3.33333 -3.33333 … -3.33333 -3.33333 -3.33333
-3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852 -3.51852
-3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037 -3.7037
-3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889 -3.88889
-4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407 -4.07407
-4.25926 -4.25926 -4.25926 -4.25926 … -4.25926 -4.25926 -4.25926
-4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444 -4.44444
-4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963 -4.62963
-4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481 -4.81481Then:
\[δρ = χ_0 δV = χ_0 (δV_{\rm ext} + K δρ),\]
which implies
\[δρ = (1-χ_0 K)^{-1} χ_0 δV_{\rm ext}.\]
From this we identify the polarizability operator to be $χ = (1-χ_0 K)^{-1} χ_0$. Numerically, we apply $χ$ to $δV = -x$ by solving a linear equation (the Dyson equation) iteratively.
First we do this using the DFTK.solve_ΩplusK_split function provided by DFTK, which uses an adaptive Krylov subspace algorithm [HS2025]:
# Multiply δVext times the Bloch waves, then solve the Dyson equation:
δVψ = DFTK.multiply_ψ_by_blochwave(scfres.basis, scfres.ψ, δVext)
res = DFTK.solve_ΩplusK_split(scfres, δVψ; verbose=true)(δψ = Matrix{ComplexF64}[[0.0029733616702558095 + 0.0014219829296717053im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im; 0.13582534741770588 - 0.27798861537946307im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im; … ; 0.017866388979113676 - 0.036974842427334884im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im; -0.03464010785742551 + 0.07315090464150768im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im]], δρ = [-3.620695864535781e-7 -2.502016490092512e-7 … -4.880646646390318e-8 -2.5020159625139675e-7; -6.293620037436665e-7 -4.793039394047904e-7 … -1.207785801640249e-7 -4.793038957068686e-7; … ; 1.3626276790414172e-7 1.1356246333904736e-7 … 4.712007278299818e-8 1.135624659348405e-7; 1.3305487439017134e-7 1.363264939549643e-7 … 5.2006935646707034e-8 1.3632652459318063e-7;;; -2.502015998097709e-7 -1.7404916850942962e-7 … -3.556497565021996e-8 -1.7404913147786298e-7; -4.793039067271569e-7 -3.6797344582852515e-7 … -1.120290937907138e-7 -3.6797341748689406e-7; … ; 1.1356246179827117e-7 1.1211115556833334e-7 … 1.0980703724138763e-7 1.1211116454650383e-7; 1.3632652830520877e-7 1.255087633220263e-7 … 5.094917779501899e-8 1.255087878704349e-7;;; -4.880647426012645e-8 -3.556498769972782e-8 … -1.1412182323105039e-8 -3.5564980613728834e-8; -1.207786046372695e-7 -1.1202911318281618e-7 … -9.7862398721021e-8 -1.1202911023551345e-7; … ; 4.7120067822109194e-8 1.0980702429598836e-7 … 2.493825667061492e-7 1.0980703549709724e-7; 5.200694213954047e-8 5.094917286033048e-8 … 4.910637689014479e-8 5.0949182065730756e-8;;; … ;;; 6.475762990384451e-8 4.1103346551875984e-8 … -6.681725832731649e-9 4.110333209915917e-8; 1.6897553968695038e-7 6.653279092975213e-8 … -1.329446489188237e-7 6.653276824955073e-8; … ; 3.267776777166291e-8 1.6017383303839922e-7 … 3.8470385640740565e-7 1.6017383854590089e-7; -9.141988018178143e-8 -3.5830297202519744e-8 … 7.037291727406695e-8 -3.583029657085552e-8;;; -4.8806493941750456e-8 -3.5565002516161836e-8 … -1.1412185934523688e-8 -3.556499518526123e-8; -1.207786063480749e-7 -1.120291157880514e-7 … -9.786240453172364e-8 -1.120291145115275e-7; … ; 4.712005871536347e-8 1.098070129944023e-7 … 2.4938251933704273e-7 1.0980701048064503e-7; 5.200691832096945e-8 5.094915284389433e-8 … 4.9106355381935216e-8 5.094915851429467e-8;;; -2.5020164984965817e-7 -1.7404920616136208e-7 … -3.556498219074015e-8 -1.740491675840469e-7; -4.793039343989513e-7 -3.679734680556374e-7 … -1.120290945641515e-7 -3.679734362200981e-7; … ; 1.1356245755692166e-7 1.1211115757720333e-7 … 1.098070228338163e-7 1.121111546159504e-7; 1.363264862971406e-7 1.2550873352576516e-7 … 5.094916471004378e-8 1.2550875446694742e-7;;;;], δHtotψ = Matrix{ComplexF64}[[-0.0017295669137632884 - 0.0008271495968570588im 0.04284048348956478 + 0.08512469765344124im -0.6448441224038094 + 0.8619328962810132im -1.6784428710868073 - 0.4479146155422821im; -0.08717793059024212 + 0.1781111938313134im 1.493447380668352 - 0.6452053956431532im -0.14251194611470386 + 0.1901406548645323im -0.37107497417190605 - 0.10134001823441902im; … ; -0.021446939282356216 + 0.04407926856031184im -0.018454795937982528 + 0.009345855455583266im 0.011290684169746627 - 0.01985183671018606im 0.020865370233109703 + 0.003554853653789846im; 0.030979352728102694 - 0.06540907018943738im 0.022885102729520095 - 0.011453155421479129im 0.040351922727020574 - 0.06825215791190882im -0.03965790857232264 - 0.05083244371245918im]], δVind = [0.00196543222068338 0.002081001101911048 … 0.0031536636655460828 0.0020810006775816773; 0.003889132068197734 0.004779270759418402 … 0.010276667859954292 0.004779270217618061; … ; -0.006150847561591108 -0.008269600830293817 … -0.017302948632398042 -0.008269601595542426; 0.00023868162646744837 -0.00039869777427835036 … -0.0036646948495963733 -0.0003986981976137219;;; 0.002081000677559293 0.0022232285168654305 … 0.0034201173514378275 0.0022232280291650196; 0.004779270242964665 0.005734954438142573 … 0.010903592858616857 0.005734953803672081; … ; -0.008269601926162138 -0.009601005169041391 … -0.012623107009885977 -0.009601005700266372; -0.0003986982346418466 -0.001073013592083876 … -0.004230680648229634 -0.001073014058687992;;; 0.003153663568604767 0.0034201181559257794 … 0.004832496891010031 0.00342011725549224; 0.010276667303144082 0.010903593600568867 … 0.012272133986692479 0.010903592387506982; … ; -0.01730294982766842 -0.012623106858708663 … -0.00962026560810246 -0.012623107251204094; -0.003664694749429412 -0.004230679845002867 … -0.0054911077673603075 -0.0042306805143502305;;; … ;;; -0.0023365619589095425 -0.002815465583313679 … 0.005693310127146744 -0.002815464958307841; -0.012913098458384823 -0.017841194608636538 … 0.011498337473331963 -0.01784119506135227; … ; -0.02517442480081072 -0.01281088220749478 … -0.00839587476093966 -0.01281088285087989; 0.007597980066924975 0.010225417699975422 … -0.005449731724074232 0.010225418978999869;;; 0.0031536652173369756 0.003420119974478244 … 0.00483249990745666 0.0034201191277568425; 0.010276669385956195 0.010903595711342518 … 0.01227213607270297 0.010903594451367373; … ; -0.01730294726787131 -0.012623104464740674 … -0.009620264181480077 -0.012623105526427196; -0.003664693027746125 -0.004230678013420671 … -0.0054911059909299904 -0.004230678775713693;;; 0.0020810011266003733 0.002223229015212414 … 0.003420118325824843 0.0022232285474160507; 0.004779270731263068 0.005734954972645222 … 0.01090359396072065 0.005734954372000487; … ; -0.008269600742396811 -0.009601003704519065 … -0.0126231062444714 -0.009601004705749547; -0.0003986976993788367 -0.0010730129851736162 … -0.00423067982716186 -0.001073013463595619;;;;], δρ0 = [-3.602141992391646e-7 -2.488844128541989e-7 … -4.85284199191747e-8 -2.488844022582811e-7; -5.972253514801928e-7 -4.6069810399755853e-7 … -1.1905783528182328e-7 -4.6069809128882156e-7; … ; 1.2735803965302368e-7 1.0836355131535218e-7 … 4.640734958682157e-8 1.0836354681176808e-7; 1.0352014449146275e-7 1.1957969370859326e-7 … 5.0695131800067006e-8 1.1957969339195585e-7;;; -2.4888441486190977e-7 -1.7310684013191108e-7 … -3.535702786414531e-8 -1.7310683392815673e-7; -4.606981085343942e-7 -3.572173252658302e-7 … -1.1091455796332523e-7 -3.572173197856618e-7; … ; 1.0836354149905366e-7 1.0846513435774601e-7 … 1.0862256129679391e-7 1.084651366610257e-7; 1.195796905250214e-7 1.1611155111223314e-7 … 5.0208383378451464e-8 1.1611155257303591e-7;;; -4.8528431457464645e-8 -3.535703404937637e-8 … -1.1341357046101401e-8 -3.5357034161726285e-8; -1.1905786222907569e-7 -1.1091457193229689e-7 … -9.77068569526989e-8 -1.1091457549111847e-7; … ; 4.6407343800073646e-8 1.0862255297672524e-7 … 2.4845268588087877e-7 1.08622558584836e-7; 5.0695135375285986e-8 5.0208383791171854e-8 … 4.926867227945434e-8 5.020838637975958e-8;;; … ;;; 6.43457008194623e-8 4.083861364280166e-8 … -6.637960470345805e-9 4.0838608542838945e-8; 1.6975029273249072e-7 6.683076831630001e-8 … -1.3340496334267498e-7 6.683074920703755e-8; … ; 3.2710121585910704e-8 1.602354071607031e-7 … 3.8390166613783486e-7 1.6023540533837975e-7; -9.27136386101634e-8 -3.633616405665591e-8 … 7.12631704428329e-8 -3.633615968181546e-8;;; -4.8528423623461687e-8 -3.535702830511342e-8 … -1.1341353756136997e-8 -3.535702819712719e-8; -1.1905784364563302e-7 -1.1091455602750144e-7 … -9.770684729900412e-8 -1.1091456126225532e-7; … ; 4.6407341648577084e-8 1.0862255724866451e-7 … 2.484526713067283e-7 1.0862254917118039e-7; 5.069513227145917e-8 5.020838256505172e-8 … 4.9268666311632105e-8 5.0208381598319954e-8;;; -2.488844036069209e-7 -1.731068328235671e-7 … -3.535702415931598e-8 -1.7310682535902105e-7; -4.606980918588987e-7 -3.572173144100347e-7 … -1.1091454953756015e-7 -3.5721730574339003e-7; … ; 1.0836354728108931e-7 1.0846514541600215e-7 … 1.0862255469886498e-7 1.0846513604367669e-7; 1.1957969349034485e-7 1.1611155470824165e-7 … 5.02083796905361e-8 1.1611155249962673e-7;;;;], δeigenvalues = [[0.0004950048558091768, 0.09679858291421115, 0.03910025998615446, 0.012186539765727956]], δoccupation = [[0.0, 0.0, 0.0, 0.0]], δεF = 0.0, ε_adj = DFTK.DielectricAdjoint{Array{Float64, 4}, Vector{Matrix{ComplexF64}}, Vector{Vector{Float64}}, Float64, Vector{Vector{Float64}}, StaticArraysCore.SVector{3, Float64}}(Hamiltonian(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), HamiltonianBlock[DFTK.DftHamiltonianBlock(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809), Any[DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809), [0.0, 0.19739208802178715, 0.7895683520871486, 1.7765287921960844, 3.1582734083485944, 4.934802200544679, 7.106115168784338, 9.67221231306757, 12.633093633394378, 15.988759129764759 … 20.133992978222288, 16.38354330580833, 13.027877809437953, 10.066996489111146, 7.5008993448279115, 5.329586376588253, 3.5530575843921683, 2.1713129682396586, 1.184352528130723, 0.5921762640653614]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809), [0.1603906580688546 0.1602471565738079 … 0.15981840036267833 0.16024715657380792; 0.16024715657380803 0.16010321540768782 … 0.15967315066597979 0.16010321540768782; … ; 0.15981840036267841 0.1596731506659797 … 0.15923916395256382 0.1596731506659797; 0.16024715657380809 0.16010321540768785 … 0.1596731506659798 0.16010321540768785;;; 0.16024715657380786 0.16010321540768765 … 0.15967315066597965 0.16010321540768768; 0.16010321540768782 0.1599588345026577 … 0.15952744714353234 0.1599588345026577; … ; 0.15967315066597973 0.15952744714353229 … 0.15909210945052638 0.15952744714353229; 0.16010321540768785 0.15995883450265772 … 0.15952744714353242 0.15995883450265772;;; 0.1598184003626783 0.15967315066597965 … 0.15923916395256382 0.15967315066597965; 0.15967315066597973 0.15952744714353237 … 0.1590921094505264 0.15952744714353237; … ; 0.15923916395256385 0.15909210945052635 … 0.15865272241895537 0.15909210945052635; 0.1596731506659798 0.15952744714353237 … 0.15909210945052646 0.15952744714353237;;; … ;;; 0.15910963392556968 0.15896221057980836 … 0.1585217272926462 0.15896221057980836; 0.15896221057980842 0.15881431920357322 … 0.15837242838914242 0.15881431920357322; … ; 0.15852172729264621 0.15837242838914237 … 0.157926332522532 0.15837242838914237; 0.15896221057980844 0.15881431920357328 … 0.1583724283891425 0.15881431920357328;;; 0.1598184003626783 0.15967315066597962 … 0.15923916395256382 0.15967315066597962; 0.15967315066597973 0.15952744714353237 … 0.1590921094505264 0.15952744714353237; … ; 0.15923916395256382 0.15909210945052635 … 0.15865272241895534 0.15909210945052635; 0.15967315066597979 0.15952744714353237 … 0.15909210945052646 0.15952744714353237;;; 0.16024715657380786 0.16010321540768765 … 0.15967315066597965 0.16010321540768768; 0.16010321540768782 0.15995883450265772 … 0.15952744714353237 0.15995883450265772; … ; 0.1596731506659797 0.15952744714353229 … 0.15909210945052635 0.15952744714353229; 0.16010321540768785 0.15995883450265772 … 0.15952744714353242 0.15995883450265772]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809), Matrix{ComplexF64}(undef, 7809, 0), Matrix{Float64}(undef, 0, 0)), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809)), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809)), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809), [-0.15475965281255047 -0.15461620269010157 … -0.15418753098335333 -0.15461620268574952; -0.1546162026877995 -0.15447229888924557 … -0.15404229466027144 -0.1544722988848922; … ; -0.15418753098795213 -0.1540422946672161 … -0.15360833733156226 -0.15404229466278294; -0.15461620268805884 -0.1544722988895184 … -0.15404229466050867 -0.15447229888513966;;; -0.1546162026897451 -0.15447229889120792 … -0.15404229466222152 -0.15447229888683378; -0.1544722988888912 -0.15432794308236436 … -0.1538966028147746 -0.1543279430779888; … ; -0.15404229466684816 -0.1538966028217619 … -0.1534612869971103 -0.15389660281730663; -0.1544722988891577 -0.1543279430826441 … -0.15389660281501882 -0.15432794307824335;;; -0.15418753099130403 -0.15404229467057362 … -0.15360833733496768 -0.15404229466615088; -0.15404229466822825 -0.1538966028231312 … -0.1534612869985394 -0.15389660281870662; … ; -0.15360833733965024 -0.1534612870056125 … -0.15302191312358418 -0.1534612870011071; -0.15404229466850322 -0.15389660282341946 … -0.15346128699879202 -0.15389660281896964;;; … ;;; -0.1534788058382028 -0.15333139195026763 … -0.15289092490657347 -0.1533313919458162; -0.15333139194792045 -0.1531835057280193 … -0.15274162875815636 -0.15318350572356726; … ; -0.15289092491126202 -0.15274162876523822 … -0.15229553956980357 -0.15274162876069966; -0.15333139194817105 -0.15318350572828496 … -0.15274162875838163 -0.15318350572380438;;; -0.15418753098408405 -0.15404229466331518 … -0.1536083373276881 -0.15404229465892386; -0.1540422946609973 -0.15389660281586115 … -0.1534612869912495 -0.1538966028114691; … ; -0.15360833733231788 -0.15346128699824155 … -0.15302191311618873 -0.15346128699376665; -0.15404229466124933 -0.1538966028161274 … -0.1534612869914774 -0.1538966028117083;;; -0.1546162026861134 -0.1544722988875564 … -0.15404229465855943 -0.15447229888319852; -0.15447229888525393 -0.15432794307870704 … -0.15389660281110715 -0.1543279430743481; … ; -0.1540422946631591 -0.15389660281805329 … -0.15346128699338968 -0.15389660281361361; -0.15447229888550845 -0.15432794307897538 … -0.15389660281133896 -0.15432794307459052]), DFTK.RealSpaceMultiplication{Float64, SubArray{Float64, 3, Array{Float64, 4}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809), [-0.01516390003726769 -0.012550131596551974 … -0.004966871090106587 -0.012550131545947637; -0.012550131548302037 -0.010362597627555394 … -0.0041351622140528375 -0.010362597610950843; … ; -0.004966871332922805 -0.004135162620114075 … -0.0020697852963981953 -0.004135162530570594; -0.012550131608312894 -0.01036259774880997 … -0.004135162372781841 -0.010362597673976046;;; -0.012550131622436117 -0.01036259768149593 … -0.004135162361371169 -0.010362597702162999; -0.010362597698053824 -0.008622041763488068 … -0.003897514920618319 -0.008622041809351257; … ; -0.004135162403572569 -0.0038975150315121265 … -0.0034841109131352743 -0.0038975150983313164; -0.01036259770628863 -0.008622041824508816 … -0.003897515058633668 -0.00862204184000957;;; -0.004966871523329126 -0.004135162561991002 … -0.002069785141108767 -0.004135162681201965; -0.004135162692695849 -0.0038975151245264914 … -0.003484110753005996 -0.003897515254843717; … ; -0.0020697851355060554 -0.0034841107381818424 … -0.0056205830567392576 -0.0034841108621098023; -0.004135162650814574 -0.0038975151430848867 … -0.0034841108370671724 -0.0038975152537027327;;; … ;;; -0.006547896826852646 -0.004876338586880743 … -0.0014866486961315224 -0.0048763382997022; -0.004876338417679139 -0.0026779862306069435 … -0.0041230570916017 -0.0026779857678573046; … ; -0.0014866483517237377 -0.004123056894572239 … -0.007170897399467795 -0.004123056881448363; -0.0048763384816959306 -0.002677986171510098 … -0.004123056946284398 -0.002677985967567835;;; -0.004966871261990077 -0.004135162350983276 … -0.0020697848444443056 -0.004135162427218962; -0.004135162379561054 -0.0038975148576264247 … -0.0034841106030357024 -0.0038975150217895127; … ; -0.0020697850711794375 -0.003484110823111757 … -0.00562058286264807 -0.0034841106740486016; -0.00413516242680589 -0.0038975150220476778 … -0.0034841105446003348 -0.0038975149772799535;;; -0.012550131552926842 -0.010362597660186622 … -0.004135162173040235 -0.010362597598481531; -0.010362597600919204 -0.008622041708455952 … -0.0038975147717968507 -0.008622041698945225; … ; -0.004135162537684251 -0.0038975152780883703 … -0.0034841107808411555 -0.0038975150835771732; -0.010362597681855046 -0.008622041865987091 … -0.0038975148584095686 -0.008622041750633287])], DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809), [0.0, 0.19739208802178715, 0.7895683520871486, 1.7765287921960844, 3.1582734083485944, 4.934802200544679, 7.106115168784338, 9.67221231306757, 12.633093633394378, 15.988759129764759 … 20.133992978222288, 16.38354330580833, 13.027877809437953, 10.066996489111146, 7.5008993448279115, 5.329586376588253, 3.5530575843921683, 2.1713129682396586, 1.184352528130723, 0.5921762640653614]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809), [-0.00953289478096355 -0.006919177712845649 … 0.0006639982892184112 -0.006919177657889238; -0.006919177662293498 -0.004731681109113147 … 0.0014956937916555026 -0.004731681088155217; … ; 0.0006639980418034833 0.0014956933786495147 … 0.003561041324603366 0.001495693472626172; -0.006919177722563648 -0.0047316812306405324 … 0.0014956936326892996 -0.004731681151427861;;; -0.006919177738373356 -0.004731681165016197 … 0.0014956936423869537 -0.004731681181309098; -0.004731681179257194 -0.0029911503431947414 … 0.0017333294081394203 -0.002991150384682374; … ; 0.0014956935955590042 0.0017333292902582576 … 0.002146711540280788 0.0017333292278943371; -0.00473168118775848 -0.0029911504044952096 … 0.001733329269879933 -0.0029911504155952055;;; 0.0006639978480451492 0.0014956934334150237 … 0.0035610414764873795 0.0014956933186268005; 0.0014956933050556337 0.0017333291958746824 … 0.002146711698981015 0.0017333290699820285; … ; 0.003561041477407559 0.002146711706731993 … 1.0226238631928786e-5 0.002146711587309457; 0.0014956933466620179 0.0017333291770280177 … 0.0021467116146672628 0.001733329070860001;;; … ;;; -0.0009170687394857782 0.0007544800426599919 … 0.004144153689941197 0.0007544803342899743; 0.0007544802142088296 0.0029528272449469706 … 0.0015077425393843612 0.0029528277121486594; … ; 0.004144154029660454 0.0015077427293319033 … -0.0015401044467393751 0.0015077427469943434; 0.0007544801499414604 0.002952827303778223 … 0.0015077426844764819 0.0029528275122010688;;; 0.0006639981166041732 0.0014956936516811658 … 0.0035610417804314066 0.0014956935798368003; 0.0014956936254213668 0.0017333294700447948 … 0.0021467118562411994 0.001733329310273749; … ; 0.003561041549066506 0.0021467116291730435 … 1.0226440118533964e-5 0.0021467117827110916; 0.001495693577924566 0.0017333293053572825 … 0.0021467119144487215 0.0017333293545441107;;; -0.006919177665232375 -0.004731681140055365 … 0.0014956938343799854 -0.004731681073992371; -0.004731681078485317 -0.0029911502845052732 … 0.0017333295606283715 -0.002991150270635616; … ; 0.0014956934651363437 0.0017333290473906305 … 0.002146711676295514 0.0017333292463414984; -0.004731681159675649 -0.0029911504423047533 … 0.0017333294737838945 -0.002991150322566095]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(lda_x+lda_c_pw, spin_polarization = :none), Ecut = 30.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([ 0, 0, 0], spin = 1, num. G vectors = 7809), Matrix{ComplexF64}(undef, 7809, 0), Matrix{Float64}(undef, 0, 0)), nothing, @NamedTuple{ψ_reals::Array{ComplexF64, 3}}[(ψ_reals = [-1.3749128967737938e-6 - 9.45716981911071e-7im 0.00392386037614835 - 0.0005757792409131338im … 0.0025479136121773272 - 0.0004318480045038767im -0.003779320833459404 + 0.0006134365821130769im; -0.00691862060509809 + 0.014314489943497712im 0.004346451340458591 - 0.013490024353585947im … -0.005970269735871689 + 0.00912675480081323im 0.008861434958289815 - 0.014188208880947956im; … ; -0.0088956789815948 + 0.018524996862025758im 0.00873556524990163 - 0.01665737121503475im … -0.004383919998064851 + 0.010725619852278288im 0.007184086646292045 - 0.016417555228822663im; 0.0067911660344942976 - 0.014351960996318355im -0.008887510851988934 + 0.014180804420490035im … 0.002472206965223641 - 0.00852837651166367im -0.00437111068699937 + 0.013483493781866796im;;; 0.0018333869620209007 + 0.004295180525331244im -0.003377187343570345 - 0.002181989344247449im … -0.0013767908982660999 + 0.0011646751888568833im 0.0011390993383926082 - 0.0028800522615590133im; 0.005568593853039711 - 0.01634513445927618im -0.003656821406567406 + 0.013572258262026491im … 0.004587851329090854 - 0.008384813047403194im -0.0065649202057779035 + 0.014022323377688124im; … ; 0.0083176408831916 - 0.01567712903883918im -0.00782384074468015 + 0.013800323673236253im … 0.004029345212860278 - 0.008987654958419931im -0.006605917871838468 + 0.013611873141492373im; -0.007664642775251732 + 0.011326182194286466im 0.00798367848654364 - 0.010767603624198312im … -0.0025659263378942157 + 0.006574968446563134im 0.0050746914307333605 - 0.010317855332348917im;;; -0.001280160242406174 - 0.0029434588533331736im 0.0016732492584525048 + 0.0019084464931845742im … 0.00041101000541480566 - 0.001119345843629287im 0.00012183665095949844 + 0.0021487014363059317im; -0.0033385722974159492 + 0.010850999872967712im 0.0022940783834611792 - 0.008901971175794835im … -0.0026415485677018877 + 0.005752384738663463im 0.003511691450051231 - 0.00909070099943808im; … ; -0.005651185054833596 + 0.00989731008788727im 0.005279862376259041 - 0.008735799763959448im … -0.0029570734341225753 + 0.00600639423279261im 0.00457987276715998 - 0.008627375561933276im; 0.0051043725920927345 - 0.00680393024827831im -0.004860159110794211 + 0.006057711410131578im … 0.001960765573279378 - 0.0038718489730452917im -0.0036422737479660777 + 0.00586903823730982im;;; … ;;; -0.0004901888385998764 - 0.001264564153771639im 0.00010275151700124414 + 0.0011122784148431143im … -0.0006812102036753381 - 0.0006367437842049637im 0.0007122236631949965 + 0.0010179223236993554im; 0.0024235570347959975 - 0.003146817246385881im -0.0018672694002343443 + 0.002776963058555915im … 0.001895634873151736 - 0.0021305321408824985im -0.0023961110425665547 + 0.002858918947679554im; … ; 0.002580948671421771 - 0.006645798444898033im -0.002523289026481676 + 0.006020908850089573im … 0.0015020718900955656 - 0.004490917615176088im -0.0021509607582798564 + 0.005963266900428062im; -0.0016052211226045428 + 0.005277817698658508im 0.0017030524585611901 - 0.004688743558007989im … -0.000683545803595875 + 0.003263100436823398im 0.0011739752697389075 - 0.004606835451729132im;;; 0.0011585935644467002 + 0.002883127717878609im -2.5681672011535994e-6 - 0.0020938561019461146im … 0.0012162692474589837 + 0.0008047107776134529im -0.0015531985143198066 - 0.0018539800164083192im; -0.005013988809984851 + 0.006848932334546032im 0.003545160980734266 - 0.005914227037891778im … -0.0033164981216688965 + 0.004139908616488882im 0.004762328610900205 - 0.0061027685925327865im; … ; -0.004845656362088259 + 0.011821119096751521im 0.004604676306732556 - 0.010348165531354876im … -0.002516595277647574 + 0.007058606077449872im 0.003904769395882194 - 0.010239858481544517im; 0.0034289590790769564 - 0.010806213988939113im -0.0036089634053602365 + 0.009045569517977723im … 0.0012857508263032194 - 0.005484343243224284im -0.002391516695991414 + 0.008857206309666563im;;; -0.0017409915243968579 - 0.004245375998488132im -0.0012806526225609825 + 0.0028248934391299036im … -0.002096537334372733 - 0.0005556862813167359im 0.0032341733915070567 + 0.0021274675356489506im; 0.007664466135206093 - 0.011338846494215776im -0.005007173486765567 + 0.01034789596833089im … 0.0051529350397138095 - 0.007034711418456565im -0.007914517671544923 + 0.010797789896920998im; … ; 0.007597453315847459 - 0.017396997403264655im -0.007258326282927779 + 0.015150285306410471im … 0.003704443011562009 - 0.009763658369037292im -0.006040631586459783 + 0.014962015349595188im; -0.005568861410959759 + 0.016332821861160904im 0.00663317480873401 - 0.013992044270057673im … -0.0020007667951610656 + 0.00792524544171963im 0.003725031486980613 - 0.013542777145094498im],)])]), [8.519877653996819e-7 4.627267766244925e-7 … 2.417782299085159e-8 4.627267706183914e-7; 4.627267708978239e-7 2.5014494479905274e-7 … 1.3583027696214746e-8 2.501449435147896e-7; … ; 2.4177826716586962e-8 1.3583031885393273e-8 … 1.565933383663221e-9 1.35830309616059e-8; 4.627267780203676e-7 2.5014495417730746e-7 … 1.358302933375981e-8 2.5014494838938644e-7;;; 4.627267796966015e-7 2.501449489709978e-7 … 1.3583029216040871e-8 2.501449505694647e-7; 2.501449502516576e-7 1.3895621364716435e-7 … 1.1280019345200904e-8 1.3895621600519205e-7; … ; 1.3583029651414329e-8 1.1280020352070722e-8 … 7.937781240677468e-9 1.1280020958763648e-8; 2.50144950888565e-7 1.389562167845017e-7 … 1.1280020598324864e-8 1.3895621758146438e-7;;; 2.417782963815594e-8 1.3583031285756486e-8 … 1.5659330190038539e-9 1.3583032515614024e-8; 1.3583032634190528e-8 1.1280021196606974e-8 … 7.9377800985248e-9 1.1280022379838235e-8; … ; 1.565933005847389e-9 7.93777999278813e-9 … 3.571861901150626e-8 7.93778087672957e-9; 1.3583032202118923e-8 1.1280021365111417e-8 … 7.937780698105258e-9 1.1280022369476253e-8;;; … ;;; 5.7918393575518494e-8 2.2816005738304948e-8 … 5.620422904485024e-10 2.2816001504440335e-8; 2.281600324377259e-8 3.4892688828595277e-9 … 1.3458538182998912e-8 3.4892670038145378e-9; … ; 5.62041888200822e-10 1.345853616315239e-8 … 7.72832219784072e-8 1.3458536028612726e-8; 2.2816004187567653e-8 3.4892686428892708e-9 … 1.345853669327844e-8 3.4892678147606852e-9;;; 2.417782562820785e-8 1.3583029108875738e-8 … 1.5659323223641945e-9 1.3583029895364953e-8; 1.3583029403699454e-8 1.1280018773254422e-8 … 7.937779028832835e-9 1.1280020263794227e-8; … ; 1.5659328547944969e-9 7.937780598567147e-9 … 3.571861511365451e-8 7.937779535342187e-9; 1.35830298911033e-8 1.1280020266136714e-8 … 7.937778612028664e-9 1.1280019859667461e-8;;; 4.627267714467479e-7 2.5014494732287126e-7 … 1.3583027273102727e-8 2.50144942550373e-7; 2.501449427389057e-7 1.3895621081774446e-7 … 1.1280017993956913e-8 1.3895621032875666e-7; … ; 1.358303103499553e-8 1.1280022590892619e-8 … 7.937780297062454e-9 1.1280020824802879e-8; 2.5014494899878175e-7 1.3895621891706512e-7 … 1.1280018780368175e-8 1.3895621298625e-7;;;;], Matrix{ComplexF64}[[-0.2350194114983618 - 0.11239593677616871im 0.43384881703159006 + 0.8620642753380717im 1.579722911965262e-6 - 2.816408880938876e-6im 9.948414073001412e-6 + 7.256772981276939e-7im; 0.15945571320325974 + 0.07625827206604541im 0.019117080103292182 + 0.03798593057454579im 0.27320950513293024 + 0.20371986885373503im -0.13852489778591093 + 0.5306048464974292im; … ; -0.05066027137971899 - 0.024227822876288708im -0.0069144024084886084 - 0.013739023701854234im 0.0013405039349665751 + 0.0013928900202727422im -0.005022452928930588 + 0.011020728930354322im; 0.09083421344920675 + 0.04344065247943015im 0.013697961436439086 + 0.027218057886815753im 0.007185798993307393 + 0.003223625432764321im 0.020288109608839325 - 0.032669050307630246im]], [[2.0, 0.0, 0.0, 0.0]], -0.28239440634944946, [[-0.55411042232841, -0.010678390370488886, 0.14495672342332866, 0.14495755582419875]], 1.0e-6, DFTK.BandtolBalanced{Float64, Vector{Vector{Float64}}}([[0.6300127939257145]], 1.1102230246251565e-16, Inf, 1.0e-6), 100, [0.0, 0.0, 0.0]), info_gmres = (x = [-3.620695864535781e-7, -6.293620037436665e-7, -2.295123501014656e-7, 4.99402596078494e-7, 7.923314261609748e-7, 5.851074934688735e-7, 6.516972870654804e-7, 1.018930926832762e-6, 3.638590750060246e-7, -2.2010936468084485e-6 … 2.7810184033390166e-6, 1.2016957106047868e-6, 2.445657150842325e-8, 1.0078563844168979e-7, 5.535309310188351e-7, 4.5341734629255417e-7, 4.631986217512575e-9, -1.0437039064210615e-7, 1.121111546159504e-7, 1.2550875446694742e-7], resid_history = [0.2493920937259907, 0.0037665010364884618, 0.00028512972728977567, 4.682507690539774e-6, 2.8508371570903398e-8, 7.742084756032187e-11, 3.7930774822044726e-8, 1.1197649002710075e-9], converged = true, n_iter = 8, residual_norm = 1.1197649002710075e-9, maxiter = 100, tol = 1.0e-8, s = 0.9352424961626125, restart_history = [6], stage = :finalize, krylovdim = 20, y = [3.254291077599632e-7, -3.7512567419718217e-8, 1.1197649002710075e-9, -0.00020435564661213987, 4.688172545195638e-6, -2.892867374491013e-8, 7.742084756032187e-11, 0.0, 0.0, 0.0 … 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], V = KrylovKit.OrthonormalBasis{Vector{Float64}}([[-4.115860815465261e-8, 5.424754890318599e-7, 1.513070155526143e-7, -1.4887671268042935e-7, -4.9199318384253115e-9, 1.4342379964516788e-7, 3.402748044572324e-7, 8.303078402849577e-7, 3.817116917358391e-7, -2.596880935338661e-6 … 2.6749399303341158e-6, 9.588031063903889e-7, 1.499031112931263e-8, 5.621877063823781e-8, 3.503417309483216e-7, 2.987986957584366e-7, 2.148414176767699e-9, -3.555480409657855e-9, -5.620708738481168e-8, -1.530766129318736e-7], [4.665153725719533e-7, -4.439118568109394e-7, -1.258591165965683e-7, 5.396592301323585e-8, -1.9771044737376186e-7, -3.3379756373341093e-7, -6.198782942755778e-7, -1.390024747740545e-6, -6.133817628240778e-7, 4.0728465995987e-6 … -3.5683312781324145e-6, -1.2382505268452556e-6, -1.8173860120045244e-8, -6.539512036273504e-8, -4.1243055436332604e-7, -3.439688422060125e-7, -1.9827765530102126e-9, -2.9194521627232183e-8, 1.3931165787107264e-7, 4.095887466143406e-7]]), H = [1.1680996033971254 0.005565371280542047 … 0.0 0.0; 0.11720479345412803 1.0158984641267348 … 0.0 0.0; … ; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0], R = [1.1739649258240836 0.10696152404702682 … 0.0 0.0; 0.0 1.0107077542934944 … 0.0 0.0; … ; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0]))From the result of solve_ΩplusK_split we can easily compute the polarisabilities:
println("Non-interacting polarizability: $(dipole(basis, res.δρ0))")
println("Interacting polarizability: $(dipole(basis, res.δρ))")Non-interacting polarizability: 1.9257125341021673
Interacting polarizability: 1.7736548641509657As expected, the interacting polarizability matches the finite difference result. The non-interacting polarizability is higher.
Manual solution of the Dyson equations
To see what goes on under the hood, we also show how to manually solve the Dyson equation using KrylovKit:
using KrylovKit
# Apply ``(1- χ_0 K)``
function dielectric_operator(δρ)
δV = apply_kernel(basis, δρ; scfres.ρ)
χ0δV = apply_χ0(scfres, δV).δρ
δρ - χ0δV
end
# Apply ``χ_0`` once to get non-interacting dipole
δρ_nointeract = apply_χ0(scfres, δVext).δρ
# Solve Dyson equation to get interacting dipole
δρ = linsolve(dielectric_operator, δρ_nointeract, verbosity=3)[1]
println("Non-interacting polarizability: $(dipole(basis, δρ_nointeract))")
println("Interacting polarizability: $(dipole(basis, δρ))")[ Info: GMRES linsolve starts with norm of residual = 4.19e+00
[ Info: GMRES linsolve in iteration 1; step 1: normres = 2.49e-01
[ Info: GMRES linsolve in iteration 1; step 2: normres = 3.77e-03
[ Info: GMRES linsolve in iteration 1; step 3: normres = 2.85e-04
[ Info: GMRES linsolve in iteration 1; step 4: normres = 4.69e-06
[ Info: GMRES linsolve in iteration 1; step 5: normres = 1.09e-08
[ Info: GMRES linsolve in iteration 1; step 6: normres = 6.27e-11
[ Info: GMRES linsolve in iteration 1; step 7: normres = 1.22e-08
[ Info: GMRES linsolve in iteration 2; step 1: normres = 1.02e-09
[ Info: GMRES linsolve in iteration 2; step 2: normres = 2.68e-11
┌ Info: GMRES linsolve converged at iteration 2, step 3:
│ * norm of residual = 3.79e-12
└ * number of operations = 12
Non-interacting polarizability: 1.925712534102108
Interacting polarizability: 1.7736548637303748We obtain the identical result to above.
- HS2025M. F. Herbst and B. Sun. Efficient Krylov methods for linear response in plane-wave electronic structure calculations. arXiv 2505.02319