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.00013457544346759273
Then 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.017612220316129874
polarizability = (με - μref) / ε
println("Reference dipole: $μref")
println("Displaced dipole: $με")
println("Polarizability : $polarizability")
Reference dipole: -0.00013457544346759273
Displaced dipole: 0.017612220316129874
Polarizability : 1.7746795759597467
The 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.81481
Then:
\[δρ = χ_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.002355827367009206 + 0.002304996245785538im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im; 0.21451301805229972 + 0.2229582021005349im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im; … ; 0.028600510051911637 + 0.029467909195426994im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im; -0.056825619567283214 - 0.05763541287421743im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im]], δρ = [-3.620695709556416e-7 -2.5020159711644345e-7 … -4.880646130040539e-8 -2.5020161794321094e-7; -6.293617306070546e-7 -4.793036795519738e-7 … -1.207784628570005e-7 -4.793036954989359e-7; … ; 1.362625729424808e-7 1.1356227575165291e-7 … 4.711989805652522e-8 1.1356227103191654e-7; 1.330546173669401e-7 1.363263077678097e-7 … 5.200683113589302e-8 1.3632629207811947e-7;;; -2.502016126773523e-7 -1.7404914616376686e-7 … -3.556496635549444e-8 -1.7404916044999769e-7; -4.793036903461269e-7 -3.679732338270917e-7 … -1.12028968512507e-7 -3.6797324391007294e-7; … ; 1.1356227259679586e-7 1.12110962298617e-7 … 1.0980681297806919e-7 1.1211095769870234e-7; 1.3632629542324792e-7 1.255085876470604e-7 … 5.094906434296802e-8 1.2550857571288758e-7;;; -4.880645924608283e-8 -3.5564963224064414e-8 … -1.1412158653153737e-8 -3.556496581122608e-8; -1.2077846022715634e-7 -1.1202896653786391e-7 … -9.786226999724313e-8 -1.1202896779195805e-7; … ; 4.711990034429994e-8 1.0980681829945908e-7 … 2.493822524873768e-7 1.0980681513178545e-7; 5.2006833541551256e-8 5.094906991852607e-8 … 4.9106258835656374e-8 5.0949065843468705e-8;;; … ;;; 6.475763531761409e-8 4.110334855339216e-8 … -6.681704425753235e-9 4.110335292043646e-8; 1.689755751801981e-7 6.653284475420112e-8 … -1.3294453612672943e-7 6.653284533229976e-8; … ; 3.267765619185943e-8 1.601736837917598e-7 … 3.847036112516427e-7 1.6017367958798999e-7; -9.141989059655013e-8 -3.5830329187886565e-8 … 7.037283632540255e-8 -3.5830327399688245e-8;;; -4.8806454978064265e-8 -3.556495983416645e-8 … -1.1412159789862431e-8 -3.5564963844527635e-8; -1.2077845884780226e-7 -1.1202896447802042e-7 … -9.786227601249762e-8 -1.1202897010188924e-7; … ; 4.71199055166901e-8 1.098068271560351e-7 … 2.493822685130223e-7 1.0980682403065483e-7; 5.200683875521049e-8 5.0949074870395174e-8 … 4.910626594046976e-8 5.0949071840153387e-8;;; -2.5020160252554995e-7 -1.7404913825169933e-7 … -3.556496620235249e-8 -1.7404915417110812e-7; -4.793036851277122e-7 -3.6797322896192067e-7 … -1.1202897209942348e-7 -3.679732425540271e-7; … ; 1.1356227601632539e-7 1.1211096580388812e-7 … 1.09806818685189e-7 1.1211096193254225e-7; 1.3632630525019743e-7 1.255085949930128e-7 … 5.0949068230476597e-8 1.2550858348235965e-7;;;;], δHψ = Matrix{ComplexF64}[[0.0013703543967627174 - 0.0013407877267704877im 0.06420176791267915 + 0.0704249200788646im -0.9095447387418364 - 0.6169323129849993im -0.32209774586669077 + 0.04129624041622222im; -0.13738908936763383 - 0.14299589813019836im 1.2642319281273744 - 1.023910573122417im -0.2012429010931113 - 0.13607364753620332im -0.07098183911425512 + 0.00881734001972881im; … ; -0.034045210613381185 - 0.03526863753072636im -0.015252282965036324 + 0.01397482698731276im 0.014069268798789227 + 0.01678897948436227im -0.004717442809773817 - 0.00562945895403301im; 0.050809719793539335 + 0.0515406544922106im 0.018950435621834624 - 0.017198263560408242im -0.022999340692667944 + 0.0831114826245383im -0.08688648542102091 - 0.0875062136107658im]], δVind = [0.001965432680807062 0.002081001399001231 … 0.0031536665564718723 0.002081001577632013; 0.0038891316648743328 0.004779270213152135 … 0.010276672263748305 0.004779270412331248; … ; -0.0061508450907679126 -0.008269600290110535 … -0.017302962288611057 -0.008269599996195587; 0.00023868329859713525 -0.00039869629764259116 … -0.0036646922683644238 -0.00039869610235266327;;; 0.0020810015287238528 0.0022232292309547477 … 0.00342012149950405 0.00222322943084807; 0.004779270345892818 0.005734954487960544 … 0.01090359892035976 0.0057349547188490745; … ; -0.008269599997946058 -0.009601004772745735 … -0.012623107837109359 -0.009601004491584013; -0.0003986961390288705 -0.0010730117316960083 … -0.004230677974783784 -0.0010730115222021268;;; 0.003153666379641882 0.0034201210305980704 … 0.0048325074076117774 0.003420121392564696; 0.01027667204790712 0.010903598362463221 … 0.012272142682852516 0.010903598790372391; … ; -0.017302962100933628 -0.012623108117149118 … -0.009620262846270863 -0.01262310779459937; -0.003664692366372102 -0.004230678307569943 … -0.005491105417089194 -0.004230678011277002;;; … ;;; -0.0023365616575963103 -0.0028154645611605084 … 0.005693319008274739 -0.0028154648738463526; -0.012913095126751267 -0.017841185266948882 … 0.011498340838878162 -0.01784118581711356; … ; -0.02517445125663648 -0.012810883853730345 … -0.008395873458651913 -0.012810883539770411; 0.007597977697465355 0.01022541278478574 … -0.005449731166041731 0.010225412346721698;;; 0.0031536660784809148 0.003420120695587405 … 0.0048325066103526776 0.003420121026474546; 0.010276671782540627 0.010903598119962771 … 0.012272142043992823 0.010903598379116825; … ; -0.01730296240384959 -0.01262310847819196 … -0.009620263134077767 -0.012623108124193021; -0.0036646927754113642 -0.004230678733147104 … -0.005491105675185492 -0.004230678367857316;;; 0.00208100144468788 0.002223229135744003 … 0.0034201212941367765 0.002223229335440486; 0.004779270278495576 0.005734954418073067 … 0.01090359862073775 0.005734954628932006; … ; -0.008269600242364821 -0.009601005016602278 … -0.012623107932329732 -0.009601004690775765; -0.00039869626365595973 -0.0010730118751260953 … -0.0042306781089838895 -0.0010730116525709218;;;;], δρ0 = [-3.602141598561286e-7 -2.488843735935895e-7 … -4.852839704880218e-8 -2.4888437600652595e-7; -5.972251522969909e-7 -4.6069791757746133e-7 … -1.190577182787772e-7 -4.606979200808654e-7; … ; 1.2735789166098724e-7 1.0836339333330831e-7 … 4.6407189702030936e-8 1.0836339171722157e-7; 1.035199968859049e-7 1.1957956291220246e-7 … 5.069505426083133e-8 1.1957956064679625e-7;;; -2.4888437527437915e-7 -1.731068013580933e-7 … -3.535699949095453e-8 -1.731068022764361e-7; -4.6069791827358154e-7 -3.572171469605157e-7 … -1.1091442700457327e-7 -3.5721714717254653e-7; … ; 1.0836339248794197e-7 1.0846497165443845e-7 … 1.0862237108270296e-7 1.0846496985932834e-7; 1.1957956067543562e-7 1.1611143369114164e-7 … 5.0208299091231326e-8 1.1611143167746279e-7;;; -4.852839704195599e-8 -3.5357000172361315e-8 … -1.1341325092053286e-8 -3.535699971875312e-8; -1.1905771719293527e-7 -1.1091442848416962e-7 … -9.77067174322179e-8 -1.109144269872274e-7; … ; 4.640719145437452e-8 1.0862237351585252e-7 … 2.484524479519467e-7 1.086223726452121e-7; 5.069505512557229e-8 5.0208301187271714e-8 … 4.926858129107525e-8 5.020829988418528e-8;;; … ;;; 6.434573652816138e-8 4.083864104824349e-8 … -6.6379400458343535e-9 4.083864153180418e-8; 1.6975036103991548e-7 6.683083755541242e-8 … -1.3340486377199308e-7 6.683083661042162e-8; … ; 3.271001134010818e-8 1.6023525950233833e-7 … 3.839014605867789e-7 1.6023525827832366e-7; -9.271364418547905e-8 -3.633619183524995e-8 … 7.126309445433408e-8 -3.633619156469029e-8;;; -4.852839699695668e-8 -3.535699993937213e-8 … -1.1341327264966382e-8 -3.5357000883326413e-8; -1.1905771891904408e-7 -1.1091442925938189e-7 … -9.770672578386062e-8 -1.109144320802967e-7; … ; 4.640719551882768e-8 1.0862237994062044e-7 … 2.4845245897591526e-7 1.0862237912714219e-7; 5.069505716269726e-8 5.020830325525001e-8 … 4.926858604931635e-8 5.020830299911653e-8;;; -2.488843745673074e-7 -1.7310680036923355e-7 … -3.5357000892882255e-8 -1.731068028483519e-7; -4.6069791985761626e-7 -3.5721714717945763e-7 … -1.1091443195783452e-7 -3.572171507742098e-7; … ; 1.0836339429855586e-7 1.0846497368964497e-7 … 1.0862237557365745e-7 1.0846497261294153e-7; 1.1957956358007523e-7 1.1611143589989016e-7 … 5.020830153229828e-8 1.161114343084326e-7;;;;], δeigenvalues = [[0.0004950069723301236, 0.09679871305598214, 0.039463380944734214, 0.051245918347121645]], δoccupation = [[0.0, 0.0, 0.0, 0.0]], δεF = 0.0, ε = 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.15475965282716092 -0.15461620270261195 … -0.15418753100217863 -0.15461620270246593; -0.15461620270101367 -0.1544722989003665 … -0.15404229467769104 -0.15447229890020925; … ; -0.15418753100504914 -0.1540422946821867 … -0.1536083373530567 -0.15404229468206204; -0.1546162027039615 -0.1544722989033121 … -0.154042294680696 -0.15447229890317704;;; -0.154616202702928 -0.15447229890228178 … -0.154042294679638 -0.15447229890213438; -0.15447229890066883 -0.15432794309203818 … -0.1538966028307723 -0.15432794309187955; … ; -0.15404229468253577 -0.15389660283531054 … -0.15346128701720463 -0.1538966028351844; -0.15447229890364386 -0.15432794309501127 … -0.15389660283380532 -0.1543279430948747;;; -0.15418753100305232 -0.15404229468019684 … -0.15360833735101068 -0.15404229468004646; -0.1540422946785595 -0.15389660283133988 … -0.15346128701314446 -0.1538966028311782; … ; -0.15360833735395243 -0.15346128701775225 … -0.153021913142337 -0.15346128701762335; -0.15404229468157887 -0.1538966028343575 … -0.15346128701622352 -0.15389660283421808;;; … ;;; -0.15347880585684986 -0.15333139196680282 … -0.1528909249296536 -0.15333139196665355; -0.1533313919651906 -0.15318350574318043 … -0.1527416287798344 -0.15318350574301892; … ; -0.15289092493254436 -0.15274162878436492 … -0.15229553959567063 -0.15274162878423914; -0.15333139196816054 -0.15318350574614736 … -0.1527416287828645 -0.15318350574601003;;; -0.15418753100141422 -0.1540422946785521 … -0.15360833734935636 -0.15404229467840505; -0.15404229467695413 -0.1538966028297283 … -0.15346128701152342 -0.15389660282956955; … ; -0.1536083373522234 -0.15346128701601525 … -0.1530219131405899 -0.15346128701589082; -0.1540422946798994 -0.15389660283267081 … -0.153461287014527 -0.15389660283253528;;; -0.1546162027021043 -0.1544722989014548 … -0.15404229467880617 -0.1544722989013088; -0.15447229889986153 -0.15432794309122788 … -0.15389660282995718 -0.1543279430910705; … ; -0.1540422946816665 -0.15389660283443737 … -0.15346128701632636 -0.1538966028343133; -0.1544722989027994 -0.15432794309416323 … -0.15389660283295234 -0.15432794309402845]), 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.015163898000015212 -0.01255012949286832 … -0.004966868725957875 -0.012550129482467455; -0.012550129491973528 -0.010362595478088984 … -0.004135159625647532 -0.010362595482753496; … ; -0.00496686871686123 -0.004135159564373757 … -0.0020697810131674755 -0.004135159536048091; -0.012550129481304993 -0.010362595468006323 … -0.0041351595320940175 -0.010362595449990753;;; -0.012550129493719777 -0.010362595487256557 … -0.004135159523121081 -0.010362595454311677; -0.010362595482480644 -0.008622039464524504 … -0.003897512003131317 -0.008622039445170896; … ; -0.00413515956222062 -0.0038975119839570523 … -0.003484107522724638 -0.003897511951052414; -0.010362595468453101 -0.008622039446816967 … -0.00389751191687918 -0.008622039411882835;;; -0.004966868756411167 -0.004135159615229233 … -0.002069780988834453 -0.004135159553058747; -0.004135159619200421 -0.003897512053095439 … -0.003484107586324771 -0.003897512010523788; … ; -0.002069781069780931 -0.0034841075717829437 … -0.005620580399005022 -0.003484107559054407; -0.004135159583738849 -0.003897512007386317 … -0.003484107509136121 -0.003897511958485449;;; … ;;; -0.006547897543464164 -0.004876339567049717 … -0.0014866453255493114 -0.004876339554430696; -0.004876339552496278 -0.0026779879659627847 … -0.004123054968531745 -0.002677987934779873; … ; -0.0014866452707403292 -0.004123054923600071 … -0.007170895721839238 -0.004123054911950329; -0.0048763395714305335 -0.0026779879821445976 … -0.004123054924888025 -0.0026779879817042445;;; -0.004966868774922138 -0.004135159620338471 … -0.0020697812469308687 -0.004135159652022366; -0.004135159641106646 -0.003897512055725494 … -0.003484107761751016 -0.0038975121083855094; … ; -0.0020697811620821608 -0.0034841076641393487 … -0.005620580504107618 -0.003484107655351722; -0.004135159619100309 -0.003897512044936344 … -0.0034841076821769132 -0.00389751205534624;;; -0.012550129493415057 -0.010362595475495003 … -0.004135159629698029 -0.010362595486562393; -0.010362595483291085 -0.008622039451693028 … -0.0038975121050771233 -0.008622039480379939; … ; -0.004135159577036833 -0.003897512004502557 … -0.0034841075967692427 -0.0038975119898872895; -0.010362595470593775 -0.008622039443331307 … -0.0038975120110566544 -0.008622039442412983])], 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.009532892758321525 -0.006919175621672376 … 0.0006640006345418215 -0.006919175611125462; -0.006919175619179169 -0.004731678970767674 … 0.0014956963626412143 -0.004731678975274923; … ; 0.0006640006407680399 0.0014956964194192523 … 0.0035610455863396406 0.001495696447869569; -0.006919175611458415 -0.004731678963630574 … 0.0014956964531897994 -0.004731678945479946;;; -0.006919175622839915 -0.004731678981850687 … 0.001495696463220556 -0.00473167894875837; -0.0047316789754616485 -0.002991148053904994 … 0.0017333323096287191 -0.0029911480343927637; … ; 0.0014956964212233352 0.0017333323242646973 … 0.002146714910597109 0.0017333323572954846; -0.004731678964409115 -0.0029911480391705235 … 0.001733332392847921 -0.0029911480040998063;;; 0.0006640006032148111 0.0014956963705535734 … 0.003561045612718693 0.0014956964328744398; 0.0014956963682197979 0.0017333322590970509 … 0.0021467148510571727 0.0017333323018303782; … ; 0.0035610455288304847 0.0021467148609911582 … 1.022887761333198e-5 0.0021467148738485917; 0.0014956964006620907 0.0017333323017885592 … 0.0021467149251668135 0.0017333323508288432;;; … ;;; -0.0009170694747443519 0.0007544790459558283 … 0.004144157037443287 0.0007544790587241182; 0.0007544790621215325 0.002952825494430007 … 0.0015077446407762672 0.0029528255257744284; … ; 0.004144157089361526 0.0015077446811773716 … -0.0015401027949778767 0.0015077446929529018; 0.0007544790402173752 0.0029528254752813174 … 0.0015077446813899671 0.002952825475859005;;; 0.0006640005863419469 0.0014956963670890479 … 0.003561045356276593 0.0014956963355522018; 0.0014956963479189553 0.0017333322580785678 … 0.0021467146772519642 0.0017333322055773145; … ; 0.003561045438258261 0.0021467147703717526 … 1.022877425781079e-5 0.0021467147792838077; 0.0014956963669800656 0.0017333322659252109 … 0.002146714753822553 0.0017333322556508453;;; -0.006919175621711493 -0.004731678969262156 … 0.0014956963574754428 -0.004731678980183524; -0.00473167897546479 -0.0029911480402631946 … 0.0017333322084980662 -0.002991148068792731; … ; 0.0014956964072763718 0.0017333323045923554 … 0.0021467148374307464 0.0017333323193316902; -0.004731678965705324 -0.00299114803483682 … 0.001733332299523431 -0.0029911480337837144]), 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.8895005216676766e-6 - 2.1056142265137818e-6im -0.0034233085633898087 + 0.0013101898211558523im … -0.002276361258022376 + 0.000833985154708191im 0.0033640987918276133 - 0.0012516961313985167im; -0.019874693905000605 - 0.020359255818101767im 0.017870627580463747 + 0.015467535625378198im … -0.007050894999985349 - 0.009370418254050595im 0.01389294462527946 + 0.016968177055508037im; … ; -0.020336593173678943 - 0.02085777903564741im 0.01623670570872744 + 0.017621054737633972im … -0.01114670186945734 - 0.010388118817539965im 0.017603056099781165 + 0.01710636476509169im; 0.019925131689215378 + 0.020317810875105053im -0.013881005474916523 - 0.016985002803464568im … 0.01017256124339206 + 0.008232982456868352im -0.017859604463590507 - 0.015484526688019442im;;; 0.006472990639522131 - 0.005292362164082762im -0.0017839112627703949 + 0.002330456390854248im … 0.002861275785776141 - 0.0016320724322615968im -0.005761987230596708 + 0.003830834039572016im; 0.012071716526328942 + 0.019336487878271552im -0.01159815534178111 - 0.01453519708013451im … 0.005003710560999479 + 0.008600881787153838im -0.009036742229099642 - 0.015501044070778376im; … ; 0.01822786608736932 + 0.016293106587927486im -0.014696494918897362 - 0.013949036416086915im … 0.010230167743101723 + 0.008536244032429658im -0.01576884397760902 - 0.013545030836164606im; -0.01968080940320094 - 0.013116396277855474im 0.013903504709636721 + 0.01152915231071422im … -0.009370000262289246 - 0.006089675962707437im 0.016465322621757324 + 0.010563447288827752im;;; -0.004395988453505529 + 0.003590023667820727im 0.0023257382757764814 - 0.0021970337145389247im … -0.002195006690737242 + 0.0014515248731427656im 0.0036916468999247994 - 0.0027117217807088537im; -0.005595689319006304 - 0.01126327515742725im 0.0054802634113589295 + 0.00897140118432264im … -0.002691947962063011 - 0.005841302366759423im 0.004408109029041931 + 0.009375548250765312im; … ; -0.011845773393767236 - 0.009478435652302861im 0.009917848605435414 + 0.008373008971377837im … -0.007408723664484863 - 0.005572057215423495im 0.010534088371405691 + 0.008140777966596085im; 0.011627896373073252 + 0.006340215906045697im -0.00889350002260151 - 0.005719138046706615im … 0.006365031723752601 + 0.003415129670184915im -0.009965661133253364 - 0.005315143171298354im;;; … ;;; -0.001988934411046252 + 0.0016360982907262776im 0.0019513419805882247 - 0.001486645885453275im … -0.000752274520036432 + 0.0007876224187551724im 0.0014145124647141167 - 0.001284362768518341im; 0.005642797508558864 + 0.0026627721696839248im -0.00518146139151689 - 0.0022902785979640574im … 0.003187236713941755 + 0.001865645612689001im -0.004715566924716203 - 0.0024658346672595368im; … ; 0.004447346234708283 + 0.0066215869353613635im -0.0038551756904133838 - 0.006026551175633481im … 0.003302672068113182 + 0.0044156925503087575im -0.0041830762160130685 - 0.005903024985136939im; -0.0022781244766436376 - 0.005432722015905167im 0.0018124249422668888 + 0.0048577201376237625im … -0.001842991457839954 - 0.003275236077842098im 0.0022783440608875986 + 0.0046821783108254205im;;; 0.0044745756106020305 - 0.0036699670361543153im -0.0037649615149644685 + 0.002788271295007007im … 0.0007310477148763308 - 0.0009439773625404136im -0.0023989837377171755 + 0.00227364649766907im; -0.011685759406421834 - 0.006277881615974788im 0.010025787056783152 + 0.005250202953374878im … -0.005144054708836984 - 0.003833534478981609im 0.008953560456190994 + 0.00565427687149327im; … ; -0.008919789351156723 - 0.011873746084378902im 0.007465455364413731 + 0.010380654332032063im … -0.005808551981498185 - 0.006882211861918912im 0.008081875107583552 + 0.010148402735261103im; 0.005537246940257758 + 0.01132519792070526im -0.00434747435606843 - 0.00944017182645802im … 0.003912749508600971 + 0.005422798752890647im -0.005419801087387193 - 0.00903616370929075im;;; -0.00653547793727937 + 0.005352544150689106im 0.005837860174046984 - 0.0039071683293453825im … 0.0002453617949538503 + 0.0005091635713880374im 0.001859834491110407 - 0.0024067524452734586im; 0.01969286526235973 + 0.013098754690411073im -0.016504567501271744 - 0.010518979019985959im … 0.007056890433754933 + 0.006919950766360419im -0.013943166368081742 - 0.011484832345630067im; … ; 0.015612014376679353 + 0.018434253466758345im -0.012643031573002946 - 0.015629922483195308im … 0.009049955897382353 + 0.009502445261328006im -0.013715536172630528 - 0.015225855261782988im; -0.012058854767447152 - 0.019353651590976288im 0.008996534024018283 + 0.01554510182352135im … -0.00731662766812461 - 0.007770575115463882im 0.011558425303115656 + 0.014579372583640556im],)])]), [8.519873951932051e-7 4.6272652694394036e-7 … 2.4177786715712272e-8 4.6272652570948185e-7; 4.627265268377359e-7 2.501447785516393e-7 … 1.3583000992657523e-8 2.501447789124152e-7; … ; 2.417778657612952e-8 1.3583000360518875e-8 … 1.565923325611377e-9 1.3583000068294675e-8; 4.627265255715242e-7 2.501447777718236e-7 … 1.358300002750446e-8 2.50144776378437e-7;;; 4.627265270449939e-7 2.5014477926069987e-7 … 1.358299993493399e-8 2.50144776712627e-7; 2.501447788913195e-7 1.3895609544793987e-7 … 1.1279992855555243e-8 1.3895609445289283e-7; … ; 1.3583000338307573e-8 1.1279992681462749e-8 … 7.937757057930014e-9 1.1279992382698432e-8; 2.501447778063708e-7 1.389560945375288e-7 … 1.1279992072420354e-8 1.3895609274141403e-7;;; 2.417778718297731e-8 1.3583000885173645e-8 … 1.5659232684736216e-9 1.3583000243790612e-8; 1.35830009261441e-8 1.1279993309212023e-8 … 7.93775751156903e-9 1.1279992922677272e-8; … ; 1.565923458555072e-9 7.937757407845773e-9 … 3.571856563741286e-8 7.937757317060038e-9; 1.358300056030388e-8 1.1279992894187993e-8 … 7.937756961010063e-9 1.1279992450190423e-8;;; … ;;; 5.7918413672093485e-8 2.2816020188903988e-8 … 5.620383538206729e-10 2.28160200028655e-8; 2.2816019974344444e-8 3.4892759294628058e-9 … 1.3458516418365024e-8 3.489275802841146e-9; … ; 5.620382898073724e-10 1.3458515957750621e-8 … 7.728316454017993e-8 1.3458515838322256e-8; 2.281602025349392e-8 3.4892759951710008e-9 … 1.3458515970953425e-8 3.4892759933802408e-9;;; 2.417778746700864e-8 1.3583000937885471e-8 … 1.5659238745444277e-9 1.3583001264757075e-8; 1.3583001152142708e-8 1.1279993333088892e-8 … 7.937758762831449e-9 1.1279993811222474e-8; … ; 1.5659236752992177e-9 7.937758066596263e-9 … 3.571856774814471e-8 7.937758003917084e-9; 1.3583000925110285e-8 1.1279993235127198e-8 … 7.937758195252258e-9 1.1279993329646332e-8;;; 4.6272652700882954e-7 2.5014477835101957e-7 … 1.3583001034442567e-8 2.501447792070173e-7; 2.50144778954003e-7 1.3895609478822918e-7 … 1.127999378118496e-8 1.3895609626313075e-7; … ; 1.3583000491159302e-8 1.1279992868004958e-8 … 7.937757586067096e-9 1.1279992735307101e-8; 2.501447779719389e-7 1.3895609435831697e-7 … 1.1279992927513429e-8 1.389560943111039e-7;;;;], Matrix{ComplexF64}[[0.1862082926145494 - 0.18219067494522187im 0.6501756297762269 + 0.7131979158370604im 5.400147627181085e-8 - 1.4210106311955373e-6im -2.1959015582682972e-6 - 5.606098785886274e-6im; -0.12633839884284076 + 0.12361252956274105im 0.028649325366454655 + 0.031426319823839914im -0.19527588152294834 + 0.2876349841843287im 0.013522535241500063 + 0.10210174810611332im; … ; 0.04013865319602796 - 0.03927262438019881im -0.010362073089894614 - 0.011366480824597248im 0.0007698315838177999 + 0.006201143060842802im -0.004303321104011176 + 0.005925007560372502im; -0.07196888008076326 + 0.07041608440853839im 0.020528078596541315 + 0.02251788930627884im -0.014702828398518629 - 0.018986784394421787im 0.024375174445342346 - 0.027496578093056334im]], [[2.0, 0.0, 0.0, 0.0]], -0.28239441451849767, [[-0.5541104218198836, -0.010678407217111774, 0.14495659461904012, 0.14495675330777394]], 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.620695709556416e-7, -6.293617306070546e-7, -2.2951212347296498e-7, 4.994025943906069e-7, 7.923312207728861e-7, 5.851072255199503e-7, 6.516970910390616e-7, 1.0189308357529873e-6, 3.6385910303059627e-7, -2.201093471580729e-6 … 2.7810180147228385e-6, 1.2016954573421111e-6, 2.4456416731756337e-8, 1.007854800801976e-7, 5.535307736900525e-7, 4.534172598470334e-7, 4.631941255918002e-9, -1.0437049148547313e-7, 1.1211096193254225e-7, 1.2550858348235965e-7], resid_history = [0.24939209597854345, 0.0037665495728508263, 0.00028528450244997677, 4.680134184153289e-6, 1.2637831078814776e-8, 4.685401188869175e-11, 3.438631313679785e-8, 5.582735671712649e-10], converged = true, n_iter = 8, residual_norm = 5.582735671712649e-10, maxiter = 100, tol = 1.0e-8, s = 0.9356591504544294, residual = [1.0099871602661848e-6, 7.399336463239452e-7, 1.6729600767054854e-7, -2.545178721883045e-7, -3.0844611477780746e-7, -1.8935908511989247e-7, -1.8606331487947147e-7, -2.612193133991071e-7, -8.349952911771875e-8, 4.5958186866739954e-7 … 7.412061030555931e-7, 3.351186754205152e-7, 7.297810689372139e-9, 3.261922720010084e-8, 1.9666643569879076e-7, 1.8214784133181103e-7, 2.239411111671568e-9, -6.772416479365348e-8, 1.1971176589595344e-7, 4.1431207074776053e-7], restart_history = [6], stage = :finalize, krylovdim = 20, y = [2.870574668016549e-7, -3.323460879022992e-8, 5.582735671712649e-10, -0.00020446720872262486, 4.681920901743954e-6, -1.2745834838693971e-8, 4.685401188869175e-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}}([[-5.940575480111225e-8, -2.104651585528562e-6, -7.540794175889224e-7, 1.202553301623477e-6, 1.4163358726971776e-6, 1.0148825788954054e-6, 1.25423240364467e-6, 1.8640343698452263e-6, 4.893592752328785e-7, -2.061082705605518e-6 … 3.2953851715959617e-6, 1.2774051638555042e-6, 3.155516687775942e-8, 1.6112276792010424e-7, 8.879800573108736e-7, 6.047148867079794e-7, 5.497242456989137e-9, -1.5744946332027857e-7, 2.707320684372041e-7, 5.876468323674076e-7], [1.4240279916392005e-6, 1.7734289230638079e-6, 5.101698081896172e-7, -8.180963915105533e-7, -9.943233707206603e-7, -6.638518853586604e-7, -7.447504740368135e-7, -1.0954079216987405e-6, -3.1886485832566376e-7, 1.5487293381397113e-6 … -1.9859805487843487e-7, -4.43301718288713e-9, -9.889726437996706e-10, -1.0439132296485353e-8, -3.441048806572768e-8, 4.391317707315393e-8, 1.2700247685721505e-9, -4.367262462660189e-8, 8.11896517761223e-8, 3.972751544018347e-7]]), H = [1.0359077404152184 0.019145352482037165 … 0.0 0.0; 0.12085966062136372 1.0436309191408544 … 0.0 0.0; … ; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0], R = [1.04293427607768 0.13995675554877796 … 0.0 0.0; 0.0 1.0345173964249053 … 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.9257125230495236
Interacting polarizability: 1.7736548526712308
As 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, δρ))")
WARNING: using KrylovKit.basis in module Main conflicts with an existing identifier.
[ 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 = 6.22e-10
[ Info: GMRES linsolve in iteration 2; step 1: normres = 7.00e-11
┌ Info: GMRES linsolve converged at iteration 2, step 2:
│ * norm of residual = 9.51e-13
└ * number of operations = 11
Non-interacting polarizability: 1.92571252304941
Interacting polarizability: 1.7736548460563444
We 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