25 USE ieee_arithmetic,
ONLY: ieee_is_finite
58#include "./base/base_uses.f90"
64 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'scf_control_types'
65 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
100 LOGICAL :: do_smear = .false.
101 LOGICAL :: common_mu = .false.
102 INTEGER :: method = -1
103 REAL(kind=
dp) :: electronic_temperature = -1.0_dp, &
104 fixed_mag_mom = -1.0_dp, &
105 eps_fermi_dirac = -1.0_dp, &
106 window_size = -1.0_dp, &
107 smearing_width = -1.0_dp
108 REAL(kind=
dp),
DIMENSION(:),
POINTER ::
list => null()
111 TYPE diagonalization_type
112 INTEGER :: method = -1, update_method = -1, max_history = -1
113 REAL(kind=
dp) :: eps_jacobi = -1.0_dp
114 REAL(kind=
dp) :: jacobi_threshold = -1.0_dp
115 REAL(kind=
dp) :: adiis_shift = 0.0_dp
116 INTEGER :: max_iter = -1, nkrylov = -1, nblock_krylov = -1
117 LOGICAL :: adiis_verbose = .false.
119 LOGICAL :: mom = .false., mom_didguess = .false.
120 INTEGER :: mom_proj_formula = -1
122 INTEGER,
DIMENSION(:),
POINTER :: mom_deocca => null(), mom_deoccb => null(), &
123 mom_occa => null(), mom_occb => null()
128 INTEGER :: mom_start = -1
129 INTEGER :: mom_type = -1
130 REAL(kind=
dp) :: eps_iter = -1.0_dp
131 REAL(kind=
dp) :: eps_adapt = -1.0_dp
133 END TYPE diagonalization_type
138 TYPE(diagonalization_type) :: diagonalization = diagonalization_type()
140 INTEGER :: density_guess = -1, mixing_method = -1
141 CHARACTER(LEN=default_path_length) :: external_density_file_name =
""
142 REAL(kind=
dp) :: eps_eigval = -1.0_dp, eps_scf = -1.0_dp, eps_scf_hist = -1.0_dp, &
143 level_shift = -1.0_dp, &
144 eps_lumos = -1.0_dp, eps_diis = -1.0_dp
145 INTEGER :: max_iter_lumos = -1, max_diis = -1, nmixing = -1
146 INTEGER :: max_scf = -1, max_scf_hist = -1, &
147 maxl = -1, nkind = -1
148 LOGICAL :: do_diag_sub = .false., &
149 use_cholesky = .false., use_ot = .false., &
150 use_diag = .false., do_outer_scf_reortho = .false., &
151 ignore_convergence_failure = .false.
152 LOGICAL :: force_scf_calculation = .false.
153 LOGICAL :: non_selfconsistent = .false.
154 INTEGER,
DIMENSION(2) :: added_mos = -1
155 LOGICAL,
DIMENSION(2) :: added_mos_auto = .false.
156 INTEGER :: roks_scheme = -1
157 REAL(kind=
dp) :: roks_f = -1.0_dp
158 REAL(kind=
dp),
DIMENSION(0:2, 0:2, 1:2) :: roks_parameter = -1.0_dp
162 LOGICAL :: do_gce = .false.
163 REAL(kind=
dp) :: target_workfunction = 0.16_dp, &
165 mixing_coef = 0.3_dp, &
166 prev_workfunction = -1001.0_dp, &
184 CHARACTER(LEN=*),
PARAMETER :: routinen =
'scf_c_create'
188 CALL timeset(routinen, handle)
192 IF (scf_control%non_selfconsistent)
THEN
193 scf_control%density_guess =
no_guess
197 scf_control%eps_eigval = 1.0e-5_dp
198 scf_control%eps_scf = 1.0e-5_dp
199 scf_control%eps_scf_hist = 0.0_dp
200 scf_control%eps_lumos = 1.0e-5_dp
201 scf_control%max_iter_lumos = 2999
202 scf_control%eps_diis = 0.1_dp
203 scf_control%level_shift = 0.0_dp
204 scf_control%max_diis = 4
205 scf_control%max_scf = 50
206 scf_control%nmixing = 2
207 scf_control%use_cholesky = .true.
208 scf_control%use_diag = .true.
209 scf_control%do_diag_sub = .false.
210 scf_control%use_ot = .false.
211 scf_control%ignore_convergence_failure = .false.
212 scf_control%force_scf_calculation = .false.
213 scf_control%do_outer_scf_reortho = .true.
214 scf_control%max_diis = 4
215 scf_control%eps_diis = 0.1_dp
216 scf_control%added_mos(:) = 0
217 scf_control%added_mos_auto(:) = .false.
218 scf_control%max_scf_hist = 0
221 IF (scf_control%non_selfconsistent)
THEN
222 scf_control%mixing_method =
no_mix
228 scf_control%diagonalization%method = 0
230 scf_control%diagonalization%max_history = 16
231 scf_control%diagonalization%adiis_shift = 0.0_dp
232 scf_control%diagonalization%adiis_verbose = .false.
233 scf_control%diagonalization%eps_jacobi = 0.0_dp
234 scf_control%diagonalization%jacobi_threshold = 1.0e-7_dp
235 scf_control%diagonalization%max_iter = 0
236 scf_control%diagonalization%eps_iter = 0.0_dp
237 scf_control%diagonalization%eps_adapt = 0.0_dp
238 scf_control%diagonalization%nkrylov = 0
239 scf_control%diagonalization%nblock_krylov = 0
242 scf_control%diagonalization%mom = .false.
243 scf_control%diagonalization%mom_didguess = .false.
244 scf_control%diagonalization%mom_proj_formula = 0
245 NULLIFY (scf_control%diagonalization%mom_deoccA)
246 NULLIFY (scf_control%diagonalization%mom_deoccB)
247 NULLIFY (scf_control%diagonalization%mom_occA)
248 NULLIFY (scf_control%diagonalization%mom_occB)
249 scf_control%diagonalization%mom_start = 0
254 scf_control%roks_f = 0.5_dp
259 scf_control%roks_parameter(0, 0, 1) = 1.5_dp
260 scf_control%roks_parameter(0, 0, 2) = -0.5_dp
261 scf_control%roks_parameter(1, 1, 1) = 0.5_dp
262 scf_control%roks_parameter(1, 1, 2) = 0.5_dp
263 scf_control%roks_parameter(2, 2, 1) = -0.5_dp
264 scf_control%roks_parameter(2, 2, 2) = 1.5_dp
268 scf_control%roks_parameter(0, 1, 1) = 1.0_dp
269 scf_control%roks_parameter(0, 1, 2) = 0.0_dp
270 scf_control%roks_parameter(0, 2, 1) = 0.5_dp
271 scf_control%roks_parameter(0, 2, 2) = 0.5_dp
272 scf_control%roks_parameter(1, 2, 1) = 0.0_dp
273 scf_control%roks_parameter(1, 2, 2) = 1.0_dp
277 scf_control%roks_parameter(1, 0, 1) = scf_control%roks_parameter(0, 1, 1)
278 scf_control%roks_parameter(1, 0, 2) = scf_control%roks_parameter(0, 1, 2)
279 scf_control%roks_parameter(2, 0, 1) = scf_control%roks_parameter(0, 2, 1)
280 scf_control%roks_parameter(2, 0, 2) = scf_control%roks_parameter(0, 2, 2)
281 scf_control%roks_parameter(2, 1, 1) = scf_control%roks_parameter(1, 2, 1)
282 scf_control%roks_parameter(2, 1, 2) = scf_control%roks_parameter(1, 2, 2)
286 scf_control%outer_scf%have_scf = .false.
287 scf_control%outer_scf%max_scf = 0
288 scf_control%outer_scf%eps_scf = 0.0_dp
289 scf_control%outer_scf%step_size = 0.0_dp
290 scf_control%outer_scf%type = -1
291 scf_control%outer_scf%optimizer = -1
292 scf_control%outer_scf%diis_buffer_length = -1
293 NULLIFY (scf_control%outer_scf%cdft_opt_control)
297 NULLIFY (scf_control%smear)
299 CALL timestop(handle)
316 IF (
ASSOCIATED(scf_control%smear%list))
THEN
317 DEALLOCATE (scf_control%smear%list)
319 DEALLOCATE (scf_control%smear)
321 IF (
ASSOCIATED(scf_control%outer_scf%cdft_opt_control))
THEN
325 IF (
ASSOCIATED(scf_control%gce))
THEN
326 DEALLOCATE (scf_control%gce)
350 CHARACTER(LEN=*),
PARAMETER :: routinen =
'scf_c_read_parameters'
352 CHARACTER(LEN=default_string_length) :: added_mos_string, error_message
353 CHARACTER(LEN=default_string_length), &
354 DIMENSION(:),
POINTER :: added_mos
355 INTEGER :: added_mos_value, cholesky_flag, handle, &
357 LOGICAL :: do_mixing, explicit
358 REAL(kind=
dp),
DIMENSION(:),
POINTER :: roks_parameter
360 mixing_section, outer_scf_section, &
361 scf_section, smear_section
363 CALL timeset(routinen, handle)
367 l_val=scf_control%use_diag)
368 IF (scf_control%use_diag)
THEN
370 l_val=scf_control%do_diag_sub)
373 IF (scf_control%use_diag .AND. scf_control%use_ot)
THEN
375 cpabort(
"Don't activate OT and Diagonaliztion together")
376 ELSE IF (.NOT. (scf_control%use_diag .OR. scf_control%use_ot))
THEN
378 scf_control%use_diag = .true.
384 c_val=scf_control%external_density_file_name)
386 len_trim(scf_control%external_density_file_name) == 0)
THEN
387 cpabort(
"SCF_GUESS EXTERNAL_DENSITY requires EXTERNAL_DENSITY_FILE_NAME")
391 IF (scf_control%use_ot)
THEN
393 scf_control%eps_diis = 0.0_dp
401 IF (cholesky_flag > 0)
THEN
402 scf_control%use_cholesky = .true.
404 CALL section_vals_val_get(scf_section,
"IGNORE_CONVERGENCE_FAILURE", l_val=scf_control%ignore_convergence_failure)
405 CALL section_vals_val_get(scf_section,
"FORCE_SCF_CALCULATION", l_val=scf_control%force_scf_calculation)
412 IF (scf_control%use_diag)
THEN
414 i_val=scf_control%diagonalization%method)
416 i_val=scf_control%diagonalization%update_method)
418 r_val=scf_control%diagonalization%eps_jacobi)
420 r_val=scf_control%diagonalization%jacobi_threshold)
422 i_val=scf_control%diagonalization%max_iter)
424 r_val=scf_control%diagonalization%eps_iter)
426 r_val=scf_control%diagonalization%eps_adapt)
428 i_val=scf_control%diagonalization%nkrylov)
430 i_val=scf_control%diagonalization%nblock_krylov)
431 IF (scf_control%diagonalization%method ==
diag_ot)
THEN
433 CALL ot_diag_read_input(scf_control%diagonalization%ot_settings, scf_section)
437 l_val=scf_control%diagonalization%MOM)
438 IF (scf_control%diagonalization%mom)
THEN
440 i_val=scf_control%diagonalization%mom_type)
443 i_val=scf_control%diagonalization%mom_start)
446 i_vals=scf_control%diagonalization%mom_deoccA)
449 i_vals=scf_control%diagonalization%mom_deoccB)
452 i_vals=scf_control%diagonalization%mom_occA)
455 i_vals=scf_control%diagonalization%mom_occB)
458 i_val=scf_control%diagonalization%mom_proj_formula)
464 i_val=scf_control%diagonalization%max_history)
466 r_val=scf_control%diagonalization%adiis_shift)
467 IF (.NOT. ieee_is_finite(scf_control%diagonalization%adiis_shift) .OR. &
468 scf_control%diagonalization%adiis_shift < 0.0_dp)
THEN
469 cpabort(
"ADIIS%ADAPTIVE_LEVEL_SHIFT must be finite and nonnegative")
471 IF (scf_control%diagonalization%adiis_shift > 0.0_dp)
THEN
473 scf_control%diagonalization%max_history < 2)
THEN
474 cpabort(
"ADAPTIVE_LEVEL_SHIFT requires UPDATE_METHOD ADIIS and MAX_HISTORY >= 2")
476 IF (scf_control%level_shift /= 0.0_dp)
THEN
477 cpabort(
"ADAPTIVE_LEVEL_SHIFT cannot be combined with SCF%LEVEL_SHIFT")
481 l_val=scf_control%diagonalization%adiis_verbose)
485 SELECT CASE (scf_control%roks_scheme)
492 NULLIFY (roks_parameter)
494 IF (
ASSOCIATED(roks_parameter))
THEN
495 scf_control%roks_parameter(2, 2, 1) = roks_parameter(1)
496 scf_control%roks_parameter(2, 2, 2) = roks_parameter(2)
497 scf_control%roks_parameter(1, 1, 1) = roks_parameter(3)
498 scf_control%roks_parameter(1, 1, 2) = roks_parameter(4)
499 scf_control%roks_parameter(0, 0, 1) = roks_parameter(5)
500 scf_control%roks_parameter(0, 0, 2) = roks_parameter(6)
510 cpassert(
ASSOCIATED(added_mos))
511 IF (
SIZE(added_mos) > 0)
THEN
512 scf_control%added_mos_auto(:) = .false.
513 DO i = 1, min(
SIZE(added_mos),
SIZE(scf_control%added_mos))
514 added_mos_string = adjustl(added_mos(i))
516 IF (trim(added_mos_string) ==
"AUTO")
THEN
517 scf_control%added_mos(i) = 0
518 scf_control%added_mos_auto(i) = .true.
521 IF (len_trim(error_message) > 0)
THEN
522 CALL cp_abort(__location__, &
523 "Invalid ADDED_MOS value '"//trim(added_mos(i))// &
524 "'. Use an integer or AUTO.")
526 scf_control%added_mos(i) = added_mos_value
529 IF (
SIZE(added_mos) == 1 .AND. scf_control%added_mos_auto(1))
THEN
530 scf_control%added_mos_auto(2) = .true.
537 IF (scf_control%level_shift /= 0.0_dp) scf_control%use_cholesky = .false.
544 CALL init_smear(scf_control%smear)
545 CALL read_smear_section(scf_control%smear, smear_section)
553 i_val=scf_control%mixing_method)
558 CALL init_gce(scf_control%gce)
559 CALL read_gce_section(scf_control%gce, gce_section)
561 CALL timestop(handle)
569 SUBROUTINE init_smear(smear)
572 cpassert(.NOT.
ASSOCIATED(smear))
574 smear%do_smear = .false.
576 smear%electronic_temperature = 0.0_dp
577 smear%eps_fermi_dirac = 1.0e-5_dp
578 smear%fixed_mag_mom = -100.0_dp
579 smear%window_size = 0.0_dp
580 smear%smearing_width = 0.0_dp
582 END SUBROUTINE init_smear
589 SUBROUTINE read_smear_section(smear, smear_section)
593 REAL(kind=
dp),
DIMENSION(:),
POINTER :: r_vals
598 l_val=smear%do_smear)
599 IF (smear%do_smear)
THEN
603 r_val=smear%electronic_temperature)
605 r_val=smear%eps_fermi_dirac)
607 r_val=smear%window_size)
612 r_val=smear%smearing_width)
617 cpassert(
ASSOCIATED(r_vals))
618 ALLOCATE (smear%list(
SIZE(r_vals)))
622 r_val=smear%fixed_mag_mom)
624 END SUBROUTINE read_smear_section
630 SUBROUTINE init_gce(gce)
633 cpassert(.NOT.
ASSOCIATED(gce))
636 gce%target_workfunction = 0.16_dp
637 gce%prev_workfunction = -1001.0_dp
639 gce%mixing_coef = 0.3_dp
640 END SUBROUTINE init_gce
647 SUBROUTINE read_gce_section(gce, gce_section)
655 r_val=gce%target_workfunction)
657 r_val=gce%mixing_coef)
659 END SUBROUTINE read_gce_section
675 CHARACTER(LEN=*),
PARAMETER :: routinen =
'scf_c_write_parameters'
677 INTEGER :: handle, output_unit, roks_scheme
679 REAL(kind=
dp) :: elec_temp
686 CALL timeset(routinen, handle)
691 NULLIFY (scf_section)
698 IF (output_unit > 0)
THEN
700 IF (scf_control%max_scf > 0)
THEN
707 IF (.NOT. scf_control%non_selfconsistent .OR. scf_control%force_scf_calculation)
THEN
708 WRITE (unit=output_unit, &
709 fmt=
"(/,/,T2,A,T25,A,T51,A30,/,T25,56('-'),3(/,T25,A,T76,I5),/, "// &
710 "T25,56('-'),4(/,T25,A,T72,ES9.2),/,T25,56('-'), "// &
711 "1(/,T25,A,T71,F10.6))") &
713 "Density guess: ", adjustr(trim(
enum_i2c(enum, scf_control%density_guess))), &
714 "max_scf: ", scf_control%max_scf, &
715 "max_scf_history: ", scf_control%max_scf_hist, &
716 "max_diis: ", scf_control%max_diis, &
717 "eps_scf: ", scf_control%eps_scf, &
718 "eps_scf_history: ", scf_control%eps_scf_hist, &
719 "eps_diis: ", scf_control%eps_diis, &
720 "eps_eigval: ", scf_control%eps_eigval, &
721 "level_shift [a.u.]:", scf_control%level_shift
724 WRITE (unit=output_unit, fmt=
"(T25,A,T51,A30)") &
725 "External density: ", adjustr(trim(scf_control%external_density_file_name))
728 IF (scf_control%use_diag)
THEN
731 WRITE (unit=output_unit, fmt=
"(T25,A,T51,A30)") &
732 "SCF update method: ", &
733 adjustr(trim(
enum_i2c(enum, scf_control%diagonalization%update_method)))
735 WRITE (unit=output_unit, fmt=
"(T25,A,T71,I10)") &
736 "ADIIS max history: ", scf_control%diagonalization%max_history
741 IF (any(scf_control%added_mos_auto))
THEN
742 WRITE (unit=output_unit, fmt=
"(T25,A,T71,2I5)") &
743 "added MOs (auto) ", scf_control%added_mos
744 ELSE IF (sum(abs(scf_control%added_mos)) > 0)
THEN
745 WRITE (unit=output_unit, fmt=
"(T25,A,T71,2I5)") &
746 "added MOs ", scf_control%added_mos
749 IF (scf_control%diagonalization%mom)
THEN
751 WRITE (unit=output_unit, fmt=
"(T25,A)")
"MOM enabled"
754 IF (scf_control%mixing_method > 0 .AND. .NOT. scf_control%use_ot .AND. &
755 .NOT. scf_control%non_selfconsistent)
THEN
758 WRITE (unit=output_unit, fmt=
"(T25,A,/,T25,A,T51,A30)") &
760 "Mixing method: ", adjustr(trim(
enum_i2c(enum, scf_control%mixing_method)))
761 IF (scf_control%mixing_method > 1)
THEN
762 WRITE (unit=output_unit, fmt=
"(T47,A34)")
"charge density mixing in g-space"
765 IF (scf_control%smear%do_smear)
THEN
768 WRITE (unit=output_unit, fmt=
"(T25,A,/,T25,A,T51,A30)") &
770 "Smear method: ", adjustr(trim(
enum_i2c(enum, scf_control%smear%method)))
771 SELECT CASE (scf_control%smear%method)
775 WRITE (unit=output_unit, fmt=
"(T25,A,T61,F20.1)") &
776 "Electronic temperature [K]:", elec_temp
777 WRITE (unit=output_unit, fmt=
"(T25,A,T71,ES10.2)") &
778 "Electronic temperature [a.u.]:", scf_control%smear%electronic_temperature, &
779 "Accuracy threshold:", scf_control%smear%eps_fermi_dirac
780 IF (scf_control%smear%fixed_mag_mom > 0.0_dp)
WRITE (unit=output_unit, fmt=
"(T25,A,T61,F20.1)") &
781 "Fixed magnetic moment set to:", scf_control%smear%fixed_mag_mom
783 WRITE (unit=output_unit, fmt=
"(T25,A,T71,ES10.2)") &
784 "Smearing width (sigma) [a.u.]:", scf_control%smear%smearing_width, &
785 "Accuracy threshold:", scf_control%smear%eps_fermi_dirac
786 IF (scf_control%smear%fixed_mag_mom > 0.0_dp)
THEN
787 WRITE (unit=output_unit, fmt=
"(T25,A,T61,F20.1)") &
788 "Fixed magnetic moment set to:", scf_control%smear%fixed_mag_mom
791 WRITE (unit=output_unit, fmt=
"(T25,A,T71,F10.6)") &
792 "Smear window [a.u.]: ", scf_control%smear%window_size
796 IF (scf_control%gce%do_gce)
THEN
797 WRITE (unit=output_unit, fmt=
"(T25,A,/,T25,A,T61,F20.6)") &
799 "Target workfunction [eV]:", scf_control%gce%target_workfunction*
evolt
800 WRITE (unit=output_unit, fmt=
"(T25,A,T61,F20.1)")
"Mixing coefficient:", scf_control%gce%mixing_coef
801 WRITE (unit=output_unit, fmt=
"(T25,A)")
"Grand canonical SCF is activated."
805 IF (roks .AND. (.NOT. scf_control%use_ot))
THEN
810 WRITE (unit=output_unit, fmt=
"(T25,A,/,T25,A,T51,A30)") &
812 "ROKS scheme:", adjustr(trim(
enum_i2c(enum, roks_scheme)))
813 SELECT CASE (roks_scheme)
815 WRITE (unit=output_unit, fmt=
"(T25,A,T71,F10.6)") &
816 "ROKS parameter f:", scf_control%roks_f
818 WRITE (unit=output_unit, &
819 fmt=
"(T25,A,6(/,T25,A,T71,F10.6))") &
820 "ROKS parameters: a)lpha, b)eta; c)losed, o)pen, v)irtual", &
821 "acc", scf_control%roks_parameter(2, 2, 1), &
822 "bcc", scf_control%roks_parameter(2, 2, 2), &
823 "aoo", scf_control%roks_parameter(1, 1, 1), &
824 "boo", scf_control%roks_parameter(1, 1, 2), &
825 "avv", scf_control%roks_parameter(0, 0, 1), &
826 "bvv", scf_control%roks_parameter(0, 0, 2)
831 IF (scf_control%outer_scf%have_scf)
THEN
832 WRITE (output_unit,
"(T25,56('-'),/,T25,A)")
"Outer loop SCF in use "
833 SELECT CASE (scf_control%outer_scf%type)
835 WRITE (output_unit,
'(T25,A)')
"No variables optimised in outer loop"
837 WRITE (output_unit,
'(T25,A)')
"DDAPC constraint enforced"
839 WRITE (output_unit,
'(T25,A)')
"S2 constraint enforced"
841 WRITE (output_unit,
'(T25,A)')
"Floating basis function optimization enforced"
843 cpabort(
"CDFT constraints must be defined in QS&CDFT")
845 cpabort(
"Unknown outer SCF type")
847 WRITE (output_unit,
'(T25,A,T72,ES9.2)')
"eps_scf", scf_control%outer_scf%eps_scf
848 WRITE (output_unit,
'(T25,A,T72,I9)')
"max_scf", scf_control%outer_scf%max_scf
849 SELECT CASE (scf_control%outer_scf%optimizer)
851 WRITE (output_unit,
'(T25,A)')
"No outer loop optimization"
853 WRITE (output_unit,
'(T25,A)')
"Steepest descent optimization"
855 WRITE (output_unit,
'(T25,A)')
"Gradient bisection"
856 WRITE (output_unit,
'(T25,A,T72,I9)')
"bisect_trust_count", scf_control%outer_scf%bisect_trust_count
858 WRITE (output_unit,
'(T25,A)')
"DIIS optimization"
859 WRITE (output_unit,
'(T25,A,T72,I9)')
"DIIS buffer length", &
860 scf_control%outer_scf%diis_buffer_length
863 cpabort(
"Selected optimizer only compatible with CDFT")
865 WRITE (output_unit,
'(T25,A)')
"Optimization with the secant method"
867 cpabort(
"Unknown outer SCF optimizer")
869 WRITE (output_unit,
'(T25,A,T72,ES9.2)')
"step_size", scf_control%outer_scf%step_size
871 WRITE (output_unit,
"(T25,56('-'),/,T25,A)")
"No outer SCF"
879 "PRINT%PROGRAM_RUN_INFO")
881 CALL timestop(handle)
892 SUBROUTINE ot_diag_read_input(settings, scf_section)
896 CHARACTER(len=*),
PARAMETER :: routinen =
'ot_diag_read_input'
898 INTEGER :: handle, output_unit
903 CALL timeset(routinen, handle)
919 "PRINT%PROGRAM_RUN_INFO")
921 CALL timestop(handle)
923 END SUBROUTINE ot_diag_read_input
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
Utility routines to read data from files. Kept as close as possible to the old parser because.
elemental subroutine, public read_integer_object(string, object, error_message)
Returns an integer number read from a string including products of integer numbers like iz1*iz2*iz3.
real(kind=dp) function, public cp_unit_from_cp2k(value, unit_str, defaults, power)
converts from the internal cp2k units to the given unit
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
An array-based list which grows on demand. When the internal array is full, a new array of twice the ...
parameters that control the outer loop of an SCF iteration
subroutine, public outer_scf_read_parameters(outer_scf, outer_scf_section)
reads the parameters of the outer_scf section into the given outer_scf
Definition of physical constants:
real(kind=dp), parameter, public evolt
Control parameters for optimizers that work with CDFT constraints.
subroutine, public cdft_opt_type_release(cdft_opt_control)
releases the CDFT optimizer control object
subroutine, public qs_ot_settings_init(settings)
sets default values for the settings type
subroutine, public ot_readwrite_input(settings, ot_section, output_unit, complex_kpoints, eigensolver)
...
parameters that control an scf iteration
subroutine, public scf_c_read_parameters(scf_control, inp_section)
reads the parameters of the scf section into the given scf_control
subroutine, public scf_c_release(scf_control)
releases the given scf_control (see cp2k/doc/ReferenceCounting.html)
subroutine, public scf_c_write_parameters(scf_control, dft_section)
writes out the scf parameters
subroutine, public scf_c_create(scf_control)
allocates and initializes an scf control object with the default values
Utilities for string manipulations.
elemental subroutine, public uppercase(string)
Convert all lower case characters in a string to upper case.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
contains the parameters needed by a scf run
notice, this variable needs to be copyable, needed for spins as e.g. in qs_ot_scf
contains the parameters needed by a scf run