Skip to content
This repository was archived by the owner on Oct 6, 2022. It is now read-only.

Commit 8184e73

Browse files
tynshmfherbst
authored andcommitted
Integrate EDIIs into run_scf
1 parent 4fb88c1 commit 8184e73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/run_scf.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using Printf
22

33
# TODO Find a way to get the print statements out
44
function run_scf(problem::ScfProblem, guess_density::AbstractArray;
5-
max_iter=100, damping_max_error_norm=0.25,
5+
max_iter=100, ediis_max_error_norm=0.1,
66
kwargs...)
77
# Setup accelerators and SCF-global objects
88
damping = EDIIS(problem; kwargs...)
@@ -39,8 +39,8 @@ function run_scf(problem::ScfProblem, guess_density::AbstractArray;
3939
# If converged end iteration
4040
if scfconv.is_converged break end
4141

42-
if scfconv.error_norm < 0.25 && !switched_to_diis
43-
println("**** Switching on DIIS ****")
42+
if scfconv.error_norm < ediis_max_error_norm && !switched_to_diis
43+
println("**** Switching algorithms EDIIS -> cDIIS ****")
4444
damping = cDIIS(problem; kwargs...)
4545
switched_to_diis = true
4646
end

0 commit comments

Comments
 (0)