219#include "./base/base_uses.f90"
226 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_environment'
252 SUBROUTINE qs_init(qs_env, para_env, root_section, globenv, cp_subsys, kpoint_env, cell, cell_ref, &
253 qmmm, qmmm_env_qm, force_env_section, subsys_section, &
254 use_motion_section, silent)
262 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell, cell_ref
263 LOGICAL,
INTENT(IN),
OPTIONAL :: qmmm
266 LOGICAL,
INTENT(IN) :: use_motion_section
267 LOGICAL,
INTENT(IN),
OPTIONAL :: silent
269 CHARACTER(LEN=default_string_length) :: basis_type
270 INTEGER :: ikind, method_id, nelectron_total, &
272 LOGICAL :: do_admm_rpa, do_ec_hfx, do_et, do_exx, do_hfx, do_kpoints, is_identical, is_semi, &
273 mp2_present, my_qmmm, qmmm_decoupl, same_except_frac, use_ref_cell
274 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rtmat
276 TYPE(
cell_type),
POINTER :: my_cell, my_cell_ref
286 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
293 et_coupling_section, hfx_section, kpoint_section, mp2_section, rpa_hfx_section, &
296 NULLIFY (my_cell, my_cell_ref, atomic_kind_set, particle_set, &
297 qs_kind_set, kpoint_section, dft_section, ec_section, &
298 subsys, ks_env, dft_control, blacs_env)
300 CALL set_qs_env(qs_env, input=force_env_section)
301 IF (.NOT.
ASSOCIATED(subsys_section))
THEN
307 IF (
PRESENT(qmmm)) my_qmmm = qmmm
308 qmmm_decoupl = .false.
309 IF (
PRESENT(qmmm_env_qm))
THEN
313 qmmm_decoupl = my_qmmm .AND. qmmm_env_qm%periodic .AND. qmmm_env_qm%multipole
315 qs_env%qmmm_env_qm => qmmm_env_qm
321 SELECT CASE (method_id)
334 force_env_section=force_env_section, &
335 subsys_section=subsys_section, &
336 use_motion_section=use_motion_section, &
337 root_section=root_section, &
338 cp_subsys=cp_subsys, cell=cell, cell_ref=cell_ref, &
339 elkind=is_semi, silent=silent)
348 cell_ref=my_cell_ref, &
349 use_ref_cell=use_ref_cell, &
350 atomic_kind_set=atomic_kind_set, &
351 qs_kind_set=qs_kind_set, &
352 particle_set=particle_set)
355 IF (
PRESENT(globenv))
THEN
357 globenv%blacs_repeatable)
366 force_env_section, subsys_section, para_env)
369 IF (
PRESENT(kpoint_env))
THEN
370 kpoints => kpoint_env
371 CALL set_qs_env(qs_env=qs_env, kpoints=kpoints)
376 CALL set_qs_env(qs_env=qs_env, kpoints=kpoints)
384 CALL qs_init_subsys(qs_env, para_env, subsys, my_cell, my_cell_ref, use_ref_cell, &
385 subsys_section, silent=silent)
387 CALL get_qs_env(qs_env, dft_control=dft_control)
388 IF (method_id ==
do_method_lrigpw .OR. dft_control%qs_control%lri_optbas)
THEN
389 CALL get_qs_env(qs_env=qs_env, lri_env=lri_env)
392 CALL cp_warn(__location__,
"Experimental code: "// &
393 "RIGPW should only be used for testing.")
394 CALL get_qs_env(qs_env=qs_env, lri_env=lri_env)
398 IF (my_qmmm .AND.
PRESENT(qmmm_env_qm) .AND. .NOT. dft_control%qs_control%commensurate_mgrids)
THEN
400 CALL cp_abort(__location__,
"QM/MM with coupling GAUSS or S-WAVE requires "// &
401 "keyword FORCE_EVAL/DFT/MGRID/COMMENSURATE to be enabled.")
406 CALL get_qs_env(qs_env=qs_env, do_kpoints=do_kpoints, blacs_env=blacs_env)
410 CALL get_qs_env(qs_env=qs_env, wf_history=wf_history)
421 CALL get_qs_env(qs_env, dft_control=dft_control, scf_control=scf_control, nelectron_total=nelectron_total)
426 IF (dft_control%do_admm)
THEN
427 basis_type =
'AUX_FIT'
431 CALL hfx_create(qs_env%x_data, para_env, hfx_section, atomic_kind_set, &
432 qs_kind_set, particle_set, dft_control, my_cell, orb_basis=basis_type, &
433 nelectron_total=nelectron_total, nkp_grid=nkp_grid)
438 IF (mp2_present)
THEN
439 cpassert(
ASSOCIATED(qs_env%mp2_env))
452 qs_env%mp2_env%ri_rpa%reuse_hfx = .true.
453 IF (.NOT. do_hfx) qs_env%mp2_env%ri_rpa%reuse_hfx = .false.
455 IF (.NOT. (is_identical .OR. same_except_frac)) qs_env%mp2_env%ri_rpa%reuse_hfx = .false.
456 IF (dft_control%do_admm .AND. .NOT. do_admm_rpa) qs_env%mp2_env%ri_rpa%reuse_hfx = .false.
458 IF (.NOT. qs_env%mp2_env%ri_rpa%reuse_hfx)
THEN
459 IF (do_admm_rpa)
THEN
460 basis_type =
'AUX_FIT'
464 CALL hfx_create(qs_env%mp2_env%ri_rpa%x_data, para_env, rpa_hfx_section, atomic_kind_set, &
465 qs_kind_set, particle_set, dft_control, my_cell, orb_basis=basis_type, &
466 nelectron_total=nelectron_total)
468 qs_env%mp2_env%ri_rpa%x_data => qs_env%x_data
473 IF (dft_control%qs_control%do_kg)
THEN
475 CALL kg_env_create(qs_env, qs_env%kg_env, qs_kind_set, qs_env%input)
480 l_val=qs_env%excited_state)
481 NULLIFY (exstate_env)
482 CALL exstate_create(exstate_env, qs_env%excited_state, dft_section)
483 CALL set_qs_env(qs_env, exstate_env=exstate_env)
486 "PROPERTIES%ET_COUPLING")
492 IF (qs_env%do_transport)
THEN
496 CALL get_qs_env(qs_env, harris_env=harris_env)
497 IF (qs_env%harris_method)
THEN
499 CALL get_qs_env(qs_env, local_particles=local_particles)
500 CALL harris_rhoin_init(harris_env%rhoin,
"RHOIN", qs_kind_set, atomic_kind_set, &
501 local_particles, dft_control%nspins)
509 l_val=qs_env%energy_correction)
514 IF (qs_env%energy_correction)
THEN
519 IF (ec_env%do_ec_hfx)
THEN
522 IF (ec_env%basis_inconsistent)
THEN
523 CALL cp_abort(__location__, &
524 "Energy correction methods with hybrid functionals: "// &
525 "correction and ground state need to use the same basis. "// &
526 "Checked by comparing basis set names only.")
530 IF (ec_env%do_ec_admm .AND. .NOT. dft_control%do_admm)
THEN
531 CALL cp_abort(__location__,
"Need an ADMM input section for ADMM EC to work")
534 ec_env%reuse_hfx = .true.
535 IF (.NOT. do_hfx) ec_env%reuse_hfx = .false.
537 IF (.NOT. (is_identical .OR. same_except_frac)) ec_env%reuse_hfx = .false.
538 IF (dft_control%do_admm .AND. .NOT. ec_env%do_ec_admm) ec_env%reuse_hfx = .false.
540 IF (.NOT. ec_env%reuse_hfx)
THEN
541 IF (ec_env%do_ec_admm)
THEN
542 basis_type =
'AUX_FIT'
546 CALL hfx_create(ec_env%x_data, para_env, ec_hfx_section, atomic_kind_set, &
547 qs_kind_set, particle_set, dft_control, my_cell, orb_basis=basis_type, &
548 nelectron_total=nelectron_total)
550 ec_env%x_data => qs_env%x_data
559 IF (dft_control%qs_control%do_almo_scf)
THEN
564 CALL get_qs_env(qs_env, rel_control=rel_control)
565 IF (rel_control%rel_method /=
rel_none)
THEN
567 nkind =
SIZE(atomic_kind_set)
571 IF (
ASSOCIATED(rtmat))
CALL set_qs_kind(qs_kind_set(ikind), reltmat=rtmat)
590 SUBROUTINE qs_init_subsys(qs_env, para_env, subsys, cell, cell_ref, use_ref_cell, subsys_section, &
596 TYPE(
cell_type),
POINTER :: cell, cell_ref
597 LOGICAL,
INTENT(in) :: use_ref_cell
599 LOGICAL,
INTENT(in),
OPTIONAL :: silent
601 CHARACTER(len=*),
PARAMETER :: routinen =
'qs_init_subsys'
603 CHARACTER(len=2) :: element_symbol
604 INTEGER :: gfn_type, handle, ikind, ispin, iw, lmax_sphere, maxl, maxlgto, maxlgto_lri, &
605 maxlppl, maxlppnl, method_id, multiplicity, my_ival, n_ao, n_mo_add, natom, nelectron, &
606 ngauss, nkind, output_unit, sort_basis, tnadd_method
607 INTEGER,
DIMENSION(2) :: n_mo, nelectron_spin
608 INTEGER,
DIMENSION(5) :: occ
609 LOGICAL :: all_potential_present, be_silent, do_kpoints, do_ri_hfx, do_ri_mp2, do_ri_rpa, &
610 do_ri_sos_mp2, do_rpa_ri_exx, do_wfc_im_time, e1terms, has_unit_metric, lribas, &
611 mp2_present, orb_gradient
612 REAL(kind=
dp) :: alpha, ccore, ewald_rcut, fxx, maxocc, &
613 rcut, total_zeff_corr, verlet_skin, &
625 rhoin_basis, ri_aux_basis_set, &
626 ri_hfx_basis, ri_xas_basis, &
631 TYPE(
mo_set_type),
DIMENSION(:),
POINTER :: mos, mos_last_converged
640 POINTER :: dftb_potential
645 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
653 TYPE(
section_vals_type),
POINTER :: dft_section, et_coupling_section, et_ddapc_section, &
654 ewald_section, harris_section, lri_section, mp2_section, nl_section, poisson_section, &
655 pp_section, print_section, qs_section, se_section, tddfpt_section, xc_section
660 CALL timeset(routinen, handle)
666 IF (
PRESENT(silent)) be_silent = silent
671 NULLIFY (mos, se_taper)
672 NULLIFY (dft_control)
675 NULLIFY (local_molecules)
676 NULLIFY (local_particles)
677 NULLIFY (scf_control)
678 NULLIFY (dft_section)
679 NULLIFY (et_coupling_section)
681 NULLIFY (mos_last_converged)
689 qs_kind_set=qs_kind_set, &
690 atomic_kind_set=atomic_kind_set, &
691 molecule_set=molecule_set, &
692 molecule_kind_set=molecule_kind_set)
698 dft_control%qs_control%periodicity = sum(cell%perd)
704 IF (.NOT. be_silent)
THEN
707 SELECT CASE (method_id)
716 IF (dft_control%qs_control%xtb_control%do_tblite)
THEN
717 CALL tblite_header(iw, dft_control%qs_control%xtb_control%tblite_method)
719 gfn_type = dft_control%qs_control%xtb_control%gfn_type
724 "PRINT%PROGRAM_BANNER")
727 IF (dft_control%do_sccs .AND. dft_control%qs_control%gapw)
THEN
728 cpabort(
"SCCS is not yet implemented with GAPW")
730 CALL get_qs_env(qs_env=qs_env, do_kpoints=do_kpoints)
733 SELECT CASE (dft_control%qs_control%wf_interpolation_method_nr)
741 dft_control%qs_control%et_coupling_calc = .false.
744 dft_control%qs_control%et_coupling_calc = .true.
745 dft_control%qs_control%ddapc_restraint = .true.
746 CALL read_ddapc_section(dft_control%qs_control, ddapc_restraint_section=et_ddapc_section)
757 ALLOCATE (rel_control)
760 CALL set_qs_env(qs_env, rel_control=rel_control)
765 NULLIFY (ewald_env, ewald_pw, dftb_potential)
766 dftb_control => dft_control%qs_control%dftb_control
768 subsys_section=subsys_section, para_env=para_env)
769 CALL set_qs_env(qs_env, dftb_potential=dftb_potential)
771 IF (dftb_control%do_ewald)
THEN
775 CALL ewald_env_set(ewald_env, poisson_section=poisson_section)
781 CALL ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section=print_section)
782 CALL set_qs_env(qs_env, ewald_env=ewald_env, ewald_pw=ewald_pw)
784 ELSEIF (dft_control%qs_control%method_id ==
do_method_xtb)
THEN
786 xtb_control => dft_control%qs_control%xtb_control
788 IF (xtb_control%do_tblite)
THEN
797 qs_kind => qs_kind_set(ikind)
799 cpassert(.NOT.
ASSOCIATED(qs_kind%xtb_parameter))
802 CALL get_qs_kind(qs_kind, element_symbol=element_symbol)
804 NULLIFY (tmp_basis_set)
805 CALL tb_get_basis(qs_env%tb_tblite, tmp_basis_set, element_symbol, qs_kind%xtb_parameter, occ)
810 zeff_correction = 0.0_dp
812 zeff=real(sum(occ),
dp), zeff_correction=zeff_correction)
815 NULLIFY (ewald_env, ewald_pw)
817 qs_kind => qs_kind_set(ikind)
819 cpassert(.NOT.
ASSOCIATED(qs_kind%xtb_parameter))
822 gfn_type = dft_control%qs_control%xtb_control%gfn_type
823 CALL get_qs_kind(qs_kind, element_symbol=element_symbol)
825 xtb_control%parameter_file_path, xtb_control%parameter_file_name, &
830 NULLIFY (tmp_basis_set)
831 IF (qs_kind%xtb_parameter%z == 1)
THEN
833 ngauss = xtb_control%h_sto_ng
835 ngauss = xtb_control%sto_ng
837 IF (qs_kind%xtb_parameter%defined)
THEN
842 IF (
ASSOCIATED(qs_kind%all_potential))
THEN
843 DEALLOCATE (qs_kind%all_potential%elec_conf)
844 DEALLOCATE (qs_kind%all_potential)
848 IF (qs_kind%xtb_parameter%defined)
THEN
849 zeff_correction = 0.0_dp
851 zeff=qs_kind%xtb_parameter%zeff, zeff_correction=zeff_correction)
852 CALL get_potential(qs_kind%all_potential, alpha_core_charge=alpha)
853 ccore = qs_kind%xtb_parameter%zeff*sqrt((alpha/
pi)**3)
854 CALL set_potential(qs_kind%all_potential, ccore_charge=ccore)
855 qs_kind%xtb_parameter%zeff = qs_kind%xtb_parameter%zeff - zeff_correction
861 ALLOCATE (xtb_control%rcpair(nkind, nkind))
862 CALL xtb_pp_radius(qs_kind_set, xtb_control%rcpair, xtb_control%eps_pair, xtb_control%kf)
864 IF (xtb_control%do_ewald)
THEN
868 CALL ewald_env_set(ewald_env, poisson_section=poisson_section)
871 IF (gfn_type == 0)
THEN
873 silent=silent, pset=
"EEQ")
879 CALL ewald_pw_create(ewald_pw, ewald_env, cell, cell_ref, print_section=print_section)
880 CALL set_qs_env(qs_env, ewald_env=ewald_env, ewald_pw=ewald_pw)
887 dft_control%qs_control%lri_optbas .OR. &
897 CALL get_qs_kind_set(qs_kind_set, all_potential_present=all_potential_present)
898 IF ((dft_control%qs_control%method_id ==
do_method_gpw) .OR. &
901 IF (all_potential_present)
THEN
902 cpabort(
"All-electron calculations with GPW, GAPW_XC, and OFGPW are not implemented")
907 CALL get_qs_kind_set(qs_kind_set, dft_plus_u_atom_present=dft_control%dft_plus_u)
909 IF (dft_control%do_admm)
THEN
913 NULLIFY (aux_fit_basis)
914 qs_kind => qs_kind_set(ikind)
915 CALL get_qs_kind(qs_kind, basis_set=aux_fit_basis, basis_type=
"AUX_FIT")
916 IF (.NOT. (
ASSOCIATED(aux_fit_basis)))
THEN
918 cpabort(
"AUX_FIT basis set is not defined. ")
928 e1terms = lri_env%exact_1c_terms
930 IF (dft_control%qs_control%do_kg)
THEN
938 NULLIFY (lri_aux_basis)
939 qs_kind => qs_kind_set(ikind)
940 CALL get_qs_kind(qs_kind, basis_set=lri_aux_basis, basis_type=
"LRI_AUX")
941 IF (.NOT. (
ASSOCIATED(lri_aux_basis)))
THEN
943 CALL cp_warn(__location__,
"Automatic Generation of LRI_AUX basis. "// &
944 "This is experimental code.")
953 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%RI_RPA%HF%RI%_SECTION_PARAMETERS_", &
955 IF (do_ri_hfx .OR. do_rpa_ri_exx)
THEN
959 NULLIFY (ri_hfx_basis)
960 qs_kind => qs_kind_set(ikind)
961 CALL get_qs_kind(qs_kind=qs_kind, basis_set=ri_hfx_basis, &
963 IF (.NOT. (
ASSOCIATED(ri_hfx_basis)))
THEN
965 IF (dft_control%do_admm)
THEN
967 basis_type=
"AUX_FIT", basis_sort=sort_basis)
970 basis_sort=sort_basis)
981 NULLIFY (ri_hfx_basis)
982 qs_kind => qs_kind_set(ikind)
983 CALL get_qs_kind(qs_kind, basis_set=ri_hfx_basis, basis_type=
"RI_HXC")
984 IF (.NOT. (
ASSOCIATED(ri_hfx_basis)))
THEN
995 l_val=qs_env%harris_method)
998 CALL set_qs_env(qs_env, harris_env=harris_env)
1000 IF (qs_env%harris_method)
THEN
1004 NULLIFY (tmp_basis_set)
1005 qs_kind => qs_kind_set(ikind)
1006 CALL get_qs_kind(qs_kind, basis_set=rhoin_basis, basis_type=
"RHOIN")
1007 IF (.NOT. (
ASSOCIATED(rhoin_basis)))
THEN
1010 IF (qs_env%harris_env%density_source ==
hden_atomic)
THEN
1014 rhoin_basis => tmp_basis_set
1023 IF (mp2_present)
THEN
1027 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%LOW_SCALING%_SECTION_PARAMETERS_", &
1028 l_val=do_wfc_im_time)
1031 CALL cp_warn(__location__, &
1032 "Low-scaling RPA requires SORT_BASIS EXP keyword (in DFT input section) for good performance")
1037 CALL get_qs_env(qs_env, mp2_env=mp2_env, nkind=nkind)
1038 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%RI_MP2%_SECTION_PARAMETERS_", l_val=do_ri_mp2)
1039 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%RI_SOS_MP2%_SECTION_PARAMETERS_", l_val=do_ri_sos_mp2)
1040 CALL section_vals_val_get(qs_env%input,
"DFT%XC%WF_CORRELATION%RI_RPA%_SECTION_PARAMETERS_", l_val=do_ri_rpa)
1041 IF (do_ri_mp2 .OR. do_ri_sos_mp2 .OR. do_ri_rpa)
THEN
1043 NULLIFY (ri_aux_basis_set)
1044 qs_kind => qs_kind_set(ikind)
1045 CALL get_qs_kind(qs_kind=qs_kind, basis_set=ri_aux_basis_set, &
1046 basis_type=
"RI_AUX")
1047 IF (.NOT. (
ASSOCIATED(ri_aux_basis_set)))
THEN
1054 qs_env%mp2_env%ri_aux_auto_generated = .true.
1061 IF (dft_control%do_xas_tdp_calculation)
THEN
1065 NULLIFY (ri_xas_basis)
1066 qs_kind => qs_kind_set(ikind)
1067 CALL get_qs_kind(qs_kind, basis_set=ri_xas_basis, basis_type=
"RI_XAS")
1068 IF (.NOT.
ASSOCIATED(ri_xas_basis))
THEN
1078 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto, maxlppl=maxlppl, maxlppnl=maxlppnl)
1080 lmax_sphere = dft_control%qs_control%gapw_control%lmax_sphere
1081 IF (lmax_sphere .LT. 0)
THEN
1082 lmax_sphere = 2*maxlgto
1083 dft_control%qs_control%gapw_control%lmax_sphere = lmax_sphere
1085 IF (dft_control%qs_control%method_id ==
do_method_lrigpw .OR. dft_control%qs_control%lri_optbas)
THEN
1086 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto_lri, basis_type=
"LRI_AUX")
1088 maxlgto = max(maxlgto, maxlgto_lri)
1090 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto_lri, basis_type=
"RI_HXC")
1091 maxlgto = max(maxlgto, maxlgto_lri)
1093 IF (dft_control%do_xas_tdp_calculation)
THEN
1095 CALL get_qs_kind_set(qs_kind_set, maxlgto=maxlgto_lri, basis_type=
"RI_XAS")
1096 maxlgto = max(maxlgto, maxlgto_lri)
1098 maxl = max(2*maxlgto, maxlppl, maxlppnl, lmax_sphere) + 1
1110 qs_control => dft_control%qs_control
1117 maxl = max(3*maxlgto + 1, 0)
1124 IF (.NOT. dft_control%qs_control%xtb_control%do_tblite)
THEN
1127 qs_kind => qs_kind_set(ikind)
1128 IF (qs_kind%xtb_parameter%defined)
THEN
1129 CALL get_qs_kind(qs_kind, basis_set=tmp_basis_set)
1130 rcut = xtb_control%coulomb_sr_cut
1131 fxx = 2.0_dp*xtb_control%coulomb_sr_eps*qs_kind%xtb_parameter%eta**2
1132 fxx = 0.80_dp*(1.0_dp/fxx)**0.3333_dp
1133 rcut = min(rcut, xtb_control%coulomb_sr_cut)
1134 qs_kind%xtb_parameter%rcut = min(rcut, fxx)
1136 qs_kind%xtb_parameter%rcut = 0.0_dp
1142 IF (.NOT. be_silent)
THEN
1154 particle_set=particle_set, &
1155 local_particles=local_particles, &
1156 molecule_kind_set=molecule_kind_set, &
1157 molecule_set=molecule_set, &
1158 local_molecules=local_molecules, &
1159 force_env_section=qs_env%input)
1162 ALLOCATE (scf_control)
1164 IF (dft_control%qs_control%dftb)
THEN
1165 scf_control%non_selfconsistent = .NOT. dft_control%qs_control%dftb_control%self_consistent
1167 IF (dft_control%qs_control%xtb)
THEN
1168 IF (dft_control%qs_control%xtb_control%do_tblite)
THEN
1169 scf_control%non_selfconsistent = .false.
1171 scf_control%non_selfconsistent = (dft_control%qs_control%xtb_control%gfn_type == 0)
1174 IF (qs_env%harris_method)
THEN
1175 scf_control%non_selfconsistent = .true.
1183 has_unit_metric = .false.
1184 IF (dft_control%qs_control%semi_empirical)
THEN
1185 IF (dft_control%qs_control%se_control%orthogonal_basis) has_unit_metric = .true.
1187 IF (dft_control%qs_control%dftb)
THEN
1188 IF (dft_control%qs_control%dftb_control%orthogonal_basis) has_unit_metric = .true.
1190 CALL set_qs_env(qs_env, has_unit_metric=has_unit_metric)
1194 interpolation_method_nr= &
1195 dft_control%qs_control%wf_interpolation_method_nr, &
1196 extrapolation_order=dft_control%qs_control%wf_extrapolation_order, &
1197 has_unit_metric=has_unit_metric)
1201 scf_control=scf_control, &
1202 wf_history=wf_history)
1205 cell_ref=cell_ref, &
1206 use_ref_cell=use_ref_cell, &
1211 CALL set_ks_env(ks_env, dft_control=dft_control)
1213 CALL qs_subsys_set(subsys, local_molecules=local_molecules, &
1214 local_particles=local_particles, cell=cell)
1221 atomic_kind_set=atomic_kind_set, &
1222 dft_control=dft_control, &
1223 scf_control=scf_control)
1227 IF (dft_control%qs_control%do_ls_scf .OR. &
1228 dft_control%qs_control%do_almo_scf)
THEN
1229 CALL set_qs_env(qs_env=qs_env, requires_mo_derivs=.false.)
1231 IF (scf_control%use_ot)
THEN
1232 CALL set_qs_env(qs_env=qs_env, requires_mo_derivs=.true.)
1234 CALL set_qs_env(qs_env=qs_env, requires_mo_derivs=.false.)
1239 dft_control%smear = scf_control%smear%do_smear
1242 IF (.NOT. (dft_control%qs_control%dftb .OR. dft_control%qs_control%xtb))
THEN
1243 IF (dft_control%apply_period_efield)
THEN
1244 CALL get_qs_env(qs_env=qs_env, requires_mo_derivs=orb_gradient)
1245 IF (.NOT. orb_gradient)
THEN
1246 CALL cp_abort(__location__,
"Periodic Efield needs orbital gradient and direct optimization."// &
1247 " Use the OT optimization method.")
1249 IF (dft_control%smear)
THEN
1250 CALL cp_abort(__location__,
"Periodic Efield needs equal occupation numbers."// &
1251 " Smearing option is not possible.")
1260 NULLIFY (rho_atom_set)
1261 gapw_control => dft_control%qs_control%gapw_control
1262 CALL init_rho_atom(rho_atom_set, atomic_kind_set, qs_kind_set, dft_control, para_env)
1263 CALL set_qs_env(qs_env=qs_env, rho_atom_set=rho_atom_set)
1265 CALL get_qs_env(qs_env=qs_env, local_rho_set=local_rho_set, natom=natom)
1267 CALL init_rho0(local_rho_set, qs_env, gapw_control)
1279 ELSE IF (dft_control%qs_control%semi_empirical)
THEN
1280 NULLIFY (se_store_int_env, se_nddo_mpole, se_nonbond_env)
1281 natom =
SIZE(particle_set)
1283 se_control => dft_control%qs_control%se_control
1288 SELECT CASE (dft_control%qs_control%method_id)
1294 CALL init_se_nlradius(se_control, atomic_kind_set, qs_kind_set, subsys_section)
1299 IF (se_control%do_ewald .OR. se_control%do_ewald_gks)
THEN
1300 ALLOCATE (ewald_env)
1303 CALL ewald_env_set(ewald_env, poisson_section=poisson_section)
1306 "PRINT%GRID_INFORMATION")
1311 print_section=print_section)
1317 IF (se_control%do_ewald)
THEN
1318 CALL ewald_env_get(ewald_env, max_multipole=se_control%max_multipole)
1322 ALLOCATE (se_nonbond_env)
1324 do_electrostatics=.true., verlet_skin=verlet_skin, ewald_rcut=ewald_rcut, &
1325 ei_scale14=0.0_dp, vdw_scale14=0.0_dp, shift_cutoff=.false.)
1328 CALL set_qs_env(qs_env, ewald_env=ewald_env, ewald_pw=ewald_pw, &
1329 se_nonbond_env=se_nonbond_env, se_nddo_mpole=se_nddo_mpole)
1332 dft_control%qs_control%method_id)
1335 CALL se_taper_create(se_taper, se_control%integral_screening, se_control%do_ewald, &
1336 se_control%taper_cou, se_control%range_cou, &
1337 se_control%taper_exc, se_control%range_exc, &
1338 se_control%taper_scr, se_control%range_scr, &
1339 se_control%taper_lrc, se_control%range_lrc)
1343 CALL set_qs_env(qs_env, se_store_int_env=se_store_int_env)
1347 IF (dft_control%qs_control%method_id ==
do_method_gpw .OR. &
1353 ALLOCATE (dispersion_env)
1354 NULLIFY (xc_section)
1358 NULLIFY (pp_section)
1362 NULLIFY (nl_section)
1366 CALL set_qs_env(qs_env, dispersion_env=dispersion_env)
1367 ELSE IF (dft_control%qs_control%method_id ==
do_method_dftb)
THEN
1368 ALLOCATE (dispersion_env)
1370 dispersion_env%doabc = .false.
1371 dispersion_env%c9cnst = .false.
1372 dispersion_env%lrc = .false.
1373 dispersion_env%srb = .false.
1374 dispersion_env%verbose = .false.
1375 NULLIFY (dispersion_env%c6ab, dispersion_env%maxci, dispersion_env%r0ab, dispersion_env%rcov, &
1376 dispersion_env%r2r4, dispersion_env%cn, dispersion_env%cnkind, dispersion_env%cnlist, &
1377 dispersion_env%d3_exclude_pair)
1378 NULLIFY (dispersion_env%q_mesh, dispersion_env%kernel, dispersion_env%d2phi_dk2, &
1379 dispersion_env%d2y_dx2, dispersion_env%dftd_section)
1380 NULLIFY (dispersion_env%sab_vdw, dispersion_env%sab_cn)
1381 IF (dftb_control%dispersion .AND. dftb_control%dispersion_type ==
dispersion_d3)
THEN
1384 dispersion_env%eps_cn = dftb_control%epscn
1385 dispersion_env%s6 = dftb_control%sd3(1)
1386 dispersion_env%sr6 = dftb_control%sd3(2)
1387 dispersion_env%s8 = dftb_control%sd3(3)
1388 dispersion_env%domol = .false.
1389 dispersion_env%kgc8 = 0._dp
1390 dispersion_env%rc_disp = dftb_control%rcdisp
1391 dispersion_env%exp_pre = 0._dp
1392 dispersion_env%scaling = 0._dp
1393 dispersion_env%nd3_exclude_pair = 0
1394 dispersion_env%parameter_file_name = dftb_control%dispersion_parameter_file
1396 ELSEIF (dftb_control%dispersion .AND. dftb_control%dispersion_type ==
dispersion_d3bj)
THEN
1399 dispersion_env%eps_cn = dftb_control%epscn
1400 dispersion_env%s6 = dftb_control%sd3bj(1)
1401 dispersion_env%a1 = dftb_control%sd3bj(2)
1402 dispersion_env%s8 = dftb_control%sd3bj(3)
1403 dispersion_env%a2 = dftb_control%sd3bj(4)
1404 dispersion_env%domol = .false.
1405 dispersion_env%kgc8 = 0._dp
1406 dispersion_env%rc_disp = dftb_control%rcdisp
1407 dispersion_env%exp_pre = 0._dp
1408 dispersion_env%scaling = 0._dp
1409 dispersion_env%nd3_exclude_pair = 0
1410 dispersion_env%parameter_file_name = dftb_control%dispersion_parameter_file
1412 ELSEIF (dftb_control%dispersion .AND. dftb_control%dispersion_type ==
dispersion_d2)
THEN
1415 dispersion_env%exp_pre = dftb_control%exp_pre
1416 dispersion_env%scaling = dftb_control%scaling
1417 dispersion_env%parameter_file_name = dftb_control%dispersion_parameter_file
1418 dispersion_env%rc_disp = dftb_control%rcdisp
1423 CALL set_qs_env(qs_env, dispersion_env=dispersion_env)
1424 ELSE IF (dft_control%qs_control%method_id ==
do_method_xtb)
THEN
1425 IF (.NOT. (dft_control%qs_control%xtb_control%do_tblite))
THEN
1426 ALLOCATE (dispersion_env)
1428 dispersion_env%doabc = .false.
1429 dispersion_env%c9cnst = .false.
1430 dispersion_env%lrc = .false.
1431 dispersion_env%srb = .false.
1432 dispersion_env%verbose = .false.
1433 NULLIFY (dispersion_env%c6ab, dispersion_env%maxci, &
1434 dispersion_env%r0ab, dispersion_env%rcov, &
1435 dispersion_env%r2r4, dispersion_env%cn, &
1436 dispersion_env%cnkind, dispersion_env%cnlist, &
1437 dispersion_env%d3_exclude_pair)
1438 NULLIFY (dispersion_env%q_mesh, dispersion_env%kernel, dispersion_env%d2phi_dk2, &
1439 dispersion_env%d2y_dx2, dispersion_env%dftd_section)
1440 NULLIFY (dispersion_env%sab_vdw, dispersion_env%sab_cn)
1442 dispersion_env%eps_cn = xtb_control%epscn
1443 dispersion_env%s6 = xtb_control%s6
1444 dispersion_env%s8 = xtb_control%s8
1445 dispersion_env%a1 = xtb_control%a1
1446 dispersion_env%a2 = xtb_control%a2
1447 dispersion_env%domol = .false.
1448 dispersion_env%kgc8 = 0._dp
1449 dispersion_env%rc_disp = xtb_control%rcdisp
1450 dispersion_env%rc_d4 = xtb_control%rcdisp
1451 dispersion_env%exp_pre = 0._dp
1452 dispersion_env%scaling = 0._dp
1453 dispersion_env%nd3_exclude_pair = 0
1454 dispersion_env%parameter_file_name = xtb_control%dispersion_parameter_file
1456 SELECT CASE (xtb_control%vdw_type)
1463 dispersion_env%ref_functional =
"none"
1465 dispersion_env, para_env=para_env)
1466 dispersion_env%cnfun = 2
1470 CALL set_qs_env(qs_env, dispersion_env=dispersion_env)
1472 ELSE IF (dft_control%qs_control%semi_empirical)
THEN
1473 ALLOCATE (dispersion_env)
1475 dispersion_env%doabc = .false.
1476 dispersion_env%c9cnst = .false.
1477 dispersion_env%lrc = .false.
1478 dispersion_env%srb = .false.
1479 dispersion_env%verbose = .false.
1480 NULLIFY (dispersion_env%c6ab, dispersion_env%maxci, dispersion_env%r0ab, dispersion_env%rcov, &
1481 dispersion_env%r2r4, dispersion_env%cn, dispersion_env%cnkind, dispersion_env%cnlist, &
1482 dispersion_env%d3_exclude_pair)
1483 NULLIFY (dispersion_env%q_mesh, dispersion_env%kernel, dispersion_env%d2phi_dk2, &
1484 dispersion_env%d2y_dx2, dispersion_env%dftd_section)
1485 NULLIFY (dispersion_env%sab_vdw, dispersion_env%sab_cn)
1486 IF (se_control%dispersion)
THEN
1489 dispersion_env%eps_cn = se_control%epscn
1490 dispersion_env%s6 = se_control%sd3(1)
1491 dispersion_env%sr6 = se_control%sd3(2)
1492 dispersion_env%s8 = se_control%sd3(3)
1493 dispersion_env%domol = .false.
1494 dispersion_env%kgc8 = 0._dp
1495 dispersion_env%rc_disp = se_control%rcdisp
1496 dispersion_env%exp_pre = 0._dp
1497 dispersion_env%scaling = 0._dp
1498 dispersion_env%nd3_exclude_pair = 0
1499 dispersion_env%parameter_file_name = se_control%dispersion_parameter_file
1504 CALL set_qs_env(qs_env, dispersion_env=dispersion_env)
1508 IF (dft_control%qs_control%method_id ==
do_method_gpw .OR. &
1515 NULLIFY (xc_section)
1526 nelectron = nelectron - dft_control%charge
1528 IF (dft_control%multiplicity == 0)
THEN
1529 IF (
modulo(nelectron, 2) == 0)
THEN
1530 dft_control%multiplicity = 1
1532 dft_control%multiplicity = 2
1536 multiplicity = dft_control%multiplicity
1538 IF ((dft_control%nspins < 1) .OR. (dft_control%nspins > 2))
THEN
1539 cpabort(
"nspins should be 1 or 2 for the time being ...")
1542 IF ((
modulo(nelectron, 2) /= 0) .AND. (dft_control%nspins == 1))
THEN
1543 IF (.NOT. dft_control%qs_control%ofgpw .AND. .NOT. dft_control%smear)
THEN
1544 cpabort(
"Use the LSD option for an odd number of electrons")
1549 IF (dft_control%do_xas_calculation)
THEN
1550 IF (dft_control%nspins == 1)
THEN
1551 cpabort(
"Use the LSD option for XAS with transition potential")
1562 IF (dft_control%qs_control%ofgpw)
THEN
1564 IF (dft_control%nspins == 1)
THEN
1566 nelectron_spin(1) = nelectron
1567 nelectron_spin(2) = 0
1571 IF (
modulo(nelectron + multiplicity - 1, 2) /= 0)
THEN
1572 cpabort(
"LSD: try to use a different multiplicity")
1574 nelectron_spin(1) = (nelectron + multiplicity - 1)/2
1575 nelectron_spin(2) = (nelectron - multiplicity + 1)/2
1576 IF (nelectron_spin(1) < 0)
THEN
1577 cpabort(
"LSD: too few electrons for this multiplicity")
1579 maxocc = maxval(nelectron_spin)
1580 n_mo(1) = min(nelectron_spin(1), 1)
1581 n_mo(2) = min(nelectron_spin(2), 1)
1586 IF (dft_control%nspins == 1)
THEN
1588 nelectron_spin(1) = nelectron
1589 nelectron_spin(2) = 0
1590 IF (
modulo(nelectron, 2) == 0)
THEN
1591 n_mo(1) = nelectron/2
1593 n_mo(1) = int(nelectron/2._dp) + 1
1601 IF (
modulo(nelectron + multiplicity - 1, 2) /= 0)
THEN
1602 cpabort(
"LSD: try to use a different multiplicity")
1605 nelectron_spin(1) = (nelectron + multiplicity - 1)/2
1606 nelectron_spin(2) = (nelectron - multiplicity + 1)/2
1608 IF (nelectron_spin(2) < 0)
THEN
1609 cpabort(
"LSD: too few electrons for this multiplicity")
1612 n_mo(1) = nelectron_spin(1)
1613 n_mo(2) = nelectron_spin(2)
1622 qs_env%total_zeff_corr = total_zeff_corr
1626 nelectron_total=nelectron, &
1627 nelectron_spin=nelectron_spin)
1630 IF (dft_control%nspins == 2)
THEN
1631 IF (scf_control%added_mos(2) < 0)
THEN
1632 n_mo_add = n_ao - n_mo(2)
1633 ELSEIF (scf_control%added_mos(2) > 0)
THEN
1634 n_mo_add = scf_control%added_mos(2)
1636 n_mo_add = scf_control%added_mos(1)
1638 IF (n_mo_add > n_ao - n_mo(2))
THEN
1639 cpwarn(
"More ADDED_MOs requested for beta spin than available.")
1641 scf_control%added_mos(2) = min(n_mo_add, n_ao - n_mo(2))
1642 n_mo(2) = n_mo(2) + scf_control%added_mos(2)
1653 IF (scf_control%added_mos(1) < 0)
THEN
1654 scf_control%added_mos(1) = n_ao - n_mo(1)
1655 ELSEIF (scf_control%added_mos(1) > n_ao - n_mo(1))
THEN
1656 CALL cp_warn(__location__, &
1657 "More added MOs requested than available. "// &
1658 "The full set of unoccupied MOs will be used. "// &
1659 "Use 'ADDED_MOS -1' to always use all available MOs "// &
1660 "and to get rid of this warning.")
1662 scf_control%added_mos(1) = min(scf_control%added_mos(1), n_ao - n_mo(1))
1663 n_mo(1) = n_mo(1) + scf_control%added_mos(1)
1665 IF (dft_control%nspins == 2)
THEN
1666 IF (n_mo(2) > n_mo(1)) &
1667 CALL cp_warn(__location__, &
1668 "More beta than alpha MOs requested. "// &
1669 "The number of beta MOs will be reduced to the number alpha MOs.")
1670 n_mo(2) = min(n_mo(1), n_mo(2))
1671 cpassert(n_mo(1) >= nelectron_spin(1))
1672 cpassert(n_mo(2) >= nelectron_spin(2))
1676 CALL get_qs_env(qs_env=qs_env, do_kpoints=do_kpoints)
1677 IF (do_kpoints .AND. dft_control%nspins == 2)
THEN
1679 IF (n_mo(2) /= n_mo(1)) &
1680 CALL cp_warn(__location__, &
1681 "Kpoints: Different number of MOs requested. "// &
1682 "The number of beta MOs will be set to the number alpha MOs.")
1684 cpassert(n_mo(1) >= nelectron_spin(1))
1685 cpassert(n_mo(2) >= nelectron_spin(2))
1689 IF (scf_control%smear%do_smear)
THEN
1690 IF (scf_control%added_mos(1) == 0)
THEN
1691 cpabort(
"Extra MOs (ADDED_MOS) are required for smearing")
1697 "PRINT%MO/CARTESIAN"), &
1699 (scf_control%level_shift /= 0.0_dp) .OR. &
1700 (scf_control%diagonalization%eps_jacobi /= 0.0_dp) .OR. &
1701 (dft_control%roks .AND. (.NOT. scf_control%use_ot)))
THEN
1706 IF (dft_control%roks .AND. (.NOT. scf_control%use_ot))
THEN
1708 cpwarn(
"General ROKS scheme is not yet tested!")
1710 IF (scf_control%smear%do_smear)
THEN
1711 CALL cp_abort(__location__, &
1712 "The options ROKS and SMEAR are not compatible. "// &
1713 "Try UKS instead of ROKS")
1716 IF (dft_control%low_spin_roks)
THEN
1717 SELECT CASE (dft_control%qs_control%method_id)
1720 CALL cp_abort(__location__, &
1721 "xTB/DFTB methods are not compatible with low spin ROKS.")
1724 CALL cp_abort(__location__, &
1725 "SE methods are not compatible with low spin ROKS.")
1733 IF (dft_control%restricted .AND. (output_unit > 0))
THEN
1735 WRITE (output_unit, *)
""
1736 WRITE (output_unit, *)
" **************************************"
1737 WRITE (output_unit, *)
" restricted calculation cutting corners"
1738 WRITE (output_unit, *)
" experimental feature, check code "
1739 WRITE (output_unit, *)
" **************************************"
1743 IF (dft_control%qs_control%do_ls_scf)
THEN
1746 ALLOCATE (mos(dft_control%nspins))
1747 DO ispin = 1, dft_control%nspins
1751 nelectron=nelectron_spin(ispin), &
1752 n_el_f=real(nelectron_spin(ispin),
dp), &
1754 flexible_electron_count=dft_control%relax_multiplicity)
1761 IF (dft_control%switch_surf_dip)
THEN
1762 ALLOCATE (mos_last_converged(dft_control%nspins))
1763 DO ispin = 1, dft_control%nspins
1767 nelectron=nelectron_spin(ispin), &
1768 n_el_f=real(nelectron_spin(ispin),
dp), &
1770 flexible_electron_count=dft_control%relax_multiplicity)
1772 CALL set_qs_env(qs_env, mos_last_converged=mos_last_converged)
1775 IF (.NOT. be_silent)
THEN
1780 IF (dft_control%qs_control%method_id ==
do_method_gpw .OR. &
1787 (.NOT. dft_control%qs_control%xtb_control%do_tblite)) .OR. &
1789 CALL get_qs_env(qs_env, dispersion_env=dispersion_env)
1797 IF (dft_control%do_admm)
THEN
1802 IF (dft_control%do_xas_calculation)
THEN
1817 CALL write_total_numbers(qs_kind_set, particle_set, qs_env%input)
1832 IF ((.NOT. dft_control%qs_control%do_ls_scf) .AND. &
1833 (.NOT. dft_control%qs_control%do_almo_scf))
THEN
1843 CALL get_qs_env(qs_env=qs_env, pw_env=pw_env, rho0_mpole=rho0_mpole)
1847 IF (output_unit > 0)
CALL m_flush(output_unit)
1848 CALL timestop(handle)
1850 END SUBROUTINE qs_init_subsys
1860 SUBROUTINE write_total_numbers(qs_kind_set, particle_set, force_env_section)
1862 TYPE(qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
1863 TYPE(particle_type),
DIMENSION(:),
POINTER :: particle_set
1864 TYPE(section_vals_type),
POINTER :: force_env_section
1866 INTEGER :: maxlgto, maxlppl, maxlppnl, natom, ncgf, &
1867 nkind, npgf, nset, nsgf, nshell, &
1869 TYPE(cp_logger_type),
POINTER :: logger
1872 logger => cp_get_default_logger()
1873 output_unit = cp_print_key_unit_nr(logger, force_env_section,
"PRINT%TOTAL_NUMBERS", &
1876 IF (output_unit > 0)
THEN
1877 natom =
SIZE(particle_set)
1878 nkind =
SIZE(qs_kind_set)
1880 CALL get_qs_kind_set(qs_kind_set, &
1890 WRITE (unit=output_unit, fmt=
"(/,/,T2,A)") &
1891 "TOTAL NUMBERS AND MAXIMUM NUMBERS"
1893 IF (nset + npgf + ncgf > 0)
THEN
1894 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T71,I10))") &
1895 "Total number of", &
1896 "- Atomic kinds: ", nkind, &
1897 "- Atoms: ", natom, &
1898 "- Shell sets: ", nset, &
1899 "- Shells: ", nshell, &
1900 "- Primitive Cartesian functions: ", npgf, &
1901 "- Cartesian basis functions: ", ncgf, &
1902 "- Spherical basis functions: ", nsgf
1903 ELSE IF (nshell + nsgf > 0)
THEN
1904 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T71,I10))") &
1905 "Total number of", &
1906 "- Atomic kinds: ", nkind, &
1907 "- Atoms: ", natom, &
1908 "- Shells: ", nshell, &
1909 "- Spherical basis functions: ", nsgf
1911 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T71,I10))") &
1912 "Total number of", &
1913 "- Atomic kinds: ", nkind, &
1917 IF ((maxlppl > -1) .AND. (maxlppnl > -1))
THEN
1918 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T75,I6))") &
1919 "Maximum angular momentum of the", &
1920 "- Orbital basis functions: ", maxlgto, &
1921 "- Local part of the GTH pseudopotential: ", maxlppl, &
1922 "- Non-local part of the GTH pseudopotential: ", maxlppnl
1923 ELSEIF (maxlppl > -1)
THEN
1924 WRITE (unit=output_unit, fmt=
"(/,T3,A,(T30,A,T75,I6))") &
1925 "Maximum angular momentum of the", &
1926 "- Orbital basis functions: ", maxlgto, &
1927 "- Local part of the GTH pseudopotential: ", maxlppl
1929 WRITE (unit=output_unit, fmt=
"(/,T3,A,T75,I6)") &
1930 "Maximum angular momentum of the orbital basis functions: ", maxlgto
1934 CALL get_qs_kind_set(qs_kind_set, &
1941 basis_type=
"LRI_AUX")
1942 IF (nset + npgf + ncgf > 0)
THEN
1943 WRITE (unit=output_unit, fmt=
"(/,T3,A,/,T3,A,(T30,A,T71,I10))") &
1944 "LRI_AUX Basis: ", &
1945 "Total number of", &
1946 "- Shell sets: ", nset, &
1947 "- Shells: ", nshell, &
1948 "- Primitive Cartesian functions: ", npgf, &
1949 "- Cartesian basis functions: ", ncgf, &
1950 "- Spherical basis functions: ", nsgf
1951 WRITE (unit=output_unit, fmt=
"(T30,A,T75,I6)") &
1952 " Maximum angular momentum ", maxlgto
1956 CALL get_qs_kind_set(qs_kind_set, &
1963 basis_type=
"RI_HXC")
1964 IF (nset + npgf + ncgf > 0)
THEN
1965 WRITE (unit=output_unit, fmt=
"(/,T3,A,/,T3,A,(T30,A,T71,I10))") &
1967 "Total number of", &
1968 "- Shell sets: ", nset, &
1969 "- Shells: ", nshell, &
1970 "- Primitive Cartesian functions: ", npgf, &
1971 "- Cartesian basis functions: ", ncgf, &
1972 "- Spherical basis functions: ", nsgf
1973 WRITE (unit=output_unit, fmt=
"(T30,A,T75,I6)") &
1974 " Maximum angular momentum ", maxlgto
1978 CALL get_qs_kind_set(qs_kind_set, &
1985 basis_type=
"AUX_FIT")
1986 IF (nset + npgf + ncgf > 0)
THEN
1987 WRITE (unit=output_unit, fmt=
"(/,T3,A,/,T3,A,(T30,A,T71,I10))") &
1988 "AUX_FIT ADMM-Basis: ", &
1989 "Total number of", &
1990 "- Shell sets: ", nset, &
1991 "- Shells: ", nshell, &
1992 "- Primitive Cartesian functions: ", npgf, &
1993 "- Cartesian basis functions: ", ncgf, &
1994 "- Spherical basis functions: ", nsgf
1995 WRITE (unit=output_unit, fmt=
"(T30,A,T75,I6)") &
1996 " Maximum angular momentum ", maxlgto
2000 CALL cp_print_key_finished_output(output_unit, logger, force_env_section, &
2001 "PRINT%TOTAL_NUMBERS")
2003 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_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)
...
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)
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 read_kpoint_section(kpoint, kpoint_section, a_vec)
Read the kpoint input section.
subroutine, public write_kpoint_info(kpoint, dft_section)
Write information on the kpoints to output.
subroutine, public kpoint_create(kpoint)
Create a kpoint environment.
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)
Retrieve information from a kpoint environment.
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.
container for various plainwaves related things
subroutine, public qs_basis_rotation(qs_env, kpoints)
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.
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 set_qs_env(qs_env, super_cell, mos, qmmm, qmmm_periodic, 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, 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, tb_tblite)
Set the QUICKSTEP environment.
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, 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, 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, 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, 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, ecoul_1c, rho0_s_rs, rho0_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, tb_tblite)
Get the QUICKSTEP environment.
subroutine, public qs_init(qs_env, para_env, root_section, globenv, cp_subsys, kpoint_env, cell, cell_ref, qmmm, qmmm_env_qm, force_env_section, subsys_section, use_motion_section, silent)
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, 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, 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, init_u_ramping_each_scf, reltmat, ghost, 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 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, basis_type, total_zeff_corr, npgf_seg)
Get attributes of an atomic kind 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, reltmat, dftb_parameter, xtb_parameter, elec_conf, pao_basis_size)
Set the components of an atomic kind data set.
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 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 set_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, 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_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, 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, 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, cell, cell_ref, 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)
...
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_set_calculator(tb, typ)
...
subroutine, public tb_init_wf(tb)
initialize wavefunction ...
subroutine, public tb_init_geometry(qs_env, tb)
intialize geometry objects ...
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 init_xtb_basis(param, gto_basis_set, ngauss)
...
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, 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.