52 dbt_copy_matrix_to_tensor, &
53 dbt_copy_tensor_to_matrix, &
108#include "../base/base_uses.f90"
114 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
"rt_bse"
124 MODULE PROCEDURE get_sigma_complex, &
130 MODULE PROCEDURE get_hartree_env, &
144 CHARACTER(len=*),
PARAMETER :: routinen =
'run_propagation_bse'
146 INTEGER :: i, j, k, handle
148 REAL(kind=
dp) :: metric, enum_re, enum_im, &
149 idempotence_dev, a_metric_1, a_metric_2
152 CALL timeset(routinen, handle)
179 CALL initialize_rtbse_env(rtbse_env)
183 rtbse_env%sim_time = real(rtbse_env%sim_start,
dp)*rtbse_env%sim_dt
185 IF (.NOT. rtbse_env%restart_extracted)
THEN
191 IF (rtbse_env%dft_control%rtp_control%apply_delta_pulse .AND. (.NOT. rtbse_env%restart_extracted))
THEN
192 CALL apply_delta_pulse(rtbse_env)
197 DO i = rtbse_env%sim_start, rtbse_env%sim_nsteps - 1
200 rtbse_env%sim_time = real(i,
dp)*rtbse_env%sim_dt
201 rtbse_env%sim_step = i
203 CALL etrs_scf_loop(rtbse_env, rtbse_env%rho, rtbse_env%rho_M, rtbse_env%rho_new, converged, k, metric)
204 CALL get_electron_number(rtbse_env, rtbse_env%rho_new, enum_re, enum_im)
208 CALL get_idempotence_deviation(rtbse_env, rtbse_env%rho_new, idempotence_dev)
209 DO j = 1, rtbse_env%n_spin
210 CALL cp_cfm_to_fm(rtbse_env%sigma_SEX(j), rtbse_env%real_workspace(1), rtbse_env%real_workspace(2))
211 CALL antiherm_metric(real_fm=rtbse_env%real_workspace(1), imag_fm=rtbse_env%real_workspace(2), &
212 workspace=rtbse_env%rho_workspace, metric=a_metric_1)
213 CALL antiherm_metric(real_fm=rtbse_env%hartree_curr(j), &
214 workspace=rtbse_env%rho_workspace, metric=a_metric_2)
218 IF (.NOT. converged) cpabort(
"ETRS did not converge")
219 CALL cp_iterate(logger%iter_info, iter_nr=i, last=(i == rtbse_env%sim_nsteps))
220 DO j = 1, rtbse_env%n_spin
237 CALL print_ft(rtbse_env%rtp_section, &
238 rtbse_env%moments_trace, &
239 rtbse_env%time_trace, &
240 rtbse_env%field_trace, &
241 rtbse_env%dft_control%rtp_control, &
242 info_opt=rtbse_env%unit_nr)
247 CALL timestop(handle)
256 SUBROUTINE initialize_rtbse_env(rtbse_env)
258 CHARACTER(len=*),
PARAMETER :: routinen =
"initialize_rtbse_env"
260 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: moments_dbcsr_p
262 REAL(kind=
dp),
DIMENSION(:),
POINTER :: occupations
263 REAL(kind=
dp),
DIMENSION(3) :: rpoint
264 INTEGER :: i, k, handle
266 CALL timeset(routinen, handle)
269 CALL get_qs_env(rtbse_env%qs_env, bs_env=bs_env, matrix_s=matrix_s)
273 NULLIFY (moments_dbcsr_p)
274 ALLOCATE (moments_dbcsr_p(3))
277 NULLIFY (moments_dbcsr_p(k)%matrix)
279 ALLOCATE (moments_dbcsr_p(k)%matrix)
281 CALL dbcsr_copy(moments_dbcsr_p(k)%matrix, matrix_s(1)%matrix)
287 reference=rtbse_env%moment_ref_type, ref_point=rtbse_env%user_moment_ref_point)
299 CALL copy_dbcsr_to_fm(moments_dbcsr_p(k)%matrix, rtbse_env%moments_field(k))
305 DEALLOCATE (moments_dbcsr_p(k)%matrix)
307 DEALLOCATE (moments_dbcsr_p)
313 ALLOCATE (occupations(rtbse_env%n_ao))
315 DO i = 1, rtbse_env%n_spin
316 occupations(:) = 0.0_dp
317 occupations(1:rtbse_env%n_occ(i)) = 1.0_dp
319 CALL cp_fm_to_fm(bs_env%fm_mo_coeff_Gamma(i), rtbse_env%real_workspace(1))
321 CALL parallel_gemm(
"N",
"T", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
322 1.0_dp, rtbse_env%real_workspace(1), bs_env%fm_mo_coeff_Gamma(i), &
323 0.0_dp, rtbse_env%real_workspace(2))
325 CALL cp_fm_to_cfm(msourcer=rtbse_env%real_workspace(2), mtarget=rtbse_env%rho(i))
329 DEALLOCATE (occupations)
331 IF (rtbse_env%dft_control%rtp_control%initial_wfn ==
use_rt_restart)
THEN
337 CALL read_moments(rtbse_env%moments_section, rtbse_env%sim_start_orig, &
338 rtbse_env%sim_start, rtbse_env%moments_trace, rtbse_env%time_trace)
348 CALL cp_fm_to_cfm(msourcer=rtbse_env%S_fm, mtarget=rtbse_env%S_cfm)
353 DO i = 1, rtbse_env%n_spin
356 CALL cp_fm_to_fm(bs_env%fm_mo_coeff_Gamma(i), rtbse_env%real_workspace(1))
361 CALL parallel_gemm(
"N",
"T", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
362 1.0_dp, rtbse_env%real_workspace(1), bs_env%fm_mo_coeff_Gamma(i), &
363 0.0_dp, rtbse_env%real_workspace(2))
365 CALL parallel_gemm(
"N",
"N", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
366 1.0_dp, rtbse_env%S_fm, rtbse_env%real_workspace(2), &
367 0.0_dp, rtbse_env%real_workspace(1))
369 CALL parallel_gemm(
"N",
"N", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
370 1.0_dp, rtbse_env%real_workspace(1), rtbse_env%S_fm, &
371 0.0_dp, rtbse_env%real_workspace(2))
372 CALL cp_fm_to_cfm(msourcer=rtbse_env%real_workspace(2), mtarget=rtbse_env%ham_reference(i))
375 CALL cp_fm_to_cfm(msourcer=bs_env%fm_ks_Gamma(i), mtarget=rtbse_env%ham_reference(i))
382 CALL init_hartree(rtbse_env, rtbse_env%v_dbcsr)
388 CALL dbcsr_set(rtbse_env%w_dbcsr, 0.0_dp)
391 CALL dbcsr_add(rtbse_env%w_dbcsr, rtbse_env%v_dbcsr, 1.0_dp, 1.0_dp)
392 CALL dbt_copy_matrix_to_tensor(rtbse_env%w_dbcsr, rtbse_env%screened_dbt)
395 DO i = 1, rtbse_env%n_spin
396 CALL get_hartree(rtbse_env, rtbse_env%rho_orig(i), rtbse_env%hartree_curr(i))
398 CALL cp_fm_scale(rtbse_env%spin_degeneracy, rtbse_env%hartree_curr(i))
400 CALL cp_fm_to_cfm(msourcer=rtbse_env%hartree_curr(i), mtarget=rtbse_env%ham_workspace(1))
402 cmplx(-1.0, 0.0, kind=
dp), rtbse_env%ham_workspace(1))
410 DO i = 1, rtbse_env%n_spin
412 CALL get_sigma(rtbse_env, rtbse_env%sigma_COH(i), -0.5_dp, rtbse_env%S_inv_fm)
414 CALL cp_fm_to_cfm(msourcer=rtbse_env%sigma_COH(i), mtarget=rtbse_env%ham_workspace(1))
416 cmplx(-1.0, 0.0, kind=
dp), rtbse_env%ham_workspace(1))
420 CALL get_sigma(rtbse_env, rtbse_env%sigma_SEX(i), -1.0_dp, rtbse_env%rho_orig(i))
423 cmplx(-1.0, 0.0, kind=
dp), rtbse_env%sigma_SEX(i))
427 DO i = 1, rtbse_env%n_spin
428 CALL get_sigma(rtbse_env, rtbse_env%sigma_SEX(i), -1.0_dp, rtbse_env%rho_orig(i))
430 cmplx(-1.0, 0.0, kind=
dp), rtbse_env%sigma_SEX(i))
435 CALL timestop(handle)
436 END SUBROUTINE initialize_rtbse_env
443 SUBROUTINE apply_delta_pulse(rtbse_env)
445 CHARACTER(len=*),
PARAMETER :: routinen =
"apply_delta_pulse"
446 REAL(kind=
dp) :: intensity, metric
447 REAL(kind=
dp),
DIMENSION(3) :: kvec
448 INTEGER :: i, k, handle
450 CALL timeset(routinen, handle)
453 IF (rtbse_env%unit_nr > 0)
WRITE (rtbse_env%unit_nr,
'(A28)')
' RTBSE| Applying delta pulse'
455 intensity = -rtbse_env%dft_control%rtp_control%delta_pulse_scale
457 kvec(:) = rtbse_env%dft_control%rtp_control%delta_pulse_direction(:)
458 IF (rtbse_env%unit_nr > 0)
WRITE (rtbse_env%unit_nr,
'(A38,E14.4E3,E14.4E3,E14.4E3)') &
459 " RTBSE| Delta pulse elements (a.u.) : ", intensity*kvec(:)
464 kvec(k), rtbse_env%moments_field(k))
467 CALL cp_fm_transpose(rtbse_env%real_workspace(1), rtbse_env%real_workspace(2))
469 0.5_dp, rtbse_env%real_workspace(2))
471 IF (rtbse_env%mat_exp_method ==
do_bch)
THEN
473 CALL parallel_gemm(
"N",
"N", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
474 intensity, rtbse_env%S_inv_fm, rtbse_env%real_workspace(1), &
475 0.0_dp, rtbse_env%real_workspace(2))
476 DO i = 1, rtbse_env%n_spin
478 CALL cp_fm_to_cfm(msourcei=rtbse_env%real_workspace(2), mtarget=rtbse_env%ham_workspace(i))
480 ELSE IF (rtbse_env%mat_exp_method ==
do_exact)
THEN
481 DO i = 1, rtbse_env%n_spin
482 CALL cp_fm_to_cfm(msourcer=rtbse_env%real_workspace(1), mtarget=rtbse_env%ham_effective(i))
483 CALL cp_cfm_gexp(rtbse_env%ham_effective(i), rtbse_env%S_cfm, rtbse_env%ham_workspace(i), &
484 cmplx(0.0, intensity, kind=
dp), rtbse_env%rho_workspace)
488 CALL propagate_density(rtbse_env, rtbse_env%ham_workspace, rtbse_env%rho, rtbse_env%rho_new)
489 metric = rho_metric(rtbse_env%rho_new, rtbse_env%rho, rtbse_env%n_spin)
490 IF (rtbse_env%unit_nr > 0)
WRITE (rtbse_env%unit_nr, (
'(A42,E38.8E3)'))
" RTBSE| Metric difference after delta kick", metric
492 DO i = 1, rtbse_env%n_spin
496 CALL timestop(handle)
497 END SUBROUTINE apply_delta_pulse
505 FUNCTION rho_metric(rho_new, rho_old, nspin, workspace_opt)
RESULT(metric)
506 TYPE(
cp_cfm_type),
DIMENSION(:),
POINTER,
INTENT(IN):: rho_new, &
508 INTEGER,
INTENT(IN) :: nspin
509 TYPE(
cp_cfm_type),
POINTER,
OPTIONAL :: workspace_opt
511 REAL(kind=
dp) :: metric
512 REAL(kind=
dp),
DIMENSION(:),
ALLOCATABLE :: partial_metric
514 COMPLEX(kind=dp) :: scale_factor
516 ALLOCATE (partial_metric(nspin))
519 IF (
PRESENT(workspace_opt))
THEN
520 workspace = workspace_opt
535 metric = metric + partial_metric(j)*partial_metric(j)
537 metric = sqrt(metric)
540 DEALLOCATE (partial_metric)
541 END FUNCTION rho_metric
548 SUBROUTINE antiherm_metric(real_fm, imag_fm, workspace, metric)
550 TYPE(
cp_fm_type),
INTENT(IN),
OPTIONAL :: imag_fm
551 REAL(kind=
dp),
INTENT(OUT) :: metric
552 TYPE(
cp_cfm_type),
DIMENSION(:),
POINTER :: workspace
553 COMPLEX(kind=dp) :: complex_one
556 IF (
PRESENT(imag_fm))
THEN
559 CALL cp_fm_to_cfm(msourcer=real_fm, mtarget=workspace(1))
563 complex_one = cmplx(1.0, 0.0, kind=
dp)
566 END SUBROUTINE antiherm_metric
576 SUBROUTINE ham_to_exp(rtbse_env, ham, ham_exp)
580 CHARACTER(len=*),
PARAMETER :: routinen =
"ham_to_exp"
582 CALL timeset(routinen, handle)
583 DO j = 1, rtbse_env%n_spin
584 IF (rtbse_env%mat_exp_method ==
do_bch)
THEN
587 CALL multiply_fm_cfm(
"N",
"N", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
588 1.0_dp, rtbse_env%S_inv_fm, ham(j), &
589 0.0_dp, rtbse_env%rho_workspace(1))
593 CALL cp_cfm_scale(cmplx(0.0, -rtbse_env%sim_dt/2, kind=
dp), rtbse_env%rho_workspace(1))
596 ELSE IF (rtbse_env%mat_exp_method ==
do_exact)
THEN
597 CALL cp_cfm_gexp(ham(j), rtbse_env%S_cfm, ham_exp(j), &
598 cmplx(0.0, -rtbse_env%sim_dt/2, kind=
dp), rtbse_env%rho_workspace)
600 cpabort(
"Only BCH and Taylor matrix exponentiation implemented")
604 CALL timestop(handle)
605 END SUBROUTINE ham_to_exp
612 SUBROUTINE update_effective_ham(rtbse_env, rho)
615 CHARACTER(len=*),
PARAMETER :: routinen =
"update_effective_ham"
616 INTEGER :: k, j, nspin, handle
618 CALL timeset(routinen, handle)
620 nspin = rtbse_env%n_spin
624 CALL cp_cfm_to_cfm(rtbse_env%ham_reference(j), rtbse_env%ham_effective(j))
627 IF (rtbse_env%dft_control%apply_efield_field)
THEN
628 CALL make_field(rtbse_env%dft_control, rtbse_env%field, rtbse_env%sim_step, rtbse_env%sim_time)
631 rtbse_env%field(:) = 0.0_dp
636 CALL cp_fm_to_cfm(msourcer=rtbse_env%moments_field(k), mtarget=rtbse_env%ham_workspace(1))
638 cmplx(rtbse_env%field(k), 0.0, kind=
dp), rtbse_env%ham_workspace(1))
642 CALL get_sigma(rtbse_env, rtbse_env%sigma_COH(j), -0.5_dp, rtbse_env%S_inv_fm)
643 CALL cp_fm_to_cfm(msourcer=rtbse_env%sigma_COH(j), mtarget=rtbse_env%ham_workspace(1))
645 cmplx(1.0, 0.0, kind=
dp), rtbse_env%ham_workspace(1))
649 CALL get_sigma(rtbse_env, rtbse_env%sigma_SEX(j), -1.0_dp, rho(j))
651 cmplx(1.0, 0.0, kind=
dp), rtbse_env%sigma_SEX(j))
655 rtbse_env%hartree_curr(j))
656 CALL cp_fm_to_cfm(msourcer=rtbse_env%hartree_curr(j), mtarget=rtbse_env%ham_workspace(1))
658 cmplx(rtbse_env%spin_degeneracy, 0.0, kind=
dp), rtbse_env%ham_workspace(1))
662 CALL cp_cfm_transpose(rtbse_env%ham_effective(j),
'C', rtbse_env%ham_workspace(1))
664 cmplx(0.5, 0.0, kind=
dp), rtbse_env%ham_workspace(1))
666 CALL timestop(handle)
667 END SUBROUTINE update_effective_ham
678 SUBROUTINE etrs_scf_loop(rtbse_env, rho_start, rho_mid, rho_end, converged, k, metric)
680 TYPE(
cp_cfm_type),
DIMENSION(:),
POINTER :: rho_start, &
685 REAL(kind=
dp) :: metric
686 CHARACTER(len=*),
PARAMETER :: routinen =
"etrs_scf_loop"
689 CALL timeset(routinen, handle)
705 CALL update_effective_ham(rtbse_env, rho_start)
707 CALL ham_to_exp(rtbse_env, rtbse_env%ham_effective, rtbse_env%ham_workspace)
709 CALL propagate_density(rtbse_env, rtbse_env%ham_workspace, rho_start, rho_mid)
711 CALL propagate_density(rtbse_env, rtbse_env%ham_workspace, rho_mid, rtbse_env%rho_new_last)
713 rtbse_env%sim_step = rtbse_env%sim_step + 1
714 rtbse_env%sim_time = rtbse_env%sim_time + rtbse_env%sim_dt
717 DO k = 1, rtbse_env%etrs_max_iter
719 CALL update_effective_ham(rtbse_env, rtbse_env%rho_new_last)
720 CALL ham_to_exp(rtbse_env, rtbse_env%ham_effective, rtbse_env%ham_workspace)
722 CALL propagate_density(rtbse_env, rtbse_env%ham_workspace, rho_mid, rho_end)
724 metric = rho_metric(rho_end, rtbse_env%rho_new_last, rtbse_env%n_spin)
727 IF (metric < rtbse_env%etrs_threshold)
THEN
732 DO j = 1, rtbse_env%n_spin
739 CALL timestop(handle)
740 END SUBROUTINE etrs_scf_loop
751 SUBROUTINE bch_propagate(propagator_matrix, target_matrix, result_matrix, workspace, threshold_opt, max_iter_opt)
755 TYPE(
cp_cfm_type),
DIMENSION(:),
POINTER :: propagator_matrix
757 TYPE(
cp_cfm_type),
DIMENSION(:),
POINTER :: target_matrix
759 TYPE(
cp_cfm_type),
DIMENSION(:),
POINTER :: result_matrix, workspace
761 REAL(kind=
dp),
OPTIONAL :: threshold_opt
762 INTEGER,
OPTIONAL :: max_iter_opt
763 CHARACTER(len=*),
PARAMETER :: routinen =
"bch_propagate"
764 REAL(kind=
dp) :: threshold, prefactor, metric
765 INTEGER :: max_iter, i, n_spin, n_ao, k, &
768 CHARACTER(len=77) :: error
770 CALL timeset(routinen, handle)
774 IF (
PRESENT(threshold_opt))
THEN
775 threshold = threshold_opt
780 IF (
PRESENT(max_iter_opt))
THEN
781 max_iter = max_iter_opt
786 n_spin =
SIZE(target_matrix)
800 prefactor = 1.0_dp/real(k, kind=
dp)
803 cmplx(prefactor, 0.0, kind=
dp), propagator_matrix(i), workspace(i), &
804 cmplx(0.0, 0.0, kind=
dp), workspace(i + w_stride))
806 cmplx(prefactor, 0.0, kind=
dp), workspace(i), propagator_matrix(i), &
807 cmplx(1.0, 0.0, kind=
dp), workspace(i + w_stride))
810 cmplx(1.0, 0.0, kind=
dp), workspace(i + w_stride))
812 metric = rho_metric(workspace(w_stride + 1:), workspace(1:w_stride), n_spin)
813 IF (metric <= threshold)
THEN
822 IF (.NOT. converged)
THEN
823 WRITE (error,
'(A35,E13.4E3,A16,E13.4E3)')
"BCH did not converge, BCH Metric : ", &
824 metric,
"BCH Threshold : ", threshold
828 CALL timestop(handle)
829 END SUBROUTINE bch_propagate
837 SUBROUTINE propagate_density(rtbse_env, exponential, rho_old, rho_new)
839 TYPE(
cp_cfm_type),
DIMENSION(:),
POINTER :: exponential, &
842 CHARACTER(len=*),
PARAMETER :: routinen =
"propagate_density"
845 CALL timeset(routinen, handle)
846 IF (rtbse_env%mat_exp_method ==
do_exact)
THEN
848 DO j = 1, rtbse_env%n_spin
850 CALL parallel_gemm(
"N",
"C", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
851 cmplx(1.0, 0.0, kind=
dp), rho_old(j), exponential(j), &
852 cmplx(0.0, 0.0, kind=
dp), rtbse_env%rho_workspace(1))
854 CALL parallel_gemm(
"N",
"N", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
855 cmplx(1.0, 0.0, kind=
dp), exponential(j), rtbse_env%rho_workspace(1), &
856 cmplx(0.0, 0.0, kind=
dp), rho_new(j))
858 ELSE IF (rtbse_env%mat_exp_method ==
do_bch)
THEN
860 CALL bch_propagate(exponential, rho_old, rho_new, rtbse_env%rho_workspace, threshold_opt=rtbse_env%exp_accuracy, &
861 max_iter_opt=rtbse_env%etrs_max_iter)
863 cpabort(
"Only BCH and exact matrix exponentiation implemented.")
866 CALL timestop(handle)
867 END SUBROUTINE propagate_density
877 SUBROUTINE get_electron_number(rtbse_env, rho, electron_n_re, electron_n_im)
880 REAL(kind=
dp),
INTENT(OUT) :: electron_n_re, electron_n_im
881 COMPLEX(kind=dp) :: electron_n_buffer
884 electron_n_re = 0.0_dp
885 electron_n_im = 0.0_dp
886 CALL cp_fm_to_cfm(msourcer=rtbse_env%S_fm, mtarget=rtbse_env%rho_workspace(1))
887 DO j = 1, rtbse_env%n_spin
888 CALL cp_cfm_trace(rtbse_env%rho_workspace(1), rho(j), electron_n_buffer)
889 electron_n_re = electron_n_re + real(electron_n_buffer, kind=
dp)
890 electron_n_im = electron_n_im + real(aimag(electron_n_buffer), kind=
dp)
893 electron_n_re = electron_n_re*rtbse_env%spin_degeneracy
894 electron_n_im = electron_n_im*rtbse_env%spin_degeneracy
895 END SUBROUTINE get_electron_number
904 SUBROUTINE get_idempotence_deviation(rtbse_env, rho, deviation_metric)
907 REAL(kind=
dp),
INTENT(OUT) :: deviation_metric
908 COMPLEX(kind=dp) :: buffer_1, buffer_2
909 REAL(kind=
dp) :: buffer_dev
912 deviation_metric = 0.0_dp
915 CALL cp_fm_to_cfm(msourcer=rtbse_env%S_fm, mtarget=rtbse_env%rho_workspace(1))
916 DO j = 1, rtbse_env%n_spin
917 CALL cp_cfm_trace(rtbse_env%rho_workspace(1), rho(j), buffer_1)
918 buffer_dev = buffer_dev + real(abs(buffer_1)*abs(buffer_1), kind=
dp)
921 DO j = 1, rtbse_env%n_spin
923 CALL multiply_fm_cfm(
"N",
"N", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
924 1.0_dp, rtbse_env%S_fm, rho(j), &
925 0.0_dp, rtbse_env%rho_workspace(2))
927 CALL parallel_gemm(
"N",
"N", rtbse_env%n_ao, rtbse_env%n_ao, rtbse_env%n_ao, &
928 cmplx(1.0, 0.0, kind=
dp), rho(j), rtbse_env%rho_workspace(2), &
929 cmplx(0.0, 0.0, kind=
dp), rtbse_env%rho_workspace(3))
931 CALL cp_cfm_trace(rtbse_env%rho_workspace(1), rtbse_env%rho_workspace(3), buffer_2)
932 deviation_metric = deviation_metric + real(abs(buffer_2)*abs(buffer_2), kind=
dp)
934 deviation_metric = sqrt(deviation_metric) - sqrt(buffer_dev)
935 END SUBROUTINE get_idempotence_deviation
946 SUBROUTINE get_sigma_complex(rtbse_env, sigma_cfm, prefactor_opt, greens_cfm)
949 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: prefactor_opt
951 REAL(kind=
dp) :: prefactor
954 IF (
PRESENT(prefactor_opt)) prefactor = prefactor_opt
958 CALL cp_cfm_to_fm(msource=greens_cfm, mtargetr=rtbse_env%real_workspace(1))
959 CALL get_sigma(rtbse_env, rtbse_env%real_workspace(2), prefactor, rtbse_env%real_workspace(1))
960 CALL cp_fm_to_cfm(msourcer=rtbse_env%real_workspace(2), mtarget=rtbse_env%ham_workspace(1))
962 CALL cp_cfm_to_fm(msource=greens_cfm, mtargeti=rtbse_env%real_workspace(1))
963 CALL get_sigma(rtbse_env, rtbse_env%real_workspace(2), prefactor, rtbse_env%real_workspace(1))
964 CALL cp_fm_to_cfm(msourcei=rtbse_env%real_workspace(2), mtarget=sigma_cfm)
967 cmplx(1.0, 0.0, kind=
dp), rtbse_env%ham_workspace(1))
969 END SUBROUTINE get_sigma_complex
979 SUBROUTINE get_sigma_real(rtbse_env, sigma_fm, prefactor_opt, greens_fm)
982 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: prefactor_opt
984 REAL(kind=
dp) :: prefactor
987 IF (
PRESENT(prefactor_opt)) prefactor = prefactor_opt
992 CALL get_sigma_dbcsr(rtbse_env, sigma_fm, prefactor, rtbse_env%rho_dbcsr)
994 END SUBROUTINE get_sigma_real
1003 SUBROUTINE get_sigma_dbcsr(rtbse_env, sigma_fm, prefactor_opt, greens_dbcsr)
1006 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: prefactor_opt
1008 REAL(kind=
dp) :: prefactor
1011 IF (
PRESENT(prefactor_opt)) prefactor = prefactor_opt
1013 CALL get_sigma_noenv(sigma_fm, prefactor_opt, greens_dbcsr, &
1014 rtbse_env%screened_dbt, rtbse_env%t_3c_w, &
1015 rtbse_env%t_3c_work_RI_AO__AO, rtbse_env%t_3c_work2_RI_AO__AO, &
1016 rtbse_env%greens_dbt)
1017 END SUBROUTINE get_sigma_dbcsr
1033 SUBROUTINE get_sigma_noenv(sigma_fm, prefactor_opt, greens_dbcsr, screened_dbt, &
1034 int_3c_dbt, work_dbt_3c_1, work_dbt_3c_2, work_dbt_2c)
1036 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: prefactor_opt
1038 TYPE(dbt_type) :: screened_dbt, &
1043 CHARACTER(len=*),
PARAMETER :: routineN =
'get_sigma'
1044 REAL(kind=
dp) :: prefactor
1048 CALL timeset(routinen, handle)
1050 IF (
PRESENT(prefactor_opt))
THEN
1051 prefactor = prefactor_opt
1062 CALL dbt_contract(alpha=1.0_dp, &
1063 tensor_1=screened_dbt, &
1064 tensor_2=int_3c_dbt, &
1066 tensor_3=work_dbt_3c_1, &
1067 contract_1=[2], notcontract_1=[1], map_1=[1], &
1068 contract_2=[1], notcontract_2=[2, 3], map_2=[2, 3])
1072 CALL dbt_copy_matrix_to_tensor(greens_dbcsr, work_dbt_2c)
1075 CALL dbt_contract(alpha=1.0_dp, &
1076 tensor_1=work_dbt_3c_1, &
1077 tensor_2=work_dbt_2c, &
1079 tensor_3=work_dbt_3c_2, &
1080 contract_1=[2], notcontract_1=[1, 3], map_1=[1, 3], &
1081 contract_2=[2], notcontract_2=[1], map_2=[2])
1083 CALL dbt_contract(alpha=prefactor, &
1084 tensor_1=int_3c_dbt, &
1085 tensor_2=work_dbt_3c_2, &
1087 tensor_3=work_dbt_2c, &
1088 contract_1=[1, 3], notcontract_1=[2], map_1=[1], &
1089 contract_2=[1, 2], notcontract_2=[3], map_2=[2])
1093 CALL dbcsr_create(sigma_dbcsr, name=
"sigma", template=greens_dbcsr)
1094 CALL dbt_copy_tensor_to_matrix(work_dbt_2c, sigma_dbcsr)
1098 CALL dbt_clear(work_dbt_3c_1)
1099 CALL dbt_clear(work_dbt_3c_2)
1100 CALL dbt_clear(work_dbt_2c)
1101 CALL timestop(handle)
1103 END SUBROUTINE get_sigma_noenv
1111 SUBROUTINE init_hartree(rtbse_env, v_dbcsr)
1120 TYPE(
dbcsr_type),
DIMENSION(:),
ALLOCATABLE :: V_dbcsr_a, &
1125 bs_env => rtbse_env%bs_env
1128 ALLOCATE (v_dbcsr_a(1))
1129 ALLOCATE (metric_dbcsr(1))
1130 CALL dbcsr_create(v_dbcsr_a(1), name=
"Hartree_dbcsr", template=bs_env%mat_RI_RI%matrix)
1131 CALL dbcsr_create(metric_dbcsr(1), name=
"RI_metric_dbcsr", template=bs_env%mat_RI_RI%matrix)
1136 coulomb_op,
"Coulomb_neighbor_2c_list", rtbse_env%qs_env, &
1137 sym_ij=.false., molecular=.true.)
1139 bs_env%basis_set_RI, bs_env%basis_set_RI, coulomb_op, &
1140 do_kpoints=.false., regularization_ri=bs_env%regularization_RI)
1144 bs_env%ri_metric,
"Metric_neighbor_2c_list", rtbse_env%qs_env, &
1145 sym_ij=.false., molecular=.true.)
1147 bs_env%basis_set_RI, bs_env%basis_set_RI, bs_env%ri_metric, &
1148 do_kpoints=.false., regularization_ri=bs_env%regularization_RI)
1151 CALL cp_fm_create(metric_fm, bs_env%fm_RI_RI%matrix_struct)
1153 CALL cp_fm_create(metric_inv_fm, bs_env%fm_RI_RI%matrix_struct)
1155 CALL cp_fm_create(work_fm, bs_env%fm_RI_RI%matrix_struct)
1163 work_fm, bs_env%n_RI)
1164 CALL parallel_gemm(
"N",
"N", bs_env%n_RI, bs_env%n_RI, bs_env%n_RI, &
1165 1.0_dp, metric_inv_fm, work_fm, 0.0_dp, v_fm)
1176 DEALLOCATE (v_dbcsr_a)
1177 DEALLOCATE (metric_dbcsr)
1184 END SUBROUTINE init_hartree
1195 SUBROUTINE get_hartree_env(rtbse_env, rho_fm, v_fm)
1202 CALL get_qs_env(rtbse_env%qs_env, para_env=para_env, bs_env=bs_env)
1204 CALL get_hartree_noenv(v_fm, rho_fm, rtbse_env%int_3c_array, rtbse_env%v_dbcsr, &
1205 rtbse_env%n_RI, bs_env%sizes_RI, &
1206 para_env, rtbse_env%rho_dbcsr, rtbse_env%v_ao_dbcsr)
1207 END SUBROUTINE get_hartree_env
1223 SUBROUTINE get_hartree_noenv(v_fm, rho_fm, int_3c, v_dbcsr, n_RI, sizes_RI, para_env, rho_dbcsr, v_ao_dbcsr)
1226 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER :: int_3c
1229 INTEGER,
DIMENSION(:) :: sizes_ri
1232 CHARACTER(len=*),
PARAMETER :: routineN =
"get_hartree"
1234 INTEGER :: i, j, k, n, nblocks, ind_1, ind_2, row_offset, col_offset, &
1235 row_size, col_size, j_n_AO, k_n_AO, i_n_RI, &
1236 ri_offset, ind_i, handle
1237 REAL(kind=
dp),
DIMENSION(:),
ALLOCATABLE :: pvector, qvector
1238 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: block_matrix
1239 INTEGER :: nblkrows_local, nblkcols_local, j_blk, k_blk, j_offset, k_offset
1240 INTEGER,
DIMENSION(:),
POINTER :: local_blk_rows, local_blk_cols
1244 mark_used(ri_offset)
1251 CALL timeset(routinen, handle)
1254 ALLOCATE (qvector(n_ri), source=0.0_dp)
1255 ALLOCATE (pvector(n_ri), source=0.0_dp)
1264 CALL dbcsr_get_info(rho_dbcsr, nblkrows_local=nblkrows_local, nblkcols_local=nblkcols_local, &
1265 local_rows=local_blk_rows, local_cols=local_blk_cols)
1266 DO j_blk = 1, nblkrows_local
1268 DO k_blk = 1, nblkcols_local
1271 CALL dbcsr_get_block_p(rho_dbcsr, local_blk_rows(j_blk), local_blk_cols(k_blk), &
1272 block=block_matrix, found=found, row_size=row_size, col_size=col_size)
1274 IF (.NOT. found) cycle
1281 qvector(i) = qvector(i) + int_3c(j_offset + j, k_offset + k, i)*block_matrix(j, k)
1287 k_offset = k_offset + col_size
1290 j_offset = j_offset + row_size
1294 CALL para_env%sum(qvector)
1302 row_offset=row_offset, col_offset=col_offset, row_size=row_size, col_size=col_size)
1304 j_n_ao = sizes_ri(ind_1)
1305 k_n_ao = sizes_ri(ind_2)
1311 pvector(j + row_offset - 1) = pvector(j + row_offset - 1) + block_matrix(j, k)*qvector(k + col_offset - 1)
1318 CALL para_env%sum(pvector)
1323 DO j_blk = 1, nblkrows_local
1325 DO k_blk = 1, nblkcols_local
1328 CALL dbcsr_get_block_p(v_ao_dbcsr, local_blk_rows(j_blk), local_blk_cols(k_blk), &
1329 block=block_matrix, found=found, row_size=row_size, col_size=col_size)
1331 IF (.NOT. found)
THEN
1333 CALL dbcsr_reserve_blocks(v_ao_dbcsr, local_blk_rows(j_blk:j_blk), local_blk_cols(k_blk:k_blk))
1335 CALL dbcsr_get_block_p(v_ao_dbcsr, local_blk_rows(j_blk), local_blk_cols(k_blk), &
1336 block=block_matrix, found=found, row_size=row_size, col_size=col_size)
1343 block_matrix(j, k) = 0.0_dp
1345 block_matrix(j, k) = block_matrix(j, k) + pvector(i)*int_3c(j_offset + j, k_offset + k, i)
1351 k_offset = k_offset + col_size
1354 j_offset = j_offset + row_size
1359 DEALLOCATE (qvector)
1360 DEALLOCATE (pvector)
1362 CALL timestop(handle)
1363 END SUBROUTINE get_hartree_noenv
1377 SUBROUTINE cp_cfm_gexp(amatrix, bmatrix, exponential, eig_scale_opt, work_opt)
1382 COMPLEX(kind=dp),
INTENT(IN),
OPTIONAL :: eig_scale_opt
1383 TYPE(
cp_cfm_type),
DIMENSION(:),
POINTER,
OPTIONAL :: work_opt
1384 CHARACTER(len=*),
PARAMETER :: routineN =
"cp_cfm_gexp"
1385 COMPLEX(kind=dp) :: eig_scale
1386 REAL(kind=
dp),
DIMENSION(:),
ALLOCATABLE :: eigenvalues
1387 COMPLEX(kind=dp),
DIMENSION(:),
ALLOCATABLE :: expvalues
1389 LOGICAL :: deallocate_work
1390 INTEGER :: nrow, i, handle
1392 CALL timeset(routinen, handle)
1395 IF (
PRESENT(eig_scale_opt))
THEN
1396 eig_scale = eig_scale_opt
1398 eig_scale = cmplx(1.0, 0.0, kind=
dp)
1402 IF (
PRESENT(work_opt) .AND.
SIZE(work_opt) >= 4)
THEN
1403 deallocate_work = .false.
1406 deallocate_work = .true.
1414 nrow = amatrix%matrix_struct%nrow_global
1416 ALLOCATE (eigenvalues(nrow))
1417 ALLOCATE (expvalues(nrow))
1424 CALL cp_cfm_geeig(work(1), work(2), work(3), eigenvalues, work(4))
1427 expvalues(:) = exp(eigenvalues(:)*eig_scale)
1437 cmplx(1.0, 0.0, kind=
dp), work(1), work(3), &
1438 cmplx(0.0, 0.0, kind=
dp), work(2))
1441 cmplx(1.0, 0.0, kind=
dp), work(2), bmatrix, &
1442 cmplx(0.0, 0.0, kind=
dp), exponential)
1445 IF (deallocate_work)
THEN
1452 DEALLOCATE (eigenvalues)
1453 DEALLOCATE (expvalues)
1455 CALL timestop(handle)
1456 END SUBROUTINE cp_cfm_gexp
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public marek2025
Basic linear algebra operations for complex full matrices.
subroutine, public cp_cfm_scale_and_add(alpha, matrix_a, beta, matrix_b)
Scale and add two BLACS matrices (a = alpha*a + beta*b).
real(kind=dp) function, public cp_cfm_norm(matrix, mode)
Norm of matrix using (p)zlange.
subroutine, public cp_cfm_transpose(matrix, trans, matrixt)
Transposes a BLACS distributed complex matrix.
subroutine, public cp_cfm_column_scale(matrix_a, scaling)
Scales columns of the full matrix by corresponding factors.
subroutine, public cp_cfm_trace(matrix_a, matrix_b, trace)
Returns the trace of matrix_a^T matrix_b, i.e sum_{i,j}(matrix_a(i,j)*matrix_b(i,j)) .
used for collecting diagonalization schemes available for cp_cfm_type
subroutine, public cp_cfm_geeig(amatrix, bmatrix, eigenvectors, eigenvalues, work)
General Eigenvalue Problem AX = BXE Single option version: Cholesky decomposition of B.
Represents a complex full matrix distributed on many processors.
subroutine, public cp_cfm_release(matrix)
Releases a full matrix.
subroutine, public cp_fm_to_cfm(msourcer, msourcei, mtarget)
Construct a complex full matrix by taking its real and imaginary parts from two separate real-value f...
subroutine, public cp_cfm_get_info(matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, matrix_struct, para_env)
Returns information about a full matrix.
subroutine, public cp_cfm_to_fm(msource, mtargetr, mtargeti)
Copy real and imaginary parts of a complex full matrix into separate real-value full matrices.
subroutine, public cp_cfm_create(matrix, matrix_struct, name, set_zero)
Creates a new full matrix with the given structure.
subroutine, public dbcsr_iterator_next_block(iterator, row, column, block, block_number_argument_has_been_removed, row_size, col_size, row_offset, col_offset)
...
subroutine, public dbcsr_iterator_stop(iterator)
...
subroutine, public dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
...
subroutine, public dbcsr_get_block_p(matrix, row, col, block, found, row_size, col_size)
...
subroutine, public dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, nfullrows_local, nfullcols_local, my_prow, my_pcol, local_rows, local_cols, proc_row_dist, proc_col_dist, row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, distribution, name, matrix_type, group)
...
subroutine, public dbcsr_reserve_blocks(matrix, rows, cols)
...
subroutine, public dbcsr_iterator_start(iterator, matrix, shared, dynamic, dynamic_byrows)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_release(matrix)
...
integer function, public dbcsr_get_num_blocks(matrix)
...
subroutine, public dbcsr_clear(matrix)
...
subroutine, public dbcsr_add(matrix_a, matrix_b, alpha_scalar, beta_scalar)
...
DBCSR operations in CP2K.
subroutine, public cp_dbcsr_sm_fm_multiply(matrix, fm_in, fm_out, ncol, alpha, beta)
multiply a dbcsr with a fm matrix
subroutine, public copy_dbcsr_to_fm(matrix, fm)
Copy a DBCSR matrix to a BLACS matrix.
subroutine, public copy_fm_to_dbcsr(fm, matrix, keep_sparsity)
Copy a BLACS matrix to a dbcsr matrix.
Basic linear algebra operations for full matrices.
subroutine, public cp_fm_column_scale(matrixa, scaling)
scales column i of matrix a with scaling(i)
subroutine, public cp_fm_transpose(matrix, matrixt)
transposes a matrix matrixt = matrix ^ T
subroutine, public cp_fm_scale_and_add(alpha, matrix_a, beta, matrix_b)
calc A <- alpha*A + beta*B optimized for alpha == 1.0 (just add beta*B) and beta == 0....
subroutine, public cp_fm_invert(matrix_a, matrix_inverse, det_a, eps_svd, eigval)
Inverts a cp_fm_type matrix, optionally returning the determinant of the input matrix.
subroutine, public cp_fm_scale(alpha, matrix_a)
scales a matrix matrix_a = alpha * matrix_b
represent a full matrix distributed on many processors
subroutine, public cp_fm_create(matrix, matrix_struct, name, use_sp, set_zero)
creates a new full matrix with the given structure
subroutine, public cp_fm_set_all(matrix, alpha, beta)
set all elements of a matrix to the same value, and optionally the diagonal to a different one
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
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.
This is the start of a dbt_api, all publically needed functions are exported here....
all routins needed for a nonperiodic electric field
subroutine, public make_field(dft_control, field, sim_step, sim_time)
computes the amplitude of the efield within a given envelop
Interface for the force calculations.
recursive subroutine, public force_env_calc_energy_force(force_env, calc_force, consistent_energies, skip_external_control, eval_energy_forces, require_consistent_energy_force, linres, calc_stress_tensor)
Interface routine for force and energy calculations.
Interface for the force calculations.
Defines the basic variable types.
integer, parameter, public dp
2- and 3-center electron repulsion integral routines based on libint2 Currently available operators: ...
Interface to the message passing library MPI.
Calculates the moment integrals <a|r^m|b>
subroutine, public get_reference_point(rpoint, drpoint, qs_env, fist_env, reference, ref_point, ifirst, ilast)
...
basic linear algebra operations for full matrixes
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, sab_cneo, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, 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, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, harris_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
Calculates the moment integrals <a|r^m|b> and <a|r x d/dr|b>
subroutine, public build_local_moment_matrix(qs_env, moments, nmoments, ref_point, ref_points, basis_type)
...
Define the neighbor list data types and the corresponding functionality.
subroutine, public release_neighbor_list_sets(nlists)
releases an array of neighbor_list_sets
Utility methods to build 3-center integral tensors of various types.
subroutine, public build_2c_integrals(t2c, filter_eps, qs_env, nl_2c, basis_i, basis_j, potential_parameter, do_kpoints, do_hfx_kpoints, ext_kpoints, regularization_ri)
...
subroutine, public build_2c_neighbor_lists(ij_list, basis_i, basis_j, potential_parameter, name, qs_env, sym_ij, molecular, dist_2d, pot_to_rad)
Build 2-center neighborlists adapted to different operators This mainly wraps build_neighbor_lists fo...
Input/output from the propagation via RT-BSE method.
subroutine, public print_rtbse_header_info(rtbse_env)
Writes the header and basic info to the standard output.
subroutine, public output_restart(rtbse_env, rho, time_index)
Outputs the restart info (last finished iteration step) + restard density matrix.
subroutine, public print_etrs_info(rtbse_env, step, metric)
Writes the update after single etrs iteration - only for log level > medium.
subroutine, public read_field(rtbse_env)
Reads the field from the files provided by input - useful for the continuation run.
subroutine, public output_field(rtbse_env)
Prints the current field components into a file provided by input.
subroutine, public print_etrs_info_header(rtbse_env)
Writes the header for the etrs iteration updates - only for log level > medium.
subroutine, public output_mos_contravariant(rtbse_env, rho, print_key_section)
Outputs the matrix in MO basis for matrix coefficients corresponding to contravariant operator,...
subroutine, public read_restart(rtbse_env)
Reads the density matrix from restart files and updates the starting time.
subroutine, public print_timestep_info(rtbse_env, step, convergence, electron_num_re, etrs_num)
Writes the header for the etrs iteration updates - only for log level > low.
subroutine, public output_moments(rtbse_env, rho)
Outputs the expectation value of moments from a given density matrix.
Data storage and other types for propagation via RT-BSE method.
subroutine, public release_rtbse_env(rtbse_env)
Releases the environment allocated structures.
subroutine, public create_rtbse_env(rtbse_env, qs_env, force_env)
Allocates structures and prepares rtbse_env for run.
subroutine, public multiply_fm_cfm(trans_r, trans_c, na, nb, nc, alpha, matrix_r, matrix_c, beta, res)
Multiplies real matrix by a complex matrix from the right.
Routines for the propagation via RT-BSE method.
subroutine, public run_propagation_bse(qs_env, force_env)
Runs the electron-only real time BSE propagation.
Routine for the real time propagation output.
subroutine, public print_ft(rtp_section, moments, times, fields, rtc, info_opt, cell)
Calculate and print the Fourier transforms + polarizabilites from moment trace.
subroutine, public read_moments(moments_section, orig_start, current_start, moments, times, mom_read)
Attempt to read the moments from a previously written file.
Represent a complex full matrix.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
wrapper to abstract the force evaluation of the various methods
stores all the informations relevant to an mpi environment