87#include "./base/base_uses.f90"
93 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'cp_control_utils'
115 CHARACTER(len=default_path_length) :: basis_set_file_name, &
116 intensities_file_name, &
118 CHARACTER(LEN=default_string_length), &
119 DIMENSION(:),
POINTER :: tmpstringlist
120 INTEGER :: admmtype, irep, isize, kg_tnadd_method, &
121 method_id, nrep, xc_deriv_method_id
122 LOGICAL :: at_end, do_hfx, do_ot, do_rpa_admm, do_rtp, exopt1, exopt2, exopt3, explicit, &
123 is_present, l_param, local_moment_possible, not_se, was_present
124 REAL(kind=
dp) :: density_cut, gradient_cut, tau_cut
125 REAL(kind=
dp),
DIMENSION(:),
POINTER :: pol
128 TYPE(
section_vals_type),
POINTER :: hairy_probes_section, hfx_section, kg_xc_fun_section, &
129 kg_xc_section, maxwell_section, sccs_section, scf_section, tmp_section, xc_fun_section, &
132 was_present = .false.
136 NULLIFY (kg_xc_fun_section, kg_xc_section, tmp_section, xc_fun_section, xc_section)
137 ALLOCATE (dft_control)
143 SELECT CASE (method_id)
151 IF (.NOT. is_present .AND. not_se)
THEN
152 cpabort(
"XC section missing.")
159 IF (density_cut <= epsilon(0.0_dp)*100.0_dp) &
160 CALL cp_warn(__location__, &
161 "DENSITY_CUTOFF lower than 100*EPSILON, where EPSILON is the machine precision. "// &
162 "This may lead to numerical problems. Setting up shake_tol to 100*EPSILON! ")
163 density_cut = max(epsilon(0.0_dp)*100.0_dp, density_cut)
164 IF (gradient_cut <= epsilon(0.0_dp)*100.0_dp) &
165 CALL cp_warn(__location__, &
166 "GRADIENT_CUTOFF lower than 100*EPSILON, where EPSILON is the machine precision. "// &
167 "This may lead to numerical problems. Setting up shake_tol to 100*EPSILON! ")
168 gradient_cut = max(epsilon(0.0_dp)*100.0_dp, gradient_cut)
169 IF (tau_cut <= epsilon(0.0_dp)*100.0_dp) &
170 CALL cp_warn(__location__, &
171 "TAU_CUTOFF lower than 100*EPSILON, where EPSILON is the machine precision. "// &
172 "This may lead to numerical problems. Setting up shake_tol to 100*EPSILON! ")
173 tau_cut = max(epsilon(0.0_dp)*100.0_dp, tau_cut)
180 IF (.NOT. is_present .AND. not_se)
THEN
181 cpabort(
"XC_FUNCTIONAL section missing.")
186 IF (dft_control%uks .OR. dft_control%roks)
THEN
187 dft_control%nspins = 2
189 dft_control%nspins = 1
192 dft_control%lsd = (dft_control%nspins > 1)
203 dft_control%use_kinetic_energy_density = dft_control%use_kinetic_energy_density .OR. &
211 dft_control%drho_by_collocation = (
xc_uses_norm_drho(xc_fun_section, dft_control%lsd) &
213 IF (dft_control%drho_by_collocation)
THEN
214 cpabort(
"derivatives by collocation not implemented")
221 IF (
SIZE(tmpstringlist) == 2)
THEN
223 SELECT CASE (tmpstringlist(2))
235 cpwarn(
"Unknown basis size in AUTO_BASIS keyword:"//trim(tmpstringlist(1)))
238 SELECT CASE (tmpstringlist(1))
241 dft_control%auto_basis_ri_aux = isize
243 dft_control%auto_basis_aux_fit = isize
245 dft_control%auto_basis_lri_aux = isize
247 dft_control%auto_basis_p_lri_aux = isize
249 dft_control%auto_basis_ri_hxc = isize
251 dft_control%auto_basis_ri_xas = isize
253 dft_control%auto_basis_ri_hfx = isize
255 cpwarn(
"Unknown basis type in AUTO_BASIS keyword:"//trim(tmpstringlist(1)))
258 CALL cp_abort(__location__, &
259 "AUTO_BASIS keyword in &DFT section has a wrong number of arguments.")
270 is_present = is_present .AND. (do_hfx .OR. do_rpa_admm)
272 dft_control%do_admm = is_present
273 dft_control%do_admm_mo = .false.
274 dft_control%do_admm_dm = .false.
280 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%ADMM_TYPE", i_val=admmtype)
281 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%ADMM_PURIFICATION_METHOD", explicit=exopt1)
282 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%METHOD", explicit=exopt2)
283 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%EXCH_SCALING_MODEL", explicit=exopt3)
284 dft_control%admm_control%admm_type = admmtype
285 SELECT CASE (admmtype)
287 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%ADMM_PURIFICATION_METHOD", i_val=method_id)
288 dft_control%admm_control%purification_method = method_id
289 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%METHOD", i_val=method_id)
290 dft_control%admm_control%method = method_id
291 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%EXCH_SCALING_MODEL", i_val=method_id)
292 dft_control%admm_control%scaling_model = method_id
297 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%ADMM_PURIFICATION_METHOD", i_val=method_id)
298 dft_control%admm_control%purification_method = method_id
330 CALL cp_abort(__location__, &
331 "ADMM_TYPE keyword in &AUXILIARY_DENSITY_MATRIX_METHOD section has a wrong value.")
335 r_val=dft_control%admm_control%eps_filter)
337 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%EXCH_CORRECTION_FUNC", i_val=method_id)
338 dft_control%admm_control%aux_exch_func = method_id
341 dft_control%admm_control%aux_exch_func_param = .false.
342 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%OPTX_A1", explicit=explicit, &
343 r_val=dft_control%admm_control%aux_x_param(1))
344 IF (explicit) dft_control%admm_control%aux_exch_func_param = .true.
345 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%OPTX_A2", explicit=explicit, &
346 r_val=dft_control%admm_control%aux_x_param(2))
347 IF (explicit) dft_control%admm_control%aux_exch_func_param = .true.
348 CALL section_vals_val_get(dft_section,
"AUXILIARY_DENSITY_MATRIX_METHOD%OPTX_GAMMA", explicit=explicit, &
349 r_val=dft_control%admm_control%aux_x_param(3))
350 IF (explicit) dft_control%admm_control%aux_exch_func_param = .true.
352 CALL read_admm_block_list(dft_control%admm_control, dft_section)
355 SELECT CASE (admmtype)
357 IF (exopt2)
CALL cp_warn(__location__, &
358 "Value of ADMM_PURIFICATION_METHOD keyword will be overwritten with ADMM_TYPE selections.")
359 IF (exopt3)
CALL cp_warn(__location__, &
360 "Value of EXCH_SCALING_MODEL keyword will be overwritten with ADMM_TYPE selections.")
362 IF (exopt1)
CALL cp_warn(__location__, &
363 "Value of METHOD keyword will be overwritten with ADMM_TYPE selections.")
364 IF (exopt2)
CALL cp_warn(__location__, &
365 "Value of METHOD keyword will be overwritten with ADMM_TYPE selections.")
366 IF (exopt3)
CALL cp_warn(__location__, &
367 "Value of EXCH_SCALING_MODEL keyword will be overwritten with ADMM_TYPE selections.")
376 cpabort(
"ADMM: Blocking and Merlot scaling are mutually exclusive.")
381 CALL cp_abort(__location__, &
382 "ADMM: In the case of METHOD=CHARGE_CONSTRAINED_PROJECTION, "// &
383 "ADMM_PURIFICATION_METHOD=NONE has to be set.")
389 cpabort(
"ADMM: Chosen purification requires BASIS_PROJECTION")
391 IF (.NOT. do_ot) cpabort(
"ADMM: MO-based purification requires OT.")
396 dft_control%do_admm_dm = .true.
398 dft_control%do_admm_mo = .true.
406 dft_control%restricted = (dft_control%roks .AND. l_param)
410 CALL section_vals_val_get(dft_section,
"RELAX_MULTIPLICITY", r_val=dft_control%relax_multiplicity)
411 IF (dft_control%relax_multiplicity > 0.0_dp)
THEN
412 IF (.NOT. dft_control%uks) &
413 CALL cp_abort(__location__,
"The option RELAX_MULTIPLICITY is only valid for "// &
414 "unrestricted Kohn-Sham (UKS) calculations")
419 CALL section_vals_get(hairy_probes_section, n_repetition=nrep, explicit=is_present)
422 dft_control%hairy_probes = .true.
423 ALLOCATE (dft_control%probe(nrep))
424 CALL read_hairy_probes_sections(dft_control, hairy_probes_section)
431 dft_control%sic_method_id =
sic_none
432 dft_control%sic_scaling_a = 1.0_dp
433 dft_control%sic_scaling_b = 1.0_dp
436 dft_control%dft_plus_u = .false.
438 dft_control%plus_u_method_id = method_id
441 dft_control%smear = .false.
444 dft_control%correct_surf_dip = .false.
445 CALL section_vals_val_get(dft_section,
"SURFACE_DIPOLE_CORRECTION", l_val=dft_control%correct_surf_dip)
447 dft_control%pos_dir_surf_dip = -1.0_dp
451 dft_control%switch_surf_dip = .false.
452 dft_control%surf_dip_correct_switch = dft_control%correct_surf_dip
454 dft_control%correct_el_density_dip = .false.
455 CALL section_vals_val_get(dft_section,
"CORE_CORR_DIP", l_val=dft_control%correct_el_density_dip)
456 IF (dft_control%correct_el_density_dip)
THEN
457 IF (dft_control%correct_surf_dip)
THEN
460 dft_control%correct_el_density_dip = .false.
461 cpwarn(
"CORE_CORR_DIP keyword is activated only if SURFACE_DIPOLE_CORRECTION is TRUE")
466 c_val=basis_set_file_name)
468 c_val=potential_file_name)
473 i_val=dft_control%sic_method_id)
475 i_val=dft_control%sic_list_id)
477 r_val=dft_control%sic_scaling_a)
479 r_val=dft_control%sic_scaling_b)
485 CALL read_rtp_section(dft_control, tmp_section)
492 IF (dft_control%do_xas_calculation)
THEN
495 l_val=dft_control%do_xas_calculation)
499 CALL section_vals_get(tmp_section, explicit=dft_control%do_xas_tdp_calculation)
500 IF (dft_control%do_xas_tdp_calculation)
THEN
503 l_val=dft_control%do_xas_tdp_calculation)
507 dft_control%apply_efield = .false.
508 dft_control%apply_efield_field = .false.
509 dft_control%apply_vector_potential = .false.
513 ALLOCATE (dft_control%efield_fields(nrep))
514 CALL read_efield_sections(dft_control, tmp_section)
516 IF (.NOT. dft_control%rtp_control%velocity_gauge)
THEN
517 dft_control%apply_efield_field = .true.
519 dft_control%apply_vector_potential = .true.
521 dft_control%rtp_control%vec_pot = dft_control%efield_fields(1)%efield%vec_pot_initial
524 dft_control%apply_efield = .true.
533 local_moment_possible = (dft_control%rtp_control%rtp_method ==
rtp_method_bse) .OR. &
534 ((.NOT. dft_control%rtp_control%periodic) .AND. dft_control%rtp_control%linear_scaling)
535 IF (local_moment_possible .AND. (.NOT.
ASSOCIATED(dft_control%rtp_control%print_pol_elements)))
THEN
537 CALL guess_pol_elements(dft_control, &
538 dft_control%rtp_control%print_pol_elements)
544 CALL section_vals_get(tmp_section, explicit=dft_control%apply_period_efield)
545 IF (dft_control%apply_period_efield)
THEN
546 ALLOCATE (dft_control%period_efield)
548 dft_control%period_efield%polarisation(1:3) = pol(1:3)
550 dft_control%period_efield%d_filter(1:3) = pol(1:3)
552 r_val=dft_control%period_efield%strength)
553 dft_control%period_efield%displacement_field = .false.
555 l_val=dft_control%period_efield%displacement_field)
561 IF (
SIZE(pol) > 1 .OR. pol(1) /= 0.0_dp)
THEN
563 IF (dft_control%period_efield%strength /= 0.0_dp .OR. intensities_file_name /=
"")
THEN
564 CALL cp_abort(__location__,
"[PERIODIC FIELD] Only one of INTENSITY, INTENSITY_LIST "// &
565 "or INTENSITIES_FILE_NAME can be specified.")
568 ALLOCATE (dft_control%period_efield%strength_list(
SIZE(pol)))
569 dft_control%period_efield%strength_list(1:
SIZE(pol)) = pol(1:
SIZE(pol))
572 IF (intensities_file_name /=
"")
THEN
574 IF (dft_control%period_efield%strength /= 0.0_dp)
THEN
575 CALL cp_abort(__location__,
"[PERIODIC FIELD] Only one of INTENSITY, INTENSITY_LIST "// &
576 "or INTENSITIES_FILE_NAME can be specified.")
589 cpabort(
"[PERIODIC FIELD] No intensities found in INTENSITIES_FILE_NAME")
592 ALLOCATE (dft_control%period_efield%strength_list(nrep))
597 READ (parser%input_line, *) dft_control%period_efield%strength_list(irep)
604 i_val=dft_control%period_efield%start_frame)
606 i_val=dft_control%period_efield%end_frame)
608 IF (dft_control%period_efield%end_frame /= -1)
THEN
612 IF (dft_control%period_efield%start_frame > dft_control%period_efield%end_frame)
THEN
613 cpabort(
"[PERIODIC FIELD] START_FRAME > END_FRAME")
614 ELSE IF (dft_control%period_efield%start_frame < 1)
THEN
615 cpabort(
"[PERIODIC FIELD] START_FRAME < 1")
616 ELSE IF (mod(dft_control%period_efield%end_frame - &
617 dft_control%period_efield%start_frame + 1,
SIZE(pol)) /= 0)
THEN
618 CALL cp_abort(__location__, &
619 "[PERIODIC FIELD] Number of active frames must be a multiple of the number of intensities")
624 cpassert(.NOT. do_rtp)
625 IF (dft_control%period_efield%displacement_field)
THEN
635 CALL section_vals_get(tmp_section, explicit=dft_control%apply_external_potential)
636 IF (dft_control%apply_external_potential)
THEN
639 l_val=dft_control%expot_control%read_from_cube)
641 l_val=dft_control%expot_control%static)
643 r_val=dft_control%expot_control%scaling_factor)
648 dft_control%expot_control%maxwell_solver = .true.
652 r_val=dft_control%maxwell_control%real_test)
654 i_val=dft_control%maxwell_control%int_test)
656 l_val=dft_control%maxwell_control%log_test)
658 dft_control%expot_control%maxwell_solver = .false.
668 l_val=dft_control%do_sccs)
669 IF (dft_control%do_sccs)
THEN
670 ALLOCATE (dft_control%sccs_control)
672 r_val=dft_control%sccs_control%epsilon_solvent)
674 r_val=dft_control%sccs_control%alpha_solvent)
676 r_val=dft_control%sccs_control%beta_solvent)
678 r_val=dft_control%sccs_control%delta_rho)
680 i_val=dft_control%sccs_control%derivative_method)
682 i_val=dft_control%sccs_control%method_id)
684 r_val=dft_control%sccs_control%eps_sccs)
686 r_val=dft_control%sccs_control%eps_scf)
688 r_val=dft_control%sccs_control%gamma_solvent)
690 i_val=dft_control%sccs_control%max_iter)
692 r_val=dft_control%sccs_control%mixing)
693 SELECT CASE (dft_control%sccs_control%method_id)
697 r_val=dft_control%sccs_control%rho_max)
699 r_val=dft_control%sccs_control%rho_min)
700 IF (dft_control%sccs_control%rho_max < dft_control%sccs_control%rho_min)
THEN
701 CALL cp_abort(__location__, &
702 "The SCCS parameter RHO_MAX is smaller than RHO_MIN. "// &
703 "Please, check your input!")
709 r_val=dft_control%sccs_control%beta)
710 IF (dft_control%sccs_control%beta < 0.5_dp)
THEN
711 CALL cp_abort(__location__, &
712 "A value smaller than 0.5 for the SCCS parameter beta "// &
713 "causes numerical problems. Please, check your input!")
716 r_val=dft_control%sccs_control%rho_zero)
719 cpabort(
"Invalid SCCS model specified. Please, check your input!")
728 CALL section_vals_get(tmp_section, explicit=dft_control%apply_external_density)
776 CHARACTER(len=*),
PARAMETER :: routinen =
'read_mgrid_section'
778 INTEGER :: handle, igrid_level, ngrid_level
779 LOGICAL :: explicit, multigrid_set
781 REAL(
dp),
DIMENSION(:),
POINTER :: cutofflist
784 CALL timeset(routinen, handle)
786 NULLIFY (mgrid_section, cutofflist)
792 CALL section_vals_val_get(mgrid_section,
"PROGRESSION_FACTOR", r_val=qs_control%progression_factor)
797 l_val=qs_control%skip_load_balance_distributed)
800 IF (qs_control%semi_empirical .OR. qs_control%dftb .OR. qs_control%xtb)
THEN
802 multigrid_set = .false.
805 IF (.NOT. explicit) cutoff = 1.0_dp
808 ALLOCATE (qs_control%e_cutoff(ngrid_level))
809 qs_control%cutoff = cutoff
811 IF (multigrid_set)
THEN
813 IF (qs_control%commensurate_mgrids)
THEN
814 cpabort(
"Do not specify cutoffs for the commensurate grids (NYI)")
818 IF (
ASSOCIATED(cutofflist))
THEN
819 IF (
SIZE(cutofflist, 1) /= ngrid_level)
THEN
820 cpabort(
"Number of multi-grids requested and number of cutoff values do not match")
822 DO igrid_level = 1, ngrid_level
823 qs_control%e_cutoff(igrid_level) = cutofflist(igrid_level)
827 DO igrid_level = ngrid_level, 1, -1
828 IF (qs_control%cutoff <= qs_control%e_cutoff(igrid_level))
THEN
829 qs_control%cutoff = qs_control%e_cutoff(igrid_level)
833 IF (igrid_level == 1)
THEN
834 qs_control%cutoff = qs_control%e_cutoff(1)
838 IF (qs_control%commensurate_mgrids) qs_control%progression_factor = 4.0_dp
839 qs_control%e_cutoff(1) = qs_control%cutoff
840 DO igrid_level = 2, ngrid_level
841 qs_control%e_cutoff(igrid_level) = qs_control%e_cutoff(igrid_level - 1)/ &
842 qs_control%progression_factor
846 DO igrid_level = 2, ngrid_level
847 IF (qs_control%e_cutoff(igrid_level) > qs_control%e_cutoff(igrid_level - 1))
THEN
848 cpabort(
"The cutoff values for the multi-grids are not ordered from large to small")
849 ELSE IF (qs_control%e_cutoff(igrid_level) == qs_control%e_cutoff(igrid_level - 1))
THEN
850 cpabort(
"The same cutoff value was specified for two multi-grids")
853 CALL timestop(handle)
866 CHARACTER(len=*),
PARAMETER :: routinen =
'read_qs_section'
868 CHARACTER(LEN=default_string_length) :: cval
869 CHARACTER(LEN=default_string_length), &
870 DIMENSION(:),
POINTER :: clist
871 INTEGER :: handle, itmp, j, jj, k, n_rep, n_var, &
873 INTEGER,
DIMENSION(:),
POINTER :: tmplist
874 LOGICAL :: explicit, tblite_reference_cli, &
875 tblite_reference_cli_section, &
876 tblite_section_active, was_present
877 REAL(
dp) :: tmp, tmpsqrt, value
878 REAL(
dp),
POINTER :: scal(:)
879 TYPE(
section_vals_type),
POINTER :: cdft_control_section, ddapc_restraint_section, &
880 dftb_parameter, dftb_section, eeq_section, genpot_section, lri_optbas_section, &
881 mull_section, nonbonded_section, s2_restraint_section, se_section, xtb_parameter, &
882 xtb_section, xtb_tblite, xtb_tblite_ref_cli
884 CALL timeset(routinen, handle)
886 was_present = .false.
887 NULLIFY (mull_section, ddapc_restraint_section, s2_restraint_section, &
888 se_section, dftb_section, xtb_section, dftb_parameter, xtb_parameter, lri_optbas_section, &
889 cdft_control_section, genpot_section, eeq_section, xtb_tblite_ref_cli)
910 tmpsqrt = sqrt(
value)
913 qs_control%eps_core_charge =
value/100.0_dp
916 qs_control%eps_pgf_orb = tmpsqrt
917 qs_control%eps_kg_orb = qs_control%eps_pgf_orb
919 qs_control%eps_ppnl = qs_control%eps_pgf_orb/100.0_dp
921 qs_control%eps_ppl = 1.0e-2_dp
923 qs_control%gapw_control%eps_cpc =
value
925 qs_control%eps_rho_gspace =
value
926 qs_control%eps_rho_rspace =
value
928 qs_control%eps_gvg_rspace = tmpsqrt
945 qs_control%eps_kg_orb = sqrt(tmp)
958 qs_control%eps_rho_rspace = qs_control%eps_rho_gspace
982 qs_control%gapw_control%alpha0_hard_from_input = .false.
983 IF (qs_control%gapw_control%alpha0_hard /= 0.0_dp) qs_control%gapw_control%alpha0_hard_from_input = .true.
985 CALL section_vals_val_get(qs_section,
"MAX_RAD_LOCAL", r_val=qs_control%gapw_control%max_rad_local)
995 CALL section_vals_val_get(qs_section,
"CLUSTER_EMBED_SUBSYS", l_val=qs_control%cluster_embed_subsys)
996 CALL section_vals_val_get(qs_section,
"HIGH_LEVEL_EMBED_SUBSYS", l_val=qs_control%high_level_embed_subsys)
1007 IF (qs_control%gapw_control%basis_1c /=
gapw_1c_orb)
THEN
1008 qs_control%gapw_control%eps_svd = max(qs_control%gapw_control%eps_svd, 1.e-12_dp)
1011 CALL section_vals_val_get(qs_section,
"GAPW_ACCURATE_XCINT", l_val=qs_control%gapw_control%accurate_xcint)
1018 qs_control%pw_grid_opt%spherical = .true.
1019 qs_control%pw_grid_opt%fullspace = .false.
1021 qs_control%pw_grid_opt%spherical = .false.
1022 qs_control%pw_grid_opt%fullspace = .true.
1024 qs_control%pw_grid_opt%spherical = .false.
1025 qs_control%pw_grid_opt%fullspace = .false.
1030 qs_control%do_ppl_method = itmp
1033 qs_control%pw_grid_opt%distribution_layout = tmplist
1037 CALL section_vals_val_get(qs_section,
"EXTRAPOLATION", i_val=qs_control%wf_interpolation_method_nr)
1038 CALL section_vals_val_get(qs_section,
"EXTRAPOLATION_ORDER", i_val=qs_control%wf_extrapolation_order)
1042 qs_control%gapw = .false.
1043 qs_control%gapw_xc = .false.
1044 qs_control%gpw = .false.
1045 qs_control%pao = .false.
1046 qs_control%dftb = .false.
1047 qs_control%xtb = .false.
1048 qs_control%semi_empirical = .false.
1049 qs_control%ofgpw = .false.
1050 qs_control%lrigpw = .false.
1051 qs_control%rigpw = .false.
1052 SELECT CASE (qs_control%method_id)
1056 qs_control%gapw = .true.
1058 qs_control%gapw_xc = .true.
1062 qs_control%gpw = .true.
1064 qs_control%ofgpw = .true.
1066 qs_control%lrigpw = .true.
1068 qs_control%rigpw = .true.
1070 qs_control%dftb = .true.
1074 qs_control%xtb = .true.
1079 qs_control%semi_empirical = .true.
1082 qs_control%semi_empirical = .true.
1085 qs_control%semi_empirical = .true.
1088 qs_control%semi_empirical = .true.
1091 qs_control%semi_empirical = .true.
1094 qs_control%semi_empirical = .true.
1097 qs_control%semi_empirical = .true.
1100 qs_control%semi_empirical = .true.
1104 qs_control%semi_empirical = .true.
1107 CALL section_vals_get(mull_section, explicit=qs_control%mulliken_restraint)
1109 IF (qs_control%mulliken_restraint)
THEN
1110 CALL section_vals_val_get(mull_section,
"STRENGTH", r_val=qs_control%mulliken_restraint_control%strength)
1111 CALL section_vals_val_get(mull_section,
"TARGET", r_val=qs_control%mulliken_restraint_control%target)
1116 jj = jj +
SIZE(tmplist)
1118 qs_control%mulliken_restraint_control%natoms = jj
1119 IF (qs_control%mulliken_restraint_control%natoms < 1) &
1120 cpabort(
"Need at least 1 atom to use mulliken constraints")
1121 ALLOCATE (qs_control%mulliken_restraint_control%atoms(qs_control%mulliken_restraint_control%natoms))
1125 DO j = 1,
SIZE(tmplist)
1127 qs_control%mulliken_restraint_control%atoms(jj) = tmplist(j)
1131 CALL section_vals_get(ddapc_restraint_section, n_repetition=nrep, explicit=qs_control%ddapc_restraint)
1132 IF (qs_control%ddapc_restraint)
THEN
1133 ALLOCATE (qs_control%ddapc_restraint_control(nrep))
1135 qs_control%ddapc_restraint_is_spin = .false.
1136 qs_control%ddapc_explicit_potential = .false.
1139 CALL section_vals_get(s2_restraint_section, explicit=qs_control%s2_restraint)
1140 IF (qs_control%s2_restraint)
THEN
1142 r_val=qs_control%s2_restraint_control%strength)
1144 r_val=qs_control%s2_restraint_control%target)
1146 i_val=qs_control%s2_restraint_control%functional_form)
1150 IF (qs_control%cdft)
THEN
1155 IF (qs_control%semi_empirical)
THEN
1157 l_val=qs_control%se_control%orthogonal_basis)
1159 r_val=qs_control%se_control%delta)
1161 l_val=qs_control%se_control%analytical_gradients)
1163 l_val=qs_control%se_control%force_kdsod_EX)
1166 i_val=qs_control%se_control%integral_screening)
1169 CALL cp_warn(__location__, &
1170 "PNNL semi-empirical parameterization supports only the Slater type "// &
1171 "integral scheme. Revert to Slater and continue the calculation.")
1176 i_val=qs_control%se_control%ga_ncells)
1179 r_val=qs_control%se_control%cutoff_lrc)
1180 qs_control%se_control%taper_lrc = qs_control%se_control%cutoff_lrc
1185 r_val=qs_control%se_control%taper_lrc)
1188 r_val=qs_control%se_control%range_lrc)
1191 r_val=qs_control%se_control%cutoff_cou)
1192 qs_control%se_control%taper_cou = qs_control%se_control%cutoff_cou
1197 r_val=qs_control%se_control%taper_cou)
1200 r_val=qs_control%se_control%range_cou)
1203 r_val=qs_control%se_control%cutoff_exc)
1204 qs_control%se_control%taper_exc = qs_control%se_control%cutoff_exc
1209 r_val=qs_control%se_control%taper_exc)
1212 r_val=qs_control%se_control%range_exc)
1216 r_val=qs_control%se_control%taper_scr)
1218 r_val=qs_control%se_control%range_scr)
1222 i_val=qs_control%se_control%periodic_type)
1223 SELECT CASE (qs_control%se_control%periodic_type)
1225 qs_control%se_control%do_ewald = .false.
1226 qs_control%se_control%do_ewald_r3 = .false.
1227 qs_control%se_control%do_ewald_gks = .false.
1229 qs_control%se_control%do_ewald = .true.
1230 qs_control%se_control%do_ewald_r3 = .false.
1231 qs_control%se_control%do_ewald_gks = .false.
1233 qs_control%se_control%do_ewald = .false.
1234 qs_control%se_control%do_ewald_r3 = .false.
1235 qs_control%se_control%do_ewald_gks = .true.
1237 CALL cp_abort(__location__, &
1238 "A periodic semi-empirical calculation was requested with a long-range "// &
1239 "summation on the single integral evaluation. This scheme is supported "// &
1240 "only by the PNNL parameterization.")
1242 qs_control%se_control%do_ewald = .true.
1243 qs_control%se_control%do_ewald_r3 = .true.
1244 qs_control%se_control%do_ewald_gks = .false.
1245 IF (qs_control%se_control%integral_screening /=
do_se_is_kdso) &
1246 CALL cp_abort(__location__, &
1247 "A periodic semi-empirical calculation was requested with a long-range "// &
1248 "summation for the slowly convergent part 1/R^3, which is not congruent "// &
1249 "with the integral screening chosen. The only integral screening supported "// &
1250 "by this periodic type calculation is the standard Klopman-Dewar-Sabelli-Ohno.")
1255 l_val=qs_control%se_control%dispersion)
1257 r_val=qs_control%se_control%rcdisp)
1259 r_val=qs_control%se_control%epscn)
1261 qs_control%se_control%sd3(1) = scal(1)
1262 qs_control%se_control%sd3(2) = scal(2)
1263 qs_control%se_control%sd3(3) = scal(3)
1265 c_val=qs_control%se_control%dispersion_parameter_file)
1269 cpabort(
"EWALD_R3 not implemented yet!")
1281 qs_control%se_control%orthogonal_basis = .true.
1286 IF (qs_control%dftb)
THEN
1288 l_val=qs_control%dftb_control%orthogonal_basis)
1290 l_val=qs_control%dftb_control%self_consistent)
1292 l_val=qs_control%dftb_control%dispersion)
1294 l_val=qs_control%dftb_control%dftb3_diagonal)
1296 l_val=qs_control%dftb_control%hb_sr_damp)
1298 i_val=qs_control%dftb_control%tblite_scc_mixer)
1300 r_val=qs_control%dftb_control%tblite_mixer_damping)
1302 r_val=qs_control%dftb_control%eps_disp)
1306 l_val=qs_control%dftb_control%do_ewald)
1308 qs_control%dftb_control%do_ewald = (qs_control%periodicity /= 0)
1311 c_val=qs_control%dftb_control%sk_file_path)
1313 c_val=qs_control%dftb_control%sk_file_list)
1315 r_val=qs_control%dftb_control%hb_sr_para)
1317 ALLOCATE (qs_control%dftb_control%sk_pair_list(3, n_var))
1321 qs_control%dftb_control%sk_pair_list(1:3, k) = clist(1:3)
1325 i_val=qs_control%dftb_control%dispersion_type)
1327 c_val=qs_control%dftb_control%uff_force_field)
1330 r_val=qs_control%dftb_control%rcdisp)
1332 r_val=qs_control%dftb_control%epscn)
1334 r_val=qs_control%dftb_control%exp_pre)
1336 r_val=qs_control%dftb_control%scaling)
1338 qs_control%dftb_control%sd3(1) = scal(1)
1339 qs_control%dftb_control%sd3(2) = scal(2)
1340 qs_control%dftb_control%sd3(3) = scal(3)
1342 qs_control%dftb_control%sd3bj(1) = scal(1)
1343 qs_control%dftb_control%sd3bj(2) = scal(2)
1344 qs_control%dftb_control%sd3bj(3) = scal(3)
1345 qs_control%dftb_control%sd3bj(4) = scal(4)
1347 c_val=qs_control%dftb_control%dispersion_parameter_file)
1349 IF (qs_control%dftb_control%dispersion)
CALL cite_reference(
zhechkov2005)
1350 IF (qs_control%dftb_control%self_consistent)
CALL cite_reference(
elstner1998)
1351 IF (qs_control%dftb_control%hb_sr_damp)
CALL cite_reference(
hu2007)
1355 IF (qs_control%xtb)
THEN
1358 qs_control%xtb_control%do_tblite = (qs_control%xtb_control%gfn_type ==
gfn_tblite)
1359 IF (qs_control%xtb_control%do_tblite)
THEN
1360 IF (.NOT. tblite_section_active) &
1361 cpabort(
"XTB/GFN_TYPE TBLITE requires an XTB/TBLITE section")
1363 qs_control%xtb_control%gfn_type =
gfn1xtb
1364 ELSE IF (tblite_section_active)
THEN
1365 cpabort(
"The XTB/TBLITE section requires XTB/GFN_TYPE TBLITE")
1368 i_val=qs_control%xtb_control%tblite_scc_mixer)
1370 r_val=qs_control%xtb_control%tblite_mixer_damping)
1374 l_val=qs_control%xtb_control%do_ewald)
1376 qs_control%xtb_control%do_ewald = (qs_control%periodicity /= 0)
1394 SELECT CASE (qs_control%xtb_control%gfn_type)
1401 cpabort(
"gfn2-xtb tbd")
1408 qs_control%xtb_control%sto_ng = ngauss
1410 qs_control%xtb_control%h_sto_ng = ngauss
1412 c_val=qs_control%xtb_control%parameter_file_path)
1416 c_val=qs_control%xtb_control%parameter_file_name)
1418 SELECT CASE (qs_control%xtb_control%gfn_type)
1420 qs_control%xtb_control%parameter_file_name =
"xTB0_parameters"
1422 qs_control%xtb_control%parameter_file_name =
"xTB1_parameters"
1424 cpabort(
"gfn2-xtb tbd")
1431 r_val=qs_control%xtb_control%rcdisp)
1433 r_val=qs_control%xtb_control%epscn)
1437 qs_control%xtb_control%s6 = scal(1)
1438 qs_control%xtb_control%s8 = scal(2)
1440 SELECT CASE (qs_control%xtb_control%gfn_type)
1442 qs_control%xtb_control%s6 = 1.00_dp
1443 qs_control%xtb_control%s8 = 2.85_dp
1445 qs_control%xtb_control%s6 = 1.00_dp
1446 qs_control%xtb_control%s8 = 2.40_dp
1448 cpabort(
"gfn2-xtb tbd")
1456 qs_control%xtb_control%a1 = scal(1)
1457 qs_control%xtb_control%a2 = scal(2)
1459 SELECT CASE (qs_control%xtb_control%gfn_type)
1461 qs_control%xtb_control%a1 = 0.80_dp
1462 qs_control%xtb_control%a2 = 4.60_dp
1464 qs_control%xtb_control%a1 = 0.63_dp
1465 qs_control%xtb_control%a2 = 5.00_dp
1467 cpabort(
"gfn2-xtb tbd")
1473 c_val=qs_control%xtb_control%dispersion_parameter_file)
1478 qs_control%xtb_control%ks = scal(1)
1479 qs_control%xtb_control%kp = scal(2)
1480 qs_control%xtb_control%kd = scal(3)
1481 qs_control%xtb_control%ksp = scal(4)
1482 qs_control%xtb_control%k2sh = scal(5)
1483 IF (qs_control%xtb_control%gfn_type == 0)
THEN
1485 qs_control%xtb_control%ksp = 0.5_dp*(scal(1) + scal(2))
1488 SELECT CASE (qs_control%xtb_control%gfn_type)
1490 qs_control%xtb_control%ks = 2.00_dp
1491 qs_control%xtb_control%kp = 2.4868_dp
1492 qs_control%xtb_control%kd = 2.27_dp
1493 qs_control%xtb_control%ksp = 2.2434_dp
1494 qs_control%xtb_control%k2sh = 1.1241_dp
1496 qs_control%xtb_control%ks = 1.85_dp
1497 qs_control%xtb_control%kp = 2.25_dp
1498 qs_control%xtb_control%kd = 2.00_dp
1499 qs_control%xtb_control%ksp = 2.08_dp
1500 qs_control%xtb_control%k2sh = 2.85_dp
1502 cpabort(
"gfn2-xtb tbd")
1510 qs_control%xtb_control%kg = scal(1)
1511 qs_control%xtb_control%kf = scal(2)
1513 SELECT CASE (qs_control%xtb_control%gfn_type)
1515 qs_control%xtb_control%kg = 2.00_dp
1516 qs_control%xtb_control%kf = 1.50_dp
1518 qs_control%xtb_control%kg = 2.00_dp
1519 qs_control%xtb_control%kf = 1.50_dp
1521 cpabort(
"gfn2-xtb tbd")
1527 qs_control%xtb_control%kcns = scal(1)
1528 qs_control%xtb_control%kcnp = scal(2)
1529 qs_control%xtb_control%kcnd = scal(3)
1534 SELECT CASE (qs_control%xtb_control%gfn_type)
1536 qs_control%xtb_control%ksen = scal(1)
1537 qs_control%xtb_control%kpen = scal(2)
1538 qs_control%xtb_control%kden = scal(3)
1540 qs_control%xtb_control%ken = scal(1)
1542 cpabort(
"gfn2-xtb tbd")
1547 SELECT CASE (qs_control%xtb_control%gfn_type)
1549 qs_control%xtb_control%ksen = 0.006_dp
1550 qs_control%xtb_control%kpen = -0.001_dp
1551 qs_control%xtb_control%kden = -0.002_dp
1553 qs_control%xtb_control%ken = -0.007_dp
1555 cpabort(
"gfn2-xtb tbd")
1562 qs_control%xtb_control%ben = scal(1)
1567 r_val=qs_control%xtb_control%enscale)
1569 SELECT CASE (qs_control%xtb_control%gfn_type)
1571 qs_control%xtb_control%enscale = -0.09_dp
1573 qs_control%xtb_control%enscale = 0._dp
1575 cpabort(
"gfn2-xtb tbd")
1582 l_val=qs_control%xtb_control%xb_interaction)
1584 qs_control%xtb_control%kxr = scal(1)
1585 qs_control%xtb_control%kx2 = scal(2)
1588 l_val=qs_control%xtb_control%do_nonbonded)
1590 IF (explicit .AND. qs_control%xtb_control%do_nonbonded)
THEN
1594 CALL read_gp_section(qs_control%xtb_control%nonbonded, genpot_section, 0)
1598 r_val=qs_control%xtb_control%eps_pair)
1601 qs_control%xtb_control%coulomb_sr_cut = scal(1)
1603 qs_control%xtb_control%coulomb_sr_eps = scal(1)
1609 SELECT CASE (qs_control%xtb_control%gfn_type)
1611 qs_control%xtb_control%coulomb_interaction = .false.
1612 qs_control%xtb_control%coulomb_lr = .false.
1613 qs_control%xtb_control%tb3_interaction = .false.
1614 qs_control%xtb_control%check_atomic_charges = .false.
1616 l_val=qs_control%xtb_control%var_dipole)
1620 l_val=qs_control%xtb_control%coulomb_interaction)
1622 l_val=qs_control%xtb_control%coulomb_lr)
1624 l_val=qs_control%xtb_control%tb3_interaction)
1627 l_val=qs_control%xtb_control%check_atomic_charges)
1628 qs_control%xtb_control%var_dipole = .false.
1630 cpabort(
"gfn2-xtb tbd")
1634 qs_control%xtb_control%kab_nval = n_rep
1636 ALLOCATE (qs_control%xtb_control%kab_param(3, n_rep))
1637 ALLOCATE (qs_control%xtb_control%kab_types(2, n_rep))
1638 ALLOCATE (qs_control%xtb_control%kab_vals(n_rep))
1641 qs_control%xtb_control%kab_param(1, j) = clist(1)
1643 ielement=qs_control%xtb_control%kab_types(1, j))
1644 qs_control%xtb_control%kab_param(2, j) = clist(2)
1646 ielement=qs_control%xtb_control%kab_types(2, j))
1647 qs_control%xtb_control%kab_param(3, j) = clist(3)
1648 READ (clist(3),
'(F10.0)') qs_control%xtb_control%kab_vals(j)
1652 IF (qs_control%xtb_control%gfn_type == 0)
THEN
1654 qs_control%xtb_control%ksrb = scal(1)
1655 qs_control%xtb_control%esrb = scal(2)
1656 qs_control%xtb_control%gscal = scal(3)
1657 qs_control%xtb_control%c1srb = scal(4)
1658 qs_control%xtb_control%c2srb = scal(5)
1659 qs_control%xtb_control%shift = scal(6)
1664 SELECT CASE (trim(cval))
1666 qs_control%xtb_control%enshift_type = 0
1668 qs_control%xtb_control%enshift_type = 1
1670 qs_control%xtb_control%enshift_type = 2
1672 cpabort(
"Unknown value for EN_SHIFT_TYPE")
1676 CALL read_eeq_param(eeq_section, qs_control%xtb_control%eeq_sparam)
1683 IF (qs_control%xtb_control%do_tblite)
THEN
1685 i_val=qs_control%xtb_control%tblite_method)
1687 i_val=qs_control%xtb_control%tblite_scc_mixer)
1689 r_val=qs_control%xtb_control%tblite_mixer_damping)
1691 CALL section_vals_get(xtb_tblite_ref_cli, explicit=tblite_reference_cli_section)
1692 IF (tblite_reference_cli .AND. (.NOT. tblite_reference_cli_section)) &
1693 cpabort(
"XTB/TBLITE/REFERENCE_CLI keyword requires an XTB/TBLITE/REFERENCE_CLI section")
1694 IF (tblite_reference_cli .OR. tblite_reference_cli_section)
THEN
1695 CALL read_xtb_reference_cli_section(xtb_tblite_ref_cli, qs_control%xtb_control%reference_cli)
1696 qs_control%xtb_control%reference_cli%enabled = .true.
1708 CALL timestop(handle)
1716 SUBROUTINE read_xtb_reference_cli_section(ref_cli_section, ref_cli)
1733 END SUBROUTINE read_xtb_reference_cli_section
1746 CHARACTER(LEN=*),
PARAMETER :: routinen =
'read_tddfpt2_control'
1748 CHARACTER(LEN=default_string_length), &
1749 DIMENSION(:),
POINTER :: tmpstringlist
1750 INTEGER :: handle, irep, isize, nrep
1751 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: inds
1752 LOGICAL :: do_ewald, do_exchange, expl, explicit, &
1754 REAL(kind=
dp) :: filter, fval, hfx
1756 soc_section, stda_section, xc_func, &
1759 CALL timeset(routinen, handle)
1775 CALL section_vals_val_get(t_section,
"MIN_AMPLITUDE", r_val=t_control%min_excitation_amplitude)
1785 CALL section_vals_val_get(t_section,
"ADMM_KERNEL_CORRECTION_SYMMETRIC", l_val=t_control%admm_symm)
1786 CALL section_vals_val_get(t_section,
"ADMM_KERNEL_XC_CORRECTION", l_val=t_control%admm_xc_correction)
1787 CALL section_vals_val_get(t_section,
"EXCITON_DESCRIPTORS", l_val=t_control%do_exciton_descriptors)
1788 CALL section_vals_val_get(t_section,
"DIRECTIONAL_EXCITON_DESCRIPTORS", l_val=t_control%do_directional_exciton_descriptors)
1794 IF (
SIZE(tmpstringlist) == 2)
THEN
1796 SELECT CASE (tmpstringlist(2))
1808 cpabort(
"Unknown basis size in AUTO_BASIS keyword:"//trim(tmpstringlist(1)))
1811 SELECT CASE (tmpstringlist(1))
1814 t_control%auto_basis_p_lri_aux = isize
1816 cpabort(
"Unknown basis type in AUTO_BASIS keyword:"//trim(tmpstringlist(1)))
1819 CALL cp_abort(__location__, &
1820 "AUTO_BASIS keyword in &PROPERTIES &TDDFT section has a wrong number of arguments.")
1824 IF (t_control%conv < 0) &
1825 t_control%conv = abs(t_control%conv)
1833 t_control%dipole_form = 0
1838 CALL section_vals_val_get(dipole_section,
"REFERENCE_POINT", r_vals=t_control%dipole_ref_point)
1840 NULLIFY (t_control%dipole_ref_point)
1842 cpabort(
"User-defined reference point should be given explicitly")
1850 t_control%do_soc = .true.
1857 IF (t_control%mgrid_is_explicit)
THEN
1858 CALL section_vals_val_get(mgrid_section,
"NGRIDS", i_val=t_control%mgrid_ngrids, explicit=explicit)
1859 IF (.NOT. explicit) t_control%mgrid_ngrids =
SIZE(qs_control%e_cutoff)
1861 CALL section_vals_val_get(mgrid_section,
"CUTOFF", r_val=t_control%mgrid_cutoff, explicit=explicit)
1862 IF (.NOT. explicit) t_control%mgrid_cutoff = qs_control%cutoff
1865 r_val=t_control%mgrid_progression_factor, explicit=explicit)
1867 IF (t_control%mgrid_progression_factor <= 1.0_dp) &
1868 CALL cp_abort(__location__, &
1869 "Progression factor should be greater then 1.0 to ensure multi-grid ordering")
1871 t_control%mgrid_progression_factor = qs_control%progression_factor
1874 CALL section_vals_val_get(mgrid_section,
"COMMENSURATE", l_val=t_control%mgrid_commensurate_mgrids, explicit=explicit)
1875 IF (.NOT. explicit) t_control%mgrid_commensurate_mgrids = qs_control%commensurate_mgrids
1876 IF (t_control%mgrid_commensurate_mgrids)
THEN
1878 t_control%mgrid_progression_factor = 4.0_dp
1880 t_control%mgrid_progression_factor = qs_control%progression_factor
1884 CALL section_vals_val_get(mgrid_section,
"REL_CUTOFF", r_val=t_control%mgrid_relative_cutoff, explicit=explicit)
1885 IF (.NOT. explicit) t_control%mgrid_relative_cutoff = qs_control%relative_cutoff
1887 CALL section_vals_val_get(mgrid_section,
"MULTIGRID_SET", l_val=multigrid_set, explicit=explicit)
1888 IF (.NOT. explicit) multigrid_set = .false.
1889 IF (multigrid_set)
THEN
1892 NULLIFY (t_control%mgrid_e_cutoff)
1895 CALL section_vals_val_get(mgrid_section,
"REALSPACE", l_val=t_control%mgrid_realspace_mgrids, explicit=explicit)
1896 IF (.NOT. explicit) t_control%mgrid_realspace_mgrids = qs_control%realspace_mgrids
1899 l_val=t_control%mgrid_skip_load_balance, explicit=explicit)
1900 IF (.NOT. explicit) t_control%mgrid_skip_load_balance = qs_control%skip_load_balance_distributed
1902 IF (
ASSOCIATED(t_control%mgrid_e_cutoff))
THEN
1903 IF (
SIZE(t_control%mgrid_e_cutoff) /= t_control%mgrid_ngrids) &
1904 cpabort(
"Inconsistent values for number of multi-grids")
1907 t_control%mgrid_e_cutoff = -t_control%mgrid_e_cutoff
1908 ALLOCATE (inds(t_control%mgrid_ngrids))
1909 CALL sort(t_control%mgrid_e_cutoff, t_control%mgrid_ngrids, inds)
1911 t_control%mgrid_e_cutoff = -t_control%mgrid_e_cutoff
1925 t_control%stda_control%hfx_fraction = 0.0_dp
1926 t_control%stda_control%do_exchange = .true.
1927 t_control%stda_control%eps_td_filter = 1.e-10_dp
1928 t_control%stda_control%mn_alpha = -99.0_dp
1929 t_control%stda_control%mn_beta = -99.0_dp
1931 SELECT CASE (qs_control%periodicity)
1933 t_control%stda_control%do_ewald = .false.
1935 t_control%stda_control%do_ewald = .true.
1937 t_control%stda_control%do_ewald = .true.
1939 t_control%stda_control%do_ewald = .true.
1941 cpabort(
"Illegal value for periodiciy")
1946 IF (expl) t_control%stda_control%hfx_fraction = hfx
1948 IF (expl) t_control%stda_control%eps_td_filter = filter
1950 IF (expl) t_control%stda_control%do_ewald = do_ewald
1952 IF (expl) t_control%stda_control%do_exchange = do_exchange
1954 t_control%stda_control%mn_alpha = fval
1956 t_control%stda_control%mn_beta = fval
1959 t_control%stda_control%coulomb_sr_cut = fval
1961 t_control%stda_control%coulomb_sr_eps = fval
1964 CALL timestop(handle)
1976 CHARACTER(len=*),
PARAMETER :: routinen =
'write_dft_control'
1978 CHARACTER(LEN=20) :: tmpstr
1979 INTEGER :: handle, i, i_rep, n_rep, output_unit
1980 REAL(kind=
dp) :: density_cut, density_smooth_cut_range, &
1981 gradient_cut, tau_cut
1988 IF (dft_control%qs_control%semi_empirical)
RETURN
1989 IF (dft_control%qs_control%dftb)
RETURN
1990 IF (dft_control%qs_control%xtb)
THEN
1991 CALL write_xtb_control(dft_control%qs_control%xtb_control, dft_section)
1994 CALL timeset(routinen, handle)
2000 "PRINT%DFT_CONTROL_PARAMETERS", extension=
".Log")
2002 IF (output_unit > 0)
THEN
2006 IF (dft_control%uks)
THEN
2007 WRITE (unit=output_unit, fmt=
"(/,T2,A,T78,A)") &
2008 "DFT| Spin unrestricted (spin-polarized) Kohn-Sham calculation",
"UKS"
2009 ELSE IF (dft_control%roks)
THEN
2010 WRITE (unit=output_unit, fmt=
"(/,T2,A,T77,A)") &
2011 "DFT| Spin restricted open Kohn-Sham calculation",
"ROKS"
2013 WRITE (unit=output_unit, fmt=
"(/,T2,A,T78,A)") &
2014 "DFT| Spin restricted Kohn-Sham (RKS) calculation",
"RKS"
2017 WRITE (unit=output_unit, fmt=
"(T2,A,T76,I5)") &
2018 "DFT| Multiplicity", dft_control%multiplicity
2019 WRITE (unit=output_unit, fmt=
"(T2,A,T76,I5)") &
2020 "DFT| Number of spin states", dft_control%nspins
2022 WRITE (unit=output_unit, fmt=
"(T2,A,T76,I5)") &
2023 "DFT| Charge", dft_control%charge
2026 SELECT CASE (dft_control%sic_method_id)
2030 tmpstr =
"SPZ/MAURI SIC"
2032 tmpstr =
"US/MAURI SIC"
2036 tmpstr =
"Explicit Orbital SIC"
2039 cpabort(
"SIC option unknown")
2042 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
2043 "DFT| Self-interaction correction (SIC)", adjustr(trim(tmpstr))
2045 IF (dft_control%sic_method_id /=
sic_none)
THEN
2046 WRITE (unit=output_unit, fmt=
"(T2,A,T66,ES15.6)") &
2047 "DFT| SIC scaling parameter a", dft_control%sic_scaling_a, &
2048 "DFT| SIC scaling parameter b", dft_control%sic_scaling_b
2051 IF (dft_control%sic_method_id ==
sic_eo)
THEN
2053 WRITE (unit=output_unit, fmt=
"(T2,A,T66,A)") &
2054 "DFT| SIC orbitals",
"ALL"
2057 WRITE (unit=output_unit, fmt=
"(T2,A,T66,A)") &
2058 "DFT| SIC orbitals",
"UNPAIRED"
2065 CALL section_vals_val_get(xc_section,
"density_smooth_cutoff_range", r_val=density_smooth_cut_range)
2067 WRITE (unit=output_unit, fmt=
"(T2,A,T66,ES15.6)") &
2068 "DFT| Cutoffs: density ", density_cut, &
2069 "DFT| gradient", gradient_cut, &
2070 "DFT| tau ", tau_cut, &
2071 "DFT| cutoff_smoothing_range", density_smooth_cut_range
2074 WRITE (output_unit,
'( A, T61, A )') &
2075 " DFT| XC density smoothing ", adjustr(tmpstr)
2078 WRITE (output_unit,
'( A, T61, A )') &
2079 " DFT| XC derivatives ", adjustr(tmpstr)
2080 IF (dft_control%dft_plus_u)
THEN
2081 NULLIFY (enum, keyword, section)
2085 WRITE (unit=output_unit, fmt=
"(/,T2,A,T41,A40)") &
2086 "DFT+U| Method", adjustr(trim(
enum_i2c(enum, dft_control%plus_u_method_id)))
2087 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2088 "DFT+U| Check atomic kind information for details"
2092 WRITE (unit=output_unit, fmt=
"(A)")
""
2093 CALL xc_write(output_unit, xc_section, dft_control%lsd)
2095 IF (dft_control%apply_period_efield)
THEN
2096 WRITE (unit=output_unit, fmt=
"(A)")
""
2097 IF (dft_control%period_efield%displacement_field)
THEN
2098 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2099 "PERIODIC_EFIELD| Use displacement field formulation"
2100 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,ES14.6)") &
2101 "PERIODIC_EFIELD| Displacement field filter: x", &
2102 dft_control%period_efield%d_filter(1), &
2103 "PERIODIC_EFIELD| y", &
2104 dft_control%period_efield%d_filter(2), &
2105 "PERIODIC_EFIELD| z", &
2106 dft_control%period_efield%d_filter(3)
2108 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,ES14.6)") &
2109 "PERIODIC_EFIELD| Polarisation vector: x", &
2110 dft_control%period_efield%polarisation(1), &
2111 "PERIODIC_EFIELD| y", &
2112 dft_control%period_efield%polarisation(2), &
2113 "PERIODIC_EFIELD| z", &
2114 dft_control%period_efield%polarisation(3)
2116 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,I14)") &
2117 "PERIODIC_EFIELD| Start Frame:", &
2118 dft_control%period_efield%start_frame, &
2119 "PERIODIC_EFIELD| End Frame:", &
2120 dft_control%period_efield%end_frame
2122 IF (
ALLOCATED(dft_control%period_efield%strength_list))
THEN
2123 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,I14)") &
2124 "PERIODIC_EFIELD| Number of Intensities:", &
2125 SIZE(dft_control%period_efield%strength_list)
2126 WRITE (unit=output_unit, fmt=
"(T2,A,I10,T66,1X,ES14.6)") &
2127 "PERIODIC_EFIELD| Intensity List [a.u.] ", &
2128 1, dft_control%period_efield%strength_list(1)
2129 DO i = 2,
SIZE(dft_control%period_efield%strength_list)
2130 WRITE (unit=output_unit, fmt=
"(T2,A,I10,T66,1X,ES14.6)") &
2131 "PERIODIC_EFIELD| ", &
2132 i, dft_control%period_efield%strength_list(i)
2135 WRITE (unit=output_unit, fmt=
"(T2,A,T66,1X,ES14.6)") &
2136 "PERIODIC_EFIELD| Intensity [a.u.]:", &
2137 dft_control%period_efield%strength
2140 IF (sqrt(dot_product(dft_control%period_efield%polarisation, &
2141 dft_control%period_efield%polarisation)) < epsilon(0.0_dp))
THEN
2142 cpabort(
"Invalid (too small) polarisation vector specified for PERIODIC_EFIELD")
2146 IF (dft_control%do_sccs)
THEN
2147 WRITE (unit=output_unit, fmt=
"(/,T2,A)") &
2148 "SCCS| Self-consistent continuum solvation model"
2149 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2150 "SCCS| Relative permittivity of the solvent (medium)", &
2151 dft_control%sccs_control%epsilon_solvent, &
2152 "SCCS| Absolute permittivity [a.u.]", &
2153 dft_control%sccs_control%epsilon_solvent/
fourpi
2154 SELECT CASE (dft_control%sccs_control%method_id)
2156 WRITE (unit=output_unit, fmt=
"(T2,A,/,(T2,A,T61,ES20.6))") &
2157 "SCCS| Dielectric function proposed by Andreussi et al.", &
2158 "SCCS| rho_max", dft_control%sccs_control%rho_max, &
2159 "SCCS| rho_min", dft_control%sccs_control%rho_min
2161 WRITE (unit=output_unit, fmt=
"(T2,A,/,(T2,A,T61,ES20.6))") &
2162 "SCCS| Dielectric function proposed by Fattebert and Gygi", &
2163 "SCCS| beta", dft_control%sccs_control%beta, &
2164 "SCCS| rho_zero", dft_control%sccs_control%rho_zero
2166 cpabort(
"Invalid SCCS model specified. Please, check your input!")
2168 SELECT CASE (dft_control%sccs_control%derivative_method)
2170 WRITE (unit=output_unit, fmt=
"(T2,A,T46,A35)") &
2171 "SCCS| Numerical derivative calculation", &
2174 WRITE (unit=output_unit, fmt=
"(T2,A,T46,A35)") &
2175 "SCCS| Numerical derivative calculation", &
2176 adjustr(
"3-point stencil central differences")
2178 WRITE (unit=output_unit, fmt=
"(T2,A,T46,A35)") &
2179 "SCCS| Numerical derivative calculation", &
2180 adjustr(
"5-point stencil central differences")
2182 WRITE (unit=output_unit, fmt=
"(T2,A,T46,A35)") &
2183 "SCCS| Numerical derivative calculation", &
2184 adjustr(
"7-point stencil central differences")
2186 CALL cp_abort(__location__, &
2187 "Invalid derivative method specified for SCCS model. "// &
2188 "Please, check your input!")
2190 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2191 "SCCS| Repulsion parameter alpha [mN/m] = [dyn/cm]", &
2193 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2194 "SCCS| Dispersion parameter beta [GPa]", &
2196 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2197 "SCCS| Surface tension gamma [mN/m] = [dyn/cm]", &
2199 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2200 "SCCS| Mixing parameter applied during the iteration cycle", &
2201 dft_control%sccs_control%mixing
2202 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2203 "SCCS| Tolerance for the convergence of the SCCS iteration cycle", &
2204 dft_control%sccs_control%eps_sccs
2205 WRITE (unit=output_unit, fmt=
"(T2,A,T61,I20)") &
2206 "SCCS| Maximum number of iteration steps", &
2207 dft_control%sccs_control%max_iter
2208 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2209 "SCCS| SCF convergence threshold for starting the SCCS iteration", &
2210 dft_control%sccs_control%eps_scf
2211 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2212 "SCCS| Numerical increment for the cavity surface calculation", &
2213 dft_control%sccs_control%delta_rho
2216 WRITE (unit=output_unit, fmt=
"(A)")
""
2220 IF (dft_control%hairy_probes .EQV. .true.)
THEN
2221 n_rep =
SIZE(dft_control%probe)
2222 IF (output_unit > 0)
THEN
2224 WRITE (unit=output_unit, fmt=
"(T2,A,I5)") &
2225 "HP | hair probe set", i_rep
2226 WRITE (unit=output_unit, fmt=
"(T2,A,T61,*(I5))") &
2227 "HP| atom indexes", &
2228 (dft_control%probe(i_rep)%atom_ids(i), i=1, dft_control%probe(i_rep)%natoms)
2229 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2230 "HP| potential", dft_control%probe(i_rep)%mu
2231 WRITE (unit=output_unit, fmt=
"(T2,A,T61,F20.2)") &
2232 "HP| temperature", dft_control%probe(i_rep)%T
2233 WRITE (unit=output_unit, fmt=
"(T2,A,T61,ES20.6)") &
2234 "HP| eps_hp", dft_control%probe(i_rep)%eps_hp
2240 "PRINT%DFT_CONTROL_PARAMETERS")
2242 CALL timestop(handle)
2262 "PRINT%DFT_CONTROL_PARAMETERS", extension=
".Log")
2264 IF (iounit > 0)
THEN
2266 SELECT CASE (admm_control%admm_type)
2268 WRITE (unit=iounit, fmt=
"(/,T2,A,T77,A)")
"ADMM| Specific ADMM type specified",
"NONE"
2270 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMM1"
2272 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMM2"
2274 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMMS"
2276 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMMP"
2278 WRITE (unit=iounit, fmt=
"(/,T2,A,T76,A)")
"ADMM| Specific ADMM type specified",
"ADMMQ"
2280 cpabort(
"admm_type")
2283 SELECT CASE (admm_control%purification_method)
2285 WRITE (unit=iounit, fmt=
"(T2,A,T77,A)")
"ADMM| Density matrix purification method",
"NONE"
2287 WRITE (unit=iounit, fmt=
"(T2,A,T75,A)")
"ADMM| Density matrix purification method",
"Cauchy"
2289 WRITE (unit=iounit, fmt=
"(T2,A,T66,A)")
"ADMM| Density matrix purification method",
"Cauchy subspace"
2291 WRITE (unit=iounit, fmt=
"(T2,A,T63,A)")
"ADMM| Density matrix purification method",
"MO diagonalization"
2293 WRITE (unit=iounit, fmt=
"(T2,A,T71,A)")
"ADMM| Density matrix purification method",
"MO no diag"
2295 WRITE (unit=iounit, fmt=
"(T2,A,T74,A)")
"ADMM| Density matrix purification method",
"McWeeny"
2297 WRITE (unit=iounit, fmt=
"(T2,A,T73,A)")
"ADMM| Density matrix purification method",
"NONE(DM)"
2299 cpabort(
"admm_purification_method")
2302 SELECT CASE (admm_control%method)
2304 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Orbital projection on ADMM basis"
2306 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Blocked Fock matrix projection with full purification"
2308 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Blocked Fock matrix projection"
2310 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Orbital projection with charge constrain"
2312 cpabort(
"admm method")
2315 SELECT CASE (admm_control%scaling_model)
2318 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| Use Merlot (2014) scaling model"
2320 cpabort(
"admm scaling_model")
2323 WRITE (unit=iounit, fmt=
"(T2,A,T61,G20.10)")
"ADMM| eps_filter", admm_control%eps_filter
2325 SELECT CASE (admm_control%aux_exch_func)
2327 WRITE (unit=iounit, fmt=
"(T2,A)")
"ADMM| No exchange functional correction term used"
2329 WRITE (unit=iounit, fmt=
"(T2,A,T74,A)")
"ADMM| Exchange functional in correction term",
"(W)PBEX"
2331 WRITE (unit=iounit, fmt=
"(T2,A,T77,A)")
"ADMM| Exchange functional in correction term",
"PBEX"
2333 WRITE (unit=iounit, fmt=
"(T2,A,T77,A)")
"ADMM| Exchange functional in correction term",
"OPTX"
2335 WRITE (unit=iounit, fmt=
"(T2,A,T74,A)")
"ADMM| Exchange functional in correction term",
"Becke88"
2337 WRITE (unit=iounit, fmt=
"(T2,A,T74,A)")
"ADMM| Exchange functional in correction term",
"SlaterX"
2339 cpabort(
"admm aux_exch_func")
2342 WRITE (unit=iounit, fmt=
"(A)")
""
2347 "PRINT%DFT_CONTROL_PARAMETERS")
2355 SUBROUTINE write_xtb_control(xtb_control, dft_section)
2359 CHARACTER(len=*),
PARAMETER :: routinen =
'write_xtb_control'
2361 CHARACTER(LEN=16) :: scc_mixer_name
2362 INTEGER :: handle, output_unit
2365 CALL timeset(routinen, handle)
2370 "PRINT%DFT_CONTROL_PARAMETERS", extension=
".Log")
2372 IF (output_unit > 0)
THEN
2374 WRITE (unit=output_unit, fmt=
"(/,T2,A,T31,A50)") &
2375 "xTB| Parameter file", adjustr(trim(xtb_control%parameter_file_name))
2376 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2377 "xTB| Basis expansion STO-NG", xtb_control%sto_ng
2378 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2379 "xTB| Basis expansion STO-NG for Hydrogen", xtb_control%h_sto_ng
2380 WRITE (unit=output_unit, fmt=
"(T2,A,T71,E10.4)") &
2381 "xTB| Repulsive pair potential accuracy", xtb_control%eps_pair
2382 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.6)") &
2383 "xTB| Repulsive enhancement factor", xtb_control%enscale
2384 WRITE (unit=output_unit, fmt=
"(T2,A,T71,L10)") &
2385 "xTB| Halogen interaction potential", xtb_control%xb_interaction
2386 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2387 "xTB| Halogen interaction potential cutoff radius", xtb_control%xb_radius
2388 WRITE (unit=output_unit, fmt=
"(T2,A,T71,L10)") &
2389 "xTB| Nonbonded interactions", xtb_control%do_nonbonded
2390 SELECT CASE (xtb_control%vdw_type)
2392 WRITE (unit=output_unit, fmt=
"(T2,A)")
"xTB| No vdW potential selected"
2394 WRITE (unit=output_unit, fmt=
"(T2,A,T72,A)")
"xTB| vdW potential type:",
"DFTD3(BJ)"
2395 WRITE (unit=output_unit, fmt=
"(T2,A,T31,A50)") &
2396 "xTB| D3 Dispersion: Parameter file", adjustr(trim(xtb_control%dispersion_parameter_file))
2398 WRITE (unit=output_unit, fmt=
"(T2,A,T76,A)")
"xTB| vdW potential type:",
"DFTD4"
2399 WRITE (unit=output_unit, fmt=
"(T2,A,T31,A50)") &
2400 "xTB| D4 Dispersion: Parameter file", adjustr(trim(xtb_control%dispersion_parameter_file))
2404 WRITE (unit=output_unit, fmt=
"(T2,A,T51,3F10.3)") &
2405 "xTB| Huckel constants ks kp kd", xtb_control%ks, xtb_control%kp, xtb_control%kd
2406 WRITE (unit=output_unit, fmt=
"(T2,A,T61,2F10.3)") &
2407 "xTB| Huckel constants ksp k2sh", xtb_control%ksp, xtb_control%k2sh
2408 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2409 "xTB| Mataga-Nishimoto exponent", xtb_control%kg
2410 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2411 "xTB| Repulsion potential exponent", xtb_control%kf
2412 WRITE (unit=output_unit, fmt=
"(T2,A,T51,3F10.3)") &
2413 "xTB| Coordination number scaling kcn(s) kcn(p) kcn(d)", &
2414 xtb_control%kcns, xtb_control%kcnp, xtb_control%kcnd
2415 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2416 "xTB| Electronegativity scaling", xtb_control%ken
2417 WRITE (unit=output_unit, fmt=
"(T2,A,T61,2F10.3)") &
2418 "xTB| Halogen potential scaling kxr kx2", xtb_control%kxr, xtb_control%kx2
2419 SELECT CASE (xtb_control%tblite_scc_mixer)
2421 scc_mixer_name =
"AUTO"
2423 scc_mixer_name =
"TBLITE"
2425 scc_mixer_name =
"CP2K"
2427 scc_mixer_name =
"NONE"
2429 cpabort(
"Unknown tblite SCC mixer")
2431 WRITE (unit=output_unit, fmt=
"(T2,A,T72,A)") &
2432 "xTB| SCC mixer:", trim(scc_mixer_name)
2433 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.3)") &
2434 "xTB| tblite SCC mixer damping:", xtb_control%tblite_mixer_damping
2435 WRITE (unit=output_unit, fmt=
"(/)")
2440 "PRINT%DFT_CONTROL_PARAMETERS")
2442 CALL timestop(handle)
2444 END SUBROUTINE write_xtb_control
2455 CHARACTER(len=*),
PARAMETER :: routinen =
'write_qs_control'
2457 CHARACTER(len=20) :: method, quadrature
2458 INTEGER :: handle, i, igrid_level, ngrid_level, &
2467 IF (qs_control%semi_empirical)
RETURN
2468 IF (qs_control%dftb)
RETURN
2469 IF (qs_control%xtb)
RETURN
2470 CALL timeset(routinen, handle)
2471 NULLIFY (logger, print_section_vals, qs_section, qs_section_vals)
2477 NULLIFY (enum, keyword)
2480 method = trim(
enum_i2c(enum, qs_control%method_id))
2482 NULLIFY (enum, keyword)
2485 quadrature = trim(
enum_i2c(enum, qs_control%gapw_control%quadrature))
2488 "DFT_CONTROL_PARAMETERS", extension=
".Log")
2489 IF (output_unit > 0)
THEN
2490 ngrid_level =
SIZE(qs_control%e_cutoff)
2491 WRITE (unit=output_unit, fmt=
"(/,T2,A,T61,A20)") &
2492 "QS| Method:", adjustr(method)
2493 IF (qs_control%pw_grid_opt%spherical)
THEN
2494 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A)") &
2495 "QS| Density plane wave grid type",
" SPHERICAL HALFSPACE"
2496 ELSE IF (qs_control%pw_grid_opt%fullspace)
THEN
2497 WRITE (unit=output_unit, fmt=
"(T2,A,T57,A)") &
2498 "QS| Density plane wave grid type",
" NON-SPHERICAL FULLSPACE"
2500 WRITE (unit=output_unit, fmt=
"(T2,A,T57,A)") &
2501 "QS| Density plane wave grid type",
" NON-SPHERICAL HALFSPACE"
2503 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2504 "QS| Number of grid levels:",
SIZE(qs_control%e_cutoff)
2505 IF (ngrid_level == 1)
THEN
2506 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
2507 "QS| Density cutoff [a.u.]:", qs_control%e_cutoff(1)
2509 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
2510 "QS| Density cutoff [a.u.]:", qs_control%cutoff
2511 IF (qs_control%commensurate_mgrids) &
2512 WRITE (unit=output_unit, fmt=
"(T2,A)")
"QS| Using commensurate multigrids"
2513 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
2514 "QS| Multi grid cutoff [a.u.]: 1) grid level", qs_control%e_cutoff(1)
2515 WRITE (unit=output_unit, fmt=
"(T2,A,I3,A,T71,F10.1)") &
2516 (
"QS| ", igrid_level,
") grid level", &
2517 qs_control%e_cutoff(igrid_level), &
2518 igrid_level=2,
SIZE(qs_control%e_cutoff))
2520 IF (qs_control%pao)
THEN
2521 WRITE (unit=output_unit, fmt=
"(T2,A)")
"QS| PAO active"
2523 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
2524 "QS| Grid level progression factor:", qs_control%progression_factor
2525 WRITE (unit=output_unit, fmt=
"(T2,A,T71,F10.1)") &
2526 "QS| Relative density cutoff [a.u.]:", qs_control%relative_cutoff
2527 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
2528 "QS| Interaction thresholds: eps_pgf_orb:", &
2529 qs_control%eps_pgf_orb, &
2530 "QS| eps_filter_matrix:", &
2531 qs_control%eps_filter_matrix, &
2532 "QS| eps_core_charge:", &
2533 qs_control%eps_core_charge, &
2534 "QS| eps_rho_gspace:", &
2535 qs_control%eps_rho_gspace, &
2536 "QS| eps_rho_rspace:", &
2537 qs_control%eps_rho_rspace, &
2538 "QS| eps_gvg_rspace:", &
2539 qs_control%eps_gvg_rspace, &
2541 qs_control%eps_ppl, &
2544 IF (qs_control%gapw)
THEN
2545 IF (qs_control%gapw_control%accurate_xcint)
THEN
2546 WRITE (unit=output_unit, fmt=
"(T2,A,T69,F12.6)") &
2547 "QS| GAPW| XC integration using accurate scheme: Ref. exponent =", &
2548 qs_control%gapw_control%aweights
2551 SELECT CASE (qs_control%gapw_control%basis_1c)
2553 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2554 "QS| GAPW| One center basis from orbital basis primitives"
2556 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2557 "QS| GAPW| One center basis extended with primitives (small:s)"
2559 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2560 "QS| GAPW| One center basis extended with primitives (medium:sp)"
2562 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2563 "QS| GAPW| One center basis extended with primitives (large:spd)"
2565 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2566 "QS| GAPW| One center basis extended with primitives (very large:spdf)"
2568 cpabort(
"basis_1c incorrect")
2570 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
2571 "QS| GAPW| eps_fit:", &
2572 qs_control%gapw_control%eps_fit, &
2573 "QS| GAPW| eps_iso:", &
2574 qs_control%gapw_control%eps_iso, &
2575 "QS| GAPW| eps_svd:", &
2576 qs_control%gapw_control%eps_svd, &
2577 "QS| GAPW| eps_cpc:", &
2578 qs_control%gapw_control%eps_cpc
2579 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
2580 "QS| GAPW| atom-r-grid: quadrature:", &
2582 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2583 "QS| GAPW| atom-s-grid: max l :", &
2584 qs_control%gapw_control%lmax_sphere, &
2585 "QS| GAPW| max_l_rho0 :", &
2586 qs_control%gapw_control%lmax_rho0
2587 IF (qs_control%gapw_control%non_paw_atoms)
THEN
2588 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2589 "QS| GAPW| At least one kind is NOT PAW, i.e. it has only soft AO "
2591 IF (qs_control%gapw_control%nopaw_as_gpw)
THEN
2592 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2593 "QS| GAPW| The NOT PAW atoms are treated fully GPW"
2596 IF (qs_control%gapw_xc)
THEN
2597 SELECT CASE (qs_control%gapw_control%basis_1c)
2599 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2600 "QS| GAPW_XC| One center basis from orbital basis primitives"
2602 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2603 "QS| GAPW_XC| One center basis extended with primitives (small:s)"
2605 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2606 "QS| GAPW_XC| One center basis extended with primitives (medium:sp)"
2608 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2609 "QS| GAPW_XC| One center basis extended with primitives (large:spd)"
2611 WRITE (unit=output_unit, fmt=
"(T2,A)") &
2612 "QS| GAPW_XC| One center basis extended with primitives (very large:spdf)"
2614 cpabort(
"basis_1c incorrect")
2616 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
2617 "QS| GAPW_XC| eps_fit:", &
2618 qs_control%gapw_control%eps_fit, &
2619 "QS| GAPW_XC| eps_iso:", &
2620 qs_control%gapw_control%eps_iso, &
2621 "QS| GAPW_XC| eps_svd:", &
2622 qs_control%gapw_control%eps_svd
2623 WRITE (unit=output_unit, fmt=
"(T2,A,T55,A30)") &
2624 "QS| GAPW_XC|atom-r-grid: quadrature:", &
2625 enum_i2c(enum, qs_control%gapw_control%quadrature)
2626 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
2627 "QS| GAPW_XC| atom-s-grid: max l :", &
2628 qs_control%gapw_control%lmax_sphere
2630 IF (qs_control%mulliken_restraint)
THEN
2631 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
2632 "QS| Mulliken restraint target", qs_control%mulliken_restraint_control%target
2633 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
2634 "QS| Mulliken restraint strength", qs_control%mulliken_restraint_control%strength
2635 WRITE (unit=output_unit, fmt=
"(T2,A,T73,I8)") &
2636 "QS| Mulliken restraint atoms: ", qs_control%mulliken_restraint_control%natoms
2637 WRITE (unit=output_unit, fmt=
"(5I8)") qs_control%mulliken_restraint_control%atoms
2639 IF (qs_control%ddapc_restraint)
THEN
2640 DO i = 1,
SIZE(qs_control%ddapc_restraint_control)
2641 ddapc_restraint_control => qs_control%ddapc_restraint_control(i)
2642 IF (
SIZE(qs_control%ddapc_restraint_control) > 1) &
2643 WRITE (unit=output_unit, fmt=
"(T2,A,T3,I8)") &
2644 "QS| parameters for DDAPC restraint number", i
2645 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
2646 "QS| ddapc restraint target", ddapc_restraint_control%target
2647 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
2648 "QS| ddapc restraint strength", ddapc_restraint_control%strength
2649 WRITE (unit=output_unit, fmt=
"(T2,A,T73,I8)") &
2650 "QS| ddapc restraint atoms: ", ddapc_restraint_control%natoms
2651 WRITE (unit=output_unit, fmt=
"(5I8)") ddapc_restraint_control%atoms
2652 WRITE (unit=output_unit, fmt=
"(T2,A)")
"Coefficients:"
2653 WRITE (unit=output_unit, fmt=
"(5F6.2)") ddapc_restraint_control%coeff
2654 SELECT CASE (ddapc_restraint_control%functional_form)
2656 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
2657 "QS| ddapc restraint functional form :",
"RESTRAINT"
2659 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
2660 "QS| ddapc restraint functional form :",
"CONSTRAINT"
2662 cpabort(
"Unknown ddapc restraint")
2666 IF (qs_control%s2_restraint)
THEN
2667 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
2668 "QS| s2 restraint target", qs_control%s2_restraint_control%target
2669 WRITE (unit=output_unit, fmt=
"(T2,A,T73,ES8.1)") &
2670 "QS| s2 restraint strength", qs_control%s2_restraint_control%strength
2671 SELECT CASE (qs_control%s2_restraint_control%functional_form)
2673 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
2674 "QS| s2 restraint functional form :",
"RESTRAINT"
2675 cpabort(
"Not yet implemented")
2677 WRITE (unit=output_unit, fmt=
"(T2,A,T61,A20)") &
2678 "QS| s2 restraint functional form :",
"CONSTRAINT"
2680 cpabort(
"Unknown ddapc restraint")
2685 "DFT_CONTROL_PARAMETERS")
2687 CALL timestop(handle)
2705 TYPE(
section_vals_type),
OPTIONAL,
POINTER :: qs_section, ddapc_restraint_section
2707 INTEGER :: i, j, jj, k, n_rep
2708 INTEGER,
DIMENSION(:),
POINTER :: tmplist
2709 REAL(kind=
dp),
DIMENSION(:),
POINTER :: rtmplist
2713 IF (
PRESENT(ddapc_restraint_section))
THEN
2714 IF (
ASSOCIATED(qs_control%ddapc_restraint_control))
THEN
2715 IF (
SIZE(qs_control%ddapc_restraint_control) >= 2) &
2716 cpabort(
"ET_COUPLING cannot be used in combination with a normal restraint")
2718 ddapc_section => ddapc_restraint_section
2719 ALLOCATE (qs_control%ddapc_restraint_control(1))
2723 IF (
PRESENT(qs_section))
THEN
2724 NULLIFY (ddapc_section)
2729 DO i = 1,
SIZE(qs_control%ddapc_restraint_control)
2732 ddapc_restraint_control => qs_control%ddapc_restraint_control(i)
2735 r_val=ddapc_restraint_control%strength)
2737 r_val=ddapc_restraint_control%target)
2739 i_val=ddapc_restraint_control%functional_form)
2743 i_val=ddapc_restraint_control%density_type)
2748 i_rep_val=k, i_vals=tmplist)
2749 DO j = 1,
SIZE(tmplist)
2753 IF (jj < 1) cpabort(
"Need at least 1 atom to use ddapc constraints")
2754 ddapc_restraint_control%natoms = jj
2755 IF (
ASSOCIATED(ddapc_restraint_control%atoms)) &
2756 DEALLOCATE (ddapc_restraint_control%atoms)
2757 ALLOCATE (ddapc_restraint_control%atoms(ddapc_restraint_control%natoms))
2761 i_rep_val=k, i_vals=tmplist)
2762 DO j = 1,
SIZE(tmplist)
2764 ddapc_restraint_control%atoms(jj) = tmplist(j)
2768 IF (
ASSOCIATED(ddapc_restraint_control%coeff)) &
2769 DEALLOCATE (ddapc_restraint_control%coeff)
2770 ALLOCATE (ddapc_restraint_control%coeff(ddapc_restraint_control%natoms))
2771 ddapc_restraint_control%coeff = 1.0_dp
2778 i_rep_val=k, r_vals=rtmplist)
2779 DO j = 1,
SIZE(rtmplist)
2781 IF (jj > ddapc_restraint_control%natoms) &
2782 cpabort(
"Need the same number of coeff as there are atoms ")
2783 ddapc_restraint_control%coeff(jj) = rtmplist(j)
2786 IF (jj < ddapc_restraint_control%natoms .AND. jj /= 0) &
2787 cpabort(
"Need no or the same number of coeff as there are atoms.")
2790 DO i = 1,
SIZE(qs_control%ddapc_restraint_control)
2791 IF (qs_control%ddapc_restraint_control(i)%functional_form == &
2794 IF (k == 2)
CALL cp_abort(__location__, &
2795 "Only a single constraint possible yet, try to use restraints instead ")
2804 SUBROUTINE read_efield_sections(dft_control, efield_section)
2808 CHARACTER(len=default_path_length) :: file_name
2809 INTEGER :: i, io, j, n, unit_nr
2810 REAL(kind=
dp),
DIMENSION(:),
POINTER :: tmp_vals
2814 DO i = 1,
SIZE(dft_control%efield_fields)
2815 NULLIFY (dft_control%efield_fields(i)%efield)
2816 ALLOCATE (dft_control%efield_fields(i)%efield)
2817 efield => dft_control%efield_fields(i)%efield
2818 NULLIFY (efield%envelop_i_vars, efield%envelop_r_vars)
2820 r_val=efield%strength)
2824 ALLOCATE (efield%polarisation(
SIZE(tmp_vals)))
2825 efield%polarisation = tmp_vals
2827 r_val=efield%phase_offset)
2829 i_val=efield%envelop_id)
2831 r_val=efield%wavelength)
2834 efield%vec_pot_initial = tmp_vals
2837 ALLOCATE (efield%envelop_i_vars(2))
2840 i_val=efield%envelop_i_vars(1))
2842 i_val=efield%envelop_i_vars(2))
2844 ALLOCATE (efield%envelop_r_vars(2))
2847 r_val=efield%envelop_r_vars(1))
2849 r_val=efield%envelop_r_vars(2))
2850 ELSE IF (efield%envelop_id ==
ramp_env)
THEN
2851 ALLOCATE (efield%envelop_i_vars(4))
2854 i_val=efield%envelop_i_vars(1))
2856 i_val=efield%envelop_i_vars(2))
2858 i_val=efield%envelop_i_vars(3))
2860 i_val=efield%envelop_i_vars(4))
2861 ELSE IF (efield%envelop_id ==
custom_env)
THEN
2864 CALL open_file(file_name=trim(file_name), file_action=
"READ", file_status=
"OLD", unit_number=unit_nr)
2868 READ (unit_nr, *, iostat=io)
2873 ALLOCATE (efield%envelop_r_vars(n + 1))
2878 READ (unit_nr, *) efield%envelop_r_vars(j)
2879 efield%envelop_r_vars(j) =
cp_unit_to_cp2k(efield%envelop_r_vars(j),
"volt/m")
2884 END SUBROUTINE read_efield_sections
2892 SUBROUTINE read_rtp_section(dft_control, rtp_section)
2897 INTEGER :: i, j, n_elems
2898 INTEGER,
DIMENSION(:),
POINTER :: tmp
2899 LOGICAL :: is_present, local_moment_possible
2902 ALLOCATE (dft_control%rtp_control)
2904 i_val=dft_control%rtp_control%max_iter)
2906 i_val=dft_control%rtp_control%mat_exp)
2908 i_val=dft_control%rtp_control%aspc_order)
2910 r_val=dft_control%rtp_control%eps_exp)
2912 i_val=dft_control%rtp_control%rtp_method)
2914 i_val=dft_control%rtp_control%rtbse_ham)
2916 i_val=dft_control%rtp_control%propagator)
2918 r_val=dft_control%rtp_control%eps_ener)
2920 i_val=dft_control%rtp_control%initial_wfn)
2922 l_val=dft_control%rtp_control%hfx_redistribute)
2924 l_val=dft_control%rtp_control%apply_wfn_mix_init_restart)
2926 l_val=dft_control%rtp_control%apply_delta_pulse)
2928 l_val=dft_control%rtp_control%apply_delta_pulse_mag)
2930 l_val=dft_control%rtp_control%velocity_gauge)
2932 l_val=dft_control%rtp_control%nl_gauge_transform)
2934 l_val=dft_control%rtp_control%periodic)
2936 l_val=dft_control%rtp_control%linear_scaling)
2938 i_val=dft_control%rtp_control%mcweeny_max_iter)
2940 i_val=dft_control%rtp_control%acc_ref)
2942 r_val=dft_control%rtp_control%mcweeny_eps)
2944 r_val=dft_control%rtp_control%delta_pulse_scale)
2947 dft_control%rtp_control%delta_pulse_direction = tmp
2949 i_val=dft_control%rtp_control%sc_check_start)
2952 IF (is_present)
THEN
2953 IF (dft_control%rtp_control%linear_scaling) &
2954 CALL cp_abort(__location__, &
2955 "You have defined a time dependent projection of mos, but "// &
2956 "only the density matrix is propagated (DENSITY_PROPAGATION "// &
2957 ".TRUE.). Please either use MO-based real time DFT or do not "// &
2958 "define any PRINT%PROJECTION_MO section")
2959 dft_control%rtp_control%is_proj_mo = .true.
2961 dft_control%rtp_control%is_proj_mo = .false.
2964 local_moment_possible = (dft_control%rtp_control%rtp_method ==
rtp_method_bse) .OR. &
2965 ((.NOT. dft_control%rtp_control%periodic) .AND. dft_control%rtp_control%linear_scaling)
2970 dft_control%rtp_control%save_local_moments = &
2971 is_present .OR. dft_control%rtp_control%save_local_moments
2972 IF (is_present .AND. (.NOT. local_moment_possible))
THEN
2973 CALL cp_abort(__location__,
"Moments trace printing only "// &
2974 "implemented in non-periodic systems in linear scaling. "// &
2975 "Please use DFT%PRINT%MOMENTS for other printing.")
2978 i_val=dft_control%rtp_control%moment_trace_ref_type)
2980 r_vals=dft_control%rtp_control%moment_trace_user_ref_point)
2985 dft_control%rtp_control%save_local_moments = &
2986 is_present .OR. dft_control%rtp_control%save_local_moments
2987 IF (is_present .AND. (.NOT. local_moment_possible))
THEN
2989 CALL cp_abort(__location__,
"Moments Fourier transform printing "// &
2990 "implemented only for non-periodic systems in linear scaling.")
2994 r_val=dft_control%rtp_control%ft_damping)
2996 r_val=dft_control%rtp_control%ft_t0)
3000 l_val=dft_control%rtp_control%pade_requested)
3002 r_val=dft_control%rtp_control%pade_e_min)
3004 r_val=dft_control%rtp_control%pade_e_step)
3006 r_val=dft_control%rtp_control%pade_e_max)
3008 r_val=dft_control%rtp_control%pade_fit_e_min)
3010 r_val=dft_control%rtp_control%pade_fit_e_max)
3012 IF (dft_control%rtp_control%pade_fit_e_min < 0)
THEN
3013 dft_control%rtp_control%pade_fit_e_min = dft_control%rtp_control%pade_e_min
3015 IF (dft_control%rtp_control%pade_fit_e_max < 0)
THEN
3016 dft_control%rtp_control%pade_fit_e_max = dft_control%rtp_control%pade_e_max
3022 dft_control%rtp_control%save_local_moments = &
3023 is_present .OR. dft_control%rtp_control%save_local_moments
3024 IF (is_present .AND. (.NOT. local_moment_possible))
THEN
3026 CALL cp_abort(__location__,
"Polarizability printing "// &
3027 "implemented only for non-periodic systems.")
3030 NULLIFY (dft_control%rtp_control%print_pol_elements)
3031 IF (is_present)
THEN
3034 ALLOCATE (dft_control%rtp_control%print_pol_elements(n_elems, 2))
3037 dft_control%rtp_control%print_pol_elements(i, :) = tmp(:)
3042 IF (dft_control%rtp_control%print_pol_elements(i, j) > 3 .OR. &
3043 dft_control%rtp_control%print_pol_elements(i, j) < 1) &
3044 cpabort(
"Polarisation tensor element not 1,2 or 3 in at least one index")
3051 dft_control%rtp_control%save_local_moments = &
3052 dft_control%rtp_control%save_local_moments .OR. &
3053 ((.NOT. dft_control%rtp_control%periodic) .AND. dft_control%rtp_control%linear_scaling)
3055 END SUBROUTINE read_rtp_section
3063 SUBROUTINE guess_pol_elements(dftc, elems)
3065 INTEGER,
DIMENSION(:, :),
POINTER :: elems
3067 INTEGER :: i, i_nonzero, n_nonzero
3068 LOGICAL :: pol_vector_known
3069 REAL(kind=
dp),
DIMENSION(3) :: pol_vector
3071 pol_vector_known = .false.
3074 IF (dftc%rtp_control%apply_delta_pulse .OR. dftc%rtp_control%apply_delta_pulse_mag)
THEN
3075 pol_vector(:) = real(dftc%rtp_control%delta_pulse_direction(:), kind=
dp)
3078 pol_vector(:) = dftc%efield_fields(1)%efield%polarisation(:)
3080 IF (dot_product(pol_vector, pol_vector) > 0.0_dp) pol_vector_known = .true.
3082 IF (.NOT. pol_vector_known)
THEN
3083 cpabort(
"Cannot guess polarization elements - please specify!")
3088 IF (pol_vector(i) /= 0.0_dp)
THEN
3089 n_nonzero = n_nonzero + 1
3093 IF (n_nonzero > 1)
THEN
3094 CALL cp_abort(__location__, &
3095 "More than one non-zero field elements - "// &
3096 "cannot guess polarizability elements - please specify!")
3097 ELSE IF (n_nonzero == 0)
THEN
3098 CALL cp_abort(__location__, &
3099 "No non-zero field elements - "// &
3100 "cannot guess polarizability elements - please specify!")
3104 ALLOCATE (elems(3, 2))
3107 elems(i, 2) = i_nonzero
3111 END SUBROUTINE guess_pol_elements
3118 SUBROUTINE read_admm_block_list(admm_control, dft_section)
3122 INTEGER :: irep, list_size, n_rep
3123 INTEGER,
DIMENSION(:),
POINTER :: tmplist
3130 ALLOCATE (admm_control%blocks(n_rep))
3134 i_rep_val=irep, i_vals=tmplist)
3135 list_size =
SIZE(tmplist)
3136 ALLOCATE (admm_control%blocks(irep)%list(list_size))
3137 admm_control%blocks(irep)%list(:) = tmplist(:)
3140 END SUBROUTINE read_admm_block_list
3149 SUBROUTINE read_hairy_probes_sections(dft_control, hairy_probes_section)
3153 INTEGER :: i, j, jj, kk, n_rep
3154 INTEGER,
DIMENSION(:),
POINTER :: tmplist
3156 DO i = 1,
SIZE(dft_control%probe)
3157 NULLIFY (dft_control%probe(i)%atom_ids)
3162 CALL section_vals_val_get(hairy_probes_section,
"ATOM_IDS", i_rep_section=i, i_rep_val=kk, i_vals=tmplist)
3163 jj = jj +
SIZE(tmplist)
3166 dft_control%probe(i)%natoms = jj
3167 IF (dft_control%probe(i)%natoms < 1) &
3168 cpabort(
"Need at least 1 atom to use hair probes formalism")
3169 ALLOCATE (dft_control%probe(i)%atom_ids(dft_control%probe(i)%natoms))
3173 CALL section_vals_val_get(hairy_probes_section,
"ATOM_IDS", i_rep_section=i, i_rep_val=kk, i_vals=tmplist)
3174 DO j = 1,
SIZE(tmplist)
3176 dft_control%probe(i)%atom_ids(jj) = tmplist(j)
3180 CALL section_vals_val_get(hairy_probes_section,
"MU", i_rep_section=i, r_val=dft_control%probe(i)%mu)
3182 CALL section_vals_val_get(hairy_probes_section,
"T", i_rep_section=i, r_val=dft_control%probe(i)%T)
3184 CALL section_vals_val_get(hairy_probes_section,
"ALPHA", i_rep_section=i, r_val=dft_control%probe(i)%alpha)
3186 CALL section_vals_val_get(hairy_probes_section,
"eps_hp", i_rep_section=i, r_val=dft_control%probe(i)%eps_hp)
3189 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 yin2017
integer, save, public stewart2007
integer, save, public caldeweyher2020
integer, save, public stengel2009
integer, save, public vandevondele2005a
integer, save, public caldeweyher2017
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 asgeirsson2017
integer, save, public rocha2006
integer, save, public lippert1997
integer, save, public fattebert2002
integer, save, public thiel1992
integer, save, public pracht2019
integer, save, public porezag1995
integer, save, public bannwarth2019
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
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_tddfpt2_control(t_control, t_section, qs_control)
Read TDDFPT-related input parameters.
subroutine, public read_dft_control(dft_control, dft_section)
...
subroutine, public read_qs_section(qs_control, qs_section)
...
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.
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 of a logger, at the moment it contains just a print level starting at which level it should be l...