37 USE dbcsr_api,
ONLY: dbcsr_p_type
98 tddfpt_subgroup_env_type
102 tddfpt_ground_state_mos,&
111 #include "./base/base_uses.f90"
117 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_tddfpt2_methods'
119 LOGICAL,
PARAMETER,
PRIVATE :: debug_this_module = .false.
121 INTEGER,
PARAMETER,
PRIVATE :: nderivs = 3
122 INTEGER,
PARAMETER,
PRIVATE :: maxspins = 2
141 TYPE(qs_environment_type),
POINTER :: qs_env
142 LOGICAL,
INTENT(IN) :: calc_forces
144 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt'
146 INTEGER :: handle, ispin, istate, log_unit, mult, &
147 my_state, nao, nocc, nspins, &
148 nstate_max, nstates, nvirt, old_state
149 INTEGER,
DIMENSION(maxspins) :: nactive
150 LOGICAL :: do_admm, do_exck, do_hfx, do_hfxlr, &
151 do_hfxsr, do_soc, lmult_tmp, &
153 REAL(kind=
dp) :: gsmin, gsval, xsval
154 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals, ostrength
155 TYPE(atomic_kind_type),
DIMENSION(:),
POINTER :: atomic_kind_set
156 TYPE(cell_type),
POINTER :: cell
157 TYPE(cp_blacs_env_type),
POINTER :: blacs_env
158 TYPE(cp_fm_struct_type),
POINTER :: matrix_struct
159 TYPE(cp_fm_type),
ALLOCATABLE,
DIMENSION(:) :: my_mos
160 TYPE(cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: dipole_op_mos_occ, evects, s_evects
161 TYPE(cp_logger_type),
POINTER :: logger
162 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_ks, matrix_ks_oep, matrix_s, &
164 matrix_s_aux_fit_vs_orb
165 TYPE(dft_control_type),
POINTER :: dft_control
166 TYPE(excited_energy_type),
POINTER :: ex_env
167 TYPE(full_kernel_env_type),
TARGET :: full_kernel_env, kernel_env_admm_aux
168 TYPE(kernel_env_type) :: kernel_env
169 TYPE(mo_set_type),
DIMENSION(:),
POINTER :: mos, mos_aux_fit
170 TYPE(mp_para_env_type),
POINTER :: para_env
171 TYPE(particle_type),
DIMENSION(:),
POINTER :: particle_set
172 TYPE(qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
173 TYPE(qs_scf_env_type),
POINTER :: scf_env
174 TYPE(section_vals_type),
POINTER :: hfxsr_section, kernel_section, &
175 lri_section, soc_section, &
176 tddfpt_print_section, tddfpt_section, &
178 TYPE(stda_env_type),
TARGET :: stda_kernel
179 TYPE(tddfpt2_control_type),
POINTER :: tddfpt_control
180 TYPE(tddfpt_ground_state_mos),
DIMENSION(:), &
182 TYPE(tddfpt_subgroup_env_type) :: sub_env
183 TYPE(tddfpt_work_matrices) :: work_matrices
185 CALL timeset(routinen, handle)
191 NULLIFY (tddfpt_section)
195 do_hfxsr, do_hfxlr, xc_section, tddfpt_print_section, &
196 lri_section, hfxsr_section)
199 extension=
".tddfptLog")
202 blacs_env=blacs_env, &
204 dft_control=dft_control, &
205 matrix_ks=matrix_ks, &
209 tddfpt_control => dft_control%tddfpt2_control
210 tddfpt_control%do_hfx = do_hfx
211 tddfpt_control%do_admm = do_admm
212 tddfpt_control%do_hfxsr = do_hfxsr
213 tddfpt_control%hfxsr_primbas = 0
214 tddfpt_control%hfxsr_re_int = .true.
215 tddfpt_control%do_hfxlr = do_hfxlr
216 tddfpt_control%do_exck = do_exck
217 IF (tddfpt_control%do_hfxlr)
THEN
229 lmult_tmp = tddfpt_control%rks_triplets
230 tddfpt_control%rks_triplets = .NOT. (tddfpt_control%rks_triplets)
240 CALL kernel_info(log_unit, dft_control, tddfpt_control, xc_section)
249 IF ((tddfpt_control%do_lrigpw) .AND. &
251 CALL cp_abort(__location__,
"LRI only implemented for full kernel")
254 IF (
ASSOCIATED(matrix_ks_oep)) matrix_ks => matrix_ks_oep
262 nspins =
SIZE(gs_mos)
265 mult = abs(
SIZE(gs_mos(1)%evals_occ) -
SIZE(gs_mos(2)%evals_occ)) + 1
267 CALL cp_warn(__location__,
"There is a convergence issue for multiplicity >= 3")
269 IF (tddfpt_control%rks_triplets)
THEN
277 ALLOCATE (my_mos(nspins))
279 my_mos(ispin) = gs_mos(ispin)%mos_occ
282 kernel=tddfpt_control%kernel)
287 IF (dft_control%qs_control%xtb)
THEN
288 cpabort(
"TDDFPT: xTB only works with sTDA Kernel")
291 IF (tddfpt_control%do_hfxsr)
THEN
294 i_val=tddfpt_control%hfxsr_primbas)
297 primitive=tddfpt_control%hfxsr_primbas)
299 ALLOCATE (full_kernel_env%admm_control)
305 full_kernel_env%hfxsr_section => hfxsr_section
308 full_kernel_env%admm_control,
"TDA_HFX")
309 CALL get_admm_env(full_kernel_env%admm_env, mos_aux_fit=mos_aux_fit, &
310 matrix_s_aux_fit=matrix_s_aux_fit, &
311 matrix_s_aux_fit_vs_orb=matrix_s_aux_fit_vs_orb)
313 matrix_s_aux_fit_vs_orb, mos, mos_aux_fit, .true.)
315 CALL get_qs_env(qs_env, cell=cell, atomic_kind_set=atomic_kind_set, &
316 qs_kind_set=qs_kind_set, particle_set=particle_set, &
318 CALL hfx_create(full_kernel_env%x_data, para_env, hfxsr_section, atomic_kind_set, &
319 qs_kind_set, particle_set, dft_control, cell, orb_basis=
"TDA_HFX")
323 nstates = tddfpt_control%nstates
329 nstate_max = nocc*nvirt
330 IF (nstates > nstate_max)
THEN
331 cpwarn(
"NUMBER OF EXCITED STATES COULD LEAD TO PROBLEMS!")
332 cpwarn(
"Experimental: CHANGED NSTATES TO ITS MAXIMUM VALUE!")
334 tddfpt_control%nstates = nstate_max
337 do_hfxlr, do_exck, qs_env, sub_env)
340 kernel_env%full_kernel => full_kernel_env
341 kernel_env%admm_kernel => kernel_env_admm_aux
342 NULLIFY (kernel_env%stda_kernel)
355 DO ispin = 1,
SIZE(gs_mos)
357 ncol_global=nactive(ispin))
363 nstates = tddfpt_control%nstates
368 work_matrices, tddfpt_control)
370 kernel_env%stda_kernel => stda_kernel
371 NULLIFY (kernel_env%full_kernel)
372 NULLIFY (kernel_env%admm_kernel)
375 nstates = tddfpt_control%nstates
378 NULLIFY (kernel_env%full_kernel)
379 NULLIFY (kernel_env%admm_kernel)
380 NULLIFY (kernel_env%stda_kernel)
383 ALLOCATE (evects(nspins, nstates))
384 ALLOCATE (evals(nstates))
386 ALLOCATE (s_evects(nspins, nstates))
387 DO istate = 1, nstates
390 work_matrices%fm_pool_ao_mo_occ(ispin)%pool, &
391 s_evects(ispin, istate))
395 IF (.NOT. do_soc)
THEN
398 tddfpt_control, logger, tddfpt_print_section, evects, evals, &
399 gs_mos, tddfpt_section, s_evects, matrix_s, kernel_env, matrix_ks, &
400 sub_env, ostrength, dipole_op_mos_occ, mult, xc_section, full_kernel_env, &
403 CALL tddfpt_soc_energies(qs_env, nstates, work_matrices, &
404 tddfpt_control, logger, tddfpt_print_section, &
405 evects, evals, ostrength, &
406 gs_mos, tddfpt_section, s_evects, matrix_s, kernel_env, matrix_ks, &
407 sub_env, dipole_op_mos_occ, lmult_tmp, xc_section, full_kernel_env, &
412 IF (calc_forces)
THEN
414 tddfpt_print_section, gs_mos, &
415 kernel_env, sub_env, work_matrices)
419 IF (qs_env%excited_state)
THEN
420 IF (sub_env%is_split)
THEN
421 CALL cp_abort(__location__, &
422 "Excited state forces not possible when states"// &
423 " are distributed to different CPU pools.")
426 IF (
ASSOCIATED(matrix_ks_oep))
CALL get_qs_env(qs_env, matrix_ks=matrix_ks)
428 state_change = .false.
429 IF (ex_env%state > 0)
THEN
430 my_state = ex_env%state
431 ELSEIF (ex_env%state < 0)
THEN
433 ALLOCATE (my_mos(nspins))
435 my_mos(ispin) = gs_mos(ispin)%mos_occ
437 my_state = abs(ex_env%state)
438 CALL assign_state(qs_env, matrix_s, evects, my_mos, ex_env%wfn_history, my_state)
440 IF (my_state /= abs(ex_env%state))
THEN
441 state_change = .true.
442 old_state = abs(ex_env%state)
444 ex_env%state = -my_state
446 CALL cp_warn(__location__, &
447 "Active excited state not assigned. Use the first state.")
450 cpassert(my_state > 0)
451 IF (my_state > nstates)
THEN
452 CALL cp_warn(__location__, &
453 "There were not enough excited states calculated.")
454 cpabort(
"excited state potential energy surface")
458 ex_env%evalue = evals(my_state)
460 CALL cp_fm_release(ex_env%evect)
461 ALLOCATE (ex_env%evect(nspins))
464 matrix_struct=matrix_struct)
466 CALL cp_fm_to_fm(evects(ispin, my_state), ex_env%evect(ispin))
469 IF (log_unit > 0)
THEN
470 gsval = ex_env%wfn_history%gsval
471 gsmin = ex_env%wfn_history%gsmin
472 xsval = ex_env%wfn_history%xsval
473 WRITE (log_unit,
"(1X,A,T40,F10.6,A,T62,F10.6,A)")
"Ground state orbital alignment:", &
474 gsmin,
"[MinVal]", gsval,
"[Average]"
475 WRITE (log_unit,
"(1X,A,T71,F10.6)")
"Excitation vector alignment:", xsval
476 IF (state_change)
THEN
477 WRITE (log_unit,
"(1X,A,I5,T60,A14,T76,I5)") &
478 "Target state has been changed from state ", &
479 old_state,
" to new state ", my_state
481 WRITE (log_unit,
"(1X,A,I4,A,F12.5,A)")
"Calculate properties for state:", &
482 my_state,
" with excitation energy ", ex_env%evalue*
evolt,
" eV"
485 IF (calc_forces)
THEN
487 sub_env, work_matrices)
492 CALL cp_fm_release(evects)
493 CALL cp_fm_release(s_evects)
497 tddfpt_print_section, &
500 DEALLOCATE (evals, ostrength)
504 IF (tddfpt_control%do_lrigpw)
THEN
506 DEALLOCATE (kernel_env%full_kernel%lri_env)
508 DEALLOCATE (kernel_env%full_kernel%lri_density)
516 cpabort(
'Unknown kernel type')
521 CALL cp_fm_release(dipole_op_mos_occ)
523 DO ispin = nspins, 1, -1
528 IF (
ASSOCIATED(matrix_ks_oep)) &
531 CALL timestop(handle)
548 SUBROUTINE tddfpt_input(qs_env, do_hfx, do_admm, do_exck, do_hfxsr, do_hfxlr, &
549 xc_section, tddfpt_print_section, lri_section, hfxsr_section)
550 TYPE(qs_environment_type),
POINTER :: qs_env
551 LOGICAL,
INTENT(INOUT) :: do_hfx, do_admm, do_exck, do_hfxsr, &
553 TYPE(section_vals_type),
POINTER :: xc_section, tddfpt_print_section, &
554 lri_section, hfxsr_section
556 CHARACTER(len=20) :: nstates_str
557 LOGICAL :: exar, exf, exgcp, exhf, exhfxk, exk, &
558 explicit_root, expot, exvdw, exwfn, &
560 REAL(kind=
dp) :: c_hf
561 TYPE(dft_control_type),
POINTER :: dft_control
562 TYPE(section_vals_type),
POINTER :: hfx_section, hfx_section_gs, input, &
563 tddfpt_section, xc_root, xc_sub
564 TYPE(tddfpt2_control_type),
POINTER :: tddfpt_control
566 NULLIFY (dft_control, input)
567 CALL get_qs_env(qs_env, dft_control=dft_control, input=input)
568 tddfpt_control => dft_control%tddfpt2_control
571 cpassert(dft_control%nimages <= 1)
573 IF (tddfpt_control%nstates <= 0)
THEN
575 CALL cp_warn(__location__,
"TDDFPT calculation was requested for "// &
576 trim(nstates_str)//
" excited states: nothing to do.")
580 NULLIFY (tddfpt_section, tddfpt_print_section)
589 IF (explicit_root)
THEN
595 CALL cp_warn(__location__,
"TDDFPT Kernel with ADIABATIC_RESCALING not possible.")
596 cpabort(
"TDDFPT Input")
603 CALL cp_warn(__location__,
"TDDFPT Kernel with GCP_POTENTIAL not possible.")
604 cpabort(
"TDDFPT Input")
611 CALL cp_warn(__location__,
"TDDFPT Kernel with VDW_POTENTIAL not possible.")
612 cpabort(
"TDDFPT Input")
619 CALL cp_warn(__location__,
"TDDFPT Kernel with WF_CORRELATION not possible.")
620 cpabort(
"TDDFPT Input")
627 CALL cp_warn(__location__,
"TDDFPT Kernel with XC_POTENTIAL not possible.")
628 cpabort(
"TDDFPT Input")
637 IF ((exf .AND. exk) .OR. .NOT. (exf .OR. exk))
THEN
638 CALL cp_warn(__location__,
"TDDFPT Kernel needs XC_FUNCTIONAL or XC_KERNEL section.")
639 cpabort(
"TDDFPT Input")
648 xc_section => xc_root
653 do_hfx = (c_hf /= 0.0_dp)
659 IF (.NOT. same_hfx)
THEN
660 cpabort(
"TDDFPT Kernel must use the same HF section as DFT%XC or no HF at all.")
664 do_admm = do_hfx .AND. dft_control%do_admm
667 CALL cp_abort(__location__, &
668 "ADMM is not implemented for a TDDFT kernel XC-functional which is different from "// &
669 "the one used for the ground-state calculation. A ground-state 'admm_env' cannot be reused.")
692 do_hfx = (c_hf /= 0.0_dp)
694 do_admm = do_hfx .AND. dft_control%do_admm
708 IF (tddfpt_control%rks_triplets .AND. dft_control%nspins > 1)
THEN
709 tddfpt_control%rks_triplets = .false.
710 CALL cp_warn(__location__,
"Keyword RKS_TRIPLETS has been ignored for spin-polarised calculations")
714 IF (tddfpt_control%do_lrigpw)
THEN
719 NULLIFY (hfxsr_section)
723 IF (.NOT. found)
THEN
724 cpabort(
"HFXSR option needs &HF section defined")
726 CALL section_vals_val_get(hfxsr_section,
"INTERACTION_POTENTIAL%POTENTIAL_TYPE", explicit=found)
727 IF (.NOT. found)
THEN
732 IF (.NOT. found)
THEN
733 CALL section_vals_val_set(hfxsr_section,
"INTERACTION_POTENTIAL%CUTOFF_RADIUS", r_val=7.5589_dp)
737 CALL cp_abort(__location__,
"Short range TDA kernel with RI not possible")
750 SUBROUTINE kernel_info(log_unit, dft_control, tddfpt_control, xc_section)
751 INTEGER,
INTENT(IN) :: log_unit
752 TYPE(dft_control_type),
POINTER :: dft_control
753 TYPE(tddfpt2_control_type),
POINTER :: tddfpt_control
754 TYPE(section_vals_type),
POINTER :: xc_section
756 CHARACTER(LEN=4) :: ktype
759 lsd = (dft_control%nspins > 1)
762 IF (log_unit > 0)
THEN
763 WRITE (log_unit,
"(T2,A,T77,A4)")
"KERNEL|", trim(ktype)
764 CALL xc_write(log_unit, xc_section, lsd)
765 IF (tddfpt_control%do_hfx)
THEN
766 IF (tddfpt_control%do_admm)
THEN
767 WRITE (log_unit,
"(T2,A,T62,A19)")
"KERNEL|",
"ADMM Exact Exchange"
768 IF (tddfpt_control%admm_xc_correction)
THEN
769 WRITE (log_unit,
"(T2,A,T60,A21)")
"KERNEL|",
"Apply ADMM Kernel XC Correction"
771 IF (tddfpt_control%admm_symm)
THEN
772 WRITE (log_unit,
"(T2,A,T60,A21)")
"KERNEL|",
"Symmetric ADMM Kernel"
775 WRITE (log_unit,
"(T2,A,T67,A14)")
"KERNEL|",
"Exact Exchange"
778 IF (tddfpt_control%do_hfxsr)
THEN
779 WRITE (log_unit,
"(T2,A,T43,A38)")
"KERNEL|",
"Short range HFX approximation"
781 IF (tddfpt_control%do_hfxlr)
THEN
782 WRITE (log_unit,
"(T2,A,T43,A38)")
"KERNEL|",
"Long range HFX approximation"
784 IF (tddfpt_control%do_lrigpw)
THEN
785 WRITE (log_unit,
"(T2,A,T42,A39)")
"KERNEL|",
"LRI approximation of transition density"
790 IF (log_unit > 0)
THEN
791 WRITE (log_unit,
"(T2,A,T77,A4)")
"KERNEL|", trim(ktype)
792 IF (tddfpt_control%stda_control%do_ewald)
THEN
793 WRITE (log_unit,
"(T2,A,T78,A3)")
"KERNEL| Coulomb term uses Ewald summation"
795 WRITE (log_unit,
"(T2,A,T78,A3)")
"KERNEL| Coulomb term uses direct summation (MIC)"
797 IF (tddfpt_control%stda_control%do_exchange)
THEN
798 WRITE (log_unit,
"(T2,A,T78,A3)")
"KERNEL| Exact exchange term",
"YES"
799 WRITE (log_unit,
"(T2,A,T71,F10.3)")
"KERNEL| Short range HFX fraction:", &
800 tddfpt_control%stda_control%hfx_fraction
802 WRITE (log_unit,
"(T2,A,T79,A2)")
"KERNEL| Exact exchange term",
"NO"
804 WRITE (log_unit,
"(T2,A,T66,E15.3)")
"KERNEL| Transition density filter", &
805 tddfpt_control%stda_control%eps_td_filter
809 IF (log_unit > 0)
THEN
810 WRITE (log_unit,
"(T2,A,T77,A4)")
"KERNEL|", trim(ktype)
816 IF (log_unit > 0)
THEN
817 IF (tddfpt_control%rks_triplets)
THEN
818 WRITE (log_unit,
"(T2,A,T74,A7)")
"KERNEL| Spin symmetry of excitations",
"Triplet"
820 WRITE (log_unit,
"(T2,A,T69,A12)")
"KERNEL| Spin symmetry of excitations",
"Unrestricted"
822 WRITE (log_unit,
"(T2,A,T74,A7)")
"KERNEL| Spin symmetry of excitations",
"Singlet"
824 WRITE (log_unit,
"(T2,A,T73,I8)")
"TDDFPT| Number of states calculated", tddfpt_control%nstates
825 WRITE (log_unit,
"(T2,A,T73,I8)")
"TDDFPT| Number of Davidson iterations", tddfpt_control%niters
826 WRITE (log_unit,
"(T2,A,T66,E15.3)")
"TDDFPT| Davidson iteration convergence", tddfpt_control%conv
827 WRITE (log_unit,
"(T2,A,T73,I8)")
"TDDFPT| Max. number of Krylov space vectors", tddfpt_control%nkvs
857 tddfpt_control, logger, tddfpt_print_section, evects, evals, &
858 gs_mos, tddfpt_section, S_evects, matrix_s, kernel_env, matrix_ks, &
859 sub_env, ostrength, dipole_op_mos_occ, mult, xc_section, full_kernel_env, &
862 TYPE(qs_environment_type),
POINTER :: qs_env
864 TYPE(tddfpt_work_matrices) :: work_matrices
865 TYPE(tddfpt2_control_type),
POINTER :: tddfpt_control
866 TYPE(cp_logger_type),
POINTER :: logger
867 TYPE(section_vals_type),
POINTER :: tddfpt_print_section
868 TYPE(cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: evects
869 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals
870 TYPE(tddfpt_ground_state_mos),
DIMENSION(:), &
872 TYPE(section_vals_type),
POINTER :: tddfpt_section
873 TYPE(cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: s_evects
874 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_s
875 TYPE(kernel_env_type) :: kernel_env
876 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_ks
877 TYPE(tddfpt_subgroup_env_type) :: sub_env
878 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: ostrength
879 TYPE(cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: dipole_op_mos_occ
881 TYPE(section_vals_type),
POINTER :: xc_section
882 TYPE(full_kernel_env_type),
TARGET :: full_kernel_env, kernel_env_admm_aux
884 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_energies'
886 CHARACTER(len=20) :: nstates_str
887 INTEGER :: energy_unit, handle, iter, log_unit, &
888 niters, nocc, nstate_max, &
890 LOGICAL :: do_admm, do_exck, do_soc, explicit, &
892 REAL(kind=
dp) :: conv
893 TYPE(admm_type),
POINTER :: admm_env
894 TYPE(cp_blacs_env_type),
POINTER :: blacs_env
895 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_ks_oep
896 TYPE(section_vals_type),
POINTER :: lri_section, namd_print_section, &
899 CALL timeset(routinen, handle)
901 NULLIFY (admm_env, matrix_ks_oep)
902 do_admm = tddfpt_control%do_admm
903 IF (do_admm)
CALL get_qs_env(qs_env, admm_env=admm_env)
909 rho_orb_struct=work_matrices%rho_orb_struct_sub, &
910 rho_xc_struct=work_matrices%rho_xc_struct_sub, &
911 is_rks_triplets=tddfpt_control%rks_triplets, &
912 qs_env=qs_env, sub_env=sub_env, &
913 wfm_rho_orb=work_matrices%rho_ao_orb_fm_sub)
917 IF (tddfpt_control%admm_xc_correction)
THEN
919 rho_struct_sub=work_matrices%rho_orb_struct_sub, &
920 xc_section=admm_env%xc_section_primary, &
921 is_rks_triplets=tddfpt_control%rks_triplets, &
925 rho_struct_sub=work_matrices%rho_orb_struct_sub, &
926 xc_section=xc_section, &
927 is_rks_triplets=tddfpt_control%rks_triplets, &
932 rho_orb_struct=work_matrices%rho_orb_struct_sub, &
933 rho_aux_fit_struct=work_matrices%rho_aux_fit_struct_sub, &
934 local_rho_set=sub_env%local_rho_set_admm, &
935 qs_env=qs_env, sub_env=sub_env, &
936 wfm_rho_orb=work_matrices%rho_ao_orb_fm_sub, &
937 wfm_rho_aux_fit=work_matrices%rho_ao_aux_fit_fm_sub, &
938 wfm_aux_orb=work_matrices%wfm_aux_orb_sub)
941 rho_struct_sub=work_matrices%rho_aux_fit_struct_sub, &
942 xc_section=admm_env%xc_section_aux, &
943 is_rks_triplets=tddfpt_control%rks_triplets, &
945 kernel_env%full_kernel => full_kernel_env
946 kernel_env%admm_kernel => kernel_env_admm_aux
950 rho_struct_sub=work_matrices%rho_orb_struct_sub, &
951 xc_section=xc_section, &
952 is_rks_triplets=tddfpt_control%rks_triplets, &
954 kernel_env%full_kernel => full_kernel_env
955 NULLIFY (kernel_env%admm_kernel)
958 do_exck = tddfpt_control%do_exck
959 kernel_env%full_kernel%do_exck = do_exck
962 CALL create_fxc_kernel(work_matrices%rho_orb_struct_sub, work_matrices%fxc_rspace_sub, &
963 xc_section, tddfpt_control%rks_triplets, sub_env, qs_env)
968 IF (tddfpt_control%do_lrigpw)
THEN
971 tddfpt_print_section)
979 nstate_max = nocc*nvirt
980 IF (nstates > nstate_max)
THEN
981 cpwarn(
"NUMBER OF EXCITED STATES COULD LEAD TO PROBLEMS!")
982 cpwarn(
"Experimental: CHANGED NSTATES TO ITS MAXIMUM VALUE!")
990 IF (tddfpt_control%is_restart .AND. .NOT. do_soc)
THEN
998 tddfpt_section=tddfpt_section, &
999 tddfpt_print_section=tddfpt_print_section, &
1000 fm_pool_ao_mo_occ=work_matrices%fm_pool_ao_mo_occ, &
1001 blacs_env_global=blacs_env)
1006 is_restarted = nstates_read >= nstates
1011 "GUESS_VECTORS", extension=
".tddfptLog")
1013 gs_mos=gs_mos, log_unit=log_unit)
1015 tddfpt_print_section,
"GUESS_VECTORS")
1023 niters = tddfpt_control%niters
1024 IF (niters > 0)
THEN
1026 "ITERATION_INFO", extension=
".tddfptLog")
1028 tddfpt_print_section, &
1029 "DETAILED_ENERGY", &
1030 extension=
".tddfptLog")
1032 IF (log_unit > 0)
THEN
1033 WRITE (log_unit,
"(1X,A)")
"", &
1034 "-------------------------------------------------------------------------------", &
1035 "- TDDFPT WAVEFUNCTION OPTIMIZATION -", &
1036 "-------------------------------------------------------------------------------"
1038 WRITE (log_unit,
'(/,T11,A,T27,A,T40,A,T62,A)')
"Step",
"Time",
"Convergence",
"Conv. states"
1039 WRITE (log_unit,
'(1X,79("-"))')
1049 s_evects=s_evects, &
1051 tddfpt_control=tddfpt_control, &
1052 matrix_ks=matrix_ks, &
1054 kernel_env=kernel_env, &
1057 iter_unit=log_unit, &
1058 energy_unit=energy_unit, &
1059 tddfpt_print_section=tddfpt_print_section, &
1060 work_matrices=work_matrices)
1067 CALL cp_iterate(logger%iter_info, increment=0, iter_nr_out=iter)
1069 IF ((conv <= tddfpt_control%conv &
1070 .AND. is_restarted) .OR. iter >= niters)
EXIT
1073 is_restarted = .true.
1074 IF (log_unit > 0)
THEN
1075 WRITE (log_unit,
'(1X,25("-"),1X,A,1X,25("-"))')
"Restart Davidson iterations"
1081 CALL cp_iterate(logger%iter_info, increment=0, last=.true.)
1086 tddfpt_print_section=tddfpt_print_section)
1091 IF (log_unit > 0)
THEN
1093 IF (conv <= tddfpt_control%conv)
THEN
1094 WRITE (log_unit,
"(1X,A)")
"", &
1095 "-------------------------------------------------------------------------------", &
1096 "- TDDFPT run converged in "//trim(nstates_str)//
" iteration(s) ", &
1097 "-------------------------------------------------------------------------------"
1099 WRITE (log_unit,
"(1X,A)")
"", &
1100 "-------------------------------------------------------------------------------", &
1101 "- TDDFPT run did NOT converge after "//trim(nstates_str)//
" iteration(s) ", &
1102 "-------------------------------------------------------------------------------"
1107 tddfpt_print_section,
"DETAILED_ENERGY")
1109 tddfpt_print_section,
"ITERATION_INFO")
1111 CALL cp_warn(__location__, &
1112 "Skipping TDDFPT wavefunction optimization")
1115 IF (
ASSOCIATED(matrix_ks_oep))
THEN
1117 CALL cp_warn(__location__, &
1118 "Transition dipole moments and oscillator strengths are likely to be incorrect "// &
1119 "when computed using an orbital energy correction XC-potential together with "// &
1120 "the velocity form of dipole transition integrals")
1128 tddfpt_print_section, &
1136 tddfpt_print_section, &
1137 matrix_s(1)%matrix, &
1141 ALLOCATE (ostrength(nstates))
1148 dipole_op_mos_occ, &
1149 tddfpt_control%dipole_form)
1155 matrix_s(1)%matrix, &
1156 min_amplitude=tddfpt_control%min_excitation_amplitude)
1161 matrix_s(1)%matrix, &
1162 tddfpt_print_section)
1164 IF (tddfpt_control%do_lrigpw)
THEN
1167 tddfpt_lri_env=kernel_env%full_kernel%lri_env)
1170 CALL timestop(handle)
1202 SUBROUTINE tddfpt_soc_energies(qs_env, nstates, work_matrices, &
1203 tddfpt_control, logger, tddfpt_print_section, &
1204 evects, evals, ostrength, &
1205 gs_mos, tddfpt_section, S_evects, matrix_s, kernel_env, matrix_ks, &
1206 sub_env, dipole_op_mos_occ, lmult_tmp, xc_section, full_kernel_env, &
1207 kernel_env_admm_aux)
1209 TYPE(qs_environment_type),
INTENT(IN),
POINTER :: qs_env
1210 INTEGER,
INTENT(in) :: nstates
1211 TYPE(tddfpt_work_matrices) :: work_matrices
1212 TYPE(tddfpt2_control_type),
POINTER :: tddfpt_control
1213 TYPE(cp_logger_type),
POINTER :: logger
1214 TYPE(section_vals_type),
POINTER :: tddfpt_print_section
1215 TYPE(cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: evects
1216 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals, ostrength
1217 TYPE(tddfpt_ground_state_mos),
DIMENSION(:), &
1219 TYPE(section_vals_type),
POINTER :: tddfpt_section
1220 TYPE(cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: s_evects
1221 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_s
1222 TYPE(kernel_env_type) :: kernel_env
1223 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_ks
1224 TYPE(tddfpt_subgroup_env_type) :: sub_env
1225 TYPE(cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: dipole_op_mos_occ
1226 LOGICAL,
INTENT(in) :: lmult_tmp
1227 TYPE(section_vals_type),
POINTER :: xc_section
1228 TYPE(full_kernel_env_type),
TARGET :: full_kernel_env, kernel_env_admm_aux
1230 CHARACTER(LEN=*),
PARAMETER :: routinen =
'tddfpt_soc_energies'
1232 INTEGER :: handle, ispin, istate, log_unit, mult, &
1234 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: evals_mult, ostrength_mult
1235 TYPE(cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: evects_mult
1237 CALL timeset(routinen, handle)
1241 extension=
".tddfptLog")
1244 nspins =
SIZE(gs_mos)
1245 ALLOCATE (evects_mult(nspins, nstates))
1246 ALLOCATE (evals_mult(nstates))
1250 IF (log_unit > 0)
THEN
1251 WRITE (log_unit,
"(1X,A)")
"", &
1252 "-------------------------------------------------------------------------------", &
1253 "- TDDFPT SINGLET ENERGIES -", &
1254 "-------------------------------------------------------------------------------"
1258 IF (log_unit > 0)
THEN
1259 WRITE (log_unit,
"(1X,A)")
"", &
1260 "-------------------------------------------------------------------------------", &
1261 "- TDDFPT TRIPLET ENERGIES -", &
1262 "-------------------------------------------------------------------------------"
1267 CALL tddfpt_energies(qs_env, nstates, work_matrices, tddfpt_control, logger, &
1268 tddfpt_print_section, evects_mult, evals_mult, &
1269 gs_mos, tddfpt_section, s_evects, matrix_s, &
1270 kernel_env, matrix_ks, sub_env, ostrength_mult, &
1271 dipole_op_mos_occ, mult, xc_section, full_kernel_env, &
1272 kernel_env_admm_aux)
1280 tddfpt_control%do_admm, tddfpt_control%do_hfxlr, &
1281 tddfpt_control%do_exck, qs_env, sub_env)
1284 DO istate = 1, nstates
1285 DO ispin = 1, nspins
1286 CALL cp_fm_release(s_evects(ispin, istate))
1290 DO istate = 1, nstates
1291 DO ispin = 1, nspins
1293 work_matrices%fm_pool_ao_mo_occ(ispin)%pool, &
1294 s_evects(ispin, istate))
1298 tddfpt_control%rks_triplets = lmult_tmp
1302 IF (log_unit > 0)
THEN
1303 WRITE (log_unit,
"(1X,A)")
"", &
1304 " singlet excitations finished ", &
1306 "-------------------------------------------------------------------------------", &
1307 "- TDDFPT TRIPLET ENERGIES -", &
1308 "-------------------------------------------------------------------------------"
1312 IF (log_unit > 0)
THEN
1313 WRITE (log_unit,
"(1X,A)")
"", &
1314 " triplet excitations finished ", &
1316 "-------------------------------------------------------------------------------", &
1317 "- TDDFPT SINGLET ENERGIES -", &
1318 "-------------------------------------------------------------------------------"
1323 CALL tddfpt_energies(qs_env, nstates, work_matrices, tddfpt_control, logger, &
1324 tddfpt_print_section, evects, evals, &
1325 gs_mos, tddfpt_section, s_evects, matrix_s, &
1326 kernel_env, matrix_ks, sub_env, ostrength, &
1327 dipole_op_mos_occ, mult, xc_section, full_kernel_env, &
1328 kernel_env_admm_aux)
1333 CALL tddfpt_soc(qs_env, evals_mult, evals, evects_mult, evects, gs_mos)
1335 CALL tddfpt_soc(qs_env, evals, evals_mult, evects, evects_mult, gs_mos)
1339 DO ispin = 1,
SIZE(evects_mult, 1)
1340 DO istate = 1,
SIZE(evects_mult, 2)
1341 CALL cp_fm_release(evects_mult(ispin, istate))
1344 DEALLOCATE (evects_mult, evals_mult, ostrength_mult)
1346 CALL timestop(handle)
1348 END SUBROUTINE tddfpt_soc_energies
Contains ADMM methods which require molecular orbitals.
subroutine, public admm_fit_mo_coeffs(admm_env, matrix_s_aux_fit, matrix_s_mixed, mos, mos_aux_fit, geometry_did_change)
...
Types and set/get functions for auxiliary density matrix methods.
subroutine, public get_admm_env(admm_env, mo_derivs_aux_fit, mos_aux_fit, sab_aux_fit, sab_aux_fit_asymm, sab_aux_fit_vs_orb, matrix_s_aux_fit, matrix_s_aux_fit_kp, matrix_s_aux_fit_vs_orb, matrix_s_aux_fit_vs_orb_kp, task_list_aux_fit, matrix_ks_aux_fit, matrix_ks_aux_fit_kp, matrix_ks_aux_fit_im, matrix_ks_aux_fit_dft, matrix_ks_aux_fit_hfx, matrix_ks_aux_fit_dft_kp, matrix_ks_aux_fit_hfx_kp, rho_aux_fit, rho_aux_fit_buffer, admm_dm)
Get routine for the ADMM env.
Define the atomic kind types and their sub types.
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public grimme2016
integer, save, public iannuzzi2005
integer, save, public grimme2013
Handles all functions related to the CELL.
methods related to the blacs parallel environment
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
DBCSR operations in CP2K.
pool for for elements that are retained and released
subroutine, public fm_pool_create_fm(pool, element, name)
returns an element, allocating it if none is in the pool
represent the structure of a full matrix
represent a full matrix distributed on many processors
subroutine, public cp_fm_get_info(matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, nrow_locals, ncol_locals, matrix_struct, para_env)
returns all kind of information about the full matrix
subroutine, public cp_fm_create(matrix, matrix_struct, name, use_sp)
creates a new full matrix with the given structure
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,...
subroutine, public cp_iterate(iteration_info, last, iter_nr, increment, iter_nr_out)
adds one to the actual iteration
subroutine, public cp_rm_iter_level(iteration_info, level_name, n_rlevel_att)
Removes an iteration level.
subroutine, public cp_add_iter_level(iteration_info, level_name, n_rlevel_new)
Adds an iteration level.
Types for excited states potential energies.
Utilities for hfx and admm methods.
subroutine, public aux_admm_init(qs_env, mos, admm_env, admm_control, basis_type)
Minimal setup routine for admm_env No forces No k-points No DFT correction terms.
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 ...
Defines the basic variable types.
integer, parameter, public dp
Calculates integral matrices for LRIGPW method lri : local resolution of the identity.
subroutine, public lri_print_stat(qs_env, ltddfpt, tddfpt_lri_env)
...
contains the types and subroutines for dealing with the lri_env lri : local resolution of the identit...
subroutine, public lri_density_release(lri_density)
releases the given lri_density
subroutine, public lri_env_release(lri_env)
releases the given lri_env
Machine interface based on Fortran 2003 and POSIX.
subroutine, public m_flush(lunit)
flushes units if the &GLOBAL flag is set accordingly
Interface to the message passing library MPI.
generate or use from input minimal basis set
subroutine, public create_minbas_set(qs_env, unit_nr, basis_type, primitive)
...
Define the data structure for the particle information.
Definition of physical constants:
real(kind=dp), parameter, public evolt
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_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, 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, rhs)
Get the QUICKSTEP environment.
subroutine, public create_fxc_kernel(rho_struct, fxc_rspace, xc_section, is_rks_triplets, sub_env, qs_env)
Create the xc kernel potential for the approximate Fxc kernel model.
subroutine, public create_kernel_env(kernel_env, xc_section, is_rks_triplets, rho_struct_sub, lsd_singlets, do_excitations, sub_env, qs_env)
Create kernel environment.
subroutine, public release_kernel_env(kernel_env)
Release kernel environment.
Define the quickstep kind type and their sub types.
Definition and initialisation of the mo data type.
groups fairly general SCF methods, so that modules other than qs_scf can use them too split off from ...
subroutine, public eigensolver(matrix_ks_fm, mo_set, ortho, work, cholesky_method, do_level_shift, level_shift, matrix_u_fm, use_jacobi)
Diagonalise the Kohn-Sham matrix to get a new set of MO eigen- vectors and MO eigenvalues....
module that contains the definitions of the scf types
subroutine, public assign_state(qs_env, matrix_s, evects, psi0, wfn_history, my_state)
...
subroutine, public tddfpt_construct_aux_fit_density(rho_orb_struct, rho_aux_fit_struct, local_rho_set, qs_env, sub_env, wfm_rho_orb, wfm_rho_aux_fit, wfm_aux_orb)
Project a charge density expressed in primary basis set into the auxiliary basis set.
subroutine, public tddfpt_construct_ground_state_orb_density(rho_orb_struct, rho_xc_struct, is_rks_triplets, qs_env, sub_env, wfm_rho_orb)
Compute the ground-state charge density expressed in primary basis set.
real(kind=dp) function, public tddfpt_davidson_solver(evects, evals, S_evects, gs_mos, tddfpt_control, matrix_ks, qs_env, kernel_env, sub_env, logger, iter_unit, energy_unit, tddfpt_print_section, work_matrices)
Perform Davidson iterations.
subroutine, public tddfpt_orthogonalize_psi1_psi0(evects, S_C0_C0T)
Make TDDFPT trial vectors orthogonal to all occupied molecular orbitals.
subroutine, public tddfpt_orthonormalize_psi1_psi1(evects, nvects_new, S_evects, matrix_s)
Make new TDDFPT trial vectors orthonormal to all previous trial vectors.
subroutine, public tddfpt_forces_main(qs_env, gs_mos, ex_env, kernel_env, sub_env, work_matrices)
Perform TDDFPT gradient calculation.
subroutine, public tddfpt_print_forces(qs_env, evects, evals, ostrength, print_section, gs_mos, kernel_env, sub_env, work_matrices)
Calculate and print forces of selected excited states.
subroutine, public tddfpt2_lri_init(qs_env, kernel_env, lri_section, tddfpt_print_section)
Initialize LRI environment, basis, neighborlists and matrices.
subroutine, public tddfpt(qs_env, calc_forces)
Perform TDDFPT calculation.
subroutine, public tddfpt_energies(qs_env, nstates, work_matrices, tddfpt_control, logger, tddfpt_print_section, evects, evals, gs_mos, tddfpt_section, S_evects, matrix_s, kernel_env, matrix_ks, sub_env, ostrength, dipole_op_mos_occ, mult, xc_section, full_kernel_env, kernel_env_admm_aux)
The energy cylculation has been moved to its own subroutine.
subroutine, public tddfpt_input(qs_env, do_hfx, do_admm, do_exck, do_hfxsr, do_hfxlr, xc_section, tddfpt_print_section, lri_section, hfxsr_section)
TDDFPT input.
subroutine, public kernel_info(log_unit, dft_control, tddfpt_control, xc_section)
...
subroutine, public tddfpt_print_excitation_analysis(log_unit, evects, evals, gs_mos, matrix_s, min_amplitude)
Print excitation analysis.
subroutine, public tddfpt_dipole_operator(dipole_op_mos_occ, tddfpt_control, gs_mos, qs_env)
Compute the action of the dipole operator on the ground state wave function.
subroutine, public tddfpt_print_nto_analysis(qs_env, evects, evals, ostrength, gs_mos, matrix_s, print_section)
Print natural transition orbital analysis.
subroutine, public tddfpt_print_summary(log_unit, evects, evals, ostrength, mult, dipole_op_mos_occ, dipole_form)
Print final TDDFPT excitation energies and oscillator strengths.
integer function, public tddfpt_read_restart(evects, evals, gs_mos, logger, tddfpt_section, tddfpt_print_section, fm_pool_ao_mo_occ, blacs_env_global)
Initialise initial guess vectors by reading (un-normalised) Ritz vectors from a binary restart file.
subroutine, public tddfpt_write_restart(evects, evals, gs_mos, logger, tddfpt_print_section)
Write Ritz vectors to a binary restart file.
subroutine, public tddfpt_write_newtonx_output(evects, evals, gs_mos, logger, tddfpt_print_section, matrix_s, S_evects, sub_env)
Write Ritz vectors to a binary restart file.
subroutine, public tddfpt_soc(qs_env, evals_a, evals_b, evects_a, evects_b, gs_mos)
Perform TDDFPT-SOC calculation.
Simplified Tamm Dancoff approach (sTDA).
subroutine, public stda_init_param(qs_env, stda_kernel, stda_control)
Get the parameters needed for an sTDA calculation.
subroutine, public deallocate_stda_env(stda_kernel)
Deallocate the sTDA environment.
subroutine, public allocate_stda_env(qs_env, stda_kernel, n_ao, nactive)
Allocate the sTDA environment.
Simplified Tamm Dancoff approach (sTDA).
subroutine, public get_lowdin_mo_coefficients(qs_env, sub_env, work)
Calculate Lowdin MO coefficients.
subroutine, public stda_init_matrices(qs_env, stda_kernel, sub_env, work, tddfpt_control)
Calculate sTDA matrices.
subroutine, public tddfpt_sub_env_init(sub_env, qs_env, mos_occ, kernel)
Split MPI communicator to create a set of parallel (sub)groups.
subroutine, public tddfpt_sub_env_release(sub_env)
Release parallel group environment.
subroutine, public hfxsr_create_work_matrices(work_matrices, qs_env, admm_env)
Allocate work matrices for hfxsr.
subroutine, public tddfpt_release_work_matrices(work_matrices, sub_env)
Release work matrices.
subroutine, public stda_create_work_matrices(work_matrices, gs_mos, nstates, qs_env, sub_env)
Allocate work matrices for sTDA kernel.
subroutine, public tddfpt_create_work_matrices(work_matrices, gs_mos, nstates, do_hfx, do_admm, do_hfxlr, do_exck, qs_env, sub_env)
Allocate work matrices for full kernel.
subroutine, public tddfpt_release_ground_state_mos(gs_mos)
Release molecular orbitals.
subroutine, public tddfpt_guess_vectors(evects, evals, gs_mos, log_unit)
Generate missed guess vectors.
subroutine, public tddfpt_oecorr(qs_env, gs_mos, matrix_ks_oep)
Callculate orbital corrected KS matrix for TDDFPT.
subroutine, public tddfpt_init_mos(qs_env, gs_mos, iounit)
Prepare MOs for TDDFPT Calculations.
Utilities for string manipulations.
subroutine, public integer_to_string(inumber, string)
Converts an integer number to a string. The WRITE statement will return an error message,...
Writes information on XC functionals to output.
subroutine, public xc_write(iounit, xc_section, lsd)
...