65 COMPLEX(KIND=dp),
ALLOCATABLE :: aux_buffer(:, :)
66 INTEGER :: ig_max = -1, ncall = -1, ncall_p(2) = -1, nbuffer = -1, n_simple_mix = -1, &
67 nskip_mixing = -1, p_metric_method = -1
68 INTEGER,
POINTER,
DIMENSION(:) :: ig_global_index => null()
69 LOGICAL :: gmix_p = .false.
70 LOGICAL,
POINTER,
DIMENSION(:) :: paw => null()
71 CHARACTER(len=15) :: iter_method =
""
72 REAL(kind=
dp) :: alpha = -1.0_dp, bconst = -1.0_dp, beta = -1.0_dp, broy_w0 = -1.0_dp, &
73 max_g2 = -1.0_dp, max_gvec_exp = -1.0_dp, pulay_alpha = -1.0_dp, &
74 pulay_beta = -1.0_dp, r_step = -1.0_dp, reg_par = -1.0_dp, &
75 sigma_max = -1.0_dp, wc = -1.0_dp, wmax = -1.0_dp, qm = -1.0_dp, &
76 qk = -1.0_dp, qkappa = -1.0_dp
78 REAL(kind=
dp) :: alpha_mag = -1.0_dp, beta_mag = -1.0_dp
79 REAL(kind=
dp),
DIMENSION(:),
POINTER :: p_metric => null()
80 REAL(kind=
dp),
DIMENSION(:),
POINTER :: kerker_factor => null()
81 REAL(kind=
dp),
DIMENSION(:),
POINTER :: kerker_factor_mag => null()
82 REAL(kind=
dp),
DIMENSION(:),
POINTER :: special_metric => null()
83 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: weight => null()
84 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: norm_res_buffer => null()
85 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: fmat => null(), gmat => null(), pulay_matrix => null(), smat => null()
87 INTEGER :: nat_local = -1, max_shell = -1
88 INTEGER :: tb_scc_mixer_memory = 0, tb_scc_mixer_natom = 0, &
89 tb_scc_mixer_ns = 0, tb_scc_mixer_step = 0
90 REAL(kind=
dp) :: tb_scc_mixer_error = 0.0_dp
91 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: acharge => null()
92 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: dacharge => null()
93 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: dfbroy => null()
94 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: ubroy => null()
95 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: abroy => null()
96 REAL(kind=
dp),
DIMENSION(:),
POINTER :: wbroy => null()
97 INTEGER,
DIMENSION(:),
POINTER :: atlist => null()
99 TYPE(
cp_1d_z_p_type),
DIMENSION(:),
POINTER :: last_res => null(), rhoin => null(), rhoin_old => null()
100 TYPE(
cp_1d_z_p_type),
DIMENSION(:, :),
POINTER :: delta_res => null(), u_vec => null(), z_vec => null()
101 TYPE(
cp_1d_z_p_type),
DIMENSION(:, :),
POINTER :: drho_buffer => null(), rhoin_buffer => null(), res_buffer => null()
103 TYPE(
rho_atom_coeff),
DIMENSION(:, :),
POINTER :: cpc_h_lastres => null(), cpc_s_lastres => null()
104 TYPE(
rho_atom_coeff),
DIMENSION(:, :),
POINTER :: cpc_h_in => null(), cpc_s_in => null()
105 TYPE(
rho_atom_coeff),
DIMENSION(:, :),
POINTER :: cpc_h_old => null(), cpc_s_old => null()
106 TYPE(
rho_atom_coeff),
DIMENSION(:, :, :),
POINTER :: cpc_h_in_buffer => null(), cpc_s_in_buffer => null()
107 TYPE(
rho_atom_coeff),
DIMENSION(:, :, :),
POINTER :: cpc_h_res_buffer => null(), cpc_s_res_buffer => null()
108 TYPE(
rho_atom_coeff),
DIMENSION(:, :, :),
POINTER :: dcpc_h_in => null(), dcpc_s_in => null()
110 CLASS(mixer_type),
ALLOCATABLE :: tb_scc_mixer
129 INTEGER,
INTENT(IN) :: mixing_method
130 REAL(
dp),
INTENT(IN) :: ecut
132 REAL(
dp) :: alpha, eps, gcut
134 mixing_store%nbuffer = 0
135 mixing_store%n_simple_mix = 0
136 mixing_store%ncall = 0
137 mixing_store%ncall_p = 0
138 mixing_store%alpha = 1.0_dp
139 mixing_store%pulay_beta = 1.0_dp
140 mixing_store%beta = 1.0_dp
141 mixing_store%alpha_mag = -1.0_dp
142 mixing_store%beta_mag = -1.0_dp
143 mixing_store%iter_method =
"NoMix"
144 mixing_store%max_g2 = 2._dp*ecut
145 mixing_store%gmix_p = .false.
146 mixing_store%tb_scc_mixer_error = 0.0_dp
147 mixing_store%tb_scc_mixer_memory = 0
148 mixing_store%tb_scc_mixer_natom = 0
149 mixing_store%tb_scc_mixer_ns = 0
150 mixing_store%tb_scc_mixer_step = 0
152 NULLIFY (mixing_store%p_metric)
153 NULLIFY (mixing_store%kerker_factor)
154 NULLIFY (mixing_store%kerker_factor_mag)
155 NULLIFY (mixing_store%special_metric)
156 NULLIFY (mixing_store%pulay_matrix)
157 NULLIFY (mixing_store%weight)
158 NULLIFY (mixing_store%fmat)
159 NULLIFY (mixing_store%gmat)
160 NULLIFY (mixing_store%smat)
161 NULLIFY (mixing_store%acharge)
162 NULLIFY (mixing_store%dacharge)
163 NULLIFY (mixing_store%dfbroy)
164 NULLIFY (mixing_store%ubroy)
165 NULLIFY (mixing_store%abroy)
166 NULLIFY (mixing_store%wbroy)
167 NULLIFY (mixing_store%atlist)
168 NULLIFY (mixing_store%last_res)
169 NULLIFY (mixing_store%rhoin)
170 NULLIFY (mixing_store%rhoin_old)
171 NULLIFY (mixing_store%delta_res)
172 NULLIFY (mixing_store%u_vec)
173 NULLIFY (mixing_store%z_vec)
174 NULLIFY (mixing_store%drho_buffer)
175 NULLIFY (mixing_store%rhoin_buffer)
176 NULLIFY (mixing_store%res_buffer)
177 NULLIFY (mixing_store%norm_res_buffer)
178 NULLIFY (mixing_store%ig_global_index)
179 NULLIFY (mixing_store%paw)
180 NULLIFY (mixing_store%cpc_h_in)
181 NULLIFY (mixing_store%cpc_s_in)
182 NULLIFY (mixing_store%cpc_h_old)
183 NULLIFY (mixing_store%cpc_s_old)
184 NULLIFY (mixing_store%dcpc_h_in)
185 NULLIFY (mixing_store%dcpc_s_in)
186 NULLIFY (mixing_store%cpc_h_lastres)
187 NULLIFY (mixing_store%cpc_s_lastres)
188 NULLIFY (mixing_store%cpc_h_in_buffer)
189 NULLIFY (mixing_store%cpc_s_in_buffer)
190 NULLIFY (mixing_store%cpc_h_res_buffer)
191 NULLIFY (mixing_store%cpc_s_res_buffer)
198 IF (mixing_store%alpha_mag < 0.0_dp) mixing_store%alpha_mag = mixing_store%alpha
199 IF (mixing_store%beta_mag < 0.0_dp) mixing_store%beta_mag = mixing_store%beta
206 IF (mixing_store%max_gvec_exp > 0._dp)
THEN
207 alpha = 0.25_dp/mixing_store%max_gvec_exp
210 mixing_store%max_g2 = gcut*gcut
213 SELECT CASE (mixing_method)
215 mixing_store%nbuffer = 1
221 mixing_store%bconst = 20.0_dp
226 mixing_store%bconst = 20.0_dp
253 IF (
ALLOCATED(mixing_store%aux_buffer))
DEALLOCATE (mixing_store%aux_buffer)
254 mixing_store%naux = 0
256 IF (
ASSOCIATED(mixing_store%kerker_factor))
THEN
257 DEALLOCATE (mixing_store%kerker_factor)
260 IF (
ASSOCIATED(mixing_store%kerker_factor_mag))
THEN
261 DEALLOCATE (mixing_store%kerker_factor_mag)
264 IF (
ASSOCIATED(mixing_store%special_metric))
THEN
265 DEALLOCATE (mixing_store%special_metric)
268 IF (
ASSOCIATED(mixing_store%pulay_matrix))
THEN
269 DEALLOCATE (mixing_store%pulay_matrix)
272 IF (
ASSOCIATED(mixing_store%rhoin_buffer))
THEN
273 DO i = 1,
SIZE(mixing_store%rhoin_buffer, 2)
274 DO j = 1,
SIZE(mixing_store%rhoin_buffer, 1)
275 DEALLOCATE (mixing_store%rhoin_buffer(j, i)%cc)
278 DEALLOCATE (mixing_store%rhoin_buffer)
281 IF (
ASSOCIATED(mixing_store%paw))
THEN
282 DEALLOCATE (mixing_store%paw)
284 IF (
ASSOCIATED(mixing_store%cpc_h_in))
THEN
285 DO j = 1,
SIZE(mixing_store%cpc_h_in, 2)
286 DO k = 1,
SIZE(mixing_store%cpc_h_in, 1)
287 IF (
ASSOCIATED(mixing_store%cpc_h_in(k, j)%r_coef))
THEN
288 DEALLOCATE (mixing_store%cpc_h_in(k, j)%r_coef)
289 DEALLOCATE (mixing_store%cpc_s_in(k, j)%r_coef)
293 DEALLOCATE (mixing_store%cpc_h_in)
294 DEALLOCATE (mixing_store%cpc_s_in)
296 IF (
ASSOCIATED(mixing_store%cpc_h_old))
THEN
297 DO j = 1,
SIZE(mixing_store%cpc_h_old, 2)
298 DO k = 1,
SIZE(mixing_store%cpc_h_old, 1)
299 IF (
ASSOCIATED(mixing_store%cpc_h_old(k, j)%r_coef))
THEN
300 DEALLOCATE (mixing_store%cpc_h_old(k, j)%r_coef)
301 DEALLOCATE (mixing_store%cpc_s_old(k, j)%r_coef)
305 DEALLOCATE (mixing_store%cpc_h_old)
306 DEALLOCATE (mixing_store%cpc_s_old)
308 IF (
ASSOCIATED(mixing_store%cpc_h_in_buffer))
THEN
309 DO i = 1,
SIZE(mixing_store%cpc_h_in_buffer, 3)
310 DO j = 1,
SIZE(mixing_store%cpc_h_in_buffer, 2)
311 DO k = 1,
SIZE(mixing_store%cpc_h_in_buffer, 1)
312 IF (
ASSOCIATED(mixing_store%cpc_h_in_buffer(k, j, i)%r_coef))
THEN
313 DEALLOCATE (mixing_store%cpc_h_in_buffer(k, j, i)%r_coef)
314 DEALLOCATE (mixing_store%cpc_s_in_buffer(k, j, i)%r_coef)
319 DEALLOCATE (mixing_store%cpc_h_in_buffer)
320 DEALLOCATE (mixing_store%cpc_s_in_buffer)
322 IF (
ASSOCIATED(mixing_store%cpc_h_res_buffer))
THEN
323 DO i = 1,
SIZE(mixing_store%cpc_h_res_buffer, 3)
324 DO j = 1,
SIZE(mixing_store%cpc_h_res_buffer, 2)
325 DO k = 1,
SIZE(mixing_store%cpc_h_res_buffer, 1)
326 IF (
ASSOCIATED(mixing_store%cpc_h_res_buffer(k, j, i)%r_coef))
THEN
327 DEALLOCATE (mixing_store%cpc_h_res_buffer(k, j, i)%r_coef)
328 DEALLOCATE (mixing_store%cpc_s_res_buffer(k, j, i)%r_coef)
333 DEALLOCATE (mixing_store%cpc_h_res_buffer)
334 DEALLOCATE (mixing_store%cpc_s_res_buffer)
337 IF (
ASSOCIATED(mixing_store%dcpc_h_in))
THEN
338 DO i = 1,
SIZE(mixing_store%dcpc_h_in, 3)
339 DO j = 1,
SIZE(mixing_store%dcpc_h_in, 2)
340 DO k = 1,
SIZE(mixing_store%dcpc_h_in, 1)
341 IF (
ASSOCIATED(mixing_store%dcpc_h_in(k, j, i)%r_coef))
THEN
342 DEALLOCATE (mixing_store%dcpc_h_in(k, j, i)%r_coef)
343 DEALLOCATE (mixing_store%dcpc_s_in(k, j, i)%r_coef)
348 DEALLOCATE (mixing_store%dcpc_h_in)
349 DEALLOCATE (mixing_store%dcpc_s_in)
351 IF (
ASSOCIATED(mixing_store%cpc_h_lastres))
THEN
352 DO j = 1,
SIZE(mixing_store%cpc_h_lastres, 2)
353 DO k = 1,
SIZE(mixing_store%cpc_h_lastres, 1)
354 IF (
ASSOCIATED(mixing_store%cpc_h_lastres(k, j)%r_coef))
THEN
355 DEALLOCATE (mixing_store%cpc_h_lastres(k, j)%r_coef)
356 DEALLOCATE (mixing_store%cpc_s_lastres(k, j)%r_coef)
360 DEALLOCATE (mixing_store%cpc_h_lastres)
361 DEALLOCATE (mixing_store%cpc_s_lastres)
364 IF (
ASSOCIATED(mixing_store%res_buffer))
THEN
365 DO i = 1,
SIZE(mixing_store%res_buffer, 2)
366 DO j = 1,
SIZE(mixing_store%res_buffer, 1)
367 DEALLOCATE (mixing_store%res_buffer(j, i)%cc)
370 DEALLOCATE (mixing_store%res_buffer)
373 IF (
ASSOCIATED(mixing_store%norm_res_buffer))
THEN
374 DEALLOCATE (mixing_store%norm_res_buffer)
377 IF (
ASSOCIATED(mixing_store%ig_global_index))
THEN
378 DEALLOCATE (mixing_store%ig_global_index)
381 IF (
ASSOCIATED(mixing_store%drho_buffer))
THEN
382 DO i = 1,
SIZE(mixing_store%drho_buffer, 2)
383 DO j = 1,
SIZE(mixing_store%drho_buffer, 1)
384 DEALLOCATE (mixing_store%drho_buffer(j, i)%cc)
387 DEALLOCATE (mixing_store%drho_buffer)
390 IF (
ASSOCIATED(mixing_store%last_res))
THEN
391 DO i = 1,
SIZE(mixing_store%last_res)
392 DEALLOCATE (mixing_store%last_res(i)%cc)
394 DEALLOCATE (mixing_store%last_res)
397 IF (
ASSOCIATED(mixing_store%rhoin))
THEN
398 DO i = 1,
SIZE(mixing_store%rhoin)
399 DEALLOCATE (mixing_store%rhoin(i)%cc)
401 DEALLOCATE (mixing_store%rhoin)
404 IF (
ASSOCIATED(mixing_store%rhoin_old))
THEN
405 DO i = 1,
SIZE(mixing_store%rhoin_old)
406 DEALLOCATE (mixing_store%rhoin_old(i)%cc)
408 DEALLOCATE (mixing_store%rhoin_old)
411 IF (
ASSOCIATED(mixing_store%p_metric))
THEN
412 DEALLOCATE (mixing_store%p_metric)
415 IF (
ASSOCIATED(mixing_store%weight))
THEN
416 DEALLOCATE (mixing_store%weight)
419 IF (
ASSOCIATED(mixing_store%fmat))
THEN
420 DEALLOCATE (mixing_store%fmat)
423 IF (
ASSOCIATED(mixing_store%acharge))
THEN
424 DEALLOCATE (mixing_store%acharge)
426 IF (
ASSOCIATED(mixing_store%dacharge))
THEN
427 DEALLOCATE (mixing_store%dacharge)
429 IF (
ASSOCIATED(mixing_store%dfbroy))
THEN
430 DEALLOCATE (mixing_store%dfbroy)
432 IF (
ASSOCIATED(mixing_store%ubroy))
THEN
433 DEALLOCATE (mixing_store%ubroy)
435 IF (
ASSOCIATED(mixing_store%abroy))
THEN
436 DEALLOCATE (mixing_store%abroy)
438 IF (
ASSOCIATED(mixing_store%wbroy))
THEN
439 DEALLOCATE (mixing_store%wbroy)
441 IF (
ASSOCIATED(mixing_store%atlist))
THEN
442 DEALLOCATE (mixing_store%atlist)
445 IF (
ALLOCATED(mixing_store%tb_scc_mixer))
THEN
446 DEALLOCATE (mixing_store%tb_scc_mixer)
450 IF (
ASSOCIATED(mixing_store%delta_res))
THEN
451 DO i = 1,
SIZE(mixing_store%delta_res, 2)
452 DO j = 1,
SIZE(mixing_store%delta_res, 1)
453 DEALLOCATE (mixing_store%delta_res(j, i)%cc)
456 DEALLOCATE (mixing_store%delta_res)
459 IF (
ASSOCIATED(mixing_store%u_vec))
THEN
460 DO i = 1,
SIZE(mixing_store%u_vec, 2)
461 DO j = 1,
SIZE(mixing_store%u_vec, 1)
462 DEALLOCATE (mixing_store%u_vec(j, i)%cc)
465 DEALLOCATE (mixing_store%u_vec)
468 IF (
ASSOCIATED(mixing_store%z_vec))
THEN
469 DO i = 1,
SIZE(mixing_store%z_vec, 2)
470 DO j = 1,
SIZE(mixing_store%z_vec, 1)
471 DEALLOCATE (mixing_store%z_vec(j, i)%cc)
474 DEALLOCATE (mixing_store%z_vec)
494 LOGICAL,
INTENT(IN),
OPTIONAL :: ls_scf, active_space
496 CHARACTER(LEN=:),
ALLOCATABLE :: description
497 CHARACTER(LEN=default_string_length) :: section_name
498 INTEGER :: default_mix
502 cpassert(.NOT.
ASSOCIATED(section))
504 IF (
PRESENT(ls_scf))
THEN
515 IF (
PRESENT(active_space)) as = active_space
516 cpassert(.NOT. (ls .AND. as))
519 section_name =
"RHO_MIXING"
521 section_name =
"MIXING"
525 description =
"Define type and parameters for mixing the active-space density matrix "// &
526 "during self-consistent embedding. This mixing is independent of the SCF "// &
527 "method used for the reference calculation, including OT. NBUFFER controls "// &
528 "the mixing history; N_SIMPLE_MIX controls the initial direct-mixing steps."
530 description =
"Define type and parameters for mixing "// &
531 "procedures to be applied to the density matrix. Normally, "// &
532 "only one type of mixing method should be accepted. The mixing "// &
533 "procedures activated by this section are only active for diagonalization "// &
534 "methods and linear scaling SCF, i.e. not with minimization methods based "// &
540 description=description, &
548 name=
"_SECTION_PARAMETERS_", &
549 description=
"Controls the activation of the mixing procedure", &
550 usage=
"&MIXING ON", &
551 default_l_val=.true., &
552 lone_keyword_l_val=.true.)
564 description=
"Mixing method to be applied", &
566 usage=
"METHOD KERKER_MIXING", &
567 default_i_val=default_mix, &
568 enum_c_vals=
s2a(
"NONE", &
573 "MODIFIED_BROYDEN_MIXING", &
574 "MULTISECANT_MIXING", &
575 "NEW_PULAY_MIXING"), &
579 enum_desc=
s2a(
"No mixing is applied", &
580 "Direct mixing of new and old density matrices", &
581 "Mixing of the potential in reciprocal space using the Kerker damping", &
583 "Original CP2K Broyden mixing with a constant BROY_W0 regularization", &
584 "Modified Broyden mixing with dynamic residual weights controlled by BROY_W0, "// &
585 "BROY_WREF, and BROY_WMAX", &
586 "Multisecant scheme for mixing",
"New Pulay mixing using Sundararaman et al.'s "// &
587 "metric and preconditioner, with improved convergence behavior and suitable for "// &
588 "grand canonical SCF"))
595 description=
"Fraction of new density to be included", &
599 default_r_val=0.4_dp, &
606 description=
"Fraction of new magnetization density to be included "// &
607 "(for spin-polarized calculations, ispin=2 channel after rho_total/m transform). "// &
608 "A negative value (default) means: use the same value as ALPHA. "// &
609 "For magnetic transition-metal systems, a larger value (e.g. 0.8-1.6) "// &
610 "than ALPHA often improves convergence.", &
614 default_r_val=-1.0_dp, &
615 usage=
"ALPHA_MAG 0.8")
621 description=
"Denominator parameter in Kerker damping "// &
622 "introduced to suppress charge sloshing: "// &
623 "rho_mix(g) = rho_in(g) + alpha*g^2/(g^2 + beta^2)*(rho_out(g)-rho_in(g))", &
627 default_r_val=0.5_dp, &
628 unit_str=
"bohr^-1", &
635 description=
"Kerker damping parameter for the magnetization channel "// &
636 "(for spin-polarized calculations). A negative value (default) means: "// &
637 "use the same value as BETA. Set to 0.0 to disable Kerker screening "// &
638 "on the magnetization density, which avoids suppression of long-range "// &
639 "magnetic order formation in transition-metal systems.", &
643 default_r_val=-1.0_dp, &
644 unit_str=
"bohr^-1", &
645 usage=
"BETA_MAG 0.0")
650 name=
"PULAY_ALPHA", &
651 description=
"Fraction of new density to be added to the Pulay expansion", &
655 default_r_val=0.0_dp, &
656 usage=
"PULAY_ALPHA 0.2")
662 description=
"Fraction of residual contribution to be added to Pulay expansion", &
666 default_r_val=1.0_dp, &
667 usage=
"PULAY_BETA 0.2")
673 description=
"The control parameter in the numerator of the Pulay metric "// &
674 "used in the new Pulay mixing, introduced to suppress charge sloshing: "// &
675 "Pulay metric: M(g) = (g^2 + qm^2 + qkapa^2)/(g^2 + qkapa^2)", &
679 default_r_val=0.75_dp, &
680 unit_str=
"bohr^-1", &
687 description=
"The control parameter in the denominator of the Kerker preconditioner "// &
688 "used in the new Pulay mixing, introduced to suppress charge sloshing: "// &
689 "Kerker preconditioner: K(g) = alpha * (g^2 + qkapa^2)/(g^2 + qk^2 + qkapa^2)", &
693 default_r_val=3.0_dp, &
694 unit_str=
"bohr^-1", &
701 description=
"The control parameter in the numerator and the denominator of "// &
702 "the Pulay metric and the Kerker preconditioner "// &
703 "used in the new Pulay mixing, introduced to ensure a finite and well-defined "// &
704 "Pulay metric at g=0 and a non-zero and well-defined Kerker preconditioner at g=0", &
708 default_r_val=0.25_dp, &
709 unit_str=
"bohr^-1", &
716 description=
"Legacy SCF DIIS keyword with no effect on active-space mixing", &
717 deprecation_notice=
"NMIXING has no effect in ACTIVE_SPACE%MIXING. "// &
718 "Use NBUFFER for the history length or N_SIMPLE_MIX for initial "// &
719 "direct-mixing steps; these have different meanings.", &
720 usage=
"NMIXING 1", default_i_val=2)
723 description=
"Minimal number of density mixing (should be greater than 0), "// &
724 "before starting DIIS", &
725 usage=
"NMIXING 1", default_i_val=2)
731 variants=
s2a(
"NPULAY",
"NBROYDEN",
"NMULTISECANT"), &
732 description=
"Number of previous steps stored for the actual mixing scheme", &
733 usage=
"NBUFFER 2", default_i_val=4)
739 description=
"Regularization weight used in Broyden mixing. For the original "// &
740 "BROYDEN_MIXING method this is the constant diagonal regularization of the "// &
741 "small Broyden system. For MODIFIED_BROYDEN_MIXING it is the corresponding "// &
742 "diagonal regularization of the dynamically weighted Broyden system. "// &
743 "The default follows tblite.", &
747 default_r_val=0.01_dp, &
748 usage=
"BROY_W0 0.03")
754 description=
"Reference factor for the dynamic residual weight. This keyword "// &
755 "is only used by MODIFIED_BROYDEN_MIXING; the original BROYDEN_MIXING path "// &
756 "is unchanged. The effective history weight is proportional to BROY_WREF "// &
757 "divided by the residual norm, clipped to the interval [1, BROY_WMAX]. "// &
758 "The default follows tblite.", &
762 default_r_val=0.01_dp, &
763 usage=
"BROY_WREF 0.01")
769 description=
"Upper bound for the dynamic residual weight. This keyword is "// &
770 "only used by MODIFIED_BROYDEN_MIXING; the original BROYDEN_MIXING path is "// &
771 "unchanged. The lower bound is fixed to 1.0. The default follows tblite.", &
775 default_r_val=100000.0_dp, &
776 usage=
"BROY_WMAX 100000.0")
781 name=
"REGULARIZATION", &
782 description=
"Regularization parameter to stabilize "// &
783 "the inversion of the residual matrix {Yn^t Yn} in the "// &
784 "multisecant mixing scheme (noise)", &
788 default_r_val=0.00001_dp, &
789 usage=
"REGULARIZATION 0.000001")
795 description=
"Upper bound for the magnitude of the "// &
796 "unpredicted step size in the update by the "// &
797 "multisecant mixing scheme", &
801 default_r_val=0.1_dp, &
808 description=
"Control factor for the magnitude of the "// &
809 "unpredicted step size in the update by the "// &
810 "multisecant mixing scheme", &
814 default_r_val=0.05_dp, &
815 usage=
"R_FACTOR .12")
820 variants=[
"NSKIP_MIXING"], &
821 description=
"Number of initial iteration for which the mixing is skipped", &
822 usage=
"NSKIP 10", default_i_val=0)
827 description =
"Number of initial direct-mixing iterations after NSKIP before starting "// &
828 "the selected mixing procedure"
830 description =
"Number of kerker damping iterations before starting other mixing procedures"
833 variants=[
"NSIMPLEMIX"], &
834 description=description, &
835 usage=
"NSIMPLEMIX", default_i_val=0)
840 description=
"Restricts the G-space mixing to lower part of G-vector spectrum,"// &
841 " up to a G0, by assigning the exponent of the Gaussian that can be "// &
842 "represented by vectors smaller than G0 within a certain accuracy. ", &
846 default_r_val=-1._dp, &
847 usage=
"MAX_GVEC_EXP 3.")
852 description=
"Activate the mixing of the density matrix, using the same"// &
853 " mixing coefficient applied for the g-space mixing.", &
855 lone_keyword_l_val=.true., &
856 default_l_val=.false., &