Saving SCF results on disk and SCF checkpoints

For longer DFT calculations it is pretty standard to run them on a cluster in advance and to perform postprocessing (band structure calculation, plotting of density, etc.) at a later point and potentially on a different machine.

To support such workflows DFTK offers the two functions save_scfres and load_scfres, which allow to save the data structure returned by self_consistent_field on disk or retrieve it back into memory, respectively. For this purpose DFTK uses the JLD2.jl file format and Julia package.

Availability of `load_scfres`, `save_scfres` and checkpointing

As JLD2 is an optional dependency of DFTK these three functions are only available once one has both imported DFTK and JLD2 (using DFTK and using JLD2).

DFTK data formats are not yet fully matured

The data format in which DFTK saves data as well as the general interface of the load_scfres and save_scfres pair of functions are not yet fully matured. If you use the functions or the produced files expect that you need to adapt your routines in the future even with patch version bumps.

To illustrate the use of the functions in practice we will compute the total energy of the O₂ molecule at PBE level. To get the triplet ground state we use a collinear spin polarisation (see Collinear spin and magnetic systems for details) and a bit of temperature to ease convergence:

using DFTK
using LinearAlgebra
using JLD2

d = 2.079  # oxygen-oxygen bondlength
a = 9.0    # size of the simulation box
lattice = a * I(3)
O = ElementPsp(:O; psp=load_psp("hgh/pbe/O-q6.hgh"))
atoms     = [O, O]
positions = d / 2a * [[0, 0, 1], [0, 0, -1]]
magnetic_moments = [1., 1.]

Ecut  = 10  # Far too small to be converged
model = model_PBE(lattice, atoms, positions; temperature=0.02, smearing=Smearing.Gaussian(),
                  magnetic_moments)
basis = PlaneWaveBasis(model; Ecut, kgrid=[1, 1, 1])

scfres = self_consistent_field(basis, tol=1e-2, ρ=guess_density(basis, magnetic_moments))
save_scfres("scfres.jld2", scfres);
n     Energy            log10(ΔE)   log10(Δρ)   Magnet   Diag   Δtime
---   ---------------   ---------   ---------   ------   ----   ------
  1   -27.64378443285                   -0.13    0.001    6.0   84.3ms
  2   -28.92293383192        0.11       -0.82    0.662    2.0   78.2ms
  3   -28.93081267269       -2.10       -1.14    1.156    2.0    107ms
  4   -28.93753362541       -2.17       -1.18    1.756    2.0   94.8ms
  5   -28.93956696757       -2.69       -2.00    1.981    1.5   68.3ms
  6   -28.93960320782       -4.44       -2.44    1.983    1.5   67.2ms
scfres.energies
Energy breakdown (in Ha):
    Kinetic             16.7719834
    AtomicLocal         -58.4991287
    AtomicNonlocal      4.7124539 
    Ewald               -4.8994689
    PspCorrection       0.0044178 
    Hartree             19.3623218
    Xc                  -6.3912439
    Entropy             -0.0009386

    total               -28.939603207822

The scfres.jld2 file could now be transferred to a different computer, Where one could fire up a REPL to inspect the results of the above calculation:

using DFTK
using JLD2
loaded = load_scfres("scfres.jld2")
propertynames(loaded)
(:α, :history_Δρ, :converged, :occupation, :occupation_threshold, :algorithm, :basis, :runtime_ns, :n_iter, :history_Etot, :εF, :energies, :ρ, :n_bands_converge, :eigenvalues, :ψ, :ham)
loaded.energies
Energy breakdown (in Ha):
    Kinetic             16.7719834
    AtomicLocal         -58.4991287
    AtomicNonlocal      4.7124539 
    Ewald               -4.8994689
    PspCorrection       0.0044178 
    Hartree             19.3623218
    Xc                  -6.3912439
    Entropy             -0.0009386

    total               -28.939603207822

Since the loaded data contains exactly the same data as the scfres returned by the SCF calculation one could use it to plot a band structure, e.g. plot_bandstructure(load_scfres("scfres.jld2")) directly from the stored data.

Notice that both load_scfres and save_scfres work by transferring all data to/from the master process, which performs the IO operations without parallelisation. Since this can become slow, both functions support optional arguments to speed up the processing. An overview:

  • save_scfres("scfres.jld2", scfres; save_ψ=false) avoids saving the Bloch wave, which is usually faster and saves storage space.
  • load_scfres("scfres.jld2", basis) avoids reconstructing the basis from the file, but uses the passed basis instead. This save the time of constructing the basis twice and allows to specify parallelisation options (via the passed basis). Usually this is useful for continuing a calculation on a supercomputer or cluster.

See also the discussion on Input and output formats on JLD2 files.

Checkpointing of SCF calculations

A related feature, which is very useful especially for longer calculations with DFTK is automatic checkpointing, where the state of the SCF is periodically written to disk. The advantage is that in case the calculation errors or gets aborted due to overrunning the walltime limit one does not need to start from scratch, but can continue the calculation from the last checkpoint.

The easiest way to enable checkpointing is to use the kwargs_scf_checkpoints function, which does two things. (1) It sets up checkpointing using the ScfSaveCheckpoints callback and (2) if a checkpoint file is detected, the stored density is used to continue the calculation instead of the usual atomic-orbital based guess. In practice this is done by modifying the keyword arguments passed to # self_consistent_field appropriately, e.g. by using the density or orbitals from the checkpoint file. For example:

checkpointargs = kwargs_scf_checkpoints(basis; ρ=guess_density(basis, magnetic_moments))
scfres = self_consistent_field(basis; tol=1e-2, checkpointargs...)
(ham = Hamiltonian(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), HamiltonianBlock[DFTK.DftHamiltonianBlock(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), Any[DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [0.0, 0.24369393582936685, 0.9747757433174674, 2.1932454224643014, 3.8991029732698697, 6.092348395734172, 8.772981689857206, 8.772981689857206, 6.092348395734172, 3.8991029732698697  …  2.680633294123035, 4.386490844928604, 6.5797362673929065, 9.260369561515938, 9.260369561515938, 6.5797362673929065, 4.386490844928604, 2.680633294123035, 1.4621636149762012, 0.7310818074881006]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [-7.847975050004952 -7.268428440205683 … -5.98643217347949 -7.268428440205681; -7.268428440205682 -6.7817494477990765 … -5.654662671267517 -6.7817494477990765; … ; -5.986432173479489 -5.654662671267517 … -4.834867151162882 -5.654662671267517; -7.268428440205682 -6.7817494477990765 … -5.654662671267517 -6.7817494477990765;;; -8.899434405774723 -8.087664364030587 … -6.3729903364104565 -8.087664364030587; -8.087664364030587 -7.417761803535345 … -5.957297820982622 -7.417761803535345; … ; -6.372990336410455 -5.957297820982622 … -4.983951303995711 -5.957297820982624; -8.087664364030587 -7.417761803535345 … -5.957297820982622 -7.417761803535345;;; -17.194464781057807 -12.215015836029425 … -7.260147533467604 -12.215015836029423; -12.215015836029426 -9.745491274759289 … -6.641508440557249 -9.745491274759289; … ; -7.260147533467602 -6.64150844055725 … -5.290773463061557 -6.64150844055725; -12.215015836029426 -9.745491274759289 … -6.641508440557249 -9.745491274759289;;; … ;;; -33.141052514545024 -18.79024317674381 … -7.6659314039290605 -18.790243176743807; -18.79024317674381 -12.629452027419646 … -6.922947356511528 -12.629452027419646; … ; -7.66593140392906 -6.922947356511528 … -5.334312872497847 -6.922947356511528; -18.79024317674381 -12.629452027419646 … -6.922947356511528 -12.629452027419646;;; -17.194464781057807 -12.215015836029423 … -7.260147533467603 -12.215015836029423; -12.215015836029425 -9.745491274759289 … -6.641508440557249 -9.745491274759289; … ; -7.260147533467602 -6.641508440557249 … -5.290773463061556 -6.64150844055725; -12.215015836029425 -9.74549127475929 … -6.641508440557249 -9.74549127475929;;; -8.899434405774725 -8.087664364030587 … -6.372990336410456 -8.087664364030587; -8.087664364030587 -7.4177618035353445 … -5.957297820982622 -7.4177618035353445; … ; -6.372990336410455 -5.957297820982622 … -4.983951303995711 -5.957297820982623; -8.087664364030589 -7.417761803535345 … -5.957297820982623 -7.417761803535345]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), ComplexF64[0.025674506039111318 + 0.0im 0.025674506039111318 + 0.0im; 0.025370853334774908 + 0.0im 0.025370853334774908 + 0.0im; … ; 0.017882114168679287 + 0.01586532494596619im 0.017882114168679287 - 0.01586532494596619im; 0.018531899211158255 + 0.016441825618465737im 0.018531899211158255 - 0.016441825618465737im], [18.33745811 0.0; 0.0 18.33745811]), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141)), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141)), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [5.6605849526755945 5.430094018792097 … 4.799658873286858 5.430092617260142; 5.430092182614729 5.2100139009376445 … 4.610779787163205 5.21000665159537; … ; 4.7996548217713135 4.610776914822219 … 4.0999439227471735 4.610784005655145; 5.430092279316119 5.210007720133894 … 4.610787257848503 5.210013228077044;;; 5.5399994503794545 5.337709165417354 … 4.758691700343377 5.337707778538299; 5.337706797013612 5.139474719968731 … 4.57937081154683 5.1394662050409; … ; 4.758671273339652 4.5793537599134435 … 4.08430853432194 4.579359460573131; 5.337698740486528 5.139460075970103 … 4.579371835802766 5.139465564586885;;; 5.246386910675727 5.103626829505811 … 4.634278081102458 5.1036351545715; 5.103615836231298 4.9517324486738 … 4.4757460540813145 4.951730280782055; … ; 4.6342257852090345 4.475706336841034 … 4.016091877691782 4.475715526851558; 5.103611222585601 4.951718813193361 … 4.475747125837134 4.9517328575941075;;; … ;;; 4.91446277814838 4.809920420845574 … 4.415374768664345 4.809899490465741; 4.809902245299566 4.68867815590669 … 4.272662609450108 4.6886509188062835; … ; 4.415360037399255 4.272659806788916 … 3.844295875759095 4.272666355665489; 4.809897594774165 4.688664834816264 … 4.272677975114426 4.6886607720753855;;; 5.246388141026757 5.103633126053314 … 4.634260950919813 5.103625370658422; 5.10361663088319 4.951736325678224 … 4.47572735824666 4.951720030011935; … ; 4.634245847020085 4.475723571315487 … 4.016111196309608 4.475735973407673; 5.103622910290299 4.9517321568633434 … 4.47574781456577 4.951738566190609;;; 5.53999897791299 5.337708906511009 … 4.75869167801284 5.337708103291108; 5.337699800138446 5.13946814734421 … 4.579365396079925 5.139460080687669; … ; 4.758684988567038 4.579364649054879 … 4.0843251501181665 4.579375919356459; 5.337708278686975 5.139468042778396 … 4.579381931003061 5.139476686178665]), 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(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [-1.0070391424330043 -0.975387304305737 … -0.8480056741209907 -0.9753850615993862; -0.975399202947088 -0.9311362525680815 … -0.8473218321958558 -0.9311476368025426; … ; -0.8479939827267265 -0.8473482426906996 … -0.6662344611800579 -0.8473419819954159; -0.9754010993081895 -0.9311303359283728 … -0.8473250751153684 -0.9311429564682313;;; -0.9894593744782293 -0.9542347456154908 … -0.9002263541799076 -0.9542221952685824; -0.9542300785136096 -0.9325837679567734 … -0.8785934518356044 -0.9325758307420233; … ; -0.900213586864364 -0.8785772187013331 … -0.790553917188158 -0.8785695858634732; -0.9542160615276214 -0.9325763632167455 … -0.878586202453514 -0.9325798312328094;;; -0.7543648943828424 -0.8566117244967792 … -0.91430800226148 -0.8566086763604721; -0.8565632902520416 -0.8894729133116438 … -0.9071073384046188 -0.8894599495158388; … ; -0.9142348441102862 -0.9070764546660615 … -0.8645406177830675 -0.907073453690154; -0.8565672050408945 -0.8894650294849582 … -0.9071081627027958 -0.8894711882309343;;; … ;;; -0.6143401267710693 -0.8434553859028415 … -0.96812074049464 -0.8434114100485582; -0.8434301297712311 -0.9184282028243627 … -0.9579429457606536 -0.9183837578490424; … ; -0.9680858082784694 -0.9579212267366392 … -0.9346844443224034 -0.9579343022066327; -0.8433821079134285 -0.9183832232407012 … -0.9579567628094807 -0.9183897915337748;;; -0.7543676901444766 -0.8565977937566284 … -0.9142874779369798 -0.8566016952422149; -0.8565782012081339 -0.8894727828761474 … -0.9070861897431534 -0.8894577963027586; … ; -0.9142466592514922 -0.9070605693822943 … -0.8645633625737217 -0.9070799464205118; -0.8565716856236587 -0.8894507842689457 … -0.9071032549612863 -0.889473356528695;;; -0.9894602453873929 -0.9542174248397669 … -0.9002440914698495 -0.9542320070044171; -0.9542219951356644 -0.9325816247777934 … -0.878584728541676 -0.9325731163057881; … ; -0.90021816459539 -0.8785641996587888 … -0.7905878767132335 -0.8785889965017899; -0.9542322499835998 -0.932577631056415 … -0.8786052669664884 -0.9325865324524539]), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141))], DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [0.0, 0.24369393582936685, 0.9747757433174674, 2.1932454224643014, 3.8991029732698697, 6.092348395734172, 8.772981689857206, 8.772981689857206, 6.092348395734172, 3.8991029732698697  …  2.680633294123035, 4.386490844928604, 6.5797362673929065, 9.260369561515938, 9.260369561515938, 6.5797362673929065, 4.386490844928604, 2.680633294123035, 1.4621636149762012, 0.7310818074881006]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [-3.194429239762362 -2.8137217257193226 … -2.034778974313623 -2.8137208845449253; -2.813735460538041 -2.5028717994295135 … -1.8912047163001682 -2.5028904330062494; … ; -2.034771334434902 -1.8912339991359977 … -1.4011576895957667 -1.8912206476077884; -2.8137372601977524 -2.5028720635935553 … -1.8912004885343827 -2.5028791761902633;;; -4.348894329873498 -3.704189944228724 … -2.5145249902469873 -3.704178780760871; -3.7041876455305847 -3.210870851523388 … -2.2565204612713967 -3.2108714292364686; … ; -2.514532649935167 -2.2565212797705114 … -1.690196686861929 -2.256507946272966; -3.704181685071681 -3.2108780907819883 … -2.25651218763337 -3.2108760701812695;;; -12.702442764764921 -7.968000731020393 … -3.540177454626626 -7.967989357818395; -7.96796329005017 -5.683231739397132 … -3.0728697248805537 -5.6832209434930725; … ; -3.540156592368854 -3.0728785583822775 … -2.1392222031528423 -3.072866367395846; -7.9679718184847195 -5.683237491050885 … -3.0728694774229113 -5.683229605396115;;; … ;;; -28.840929863167712 -14.823778141801077 … -4.218677375759355 -14.823755096326625; -14.823771061215478 -8.859202074337318 … -3.608227692822074 -8.859184866462405; … ; -4.218657174808274 -3.608208776459251 … -2.4247014410611554 -3.6082153030526714; -14.823727689883075 -8.859170415844083 … -3.608226144206582 -8.859181046878035;;; -12.702444330175528 -7.967980503732737 … -3.5401740604847696 -7.967992160613216; -7.967977406354368 -5.683227731957212 … -3.0728672720537427 -5.683229041050112; … ; -3.5401483456990093 -3.0728454386240567 … -2.1392256293256695 -3.072852413570089; -7.967964611362785 -5.683209902164893 … -3.0728638809527657 -5.683226065097377;;; -4.348895673249128 -3.7041728823593454 … -2.5145427498674646 -3.704188267743896; -3.704186559027806 -3.2108752809689283 … -2.2565171534443724 -3.210874839153464; … ; -2.514523512438807 -2.2564973715865317 … -1.6902140305907776 -2.256510898127954; -3.704188335327214 -3.2108713918133645 … -2.25652115694605 -3.210871649809134]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), ComplexF64[0.025674506039111318 + 0.0im 0.025674506039111318 + 0.0im; 0.025370853334774908 + 0.0im 0.025370853334774908 + 0.0im; … ; 0.017882114168679287 + 0.01586532494596619im 0.017882114168679287 - 0.01586532494596619im; 0.018531899211158255 + 0.016441825618465737im 0.018531899211158255 - 0.016441825618465737im], [18.33745811 0.0; 0.0 18.33745811]), nothing, @NamedTuple{ψ_reals::Array{ComplexF64, 3}}[(ψ_reals = [0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; … ;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im],)]), DFTK.DftHamiltonianBlock(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), Any[DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [0.0, 0.24369393582936685, 0.9747757433174674, 2.1932454224643014, 3.8991029732698697, 6.092348395734172, 8.772981689857206, 8.772981689857206, 6.092348395734172, 3.8991029732698697  …  2.680633294123035, 4.386490844928604, 6.5797362673929065, 9.260369561515938, 9.260369561515938, 6.5797362673929065, 4.386490844928604, 2.680633294123035, 1.4621636149762012, 0.7310818074881006]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [-7.847975050004952 -7.268428440205683 … -5.98643217347949 -7.268428440205681; -7.268428440205682 -6.7817494477990765 … -5.654662671267517 -6.7817494477990765; … ; -5.986432173479489 -5.654662671267517 … -4.834867151162882 -5.654662671267517; -7.268428440205682 -6.7817494477990765 … -5.654662671267517 -6.7817494477990765;;; -8.899434405774723 -8.087664364030587 … -6.3729903364104565 -8.087664364030587; -8.087664364030587 -7.417761803535345 … -5.957297820982622 -7.417761803535345; … ; -6.372990336410455 -5.957297820982622 … -4.983951303995711 -5.957297820982624; -8.087664364030587 -7.417761803535345 … -5.957297820982622 -7.417761803535345;;; -17.194464781057807 -12.215015836029425 … -7.260147533467604 -12.215015836029423; -12.215015836029426 -9.745491274759289 … -6.641508440557249 -9.745491274759289; … ; -7.260147533467602 -6.64150844055725 … -5.290773463061557 -6.64150844055725; -12.215015836029426 -9.745491274759289 … -6.641508440557249 -9.745491274759289;;; … ;;; -33.141052514545024 -18.79024317674381 … -7.6659314039290605 -18.790243176743807; -18.79024317674381 -12.629452027419646 … -6.922947356511528 -12.629452027419646; … ; -7.66593140392906 -6.922947356511528 … -5.334312872497847 -6.922947356511528; -18.79024317674381 -12.629452027419646 … -6.922947356511528 -12.629452027419646;;; -17.194464781057807 -12.215015836029423 … -7.260147533467603 -12.215015836029423; -12.215015836029425 -9.745491274759289 … -6.641508440557249 -9.745491274759289; … ; -7.260147533467602 -6.641508440557249 … -5.290773463061556 -6.64150844055725; -12.215015836029425 -9.74549127475929 … -6.641508440557249 -9.74549127475929;;; -8.899434405774725 -8.087664364030587 … -6.372990336410456 -8.087664364030587; -8.087664364030587 -7.4177618035353445 … -5.957297820982622 -7.4177618035353445; … ; -6.372990336410455 -5.957297820982622 … -4.983951303995711 -5.957297820982623; -8.087664364030589 -7.417761803535345 … -5.957297820982623 -7.417761803535345]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), ComplexF64[0.025674506039111318 + 0.0im 0.025674506039111318 + 0.0im; 0.025370853334774908 + 0.0im 0.025370853334774908 + 0.0im; … ; 0.017882114168679287 + 0.01586532494596619im 0.017882114168679287 - 0.01586532494596619im; 0.018531899211158255 + 0.016441825618465737im 0.018531899211158255 - 0.016441825618465737im], [18.33745811 0.0; 0.0 18.33745811]), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141)), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141)), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [5.6605849526755945 5.430094018792097 … 4.799658873286858 5.430092617260142; 5.430092182614729 5.2100139009376445 … 4.610779787163205 5.21000665159537; … ; 4.7996548217713135 4.610776914822219 … 4.0999439227471735 4.610784005655145; 5.430092279316119 5.210007720133894 … 4.610787257848503 5.210013228077044;;; 5.5399994503794545 5.337709165417354 … 4.758691700343377 5.337707778538299; 5.337706797013612 5.139474719968731 … 4.57937081154683 5.1394662050409; … ; 4.758671273339652 4.5793537599134435 … 4.08430853432194 4.579359460573131; 5.337698740486528 5.139460075970103 … 4.579371835802766 5.139465564586885;;; 5.246386910675727 5.103626829505811 … 4.634278081102458 5.1036351545715; 5.103615836231298 4.9517324486738 … 4.4757460540813145 4.951730280782055; … ; 4.6342257852090345 4.475706336841034 … 4.016091877691782 4.475715526851558; 5.103611222585601 4.951718813193361 … 4.475747125837134 4.9517328575941075;;; … ;;; 4.91446277814838 4.809920420845574 … 4.415374768664345 4.809899490465741; 4.809902245299566 4.68867815590669 … 4.272662609450108 4.6886509188062835; … ; 4.415360037399255 4.272659806788916 … 3.844295875759095 4.272666355665489; 4.809897594774165 4.688664834816264 … 4.272677975114426 4.6886607720753855;;; 5.246388141026757 5.103633126053314 … 4.634260950919813 5.103625370658422; 5.10361663088319 4.951736325678224 … 4.47572735824666 4.951720030011935; … ; 4.634245847020085 4.475723571315487 … 4.016111196309608 4.475735973407673; 5.103622910290299 4.9517321568633434 … 4.47574781456577 4.951738566190609;;; 5.53999897791299 5.337708906511009 … 4.75869167801284 5.337708103291108; 5.337699800138446 5.13946814734421 … 4.579365396079925 5.139460080687669; … ; 4.758684988567038 4.579364649054879 … 4.0843251501181665 4.579375919356459; 5.337708278686975 5.139468042778396 … 4.579381931003061 5.139476686178665]), 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(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [-1.012471243318914 -0.9778935614523668 … -0.902246102147859 -0.9778870779639393; -0.9778953027070393 -0.9434866453807046 … -0.8434886401924633 -0.943475152828414; … ; -0.9022154023659632 -0.8435314214995889 … -0.7654076994252874 -0.8435360721745259; -0.9778955607364038 -0.9434834037172722 … -0.8434973198136743 -0.9434827433799053;;; -1.002339963905538 -0.9662830234328778 … -0.8942683896866028 -0.9662800746682486; -0.9662980602347601 -0.9382611410932561 … -0.8654837806003657 -0.9382526002341985; … ; -0.8942631578947564 -0.8654882598449213 … -0.7840610959362028 -0.8654949476386268; -0.9662943815170354 -0.9382545417966198 … -0.8654866700099537 -0.9382514490061226;;; -0.8145309116436312 -0.8331724467517032 … -0.8253375764101668 -0.8331719749647513; -0.8332032668589368 -0.8333989749348267 … -0.8162103096993447 -0.8333856536871035; … ; -0.8253616779333944 -0.8162037783248629 … -0.7768774405261201 -0.8162245082190417; -0.8331848453783776 -0.8333776575322479 … -0.8162177866336046 -0.8333810812275272;;; … ;;; -0.6908084439304262 -0.786784002824179 … -0.8343613531997945 -0.7867974989567519; -0.7867833208308991 -0.8127320156414227 … -0.8261471791185908 -0.8127367488634707; … ; -0.8343836403010821 -0.8261665983424195 … -0.8101078355427137 -0.8261652552893883; -0.7868190245746081 -0.8127502776346485 … -0.8261530151362939 -0.8127529135671854;;; -0.8145246898814474 -0.8331790268524786 … -0.8253466211195918 -0.8331746073771747; -0.8331741691651404 -0.8333841593674783 … -0.8162137392796852 -0.8333789575445013; … ; -0.8253788084512449 -0.8162345540510111 … -0.7768785091670887 -0.816237113359751; -0.8331932416096459 -0.8333953787296374 … -0.8162255453977056 -0.8333990622451821;;; -1.0023334708839924 -0.9662888835213239 … -0.8942562070310123 -0.9662838467398107; -0.9662818071147046 -0.9382520607927368 … -0.8654848157612979 -0.9382493026185733; … ; -0.8942813048974677 -0.8654983501350089 … -0.7840622446022538 -0.8654972432909113; -0.9662836946124634 -0.9382561462569619 … -0.8654895435089555 -0.9382572179108474]), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141))], DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [0.0, 0.24369393582936685, 0.9747757433174674, 2.1932454224643014, 3.8991029732698697, 6.092348395734172, 8.772981689857206, 8.772981689857206, 6.092348395734172, 3.8991029732698697  …  2.680633294123035, 4.386490844928604, 6.5797362673929065, 9.260369561515938, 9.260369561515938, 6.5797362673929065, 4.386490844928604, 2.680633294123035, 1.4621636149762012, 0.7310818074881006]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [-3.1998613406482717 -2.816227982865952 … -2.089019402340491 -2.8162229009094784; -2.816231560297992 -2.5152221922421365 … -1.8873715242967757 -2.515217949032121; … ; -2.088992754074139 -1.887417177944887 … -1.5003309278409962 -1.8874147377868984; -2.8162317216259667 -2.5152251313824547 … -1.8873727332326888 -2.5152189631019377;;; -4.361774919300807 -3.716238222046111 … -2.5085670257536825 -3.716236660160537; -3.716255627251735 -3.2165482246598707 … -2.243410790036158 -3.2165481987286437; … ; -2.5085822209655593 -2.2434323209140996 … -1.6837038656099739 -2.2434333080481195; -3.7162600050610948 -3.2165562693618623 … -2.24341265518981 -3.216547687954583;;; -12.76260878202571 -7.944561453275317 … -3.451207028775313 -7.944552656422674; -7.944603266657065 -5.627157801020315 … -2.9819726961752795 -5.627146647664337; … ; -3.4512834261919623 -2.9820058820410793 … -2.0515590258958953 -2.9820174219247337; -7.944589458822202 -5.627150119098175 … -2.98197910135372 -5.627139498392708;;; … ;;; -28.91739818032707 -14.767106758722415 … -4.084917988464509 -14.767141185234818; -14.767124252275146 -8.753505887154379 … -3.4764319261800107 -8.753537857476832; … ; -4.084955006830887 -3.4764541480650313 … -2.300124832281466 -3.476446256135427; -14.767164606544254 -8.75353747023803 … -3.476422396533395 -8.753544168911446;;; -12.762601329912497 -7.944561736828588 … -3.451233203667382 -7.944565072748175; -7.944573374311375 -5.627139108448542 … -2.9819948215902747 -5.627150202291855; … ; -3.451280494898762 -2.9820194232927735 … -2.0515407759190367 -2.9820095805093283; -7.944586167348771 -5.627154496625584 … -2.9819861713891855 -5.627151770813864;;; -4.361768898745727 -3.7162443410409027 … -2.5085548654286276 -3.7162401074792895; -3.7162463710068456 -3.216545716983872 … -2.2434172406639945 -3.216551025466249; … ; -2.5085866527408847 -2.2434315220627514 … -1.683688398479798 -2.243419144917075; -3.7162397799560773 -3.2165499070139116 … -2.243405433488517 -3.2165423352675275]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), ComplexF64[0.025674506039111318 + 0.0im 0.025674506039111318 + 0.0im; 0.025370853334774908 + 0.0im 0.025370853334774908 + 0.0im; … ; 0.017882114168679287 + 0.01586532494596619im 0.017882114168679287 - 0.01586532494596619im; 0.018531899211158255 + 0.016441825618465737im 0.018531899211158255 - 0.016441825618465737im], [18.33745811 0.0; 0.0 18.33745811]), nothing, @NamedTuple{ψ_reals::Array{ComplexF64, 3}}[(ψ_reals = [0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; … ;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im],)])]), basis = PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), energies = Energies(total = -28.93959976554498), converged = true, occupation_threshold = 1.0e-6, ρ = [0.43396181612010215 0.3834725059693696 … 0.2550212088926964 0.38347482150834244; 0.3834760632844162 0.33711721166658737 … 0.22215719821403862 0.33711606678961387; … ; 0.2550231185337639 0.22215753716368153 … 0.1446996924850187 0.22216067122917985; 0.38347480329568956 0.33711335524089703 … 0.2221592890051082 0.3371180698793557;;; 0.36310877349774734 0.34775485135342327 … 0.27195596608017475 0.34774893832249026; 0.3477477838053586 0.3261702744798164 … 0.24592555874998104 0.3261593528253219; … ; 0.27194173997844406 0.24591816390018018 … 0.1735603556260342 0.24591619561240155; 0.3477404549221845 0.3261587707523971 … 0.2459241813409039 0.3261572304807059;;; 0.21368489577052224 0.27316830331520214 … 0.31015179234643137 0.273165105969115; 0.2731317221703963 0.30452563568116736 … 0.2989615565767613 0.3045115279417349; … ; 0.3100904467302994 0.2989298021175349 … 0.23789094955247025 0.2989282140929028; 0.2731349324149447 0.30451785698321276 … 0.2989649792156081 0.304520664990483;;; … ;;; 0.14401541909333987 0.24599539441690227 … 0.34560752381969734 0.24597372898958417; 0.2459780266966039 0.3072798392736563 … 0.34238429350132876 0.30724772202587836; … ; 0.34557043860648184 0.3423609689831957 … 0.2856118555178325 0.3423756170447601; 0.2459567365876554 0.3072473476725099 … 0.3423977525426679 0.30725156498762607;;; 0.21368463316971173 0.2731567019484538 … 0.3101321213918162 0.2731553052183481; 0.2731405025144493 0.3045221947483704 … 0.29894513010446033 0.3045085000766792; … ; 0.31009296849307827 0.298920256440491 … 0.23790180343924905 0.29893875248131474; 0.27313684174962993 0.3045064346560932 … 0.29896245201444005 0.30452306969478227;;; 0.3631080770251987 0.3477464954543404 … 0.2719607288163484 0.3477540464978226; 0.34774118064182824 0.32615787341580077 … 0.24592523870310515 0.3261577578112096; … ; 0.27194434421646996 0.24591433035991048 … 0.17357228871301614 0.24592653066336953; 0.3477463118452793 0.3261557891264117 … 0.24593666341741402 0.32617052799084356;;;; 0.43835279113940695 0.3877901579964267 … 0.25918888557589403 0.38778457745661843; 0.38779160831254217 0.34137776663132224 … 0.22624372197564405 0.3413698561577556; … ; 0.2592007830367297 0.22625202528237356 … 0.14848025406564497 0.22625515763934492; 0.3877925557661763 0.3413746429329507 … 0.22624887280532943 0.34137487582325043;;; 0.3653790960547522 0.3373408703815163 … 0.24779726984258185 0.3373344621665271; 0.3373470504086768 0.30789711926455526 … 0.22147563187096228 0.307888318011742; … ; 0.2478063443457272 0.2214785182056258 … 0.15363489014611836 0.22148397158531097; 0.3373397617169529 0.3078864707569377 … 0.22147833128161792 0.30788764887209236;;; 0.21264426713641676 0.2312333198723354 … 0.22279988863082087 0.23123280651255773; 0.23124610432613196 0.23694883169173825 … 0.2102295263534518 0.2369440112130775; … ; 0.22280534800590673 0.21022594584934118 … 0.16309031763328677 0.21023651268028526; 0.2312339681921183 0.23693306037812512 … 0.21023167180310054 0.23694070089314986;;; … ;;; 0.1423350916959822 0.18286756712393604 … 0.21230777152184438 0.18286573530906114; 0.1828646571692036 0.2050075574953707 … 0.20589907963116877 0.2050009674517161; … ; 0.21231782386931392 0.20590858405709306 … 0.1677109599696326 0.20591188748982395; 0.18287345672234612 0.2050096983316576 … 0.20590744341025366 0.20501253824694315;;; 0.2126416425949744 0.2312356882632205 … 0.22280693700004606 0.23123587335242635; 0.23123342863649274 0.23694279640302382 … 0.21023074520359433 0.2369377674053943; … ; 0.22282098438271433 0.21024330062414745 … 0.16309723896219636 0.2102482276873309; 0.23124567682380417 0.23694766355095911 … 0.21024151359176385 0.2369526930507461;;; 0.365374310815189 0.3373371528968314 … 0.24780058869262656 0.3373349972547917; 0.3373360772123648 0.30788872534938583 … 0.22147509680834523 0.3078828165810187; … ; 0.2478147450590627 0.2214870369388372 … 0.15363868373578243 0.2214907307448652; 0.33734468362807424 0.3078914821414081 … 0.22148372069496194 0.30789420161055003], α = 0.8, eigenvalues = [[-1.3350868155480318, -0.7238809123935506, -0.4458624721506791, -0.445829165955781, -0.40736337036697623, -0.059380226408857206, -0.05934570469278298, 0.015046901217781029, 0.1947801401023741, 0.20779718414720566, 0.24208994030637274], [-1.3032421140570065, -0.66496092027976, -0.39263285784768764, -0.3926182826640603, -0.37584783558865287, 0.011700271359364566, 0.011705818836012655, 0.02669932879995906, 0.2065334315208841, 0.2134337305373148, 0.25876635698364037]], occupation = [[1.0, 1.0, 1.0, 1.0, 1.0, 0.9932976214017248, 0.9932517051504578, 0.0026357129185815673, 1.7610901085733434e-54, 6.939247116745074e-61, 1.6354307893427628e-79], [1.0, 1.0, 1.0, 1.0, 1.0, 0.005335080715905979, 0.005329074585934593, 0.00015080522739471144, 3.014064187814292e-60, 9.002485369688757e-64, 1.7175090876925464e-89]], εF = -0.024409117145419136, n_bands_converge = 8, n_iter = 6, ψ = Matrix{ComplexF64}[[-0.19161376233004548 + 0.18283920105133433im 3.1837833535497845e-6 - 1.4036811800845226e-6im … -0.07721445235060047 - 0.022829558740261196im 8.580309846877492e-6 - 2.455062914075427e-6im; -0.14470388190813577 + 0.1380728759430691im 3.579515606846294e-5 - 1.9739330737822348e-5im … -0.09539961841026982 - 0.026399194118111258im -0.3177687531608746 + 0.24609289609537158im; … ; -0.044042596731468146 + 0.042027613323963646im -0.02516022368086159 - 0.058853105934881515im … -0.01743498194650188 - 0.005122223425857123im -0.015585178148400207 + 0.028014129259624116im; -0.0808521328514877 + 0.07715076742341538im -0.05412274625300886 - 0.12659187619145126im … -0.015399423481445868 - 0.004646887448466946im -0.018459564630143796 + 0.05006847471391438im], [-0.18355485754076958 - 0.1862063670094432im -1.2426865926004215e-6 + 4.080249181675596e-6im … 0.06404106505453086 - 0.054117383871951905im 1.2923893568783608e-5 - 3.172967459643284e-5im; -0.13858943601384702 - 0.14059030627292052im -3.2701114372019557e-8 + 1.0290223792726034e-5im … 0.07197512575880251 - 0.06216293510648699im -0.07608739300211369 + 0.4032460797789735im; … ; -0.04273653825186217 - 0.0433526157709847im 0.06187086392906183 + 0.018585869359248917im … 0.01316971203343652 - 0.011119158526550326im 0.005123737258907901 + 0.031188280485909395im; -0.0782301540356782 - 0.07935847285879957im 0.13252948636065714 + 0.03981099846810958im … 0.011679482176227276 - 0.00973869315957955im 0.01780439775226919 + 0.0514434982534515im]], diagonalization = @NamedTuple{λ::Vector{Vector{Float64}}, X::Vector{Matrix{ComplexF64}}, residual_norms::Vector{Vector{Float64}}, n_iter::Vector{Int64}, converged::Bool, n_matvec::Int64}[(λ = [[-1.3350868155480318, -0.7238809123935506, -0.4458624721506791, -0.445829165955781, -0.40736337036697623, -0.059380226408857206, -0.05934570469278298, 0.015046901217781029, 0.1947801401023741, 0.20779718414720566, 0.24208994030637274], [-1.3032421140570065, -0.66496092027976, -0.39263285784768764, -0.3926182826640603, -0.37584783558865287, 0.011700271359364566, 0.011705818836012655, 0.02669932879995906, 0.2065334315208841, 0.2134337305373148, 0.25876635698364037]], X = [[-0.19161376233004548 + 0.18283920105133433im 3.1837833535497845e-6 - 1.4036811800845226e-6im … -0.07721445235060047 - 0.022829558740261196im 8.580309846877492e-6 - 2.455062914075427e-6im; -0.14470388190813577 + 0.1380728759430691im 3.579515606846294e-5 - 1.9739330737822348e-5im … -0.09539961841026982 - 0.026399194118111258im -0.3177687531608746 + 0.24609289609537158im; … ; -0.044042596731468146 + 0.042027613323963646im -0.02516022368086159 - 0.058853105934881515im … -0.01743498194650188 - 0.005122223425857123im -0.015585178148400207 + 0.028014129259624116im; -0.0808521328514877 + 0.07715076742341538im -0.05412274625300886 - 0.12659187619145126im … -0.015399423481445868 - 0.004646887448466946im -0.018459564630143796 + 0.05006847471391438im], [-0.18355485754076958 - 0.1862063670094432im -1.2426865926004215e-6 + 4.080249181675596e-6im … 0.06404106505453086 - 0.054117383871951905im 1.2923893568783608e-5 - 3.172967459643284e-5im; -0.13858943601384702 - 0.14059030627292052im -3.2701114372019557e-8 + 1.0290223792726034e-5im … 0.07197512575880251 - 0.06216293510648699im -0.07608739300211369 + 0.4032460797789735im; … ; -0.04273653825186217 - 0.0433526157709847im 0.06187086392906183 + 0.018585869359248917im … 0.01316971203343652 - 0.011119158526550326im 0.005123737258907901 + 0.031188280485909395im; -0.0782301540356782 - 0.07935847285879957im 0.13252948636065714 + 0.03981099846810958im … 0.011679482176227276 - 0.00973869315957955im 0.01780439775226919 + 0.0514434982534515im]], residual_norms = [[0.0010830295950414507, 0.0013615233567775549, 0.0008521655378177696, 0.0008221039012728818, 0.0005681889813269336, 0.000736479223669548, 0.0007111324826112991, 0.0009763024901842998, 0.001171397283394587, 0.001377295108464002, 0.0026207911734469403], [0.0007647164959973471, 0.0012721026551156705, 0.0017008935480829026, 0.0016613189986760895, 0.00096808348131202, 0.0027183027010290557, 0.002676152140793012, 0.00245711916776737, 0.0014792681072740808, 0.002346123947538236, 0.008126109399951991]], n_iter = [1, 1], converged = 1, n_matvec = 44)], stage = :finalize, history_Δρ = [0.7352640676927197, 0.14974932274094907, 0.07238116342224896, 0.06516373152977108, 0.031155800454918833, 0.009606352322064074], history_Etot = [-27.64444842272148, -28.922796669483677, -28.931076095593667, -28.937694028413873, -28.93954436696797, -28.93959976554498], runtime_ns = 0x0000000020fe4864, algorithm = "SCF")

Notice that the ρ argument is now passed to kwargsscfcheckpoints instead. If we run in the same folder the SCF again (here using a tighter tolerance), the calculation just continues.

checkpointargs = kwargs_scf_checkpoints(basis; ρ=guess_density(basis, magnetic_moments))
scfres = self_consistent_field(basis; tol=1e-3, checkpointargs...)
(ham = Hamiltonian(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), HamiltonianBlock[DFTK.DftHamiltonianBlock(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), Any[DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [0.0, 0.24369393582936685, 0.9747757433174674, 2.1932454224643014, 3.8991029732698697, 6.092348395734172, 8.772981689857206, 8.772981689857206, 6.092348395734172, 3.8991029732698697  …  2.680633294123035, 4.386490844928604, 6.5797362673929065, 9.260369561515938, 9.260369561515938, 6.5797362673929065, 4.386490844928604, 2.680633294123035, 1.4621636149762012, 0.7310818074881006]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [-7.847975050004952 -7.268428440205683 … -5.98643217347949 -7.268428440205681; -7.268428440205682 -6.7817494477990765 … -5.654662671267517 -6.7817494477990765; … ; -5.986432173479489 -5.654662671267517 … -4.834867151162882 -5.654662671267517; -7.268428440205682 -6.7817494477990765 … -5.654662671267517 -6.7817494477990765;;; -8.899434405774723 -8.087664364030587 … -6.3729903364104565 -8.087664364030587; -8.087664364030587 -7.417761803535345 … -5.957297820982622 -7.417761803535345; … ; -6.372990336410455 -5.957297820982622 … -4.983951303995711 -5.957297820982624; -8.087664364030587 -7.417761803535345 … -5.957297820982622 -7.417761803535345;;; -17.194464781057807 -12.215015836029425 … -7.260147533467604 -12.215015836029423; -12.215015836029426 -9.745491274759289 … -6.641508440557249 -9.745491274759289; … ; -7.260147533467602 -6.64150844055725 … -5.290773463061557 -6.64150844055725; -12.215015836029426 -9.745491274759289 … -6.641508440557249 -9.745491274759289;;; … ;;; -33.141052514545024 -18.79024317674381 … -7.6659314039290605 -18.790243176743807; -18.79024317674381 -12.629452027419646 … -6.922947356511528 -12.629452027419646; … ; -7.66593140392906 -6.922947356511528 … -5.334312872497847 -6.922947356511528; -18.79024317674381 -12.629452027419646 … -6.922947356511528 -12.629452027419646;;; -17.194464781057807 -12.215015836029423 … -7.260147533467603 -12.215015836029423; -12.215015836029425 -9.745491274759289 … -6.641508440557249 -9.745491274759289; … ; -7.260147533467602 -6.641508440557249 … -5.290773463061556 -6.64150844055725; -12.215015836029425 -9.74549127475929 … -6.641508440557249 -9.74549127475929;;; -8.899434405774725 -8.087664364030587 … -6.372990336410456 -8.087664364030587; -8.087664364030587 -7.4177618035353445 … -5.957297820982622 -7.4177618035353445; … ; -6.372990336410455 -5.957297820982622 … -4.983951303995711 -5.957297820982623; -8.087664364030589 -7.417761803535345 … -5.957297820982623 -7.417761803535345]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), ComplexF64[0.025674506039111318 + 0.0im 0.025674506039111318 + 0.0im; 0.025370853334774908 + 0.0im 0.025370853334774908 + 0.0im; … ; 0.017882114168679287 + 0.01586532494596619im 0.017882114168679287 - 0.01586532494596619im; 0.018531899211158255 + 0.016441825618465737im 0.018531899211158255 - 0.016441825618465737im], [18.33745811 0.0; 0.0 18.33745811]), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141)), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141)), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [5.659912913331012 5.429414827938758 … 4.799102074801049 5.429462603738389; 5.429419392562135 5.2093374383572275 … 4.610233490275232 5.209380386810632; … ; 4.799096109178202 4.610225416902616 … 4.099485584164269 4.610257521983908; 5.42945856304354 5.209372818334126 … 4.610260237277458 5.209415982104173;;; 5.539298704465887 5.336992865318916 … 4.758045100408964 5.3370212889616475; 5.336997101285513 5.138756638679207 … 4.578739476760865 5.1387802619345635; … ; 4.758061147928536 4.578749575071016 … 4.083769952949066 4.578766605634967; 5.337029016783522 5.138782740874851 … 4.578756301523568 5.138807851437006;;; 5.2454822146424 5.102701270895486 … 4.633403155677706 5.102726515498707; 5.102709050182511 4.950816295505486 … 4.474902114999438 4.950832638534235; … ; 4.63343095661466 4.474919030901504 … 4.015374491838976 4.474934108790737; 5.102739342276684 4.950835791419816 … 4.4749158823176085 4.950859909351696;;; … ;;; 4.913289944839494 4.808715247652369 … 4.414436506697209 4.808816512729063; 4.808730881729827 4.687492928238956 … 4.271733622787309 4.6875676890001525; … ; 4.414397399377631 4.271690939869503 … 3.843552818488267 4.271785005107911; 4.808791756154367 4.6875323259347335 … 4.271804921036798 4.687644377740443;;; 5.245415697923929 5.10261732728065 … 4.633502757176732 5.102744599376348; 5.102634295883821 4.950726509174151 … 4.474969042326742 4.950828785438502; … ; 4.633456985784972 4.4749201391258255 … 4.015504214659628 4.475018897381319; 5.102715796375119 4.950789084497751 … 4.475042473890494 4.950916490385084;;; 5.539205653267899 5.336894686253387 … 4.758079928244094 5.33698951451645; 5.336905746162571 5.13866048848667 … 4.578758885426202 5.138741379624637; … ; 4.758048597280214 4.578725758757267 … 4.0838323516507335 4.578793545173736; 5.336970025569067 5.138714967017756 … 4.578809843561995 5.138804927284522]), 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(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [-1.007578435371594 -0.9757189980439382 … -0.8487896762045722 -0.9757177143339181; -0.9757056285079686 -0.9296153307610499 … -0.8471415534522546 -0.9296135599861578; … ; -0.8488264178546344 -0.847144512146416 … -0.6674675387411846 -0.8471274168670458; -0.975705953119564 -0.9296130719877559 … -0.8471278701675974 -0.9295945846129435;;; -0.9899155825827722 -0.9544951422699591 … -0.9009126760994879 -0.9544927056414578; -0.9545098413364504 -0.9323978622729645 … -0.8785573957395143 -0.9323792237633857; … ; -0.9009474124993763 -0.8785915181766336 … -0.7913819835977558 -0.8785957867396949; -0.9545233604598863 -0.9324003610690278 … -0.8785609310467797 -0.9323914042425113;;; -0.7548200023062964 -0.8566620397710405 … -0.9144634361691457 -0.8566989134101789; -0.8566834561165475 -0.8894926834426767 … -0.9071587467674826 -0.8895025633792736; … ; -0.9145207630604105 -0.9071817705805632 … -0.8647606467788425 -0.9071897381357895; -0.8567360561901727 -0.889509307331023 … -0.90715992321946 -0.8895312282932331;;; … ;;; -0.6146033502977574 -0.8436437540661695 … -0.9685843232041467 -0.8438306744340013; -0.8436799284136338 -0.9185473956113706 … -0.9582458385762387 -0.9185986942197781; … ; -0.9685577994365635 -0.9582036398235562 … -0.9351773968319748 -0.958280456990661; -0.8437805488743718 -0.9185609728953639 … -0.9583011053198418 -0.9187055887205526;;; -0.7545782439075214 -0.8564633956484178 … -0.9145149099339431 -0.8566873337526559; -0.8564923161170142 -0.8893213008142196 … -0.9071693135508294 -0.8894453239132095; … ; -0.9144724317037334 -0.9071274865472543 … -0.8648252237909059 -0.907208502498746; -0.8566227186714165 -0.8893827501183612 … -0.9072262250989236 -0.889550180390326;;; -0.9897724567863695 -0.9543577656600776 … -0.9008952098231359 -0.9544192238808823; -0.9543350750632356 -0.9322316050154491 … -0.8785339714679986 -0.9322884990219307; … ; -0.9008686100810477 -0.8785182833713976 … -0.7914030232691734 -0.8785773849993174; -0.954372935071051 -0.9322625822512554 … -0.8785739189385364 -0.93233722701338]), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141))], DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [0.0, 0.24369393582936685, 0.9747757433174674, 2.1932454224643014, 3.8991029732698697, 6.092348395734172, 8.772981689857206, 8.772981689857206, 6.092348395734172, 3.8991029732698697  …  2.680633294123035, 4.386490844928604, 6.5797362673929065, 9.260369561515938, 9.260369561515938, 6.5797362673929065, 4.386490844928604, 2.680633294123035, 1.4621636149762012, 0.7310818074881006]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), [-3.195640572045534 -2.814732610310863 … -2.036119774883013 -2.81468355080121; -2.8147146761515156 -2.5020273402028987 … -1.8915707344445398 -2.5019826209746023; … ; -2.0361624821559214 -1.891581766511317 … -1.4028491057397983 -1.8915325661506546; -2.814675830281706 -2.5019897014527066 … -1.8915303041576563 -2.501928050307847;;; -4.3500512838916086 -3.7051666409816306 … -2.5158579121009805 -3.7051357807103975; -3.705177104081525 -3.2114030271291027 … -2.257115739961271 -3.2113607653641676; … ; -2.5158766009812954 -2.25713976408824 … -1.6915633346444008 -2.2571270020873517; -3.705158707706951 -3.211379423729522 … -2.2571024505058332 -3.2113453563408507;;; -12.703802568721702 -7.968976604904979 … -3.541207813959044 -7.968988233940895; -7.968990241963462 -5.6841676626964786 … -3.073765072325294 -5.684161199604326; … ; -3.5412373399133528 -3.0737711802363092 … -2.140159618001423 -3.073764069902303; -7.969012549942915 -5.684164790670496 … -3.073752481459101 -5.684162593700826;;; … ;;; -28.842365920003285 -14.825171683157611 … -4.2200792204359985 -14.825257338448745; -14.825192223427619 -8.86050649479206 … -3.609459572300457 -8.860483032639271; … ; -4.220091803987993 -3.609460056465581 … -2.425937450841555 -3.609442808394278; -14.825231969463816 -8.860480674380277 … -3.609443540794571 -8.860513238399756;;; -12.703627327041401 -7.96886190439719 … -3.5411596862248143 -7.96895857040573; -7.9688738562626185 -5.684086066399357 … -3.073708711781337 -5.684107813233996; … ; -3.541162979386364 -3.073715787978678 … -2.140094472192834 -3.073698045674677; -7.968922758325722 -5.6840849403799005 … -3.0736921917656788 -5.684124964764532;;; -4.350001209293195 -3.705127443437278 … -2.515805617989497 -3.7050940733950197; -3.705093692931252 -3.211332920064124 … -2.257072907024418 -3.211308922932638; … ; -2.5158103492112884 -2.2570903455967524 … -1.6915219756141506 -2.2570816608082045; -3.705067273532573 -3.211309418768845 … -2.257061896359164 -3.211294103264203]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 1, num. G vectors =  1141), ComplexF64[0.025674506039111318 + 0.0im 0.025674506039111318 + 0.0im; 0.025370853334774908 + 0.0im 0.025370853334774908 + 0.0im; … ; 0.017882114168679287 + 0.01586532494596619im 0.017882114168679287 - 0.01586532494596619im; 0.018531899211158255 + 0.016441825618465737im 0.018531899211158255 - 0.016441825618465737im], [18.33745811 0.0; 0.0 18.33745811]), nothing, @NamedTuple{ψ_reals::Array{ComplexF64, 3}}[(ψ_reals = [0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; … ;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im],)]), DFTK.DftHamiltonianBlock(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), Any[DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [0.0, 0.24369393582936685, 0.9747757433174674, 2.1932454224643014, 3.8991029732698697, 6.092348395734172, 8.772981689857206, 8.772981689857206, 6.092348395734172, 3.8991029732698697  …  2.680633294123035, 4.386490844928604, 6.5797362673929065, 9.260369561515938, 9.260369561515938, 6.5797362673929065, 4.386490844928604, 2.680633294123035, 1.4621636149762012, 0.7310818074881006]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [-7.847975050004952 -7.268428440205683 … -5.98643217347949 -7.268428440205681; -7.268428440205682 -6.7817494477990765 … -5.654662671267517 -6.7817494477990765; … ; -5.986432173479489 -5.654662671267517 … -4.834867151162882 -5.654662671267517; -7.268428440205682 -6.7817494477990765 … -5.654662671267517 -6.7817494477990765;;; -8.899434405774723 -8.087664364030587 … -6.3729903364104565 -8.087664364030587; -8.087664364030587 -7.417761803535345 … -5.957297820982622 -7.417761803535345; … ; -6.372990336410455 -5.957297820982622 … -4.983951303995711 -5.957297820982624; -8.087664364030587 -7.417761803535345 … -5.957297820982622 -7.417761803535345;;; -17.194464781057807 -12.215015836029425 … -7.260147533467604 -12.215015836029423; -12.215015836029426 -9.745491274759289 … -6.641508440557249 -9.745491274759289; … ; -7.260147533467602 -6.64150844055725 … -5.290773463061557 -6.64150844055725; -12.215015836029426 -9.745491274759289 … -6.641508440557249 -9.745491274759289;;; … ;;; -33.141052514545024 -18.79024317674381 … -7.6659314039290605 -18.790243176743807; -18.79024317674381 -12.629452027419646 … -6.922947356511528 -12.629452027419646; … ; -7.66593140392906 -6.922947356511528 … -5.334312872497847 -6.922947356511528; -18.79024317674381 -12.629452027419646 … -6.922947356511528 -12.629452027419646;;; -17.194464781057807 -12.215015836029423 … -7.260147533467603 -12.215015836029423; -12.215015836029425 -9.745491274759289 … -6.641508440557249 -9.745491274759289; … ; -7.260147533467602 -6.641508440557249 … -5.290773463061556 -6.64150844055725; -12.215015836029425 -9.74549127475929 … -6.641508440557249 -9.74549127475929;;; -8.899434405774725 -8.087664364030587 … -6.372990336410456 -8.087664364030587; -8.087664364030587 -7.4177618035353445 … -5.957297820982622 -7.4177618035353445; … ; -6.372990336410455 -5.957297820982622 … -4.983951303995711 -5.957297820982623; -8.087664364030589 -7.417761803535345 … -5.957297820982623 -7.417761803535345]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), ComplexF64[0.025674506039111318 + 0.0im 0.025674506039111318 + 0.0im; 0.025370853334774908 + 0.0im 0.025370853334774908 + 0.0im; … ; 0.017882114168679287 + 0.01586532494596619im 0.017882114168679287 - 0.01586532494596619im; 0.018531899211158255 + 0.016441825618465737im 0.018531899211158255 - 0.016441825618465737im], [18.33745811 0.0; 0.0 18.33745811]), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141)), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141)), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [5.659912913331012 5.429414827938758 … 4.799102074801049 5.429462603738389; 5.429419392562135 5.2093374383572275 … 4.610233490275232 5.209380386810632; … ; 4.799096109178202 4.610225416902616 … 4.099485584164269 4.610257521983908; 5.42945856304354 5.209372818334126 … 4.610260237277458 5.209415982104173;;; 5.539298704465887 5.336992865318916 … 4.758045100408964 5.3370212889616475; 5.336997101285513 5.138756638679207 … 4.578739476760865 5.1387802619345635; … ; 4.758061147928536 4.578749575071016 … 4.083769952949066 4.578766605634967; 5.337029016783522 5.138782740874851 … 4.578756301523568 5.138807851437006;;; 5.2454822146424 5.102701270895486 … 4.633403155677706 5.102726515498707; 5.102709050182511 4.950816295505486 … 4.474902114999438 4.950832638534235; … ; 4.63343095661466 4.474919030901504 … 4.015374491838976 4.474934108790737; 5.102739342276684 4.950835791419816 … 4.4749158823176085 4.950859909351696;;; … ;;; 4.913289944839494 4.808715247652369 … 4.414436506697209 4.808816512729063; 4.808730881729827 4.687492928238956 … 4.271733622787309 4.6875676890001525; … ; 4.414397399377631 4.271690939869503 … 3.843552818488267 4.271785005107911; 4.808791756154367 4.6875323259347335 … 4.271804921036798 4.687644377740443;;; 5.245415697923929 5.10261732728065 … 4.633502757176732 5.102744599376348; 5.102634295883821 4.950726509174151 … 4.474969042326742 4.950828785438502; … ; 4.633456985784972 4.4749201391258255 … 4.015504214659628 4.475018897381319; 5.102715796375119 4.950789084497751 … 4.475042473890494 4.950916490385084;;; 5.539205653267899 5.336894686253387 … 4.758079928244094 5.33698951451645; 5.336905746162571 5.13866048848667 … 4.578758885426202 5.138741379624637; … ; 4.758048597280214 4.578725758757267 … 4.0838323516507335 4.578793545173736; 5.336970025569067 5.138714967017756 … 4.578809843561995 5.138804927284522]), 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(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [-1.012518306664749 -0.9779693968603212 … -0.9030051492048514 -0.9779684853883865; -0.9779602602761565 -0.9436470714323322 … -0.8431319066285479 -0.9436489356402961; … ; -0.903033341726228 -0.8430896714658823 … -0.7669035281234244 -0.8430972201024826; -0.9779615471292388 -0.9436511757574714 … -0.8431417867877434 -0.9436591164888051;;; -1.002435846242139 -0.9662027728009631 … -0.8942641896482874 -0.966215686536165; -0.9661892162661851 -0.9380450711497426 … -0.8654115726510497 -0.9380588172115368; … ; -0.8942524725373874 -0.8654124861693416 … -0.7841089274675414 -0.8654124861336874; -0.9661940314612255 -0.9380511271027838 … -0.8654131594079837 -0.9380575023100731;;; -0.814546369630097 -0.8329726879610024 … -0.8252128336881687 -0.8329800380932234; -0.8329658017468136 -0.8330422018841096 … -0.8159303848066528 -0.8330543601104421; … ; -0.8251885015655142 -0.8159200995640676 … -0.7766513909143525 -0.815928005483952; -0.8329586580664324 -0.8330458133066639 … -0.8159398017279024 -0.8330518095197156;;; … ;;; -0.6906978006896451 -0.7863920837890019 … -0.8337335389542768 -0.7862972198704371; -0.786365480997232 -0.8121315997713167 … -0.8255011721569129 -0.8121038008457128; … ; -0.8337321644452171 -0.8255071794470937 … -0.8095074485732884 -0.8254891747587784; -0.7863205122053091 -0.812124148574988 … -0.8254922502433681 -0.8120680012926679;;; -0.8145801574595575 -0.8330378441900745 … -0.8252219057544461 -0.8329693040001594; -0.8330181195878913 -0.8331135096287603 … -0.8159541356746655 -0.8330717892035248; … ; -0.825224015300663 -0.815958068692485 … -0.7766732130790504 -0.8159458816463793; -0.832985581577118 -0.8330963824550895 … -0.8159514778607799 -0.8330492942750365;;; -1.0024397677738828 -0.96620543358858 … -0.8942792827502309 -0.9662010774989795; -0.9662147446408994 -0.9380643471433108 … -0.8654169149926327 -0.93805687651079; … ; -0.8942703634830339 -0.8654138115867879 … -0.7841388785631173 -0.8654035732988323; -0.9662121538051519 -0.9380647687564054 … -0.8654115859123305 -0.9380523757220073]), DFTK.NoopOperator{Float64}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141))], DFTK.FourierMultiplication{Float64, Vector{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [0.0, 0.24369393582936685, 0.9747757433174674, 2.1932454224643014, 3.8991029732698697, 6.092348395734172, 8.772981689857206, 8.772981689857206, 6.092348395734172, 3.8991029732698697  …  2.680633294123035, 4.386490844928604, 6.5797362673929065, 9.260369561515938, 9.260369561515938, 6.5797362673929065, 4.386490844928604, 2.680633294123035, 1.4621636149762012, 0.7310818074881006]), DFTK.RealSpaceMultiplication{Float64, Array{Float64, 3}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), [-3.200580443338689 -2.816983009127246 … -2.090335247883292 -2.8169343218556784; -2.8169693079197033 -2.5160590808741814 … -1.887561087620833 -2.5160179966287406; … ; -2.090369406027515 -1.8875269258307834 … -1.5022850951220381 -1.8875023693860915; -2.8169314242913805 -2.516027805222422 … -1.8875442207778024 -2.5159925821837086;;; -4.362571547550975 -3.716874271512635 … -2.50920942564978 -3.7168587616051045; -3.71685647901126 -3.217050236005881 … -2.2439699168728064 -3.217040358812319; … ; -2.5091816610193063 -2.243960732080948 … -1.6842902785141862 -2.243943701481344; -3.71682937870829 -3.2170301897632783 … -2.2439546788670377 -3.2170114544084125;;; -12.763528936045503 -7.945287253094941 … -3.4519572114780672 -7.945269358623939; -7.9452725875937285 -5.627717181137911 … -2.9825367103644647 -5.627712996335495; … ; -3.4519050784184566 -2.9825095092198133 … -2.0520503621369333 -2.9825023372504655; -7.945235151819174 -5.627701296646137 … -2.9825323599675433 -5.627683174927308;;; … ;;; -28.918460370395174 -14.767920012880444 … -4.085228436186128 -14.767723883885182; -14.767877776011217 -8.754090698952007 … -3.4767149058811313 -8.753988139265205; … ; -4.085266168996646 -3.4767635960891186 … -2.3002675025828685 -3.476651526162395; -14.767771932794753 -8.754043850059901 … -3.476634685718097 -8.753875650971871;;; -12.763629240593437 -7.945436352938847 … -3.4518666820453174 -7.945240540653234; -7.9453996597334955 -5.627878275213898 … -2.982493533905173 -5.627734278524311; … ; -3.4519145629832937 -2.9825463701239086 … -2.0519424614809783 -2.9824354248223104; -7.945285621231424 -5.627798572716628 … -2.982417444527535 -5.627624078649243;;; -4.3626685202807085 -3.7169751113657807 … -2.509189690916592 -3.716875927013117; -3.716973362508916 -3.2171656621919857 … -2.2439558505490522 -3.217077300421497; … ; -2.5092121026132745 -2.2439858738121425 … -1.6842578309080944 -2.2439078491077193; -3.716906492266674 -3.217111605273995 … -2.2438995633329584 -3.21700925197283]), DFTK.NonlocalOperator{Float64, Matrix{ComplexF64}, Matrix{Float64}}(PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), KPoint([     0,      0,      0], spin = 2, num. G vectors =  1141), ComplexF64[0.025674506039111318 + 0.0im 0.025674506039111318 + 0.0im; 0.025370853334774908 + 0.0im 0.025370853334774908 + 0.0im; … ; 0.017882114168679287 + 0.01586532494596619im 0.017882114168679287 - 0.01586532494596619im; 0.018531899211158255 + 0.016441825618465737im 0.018531899211158255 - 0.016441825618465737im], [18.33745811 0.0; 0.0 18.33745811]), nothing, @NamedTuple{ψ_reals::Array{ComplexF64, 3}}[(ψ_reals = [0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; … ;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im;;; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; … ; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im; 0.0 + 0.0im 0.0 + 0.0im … 0.0 + 0.0im 0.0 + 0.0im],)])]), basis = PlaneWaveBasis(model = Model(gga_x_pbe+gga_c_pbe, spin_polarization = :collinear), Ecut = 10.0 Ha, kgrid = MonkhorstPack([1, 1, 1])), energies = Energies(total = -28.93961180004593), converged = true, occupation_threshold = 1.0e-6, ρ = [0.4340327357172213 0.3835141784927993 … 0.25501462294275257 0.38351986630752083; 0.38351736572789047 0.33713369155595546 … 0.22214337662075256 0.33714053331284655; … ; 0.2550222078770091 0.22214734867670477 … 0.14466607927208672 0.22214604664871046; 0.3835236860695024 0.33714060663474843 … 0.22214131390284417 0.33714233214211675;;; 0.36330040575059036 0.3479099737771911 … 0.2720372922273239 0.3479076466407648; 0.34791596543609044 0.3263052829659125 … 0.24599819825472938 0.3263001758906464; … ; 0.2720735494338796 0.24602190309405667 … 0.1735998785499411 0.24601667148387174; 0.3479291998614201 0.32631156066480793 … 0.24599530780723847 0.32630787027248337;;; 0.213902829363881 0.2733721908790834 … 0.3103490302805905 0.27339273670842035; 0.2733874100204544 0.3047588332179601 … 0.29916406624512126 0.30476474410749055; … ; 0.3103973000468765 0.29918924722874357 … 0.23806734387190456 0.2992003845552619; 0.27341968194119554 0.30477082225150376 … 0.29917000155642925 0.30479241303982574;;; … ;;; 0.14404566075883113 0.24605678495188968 … 0.3459160892731891 0.2461517585628141; 0.24607142371030483 0.3073936388147822 … 0.34266951406562757 0.3074487429751534; … ; 0.3458742586983395 0.34262664343272037 … 0.2859120057621776 0.3427127195291794; 0.2461227511066084 0.3074109980702136 … 0.3427333133144352 0.30752577106017454;;; 0.2137703806717014 0.27321915195936197 … 0.31039639559868465 0.27336095423463214; 0.27323990124022046 0.3045979310961172 … 0.29917247378068834 0.30470011098555666; … ; 0.3103461004259288 0.29912102674489965 … 0.2381221797148568 0.29921324353805717; 0.27332370793052313 0.30465136345380317 … 0.2992373323204586 0.3047921347215089;;; 0.3631325602565932 0.3477424771737021 … 0.27203594957011107 0.3478236395061366; 0.34775506360454816 0.3261457457037789 … 0.24598163059109235 0.3262102710042507; … ; 0.2720077877101368 0.24595256592286208 … 0.17361908952516036 0.24599708085119132; 0.3478019399556447 0.3261815512750091 … 0.24601031485808106 0.3262549455768209;;;; 0.43834608647054424 0.3878044814837841 … 0.2592473901982483 0.3878006119718311; 0.3877997444090314 0.3414030040204058 … 0.2263115210037267 0.34140033891160904; … ; 0.25924051627220734 0.22631006099270645 … 0.1485552514049874 0.22630589454367794; 0.38779806797476746 0.3414033292980457 … 0.2263109505634204 0.34139852063280723;;; 0.3653150283409014 0.3372581534918355 … 0.24773601619929342 0.33726586900131333; 0.33725763437933726 0.3077992331812268 … 0.22142021965427414 0.30780733347701905; … ; 0.24772609024132428 0.22141453654645105 … 0.15360572324373126 0.22141519399473603; 0.3372601895392085 0.307804395815932 … 0.22142138129325337 0.307808478735177;;; 0.212501717053352 0.23099323140187686 … 0.22248184399369778 0.23100494135348787; 0.2309954565156918 0.2366375387194865 … 0.20991165111077328 0.23664983347748836; … ; 0.22247340273454919 0.2099063752656842 … 0.162825989020953 0.20990848312742957; 0.2309991720768932 0.23664477494453942 … 0.20991350554347635 0.23665165329127294;;; … ;;; 0.14221190317953988 0.18260794384111284 … 0.2118601072144679 0.18259182320835135; 0.1826003034811451 0.2046544242214093 … 0.2054489990425238 0.20463838178192306; … ; 0.21186018620731026 0.20545401918699593 … 0.16730432426981093 0.20544581024520056; 0.1825942927097297 0.2046475186853983 … 0.20544719007699958 0.20463456870891683;;; 0.21250422008196512 0.23102929973690775 … 0.22250229647503839 0.23100933110420618; 0.23101946823339178 0.23668817155369784 … 0.2099371059843887 0.2366697631916268; … ; 0.222501343957578 0.20994277680151013 … 0.16284490176929214 0.20993153787523477; 0.23101191939844934 0.23668111530229494 … 0.2099340094004064 0.2366639892868793;;; 0.36531053598518504 0.3372750603422803 … 0.2477401392309551 0.33726004569613455; 0.3372666371688078 0.3078251818483366 … 0.22142868704605742 0.3078120655976559; … ; 0.24773677627402335 0.22143181098423761 … 0.15361231303280404 0.22142256715660094; 0.3372607507450694 0.30782076072776776 … 0.22142621225657663 0.3078071789912666], α = 0.8, eigenvalues = [[-1.3339188379564417, -0.723394973835523, -0.44531611299038054, -0.4453121848047938, -0.40638331372003517, -0.05924263206321728, -0.05924058325407774, 0.015475682114807016, 0.1952997434270895, 0.20831468894024252, 0.24218502189145258], [-1.3006975813716342, -0.6619195271071726, -0.3898560681237973, -0.38985474304171985, -0.37376968499801305, 0.014871436811028644, 0.014874894553534024, 0.028373459733911234, 0.20799093453566472, 0.21454164462468372, 0.25861362659566894]], occupation = [[1.0, 1.0, 1.0, 1.0, 1.0, 0.9947068528724078, 0.9947046486728329, 0.0031925894902431373, 4.2180110089360455e-54, 1.7542247946069786e-60, 8.313771508112514e-79], [1.0, 1.0, 1.0, 1.0, 1.0, 0.0036309440800293166, 0.0036282891064023898, 0.00013667577808436032, 2.554236391974387e-60, 1.1521282319324013e-63, 1.3713672525391133e-88]], εF = -0.02309439561795541, n_bands_converge = 8, n_iter = 2, ψ = Matrix{ComplexF64}[[0.17762100923197072 + 0.19666141226107003im -1.3257419904374789e-5 + 1.6211959684704171e-6im … 0.06878154642293753 - 0.04094250443052101im -2.795893203934041e-5 - 5.737326866051384e-7im; 0.13414482275777964 + 0.14853141557582156im -1.5849771580853395e-5 + 8.058235055490549e-6im … 0.08452070598325448 - 0.05347769638849717im -0.2361820808691117 - 0.5266066289910554im; … ; 0.0407998162238868 + 0.045168756232999624im 0.0075910687784036075 + 0.06352096093108885im … 0.015628043418258217 - 0.009873066999231907im -0.009456427599195058 - 0.023835403747902283im; 0.07487941356009052 + 0.08289944099844253im 0.01631997264788057 + 0.13668077398111195im … 0.013932011141462948 - 0.0092459621975662im -0.007452590903421523 - 0.02502207660864497im], [0.26108559329999953 - 0.014408554956450067im 2.5210454418345103e-5 + 3.826585717793074e-6im … -0.0296724132883487 - 0.0792174901005166im -2.1829610040614606e-5 - 1.5250157543410988e-5im; 0.19706994807645206 - 0.010877091403794708im 1.8180458557133527e-5 - 1.5086813047507295e-5im … -0.03498157991212751 - 0.09050594350540384im 0.1484173987828125 - 0.5626141659443097im; … ; 0.0607612937327014 - 0.003354005661064112im 0.00970959254883346 - 0.06385044919627512im … -0.006347397622149998 - 0.01623753915499119im 0.009065083075894907 - 0.02581689967962922im; 0.11126537403326686 - 0.00614196712180153im 0.020810956583213202 - 0.13683057044454178im … -0.005940214518652462 - 0.014251221405938808im 0.012785693441296342 - 0.027056436405413338im]], diagonalization = @NamedTuple{λ::Vector{Vector{Float64}}, X::Vector{Matrix{ComplexF64}}, residual_norms::Vector{Vector{Float64}}, n_iter::Vector{Int64}, converged::Bool, n_matvec::Int64}[(λ = [[-1.3339188379564417, -0.723394973835523, -0.44531611299038054, -0.4453121848047938, -0.40638331372003517, -0.05924263206321728, -0.05924058325407774, 0.015475682114807016, 0.1952997434270895, 0.20831468894024252, 0.24218502189145258], [-1.3006975813716342, -0.6619195271071726, -0.3898560681237973, -0.38985474304171985, -0.37376968499801305, 0.014871436811028644, 0.014874894553534024, 0.028373459733911234, 0.20799093453566472, 0.21454164462468372, 0.25861362659566894]], X = [[0.17762100923197072 + 0.19666141226107003im -1.3257419904374789e-5 + 1.6211959684704171e-6im … 0.06878154642293753 - 0.04094250443052101im -2.795893203934041e-5 - 5.737326866051384e-7im; 0.13414482275777964 + 0.14853141557582156im -1.5849771580853395e-5 + 8.058235055490549e-6im … 0.08452070598325448 - 0.05347769638849717im -0.2361820808691117 - 0.5266066289910554im; … ; 0.0407998162238868 + 0.045168756232999624im 0.0075910687784036075 + 0.06352096093108885im … 0.015628043418258217 - 0.009873066999231907im -0.009456427599195058 - 0.023835403747902283im; 0.07487941356009052 + 0.08289944099844253im 0.01631997264788057 + 0.13668077398111195im … 0.013932011141462948 - 0.0092459621975662im -0.007452590903421523 - 0.02502207660864497im], [0.26108559329999953 - 0.014408554956450067im 2.5210454418345103e-5 + 3.826585717793074e-6im … -0.0296724132883487 - 0.0792174901005166im -2.1829610040614606e-5 - 1.5250157543410988e-5im; 0.19706994807645206 - 0.010877091403794708im 1.8180458557133527e-5 - 1.5086813047507295e-5im … -0.03498157991212751 - 0.09050594350540384im 0.1484173987828125 - 0.5626141659443097im; … ; 0.0607612937327014 - 0.003354005661064112im 0.00970959254883346 - 0.06385044919627512im … -0.006347397622149998 - 0.01623753915499119im 0.009065083075894907 - 0.02581689967962922im; 0.11126537403326686 - 0.00614196712180153im 0.020810956583213202 - 0.13683057044454178im … -0.005940214518652462 - 0.014251221405938808im 0.012785693441296342 - 0.027056436405413338im]], residual_norms = [[0.00034891362131416154, 0.0002795776342194072, 0.0002380627919326019, 0.0002894449882875871, 0.0004277734650859945, 0.0007990396284635853, 0.0011154897695640615, 0.00012849090650450114, 0.0013861245150926765, 0.003721269195142287, 0.0010081468532602024], [0.00020948811899008975, 0.0008383489138420694, 0.00016678458042613433, 0.0002174297489086948, 0.00016527646950681863, 0.0008626927383335273, 0.0008874596389477679, 0.0002505989860892425, 0.0007108990220246469, 0.0014400255453237917, 0.006685477303138959]], n_iter = [1, 1], converged = 1, n_matvec = 44)], stage = :finalize, history_Δρ = [0.001352715711414247, 0.0004529702769752246], history_Etot = [-28.939606269501052, -28.93961180004593], runtime_ns = 0x000000000d25edf8, algorithm = "SCF")

Since only the density is stored in a checkpoint (and not the Bloch waves), the first step needs a slightly elevated number of diagonalizations. Notice, that reconstructing the checkpointargs in this second call is important as the checkpointargs now contain different data, such that the SCF continues from the checkpoint. By default checkpoint is saved in the file dftk_scf_checkpoint.jld2, which can be changed using the filename keyword argument of kwargs_scf_checkpoints. Note that the file is not deleted by DFTK, so it is your responsibility to clean it up. Further note that warnings or errors will arise if you try to use a checkpoint, which is incompatible with your calculation.

We can also inspect the checkpoint file manually using the load_scfres function and use it manually to continue the calculation:

oldstate = load_scfres("dftk_scf_checkpoint.jld2")
scfres   = self_consistent_field(oldstate.basis, ρ=oldstate.ρ, ψ=oldstate.ψ, tol=1e-4);
n     Energy            log10(ΔE)   log10(Δρ)   Magnet   Diag   Δtime
---   ---------------   ---------   ---------   ------   ----   ------
  1   -28.93899485337                   -2.41    1.986    6.0   86.5ms
  2   -28.93951403752       -3.28       -2.80    1.985    1.0   83.8ms
  3   -28.93961135210       -4.01       -2.69    1.985    4.0   87.9ms
  4   -28.93961231069       -6.02       -2.82    1.985    1.0   61.5ms
  5   -28.93961276726       -6.34       -2.96    1.985    1.0   61.7ms
  6   -28.93961296044       -6.71       -3.12    1.985    1.0   61.8ms
  7   -28.93961315715       -6.71       -3.70    1.985    1.5   75.3ms
  8   -28.93961317029       -7.88       -4.20    1.985    2.0   71.7ms

Some details on what happens under the hood in this mechanism: When using the kwargs_scf_checkpoints function, the ScfSaveCheckpoints callback is employed during the SCF, which causes the density to be stored to the JLD2 file in every iteration. When reading the file, the kwargs_scf_checkpoints transparently patches away the ψ and ρ keyword arguments and replaces them by the data obtained from the file. For more details on using callbacks with DFTK's self_consistent_field function see Monitoring self-consistent field calculations.

(Cleanup files generated by this notebook)

rm("dftk_scf_checkpoint.jld2")
rm("scfres.jld2")