Skip to content

Commit 5aefec2

Browse files
committed
Added nhubbard field to scfres in forwarddiff_rules.
1 parent ae13ba7 commit 5aefec2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/scf/self_consistent_field.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ Overview of parameters:
190190
ρin, τ, nhubbard, α=damping, n_iter, nbandsalg.occupation_threshold,
191191
runtime_ns=time_ns() - start_ns, nextstate...,
192192
diagonalization=[nextstate.diagonalization])
193+
@show nhubbard
193194

194195
# Compute the energy of the new state
195196
if compute_consistent_energies

src/workarounds/forwarddiff_rules.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ function self_consistent_field(basis_dual::PlaneWaveBasis{T};
270270
# This has to be changed whenever the scfres structure changes
271271
(; ham, basis=basis_dual, energies, ρ, eigenvalues, occupation, εF, ψ,
272272
scfres.τ, # TODO make τ also differentiable for meta-GGA DFPT
273+
scfres.nhubbard,
273274
# non-differentiable metadata:
274275
response=getfield.(δresults, :info_gmres),
275276
scfres.converged, scfres.occupation_threshold, scfres.α, scfres.n_iter,

0 commit comments

Comments
 (0)