228#include "./base/base_uses.f90"
235 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_environment'
261 SUBROUTINE qs_init(qs_env, para_env, root_section, globenv, cp_subsys, kpoint_env, &
262 qmmm, qmmm_env_qm, force_env_section, subsys_section, &
263 use_motion_section, silent, multip, charge)
271 LOGICAL,
INTENT(IN),
OPTIONAL :: qmmm
274 LOGICAL,
INTENT(IN) :: use_motion_section
275 LOGICAL,
INTENT(IN),
OPTIONAL :: silent
276 INTEGER,
INTENT(IN),
OPTIONAL :: multip, charge
278 CHARACTER(LEN=default_string_length) :: basis_type
279 INTEGER :: ikind, method_id, nelectron_total, &
280 nkind, nkp_grid(3), tddfpt_kernel
281 LOGICAL :: dftb_kpoint_sym_restricted, do_active_space, do_admm, do_admm_rpa, do_bse, &
282 do_debug_fdiff, do_debug_forces, do_debug_stress_tensor, do_dftb_scc, do_dftb_scc_high_l, &
283 do_ec_hfx, do_et, do_exx, do_gw, do_hfx, do_kpoints, do_linear_response, do_mp2, &
284 do_ri_mp2, do_ri_rpa, do_ri_sos_mp2, do_tddfpt, do_tddfpt_unsupported_kpoints, &
285 do_wfc_low_scaling, do_wfc_low_scaling_kpoints, do_xtb_tblite, final_kpoint_reinit, &
286 is_identical, is_semi, kpoint_verbose, mp2_present, my_qmmm, owned_kpoints, qmmm_decoupl, &
287 same_except_frac, use_real_wfn, use_ref_cell
288 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rtmat
290 TYPE(
cell_type),
POINTER :: my_cell, my_cell_ref
300 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
306 TYPE(
section_vals_type),
POINTER :: active_space_section, admm_section, dft_section, &
307 ec_hfx_section, ec_section, et_coupling_section, gw_section, hfx_section, kpoint_section, &
308 mp2_section, rpa_hfx_section, tddfpt_section, transport_section
310 NULLIFY (my_cell, my_cell_ref, atomic_kind_set, particle_set, &
311 qs_kind_set, kpoint_section, dft_section, ec_section, &
312 subsys, ks_env, dft_control, blacs_env)
314 CALL set_qs_env(qs_env, input=force_env_section)
315 IF (.NOT.
ASSOCIATED(subsys_section))
THEN
321 IF (
PRESENT(qmmm)) my_qmmm = qmmm
322 qmmm_decoupl = .false.
323 IF (
PRESENT(qmmm_env_qm))
THEN
327 qmmm_decoupl = my_qmmm .AND. qmmm_env_qm%periodic .AND. qmmm_env_qm%multipole
329 qs_env%qmmm_env_qm => qmmm_env_qm
335 SELECT CASE (method_id)
348 force_env_section=force_env_section, &
349 subsys_section=subsys_section, &
350 use_motion_section=use_motion_section, &
351 root_section=root_section, &
352 cp_subsys=cp_subsys, &
353 elkind=is_semi, silent=silent)
362 cell_ref=my_cell_ref, &
363 use_ref_cell=use_ref_cell, &
364 atomic_kind_set=atomic_kind_set, &
365 qs_kind_set=qs_kind_set, &
366 particle_set=particle_set)
369 IF (
PRESENT(globenv))
THEN
371 globenv%blacs_repeatable)
380 force_env_section, subsys_section, para_env)
383 IF (
PRESENT(kpoint_env))
THEN
384 owned_kpoints = .false.
385 kpoints => kpoint_env
386 CALL set_qs_env(qs_env=qs_env, kpoints=kpoints)
389 owned_kpoints = .true.
392 CALL set_qs_env(qs_env=qs_env, kpoints=kpoints)
409 IF (.NOT. do_gw)
THEN
414 do_tddfpt_unsupported_kpoints = .false.
421 IF (.NOT. do_tddfpt_unsupported_kpoints)
THEN
423 IF (use_real_wfn)
THEN
424 CALL cp_abort(__location__,
"K-point TDDFPT requires complex wavefunctions.")
428 IF (.NOT. do_bse)
THEN
431 IF (.NOT. do_bse)
THEN
435 do_active_space = .false.
438 do_xtb_tblite = .false.
443 do_dftb_scc = .false.
448 do_linear_response = .false.
450 do_debug_fdiff = .false.
451 IF (
PRESENT(globenv)) do_debug_fdiff = globenv%run_type_id ==
debug_run
452 IF (do_debug_fdiff .AND.
PRESENT(root_section))
THEN
454 l_val=do_debug_forces)
456 l_val=do_debug_stress_tensor)
457 do_debug_fdiff = do_debug_forces .OR. do_debug_stress_tensor
461 do_ri_sos_mp2 = .false.
463 do_wfc_low_scaling = .false.
464 do_wfc_low_scaling_kpoints = .false.
467 IF (mp2_present)
THEN
472 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%RI_SOS_MP2%_SECTION_PARAMETERS_", &
476 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%LOW_SCALING%_SECTION_PARAMETERS_", &
477 l_val=do_wfc_low_scaling)
479 l_val=do_wfc_low_scaling_kpoints)
480 IF (.NOT. do_bse)
THEN
482 "DFT%XC%WF_CORRELATION%RI_RPA%GW%BSE%_SECTION_PARAMETERS_", &
486 CALL restrict_unsupported_atomic_kpoint_symmetry(kpoints, method_id, do_hfx, do_exx, do_gw, &
487 do_tddfpt_unsupported_kpoints, &
488 do_active_space, do_linear_response, &
490 do_mp2 .OR. do_ri_mp2 .OR. do_ri_sos_mp2, &
491 do_ri_rpa .AND. .NOT. do_gw, do_bse, &
492 do_wfc_low_scaling, do_wfc_low_scaling_kpoints, &
493 do_xtb_tblite, do_admm, .false.)
497 CALL qs_init_subsys(qs_env, para_env, subsys, my_cell, my_cell_ref, use_ref_cell, &
498 subsys_section, silent=silent, multip=multip, charge=charge)
500 CALL get_qs_env(qs_env, dft_control=dft_control)
501 IF (owned_kpoints)
THEN
502 do_dftb_scc_high_l = .false.
504 do_dftb_scc_high_l = dftb_kind_set_has_high_l(qs_kind_set)
506 CALL restrict_unsupported_atomic_kpoint_symmetry(kpoints, method_id, do_hfx, do_exx, do_gw, &
507 do_tddfpt_unsupported_kpoints, &
508 do_active_space, do_linear_response, &
510 do_mp2 .OR. do_ri_mp2 .OR. do_ri_sos_mp2, &
511 do_ri_rpa .AND. .NOT. do_gw, do_bse, &
512 do_wfc_low_scaling, do_wfc_low_scaling_kpoints, &
513 do_xtb_tblite, do_admm, do_dftb_scc_high_l, &
514 restricted=dftb_kpoint_sym_restricted)
515 final_kpoint_reinit = dftb_kpoint_sym_restricted .OR. kpoint_verbose
516 IF (final_kpoint_reinit)
THEN
524 IF (method_id ==
do_method_lrigpw .OR. dft_control%qs_control%lri_optbas)
THEN
525 CALL get_qs_env(qs_env=qs_env, lri_env=lri_env)
528 CALL cp_warn(__location__,
"Experimental code: "// &
529 "RIGPW should only be used for testing.")
530 CALL get_qs_env(qs_env=qs_env, lri_env=lri_env)
534 IF (my_qmmm .AND.
PRESENT(qmmm_env_qm) .AND. .NOT. dft_control%qs_control%commensurate_mgrids)
THEN
536 CALL cp_abort(__location__,
"QM/MM with coupling GAUSS or S-WAVE requires "// &
537 "keyword FORCE_EVAL/DFT/MGRID/COMMENSURATE to be enabled.")
542 CALL get_qs_env(qs_env=qs_env, do_kpoints=do_kpoints, blacs_env=blacs_env)
544 IF (dft_control%qs_control%do_ls_scf)
THEN
545 cpabort(
"DFT%KPOINTS are not implemented with QS/LS_SCF; use a real-space supercell instead.")
549 CALL get_qs_env(qs_env=qs_env, wf_history=wf_history)
560 CALL get_qs_env(qs_env, dft_control=dft_control, scf_control=scf_control, nelectron_total=nelectron_total)
565 IF (dft_control%do_admm)
THEN
566 basis_type =
'AUX_FIT'
570 CALL hfx_create(qs_env%x_data, para_env, hfx_section, atomic_kind_set, &
571 qs_kind_set, particle_set, dft_control, my_cell, orb_basis=basis_type, &
572 nelectron_total=nelectron_total, nkp_grid=nkp_grid)
577 IF (mp2_present)
THEN
578 cpassert(
ASSOCIATED(qs_env%mp2_env))
591 qs_env%mp2_env%ri_rpa%reuse_hfx = .true.
592 IF (.NOT. do_hfx) qs_env%mp2_env%ri_rpa%reuse_hfx = .false.
594 IF (.NOT. (is_identical .OR. same_except_frac)) qs_env%mp2_env%ri_rpa%reuse_hfx = .false.
595 IF (dft_control%do_admm .AND. .NOT. do_admm_rpa) qs_env%mp2_env%ri_rpa%reuse_hfx = .false.
597 IF (.NOT. qs_env%mp2_env%ri_rpa%reuse_hfx)
THEN
598 IF (do_admm_rpa)
THEN
599 basis_type =
'AUX_FIT'
603 CALL hfx_create(qs_env%mp2_env%ri_rpa%x_data, para_env, rpa_hfx_section, atomic_kind_set, &
604 qs_kind_set, particle_set, dft_control, my_cell, orb_basis=basis_type, &
605 nelectron_total=nelectron_total)
607 qs_env%mp2_env%ri_rpa%x_data => qs_env%x_data
612 IF (dft_control%qs_control%do_kg)
THEN
614 CALL kg_env_create(qs_env, qs_env%kg_env, qs_kind_set, qs_env%input)
619 l_val=qs_env%excited_state)
620 NULLIFY (exstate_env)
621 CALL exstate_create(exstate_env, qs_env%excited_state, dft_section)
622 CALL set_qs_env(qs_env, exstate_env=exstate_env)
625 "PROPERTIES%ET_COUPLING")
631 IF (qs_env%do_transport)
THEN
635 CALL get_qs_env(qs_env, harris_env=harris_env)
636 IF (qs_env%harris_method)
THEN
638 CALL get_qs_env(qs_env, local_particles=local_particles)
639 CALL harris_rhoin_init(harris_env%rhoin,
"RHOIN", qs_kind_set, atomic_kind_set, &
640 local_particles, dft_control%nspins)
648 l_val=qs_env%energy_correction)
653 IF (qs_env%energy_correction)
THEN
658 IF (ec_env%do_ec_hfx)
THEN
661 IF (ec_env%do_kpoints)
THEN
662 CALL cp_abort(__location__, &
663 "Energy correction methods with hybrid functionals "// &
664 "and kpoints is not yet available.")
668 IF (ec_env%basis_inconsistent)
THEN
669 CALL cp_abort(__location__, &
670 "Energy correction methods with hybrid functionals: "// &
671 "correction and ground state need to use the same basis. "// &
672 "Checked by comparing basis set names only.")
676 IF (ec_env%do_ec_admm .AND. .NOT. dft_control%do_admm)
THEN
677 CALL cp_abort(__location__,
"Need an ADMM input section for ADMM EC to work")
680 ec_env%reuse_hfx = .true.
681 IF (.NOT. do_hfx) ec_env%reuse_hfx = .false.
683 IF (.NOT. (is_identical .OR. same_except_frac)) ec_env%reuse_hfx = .false.
684 IF (dft_control%do_admm .AND. .NOT. ec_env%do_ec_admm) ec_env%reuse_hfx = .false.
686 IF (.NOT. ec_env%reuse_hfx)
THEN
687 IF (ec_env%do_ec_admm)
THEN
688 basis_type =
'AUX_FIT'
692 CALL hfx_create(ec_env%x_data, para_env, ec_hfx_section, atomic_kind_set, &
693 qs_kind_set, particle_set, dft_control, my_cell, orb_basis=basis_type, &
694 nelectron_total=nelectron_total)
696 ec_env%x_data => qs_env%x_data
705 IF (dft_control%qs_control%do_almo_scf)
THEN
710 CALL get_qs_env(qs_env, rel_control=rel_control)
711 IF (rel_control%rel_method /=
rel_none)
THEN
713 nkind =
SIZE(atomic_kind_set)
717 IF (
ASSOCIATED(rtmat))
CALL set_qs_kind(qs_kind_set(ikind), reltmat=rtmat)
745 SUBROUTINE restrict_unsupported_atomic_kpoint_symmetry(kpoints, method_id, do_hfx, do_exx, do_gw, &
746 do_tddfpt, do_active_space, do_linear_response, &
748 do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
749 do_wfc_low_scaling_kpoints, do_xtb_tblite, &
750 do_admm, do_dftb_scc_high_l, restricted)
752 INTEGER,
INTENT(IN) :: method_id
753 LOGICAL,
INTENT(IN) :: do_hfx, do_exx, do_gw, do_tddfpt, do_active_space, &
754 do_linear_response, do_debug_fdiff, do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
755 do_wfc_low_scaling_kpoints, do_xtb_tblite, do_admm, do_dftb_scc_high_l
756 LOGICAL,
INTENT(OUT),
OPTIONAL :: restricted
758 CHARACTER(LEN=default_string_length) :: kp_scheme, reason
759 LOGICAL :: full_grid, inversion_symmetry_only, &
762 IF (
PRESENT(restricted)) restricted = .false.
764 reason = unsupported_kpoint_method_reason(method_id, do_gw, do_tddfpt, do_linear_response, &
765 do_mp2, do_bse, do_xtb_tblite)
766 IF (len_trim(reason) > 0)
THEN
768 IF (len_trim(kp_scheme) > 0 .AND. trim(kp_scheme) /=
"NONE")
THEN
769 IF (trim(reason) ==
"GW")
THEN
770 CALL cp_abort(__location__, &
771 "DFT%KPOINTS are not supported with GW; use "// &
772 "WF_CORRELATION%LOW_SCALING%KPOINTS and RI_RPA%GW%KPOINTS_SELF_ENERGY "// &
773 "for GW k-point sampling.")
775 CALL cp_abort(__location__, &
776 "DFT%KPOINTS are not supported with "//trim(reason)// &
777 "; remove DFT%KPOINTS for these calculations.")
781 IF (do_active_space)
THEN
783 IF (len_trim(kp_scheme) > 0 .AND. trim(kp_scheme) /=
"NONE" .AND. &
784 trim(kp_scheme) /=
"GAMMA")
THEN
785 CALL cp_abort(__location__, &
786 "Only Gamma-point DFT%KPOINTS are supported with ACTIVE_SPACE; "// &
787 "use SCHEME GAMMA, SCHEME NONE, or remove DFT%KPOINTS.")
791 CALL get_kpoint_info(kpoints, symmetry=kpoint_symmetry, full_grid=full_grid, &
792 inversion_symmetry_only=inversion_symmetry_only)
793 IF (.NOT. (kpoint_symmetry .AND. .NOT. full_grid .AND. .NOT. inversion_symmetry_only))
RETURN
795 reason = unsupported_atomic_kpoint_symmetry_reason(method_id, do_hfx, do_exx, do_gw, &
796 do_tddfpt, do_active_space, do_linear_response, &
798 do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
799 do_wfc_low_scaling_kpoints, do_xtb_tblite, &
800 do_admm, do_dftb_scc_high_l)
801 IF (len_trim(reason) == 0)
RETURN
803 CALL cp_warn(__location__, &
804 "Atomic k-point symmetry is currently not implemented for "//trim(reason)// &
805 "; restricting to inversion/time-reversal symmetry.")
807 IF (
PRESENT(restricted)) restricted = .true.
809 END SUBROUTINE restrict_unsupported_atomic_kpoint_symmetry
822 FUNCTION unsupported_kpoint_method_reason(method_id, do_gw, do_tddfpt, do_linear_response, &
823 do_mp2, do_bse, do_xtb_tblite)
RESULT(reason)
824 INTEGER,
INTENT(IN) :: method_id
825 LOGICAL,
INTENT(IN) :: do_gw, do_tddfpt, do_linear_response, &
826 do_mp2, do_bse, do_xtb_tblite
827 CHARACTER(LEN=default_string_length) :: reason
832 mark_used(do_xtb_tblite)
839 reason =
"TDDFPT/TDDFT"
842 IF (do_linear_response)
THEN
843 reason =
"LINEAR_RESPONSE/DFPT"
846 SELECT CASE (method_id)
853 reason =
"semiempirical methods"
858 END FUNCTION unsupported_kpoint_method_reason
880 FUNCTION unsupported_atomic_kpoint_symmetry_reason(method_id, do_hfx, do_exx, do_gw, do_tddfpt, &
881 do_active_space, do_linear_response, do_debug_fdiff, &
882 do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
883 do_wfc_low_scaling_kpoints, do_xtb_tblite, &
884 do_admm, do_dftb_scc_high_l)
RESULT(reason)
885 INTEGER,
INTENT(IN) :: method_id
886 LOGICAL,
INTENT(IN) :: do_hfx, do_exx, do_gw, do_tddfpt, do_active_space, &
887 do_linear_response, do_debug_fdiff, do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
888 do_wfc_low_scaling_kpoints, do_xtb_tblite, do_admm, do_dftb_scc_high_l
889 CHARACTER(LEN=default_string_length) :: reason
892 mark_used(do_debug_fdiff)
893 mark_used(do_xtb_tblite)
895 SELECT CASE (method_id)
897 IF (do_dftb_scc_high_l) reason =
"SCC-DFTB with d orbitals"
904 reason =
"semiempirical methods"
909 IF (len_trim(reason) > 0)
RETURN
910 IF ((do_hfx .OR. do_exx) .AND. do_admm)
THEN
911 reason =
"HFX/HF with ADMM"
912 ELSE IF (do_bse)
THEN
916 ELSE IF (do_tddfpt)
THEN
917 reason =
"TDDFPT/TDDFT"
918 ELSE IF (do_active_space)
THEN
919 reason =
"ACTIVE_SPACE"
920 ELSE IF (do_linear_response)
THEN
921 reason =
"LINEAR_RESPONSE/DFPT"
922 ELSE IF (do_mp2)
THEN
924 ELSE IF (do_rpa .AND. do_wfc_low_scaling_kpoints)
THEN
925 reason =
"LOW_SCALING RPA"
926 ELSE IF (do_wfc_low_scaling)
THEN
927 reason =
"LOW_SCALING WF_CORRELATION"
928 ELSE IF (do_rpa)
THEN
932 END FUNCTION unsupported_atomic_kpoint_symmetry_reason
939 FUNCTION dftb_kind_set_has_high_l(qs_kind_set)
RESULT(has_high_l)
940 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
941 LOGICAL :: has_high_l
943 INTEGER :: ikind, lmax
944 LOGICAL :: any_defined, defined
948 IF (.NOT.
ASSOCIATED(qs_kind_set))
RETURN
950 any_defined = .false.
951 DO ikind = 1,
SIZE(qs_kind_set)
952 NULLIFY (dftb_parameter)
953 CALL get_qs_kind(qs_kind_set(ikind), dftb_parameter=dftb_parameter)
954 IF (.NOT.
ASSOCIATED(dftb_parameter)) cycle
958 IF (.NOT. defined) cycle
963 IF (any_defined) has_high_l = .false.
965 END FUNCTION dftb_kind_set_has_high_l
981 SUBROUTINE qs_init_subsys(qs_env, para_env, subsys, cell, cell_ref, use_ref_cell, subsys_section, &
982 silent, multip, charge)
987 TYPE(
cell_type),
POINTER :: cell, cell_ref
988 LOGICAL,
INTENT(in) :: use_ref_cell
990 LOGICAL,
INTENT(in),
OPTIONAL :: silent
991 INTEGER,
INTENT(IN),
OPTIONAL :: multip, charge
993 CHARACTER(len=*),
PARAMETER :: routinen =
'qs_init_subsys'
995 CHARACTER(len=2) :: element_symbol
996 INTEGER :: gfn_type, handle, ikind, ispin, iw, lmax_sphere, maxl, maxlgto, maxlgto_lri, &
997 maxlgto_nuc, maxlppl, maxlppnl, method_id, multiplicity, my_ival, n_ao, n_mo_add, natom, &
998 nelectron, ngauss, nkind, nlumo_dos, nlumo_molden, nlumo_required, output_unit, &
999 sort_basis, tnadd_method
1000 INTEGER,
DIMENSION(2) :: n_mo, nelectron_spin
1001 INTEGER,
DIMENSION(5) :: occ
1002 INTEGER,
DIMENSION(:),
POINTER :: mo_index_range
1003 LOGICAL :: all_potential_present, be_silent, cneo_potential_present, do_kpoints, do_ri_hfx, &
1004 do_ri_mp2, do_ri_rpa, do_ri_sos_mp2, do_rpa_ri_exx, do_wfc_im_time, e1terms, &
1005 has_unit_metric, lribas, mp2_present, orb_gradient, paw_atom
1006 REAL(kind=
dp) :: alpha, ccore, ewald_rcut, fxx, maxocc, &
1007 rc, rcut, total_zeff_corr, &
1008 verlet_skin, zeff_correction
1019 rhoin_basis, ri_aux_basis_set, &
1020 ri_hfx_basis, ri_xas_basis, &
1025 TYPE(
mo_set_type),
DIMENSION(:),
POINTER :: mos, mos_last_converged
1034 POINTER :: dftb_potential
1039 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
1047 TYPE(
section_vals_type),
POINTER :: dft_section, et_coupling_section, et_ddapc_section, &
1048 ewald_section, harris_section, lri_section, mp2_section, nl_section, poisson_section, &
1049 pp_section, print_section, qs_section, rixs_section, se_section, tddfpt_section, &
1055 CALL timeset(routinen, handle)
1061 IF (
PRESENT(silent)) be_silent = silent
1066 NULLIFY (mos, se_taper)
1067 NULLIFY (dft_control)
1070 NULLIFY (local_molecules)
1071 NULLIFY (local_particles)
1072 NULLIFY (scf_control)
1073 NULLIFY (dft_section)
1074 NULLIFY (et_coupling_section)
1076 NULLIFY (mos_last_converged)
1085 qs_kind_set=qs_kind_set, &
1086 atomic_kind_set=atomic_kind_set, &
1087 molecule_set=molecule_set, &
1088 molecule_kind_set=molecule_kind_set)
1094 dft_control%qs_control%periodicity = sum(cell%perd)
1100 IF (.NOT. be_silent)
THEN
1103 SELECT CASE (method_id)
1112 IF (dft_control%qs_control%xtb_control%do_tblite)
THEN
1113 CALL tblite_header(iw, dft_control%qs_control%xtb_control%tblite_method)
1115 gfn_type = dft_control%qs_control%xtb_control%gfn_type
1120 "PRINT%PROGRAM_BANNER")
1123 IF (dft_control%do_sccs .AND. dft_control%qs_control%gapw)
THEN
1124 cpabort(
"SCCS is not yet implemented with GAPW")
1126 CALL get_qs_env(qs_env=qs_env, do_kpoints=do_kpoints)
1127 IF (do_kpoints)
THEN
1128 IF (dft_control%nspins == 2 .AND. dft_control%qs_control%xtb .AND. &
1129 .NOT. dft_control%qs_control%xtb_control%do_tblite .AND. &
1130 dft_control%qs_control%xtb_control%gfn_type ==
gfn1xtb .AND. &
1132 .NOT. dft_control%qs_control%xtb_control%tblite_mixer_damping_explicit)
THEN
1133 CALL cp_warn(__location__, &
1134 "Reducing XTB/TBLITE_MIXER/DAMPING to 0.25 for CP2K-internal GFN1-xTB "// &
1135 "UKS k-point calculations with SCC_MIXER TBLITE. Set XTB/TBLITE_MIXER/DAMPING "// &
1136 "explicitly to override this conservative fallback.")
1137 dft_control%qs_control%xtb_control%tblite_mixer_damping = 0.25_dp
1140 SELECT CASE (dft_control%qs_control%wf_interpolation_method_nr)
1142 CALL cp_warn(__location__,
"Linear WFN-based extrapolation methods are not "// &
1143 "implemented for k-points. Switching to USE_PREV_WF.")
1150 dft_control%qs_control%et_coupling_calc = .false.
1153 dft_control%qs_control%et_coupling_calc = .true.
1154 dft_control%qs_control%ddapc_restraint = .true.
1155 CALL read_ddapc_section(dft_control%qs_control, ddapc_restraint_section=et_ddapc_section)
1165 IF (qs_env%do_rixs)
THEN
1166 CALL read_rixs_control(dft_control%rixs_control, rixs_section, dft_control%qs_control)
1172 ALLOCATE (rel_control)
1175 CALL set_qs_env(qs_env, rel_control=rel_control)
1180 NULLIFY (ewald_env, ewald_pw, dftb_potential)
1181 dftb_control => dft_control%qs_control%dftb_control
1182 CALL qs_dftb_param_init(atomic_kind_set, qs_kind_set, dftb_control, dftb_potential, &
1183 subsys_section=subsys_section, para_env=para_env)
1184 CALL set_qs_env(qs_env, dftb_potential=dftb_potential)
1186 IF (dftb_control%do_ewald)
THEN
1187 ALLOCATE (ewald_env)
1190 CALL ewald_env_set(ewald_env, poisson_section=poisson_section)
1195 cell_periodic=cell%perd)
1197 CALL ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section=print_section)
1198 CALL set_qs_env(qs_env, ewald_env=ewald_env, ewald_pw=ewald_pw)
1200 ELSE IF (dft_control%qs_control%method_id ==
do_method_xtb)
THEN
1202 xtb_control => dft_control%qs_control%xtb_control
1204 IF (xtb_control%do_tblite)
THEN
1209 xtb_control%tblite_accuracy, xtb_control%tblite_param_file)
1211 CALL tb_init_wf(qs_env%tb_tblite, dft_control)
1214 qs_kind => qs_kind_set(ikind)
1216 cpassert(.NOT.
ASSOCIATED(qs_kind%xtb_parameter))
1219 CALL get_qs_kind(qs_kind, element_symbol=element_symbol)
1221 NULLIFY (tmp_basis_set)
1222 CALL tb_get_basis(qs_env%tb_tblite, tmp_basis_set, element_symbol, qs_kind%xtb_parameter, occ)
1227 zeff_correction = 0.0_dp
1229 zeff=real(sum(occ),
dp), zeff_correction=zeff_correction)
1232 NULLIFY (ewald_env, ewald_pw)
1234 qs_kind => qs_kind_set(ikind)
1236 cpassert(.NOT.
ASSOCIATED(qs_kind%xtb_parameter))
1239 gfn_type = dft_control%qs_control%xtb_control%gfn_type
1240 CALL get_qs_kind(qs_kind, element_symbol=element_symbol)
1242 xtb_control%parameter_file_path, xtb_control%parameter_file_name, &
1244 IF (xtb_control%do_spinpol)
THEN
1246 xtb_control%parameter_file_path, xtb_control%spinpol_param_file_name, &
1253 NULLIFY (tmp_basis_set)
1254 IF (qs_kind%xtb_parameter%z == 1)
THEN
1256 ngauss = xtb_control%h_sto_ng
1258 ngauss = xtb_control%sto_ng
1260 IF (qs_kind%xtb_parameter%defined)
THEN
1261 CALL init_xtb_basis(qs_kind%xtb_parameter, tmp_basis_set, ngauss)
1265 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
1266 DEALLOCATE (qs_kind%all_potential%elec_conf)
1267 DEALLOCATE (qs_kind%all_potential)
1271 IF (qs_kind%xtb_parameter%defined)
THEN
1272 zeff_correction = 0.0_dp
1274 zeff=qs_kind%xtb_parameter%zeff, zeff_correction=zeff_correction)
1275 CALL get_potential(qs_kind%all_potential, alpha_core_charge=alpha)
1276 ccore = qs_kind%xtb_parameter%zeff*sqrt((alpha/
pi)**3)
1277 CALL set_potential(qs_kind%all_potential, ccore_charge=ccore)
1278 qs_kind%xtb_parameter%zeff = qs_kind%xtb_parameter%zeff - zeff_correction
1284 ALLOCATE (xtb_control%rcpair(nkind, nkind))
1285 CALL xtb_pp_radius(qs_kind_set, xtb_control%rcpair, xtb_control%eps_pair, xtb_control%kf)
1287 IF (xtb_control%do_ewald)
THEN
1288 ALLOCATE (ewald_env)
1291 CALL ewald_env_set(ewald_env, poisson_section=poisson_section)
1294 IF (gfn_type == 0)
THEN
1296 silent=silent, pset=
"EEQ", cell_periodic=cell%perd)
1299 silent=silent, cell_periodic=cell%perd)
1302 CALL ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section=print_section)
1303 CALL set_qs_env(qs_env, ewald_env=ewald_env, ewald_pw=ewald_pw)
1310 dft_control%qs_control%lri_optbas .OR. &
1320 CALL get_qs_kind_set(qs_kind_set, all_potential_present=all_potential_present)
1321 IF ((dft_control%qs_control%method_id ==
do_method_gpw) .OR. &
1324 IF (all_potential_present)
THEN
1325 cpabort(
"All-electron calculations with GPW, GAPW_XC, and OFGPW are not implemented")
1330 CALL get_qs_kind_set(qs_kind_set, cneo_potential_present=cneo_potential_present)
1331 IF (cneo_potential_present .AND. &
1333 cpabort(
"CNEO calculations require GAPW method")
1337 CALL get_qs_kind_set(qs_kind_set, dft_plus_u_atom_present=dft_control%dft_plus_u)
1340 CALL get_qs_kind_set(qs_kind_set, do_mtlr_present=dft_control%mtlr_u_j)
1342 IF (dft_control%do_admm)
THEN
1346 NULLIFY (aux_fit_basis)
1347 qs_kind => qs_kind_set(ikind)
1348 CALL get_qs_kind(qs_kind, basis_set=aux_fit_basis, basis_type=
"AUX_FIT")
1349 IF (.NOT. (
ASSOCIATED(aux_fit_basis)))
THEN
1351 cpabort(
"AUX_FIT basis set is not defined. ")
1361 e1terms = lri_env%exact_1c_terms
1363 IF (dft_control%qs_control%do_kg)
THEN
1371 NULLIFY (lri_aux_basis)
1372 qs_kind => qs_kind_set(ikind)
1373 CALL get_qs_kind(qs_kind, basis_set=lri_aux_basis, basis_type=
"LRI_AUX")
1374 IF (.NOT. (
ASSOCIATED(lri_aux_basis)))
THEN
1376 CALL cp_warn(__location__,
"Automatic Generation of LRI_AUX basis. "// &
1377 "This is experimental code.")
1386 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%RI_RPA%HF%RI%_SECTION_PARAMETERS_", &
1387 l_val=do_rpa_ri_exx)
1388 IF (do_ri_hfx .OR. do_rpa_ri_exx)
THEN
1392 NULLIFY (ri_hfx_basis)
1393 qs_kind => qs_kind_set(ikind)
1394 CALL get_qs_kind(qs_kind=qs_kind, basis_set=ri_hfx_basis, &
1395 basis_type=
"RI_HFX")
1396 IF (.NOT. (
ASSOCIATED(ri_hfx_basis)))
THEN
1398 IF (dft_control%do_admm)
THEN
1400 basis_type=
"AUX_FIT", basis_sort=sort_basis)
1403 basis_sort=sort_basis)
1414 NULLIFY (ri_hfx_basis)
1415 qs_kind => qs_kind_set(ikind)
1416 CALL get_qs_kind(qs_kind, basis_set=ri_hfx_basis, basis_type=
"RI_HXC")
1417 IF (.NOT. (
ASSOCIATED(ri_hfx_basis)))
THEN
1426 NULLIFY (harris_env)
1428 l_val=qs_env%harris_method)
1431 CALL set_qs_env(qs_env, harris_env=harris_env)
1433 IF (qs_env%harris_method)
THEN
1437 NULLIFY (tmp_basis_set)
1438 qs_kind => qs_kind_set(ikind)
1439 CALL get_qs_kind(qs_kind, basis_set=rhoin_basis, basis_type=
"RHOIN")
1440 IF (.NOT. (
ASSOCIATED(rhoin_basis)))
THEN
1443 IF (qs_env%harris_env%density_source ==
hden_atomic)
THEN
1447 rhoin_basis => tmp_basis_set
1456 IF (mp2_present)
THEN
1460 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%LOW_SCALING%_SECTION_PARAMETERS_", &
1461 l_val=do_wfc_im_time)
1464 CALL cp_warn(__location__, &
1465 "Low-scaling RPA requires SORT_BASIS EXP keyword (in DFT input section) for good performance")
1470 CALL get_qs_env(qs_env, mp2_env=mp2_env, nkind=nkind)
1471 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%RI_MP2%_SECTION_PARAMETERS_", l_val=do_ri_mp2)
1472 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%RI_SOS_MP2%_SECTION_PARAMETERS_", l_val=do_ri_sos_mp2)
1473 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%RI_RPA%_SECTION_PARAMETERS_", l_val=do_ri_rpa)
1474 IF (do_ri_mp2 .OR. do_ri_sos_mp2 .OR. do_ri_rpa)
THEN
1476 NULLIFY (ri_aux_basis_set)
1477 qs_kind => qs_kind_set(ikind)
1478 CALL get_qs_kind(qs_kind=qs_kind, basis_set=ri_aux_basis_set, &
1479 basis_type=
"RI_AUX")
1480 IF (.NOT. (
ASSOCIATED(ri_aux_basis_set)))
THEN
1487 qs_env%mp2_env%ri_aux_auto_generated = .true.
1494 IF (dft_control%do_xas_tdp_calculation .OR. qs_env%do_rixs)
THEN
1498 NULLIFY (ri_xas_basis)
1499 qs_kind => qs_kind_set(ikind)
1500 CALL get_qs_kind(qs_kind, basis_set=ri_xas_basis, basis_type=
"RI_XAS")
1501 IF (.NOT.
ASSOCIATED(ri_xas_basis))
THEN
1510 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto, maxlppl=maxlppl, maxlppnl=maxlppnl)
1513 IF (cneo_potential_present)
THEN
1514 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto_nuc, basis_type=
"NUC")
1515 maxlgto = max(maxlgto, maxlgto_nuc)
1517 lmax_sphere = dft_control%qs_control%gapw_control%lmax_sphere
1518 IF (lmax_sphere < 0)
THEN
1519 lmax_sphere = 2*maxlgto
1520 dft_control%qs_control%gapw_control%lmax_sphere = lmax_sphere
1522 IF (dft_control%qs_control%method_id ==
do_method_lrigpw .OR. dft_control%qs_control%lri_optbas)
THEN
1523 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto_lri, basis_type=
"LRI_AUX")
1525 maxlgto = max(maxlgto, maxlgto_lri)
1527 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto_lri, basis_type=
"RI_HXC")
1528 maxlgto = max(maxlgto, maxlgto_lri)
1530 IF (dft_control%do_xas_tdp_calculation .OR. qs_env%do_rixs)
THEN
1532 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto_lri, basis_type=
"RI_XAS")
1533 maxlgto = max(maxlgto, maxlgto_lri)
1535 maxl = max(2*maxlgto, maxlppl, maxlppnl, lmax_sphere) + 1
1547 qs_control => dft_control%qs_control
1552 IF (cneo_potential_present)
THEN
1559 maxl = max(3*maxlgto + 1, 0)
1566 IF (.NOT. dft_control%qs_control%xtb_control%do_tblite)
THEN
1570 qs_kind => qs_kind_set(ikind)
1571 IF (qs_kind%xtb_parameter%defined)
THEN
1572 CALL get_qs_kind(qs_kind, basis_set=tmp_basis_set)
1573 rcut = xtb_control%coulomb_sr_cut
1574 fxx = 2.0_dp*xtb_control%coulomb_sr_eps*qs_kind%xtb_parameter%eta**2
1575 fxx = 0.80_dp*(1.0_dp/fxx)**0.3333_dp
1576 rcut = min(rcut, xtb_control%coulomb_sr_cut)
1577 qs_kind%xtb_parameter%rcut = min(rcut, fxx)
1579 qs_kind%xtb_parameter%rcut = 0.0_dp
1585 IF (.NOT. be_silent)
THEN
1598 particle_set=particle_set, &
1599 local_particles=local_particles, &
1600 molecule_kind_set=molecule_kind_set, &
1601 molecule_set=molecule_set, &
1602 local_molecules=local_molecules, &
1603 force_env_section=qs_env%input)
1606 ALLOCATE (scf_control)
1608 IF (dft_control%qs_control%dftb)
THEN
1609 scf_control%non_selfconsistent = .NOT. dft_control%qs_control%dftb_control%self_consistent
1611 IF (dft_control%qs_control%xtb)
THEN
1612 IF (dft_control%qs_control%xtb_control%do_tblite)
THEN
1613 scf_control%non_selfconsistent = .false.
1615 scf_control%non_selfconsistent = (dft_control%qs_control%xtb_control%gfn_type == 0)
1618 IF (qs_env%harris_method)
THEN
1619 scf_control%non_selfconsistent = .true.
1623 IF (scf_control%gce%do_gce)
THEN
1624 IF (.NOT. all(cell%perd == 1))
THEN
1625 cpabort(
"Grand canonical SCF is only implemented for 3D periodic calculations.")
1627 IF (.NOT. scf_control%smear%do_smear)
THEN
1628 cpabort(
"Grand canonical SCF requires smearing.")
1631 cpabort(
"Grand canonical SCF is only implemented for Fermi-Dirac way of smearing.")
1633 IF (scf_control%use_ot .OR. .NOT. scf_control%use_diag .OR. &
1634 scf_control%diagonalization%method ==
diag_ot)
THEN
1635 CALL cp_abort(__location__, &
1636 "Grand canonical SCF requires standard diagonalization. "// &
1637 "It is not implemented with OT.")
1640 IF (.NOT. dft_control%qs_control%do_ls_scf)
THEN
1641 SELECT CASE (dft_control%qs_control%method_id)
1644 scf_control%max_scf = dft_control%qs_control%dftb_control%tblite_mixer_iterations
1648 scf_control%max_scf = dft_control%qs_control%xtb_control%tblite_mixer_iterations
1657 has_unit_metric = .false.
1658 IF (dft_control%qs_control%semi_empirical)
THEN
1659 IF (dft_control%qs_control%se_control%orthogonal_basis) has_unit_metric = .true.
1661 IF (dft_control%qs_control%dftb)
THEN
1662 IF (dft_control%qs_control%dftb_control%orthogonal_basis) has_unit_metric = .true.
1664 CALL set_qs_env(qs_env, has_unit_metric=has_unit_metric)
1667 IF (dft_control%mtlr_u_j)
THEN
1668 dft_control%qs_control%wf_interpolation_method_nr = &
1674 interpolation_method_nr= &
1675 dft_control%qs_control%wf_interpolation_method_nr, &
1676 extrapolation_order=dft_control%qs_control%wf_extrapolation_order, &
1677 has_unit_metric=has_unit_metric)
1681 scf_control=scf_control, &
1682 wf_history=wf_history)
1685 cell_ref=cell_ref, &
1686 use_ref_cell=use_ref_cell, &
1691 CALL set_ks_env(ks_env, dft_control=dft_control)
1693 CALL qs_subsys_set(subsys, local_molecules=local_molecules, &
1694 local_particles=local_particles, cell=cell)
1701 atomic_kind_set=atomic_kind_set, &
1702 dft_control=dft_control, &
1703 scf_control=scf_control)
1707 IF (dft_control%qs_control%do_ls_scf .OR. &
1708 dft_control%qs_control%do_almo_scf)
THEN
1709 CALL set_qs_env(qs_env=qs_env, requires_mo_derivs=.false.)
1711 IF (scf_control%use_ot)
THEN
1712 CALL set_qs_env(qs_env=qs_env, requires_mo_derivs=.true.)
1714 CALL set_qs_env(qs_env=qs_env, requires_mo_derivs=.false.)
1719 IF (dft_control%qs_control%xtb_control%do_tblite .AND. .NOT. scf_control%use_ot)
THEN
1720 IF (.NOT. scf_control%smear%do_smear)
THEN
1722 scf_control%smear%do_smear = .true.
1724 scf_control%smear%electronic_temperature = 300._dp/
kelvin
1725 scf_control%smear%eps_fermi_dirac = 1.e-6_dp
1728 dft_control%smear = scf_control%smear%do_smear
1731 IF (.NOT. (dft_control%qs_control%dftb .OR. dft_control%qs_control%xtb))
THEN
1732 IF (dft_control%apply_period_efield)
THEN
1733 CALL get_qs_env(qs_env=qs_env, requires_mo_derivs=orb_gradient)
1734 IF (.NOT. orb_gradient)
THEN
1735 CALL cp_abort(__location__,
"Periodic Efield needs orbital gradient and direct optimization."// &
1736 " Use the OT optimization method.")
1738 IF (dft_control%smear)
THEN
1739 CALL cp_abort(__location__,
"Periodic Efield needs equal occupation numbers."// &
1740 " Smearing option is not possible.")
1749 NULLIFY (rho_atom_set)
1750 gapw_control => dft_control%qs_control%gapw_control
1751 CALL init_rho_atom(rho_atom_set, atomic_kind_set, qs_kind_set, dft_control, para_env)
1752 CALL set_qs_env(qs_env=qs_env, rho_atom_set=rho_atom_set)
1754 CALL get_qs_env(qs_env=qs_env, local_rho_set=local_rho_set, natom=natom)
1756 CALL init_rho0(local_rho_set, qs_env, gapw_control)
1763 IF (gapw_control%accurate_xcint)
THEN
1764 cpassert(.NOT.
ASSOCIATED(gapw_control%aw))
1766 ALLOCATE (gapw_control%aw(nkind))
1767 alpha = gapw_control%aweights
1769 qs_kind => qs_kind_set(ikind)
1770 CALL get_qs_kind(qs_kind, hard_radius=rc, paw_atom=paw_atom)
1772 gapw_control%aw(ikind) = alpha*(1.2_dp/rc)**2
1774 gapw_control%aw(ikind) = 0.0_dp
1784 ELSE IF (dft_control%qs_control%semi_empirical)
THEN
1785 NULLIFY (se_store_int_env, se_nddo_mpole, se_nonbond_env)
1786 natom =
SIZE(particle_set)
1788 se_control => dft_control%qs_control%se_control
1793 SELECT CASE (dft_control%qs_control%method_id)
1799 CALL init_se_nlradius(se_control, atomic_kind_set, qs_kind_set, subsys_section)
1804 IF (se_control%do_ewald .OR. se_control%do_ewald_gks)
THEN
1805 ALLOCATE (ewald_env)
1808 CALL ewald_env_set(ewald_env, poisson_section=poisson_section)
1811 "PRINT%GRID_INFORMATION")
1816 print_section=print_section)
1822 IF (se_control%do_ewald)
THEN
1823 CALL ewald_env_get(ewald_env, max_multipole=se_control%max_multipole)
1827 ALLOCATE (se_nonbond_env)
1829 do_electrostatics=.true., verlet_skin=verlet_skin, ewald_rcut=ewald_rcut, &
1830 ei_scale14=0.0_dp, vdw_scale14=0.0_dp, shift_cutoff=.false.)
1833 CALL set_qs_env(qs_env, ewald_env=ewald_env, ewald_pw=ewald_pw, &
1834 se_nonbond_env=se_nonbond_env, se_nddo_mpole=se_nddo_mpole)
1837 dft_control%qs_control%method_id)
1840 CALL se_taper_create(se_taper, se_control%integral_screening, se_control%do_ewald, &
1841 se_control%taper_cou, se_control%range_cou, &
1842 se_control%taper_exc, se_control%range_exc, &
1843 se_control%taper_scr, se_control%range_scr, &
1844 se_control%taper_lrc, se_control%range_lrc)
1848 CALL set_qs_env(qs_env, se_store_int_env=se_store_int_env)
1852 IF (dft_control%qs_control%method_id ==
do_method_gpw .OR. &
1858 ALLOCATE (dispersion_env)
1859 NULLIFY (xc_section)
1863 NULLIFY (pp_section)
1867 NULLIFY (nl_section)
1871 CALL set_qs_env(qs_env, dispersion_env=dispersion_env)
1872 ELSE IF (dft_control%qs_control%method_id ==
do_method_dftb)
THEN
1873 ALLOCATE (dispersion_env)
1875 dispersion_env%doabc = .false.
1876 dispersion_env%c9cnst = .false.
1877 dispersion_env%lrc = .false.
1878 dispersion_env%srb = .false.
1879 dispersion_env%verbose = .false.
1880 NULLIFY (dispersion_env%c6ab, dispersion_env%maxci, dispersion_env%r0ab, dispersion_env%rcov, &
1881 dispersion_env%r2r4, dispersion_env%cn, dispersion_env%cnkind, dispersion_env%cnlist, &
1882 dispersion_env%d3_exclude_pair)
1883 NULLIFY (dispersion_env%q_mesh, dispersion_env%kernel, dispersion_env%d2phi_dk2, &
1884 dispersion_env%d2y_dx2, dispersion_env%dftd_section)
1885 NULLIFY (dispersion_env%sab_vdw, dispersion_env%sab_cn)
1886 IF (dftb_control%dispersion .AND. dftb_control%dispersion_type ==
dispersion_d3)
THEN
1889 dispersion_env%eps_cn = dftb_control%epscn
1890 dispersion_env%s6 = dftb_control%sd3(1)
1891 dispersion_env%sr6 = dftb_control%sd3(2)
1892 dispersion_env%s8 = dftb_control%sd3(3)
1893 dispersion_env%domol = .false.
1894 dispersion_env%kgc8 = 0._dp
1895 dispersion_env%rc_disp = dftb_control%rcdisp
1896 dispersion_env%exp_pre = 0._dp
1897 dispersion_env%scaling = 0._dp
1898 dispersion_env%nd3_exclude_pair = 0
1899 dispersion_env%parameter_file_name = dftb_control%dispersion_parameter_file
1901 ELSE IF (dftb_control%dispersion .AND. dftb_control%dispersion_type ==
dispersion_d3bj)
THEN
1904 dispersion_env%eps_cn = dftb_control%epscn
1905 dispersion_env%s6 = dftb_control%sd3bj(1)
1906 dispersion_env%a1 = dftb_control%sd3bj(2)
1907 dispersion_env%s8 = dftb_control%sd3bj(3)
1908 dispersion_env%a2 = dftb_control%sd3bj(4)
1909 dispersion_env%domol = .false.
1910 dispersion_env%kgc8 = 0._dp
1911 dispersion_env%rc_disp = dftb_control%rcdisp
1912 dispersion_env%exp_pre = 0._dp
1913 dispersion_env%scaling = 0._dp
1914 dispersion_env%nd3_exclude_pair = 0
1915 dispersion_env%parameter_file_name = dftb_control%dispersion_parameter_file
1917 ELSE IF (dftb_control%dispersion .AND. dftb_control%dispersion_type ==
dispersion_d2)
THEN
1920 dispersion_env%exp_pre = dftb_control%exp_pre
1921 dispersion_env%scaling = dftb_control%scaling
1922 dispersion_env%parameter_file_name = dftb_control%dispersion_parameter_file
1923 dispersion_env%rc_disp = dftb_control%rcdisp
1928 CALL set_qs_env(qs_env, dispersion_env=dispersion_env)
1929 ELSE IF (dft_control%qs_control%method_id ==
do_method_xtb)
THEN
1930 IF (.NOT. (dft_control%qs_control%xtb_control%do_tblite))
THEN
1931 ALLOCATE (dispersion_env)
1933 dispersion_env%doabc = .false.
1934 dispersion_env%c9cnst = .false.
1935 dispersion_env%lrc = .false.
1936 dispersion_env%srb = .false.
1937 dispersion_env%verbose = .false.
1938 NULLIFY (dispersion_env%c6ab, dispersion_env%maxci, &
1939 dispersion_env%r0ab, dispersion_env%rcov, &
1940 dispersion_env%r2r4, dispersion_env%cn, &
1941 dispersion_env%cnkind, dispersion_env%cnlist, &
1942 dispersion_env%d3_exclude_pair)
1943 NULLIFY (dispersion_env%q_mesh, dispersion_env%kernel, dispersion_env%d2phi_dk2, &
1944 dispersion_env%d2y_dx2, dispersion_env%dftd_section)
1945 NULLIFY (dispersion_env%sab_vdw, dispersion_env%sab_cn)
1947 dispersion_env%eps_cn = xtb_control%epscn
1948 dispersion_env%s6 = xtb_control%s6
1949 dispersion_env%s8 = xtb_control%s8
1950 dispersion_env%a1 = xtb_control%a1
1951 dispersion_env%a2 = xtb_control%a2
1952 dispersion_env%domol = .false.
1953 dispersion_env%kgc8 = 0._dp
1954 dispersion_env%rc_disp = xtb_control%rcdisp
1955 dispersion_env%rc_d4 = xtb_control%rcdisp
1956 dispersion_env%exp_pre = 0._dp
1957 dispersion_env%scaling = 0._dp
1958 dispersion_env%nd3_exclude_pair = 0
1959 dispersion_env%parameter_file_name = xtb_control%dispersion_parameter_file
1961 SELECT CASE (xtb_control%vdw_type)
1968 dispersion_env%ref_functional =
"none"
1970 dispersion_env, para_env=para_env)
1971 dispersion_env%cnfun = 2
1975 CALL set_qs_env(qs_env, dispersion_env=dispersion_env)
1977 ELSE IF (dft_control%qs_control%semi_empirical)
THEN
1978 ALLOCATE (dispersion_env)
1980 dispersion_env%doabc = .false.
1981 dispersion_env%c9cnst = .false.
1982 dispersion_env%lrc = .false.
1983 dispersion_env%srb = .false.
1984 dispersion_env%verbose = .false.
1985 NULLIFY (dispersion_env%c6ab, dispersion_env%maxci, dispersion_env%r0ab, dispersion_env%rcov, &
1986 dispersion_env%r2r4, dispersion_env%cn, dispersion_env%cnkind, dispersion_env%cnlist, &
1987 dispersion_env%d3_exclude_pair)
1988 NULLIFY (dispersion_env%q_mesh, dispersion_env%kernel, dispersion_env%d2phi_dk2, &
1989 dispersion_env%d2y_dx2, dispersion_env%dftd_section)
1990 NULLIFY (dispersion_env%sab_vdw, dispersion_env%sab_cn)
1991 IF (se_control%dispersion)
THEN
1994 dispersion_env%eps_cn = se_control%epscn
1995 dispersion_env%s6 = se_control%sd3(1)
1996 dispersion_env%sr6 = se_control%sd3(2)
1997 dispersion_env%s8 = se_control%sd3(3)
1998 dispersion_env%domol = .false.
1999 dispersion_env%kgc8 = 0._dp
2000 dispersion_env%rc_disp = se_control%rcdisp
2001 dispersion_env%exp_pre = 0._dp
2002 dispersion_env%scaling = 0._dp
2003 dispersion_env%nd3_exclude_pair = 0
2004 dispersion_env%parameter_file_name = se_control%dispersion_parameter_file
2009 CALL set_qs_env(qs_env, dispersion_env=dispersion_env)
2013 IF (dft_control%qs_control%method_id ==
do_method_gpw .OR. &
2020 NULLIFY (xc_section)
2031 IF (
PRESENT(charge))
THEN
2032 dft_control%charge = charge
2033 nelectron = nelectron - dft_control%charge
2035 nelectron = nelectron - dft_control%charge
2038 IF (dft_control%multiplicity == 0)
THEN
2039 IF (
modulo(nelectron, 2) == 0)
THEN
2040 dft_control%multiplicity = 1
2042 dft_control%multiplicity = 2
2046 multiplicity = dft_control%multiplicity
2048 IF (
PRESENT(multip))
THEN
2049 multiplicity = multip
2052 IF ((dft_control%nspins < 1) .OR. (dft_control%nspins > 2))
THEN
2053 cpabort(
"nspins should be 1 or 2 for the time being ...")
2056 IF ((
modulo(nelectron, 2) /= 0) .AND. (dft_control%nspins == 1))
THEN
2057 IF (.NOT. dft_control%qs_control%ofgpw .AND. .NOT. dft_control%smear)
THEN
2058 cpabort(
"Use the LSD option for an odd number of electrons")
2063 IF (dft_control%do_xas_calculation)
THEN
2064 IF (dft_control%nspins == 1)
THEN
2065 cpabort(
"Use the LSD option for XAS with transition potential")
2075 IF (dft_control%qs_control%ofgpw)
THEN
2077 IF (dft_control%nspins == 1)
THEN
2079 nelectron_spin(1) = nelectron
2080 nelectron_spin(2) = 0
2084 nelectron_spin(1) = (nelectron + multiplicity - 1)/2
2085 nelectron_spin(2) = (nelectron - multiplicity + 1)/2
2086 IF (nelectron_spin(1) < 0)
THEN
2087 cpabort(
"LSD: too few electrons for this multiplicity")
2089 maxocc = maxval(nelectron_spin)
2090 n_mo(1) = min(nelectron_spin(1), 1)
2091 n_mo(2) = min(nelectron_spin(2), 1)
2096 IF (dft_control%nspins == 1)
THEN
2098 nelectron_spin(1) = nelectron
2099 nelectron_spin(2) = 0
2100 IF (
modulo(nelectron, 2) == 0)
THEN
2101 n_mo(1) = nelectron/2
2103 n_mo(1) = int(nelectron/2._dp) + 1
2111 IF (
modulo(nelectron + multiplicity - 1, 2) /= 0)
THEN
2112 cpabort(
"LSD: try to use a different multiplicity")
2115 nelectron_spin(1) = (nelectron + multiplicity - 1)/2
2116 nelectron_spin(2) = (nelectron - multiplicity + 1)/2
2118 IF (nelectron_spin(2) < 0)
THEN
2119 cpabort(
"LSD: too few electrons for this multiplicity")
2122 n_mo(1) = nelectron_spin(1)
2123 n_mo(2) = nelectron_spin(2)
2132 qs_env%total_zeff_corr = total_zeff_corr
2136 nelectron_total=nelectron, &
2137 nelectron_spin=nelectron_spin)
2142 cpassert(
ASSOCIATED(mo_index_range))
2143 IF (all(mo_index_range > 0))
THEN
2144 IF (mo_index_range(1) > mo_index_range(2))
THEN
2145 CALL cp_abort(__location__, &
2146 "The upper orbital index ("// &
2148 ") of the MO_INDEX_RANGE should be equal or larger "// &
2149 "than the lower orbital index ("// &
2154 IF (.NOT. scf_control%use_ot)
THEN
2155 scf_control%added_mos(1) = min(max(scf_control%added_mos(1), &
2156 mo_index_range(2) - n_mo(1)), &
2158 IF (dft_control%nspins == 2)
THEN
2159 scf_control%added_mos(2) = min(max(scf_control%added_mos(2), &
2160 mo_index_range(2) - n_mo(2)), &
2164 ELSE IF (mo_index_range(2) < 0)
THEN
2165 IF (.NOT. scf_control%use_ot)
THEN
2167 scf_control%added_mos(1) = n_ao - n_mo(1)
2168 IF (dft_control%nspins == 2)
THEN
2170 scf_control%added_mos(2) = n_ao - n_mo(2)
2177 nlumo_required = max(nlumo_dos, nlumo_molden)
2178 IF (nlumo_dos == -1 .OR. nlumo_molden == -1) nlumo_required = -1
2179 IF (.NOT. scf_control%use_ot .AND. nlumo_required /= 0)
THEN
2180 IF (nlumo_required == -1)
THEN
2181 IF (scf_control%added_mos(1) /= -1 .OR. &
2182 (dft_control%nspins == 2 .AND. scf_control%added_mos(2) /= -1))
THEN
2183 CALL cp_warn(__location__, &
2184 "NLUMO requested by DOS/PDOS/Molden exceeds SCF%ADDED_MOS. "// &
2185 "For diagonalization calculations, SCF%ADDED_MOS is "// &
2186 "increased to provide the requested unoccupied orbitals.")
2188 scf_control%added_mos(1) = -1
2189 IF (dft_control%nspins == 2) scf_control%added_mos(2) = -1
2191 IF (scf_control%added_mos(1) >= 0 .AND. &
2192 nlumo_required > scf_control%added_mos(1))
THEN
2193 CALL cp_warn(__location__, &
2194 "NLUMO requested by DOS/PDOS/Molden exceeds SCF%ADDED_MOS. "// &
2195 "For diagonalization calculations, SCF%ADDED_MOS is "// &
2196 "increased to provide the requested unoccupied orbitals.")
2197 scf_control%added_mos(1) = nlumo_required
2199 IF (dft_control%nspins == 2 .AND. scf_control%added_mos(2) > 0 .AND. &
2200 nlumo_required > scf_control%added_mos(2))
THEN
2201 scf_control%added_mos(2) = nlumo_required
2206 IF (dft_control%nspins == 2)
THEN
2208 IF (scf_control%added_mos(2) < 0)
THEN
2209 n_mo_add = n_ao - n_mo(2)
2210 ELSE IF (scf_control%added_mos(2) > 0)
THEN
2211 n_mo_add = scf_control%added_mos(2)
2213 n_mo_add = scf_control%added_mos(1)
2215 IF (n_mo_add > n_ao - n_mo(2))
THEN
2216 cpwarn(
"More ADDED_MOs requested for beta spin than available.")
2218 scf_control%added_mos(2) = min(n_mo_add, n_ao - n_mo(2))
2219 n_mo(2) = n_mo(2) + scf_control%added_mos(2)
2230 IF (dft_control%qs_control%xtb_control%do_tblite .AND. .NOT. scf_control%use_ot)
THEN
2231 scf_control%added_mos(1) = n_ao - n_mo(1)
2232 ELSE IF (scf_control%added_mos(1) < 0)
THEN
2233 scf_control%added_mos(1) = n_ao - n_mo(1)
2234 ELSE IF (scf_control%added_mos(1) > n_ao - n_mo(1))
THEN
2235 CALL cp_warn(__location__, &
2236 "More added MOs requested than available. "// &
2237 "The full set of unoccupied MOs will be used. "// &
2238 "Use 'ADDED_MOS -1' to always use all available MOs "// &
2239 "and to get rid of this warning.")
2241 scf_control%added_mos(1) = min(scf_control%added_mos(1), n_ao - n_mo(1))
2242 n_mo(1) = n_mo(1) + scf_control%added_mos(1)
2244 IF (dft_control%nspins == 2)
THEN
2245 IF (n_mo(2) > n_mo(1))
THEN
2246 CALL cp_warn(__location__, &
2247 "More beta than alpha MOs requested. "// &
2248 "The number of beta MOs will be reduced to the number alpha MOs.")
2250 n_mo(2) = min(n_mo(1), n_mo(2))
2251 cpassert(n_mo(1) >= nelectron_spin(1))
2252 cpassert(n_mo(2) >= nelectron_spin(2))
2256 CALL get_qs_env(qs_env=qs_env, do_kpoints=do_kpoints)
2257 IF (do_kpoints .AND. dft_control%nspins == 2)
THEN
2259 IF (n_mo(2) /= n_mo(1))
THEN
2260 CALL cp_warn(__location__, &
2261 "Kpoints: Different number of MOs requested. "// &
2262 "The number of beta MOs will be set to the number alpha MOs.")
2265 cpassert(n_mo(1) >= nelectron_spin(1))
2266 cpassert(n_mo(2) >= nelectron_spin(2))
2270 IF (scf_control%smear%do_smear)
THEN
2271 IF (dft_control%qs_control%xtb_control%do_tblite .AND. scf_control%use_ot)
THEN
2272 cpabort(
"CP2K/tblite with OT does not support smearing.")
2274 IF (scf_control%added_mos(1) == 0)
THEN
2275 cpabort(
"Extra MOs (ADDED_MOS) are required for smearing")
2281 "PRINT%MO/CARTESIAN"), &
2283 (scf_control%level_shift /= 0.0_dp) .OR. &
2284 (scf_control%diagonalization%eps_jacobi /= 0.0_dp) .OR. &
2285 (dft_control%roks .AND. (.NOT. scf_control%use_ot)))
THEN
2290 IF (dft_control%roks .AND. (.NOT. scf_control%use_ot))
THEN
2292 cpwarn(
"General ROKS scheme is not yet tested!")
2294 IF (scf_control%smear%do_smear)
THEN
2295 CALL cp_abort(__location__, &
2296 "The options ROKS and SMEAR are not compatible. "// &
2297 "Try UKS instead of ROKS")
2300 IF (dft_control%low_spin_roks)
THEN
2301 SELECT CASE (dft_control%qs_control%method_id)
2304 CALL cp_abort(__location__, &
2305 "xTB/DFTB methods are not compatible with low spin ROKS.")
2308 CALL cp_abort(__location__, &
2309 "SE methods are not compatible with low spin ROKS.")
2317 IF (dft_control%restricted .AND. (output_unit > 0))
THEN
2319 WRITE (output_unit, *)
""
2320 WRITE (output_unit, *)
" **************************************"
2321 WRITE (output_unit, *)
" restricted calculation cutting corners"
2322 WRITE (output_unit, *)
" experimental feature, check code "
2323 WRITE (output_unit, *)
" **************************************"
2327 IF (dft_control%qs_control%do_ls_scf)
THEN
2330 ALLOCATE (mos(dft_control%nspins))
2331 DO ispin = 1, dft_control%nspins
2335 nelectron=nelectron_spin(ispin), &
2336 n_el_f=real(nelectron_spin(ispin),
dp), &
2338 flexible_electron_count=dft_control%relax_multiplicity)
2345 IF (dft_control%switch_surf_dip)
THEN
2346 ALLOCATE (mos_last_converged(dft_control%nspins))
2347 DO ispin = 1, dft_control%nspins
2351 nelectron=nelectron_spin(ispin), &
2352 n_el_f=real(nelectron_spin(ispin),
dp), &
2354 flexible_electron_count=dft_control%relax_multiplicity)
2356 CALL set_qs_env(qs_env, mos_last_converged=mos_last_converged)
2359 IF (.NOT. be_silent)
THEN
2361 IF (
PRESENT(multip))
THEN
2362 dft_control%multiplicity = multiplicity
2367 IF (dft_control%qs_control%method_id ==
do_method_gpw .OR. &
2374 (.NOT. dft_control%qs_control%xtb_control%do_tblite)) .OR. &
2376 CALL get_qs_env(qs_env, dispersion_env=dispersion_env)
2384 IF (dft_control%do_admm)
THEN
2389 IF (dft_control%do_xas_calculation)
THEN
2404 CALL write_total_numbers(qs_kind_set, particle_set, qs_env%input)
2419 IF ((.NOT. dft_control%qs_control%do_ls_scf) .AND. &
2420 (.NOT. dft_control%qs_control%do_almo_scf))
THEN
2430 CALL get_qs_env(qs_env=qs_env, pw_env=pw_env, rho0_mpole=rho0_mpole)
2434 IF (output_unit > 0)
CALL m_flush(output_unit)
2435 CALL timestop(handle)
2437 END SUBROUTINE qs_init_subsys
2447 SUBROUTINE write_total_numbers(qs_kind_set, particle_set, force_env_section)
2449 TYPE(qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
2450 TYPE(particle_type),
DIMENSION(:),
POINTER :: particle_set
2451 TYPE(section_vals_type),
POINTER :: force_env_section
2453 INTEGER :: maxlgto, maxlppl, maxlppnl, natom, &
2454 natom_q, ncgf, nkind, nkind_q, npgf, &
2455 nset, nsgf, nshell, output_unit
2456 TYPE(cp_logger_type),
POINTER :: logger
2459 logger => cp_get_default_logger()
2460 output_unit = cp_print_key_unit_nr(logger, force_env_section,
"PRINT%TOTAL_NUMBERS", &
2463 IF (output_unit > 0)
THEN
2464 natom =
SIZE(particle_set)
2465 nkind =
SIZE(qs_kind_set)
2467 CALL get_qs_kind_set(qs_kind_set, &
2477 WRITE (unit=output_unit, fmt=
"(/,/,T2,A)") &
2478 "TOTAL NUMBERS AND MAXIMUM NUMBERS"
2480 IF (nset + npgf + ncgf > 0)
THEN
2481 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T71,I10))") &
2482 "Total number of", &
2483 "- Atomic kinds: ", nkind, &
2484 "- Atoms: ", natom, &
2485 "- Shell sets: ", nset, &
2486 "- Shells: ", nshell, &
2487 "- Primitive Cartesian functions: ", npgf, &
2488 "- Cartesian basis functions: ", ncgf, &
2489 "- Spherical basis functions: ", nsgf
2490 ELSE IF (nshell + nsgf > 0)
THEN
2491 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T71,I10))") &
2492 "Total number of", &
2493 "- Atomic kinds: ", nkind, &
2494 "- Atoms: ", natom, &
2495 "- Shells: ", nshell, &
2496 "- Spherical basis functions: ", nsgf
2498 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T71,I10))") &
2499 "Total number of", &
2500 "- Atomic kinds: ", nkind, &
2504 IF ((maxlppl > -1) .AND. (maxlppnl > -1))
THEN
2505 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T75,I6))") &
2506 "Maximum angular momentum of the", &
2507 "- Orbital basis functions: ", maxlgto, &
2508 "- Local part of the GTH pseudopotential: ", maxlppl, &
2509 "- Non-local part of the GTH pseudopotential: ", maxlppnl
2510 ELSE IF (maxlppl > -1)
THEN
2511 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T75,I6))") &
2512 "Maximum angular momentum of the", &
2513 "- Orbital basis functions: ", maxlgto, &
2514 "- Local part of the GTH pseudopotential: ", maxlppl
2516 WRITE (unit=output_unit, fmt=
"(/,T3,A,T75,I6)") &
2517 "Maximum angular momentum of the orbital basis functions: ", maxlgto
2521 CALL get_qs_kind_set(qs_kind_set, &
2528 basis_type=
"LRI_AUX")
2529 IF (nset + npgf + ncgf > 0)
THEN
2530 WRITE (unit=output_unit, fmt=
"(/,T3,A,/,T3,A,(T30,A,T71,I10))") &
2531 "LRI_AUX Basis: ", &
2532 "Total number of", &
2533 "- Shell sets: ", nset, &
2534 "- Shells: ", nshell, &
2535 "- Primitive Cartesian functions: ", npgf, &
2536 "- Cartesian basis functions: ", ncgf, &
2537 "- Spherical basis functions: ", nsgf
2538 WRITE (unit=output_unit, fmt=
"(T30,A,T75,I6)") &
2539 " Maximum angular momentum ", maxlgto
2543 CALL get_qs_kind_set(qs_kind_set, &
2550 basis_type=
"RI_HXC")
2551 IF (nset + npgf + ncgf > 0)
THEN
2552 WRITE (unit=output_unit, fmt=
"(/,T3,A,/,T3,A,(T30,A,T71,I10))") &
2554 "Total number of", &
2555 "- Shell sets: ", nset, &
2556 "- Shells: ", nshell, &
2557 "- Primitive Cartesian functions: ", npgf, &
2558 "- Cartesian basis functions: ", ncgf, &
2559 "- Spherical basis functions: ", nsgf
2560 WRITE (unit=output_unit, fmt=
"(T30,A,T75,I6)") &
2561 " Maximum angular momentum ", maxlgto
2565 CALL get_qs_kind_set(qs_kind_set, &
2572 basis_type=
"AUX_FIT")
2573 IF (nset + npgf + ncgf > 0)
THEN
2574 WRITE (unit=output_unit, fmt=
"(/,T3,A,/,T3,A,(T30,A,T71,I10))") &
2575 "AUX_FIT ADMM-Basis: ", &
2576 "Total number of", &
2577 "- Shell sets: ", nset, &
2578 "- Shells: ", nshell, &
2579 "- Primitive Cartesian functions: ", npgf, &
2580 "- Cartesian basis functions: ", ncgf, &
2581 "- Spherical basis functions: ", nsgf
2582 WRITE (unit=output_unit, fmt=
"(T30,A,T75,I6)") &
2583 " Maximum angular momentum ", maxlgto
2587 CALL get_qs_kind_set(qs_kind_set, &
2597 IF (nset + npgf + ncgf > 0)
THEN
2598 WRITE (unit=output_unit, fmt=
"(/,T3,A,/,T3,A,(T30,A,T71,I10))") &
2599 "Nuclear Basis: ", &
2600 "Total number of", &
2601 "- Quantum atomic kinds: ", nkind_q, &
2602 "- Quantum atoms: ", natom_q, &
2603 "- Shell sets: ", nset, &
2604 "- Shells: ", nshell, &
2605 "- Primitive Cartesian functions: ", npgf, &
2606 "- Cartesian basis functions: ", ncgf, &
2607 "- Spherical basis functions: ", nsgf
2608 WRITE (unit=output_unit, fmt=
"(T30,A,T75,I6)") &
2609 " Maximum angular momentum ", maxlgto
2613 CALL cp_print_key_finished_output(output_unit, logger, force_env_section, &
2614 "PRINT%TOTAL_NUMBERS")
2616 END SUBROUTINE write_total_numbers
static GRID_HOST_DEVICE int modulo(int a, int m)
Equivalent of Fortran's MODULO, which always return a positive number. https://gcc....
subroutine, public almo_scf_env_create(qs_env)
Creation and basic initialization of the almo environment.
calculate the orbitals for a given atomic kind type
subroutine, public calculate_atomic_relkin(atomic_kind, qs_kind, rel_control, rtmat)
...
Define the atomic kind types and their sub types.
Automatic generation of auxiliary basis sets of different kind.
subroutine, public create_lri_aux_basis_set(lri_aux_basis_set, qs_kind, basis_cntrl, exact_1c_terms, tda_kernel)
Create a LRI_AUX basis set using some heuristics.
subroutine, public create_ri_aux_basis_set(ri_aux_basis_set, qs_kind, basis_cntrl, basis_type, basis_sort)
Create a RI_AUX basis set using some heuristics.
subroutine, public add_basis_set_to_container(container, basis_set, basis_set_type)
...
integer, parameter, public basis_sort_zet
subroutine, public deallocate_gto_basis_set(gto_basis_set)
...
subroutine, public create_primitive_basis_set(basis_set, pbasis, lmax)
...
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public cp2kqs2020
integer, save, public iannuzzi2007
integer, save, public iannuzzi2006
Handles all functions related to the CELL.
methods related to the blacs parallel environment
subroutine, public cp_blacs_env_release(blacs_env)
releases the given blacs_env
subroutine, public cp_blacs_env_create(blacs_env, para_env, blacs_grid_layout, blacs_repeatable, row_major, grid_2d)
allocates and initializes a type that represent a blacs context
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
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)
...
contains information regarding the decoupling/recoupling method of Bloechl
subroutine, public cp_ddapc_ewald_create(cp_ddapc_ewald, qmmm_decoupl, qm_cell, force_env_section, subsys_section, para_env)
...
various routines to log and control the output. The idea is that decisions about where to log should ...
integer function, public cp_logger_get_default_io_unit(logger)
returns the unit nr for the ionode (-1 on all other processors) skips as well checks if the procs cal...
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,...
integer, parameter, public cp_p_file
integer function, public cp_print_key_should_output(iteration_info, basis_section, print_key_path, used_print_key, first_time)
returns what should be done with the given property if btest(res,cp_p_store) then the property should...
types that represent a subsys, i.e. a part of the system
subroutine, public write_symmetry(particle_set, cell, input_section)
Write symmetry information to output.
stores a lists of integer that are local to a processor. The idea is that these integers represent ob...
subroutine, public distribution_1d_release(distribution_1d)
releases the given distribution_1d
Distribution methods for atoms, particles, or molecules.
subroutine, public distribute_molecules_1d(atomic_kind_set, particle_set, local_particles, molecule_kind_set, molecule_set, local_molecules, force_env_section, prev_molecule_kind_set, prev_local_molecules)
Distribute molecules and particles.
Types needed for a for a Energy Correction.
Energy correction environment setup and handling.
subroutine, public ec_write_input(ec_env)
Print out the energy correction input section.
subroutine, public ec_env_create(qs_env, ec_env, dft_section, ec_section)
Allocates and intitializes ec_env.
Definition and initialisation of the et_coupling data type.
subroutine, public et_coupling_create(et_coupling)
...
subroutine, public ewald_env_set(ewald_env, ewald_type, alpha, epsilon, eps_pol, gmax, ns_max, precs, o_spline, para_env, poisson_section, interaction_cutoffs, cell_hmat)
Purpose: Set the EWALD environment.
subroutine, public ewald_env_create(ewald_env, para_env)
allocates and intitializes a ewald_env
subroutine, public read_ewald_section(ewald_env, ewald_section)
Purpose: read the EWALD section.
subroutine, public read_ewald_section_tb(ewald_env, ewald_section, hmat, silent, pset, cell_periodic)
Purpose: read the EWALD section for TB methods.
subroutine, public ewald_env_get(ewald_env, ewald_type, alpha, eps_pol, epsilon, gmax, ns_max, o_spline, group, para_env, poisson_section, precs, rcut, do_multipoles, max_multipole, do_ipol, max_ipol_iter, interaction_cutoffs, cell_hmat)
Purpose: Get the EWALD environment.
subroutine, public ewald_pw_grid_update(ewald_pw, ewald_env, cell_hmat)
Rescales pw_grids for given box, if necessary.
subroutine, public ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section)
creates the structure ewald_pw_type
Types for excited states potential energies.
subroutine, public exstate_create(ex_env, excited_state, dft_section)
Allocates and intitializes exstate_env.
Definition of the atomic potential types.
subroutine, public fist_nonbond_env_create(fist_nonbond_env, atomic_kind_set, potparm14, potparm, do_nonbonded, do_electrostatics, verlet_skin, ewald_rcut, ei_scale14, vdw_scale14, shift_cutoff)
allocates and intitializes a fist_nonbond_env
Calculation of the incomplete Gamma function F_n(t) for multi-center integrals over Cartesian Gaussia...
subroutine, public init_md_ftable(nmax)
Initialize a table of F_n(t) values in the range 0 <= t <= 12 with a stepsize of 0....
Define type storing the global information of a run. Keep the amount of stored data small....
subroutine, public init_coulomb_local(hartree_local, natom)
...
Types and set/get functions for HFX.
subroutine, public hfx_create(x_data, para_env, hfx_section, atomic_kind_set, qs_kind_set, particle_set, dft_control, cell, orb_basis, ri_basis, nelectron_total, nkp_grid)
This routine allocates and initializes all types in hfx_data
subroutine, public compare_hfx_sections(hfx_section1, hfx_section2, is_identical, same_except_frac)
Compares the non-technical parts of two HFX input section and check whether they are the same Ignore ...
Routines for a Kim-Gordon-like partitioning into molecular subunits.
subroutine, public kg_env_create(qs_env, kg_env, qs_kind_set, input)
Allocates and intitializes kg_env.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
Routines needed for kpoint calculation.
subroutine, public kpoint_initialize_mos(kpoint, mos, added_mos, for_aux_fit)
Initialize a set of MOs and density matrix for each kpoint (kpoint group)
subroutine, public kpoint_initialize(kpoint, particle_set, cell)
Generate the kpoints and initialize the kpoint environment.
subroutine, public kpoint_env_initialize(kpoint, para_env, blacs_env, with_aux_fit)
Initialize the kpoint environment.
Types and basic routines needed for a kpoint calculation.
subroutine, public set_kpoint_info(kpoint, kp_scheme, nkp_grid, kp_shift, symmetry, verbose, full_grid, use_real_wfn, eps_geo, parallel_group_size, kp_range, nkp, xkp, wkp, para_env, blacs_env_all, para_env_kp, para_env_inter_kp, blacs_env, kp_env, kp_aux_env, mpools, iogrp, nkp_groups, kp_dist, cell_to_index, index_to_cell, sab_nl, sab_nl_nosym, inversion_symmetry_only, symmetry_backend, symmetry_reduction_method, gamma_centered)
Set information in a kpoint environment.
subroutine, public kpoint_reset_initialization(kpoint)
Reset all data derived from a concrete k-point initialization. Input options such as the scheme,...
subroutine, public get_kpoint_info(kpoint, kp_scheme, nkp_grid, kp_shift, symmetry, verbose, full_grid, use_real_wfn, eps_geo, parallel_group_size, kp_range, nkp, xkp, wkp, para_env, blacs_env_all, para_env_kp, para_env_inter_kp, blacs_env, kp_env, kp_aux_env, mpools, iogrp, nkp_groups, kp_dist, cell_to_index, index_to_cell, sab_nl, sab_nl_nosym, inversion_symmetry_only, symmetry_backend, symmetry_reduction_method, gamma_centered)
Retrieve information from a kpoint environment.
subroutine, public write_kpoint_info(kpoint, iounit, dft_section)
Write information on the kpoints to output.
subroutine, public kpoint_create(kpoint)
Create a kpoint environment.
subroutine, public read_kpoint_section(kpoint, kpoint_section, a_vec, cell)
Read the kpoint input section.
initializes the environment for lri lri : local resolution of the identity
subroutine, public lri_env_init(lri_env, lri_section)
initializes the lri env
subroutine, public lri_env_basis(ri_type, qs_env, lri_env, qs_kind_set)
initializes the lri env
contains the types and subroutines for dealing with the lri_env lri : local resolution of the identit...
Machine interface based on Fortran 2003 and POSIX.
subroutine, public m_flush(lunit)
flushes units if the &GLOBAL flag is set accordingly
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
Interface to the message passing library MPI.
Define the molecule kind structure types and the corresponding functionality.
subroutine, public write_molecule_kind_set(molecule_kind_set, subsys_section)
Write a moleculeatomic kind set data set to the output unit.
Define the data structure for the molecule information.
Types needed for MP2 calculations.
subroutine, public read_mp2_section(input, mp2_env)
...
Types needed for MP2 calculations.
subroutine, public mp2_env_create(mp2_env)
...
Multipole structure: for multipole (fixed and induced) in FF based MD.
integer, parameter, public do_multipole_none
Provides Cartesian and spherical orbital pointers and indices.
subroutine, public init_orbital_pointers(maxl)
Initialize or update the orbital pointers.
Define methods related to particle_type.
subroutine, public write_qs_particle_coordinates(particle_set, qs_kind_set, subsys_section, label)
Write the atomic coordinates to the output unit.
subroutine, public write_structure_data(particle_set, cell, input_section)
Write structure data requested by a separate structure data input section to the output unit....
subroutine, public write_particle_distances(particle_set, cell, subsys_section)
Write the matrix of the particle distances to the output unit.
Define the data structure for the particle information.
Definition of physical constants:
real(kind=dp), parameter, public kelvin
container for various plainwaves related things
subroutine, public qs_basis_rotation(qs_env, kpoints, basis_type)
Construct basis set rotation matrices.
subroutine, public qs_dftb_param_init(atomic_kind_set, qs_kind_set, dftb_control, dftb_potential, subsys_section, para_env)
...
Definition of the DFTB parameter types.
Working with the DFTB parameter types.
subroutine, public get_dftb_atom_param(dftb_parameter, name, typ, defined, z, zeff, natorb, lmax, skself, occupation, eta, energy, cutoff, xi, di, rcdisp, dudq)
...
Calculation of non local dispersion functionals Some routines adapted from: Copyright (C) 2001-2009 Q...
subroutine, public qs_dispersion_nonloc_init(dispersion_env, para_env)
...
Calculation of dispersion using pair potentials.
subroutine, public qs_dispersion_pairpot_init(atomic_kind_set, qs_kind_set, dispersion_env, pp_section, para_env)
...
Definition of disperson types for DFT calculations.
Set disperson types for DFT calculations.
subroutine, public qs_dispersion_env_set(dispersion_env, xc_section)
...
subroutine, public qs_write_dispersion(qs_env, dispersion_env, ounit)
...
subroutine, public allocate_qs_energy(qs_energy)
Allocate and/or initialise a Quickstep energy data structure.
qs_environment methods that use many other modules
subroutine, public qs_env_setup(qs_env)
initializes various components of the qs_env, that need only atomic_kind_set, cell,...
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, mimic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_vhxc, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, xcint_weights, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, harris_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
subroutine, public set_qs_env(qs_env, super_cell, mos, qmmm, qmmm_periodic, mimic, ewald_env, ewald_pw, mpools, rho_external, external_vxc, mask, scf_control, rel_control, qs_charges, ks_env, ks_qmmm_env, wf_history, scf_env, active_space, input, oce, rho_atom_set, rho0_atom_set, rho0_mpole, run_rtp, rtp, rhoz_set, rhoz_tot, ecoul_1c, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, efield, rhoz_cneo_set, linres_control, xas_env, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, ls_scf_env, do_transport, transport_env, lri_env, lri_density, exstate_env, ec_env, dispersion_env, harris_env, gcp_env, mp2_env, bs_env, kg_env, force, kpoints, wanniercentres, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Set the QUICKSTEP environment.
subroutine, public qs_init(qs_env, para_env, root_section, globenv, cp_subsys, kpoint_env, qmmm, qmmm_env_qm, force_env_section, subsys_section, use_motion_section, silent, multip, charge)
Read the input and the database files for the setup of the QUICKSTEP environment.
Definition of gCP types for DFT calculations.
Set disperson types for DFT calculations.
subroutine, public qs_gcp_env_set(gcp_env, xc_section)
...
subroutine, public qs_gcp_init(qs_env, gcp_env)
...
Types needed for a for a Harris model calculation.
subroutine, public harris_rhoin_init(rhoin, basis_type, qs_kind_set, atomic_kind_set, local_particles, nspin)
...
Harris method environment setup and handling.
subroutine, public harris_write_input(harris_env)
Print out the Harris method input section.
subroutine, public harris_env_create(qs_env, harris_env, harris_section)
Allocates and intitializes harris_env.
Calculate the interaction radii for the operator matrix calculation.
subroutine, public write_pgf_orb_radii(basis, atomic_kind_set, qs_kind_set, subsys_section)
Write the orbital basis function radii to the output unit.
subroutine, public write_paw_radii(atomic_kind_set, qs_kind_set, subsys_section)
Write the radii of the one center projector.
subroutine, public write_ppnl_radii(atomic_kind_set, qs_kind_set, subsys_section)
Write the radii of the projector functions of the Goedecker pseudopotential (GTH, non-local part) to ...
subroutine, public init_se_nlradius(se_control, atomic_kind_set, qs_kind_set, subsys_section)
...
subroutine, public write_ppl_radii(atomic_kind_set, qs_kind_set, subsys_section)
Write the radii of the exponential functions of the Goedecker pseudopotential (GTH,...
subroutine, public init_interaction_radii(qs_control, qs_kind_set)
Initialize all the atomic kind radii for a given threshold value.
subroutine, public write_core_charge_radii(atomic_kind_set, qs_kind_set, subsys_section)
Write the radii of the core charge distributions to the output unit.
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind(qs_kind, basis_set, basis_type, ncgf, nsgf, all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, cneo_potential, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, zatom, zeff, elec_conf, mao, lmax_dftb, alpha_core_charge, ccore_charge, core_charge, core_charge_radius, paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, covalent_radius, vdw_radius, gpw_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, ngrid_ang, ngrid_rad, lmax_rho0, dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, u_minus_j, hund_j, u_of_dft_plus_u, j_of_dft_plus_u, alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, proj_shell_charge, lr_atom, do_mtlr, u_j_loop, ao_coef, init_u_ramping_each_scf, reltmat, ghost, monovalent, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
subroutine, public init_gapw_nlcc(qs_kind_set)
...
subroutine, public init_cneo_basis_set(qs_kind_set, qs_control)
...
subroutine, public write_qs_kind_set(qs_kind_set, subsys_section)
Write an atomic kind set data set to the output unit.
subroutine, public init_gapw_basis_set(qs_kind_set, qs_control, force_env_section, modify_qs_control)
...
subroutine, public init_qs_kind_set(qs_kind_set)
Initialise an atomic kind set data set.
subroutine, public set_qs_kind(qs_kind, paw_atom, ghost, floating, hard_radius, hard0_radius, covalent_radius, vdw_radius, lmax_rho0, zeff, no_optimize, dispersion, u_minus_j, hund_j, reltmat, dftb_parameter, xtb_parameter, elec_conf, pao_basis_size)
Set the components of an atomic kind data set.
subroutine, public check_qs_kind_set(qs_kind_set, dft_control, subsys_section)
...
subroutine, public write_gto_basis_sets(qs_kind_set, subsys_section)
Write all the GTO basis sets of an atomic kind set to the output unit (for the printing of the unnorm...
subroutine, public get_qs_kind_set(qs_kind_set, all_potential_present, tnadd_potential_present, gth_potential_present, sgp_potential_present, paw_atom_present, dft_plus_u_atom_present, maxcgf, maxsgf, maxco, maxco_proj, maxgtops, maxlgto, maxlprj, maxnset, maxsgf_set, ncgf, npgf, nset, nsgf, nshell, maxpol, maxlppl, maxlppnl, maxppnl, nelectron, maxder, max_ngrid_rad, max_sph_harm, maxg_iso_not0, lmax_rho0, basis_rcut, do_mtlr_present, basis_type, total_zeff_corr, npgf_seg, cneo_potential_present, nkind_q, natom_q)
Get attributes of an atomic kind set.
subroutine, public set_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, exc_accint, potential_changed, forces_up_to_date, complex_ks, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, kinetic, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_vhxc, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_ks_im_kp, vppl, xcint_weights, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, kpoints, sab_orb, sab_all, sac_ae, sac_ppl, sac_lri, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, task_list, task_list_soft, subsys, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env)
...
subroutine, public qs_ks_env_create(ks_env)
Allocates a new instance of ks_env.
Definition and initialisation of the mo data type.
subroutine, public allocate_mo_set(mo_set, nao, nmo, nelectron, n_el_f, maxocc, flexible_electron_count)
Allocates a mo set and partially initializes it (nao,nmo,nelectron, and flexible_electron_count are v...
subroutine, public rho0_s_grid_create(pw_env, rho0_mpole)
...
subroutine, public init_rho0(local_rho_set, qs_env, gapw_control, zcore)
...
subroutine, public init_rho_atom(rho_atom_set, atomic_kind_set, qs_kind_set, dft_control, para_env)
...
Routines that work on qs_subsys_type.
subroutine, public qs_subsys_create(subsys, para_env, root_section, force_env_section, subsys_section, use_motion_section, cp_subsys, elkind, silent)
Creates a qs_subsys. Optionally an existsing cp_subsys is used.
types that represent a quickstep subsys
subroutine, public qs_subsys_get(subsys, atomic_kinds, atomic_kind_set, particles, particle_set, local_particles, molecules, molecule_set, molecule_kinds, molecule_kind_set, local_molecules, para_env, colvar_p, shell_particles, core_particles, gci, multipoles, natom, nparticle, ncore, nshell, nkind, atprop, virial, results, cell, cell_ref, use_ref_cell, energy, force, qs_kind_set, cp_subsys, nelectron_total, nelectron_spin)
...
subroutine, public qs_subsys_set(subsys, cp_subsys, local_particles, local_molecules, cell, cell_ref, use_ref_cell, energy, force, qs_kind_set, nelectron_total, nelectron_spin)
...
Storage of past states of the qs_env. Methods to interpolate (or actually normally extrapolate) the n...
subroutine, public wfi_create_for_kp(wf_history)
Adapts wf_history storage flags for k-point calculations. For ASPC, switches from Gamma WFN storage t...
subroutine, public wfi_create(wf_history, interpolation_method_nr, extrapolation_order, has_unit_metric)
...
interpolate the wavefunctions to speed up the convergence when doing MD
subroutine, public wfi_release(wf_history)
releases a wf_history of a wavefunction (see doc/ReferenceCounting.html)
parameters that control a relativistic calculation
subroutine, public rel_c_create(rel_control)
allocates and initializes an rel control object with the default values
subroutine, public rel_c_read_parameters(rel_control, dft_section)
reads the parameters of the relativistic section into the given rel_control
parameters that control an scf iteration
subroutine, public scf_c_read_parameters(scf_control, inp_section)
reads the parameters of the scf section into the given scf_control
subroutine, public scf_c_write_parameters(scf_control, dft_section)
writes out the scf parameters
subroutine, public scf_c_create(scf_control)
allocates and initializes an scf control object with the default values
Methods for handling the 1/R^3 residual integral part.
subroutine, public semi_empirical_expns3_setup(qs_kind_set, se_control, method_id)
Setup the quantity necessary to handle the slowly convergent residual integral term 1/R^3.
Arrays of parameters used in the semi-empirical calculations \References Everywhere in this module TC...
subroutine, public init_se_intd_array()
Initialize all arrays used for the evaluation of the integrals.
Setup and Methods for semi-empirical multipole types.
subroutine, public nddo_mpole_setup(nddo_mpole, natom)
Setup NDDO multipole type.
Definition of the semi empirical multipole integral expansions types.
Type to store integrals for semi-empirical calculations.
subroutine, public semi_empirical_si_create(store_int_env, se_section, compression)
Allocate semi-empirical store integrals type.
Definition of the semi empirical parameter types.
subroutine, public se_taper_create(se_taper, integral_screening, do_ewald, taper_cou, range_cou, taper_exc, range_exc, taper_scr, range_scr, taper_lrc, range_lrc)
Creates the taper type used in SE calculations.
Working with the semi empirical parameter types.
subroutine, public se_cutoff_compatible(se_control, se_section, cell, output_unit)
Reset cutoffs trying to be somehow a bit smarter.
subroutine, public tb_init_wf(tb, dft_control)
initialize wavefunction ...
subroutine, public tb_init_geometry(qs_env, tb)
intialize geometry objects ...
subroutine, public tb_set_calculator(tb, typ, accuracy, param_file)
...
subroutine, public tb_get_basis(tb, gto_basis_set, element_symbol, param, occ)
...
routines for DFT+NEGF calculations (coupling with the quantum transport code OMEN)
subroutine, public transport_env_create(qs_env)
creates the transport environment
subroutine, public xtb_parameters_set(param)
Read atom parameters for xTB Hamiltonian from input file.
subroutine, public xtb_parameters_init(param, gfn_type, element_symbol, parameter_file_path, parameter_file_name, para_env)
...
subroutine, public xtb_spinpol_ext(param, gfn_type, xtb_control)
...
subroutine, public init_xtb_basis(param, gto_basis_set, ngauss)
...
subroutine, public xtb_spinpol_init(param, gfn_type, element_symbol, parameter_file_path, spinpol_param_file_name, para_env)
...
xTB (repulsive) pair potentials Reference: Stefan Grimme, Christoph Bannwarth, Philip Shushkov JCTC 1...
subroutine, public xtb_pp_radius(qs_kind_set, ppradius, eps_pair, kfparam)
...
Definition of the xTB parameter types.
subroutine, public allocate_xtb_atom_param(xtb_parameter)
...
subroutine, public set_xtb_atom_param(xtb_parameter, aname, typ, defined, z, zeff, natorb, lmax, nao, lao, rcut, rcov, kx, eta, xgamma, alpha, zneff, nshell, nval, lval, kpoly, kappa, wall, hen, zeta, xi, kappa0, alpg, electronegativity, occupation, chmax, en, kqat2, kcn, kq)
...
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
type of a logger, at the moment it contains just a print level starting at which level it should be l...
represents a system: atoms, molecules, their pos,vel,...
structure to store local (to a processor) ordered lists of integers.
Contains information on the energy correction functional for KG.
to build arrays of pointers
Contains information on the excited states energy.
contains the initially parsed file and the initial parallel environment
Contains information about kpoints.
stores all the informations relevant to an mpi environment
contained for different pw related things
Contains information on the Harris method.
Provides all information about a quickstep kind.
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...
keeps track of the previous wavefunctions and can extrapolate them for the next step of md
contains the parameters needed by a relativistic calculation
Global Multipolar NDDO information type.
Semi-empirical store integrals type.
Taper type use in semi-empirical calculations.