94#include "./base/base_uses.f90"
100 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'cp_control_utils'
122 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell
124 CHARACTER(len=default_path_length) :: basis_set_file_name, gauxc_model_name, &
125 intensities_file_name, &
127 CHARACTER(LEN=default_string_length), &
128 DIMENSION(:),
POINTER :: tmpstringlist
129 INTEGER :: admmtype, irep, isize, kg_tnadd_method, &
130 method_id, nrep, xc_deriv_method_id
131 LOGICAL :: at_end, do_hfx, do_ot, do_rpa_admm, do_rtp, exopt1, exopt2, exopt3, explicit, &
132 is_present, l_param, local_moment_possible, native_skala_grid, not_se, was_present
133 REAL(kind=
dp) :: density_cut, gradient_cut, tau_cut
134 REAL(kind=
dp),
DIMENSION(:),
POINTER :: pol
137 TYPE(
section_vals_type),
POINTER :: hairy_probes_section, hfx_section, kg_xc_fun_section, &
138 kg_xc_section, maxwell_section, sccs_section, scf_section, tmp_section, xc_fun_section, &
139 xc_gauxc_subsection, xc_section
141 was_present = .false.
145 NULLIFY (kg_xc_fun_section, kg_xc_section, tmp_section, xc_fun_section, xc_section, xc_gauxc_subsection)
146 ALLOCATE (dft_control)
152 SELECT CASE (method_id)
160 IF (.NOT. is_present .AND. not_se)
THEN
161 cpabort(
"XC section missing.")
168 IF (density_cut <= epsilon(0.0_dp)*100.0_dp)
THEN
169 CALL cp_warn(__location__, &
170 "DENSITY_CUTOFF lower than 100*EPSILON, where EPSILON is the machine precision. "// &
171 "This may lead to numerical problems. Setting up shake_tol to 100*EPSILON! ")
173 density_cut = max(epsilon(0.0_dp)*100.0_dp, density_cut)
174 IF (gradient_cut <= epsilon(0.0_dp)*100.0_dp)
THEN
175 CALL cp_warn(__location__, &
176 "GRADIENT_CUTOFF lower than 100*EPSILON, where EPSILON is the machine precision. "// &
177 "This may lead to numerical problems. Setting up shake_tol to 100*EPSILON! ")
179 gradient_cut = max(epsilon(0.0_dp)*100.0_dp, gradient_cut)
180 IF (tau_cut <= epsilon(0.0_dp)*100.0_dp)
THEN
181 CALL cp_warn(__location__, &
182 "TAU_CUTOFF lower than 100*EPSILON, where EPSILON is the machine precision. "// &
183 "This may lead to numerical problems. Setting up shake_tol to 100*EPSILON! ")
185 tau_cut = max(epsilon(0.0_dp)*100.0_dp, tau_cut)
192 IF (.NOT. is_present .AND. not_se)
THEN
193 cpabort(
"XC_FUNCTIONAL section missing.")
196 dft_control%use_gauxc = .false.
205 IF (dft_control%uks .OR. dft_control%roks)
THEN
206 dft_control%nspins = 2
208 dft_control%nspins = 1
211 dft_control%lsd = (dft_control%nspins > 1)
213 IF (dft_control%use_gauxc)
THEN
214 native_skala_grid = .false.
217 gauxc_model_name = adjustl(gauxc_model_name)
219 IF (native_skala_grid .OR. &
220 (trim(gauxc_model_name) /=
"" .AND. trim(gauxc_model_name) /=
"NONE"))
THEN
221 dft_control%use_kinetic_energy_density = .true.
233 dft_control%use_kinetic_energy_density = dft_control%use_kinetic_energy_density .OR. &
241 dft_control%drho_by_collocation = (
xc_uses_norm_drho(xc_fun_section, dft_control%lsd) &
243 IF (dft_control%drho_by_collocation)
THEN
244 cpabort(
"derivatives by collocation not implemented")
251 IF (
SIZE(tmpstringlist) == 2)
THEN
253 SELECT CASE (tmpstringlist(2))
255 SELECT CASE (tmpstringlist(1))
259 CALL cp_abort(__location__, &
260 "AUTO_BASIS: the size <X> is invalid for the "// &
261 "type <"//trim(adjustl(tmpstringlist(1)))//
">; "// &
262 "use one of SMALL, MEDIUM, LARGE, HUGE for "// &
263 "the size. The syntax AUTO_BASIS X X is a "// &
264 "reserved case for using NO automatically "// &
265 "generated basis sets.")
276 cpwarn(
"Unknown basis size in AUTO_BASIS keyword:"//trim(tmpstringlist(1)))
279 SELECT CASE (tmpstringlist(1))
282 dft_control%auto_basis_ri_aux = isize
284 dft_control%auto_basis_aux_fit = isize
286 dft_control%auto_basis_lri_aux = isize
288 dft_control%auto_basis_p_lri_aux = isize
290 dft_control%auto_basis_ri_hxc = isize
292 dft_control%auto_basis_ri_xas = isize
294 dft_control%auto_basis_ri_hfx = isize
296 cpwarn(
"Unknown basis type in AUTO_BASIS keyword:"//trim(tmpstringlist(1)))
299 CALL cp_abort(__location__, &
300 "AUTO_BASIS keyword in &DFT section has a wrong number of arguments.")
311 is_present = is_present .AND. (do_hfx .OR. do_rpa_admm)
313 dft_control%do_admm = is_present
314 dft_control%do_admm_mo = .false.
315 dft_control%do_admm_dm = .false.
321 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%ADMM_TYPE", i_val=admmtype)
322 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%ADMM_PURIFICATION_METHOD", explicit=exopt1)
323 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%METHOD", explicit=exopt2)
324 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%EXCH_SCALING_MODEL", explicit=exopt3)
325 dft_control%admm_control%admm_type = admmtype
326 SELECT CASE (admmtype)
328 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%ADMM_PURIFICATION_METHOD", i_val=method_id)
329 dft_control%admm_control%purification_method = method_id
330 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%METHOD", i_val=method_id)
331 dft_control%admm_control%method = method_id
332 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%EXCH_SCALING_MODEL", i_val=method_id)
333 dft_control%admm_control%scaling_model = method_id
338 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%ADMM_PURIFICATION_METHOD", i_val=method_id)
339 dft_control%admm_control%purification_method = method_id
371 CALL cp_abort(__location__, &
372 "ADMM_TYPE keyword in &AUXILIARY_DENSITY_MATRIX_METHOD section has a wrong value.")
376 r_val=dft_control%admm_control%eps_filter)
378 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%EXCH_CORRECTION_FUNC", i_val=method_id)
379 dft_control%admm_control%aux_exch_func = method_id
382 dft_control%admm_control%aux_exch_func_param = .false.
383 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%OPTX_A1", explicit=explicit, &
384 r_val=dft_control%admm_control%aux_x_param(1))
385 IF (explicit) dft_control%admm_control%aux_exch_func_param = .true.
386 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%OPTX_A2", explicit=explicit, &
387 r_val=dft_control%admm_control%aux_x_param(2))
388 IF (explicit) dft_control%admm_control%aux_exch_func_param = .true.
389 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%OPTX_GAMMA", explicit=explicit, &
390 r_val=dft_control%admm_control%aux_x_param(3))
391 IF (explicit) dft_control%admm_control%aux_exch_func_param = .true.
393 CALL read_admm_block_list(dft_control%admm_control, dft_section)
396 SELECT CASE (admmtype)
398 IF (exopt2)
CALL cp_warn(__location__, &
399 "Value of ADMM_PURIFICATION_METHOD keyword will be overwritten with ADMM_TYPE selections.")
400 IF (exopt3)
CALL cp_warn(__location__, &
401 "Value of EXCH_SCALING_MODEL keyword will be overwritten with ADMM_TYPE selections.")
403 IF (exopt1)
CALL cp_warn(__location__, &
404 "Value of METHOD keyword will be overwritten with ADMM_TYPE selections.")
405 IF (exopt2)
CALL cp_warn(__location__, &
406 "Value of METHOD keyword will be overwritten with ADMM_TYPE selections.")
407 IF (exopt3)
CALL cp_warn(__location__, &
408 "Value of EXCH_SCALING_MODEL keyword will be overwritten with ADMM_TYPE selections.")
417 cpabort(
"ADMM: Blocking and Merlot scaling are mutually exclusive.")
422 CALL cp_abort(__location__, &
423 "ADMM: In the case of METHOD=CHARGE_CONSTRAINED_PROJECTION, "// &
424 "ADMM_PURIFICATION_METHOD=NONE has to be set.")
430 cpabort(
"ADMM: Chosen purification requires BASIS_PROJECTION")
433 IF (.NOT. do_ot) cpabort(
"ADMM: MO-based purification requires OT.")
438 dft_control%do_admm_dm = .true.
440 dft_control%do_admm_mo = .true.
448 dft_control%restricted = (dft_control%roks .AND. l_param)
452 CALL section_vals_val_get(dft_section,
"RELAX_MULTIPLICITY", r_val=dft_control%relax_multiplicity)
453 IF (dft_control%relax_multiplicity > 0.0_dp)
THEN
454 IF (.NOT. dft_control%uks)
THEN
455 CALL cp_abort(__location__,
"The option RELAX_MULTIPLICITY is only valid for "// &
456 "unrestricted Kohn-Sham (UKS) calculations")
462 CALL section_vals_get(hairy_probes_section, n_repetition=nrep, explicit=is_present)
465 dft_control%hairy_probes = .true.
466 ALLOCATE (dft_control%probe(nrep))
467 CALL read_hairy_probes_sections(dft_control, hairy_probes_section)
474 dft_control%sic_method_id =
sic_none
475 dft_control%sic_scaling_a = 1.0_dp
476 dft_control%sic_scaling_b = 1.0_dp
479 dft_control%dft_plus_u = .false.
481 dft_control%plus_u_method_id = method_id
488 dft_control%smear = .false.
491 dft_control%correct_surf_dip = .false.
492 CALL section_vals_val_get(dft_section,
"SURFACE_DIPOLE_CORRECTION", l_val=dft_control%correct_surf_dip)
494 dft_control%pos_dir_surf_dip = -1.0_dp
498 dft_control%switch_surf_dip = .false.
499 dft_control%surf_dip_correct_switch = dft_control%correct_surf_dip
501 dft_control%correct_el_density_dip = .false.
502 CALL section_vals_val_get(dft_section,
"CORE_CORR_DIP", l_val=dft_control%correct_el_density_dip)
503 IF (dft_control%correct_el_density_dip)
THEN
504 IF (dft_control%correct_surf_dip)
THEN
507 dft_control%correct_el_density_dip = .false.
508 cpwarn(
"CORE_CORR_DIP keyword is activated only if SURFACE_DIPOLE_CORRECTION is TRUE")
513 c_val=basis_set_file_name)
515 c_val=potential_file_name)
520 i_val=dft_control%sic_method_id)
522 i_val=dft_control%sic_list_id)
524 r_val=dft_control%sic_scaling_a)
526 r_val=dft_control%sic_scaling_b)
532 CALL read_rtp_section(dft_control, tmp_section)
539 IF (dft_control%do_xas_calculation)
THEN
542 l_val=dft_control%do_xas_calculation)
546 CALL section_vals_get(tmp_section, explicit=dft_control%do_xas_tdp_calculation)
547 IF (dft_control%do_xas_tdp_calculation)
THEN
550 l_val=dft_control%do_xas_tdp_calculation)
554 dft_control%apply_efield = .false.
555 dft_control%apply_efield_field = .false.
556 dft_control%apply_vector_potential = .false.
560 ALLOCATE (dft_control%efield_fields(nrep))
561 CALL read_efield_sections(dft_control, tmp_section, cell)
563 IF (.NOT. dft_control%rtp_control%velocity_gauge)
THEN
564 dft_control%apply_efield_field = .true.
566 dft_control%apply_vector_potential = .true.
568 dft_control%rtp_control%vec_pot = dft_control%efield_fields(1)%efield%vec_pot_initial
571 dft_control%apply_efield = .true.
580 local_moment_possible = (dft_control%rtp_control%rtp_method ==
rtp_method_bse .OR. &
582 ((.NOT. dft_control%rtp_control%periodic) .AND. dft_control%rtp_control%linear_scaling)
583 IF (local_moment_possible .AND. (.NOT.
ASSOCIATED(dft_control%rtp_control%print_pol_elements)))
THEN
585 CALL guess_pol_elements(dft_control, &
586 dft_control%rtp_control%print_pol_elements)
592 CALL section_vals_get(tmp_section, explicit=dft_control%apply_period_efield)
593 IF (dft_control%apply_period_efield)
THEN
594 ALLOCATE (dft_control%period_efield)
596 dft_control%period_efield%polarisation(1:3) = pol(1:3)
597 IF (
PRESENT(cell))
THEN
598 IF (
ASSOCIATED(cell))
THEN
603 dft_control%period_efield%d_filter(1:3) = pol(1:3)
604 IF (
PRESENT(cell))
THEN
608 r_val=dft_control%period_efield%strength)
609 dft_control%period_efield%displacement_field = .false.
611 l_val=dft_control%period_efield%displacement_field)
617 IF (
SIZE(pol) > 1 .OR. pol(1) /= 0.0_dp)
THEN
619 IF (dft_control%period_efield%strength /= 0.0_dp .OR. intensities_file_name /=
"")
THEN
620 CALL cp_abort(__location__,
"[PERIODIC FIELD] Only one of INTENSITY, INTENSITY_LIST "// &
621 "or INTENSITIES_FILE_NAME can be specified.")
624 ALLOCATE (dft_control%period_efield%strength_list(
SIZE(pol)))
625 dft_control%period_efield%strength_list(1:
SIZE(pol)) = pol(1:
SIZE(pol))
628 IF (intensities_file_name /=
"")
THEN
630 IF (dft_control%period_efield%strength /= 0.0_dp)
THEN
631 CALL cp_abort(__location__,
"[PERIODIC FIELD] Only one of INTENSITY, INTENSITY_LIST "// &
632 "or INTENSITIES_FILE_NAME can be specified.")
645 cpabort(
"[PERIODIC FIELD] No intensities found in INTENSITIES_FILE_NAME")
648 ALLOCATE (dft_control%period_efield%strength_list(nrep))
653 READ (parser%input_line, *) dft_control%period_efield%strength_list(irep)
660 i_val=dft_control%period_efield%start_frame)
662 i_val=dft_control%period_efield%end_frame)
664 IF (dft_control%period_efield%end_frame /= -1)
THEN
668 IF (dft_control%period_efield%start_frame > dft_control%period_efield%end_frame)
THEN
669 cpabort(
"[PERIODIC FIELD] START_FRAME > END_FRAME")
670 ELSE IF (dft_control%period_efield%start_frame < 1)
THEN
671 cpabort(
"[PERIODIC FIELD] START_FRAME < 1")
672 ELSE IF (mod(dft_control%period_efield%end_frame - &
673 dft_control%period_efield%start_frame + 1,
SIZE(pol)) /= 0)
THEN
674 CALL cp_abort(__location__, &
675 "[PERIODIC FIELD] Number of active frames must be a multiple of the number of intensities")
681 CALL cp_abort(__location__, &
682 "Periodic efield cannot be used with RTP. When restarting a "// &
683 "run with periodic efield, set RESTART_RTP under &EXT_RESTART "// &
684 "section to .FALSE. explicitly if RESTART_DEFAULT is .TRUE.")
686 IF (dft_control%period_efield%displacement_field)
THEN
696 CALL section_vals_get(tmp_section, explicit=dft_control%apply_external_potential)
697 IF (dft_control%apply_external_potential)
THEN
700 l_val=dft_control%expot_control%read_from_cube)
702 l_val=dft_control%expot_control%static)
704 r_val=dft_control%expot_control%scaling_factor)
709 dft_control%expot_control%maxwell_solver = .true.
713 r_val=dft_control%maxwell_control%real_test)
715 i_val=dft_control%maxwell_control%int_test)
717 l_val=dft_control%maxwell_control%log_test)
719 dft_control%expot_control%maxwell_solver = .false.
729 l_val=dft_control%do_sccs)
730 IF (dft_control%do_sccs)
THEN
731 ALLOCATE (dft_control%sccs_control)
733 r_val=dft_control%sccs_control%epsilon_solvent)
735 r_val=dft_control%sccs_control%alpha_solvent)
737 r_val=dft_control%sccs_control%beta_solvent)
739 r_val=dft_control%sccs_control%delta_rho)
741 i_val=dft_control%sccs_control%derivative_method)
743 i_val=dft_control%sccs_control%method_id)
745 r_val=dft_control%sccs_control%eps_sccs)
747 r_val=dft_control%sccs_control%eps_scf)
749 r_val=dft_control%sccs_control%gamma_solvent)
751 i_val=dft_control%sccs_control%max_iter)
753 r_val=dft_control%sccs_control%mixing)
754 SELECT CASE (dft_control%sccs_control%method_id)
758 r_val=dft_control%sccs_control%rho_max)
760 r_val=dft_control%sccs_control%rho_min)
761 IF (dft_control%sccs_control%rho_max < dft_control%sccs_control%rho_min)
THEN
762 CALL cp_abort(__location__, &
763 "The SCCS parameter RHO_MAX is smaller than RHO_MIN. "// &
764 "Please, check your input!")
770 r_val=dft_control%sccs_control%beta)
771 IF (dft_control%sccs_control%beta < 0.5_dp)
THEN
772 CALL cp_abort(__location__, &
773 "A value smaller than 0.5 for the SCCS parameter beta "// &
774 "causes numerical problems. Please, check your input!")
777 r_val=dft_control%sccs_control%rho_zero)
782 IF (.NOT. is_present)
THEN
783 CALL cp_abort(__location__, &
784 "SCCS method SAA_ANDREUSSI requires the "// &
785 "SAA_ANDREUSSI section.")
787 IF (.NOT. all(cell%perd == 1))
THEN
788 CALL cp_abort(__location__, &
789 "SCCS method SAA_ANDREUSSI is only implemented for "// &
790 "3D periodic calculations.")
793 r_val=dft_control%sccs_control%rho_max)
795 r_val=dft_control%sccs_control%rho_min)
796 IF (dft_control%sccs_control%rho_max < dft_control%sccs_control%rho_min)
THEN
797 CALL cp_abort(__location__, &
798 "The SCCS parameter RHO_MAX is smaller than RHO_MIN. "// &
799 "Please, check your input!")
802 r_val=dft_control%sccs_control%f0)
804 r_val=dft_control%sccs_control%delta_eta)
806 r_val=dft_control%sccs_control%delta_zeta)
808 r_val=dft_control%sccs_control%r_solv)
810 r_val=dft_control%sccs_control%alpha_zeta)
814 cpabort(
"Invalid SCCS model specified. Please, check your input!")
826 l_val=dft_control%do_pcc)
827 IF (dft_control%do_pcc)
THEN
828 ALLOCATE (dft_control%pcc_control)
830 r_val=dft_control%pcc_control%dist_edge)
832 r_val=dft_control%pcc_control%gau_c)
834 i_val=dft_control%pcc_control%surf_normal)
844 l_val=dft_control%do_paep)
845 IF (dft_control%do_paep)
THEN
846 ALLOCATE (dft_control%paep_control)
848 i_val=dft_control%paep_control%surf_normal)
855 CALL section_vals_get(tmp_section, explicit=dft_control%apply_external_density)
906 CHARACTER(len=*),
PARAMETER :: routinen =
'read_mgrid_section'
908 INTEGER :: handle, igrid_level, interp_kind, &
910 LOGICAL :: explicit, multigrid_set
912 REAL(
dp),
DIMENSION(:),
POINTER :: cutofflist
915 CALL timeset(routinen, handle)
917 NULLIFY (interp_section, mgrid_section, cutofflist)
924 CALL section_vals_val_get(mgrid_section,
"PROGRESSION_FACTOR", r_val=qs_control%progression_factor)
927 IF (interp_kind /=
pw_interp) qs_control%commensurate_mgrids = .true.
931 l_val=qs_control%skip_load_balance_distributed)
934 IF (qs_control%semi_empirical .OR. qs_control%dftb .OR. qs_control%xtb)
THEN
936 multigrid_set = .false.
939 IF (.NOT. explicit) cutoff = 1.0_dp
942 ALLOCATE (qs_control%e_cutoff(ngrid_level))
943 qs_control%cutoff = cutoff
945 IF (multigrid_set)
THEN
947 IF (qs_control%commensurate_mgrids)
THEN
948 cpabort(
"Do not specify cutoffs for the commensurate grids (NYI)")
952 IF (
ASSOCIATED(cutofflist))
THEN
953 IF (
SIZE(cutofflist, 1) /= ngrid_level)
THEN
954 cpabort(
"Number of multi-grids requested and number of cutoff values do not match")
956 DO igrid_level = 1, ngrid_level
957 qs_control%e_cutoff(igrid_level) = cutofflist(igrid_level)
961 DO igrid_level = ngrid_level, 1, -1
962 IF (qs_control%cutoff <= qs_control%e_cutoff(igrid_level))
THEN
963 qs_control%cutoff = qs_control%e_cutoff(igrid_level)
967 IF (igrid_level == 1)
THEN
968 qs_control%cutoff = qs_control%e_cutoff(1)
972 IF (qs_control%commensurate_mgrids) qs_control%progression_factor = 4.0_dp
973 qs_control%e_cutoff(1) = qs_control%cutoff
974 DO igrid_level = 2, ngrid_level
975 qs_control%e_cutoff(igrid_level) = qs_control%e_cutoff(igrid_level - 1)/ &
976 qs_control%progression_factor
980 DO igrid_level = 2, ngrid_level
981 IF (qs_control%e_cutoff(igrid_level) > qs_control%e_cutoff(igrid_level - 1))
THEN
982 cpabort(
"The cutoff values for the multi-grids are not ordered from large to small")
983 ELSE IF (qs_control%e_cutoff(igrid_level) == qs_control%e_cutoff(igrid_level - 1))
THEN
984 cpabort(
"The same cutoff value was specified for two multi-grids")
987 CALL timestop(handle)
1000 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell
1002 CHARACTER(len=*),
PARAMETER :: routinen =
'read_qs_section'
1004 CHARACTER(LEN=2) :: element_symbol
1005 CHARACTER(LEN=default_string_length) :: cval
1006 CHARACTER(LEN=default_string_length), &
1007 DIMENSION(:),
POINTER :: clist
1008 INTEGER :: handle, itmp, j, jj, k, n_rep, n_var, &
1009 ngauss, ngp, nrep, znum
1010 INTEGER,
DIMENSION(:),
POINTER :: tmplist
1011 LOGICAL :: dftb_scc_mixer_explicit, dftb_tblite_mixer_explicit, explicit, &
1012 tblite_reference_cli, tblite_reference_cli_section, tblite_section_active, was_present, &
1013 xtb_scc_mixer_explicit, xtb_tblite_mixer_explicit
1014 REAL(
dp) :: tmp, tmpsqrt, value
1015 REAL(
dp),
POINTER :: scal(:)
1016 TYPE(
section_vals_type),
POINTER :: cdft_control_section, ddapc_restraint_section, &
1017 dftb_parameter, dftb_section, dftb_tblite_mixer, eeq_section, genpot_section, &
1018 lri_optbas_section, mull_section, nonbonded_section, s2_restraint_section, se_section, &
1019 xtb_parameter, xtb_section, xtb_tblite, xtb_tblite_mixer, xtb_tblite_ref_cli
1021 CALL timeset(routinen, handle)
1023 was_present = .false.
1024 NULLIFY (mull_section, ddapc_restraint_section, s2_restraint_section, &
1025 se_section, dftb_section, xtb_section, dftb_parameter, xtb_parameter, lri_optbas_section, &
1026 cdft_control_section, genpot_section, eeq_section, dftb_tblite_mixer, &
1027 xtb_tblite_mixer, xtb_tblite_ref_cli)
1050 tmpsqrt = sqrt(
value)
1053 qs_control%eps_core_charge =
value/100.0_dp
1056 qs_control%eps_pgf_orb = tmpsqrt
1057 qs_control%eps_kg_orb = qs_control%eps_pgf_orb
1059 qs_control%eps_ppnl = qs_control%eps_pgf_orb/100.0_dp
1061 qs_control%eps_ppl = 1.0e-2_dp
1063 qs_control%gapw_control%eps_cpc =
value
1065 qs_control%eps_rho_gspace =
value
1066 qs_control%eps_rho_rspace =
value
1068 qs_control%eps_gvg_rspace = tmpsqrt
1071 IF (n_rep /= 0)
THEN
1075 IF (n_rep /= 0)
THEN
1079 IF (n_rep /= 0)
THEN
1083 IF (n_rep /= 0)
THEN
1085 qs_control%eps_kg_orb = sqrt(tmp)
1088 IF (n_rep /= 0)
THEN
1092 IF (n_rep /= 0)
THEN
1096 IF (n_rep /= 0)
THEN
1098 qs_control%eps_rho_rspace = qs_control%eps_rho_gspace
1101 IF (n_rep /= 0)
THEN
1105 IF (n_rep /= 0)
THEN
1109 IF (n_rep /= 0)
THEN
1113 IF (n_rep /= 0)
THEN
1121 CALL section_vals_val_get(qs_section,
"ALPHA0_HARD", r_val=qs_control%gapw_control%alpha0_hard)
1122 qs_control%gapw_control%alpha0_hard_from_input = .false.
1123 IF (qs_control%gapw_control%alpha0_hard /= 0.0_dp) qs_control%gapw_control%alpha0_hard_from_input = .true.
1125 CALL section_vals_val_get(qs_section,
"MAX_RAD_LOCAL", r_val=qs_control%gapw_control%max_rad_local)
1127 CALL section_vals_val_get(qs_section,
"MIN_PAIR_LIST_RADIUS", r_val=qs_control%pairlist_radius)
1135 CALL section_vals_val_get(qs_section,
"CLUSTER_EMBED_SUBSYS", l_val=qs_control%cluster_embed_subsys)
1136 CALL section_vals_val_get(qs_section,
"HIGH_LEVEL_EMBED_SUBSYS", l_val=qs_control%high_level_embed_subsys)
1147 IF (qs_control%gapw_control%basis_1c /=
gapw_1c_orb)
THEN
1148 qs_control%gapw_control%eps_svd = max(qs_control%gapw_control%eps_svd, 1.e-12_dp)
1151 CALL section_vals_val_get(qs_section,
"GAPW_ACCURATE_XCINT", l_val=qs_control%gapw_control%accurate_xcint)
1158 qs_control%pw_grid_opt%spherical = .true.
1159 qs_control%pw_grid_opt%fullspace = .false.
1161 qs_control%pw_grid_opt%spherical = .false.
1162 qs_control%pw_grid_opt%fullspace = .true.
1164 qs_control%pw_grid_opt%spherical = .false.
1165 qs_control%pw_grid_opt%fullspace = .false.
1170 qs_control%do_ppl_method = itmp
1173 qs_control%pw_grid_opt%distribution_layout = tmplist
1177 CALL section_vals_val_get(qs_section,
"EXTRAPOLATION", i_val=qs_control%wf_interpolation_method_nr)
1178 CALL section_vals_val_get(qs_section,
"EXTRAPOLATION_ORDER", i_val=qs_control%wf_extrapolation_order)
1182 qs_control%gapw = .false.
1183 qs_control%gapw_xc = .false.
1184 qs_control%gpw = .false.
1185 qs_control%pao = .false.
1186 qs_control%dftb = .false.
1187 qs_control%xtb = .false.
1188 qs_control%semi_empirical = .false.
1189 qs_control%ofgpw = .false.
1190 qs_control%lrigpw = .false.
1191 qs_control%rigpw = .false.
1192 SELECT CASE (qs_control%method_id)
1196 qs_control%gapw = .true.
1198 qs_control%gapw_xc = .true.
1202 qs_control%gpw = .true.
1204 qs_control%ofgpw = .true.
1206 qs_control%lrigpw = .true.
1208 qs_control%rigpw = .true.
1210 qs_control%dftb = .true.
1214 qs_control%xtb = .true.
1219 qs_control%semi_empirical = .true.
1222 qs_control%semi_empirical = .true.
1225 qs_control%semi_empirical = .true.
1228 qs_control%semi_empirical = .true.
1231 qs_control%semi_empirical = .true.
1234 qs_control%semi_empirical = .true.
1237 qs_control%semi_empirical = .true.
1240 qs_control%semi_empirical = .true.
1244 qs_control%semi_empirical = .true.
1247 CALL section_vals_get(mull_section, explicit=qs_control%mulliken_restraint)
1249 IF (qs_control%mulliken_restraint)
THEN
1250 CALL section_vals_val_get(mull_section,
"STRENGTH", r_val=qs_control%mulliken_restraint_control%strength)
1251 CALL section_vals_val_get(mull_section,
"TARGET", r_val=qs_control%mulliken_restraint_control%target)
1256 jj = jj +
SIZE(tmplist)
1258 qs_control%mulliken_restraint_control%natoms = jj
1259 IF (qs_control%mulliken_restraint_control%natoms < 1)
THEN
1260 cpabort(
"Need at least 1 atom to use mulliken constraints")
1262 ALLOCATE (qs_control%mulliken_restraint_control%atoms(qs_control%mulliken_restraint_control%natoms))
1266 DO j = 1,
SIZE(tmplist)
1268 qs_control%mulliken_restraint_control%atoms(jj) = tmplist(j)
1272 CALL section_vals_get(ddapc_restraint_section, n_repetition=nrep, explicit=qs_control%ddapc_restraint)
1273 IF (qs_control%ddapc_restraint)
THEN
1274 ALLOCATE (qs_control%ddapc_restraint_control(nrep))
1276 qs_control%ddapc_restraint_is_spin = .false.
1277 qs_control%ddapc_explicit_potential = .false.
1280 CALL section_vals_get(s2_restraint_section, explicit=qs_control%s2_restraint)
1281 IF (qs_control%s2_restraint)
THEN
1283 r_val=qs_control%s2_restraint_control%strength)
1285 r_val=qs_control%s2_restraint_control%target)
1287 i_val=qs_control%s2_restraint_control%functional_form)
1291 IF (qs_control%cdft)
THEN
1296 IF (qs_control%semi_empirical)
THEN
1298 l_val=qs_control%se_control%orthogonal_basis)
1300 r_val=qs_control%se_control%delta)
1302 l_val=qs_control%se_control%analytical_gradients)
1304 l_val=qs_control%se_control%force_kdsod_EX)
1307 i_val=qs_control%se_control%integral_screening)
1310 CALL cp_warn(__location__, &
1311 "PNNL semi-empirical parameterization supports only the Slater type "// &
1312 "integral scheme. Revert to Slater and continue the calculation.")
1318 i_val=qs_control%se_control%ga_ncells)
1321 r_val=qs_control%se_control%cutoff_lrc)
1322 qs_control%se_control%taper_lrc = qs_control%se_control%cutoff_lrc
1327 r_val=qs_control%se_control%taper_lrc)
1330 r_val=qs_control%se_control%range_lrc)
1333 r_val=qs_control%se_control%cutoff_cou)
1334 qs_control%se_control%taper_cou = qs_control%se_control%cutoff_cou
1339 r_val=qs_control%se_control%taper_cou)
1342 r_val=qs_control%se_control%range_cou)
1345 r_val=qs_control%se_control%cutoff_exc)
1346 qs_control%se_control%taper_exc = qs_control%se_control%cutoff_exc
1351 r_val=qs_control%se_control%taper_exc)
1354 r_val=qs_control%se_control%range_exc)
1358 r_val=qs_control%se_control%taper_scr)
1360 r_val=qs_control%se_control%range_scr)
1364 i_val=qs_control%se_control%periodic_type)
1365 SELECT CASE (qs_control%se_control%periodic_type)
1367 qs_control%se_control%do_ewald = .false.
1368 qs_control%se_control%do_ewald_r3 = .false.
1369 qs_control%se_control%do_ewald_gks = .false.
1371 qs_control%se_control%do_ewald = .true.
1372 qs_control%se_control%do_ewald_r3 = .false.
1373 qs_control%se_control%do_ewald_gks = .false.
1375 qs_control%se_control%do_ewald = .false.
1376 qs_control%se_control%do_ewald_r3 = .false.
1377 qs_control%se_control%do_ewald_gks = .true.
1379 CALL cp_abort(__location__, &
1380 "A periodic semi-empirical calculation was requested with a long-range "// &
1381 "summation on the single integral evaluation. This scheme is supported "// &
1382 "only by the PNNL parameterization.")
1385 qs_control%se_control%do_ewald = .true.
1386 qs_control%se_control%do_ewald_r3 = .true.
1387 qs_control%se_control%do_ewald_gks = .false.
1388 IF (qs_control%se_control%integral_screening /=
do_se_is_kdso)
THEN
1389 CALL cp_abort(__location__, &
1390 "A periodic semi-empirical calculation was requested with a long-range "// &
1391 "summation for the slowly convergent part 1/R^3, which is not congruent "// &
1392 "with the integral screening chosen. The only integral screening supported "// &
1393 "by this periodic type calculation is the standard Klopman-Dewar-Sabelli-Ohno.")
1399 l_val=qs_control%se_control%dispersion)
1401 r_val=qs_control%se_control%rcdisp)
1403 r_val=qs_control%se_control%epscn)
1405 qs_control%se_control%sd3(1) = scal(1)
1406 qs_control%se_control%sd3(2) = scal(2)
1407 qs_control%se_control%sd3(3) = scal(3)
1409 c_val=qs_control%se_control%dispersion_parameter_file)
1413 cpabort(
"EWALD_R3 not implemented yet!")
1425 qs_control%se_control%orthogonal_basis = .true.
1430 IF (qs_control%dftb)
THEN
1432 l_val=qs_control%dftb_control%orthogonal_basis)
1434 l_val=qs_control%dftb_control%self_consistent)
1436 l_val=qs_control%dftb_control%dispersion)
1438 l_val=qs_control%dftb_control%dftb3_diagonal)
1440 l_val=qs_control%dftb_control%hb_sr_damp)
1442 explicit=dftb_scc_mixer_explicit)
1444 i_val=qs_control%dftb_control%tblite_scc_mixer)
1445 CALL section_vals_get(dftb_tblite_mixer, explicit=dftb_tblite_mixer_explicit)
1446 CALL read_tblite_mixer_section(dftb_tblite_mixer, &
1447 qs_control%dftb_control%tblite_mixer_iterations, &
1448 qs_control%dftb_control%tblite_mixer_memory, &
1449 qs_control%dftb_control%tblite_mixer_solver, &
1450 qs_control%dftb_control%tblite_mixer_damping, &
1451 qs_control%dftb_control%tblite_mixer_omega0, &
1452 qs_control%dftb_control%tblite_mixer_min_weight, &
1453 qs_control%dftb_control%tblite_mixer_max_weight, &
1454 qs_control%dftb_control%tblite_mixer_weight_factor, &
1455 "DFTB/TBLITE_MIXER")
1456 IF (qs_control%do_ls_scf)
THEN
1457 IF (dftb_scc_mixer_explicit .AND. &
1459 CALL cp_warn(__location__, &
1460 "DFTB/SCC_MIXER is reset to NONE with QS/LS_SCF; LS_SCF optimizes "// &
1461 "the density matrix directly.")
1463 IF (dftb_tblite_mixer_explicit)
THEN
1464 CALL cp_warn(__location__, &
1465 "DFTB/TBLITE_MIXER settings are ignored with QS/LS_SCF; LS_SCF controls "// &
1466 "the density-matrix optimization.")
1470 IF (qs_control%dftb_control%tblite_mixer_damping <= 0.0_dp)
THEN
1471 cpabort(
"DFTB/TBLITE_MIXER/DAMPING must be positive")
1474 r_val=qs_control%dftb_control%eps_disp)
1478 l_val=qs_control%dftb_control%do_ewald)
1480 qs_control%dftb_control%do_ewald = (qs_control%periodicity /= 0)
1483 c_val=qs_control%dftb_control%sk_file_path)
1485 c_val=qs_control%dftb_control%sk_file_list)
1487 r_val=qs_control%dftb_control%hb_sr_para)
1489 ALLOCATE (qs_control%dftb_control%sk_pair_list(3, n_var))
1493 qs_control%dftb_control%sk_pair_list(1:3, k) = clist(1:3)
1497 i_val=qs_control%dftb_control%dispersion_type)
1499 c_val=qs_control%dftb_control%uff_force_field)
1502 r_val=qs_control%dftb_control%rcdisp)
1504 r_val=qs_control%dftb_control%epscn)
1506 r_val=qs_control%dftb_control%exp_pre)
1508 r_val=qs_control%dftb_control%scaling)
1510 qs_control%dftb_control%sd3(1) = scal(1)
1511 qs_control%dftb_control%sd3(2) = scal(2)
1512 qs_control%dftb_control%sd3(3) = scal(3)
1514 qs_control%dftb_control%sd3bj(1) = scal(1)
1515 qs_control%dftb_control%sd3bj(2) = scal(2)
1516 qs_control%dftb_control%sd3bj(3) = scal(3)
1517 qs_control%dftb_control%sd3bj(4) = scal(4)
1519 c_val=qs_control%dftb_control%dispersion_parameter_file)
1521 IF (qs_control%dftb_control%dispersion)
CALL cite_reference(
zhechkov2005)
1522 IF (qs_control%dftb_control%self_consistent)
CALL cite_reference(
elstner1998)
1523 IF (qs_control%dftb_control%hb_sr_damp)
CALL cite_reference(
hu2007)
1527 IF (qs_control%xtb)
THEN
1530 qs_control%xtb_control%do_tblite = (qs_control%xtb_control%gfn_type ==
gfn_tblite)
1531 IF (qs_control%xtb_control%do_tblite)
THEN
1532 IF (.NOT. tblite_section_active)
THEN
1533 cpabort(
"XTB/GFN_TYPE TBLITE requires an XTB/TBLITE section")
1536 qs_control%xtb_control%gfn_type =
gfn1xtb
1537 ELSE IF (tblite_section_active)
THEN
1538 cpabort(
"The XTB/TBLITE section requires XTB/GFN_TYPE TBLITE")
1541 explicit=xtb_scc_mixer_explicit)
1543 i_val=qs_control%xtb_control%tblite_scc_mixer)
1544 CALL section_vals_get(xtb_tblite_mixer, explicit=xtb_tblite_mixer_explicit)
1545 CALL read_tblite_mixer_section(xtb_tblite_mixer, &
1546 qs_control%xtb_control%tblite_mixer_iterations, &
1547 qs_control%xtb_control%tblite_mixer_memory, &
1548 qs_control%xtb_control%tblite_mixer_solver, &
1549 qs_control%xtb_control%tblite_mixer_damping, &
1550 qs_control%xtb_control%tblite_mixer_omega0, &
1551 qs_control%xtb_control%tblite_mixer_min_weight, &
1552 qs_control%xtb_control%tblite_mixer_max_weight, &
1553 qs_control%xtb_control%tblite_mixer_weight_factor, &
1555 IF (xtb_tblite_mixer_explicit)
THEN
1557 explicit=qs_control%xtb_control%tblite_mixer_damping_explicit)
1559 IF ((.NOT. qs_control%xtb_control%do_tblite) .AND. &
1560 qs_control%xtb_control%gfn_type == 0)
THEN
1561 IF (xtb_scc_mixer_explicit .AND. &
1564 CALL cp_warn(__location__, &
1565 "XTB/SCC_MIXER is reset to NONE for CP2K-internal GFN0-xTB; "// &
1566 "GFN0-xTB has no SCC variables to mix.")
1568 IF (xtb_tblite_mixer_explicit)
THEN
1569 CALL cp_warn(__location__, &
1570 "XTB/TBLITE_MIXER settings are ignored for CP2K-internal GFN0-xTB; "// &
1571 "GFN0-xTB has no SCC variables to mix.")
1575 IF (qs_control%do_ls_scf)
THEN
1576 IF (xtb_scc_mixer_explicit .AND. &
1578 CALL cp_warn(__location__, &
1579 "XTB/SCC_MIXER is reset to NONE with QS/LS_SCF; LS_SCF optimizes "// &
1580 "the density matrix directly.")
1582 IF (xtb_tblite_mixer_explicit)
THEN
1583 CALL cp_warn(__location__, &
1584 "XTB/TBLITE_MIXER settings are ignored with QS/LS_SCF; LS_SCF controls "// &
1585 "the density-matrix optimization.")
1589 IF (qs_control%xtb_control%tblite_mixer_damping <= 0.0_dp)
THEN
1590 cpabort(
"XTB/TBLITE_MIXER/DAMPING must be positive")
1595 l_val=qs_control%xtb_control%do_ewald)
1597 qs_control%xtb_control%do_ewald = (qs_control%periodicity /= 0)
1601 l_val=qs_control%xtb_control%do_spinpol)
1618 SELECT CASE (qs_control%xtb_control%gfn_type)
1625 cpabort(
"gfn2-xtb tbd")
1632 qs_control%xtb_control%sto_ng = ngauss
1634 qs_control%xtb_control%h_sto_ng = ngauss
1636 c_val=qs_control%xtb_control%parameter_file_path)
1640 c_val=qs_control%xtb_control%parameter_file_name)
1642 SELECT CASE (qs_control%xtb_control%gfn_type)
1644 qs_control%xtb_control%parameter_file_name =
"xTB0_parameters"
1646 qs_control%xtb_control%parameter_file_name =
"xTB1_parameters"
1648 cpabort(
"gfn2-xtb tbd")
1655 c_val=qs_control%xtb_control%spinpol_param_file_name)
1658 r_val=qs_control%xtb_control%rcdisp)
1660 r_val=qs_control%xtb_control%epscn)
1664 qs_control%xtb_control%s6 = scal(1)
1665 qs_control%xtb_control%s8 = scal(2)
1667 SELECT CASE (qs_control%xtb_control%gfn_type)
1669 qs_control%xtb_control%s6 = 1.00_dp
1670 qs_control%xtb_control%s8 = 2.85_dp
1672 qs_control%xtb_control%s6 = 1.00_dp
1673 qs_control%xtb_control%s8 = 2.40_dp
1675 cpabort(
"gfn2-xtb tbd")
1683 qs_control%xtb_control%a1 = scal(1)
1684 qs_control%xtb_control%a2 = scal(2)
1686 SELECT CASE (qs_control%xtb_control%gfn_type)
1688 qs_control%xtb_control%a1 = 0.80_dp
1689 qs_control%xtb_control%a2 = 4.60_dp
1691 qs_control%xtb_control%a1 = 0.63_dp
1692 qs_control%xtb_control%a2 = 5.00_dp
1694 cpabort(
"gfn2-xtb tbd")
1700 c_val=qs_control%xtb_control%dispersion_parameter_file)
1705 qs_control%xtb_control%ks = scal(1)
1706 qs_control%xtb_control%kp = scal(2)
1707 qs_control%xtb_control%kd = scal(3)
1708 qs_control%xtb_control%ksp = scal(4)
1709 qs_control%xtb_control%k2sh = scal(5)
1710 IF (qs_control%xtb_control%gfn_type == 0)
THEN
1712 qs_control%xtb_control%ksp = 0.5_dp*(scal(1) + scal(2))
1715 SELECT CASE (qs_control%xtb_control%gfn_type)
1717 qs_control%xtb_control%ks = 2.00_dp
1718 qs_control%xtb_control%kp = 2.4868_dp
1719 qs_control%xtb_control%kd = 2.27_dp
1720 qs_control%xtb_control%ksp = 2.2434_dp
1721 qs_control%xtb_control%k2sh = 1.1241_dp
1723 qs_control%xtb_control%ks = 1.85_dp
1724 qs_control%xtb_control%kp = 2.25_dp
1725 qs_control%xtb_control%kd = 2.00_dp
1726 qs_control%xtb_control%ksp = 2.08_dp
1727 qs_control%xtb_control%k2sh = 2.85_dp
1729 cpabort(
"gfn2-xtb tbd")
1737 qs_control%xtb_control%kg = scal(1)
1738 qs_control%xtb_control%kf = scal(2)
1740 SELECT CASE (qs_control%xtb_control%gfn_type)
1742 qs_control%xtb_control%kg = 2.00_dp
1743 qs_control%xtb_control%kf = 1.50_dp
1745 qs_control%xtb_control%kg = 2.00_dp
1746 qs_control%xtb_control%kf = 1.50_dp
1748 cpabort(
"gfn2-xtb tbd")
1754 qs_control%xtb_control%kcns = scal(1)
1755 qs_control%xtb_control%kcnp = scal(2)
1756 qs_control%xtb_control%kcnd = scal(3)
1761 SELECT CASE (qs_control%xtb_control%gfn_type)
1763 qs_control%xtb_control%ksen = scal(1)
1764 qs_control%xtb_control%kpen = scal(2)
1765 qs_control%xtb_control%kden = scal(3)
1767 qs_control%xtb_control%ken = scal(1)
1769 cpabort(
"gfn2-xtb tbd")
1774 SELECT CASE (qs_control%xtb_control%gfn_type)
1776 qs_control%xtb_control%ksen = 0.006_dp
1777 qs_control%xtb_control%kpen = -0.001_dp
1778 qs_control%xtb_control%kden = -0.002_dp
1780 qs_control%xtb_control%ken = -0.007_dp
1782 cpabort(
"gfn2-xtb tbd")
1789 qs_control%xtb_control%ben = scal(1)
1794 r_val=qs_control%xtb_control%enscale)
1796 SELECT CASE (qs_control%xtb_control%gfn_type)
1798 qs_control%xtb_control%enscale = -0.09_dp
1800 qs_control%xtb_control%enscale = 0._dp
1802 cpabort(
"gfn2-xtb tbd")
1809 l_val=qs_control%xtb_control%xb_interaction)
1811 qs_control%xtb_control%kxr = scal(1)
1812 qs_control%xtb_control%kx2 = scal(2)
1815 l_val=qs_control%xtb_control%do_nonbonded)
1817 IF (explicit .AND. qs_control%xtb_control%do_nonbonded)
THEN
1821 CALL read_gp_section(qs_control%xtb_control%nonbonded, genpot_section, 0)
1825 r_val=qs_control%xtb_control%eps_pair)
1828 qs_control%xtb_control%coulomb_sr_cut = scal(1)
1830 qs_control%xtb_control%coulomb_sr_eps = scal(1)
1836 SELECT CASE (qs_control%xtb_control%gfn_type)
1838 qs_control%xtb_control%coulomb_interaction = .false.
1839 qs_control%xtb_control%coulomb_lr = .false.
1840 qs_control%xtb_control%tb3_interaction = .false.
1841 qs_control%xtb_control%check_atomic_charges = .false.
1843 l_val=qs_control%xtb_control%var_dipole)
1847 l_val=qs_control%xtb_control%coulomb_interaction)
1849 l_val=qs_control%xtb_control%coulomb_lr)
1851 l_val=qs_control%xtb_control%tb3_interaction)
1854 l_val=qs_control%xtb_control%check_atomic_charges)
1855 qs_control%xtb_control%var_dipole = .false.
1857 cpabort(
"gfn2-xtb tbd")
1861 qs_control%xtb_control%kab_nval = n_rep
1863 ALLOCATE (qs_control%xtb_control%kab_param(3, n_rep))
1864 ALLOCATE (qs_control%xtb_control%kab_types(2, n_rep))
1865 ALLOCATE (qs_control%xtb_control%kab_vals(n_rep))
1868 qs_control%xtb_control%kab_param(1, j) = clist(1)
1870 ielement=qs_control%xtb_control%kab_types(1, j))
1871 qs_control%xtb_control%kab_param(2, j) = clist(2)
1873 ielement=qs_control%xtb_control%kab_types(2, j))
1874 qs_control%xtb_control%kab_param(3, j) = clist(3)
1875 READ (clist(3),
'(F10.0)') qs_control%xtb_control%kab_vals(j)
1882 ALLOCATE (qs_control%xtb_control%spinpol_type(n_rep))
1883 ALLOCATE (qs_control%xtb_control%spinpol_vals(6, n_rep))
1886 READ (clist(1),
'(A)') cval
1887 element_symbol = adjustl(trim(cval))
1889 qs_control%xtb_control%spinpol_type(j) = znum
1890 READ (clist(2),
'(F20.8)') qs_control%xtb_control%spinpol_vals(1, j)
1891 READ (clist(3),
'(F20.8)') qs_control%xtb_control%spinpol_vals(2, j)
1892 READ (clist(4),
'(F20.8)') qs_control%xtb_control%spinpol_vals(3, j)
1893 READ (clist(5),
'(F20.8)') qs_control%xtb_control%spinpol_vals(4, j)
1894 READ (clist(6),
'(F20.8)') qs_control%xtb_control%spinpol_vals(5, j)
1895 READ (clist(7),
'(F20.8)') qs_control%xtb_control%spinpol_vals(6, j)
1899 IF (qs_control%xtb_control%gfn_type == 0)
THEN
1901 qs_control%xtb_control%ksrb = scal(1)
1902 qs_control%xtb_control%esrb = scal(2)
1903 qs_control%xtb_control%gscal = scal(3)
1904 qs_control%xtb_control%c1srb = scal(4)
1905 qs_control%xtb_control%c2srb = scal(5)
1906 qs_control%xtb_control%shift = scal(6)
1911 SELECT CASE (trim(cval))
1913 qs_control%xtb_control%enshift_type = 0
1915 qs_control%xtb_control%enshift_type = 1
1917 qs_control%xtb_control%enshift_type = 2
1919 cpabort(
"Unknown value for EN_SHIFT_TYPE")
1923 CALL read_eeq_param(eeq_section, qs_control%xtb_control%eeq_sparam)
1930 IF (qs_control%xtb_control%do_tblite)
THEN
1932 i_val=qs_control%xtb_control%tblite_method)
1934 c_val=qs_control%xtb_control%tblite_param_file)
1936 r_val=qs_control%xtb_control%tblite_accuracy)
1937 IF (qs_control%xtb_control%tblite_accuracy <= 0.0_dp)
THEN
1938 cpabort(
"XTB/TBLITE/ACCURACY must be positive")
1940 IF (qs_control%xtb_control%tblite_mixer_damping <= 0.0_dp)
THEN
1941 cpabort(
"XTB/TBLITE_MIXER/DAMPING must be positive")
1944 CALL section_vals_get(xtb_tblite_ref_cli, explicit=tblite_reference_cli_section)
1945 IF (tblite_reference_cli .AND. (.NOT. tblite_reference_cli_section))
THEN
1946 cpabort(
"XTB/TBLITE/REFERENCE_CLI keyword requires an XTB/TBLITE/REFERENCE_CLI section")
1948 IF (tblite_reference_cli .OR. tblite_reference_cli_section)
THEN
1949 CALL read_xtb_reference_cli_section(xtb_tblite_ref_cli, qs_control%xtb_control%reference_cli, cell)
1950 qs_control%xtb_control%reference_cli%enabled = .true.
1958 CALL timestop(handle)
1974 SUBROUTINE read_tblite_mixer_section(mixer_section, iterations, memory, solver, damping, omega0, min_weight, &
1975 max_weight, weight_factor, section_name)
1977 INTEGER,
INTENT(INOUT) :: iterations, memory, solver
1978 REAL(kind=
dp),
INTENT(INOUT) :: damping, omega0, min_weight, max_weight, &
1980 CHARACTER(LEN=*),
INTENT(IN) :: section_name
1982 LOGICAL :: explicit, memory_explicit
1985 IF (.NOT. explicit)
RETURN
2000 IF (iterations < 1) cpabort(trim(section_name)//
"/ITERATIONS must be positive")
2001 IF (memory < 1) cpabort(trim(section_name)//
"/MEMORY must be positive")
2002 SELECT CASE (solver)
2005 cpabort(trim(section_name)//
"/SOLVER must be GVD or GVR")
2007 IF (damping <= 0.0_dp) cpabort(trim(section_name)//
"/DAMPING must be positive")
2008 IF (omega0 <= 0.0_dp) cpabort(trim(section_name)//
"/OMEGA0 must be positive")
2009 IF (min_weight <= 0.0_dp) cpabort(trim(section_name)//
"/MIN_WEIGHT must be positive")
2010 IF (max_weight <= 0.0_dp) cpabort(trim(section_name)//
"/MAX_WEIGHT must be positive")
2011 IF (max_weight < min_weight)
THEN
2012 cpabort(trim(section_name)//
"/MAX_WEIGHT must not be smaller than MIN_WEIGHT")
2014 IF (weight_factor <= 0.0_dp) cpabort(trim(section_name)//
"/WEIGHT_FACTOR must be positive")
2016 END SUBROUTINE read_tblite_mixer_section
2024 SUBROUTINE read_xtb_reference_cli_section(ref_cli_section, ref_cli, cell)
2027 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell
2029 REAL(kind=
dp),
DIMENSION(:),
POINTER :: efield
2031 param_section, solvation_section, &
2045 c_val=ref_cli%post_processing_output_file)
2047 IF (ref_cli%efield_active)
THEN
2050 ref_cli%efield = efield(1:3)
2051 IF (
PRESENT(cell))
THEN
2056 CALL section_vals_get(solvation_section, explicit=ref_cli%solvation_active)
2057 IF (ref_cli%solvation_active)
THEN
2060 CALL section_vals_val_get(solvation_section,
"BORN_KERNEL", i_val=ref_cli%solvation_born_kernel)
2062 IF (len_trim(ref_cli%solvation_solvent) == 0)
THEN
2063 cpabort(
"REFERENCE_CLI implicit solvation needs SOLVENT")
2067 cpabort(
"BORN_KERNEL is invalid with MODEL CPCM")
2070 SELECT CASE (ref_cli%solvation_model)
2074 cpabort(
"SOLUTION_STATE is valid only for ALPB/GBSA")
2079 r_val=ref_cli%electronic_temperature_guess)
2080 IF (ref_cli%electronic_temperature_guess < 0.0_dp)
THEN
2081 cpabort(
"XTB/TBLITE/REFERENCE_CLI/ELECTRONIC_TEMPERATURE_GUESS must not be negative")
2083 IF (ref_cli%electronic_temperature_guess > 0.0_dp .AND. ref_cli%guess /=
tblite_guess_ceh)
THEN
2084 cpabort(
"XTB/TBLITE/REFERENCE_CLI/ELECTRONIC_TEMPERATURE_GUESS requires GUESS CEH")
2088 IF (ref_cli%guess_cli%enabled)
THEN
2091 r_val=ref_cli%guess_cli%electronic_temperature_guess)
2092 IF (ref_cli%guess_cli%electronic_temperature_guess < 0.0_dp)
THEN
2093 cpabort(
"REFERENCE_CLI/GUESS_CLI/ELECTRONIC_TEMPERATURE_GUESS must not be negative")
2097 IF (ref_cli%guess_cli%efield_active)
THEN
2100 ref_cli%guess_cli%efield = efield(1:3)
2101 IF (
PRESENT(cell))
THEN
2112 IF (ref_cli%param_cli%enabled)
THEN
2113 CALL section_vals_val_get(param_section,
"METHOD", explicit=ref_cli%param_cli%method_explicit, &
2114 i_val=ref_cli%param_cli%method)
2120 IF (ref_cli%fit_cli%enabled)
THEN
2125 IF (len_trim(ref_cli%fit_cli%param_file) == 0)
THEN
2126 cpabort(
"XTB/TBLITE/REFERENCE_CLI/FIT_CLI needs PARAM_FILE")
2128 IF (len_trim(ref_cli%fit_cli%input_file) == 0)
THEN
2129 cpabort(
"XTB/TBLITE/REFERENCE_CLI/FIT_CLI needs INPUT_FILE")
2133 CALL section_vals_get(tagdiff_section, explicit=ref_cli%tagdiff_cli%enabled)
2134 IF (ref_cli%tagdiff_cli%enabled)
THEN
2136 CALL section_vals_val_get(tagdiff_section,
"REFERENCE", c_val=ref_cli%tagdiff_cli%reference_file)
2138 IF (len_trim(ref_cli%tagdiff_cli%actual_file) == 0)
THEN
2139 cpabort(
"XTB/TBLITE/REFERENCE_CLI/TAGDIFF_CLI needs ACTUAL")
2141 IF (len_trim(ref_cli%tagdiff_cli%reference_file) == 0)
THEN
2142 cpabort(
"XTB/TBLITE/REFERENCE_CLI/TAGDIFF_CLI needs REFERENCE")
2152 END SUBROUTINE read_xtb_reference_cli_section
2165 CHARACTER(LEN=*),
PARAMETER :: routinen =
'read_tddfpt2_control'
2167 CHARACTER(LEN=default_string_length), &
2168 DIMENSION(:),
POINTER :: tmpstringlist
2169 INTEGER :: handle, irep, isize, nrep
2170 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: inds
2171 LOGICAL :: do_ewald, do_exchange, expl, explicit, &
2173 REAL(kind=
dp) :: filter, fval, hfx
2175 soc_section, stda_section, xc_func, &
2178 CALL timeset(routinen, handle)
2194 CALL section_vals_val_get(t_section,
"MIN_AMPLITUDE", r_val=t_control%min_excitation_amplitude)
2204 CALL section_vals_val_get(t_section,
"ADMM_KERNEL_CORRECTION_SYMMETRIC", l_val=t_control%admm_symm)
2205 CALL section_vals_val_get(t_section,
"ADMM_KERNEL_XC_CORRECTION", l_val=t_control%admm_xc_correction)
2206 CALL section_vals_val_get(t_section,
"EXCITON_DESCRIPTORS", l_val=t_control%do_exciton_descriptors)
2207 CALL section_vals_val_get(t_section,
"DIRECTIONAL_EXCITON_DESCRIPTORS", l_val=t_control%do_directional_exciton_descriptors)
2213 IF (
SIZE(tmpstringlist) == 2)
THEN
2215 SELECT CASE (tmpstringlist(2))
2217 SELECT CASE (tmpstringlist(1))
2221 CALL cp_abort(__location__, &
2222 "AUTO_BASIS: the size <X> is invalid for the "// &
2223 "type <"//trim(adjustl(tmpstringlist(1)))//
">; "// &
2224 "use one of SMALL, MEDIUM, LARGE, HUGE for "// &
2225 "the size. The syntax AUTO_BASIS X X is a "// &
2226 "reserved case for using NO automatically "// &
2227 "generated basis sets.")
2238 cpabort(
"Unknown basis size in AUTO_BASIS keyword:"//trim(tmpstringlist(1)))
2241 SELECT CASE (tmpstringlist(1))
2244 t_control%auto_basis_p_lri_aux = isize
2246 cpabort(
"Unknown basis type in AUTO_BASIS keyword:"//trim(tmpstringlist(1)))
2249 CALL cp_abort(__location__, &
2250 "AUTO_BASIS keyword in &PROPERTIES &TDDFT section has a wrong number of arguments.")
2254 IF (t_control%conv < 0)
THEN
2255 t_control%conv = abs(t_control%conv)
2264 t_control%dipole_form = 0
2269 CALL section_vals_val_get(dipole_section,
"REFERENCE_POINT", r_vals=t_control%dipole_ref_point)
2271 NULLIFY (t_control%dipole_ref_point)
2273 cpabort(
"User-defined reference point should be given explicitly")
2281 t_control%do_soc = .true.
2288 IF (t_control%mgrid_is_explicit)
THEN
2289 CALL section_vals_val_get(mgrid_section,
"NGRIDS", i_val=t_control%mgrid_ngrids, explicit=explicit)
2290 IF (.NOT. explicit) t_control%mgrid_ngrids =
SIZE(qs_control%e_cutoff)
2292 CALL section_vals_val_get(mgrid_section,
"CUTOFF", r_val=t_control%mgrid_cutoff, explicit=explicit)
2293 IF (.NOT. explicit) t_control%mgrid_cutoff = qs_control%cutoff
2296 r_val=t_control%mgrid_progression_factor, explicit=explicit)
2298 IF (t_control%mgrid_progression_factor <= 1.0_dp)
THEN
2299 CALL cp_abort(__location__, &
2300 "Progression factor should be greater then 1.0 to ensure multi-grid ordering")
2303 t_control%mgrid_progression_factor = qs_control%progression_factor
2306 CALL section_vals_val_get(mgrid_section,
"COMMENSURATE", l_val=t_control%mgrid_commensurate_mgrids, explicit=explicit)
2307 IF (.NOT. explicit) t_control%mgrid_commensurate_mgrids = qs_control%commensurate_mgrids
2308 IF (t_control%mgrid_commensurate_mgrids)
THEN
2310 t_control%mgrid_progression_factor = 4.0_dp
2312 t_control%mgrid_progression_factor = qs_control%progression_factor
2316 CALL section_vals_val_get(mgrid_section,
"REL_CUTOFF", r_val=t_control%mgrid_relative_cutoff, explicit=explicit)
2317 IF (.NOT. explicit) t_control%mgrid_relative_cutoff = qs_control%relative_cutoff
2319 CALL section_vals_val_get(mgrid_section,
"MULTIGRID_SET", l_val=multigrid_set, explicit=explicit)
2320 IF (.NOT. explicit) multigrid_set = .false.
2321 IF (multigrid_set)
THEN
2324 NULLIFY (t_control%mgrid_e_cutoff)
2327 CALL section_vals_val_get(mgrid_section,
"REALSPACE", l_val=t_control%mgrid_realspace_mgrids, explicit=explicit)
2328 IF (.NOT. explicit) t_control%mgrid_realspace_mgrids = qs_control%realspace_mgrids
2331 l_val=t_control%mgrid_skip_load_balance, explicit=explicit)
2332 IF (.NOT. explicit) t_control%mgrid_skip_load_balance = qs_control%skip_load_balance_distributed
2334 IF (
ASSOCIATED(t_control%mgrid_e_cutoff))
THEN
2335 IF (
SIZE(t_control%mgrid_e_cutoff) /= t_control%mgrid_ngrids)
THEN
2336 cpabort(
"Inconsistent values for number of multi-grids")
2340 t_control%mgrid_e_cutoff = -t_control%mgrid_e_cutoff
2341 ALLOCATE (inds(t_control%mgrid_ngrids))
2342 CALL sort(t_control%mgrid_e_cutoff, t_control%mgrid_ngrids, inds)
2344 t_control%mgrid_e_cutoff = -t_control%mgrid_e_cutoff
2359 t_control%stda_control%hfx_fraction = 0.0_dp
2360 t_control%stda_control%do_exchange = .true.
2361 t_control%stda_control%eps_td_filter = 1.e-10_dp
2362 t_control%stda_control%mn_alpha = -99.0_dp
2363 t_control%stda_control%mn_beta = -99.0_dp
2365 SELECT CASE (qs_control%periodicity)
2367 t_control%stda_control%do_ewald = .false.
2369 t_control%stda_control%do_ewald = .true.
2371 t_control%stda_control%do_ewald = .true.
2373 t_control%stda_control%do_ewald = .true.
2375 cpabort(
"Illegal value for periodiciy")
2380 IF (expl) t_control%stda_control%hfx_fraction = hfx
2382 IF (expl) t_control%stda_control%eps_td_filter = filter
2384 IF (expl) t_control%stda_control%do_ewald = do_ewald
2386 IF (expl) t_control%stda_control%do_exchange = do_exchange
2388 t_control%stda_control%mn_alpha = fval
2390 t_control%stda_control%mn_beta = fval
2393 t_control%stda_control%coulomb_sr_cut = fval
2395 t_control%stda_control%coulomb_sr_eps = fval
2398 CALL timestop(handle)
2410 CHARACTER(len=*),
PARAMETER :: routinen =
'write_dft_control'
2412 CHARACTER(LEN=20) :: tmpstr
2413 INTEGER :: handle, i, i_rep, max_mtlr_iter, n_rep, &
2415 REAL(kind=
dp) :: density_cut, density_smooth_cut_range, &
2416 eps_u_j_loop, gradient_cut, tau_cut
2423 IF (dft_control%qs_control%semi_empirical)
RETURN
2424 IF (dft_control%qs_control%dftb)
RETURN
2425 IF (dft_control%qs_control%xtb)
THEN
2426 CALL write_xtb_control(dft_control%qs_control%xtb_control, dft_section)
2429 CALL timeset(routinen, handle)
2435 "PRINT%DFT_CONTROL_PARAMETERS", extension=
".Log")
2437 IF (output_unit > 0)
THEN
2441 IF (dft_control%uks)
THEN
2442 WRITE (unit=output_unit, fmt=
"(/,T2,A,T78,A)") &
2443 "DFT| Spin unrestricted (spin-polarized) Kohn-Sham calculation",
"UKS"
2444 ELSE IF (dft_control%roks)
THEN
2445 WRITE (unit=output_unit, fmt=
"(/,T2,A,T77,A)") &
2446 "DFT| Spin restricted open Kohn-Sham calculation",
"ROKS"
2448 WRITE (unit=output_unit, fmt=
"(/,T2,A,T78,A)") &
2449 "DFT| Spin restricted Kohn-Sham (RKS) calculation",
"RKS"
2452 WRITE (unit=output_unit, fmt=
"(T2,A,T76,I5)") &
2453 "DFT| Multiplicity", dft_control%multiplicity
2454 WRITE (unit=output_unit, fmt=
"(T2,A,T76,I5)") &
2455 "DFT| Number of spin states", dft_control%nspins
2457 WRITE (unit=output_unit, fmt=
"(T2,A,T76,I5)") &
2458 "DFT| Charge", dft_control%charge
2461 SELECT CASE (dft_control%sic_method_id)
2465 tmpstr =
"SPZ/MAURI SIC"
2467 tmpstr =
"US/MAURI SIC"
2471 tmpstr =
"Explicit Orbital SIC"
2474 cpabort(
"SIC option unknown")
2477 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
2478 "DFT| Self-interaction correction (SIC)", adjustr(trim(tmpstr))
2480 IF (dft_control%sic_method_id /=
sic_none)
THEN
2481 WRITE (unit=output_unit, fmt=
"(T2,A,T66,ES15.6)") &
2482 "DFT| SIC scaling parameter a", dft_control%sic_scaling_a, &
2483 "DFT| SIC scaling parameter b", dft_control%sic_scaling_b
2486 IF (dft_control%sic_method_id ==
sic_eo)
THEN
2488 WRITE (unit=output_unit, fmt=
"(T2,A,T66,A)") &
2489 "DFT| SIC orbitals",
"ALL"
2492 WRITE (unit=output_unit, fmt=
"(T2,A,T66,A)") &
2493 "DFT| SIC orbitals",
"UNPAIRED"
2500 CALL section_vals_val_get(xc_section,
"density_smooth_cutoff_range", r_val=density_smooth_cut_range)
2502 WRITE (unit=output_unit, fmt=
"(T2,A,T66,ES15.6)") &
2503 "DFT| Cutoffs: density ", density_cut, &
2504 "DFT| gradient", gradient_cut, &
2505 "DFT| tau ", tau_cut, &
2506 "DFT| cutoff_smoothing_range", density_smooth_cut_range
2509 WRITE (output_unit,
'( A, T61, A )') &
2510 " DFT| XC density smoothing ", adjustr(tmpstr)
2513 WRITE (output_unit,
'( A, T61, A )') &
2514 " DFT| XC derivatives ", adjustr(tmpstr)
2515 IF (dft_control%dft_plus_u)
THEN
2516 NULLIFY (enum, keyword, section)
2520 WRITE (unit=output_unit, fmt=
"(/,T2,A,T41,A40)") &
2521 "DFT+U| Method", adjustr(trim(
enum_i2c(enum, dft_control%plus_u_method_id)))
2522 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2523 "DFT+U| Check atomic kind information for details"
2524 IF (dft_control%mtlr_u_j)
THEN
2526 WRITE (unit=output_unit, fmt=
"(T2,A,T67,ES14.7E3)") &
2527 "MTLR U J| EPS_U_J_LOOP", eps_u_j_loop
2529 WRITE (unit=output_unit, fmt=
"(T2,A,T67,I10)") &
2530 "MTLR U J| MAX_MTLR_LOOP", max_mtlr_iter
2535 WRITE (unit=output_unit, fmt=
"(A)")
""
2536 CALL xc_write(output_unit, xc_section, dft_control%lsd)
2538 IF (dft_control%apply_period_efield)
THEN
2539 WRITE (unit=output_unit, fmt=
"(A)")
""
2540 IF (dft_control%period_efield%displacement_field)
THEN
2541 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2542 "PERIODIC_EFIELD| Use displacement field formulation"
2543 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,ES14.6)") &
2544 "PERIODIC_EFIELD| Displacement field filter: x", &
2545 dft_control%period_efield%d_filter(1), &
2546 "PERIODIC_EFIELD| y", &
2547 dft_control%period_efield%d_filter(2), &
2548 "PERIODIC_EFIELD| z", &
2549 dft_control%period_efield%d_filter(3)
2551 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,ES14.6)") &
2552 "PERIODIC_EFIELD| Polarisation vector: x", &
2553 dft_control%period_efield%polarisation(1), &
2554 "PERIODIC_EFIELD| y", &
2555 dft_control%period_efield%polarisation(2), &
2556 "PERIODIC_EFIELD| z", &
2557 dft_control%period_efield%polarisation(3)
2559 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,I14)") &
2560 "PERIODIC_EFIELD| Start Frame:", &
2561 dft_control%period_efield%start_frame, &
2562 "PERIODIC_EFIELD| End Frame:", &
2563 dft_control%period_efield%end_frame
2565 IF (
ALLOCATED(dft_control%period_efield%strength_list))
THEN
2566 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,I14)") &
2567 "PERIODIC_EFIELD| Number of Intensities:", &
2568 SIZE(dft_control%period_efield%strength_list)
2569 WRITE (unit=output_unit, fmt=
"(T2,A,I10,T66,1X,ES14.6)") &
2570 "PERIODIC_EFIELD| Intensity List [a.u.] ", &
2571 1, dft_control%period_efield%strength_list(1)
2572 DO i = 2,
SIZE(dft_control%period_efield%strength_list)
2573 WRITE (unit=output_unit, fmt=
"(T2,A,I10,T66,1X,ES14.6)") &
2574 "PERIODIC_EFIELD| ", &
2575 i, dft_control%period_efield%strength_list(i)
2578 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,ES14.6)") &
2579 "PERIODIC_EFIELD| Intensity [a.u.]:", &
2580 dft_control%period_efield%strength
2583 IF (norm2(dft_control%period_efield%polarisation) < epsilon(0.0_dp))
THEN
2584 cpabort(
"Invalid (too small) polarisation vector specified for PERIODIC_EFIELD")
2588 IF (dft_control%do_sccs)
THEN
2589 WRITE (unit=output_unit, fmt=
"(/,T2,A)") &
2590 "SCCS| Self-consistent continuum solvation model"
2591 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2592 "SCCS| Relative permittivity of the solvent (medium)", &
2593 dft_control%sccs_control%epsilon_solvent, &
2594 "SCCS| Absolute permittivity [a.u.]", &
2595 dft_control%sccs_control%epsilon_solvent/
fourpi
2596 SELECT CASE (dft_control%sccs_control%method_id)
2598 WRITE (unit=output_unit, fmt=
"(T2,A,/,(T2,A,T61,ES20.6))") &
2599 "SCCS| Dielectric function proposed by Andreussi et al.", &
2600 "SCCS| rho_max", dft_control%sccs_control%rho_max, &
2601 "SCCS| rho_min", dft_control%sccs_control%rho_min
2603 WRITE (unit=output_unit, fmt=
"(T2,A,/,(T2,A,T61,ES20.6))") &
2604 "SCCS| Dielectric function proposed by Fattebert and Gygi", &
2605 "SCCS| beta", dft_control%sccs_control%beta, &
2606 "SCCS| rho_zero", dft_control%sccs_control%rho_zero
2608 WRITE (unit=output_unit, fmt=
"(T2,A,/,A,/,(T2,A,T61,ES20.6))") &
2609 "SCCS| Dielectric function of the solvent aware algorithm", &
2610 "SCCS| proposed by Andreussi et al.", &
2611 "SCCS| rho_max", dft_control%sccs_control%rho_max, &
2612 "SCCS| rho_min", dft_control%sccs_control%rho_min, &
2613 "SCCS| f0", dft_control%sccs_control%f0, &
2614 "SCCS| delta_eta", dft_control%sccs_control%delta_eta, &
2615 "SCCS| alpha_zeta", dft_control%sccs_control%alpha_zeta, &
2616 "SCCS| delta_zeta", dft_control%sccs_control%delta_zeta, &
2617 "SCCS| R_solv", dft_control%sccs_control%R_solv
2619 cpabort(
"Invalid SCCS model specified. Please, check your input!")
2621 SELECT CASE (dft_control%sccs_control%derivative_method)
2623 WRITE (unit=output_unit, fmt=
"(T2,A,T46,A35)") &
2624 "SCCS| Numerical derivative calculation", &
2627 WRITE (unit=output_unit, fmt=
"(T2,A,T46,A35)") &
2628 "SCCS| Numerical derivative calculation", &
2629 adjustr(
"3-point stencil central differences")
2631 WRITE (unit=output_unit, fmt=
"(T2,A,T46,A35)") &
2632 "SCCS| Numerical derivative calculation", &
2633 adjustr(
"5-point stencil central differences")
2635 WRITE (unit=output_unit, fmt=
"(T2,A,T46,A35)") &
2636 "SCCS| Numerical derivative calculation", &
2637 adjustr(
"7-point stencil central differences")
2639 CALL cp_abort(__location__, &
2640 "Invalid derivative method specified for SCCS model. "// &
2641 "Please, check your input!")
2643 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2644 "SCCS| Repulsion parameter alpha [mN/m] = [dyn/cm]", &
2646 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2647 "SCCS| Dispersion parameter beta [GPa]", &
2649 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2650 "SCCS| Surface tension gamma [mN/m] = [dyn/cm]", &
2652 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2653 "SCCS| Mixing parameter applied during the iteration cycle", &
2654 dft_control%sccs_control%mixing
2655 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2656 "SCCS| Tolerance for the convergence of the SCCS iteration cycle", &
2657 dft_control%sccs_control%eps_sccs
2658 WRITE (unit=output_unit, fmt=
"(T2,A,T61,I20)") &
2659 "SCCS| Maximum number of iteration steps", &
2660 dft_control%sccs_control%max_iter
2661 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2662 "SCCS| SCF convergence threshold for starting the SCCS iteration", &
2663 dft_control%sccs_control%eps_scf
2664 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2665 "SCCS| Numerical increment for the cavity surface calculation", &
2666 dft_control%sccs_control%delta_rho
2669 WRITE (unit=output_unit, fmt=
"(A)")
""
2673 IF (dft_control%hairy_probes .EQV. .true.)
THEN
2674 n_rep =
SIZE(dft_control%probe)
2675 IF (output_unit > 0)
THEN
2677 WRITE (unit=output_unit, fmt=
"(T2,A,I5)") &
2678 "HP | hair probe set", i_rep
2679 WRITE (unit=output_unit, fmt=
"(T2,A,T61,*(I5))") &
2680 "HP| atom indexes", &
2681 (dft_control%probe(i_rep)%atom_ids(i), i=1, dft_control%probe(i_rep)%natoms)
2682 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2683 "HP| potential", dft_control%probe(i_rep)%mu
2684 WRITE (unit=output_unit, fmt=
"(T2,A,T61,F20.2)") &
2685 "HP| temperature", dft_control%probe(i_rep)%T
2686 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2687 "HP| eps_hp", dft_control%probe(i_rep)%eps_hp
2693 "PRINT%DFT_CONTROL_PARAMETERS")
2695 CALL timestop(handle)
2715 "PRINT%DFT_CONTROL_PARAMETERS", extension=
".Log")
2717 IF (iounit > 0)
THEN
2719 SELECT CASE (admm_control%admm_type)
2721 WRITE (unit=iounit, fmt=
"(/,T2,A,T77,A)")
"ADMM| Specific ADMM type specified",
"NONE"
2723 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMM1"
2725 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMM2"
2727 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMMS"
2729 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMMP"
2731 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMMQ"
2733 cpabort(
"admm_type")
2736 SELECT CASE (admm_control%purification_method)
2738 WRITE (unit=iounit, fmt=
"(T2,A,T77,A)")
"ADMM| Density matrix purification method",
"NONE"
2740 WRITE (unit=iounit, fmt=
"(T2,A,T75,A)")
"ADMM| Density matrix purification method",
"Cauchy"
2742 WRITE (unit=iounit, fmt=
"(T2,A,T66,A)")
"ADMM| Density matrix purification method",
"Cauchy subspace"
2744 WRITE (unit=iounit, fmt=
"(T2,A,T63,A)")
"ADMM| Density matrix purification method",
"MO diagonalization"
2746 WRITE (unit=iounit, fmt=
"(T2,A,T71,A)")
"ADMM| Density matrix purification method",
"MO no diag"
2748 WRITE (unit=iounit, fmt=
"(T2,A,T74,A)")
"ADMM| Density matrix purification method",
"McWeeny"
2750 WRITE (unit=iounit, fmt=
"(T2,A,T73,A)")
"ADMM| Density matrix purification method",
"NONE(DM)"
2752 cpabort(
"admm_purification_method")
2755 SELECT CASE (admm_control%method)
2757 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Orbital projection on ADMM basis"
2759 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Blocked Fock matrix projection with full purification"
2761 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Blocked Fock matrix projection"
2763 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Orbital projection with charge constrain"
2765 cpabort(
"admm method")
2768 SELECT CASE (admm_control%scaling_model)
2771 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Use Merlot (2014) scaling model"
2773 cpabort(
"admm scaling_model")
2776 WRITE (unit=iounit, fmt=
"(T2,A,T61,G20.10)")
"ADMM| eps_filter", admm_control%eps_filter
2778 SELECT CASE (admm_control%aux_exch_func)
2780 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| No exchange functional correction term used"
2782 WRITE (unit=iounit, fmt=
"(T2,A,T74,A)")
"ADMM| Exchange functional in correction term",
"(W)PBEX"
2784 WRITE (unit=iounit, fmt=
"(T2,A,T77,A)")
"ADMM| Exchange functional in correction term",
"PBEX"
2786 WRITE (unit=iounit, fmt=
"(T2,A,T77,A)")
"ADMM| Exchange functional in correction term",
"OPTX"
2788 WRITE (unit=iounit, fmt=
"(T2,A,T74,A)")
"ADMM| Exchange functional in correction term",
"Becke88"
2790 WRITE (unit=iounit, fmt=
"(T2,A,T74,A)")
"ADMM| Exchange functional in correction term",
"SlaterX"
2792 cpabort(
"admm aux_exch_func")
2795 WRITE (unit=iounit, fmt=
"(A)")
""
2800 "PRINT%DFT_CONTROL_PARAMETERS")
2808 SUBROUTINE write_xtb_control(xtb_control, dft_section)
2812 CHARACTER(len=*),
PARAMETER :: routinen =
'write_xtb_control'
2814 CHARACTER(LEN=16) :: scc_mixer_name, solver_name
2815 INTEGER :: handle, output_unit
2818 CALL timeset(routinen, handle)
2823 "PRINT%DFT_CONTROL_PARAMETERS", extension=
".Log")
2825 IF (output_unit > 0)
THEN
2827 WRITE (unit=output_unit, fmt=
"(/,T2,A,T31,A50)") &
2828 "xTB| Parameter file", adjustr(trim(xtb_control%parameter_file_name))
2829 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2830 "xTB| Basis expansion STO-NG", xtb_control%sto_ng
2831 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2832 "xTB| Basis expansion STO-NG for Hydrogen", xtb_control%h_sto_ng
2833 WRITE (unit=output_unit, fmt=
"(T2,A,T71,E10.4)") &
2834 "xTB| Repulsive pair potential accuracy", xtb_control%eps_pair
2835 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.6)") &
2836 "xTB| Repulsive enhancement factor", xtb_control%enscale
2837 WRITE (unit=output_unit, fmt=
"(T2,A,T71,L10)") &
2838 "xTB| Halogen interaction potential", xtb_control%xb_interaction
2839 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2840 "xTB| Halogen interaction potential cutoff radius", xtb_control%xb_radius
2841 WRITE (unit=output_unit, fmt=
"(T2,A,T71,L10)") &
2842 "xTB| Nonbonded interactions", xtb_control%do_nonbonded
2843 SELECT CASE (xtb_control%vdw_type)
2845 WRITE (unit=output_unit, fmt=
"(T2,A)")
"xTB| No vdW potential selected"
2847 WRITE (unit=output_unit, fmt=
"(T2,A,T72,A)")
"xTB| vdW potential type:",
"DFTD3(BJ)"
2848 WRITE (unit=output_unit, fmt=
"(T2,A,T31,A50)") &
2849 "xTB| D3 Dispersion: Parameter file", adjustr(trim(xtb_control%dispersion_parameter_file))
2851 WRITE (unit=output_unit, fmt=
"(T2,A,T76,A)")
"xTB| vdW potential type:",
"DFTD4"
2852 WRITE (unit=output_unit, fmt=
"(T2,A,T31,A50)") &
2853 "xTB| D4 Dispersion: Parameter file", adjustr(trim(xtb_control%dispersion_parameter_file))
2857 WRITE (unit=output_unit, fmt=
"(T2,A,T51,3F10.3)") &
2858 "xTB| Huckel constants ks kp kd", xtb_control%ks, xtb_control%kp, xtb_control%kd
2859 WRITE (unit=output_unit, fmt=
"(T2,A,T61,2F10.3)") &
2860 "xTB| Huckel constants ksp k2sh", xtb_control%ksp, xtb_control%k2sh
2861 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2862 "xTB| Mataga-Nishimoto exponent", xtb_control%kg
2863 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2864 "xTB| Repulsion potential exponent", xtb_control%kf
2865 WRITE (unit=output_unit, fmt=
"(T2,A,T51,3F10.3)") &
2866 "xTB| Coordination number scaling kcn(s) kcn(p) kcn(d)", &
2867 xtb_control%kcns, xtb_control%kcnp, xtb_control%kcnd
2868 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2869 "xTB| Electronegativity scaling", xtb_control%ken
2870 WRITE (unit=output_unit, fmt=
"(T2,A,T61,2F10.3)") &
2871 "xTB| Halogen potential scaling kxr kx2", xtb_control%kxr, xtb_control%kx2
2872 SELECT CASE (xtb_control%tblite_scc_mixer)
2874 scc_mixer_name =
"AUTO"
2876 scc_mixer_name =
"TBLITE"
2878 scc_mixer_name =
"CP2K"
2880 scc_mixer_name =
"NONE"
2882 cpabort(
"Unknown tblite SCC mixer")
2884 SELECT CASE (xtb_control%tblite_mixer_solver)
2890 cpabort(
"Unknown tblite SCC mixer solver")
2892 WRITE (unit=output_unit, fmt=
"(T2,A,T72,A)") &
2893 "xTB| SCC mixer:", trim(scc_mixer_name)
2894 WRITE (unit=output_unit, fmt=
"(T2,A,T71,ES10.3)") &
2895 "xTB| tblite accuracy:", xtb_control%tblite_accuracy
2896 IF (len_trim(xtb_control%tblite_param_file) > 0)
THEN
2897 WRITE (unit=output_unit, fmt=
"(T2,A,T33,A)") &
2898 "xTB| tblite parameter file:", trim(xtb_control%tblite_param_file)
2900 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2901 "xTB| tblite SCC mixer damping:", xtb_control%tblite_mixer_damping
2902 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2903 "xTB| tblite SCC mixer iterations:", xtb_control%tblite_mixer_iterations
2904 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2905 "xTB| tblite SCC mixer memory:", xtb_control%tblite_mixer_memory
2906 WRITE (unit=output_unit, fmt=
"(T2,A,T72,A)") &
2907 "xTB| tblite SCC mixer solver:", trim(solver_name)
2908 WRITE (unit=output_unit, fmt=
"(T2,A,T71,ES10.3)") &
2909 "xTB| tblite SCC mixer omega0:", xtb_control%tblite_mixer_omega0
2910 WRITE (unit=output_unit, fmt=
"(T2,A,T71,ES10.3)") &
2911 "xTB| tblite SCC mixer min weight:", xtb_control%tblite_mixer_min_weight
2912 WRITE (unit=output_unit, fmt=
"(T2,A,T71,ES10.3)") &
2913 "xTB| tblite SCC mixer max weight:", xtb_control%tblite_mixer_max_weight
2914 WRITE (unit=output_unit, fmt=
"(T2,A,T71,ES10.3)") &
2915 "xTB| tblite SCC mixer weight factor:", xtb_control%tblite_mixer_weight_factor
2916 WRITE (unit=output_unit, fmt=
"(/)")
2921 "PRINT%DFT_CONTROL_PARAMETERS")
2923 CALL timestop(handle)
2925 END SUBROUTINE write_xtb_control
2936 CHARACTER(len=*),
PARAMETER :: routinen =
'write_qs_control'
2938 CHARACTER(len=20) :: method, quadrature
2939 INTEGER :: handle, i, igrid_level, ngrid_level, &
2948 IF (qs_control%semi_empirical)
RETURN
2949 IF (qs_control%dftb)
RETURN
2950 IF (qs_control%xtb)
RETURN
2951 CALL timeset(routinen, handle)
2952 NULLIFY (logger, print_section_vals, qs_section, qs_section_vals)
2958 NULLIFY (enum, keyword)
2961 method = trim(
enum_i2c(enum, qs_control%method_id))
2963 NULLIFY (enum, keyword)
2966 quadrature = trim(
enum_i2c(enum, qs_control%gapw_control%quadrature))
2969 "DFT_CONTROL_PARAMETERS", extension=
".Log")
2970 IF (output_unit > 0)
THEN
2971 ngrid_level =
SIZE(qs_control%e_cutoff)
2972 WRITE (unit=output_unit, fmt=
"(/,T2,A,T61,A20)") &
2973 "QS| Method:", adjustr(method)
2974 IF (qs_control%pw_grid_opt%spherical)
THEN
2975 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A)") &
2976 "QS| Density plane wave grid type",
" SPHERICAL HALFSPACE"
2977 ELSE IF (qs_control%pw_grid_opt%fullspace)
THEN
2978 WRITE (unit=output_unit, fmt=
"(T2,A,T57,A)") &
2979 "QS| Density plane wave grid type",
" NON-SPHERICAL FULLSPACE"
2981 WRITE (unit=output_unit, fmt=
"(T2,A,T57,A)") &
2982 "QS| Density plane wave grid type",
" NON-SPHERICAL HALFSPACE"
2984 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2985 "QS| Number of grid levels:",
SIZE(qs_control%e_cutoff)
2986 IF (ngrid_level == 1)
THEN
2987 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
2988 "QS| Density cutoff [a.u.]:", qs_control%e_cutoff(1)
2990 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
2991 "QS| Density cutoff [a.u.]:", qs_control%cutoff
2992 IF (qs_control%commensurate_mgrids)
THEN
2993 WRITE (unit=output_unit, fmt=
"(T2,A)")
"QS| Using commensurate multigrids"
2995 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
2996 "QS| Multi grid cutoff [a.u.]: 1) grid level", qs_control%e_cutoff(1)
2997 WRITE (unit=output_unit, fmt=
"(T2,A,I3,A,T71,F10.1)") &
2998 (
"QS| ", igrid_level,
") grid level", &
2999 qs_control%e_cutoff(igrid_level), &
3000 igrid_level=2,
SIZE(qs_control%e_cutoff))
3002 IF (qs_control%pao)
THEN
3003 WRITE (unit=output_unit, fmt=
"(T2,A)")
"QS| PAO active"
3005 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
3006 "QS| Grid level progression factor:", qs_control%progression_factor
3007 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
3008 "QS| Relative density cutoff [a.u.]:", qs_control%relative_cutoff
3009 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
3010 "QS| Interaction thresholds: eps_pgf_orb:", &
3011 qs_control%eps_pgf_orb, &
3012 "QS| eps_filter_matrix:", &
3013 qs_control%eps_filter_matrix, &
3014 "QS| eps_core_charge:", &
3015 qs_control%eps_core_charge, &
3016 "QS| eps_rho_gspace:", &
3017 qs_control%eps_rho_gspace, &
3018 "QS| eps_rho_rspace:", &
3019 qs_control%eps_rho_rspace, &
3020 "QS| eps_gvg_rspace:", &
3021 qs_control%eps_gvg_rspace, &
3023 qs_control%eps_ppl, &
3026 IF (qs_control%gapw)
THEN
3027 IF (qs_control%gapw_control%accurate_xcint)
THEN
3028 WRITE (unit=output_unit, fmt=
"(T2,A,T69,F12.6)") &
3029 "QS| GAPW| XC integration using accurate scheme: Ref. exponent =", &
3030 qs_control%gapw_control%aweights
3033 SELECT CASE (qs_control%gapw_control%basis_1c)
3035 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3036 "QS| GAPW| One center basis from orbital basis primitives"
3038 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3039 "QS| GAPW| One center basis extended with primitives (small:s)"
3041 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3042 "QS| GAPW| One center basis extended with primitives (medium:sp)"
3044 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3045 "QS| GAPW| One center basis extended with primitives (large:spd)"
3047 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3048 "QS| GAPW| One center basis extended with primitives (very large:spdf)"
3050 cpabort(
"basis_1c incorrect")
3052 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
3053 "QS| GAPW| eps_fit:", &
3054 qs_control%gapw_control%eps_fit, &
3055 "QS| GAPW| eps_iso:", &
3056 qs_control%gapw_control%eps_iso, &
3057 "QS| GAPW| eps_svd:", &
3058 qs_control%gapw_control%eps_svd, &
3059 "QS| GAPW| eps_cpc:", &
3060 qs_control%gapw_control%eps_cpc
3061 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
3062 "QS| GAPW| atom-r-grid: quadrature:", &
3064 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
3065 "QS| GAPW| atom-s-grid: max l :", &
3066 qs_control%gapw_control%lmax_sphere, &
3067 "QS| GAPW| max_l_rho0 :", &
3068 qs_control%gapw_control%lmax_rho0
3069 IF (qs_control%gapw_control%non_paw_atoms)
THEN
3070 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3071 "QS| GAPW| At least one kind is NOT PAW, i.e. it has only soft AO "
3073 IF (qs_control%gapw_control%nopaw_as_gpw)
THEN
3074 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3075 "QS| GAPW| The NOT PAW atoms are treated fully GPW"
3078 IF (qs_control%gapw_xc)
THEN
3079 SELECT CASE (qs_control%gapw_control%basis_1c)
3081 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3082 "QS| GAPW_XC| One center basis from orbital basis primitives"
3084 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3085 "QS| GAPW_XC| One center basis extended with primitives (small:s)"
3087 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3088 "QS| GAPW_XC| One center basis extended with primitives (medium:sp)"
3090 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3091 "QS| GAPW_XC| One center basis extended with primitives (large:spd)"
3093 WRITE (unit=output_unit, fmt=
"(T2,A)") &
3094 "QS| GAPW_XC| One center basis extended with primitives (very large:spdf)"
3096 cpabort(
"basis_1c incorrect")
3098 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
3099 "QS| GAPW_XC| eps_fit:", &
3100 qs_control%gapw_control%eps_fit, &
3101 "QS| GAPW_XC| eps_iso:", &
3102 qs_control%gapw_control%eps_iso, &
3103 "QS| GAPW_XC| eps_svd:", &
3104 qs_control%gapw_control%eps_svd
3105 WRITE (unit=output_unit, fmt=
"(T2,A,T55,A30)") &
3106 "QS| GAPW_XC|atom-r-grid: quadrature:", &
3107 enum_i2c(enum, qs_control%gapw_control%quadrature)
3108 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
3109 "QS| GAPW_XC| atom-s-grid: max l :", &
3110 qs_control%gapw_control%lmax_sphere
3112 IF (qs_control%mulliken_restraint)
THEN
3113 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
3114 "QS| Mulliken restraint target", qs_control%mulliken_restraint_control%target
3115 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
3116 "QS| Mulliken restraint strength", qs_control%mulliken_restraint_control%strength
3117 WRITE (unit=output_unit, fmt=
"(T2,A,T73,I8)") &
3118 "QS| Mulliken restraint atoms: ", qs_control%mulliken_restraint_control%natoms
3119 WRITE (unit=output_unit, fmt=
"(5I8)") qs_control%mulliken_restraint_control%atoms
3121 IF (qs_control%ddapc_restraint)
THEN
3122 DO i = 1,
SIZE(qs_control%ddapc_restraint_control)
3123 ddapc_restraint_control => qs_control%ddapc_restraint_control(i)
3124 IF (
SIZE(qs_control%ddapc_restraint_control) > 1)
THEN
3125 WRITE (unit=output_unit, fmt=
"(T2,A,T3,I8)") &
3126 "QS| parameters for DDAPC restraint number", i
3128 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
3129 "QS| ddapc restraint target", ddapc_restraint_control%target
3130 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
3131 "QS| ddapc restraint strength", ddapc_restraint_control%strength
3132 WRITE (unit=output_unit, fmt=
"(T2,A,T73,I8)") &
3133 "QS| ddapc restraint atoms: ", ddapc_restraint_control%natoms
3134 WRITE (unit=output_unit, fmt=
"(5I8)") ddapc_restraint_control%atoms
3135 WRITE (unit=output_unit, fmt=
"(T2,A)")
"Coefficients:"
3136 WRITE (unit=output_unit, fmt=
"(5F6.2)") ddapc_restraint_control%coeff
3137 SELECT CASE (ddapc_restraint_control%functional_form)
3139 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
3140 "QS| ddapc restraint functional form :",
"RESTRAINT"
3142 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
3143 "QS| ddapc restraint functional form :",
"CONSTRAINT"
3145 cpabort(
"Unknown ddapc restraint")
3149 IF (qs_control%s2_restraint)
THEN
3150 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
3151 "QS| s2 restraint target", qs_control%s2_restraint_control%target
3152 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
3153 "QS| s2 restraint strength", qs_control%s2_restraint_control%strength
3154 SELECT CASE (qs_control%s2_restraint_control%functional_form)
3156 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
3157 "QS| s2 restraint functional form :",
"RESTRAINT"
3158 cpabort(
"Not yet implemented")
3160 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
3161 "QS| s2 restraint functional form :",
"CONSTRAINT"
3163 cpabort(
"Unknown ddapc restraint")
3168 "DFT_CONTROL_PARAMETERS")
3170 CALL timestop(handle)
3188 TYPE(
section_vals_type),
OPTIONAL,
POINTER :: qs_section, ddapc_restraint_section
3190 INTEGER :: i, j, jj, k, n_rep
3191 INTEGER,
DIMENSION(:),
POINTER :: tmplist
3192 REAL(kind=
dp),
DIMENSION(:),
POINTER :: rtmplist
3196 IF (
PRESENT(ddapc_restraint_section))
THEN
3197 IF (
ASSOCIATED(qs_control%ddapc_restraint_control))
THEN
3198 IF (
SIZE(qs_control%ddapc_restraint_control) >= 2)
THEN
3199 cpabort(
"ET_COUPLING cannot be used in combination with a normal restraint")
3202 ddapc_section => ddapc_restraint_section
3203 ALLOCATE (qs_control%ddapc_restraint_control(1))
3207 IF (
PRESENT(qs_section))
THEN
3208 NULLIFY (ddapc_section)
3213 DO i = 1,
SIZE(qs_control%ddapc_restraint_control)
3216 ddapc_restraint_control => qs_control%ddapc_restraint_control(i)
3219 r_val=ddapc_restraint_control%strength)
3221 r_val=ddapc_restraint_control%target)
3223 i_val=ddapc_restraint_control%functional_form)
3227 i_val=ddapc_restraint_control%density_type)
3232 i_rep_val=k, i_vals=tmplist)
3233 DO j = 1,
SIZE(tmplist)
3237 IF (jj < 1) cpabort(
"Need at least 1 atom to use ddapc constraints")
3238 ddapc_restraint_control%natoms = jj
3239 IF (
ASSOCIATED(ddapc_restraint_control%atoms))
THEN
3240 DEALLOCATE (ddapc_restraint_control%atoms)
3242 ALLOCATE (ddapc_restraint_control%atoms(ddapc_restraint_control%natoms))
3246 i_rep_val=k, i_vals=tmplist)
3247 DO j = 1,
SIZE(tmplist)
3249 ddapc_restraint_control%atoms(jj) = tmplist(j)
3253 IF (
ASSOCIATED(ddapc_restraint_control%coeff))
THEN
3254 DEALLOCATE (ddapc_restraint_control%coeff)
3256 ALLOCATE (ddapc_restraint_control%coeff(ddapc_restraint_control%natoms))
3257 ddapc_restraint_control%coeff = 1.0_dp
3264 i_rep_val=k, r_vals=rtmplist)
3265 DO j = 1,
SIZE(rtmplist)
3267 IF (jj > ddapc_restraint_control%natoms)
THEN
3268 cpabort(
"Need the same number of coeff as there are atoms ")
3270 ddapc_restraint_control%coeff(jj) = rtmplist(j)
3273 IF (jj < ddapc_restraint_control%natoms .AND. jj /= 0)
THEN
3274 cpabort(
"Need no or the same number of coeff as there are atoms.")
3278 DO i = 1,
SIZE(qs_control%ddapc_restraint_control)
3279 IF (qs_control%ddapc_restraint_control(i)%functional_form == &
3282 IF (k == 2)
CALL cp_abort(__location__, &
3283 "Only a single constraint possible yet, try to use restraints instead ")
3293 SUBROUTINE read_efield_sections(dft_control, efield_section, cell)
3296 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell
3298 CHARACTER(len=default_path_length) :: file_name
3299 INTEGER :: i, io, j, n, unit_nr
3300 LOGICAL :: amplitude_explicit, intensity_explicit
3301 REAL(kind=
dp),
DIMENSION(:),
POINTER :: tmp_vals
3305 DO i = 1,
SIZE(dft_control%efield_fields)
3306 NULLIFY (dft_control%efield_fields(i)%efield)
3307 ALLOCATE (dft_control%efield_fields(i)%efield)
3308 efield => dft_control%efield_fields(i)%efield
3309 NULLIFY (efield%envelop_i_vars, efield%envelop_r_vars)
3311 r_val=efield%strength, explicit=intensity_explicit)
3313 r_val=efield%amplitude, explicit=amplitude_explicit)
3315 IF (intensity_explicit .AND. amplitude_explicit)
THEN
3316 cpabort(
"Both INTENSITY and AMPLITUDE provided in EFIELD section.")
3319 IF (intensity_explicit)
THEN
3320 efield%amplitude = sqrt(efield%strength/(3.50944_dp*10.0_dp**16))
3323 IF (amplitude_explicit)
THEN
3324 efield%strength = (3.50944_dp*10.0_dp**16)*(efield%amplitude)**2
3329 ALLOCATE (efield%polarisation(
SIZE(tmp_vals)))
3330 efield%polarisation = tmp_vals
3331 IF (
PRESENT(cell))
THEN
3335 r_val=efield%phase_offset)
3337 i_val=efield%envelop_id)
3339 r_val=efield%wavelength)
3342 efield%vec_pot_initial = tmp_vals
3343 IF (
PRESENT(cell))
THEN
3348 ALLOCATE (efield%envelop_i_vars(2))
3351 i_val=efield%envelop_i_vars(1))
3353 i_val=efield%envelop_i_vars(2))
3355 ALLOCATE (efield%envelop_r_vars(2))
3358 r_val=efield%envelop_r_vars(1))
3360 r_val=efield%envelop_r_vars(2))
3361 ELSE IF (efield%envelop_id ==
ramp_env)
THEN
3362 ALLOCATE (efield%envelop_i_vars(4))
3365 i_val=efield%envelop_i_vars(1))
3367 i_val=efield%envelop_i_vars(2))
3369 i_val=efield%envelop_i_vars(3))
3371 i_val=efield%envelop_i_vars(4))
3372 ELSE IF (efield%envelop_id ==
custom_env)
THEN
3375 CALL open_file(file_name=trim(file_name), file_action=
"READ", file_status=
"OLD", unit_number=unit_nr)
3379 READ (unit_nr, *, iostat=io)
3384 ALLOCATE (efield%envelop_r_vars(n + 1))
3389 READ (unit_nr, *) efield%envelop_r_vars(j)
3390 efield%envelop_r_vars(j) =
cp_unit_to_cp2k(efield%envelop_r_vars(j),
"volt/m")
3395 END SUBROUTINE read_efield_sections
3403 SUBROUTINE read_rtp_section(dft_control, rtp_section)
3408 INTEGER :: i, j, n_elems
3409 INTEGER,
DIMENSION(:),
POINTER :: tmp
3410 LOGICAL :: is_present, linearize_bse_propagation, &
3411 local_moment_possible
3414 ALLOCATE (dft_control%rtp_control)
3416 i_val=dft_control%rtp_control%max_iter)
3418 i_val=dft_control%rtp_control%mat_exp)
3420 i_val=dft_control%rtp_control%aspc_order)
3422 r_val=dft_control%rtp_control%eps_exp)
3424 i_val=dft_control%rtp_control%rtp_method)
3426 i_val=dft_control%rtp_control%rtbse_ham)
3428 l_val=linearize_bse_propagation)
3432 IF (linearize_bse_propagation)
THEN
3434 CALL cp_abort(__location__, &
3435 "LINEARIZED_BSE_PROPAGATION requires the RTBSE section opened as "// &
3436 "'&RTBSE' or '&RTBSE RTBSE', not '&RTBSE TDDFT'.")
3442 i_val=dft_control%rtp_control%propagator)
3444 r_val=dft_control%rtp_control%eps_ener)
3446 i_val=dft_control%rtp_control%initial_wfn)
3448 l_val=dft_control%rtp_control%hfx_redistribute)
3450 l_val=dft_control%rtp_control%apply_wfn_mix_init_restart)
3452 l_val=dft_control%rtp_control%apply_delta_pulse)
3454 l_val=dft_control%rtp_control%apply_delta_pulse_mag)
3456 l_val=dft_control%rtp_control%velocity_gauge)
3458 l_val=dft_control%rtp_control%nl_gauge_transform)
3460 l_val=dft_control%rtp_control%periodic)
3462 l_val=dft_control%rtp_control%linear_scaling)
3464 i_val=dft_control%rtp_control%mcweeny_max_iter)
3466 i_val=dft_control%rtp_control%acc_ref)
3468 r_val=dft_control%rtp_control%mcweeny_eps)
3470 r_val=dft_control%rtp_control%delta_pulse_scale)
3473 dft_control%rtp_control%delta_pulse_direction = tmp
3475 i_val=dft_control%rtp_control%sc_check_start)
3478 IF (is_present)
THEN
3479 IF (dft_control%rtp_control%linear_scaling)
THEN
3480 CALL cp_abort(__location__, &
3481 "You have defined a time dependent projection of mos, but "// &
3482 "only the density matrix is propagated (DENSITY_PROPAGATION "// &
3483 ".TRUE.). Please either use MO-based real time DFT or do not "// &
3484 "define any PRINT%PROJECTION_MO section")
3486 dft_control%rtp_control%is_proj_mo = .true.
3488 dft_control%rtp_control%is_proj_mo = .false.
3491 local_moment_possible = (dft_control%rtp_control%rtp_method ==
rtp_method_bse .OR. &
3493 ((.NOT. dft_control%rtp_control%periodic) .AND. dft_control%rtp_control%linear_scaling)
3498 dft_control%rtp_control%save_local_moments = &
3499 is_present .OR. dft_control%rtp_control%save_local_moments
3500 IF (is_present .AND. (.NOT. local_moment_possible))
THEN
3501 CALL cp_abort(__location__,
"Moments trace printing only "// &
3502 "implemented in non-periodic systems in linear scaling. "// &
3503 "Please use DFT%PRINT%MOMENTS for other printing.")
3506 i_val=dft_control%rtp_control%moment_trace_ref_type)
3508 r_vals=dft_control%rtp_control%moment_trace_user_ref_point)
3513 dft_control%rtp_control%save_local_moments = &
3514 is_present .OR. dft_control%rtp_control%save_local_moments
3515 IF (is_present .AND. (.NOT. local_moment_possible))
THEN
3517 CALL cp_abort(__location__,
"Moments Fourier transform printing "// &
3518 "implemented only for non-periodic systems in linear scaling.")
3522 r_val=dft_control%rtp_control%ft_damping)
3524 r_val=dft_control%rtp_control%ft_t0)
3528 l_val=dft_control%rtp_control%pade_requested)
3530 r_val=dft_control%rtp_control%pade_e_min)
3532 r_val=dft_control%rtp_control%pade_e_step)
3534 r_val=dft_control%rtp_control%pade_e_max)
3536 r_val=dft_control%rtp_control%pade_fit_e_min)
3538 r_val=dft_control%rtp_control%pade_fit_e_max)
3540 IF (dft_control%rtp_control%pade_fit_e_min < 0)
THEN
3541 dft_control%rtp_control%pade_fit_e_min = dft_control%rtp_control%pade_e_min
3543 IF (dft_control%rtp_control%pade_fit_e_max < 0)
THEN
3544 dft_control%rtp_control%pade_fit_e_max = dft_control%rtp_control%pade_e_max
3550 dft_control%rtp_control%save_local_moments = &
3551 is_present .OR. dft_control%rtp_control%save_local_moments
3552 IF (is_present .AND. (.NOT. local_moment_possible))
THEN
3554 CALL cp_abort(__location__,
"Polarizability printing "// &
3555 "implemented only for non-periodic systems.")
3558 NULLIFY (dft_control%rtp_control%print_pol_elements)
3559 IF (is_present)
THEN
3562 ALLOCATE (dft_control%rtp_control%print_pol_elements(n_elems, 2))
3565 dft_control%rtp_control%print_pol_elements(i, :) = tmp(:)
3570 IF (dft_control%rtp_control%print_pol_elements(i, j) > 3 .OR. &
3571 dft_control%rtp_control%print_pol_elements(i, j) < 1)
THEN
3572 cpabort(
"Polarisation tensor element not 1,2 or 3 in at least one index")
3580 dft_control%rtp_control%save_local_moments = &
3581 dft_control%rtp_control%save_local_moments .OR. &
3582 ((.NOT. dft_control%rtp_control%periodic) .AND. dft_control%rtp_control%linear_scaling)
3584 END SUBROUTINE read_rtp_section
3592 SUBROUTINE guess_pol_elements(dftc, elems)
3594 INTEGER,
DIMENSION(:, :),
POINTER :: elems
3596 INTEGER :: i, i_nonzero, n_nonzero
3597 LOGICAL :: pol_vector_known
3598 REAL(kind=
dp),
DIMENSION(3) :: pol_vector
3600 pol_vector_known = .false.
3603 IF (dftc%rtp_control%apply_delta_pulse .OR. dftc%rtp_control%apply_delta_pulse_mag)
THEN
3604 pol_vector(:) = real(dftc%rtp_control%delta_pulse_direction(:), kind=
dp)
3607 pol_vector(:) = dftc%efield_fields(1)%efield%polarisation(:)
3609 IF (dot_product(pol_vector, pol_vector) > 0.0_dp) pol_vector_known = .true.
3611 IF (.NOT. pol_vector_known)
THEN
3612 cpabort(
"Cannot guess polarization elements - please specify!")
3617 IF (pol_vector(i) /= 0.0_dp)
THEN
3618 n_nonzero = n_nonzero + 1
3622 IF (n_nonzero > 1)
THEN
3623 CALL cp_abort(__location__, &
3624 "More than one non-zero field elements - "// &
3625 "cannot guess polarizability elements - please specify!")
3626 ELSE IF (n_nonzero == 0)
THEN
3627 CALL cp_abort(__location__, &
3628 "No non-zero field elements - "// &
3629 "cannot guess polarizability elements - please specify!")
3633 ALLOCATE (elems(3, 2))
3636 elems(i, 2) = i_nonzero
3640 END SUBROUTINE guess_pol_elements
3647 SUBROUTINE read_admm_block_list(admm_control, dft_section)
3651 INTEGER :: irep, list_size, n_rep
3652 INTEGER,
DIMENSION(:),
POINTER :: tmplist
3659 ALLOCATE (admm_control%blocks(n_rep))
3663 i_rep_val=irep, i_vals=tmplist)
3664 list_size =
SIZE(tmplist)
3665 ALLOCATE (admm_control%blocks(irep)%list(list_size))
3666 admm_control%blocks(irep)%list(:) = tmplist(:)
3669 END SUBROUTINE read_admm_block_list
3678 SUBROUTINE read_hairy_probes_sections(dft_control, hairy_probes_section)
3682 INTEGER :: i, j, jj, kk, n_rep
3683 INTEGER,
DIMENSION(:),
POINTER :: tmplist
3685 DO i = 1,
SIZE(dft_control%probe)
3686 NULLIFY (dft_control%probe(i)%atom_ids)
3691 CALL section_vals_val_get(hairy_probes_section,
"ATOM_IDS", i_rep_section=i, i_rep_val=kk, i_vals=tmplist)
3692 jj = jj +
SIZE(tmplist)
3695 dft_control%probe(i)%natoms = jj
3696 IF (dft_control%probe(i)%natoms < 1)
THEN
3697 cpabort(
"Need at least 1 atom to use hair probes formalism")
3699 ALLOCATE (dft_control%probe(i)%atom_ids(dft_control%probe(i)%natoms))
3703 CALL section_vals_val_get(hairy_probes_section,
"ATOM_IDS", i_rep_section=i, i_rep_val=kk, i_vals=tmplist)
3704 DO j = 1,
SIZE(tmplist)
3706 dft_control%probe(i)%atom_ids(jj) = tmplist(j)
3710 CALL section_vals_val_get(hairy_probes_section,
"MU", i_rep_section=i, r_val=dft_control%probe(i)%mu)
3712 CALL section_vals_val_get(hairy_probes_section,
"T", i_rep_section=i, r_val=dft_control%probe(i)%T)
3714 CALL section_vals_val_get(hairy_probes_section,
"ALPHA", i_rep_section=i, r_val=dft_control%probe(i)%alpha)
3716 CALL section_vals_val_get(hairy_probes_section,
"eps_hp", i_rep_section=i, r_val=dft_control%probe(i)%eps_hp)
3719 END SUBROUTINE read_hairy_probes_sections
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public vandevondele2005b
integer, save, public umari2002
integer, save, public katbashev2025
integer, save, public yin2017
integer, save, public stewart2007
integer, save, public stengel2009
integer, save, public vandevondele2005a
integer, save, public andreussi2019
integer, save, public grimme2017
integer, save, public lippert1999
integer, save, public dewar1977
integer, save, public elstner1998
integer, save, public vanvoorhis2015
integer, save, public repasky2002
integer, save, public hu2007
integer, save, public andreussi2012
integer, save, public rocha2006
integer, save, public lippert1997
integer, save, public chai2025a
integer, save, public fattebert2002
integer, save, public thiel1992
integer, save, public pracht2019
integer, save, public porezag1995
integer, save, public souza2002
integer, save, public schenter2008
integer, save, public krack2000
integer, save, public dewar1985
integer, save, public stewart1989
integer, save, public seifert1996
integer, save, public zhechkov2005
Handles all functions related to the CELL.
subroutine, public cell_transform_input_cartesian(cell, vector)
Transform a Cartesian real-space vector from the user input cell frame into CP2K's canonical internal...
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dft_control_create(dft_control)
allocates and perform a very basic initialization
subroutine, public expot_control_create(expot_control)
...
subroutine, public maxwell_control_create(maxwell_control)
...
subroutine, public ddapc_control_create(ddapc_restraint_control)
create the ddapc_restraint_type
subroutine, public admm_control_create(admm_control)
...
Utilities to set up the control types.
subroutine, public write_qs_control(qs_control, dft_section)
Purpose: Write the QS control parameters to the output unit.
subroutine, public read_rixs_control(rixs_control, rixs_section, qs_control)
Reads the input and stores in the rixs_control_type.
subroutine, public read_qs_section(qs_control, qs_section, cell)
...
subroutine, public read_tddfpt2_control(t_control, t_section, qs_control)
Read TDDFPT-related input parameters.
subroutine, public read_dft_control(dft_control, dft_section, cell)
...
subroutine, public write_admm_control(admm_control, dft_section)
Write the ADMM control parameters to the output unit.
subroutine, public write_dft_control(dft_control, dft_section)
Write the DFT control parameters to the output unit.
subroutine, public read_ddapc_section(qs_control, qs_section, ddapc_restraint_section)
reads the input parameters needed for ddapc.
subroutine, public read_mgrid_section(qs_control, dft_section)
...
Utility routines to open and close files. Tracking of preconnections.
subroutine, public open_file(file_name, file_status, file_form, file_action, file_position, file_pad, unit_number, debug, skip_get_unit_number, file_access)
Opens the requested file using a free unit number.
subroutine, public close_file(unit_number, file_status, keep_preconnection)
Close an open file given by its logical unit number. Optionally, keep the file and unit preconnected.
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.
subroutine, public parser_read_line(parser, nline, at_end)
Read the next line from a logical unit "unit" (I/O node only). Skip (nline-1) lines and skip also all...
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_reset(parser)
Resets the parser: rewinding the unit and re-initializing all parser structures.
subroutine, public parser_release(parser)
releases the parser
subroutine, public parser_create(parser, file_name, unit_nr, para_env, end_section_label, separator_chars, comment_char, continuation_char, quote_char, section_char, parse_white_lines, initial_variables, apply_preprocessing)
Start a parser run. Initial variables allow to @SET stuff before opening the file.
utils to manipulate splines on the regular grid of a pw
integer, parameter, public pw_interp
real(kind=dp) function, public cp_unit_from_cp2k(value, unit_str, defaults, power)
converts from the internal cp2k units to the given unit
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to 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
Definition of mathematical constants and functions.
real(kind=dp), parameter, public fourpi
subroutine, public pair_potential_reallocate(p, lb1_new, ub1_new, lj, lj_charmm, williams, goodwin, eam, nequip, bmhft, bmhftd, ipbv, buck4r, buckmo, gp, tersoff, siepmann, gal, gal21, tab, deepmd, ace)
Cleans the potential parameter type.
Periodic Table related data definitions.
subroutine, public get_ptable_info(symbol, number, amass, ielement, covalent_radius, metallic_radius, vdw_radius, found)
Pass information about the kind given the element symbol.
Utility subroutines for CDFT calculations.
subroutine, public read_cdft_control_section(qs_control, cdft_control_section)
reads the input parameters needed for CDFT with OT
Input control types for NEGF/SMEAGOL transport calculations.
subroutine, public read_smeagol_control(smeagol_control, smeagol_section)
Read SMEAGOL-related input parameters.
Utilities for string manipulations.
elemental subroutine, public uppercase(string)
Convert all lower case characters in a string to upper case.
All kind of helpful little routines.
Define XAS TDP control type and associated create, release, etc subroutines, as well as XAS TDP envir...
subroutine, public read_xas_tdp_control(xas_tdp_control, xas_tdp_section)
Reads the inputs and stores in xas_tdp_control_type.
Writes information on XC functionals to output.
subroutine, public xc_write(iounit, xc_section, lsd)
...
Exchange and Correlation functional calculations.
logical function, public xc_uses_norm_drho(xc_fun_section, lsd)
...
logical function, public xc_uses_kinetic_energy_density(xc_fun_section, lsd)
...
Type defining parameters related to the simulation cell.
type of a logger, at the moment it contains just a print level starting at which level it should be l...