53#include "./base/base_uses.f90"
59 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'bse_full_diag'
85 SUBROUTINE create_a(fm_mat_S_ia_bse, fm_mat_S_bar_ij_bse, fm_mat_S_ab_bse, &
86 fm_A, Eigenval, unit_nr, &
87 homo, virtual, dimen_RI, mp2_env, &
90 TYPE(
cp_fm_type),
INTENT(IN) :: fm_mat_s_ia_bse, fm_mat_s_bar_ij_bse, &
93 REAL(kind=
dp),
DIMENSION(:) :: eigenval
94 INTEGER,
INTENT(IN) :: unit_nr, homo, virtual, dimen_ri
95 TYPE(
mp2_type),
INTENT(INOUT) :: mp2_env
98 CHARACTER(LEN=*),
PARAMETER :: routinen =
'create_A'
100 INTEGER :: a_virt_row, handle, i_occ_row, &
101 i_row_global, ii, j_col_global, jj, &
102 ncol_local_a, nrow_local_a
103 INTEGER,
DIMENSION(4) :: reordering
104 INTEGER,
DIMENSION(:),
POINTER :: col_indices_a, row_indices_a
105 REAL(kind=
dp) :: alpha, alpha_screening, eigen_diff
110 CALL timeset(routinen, handle)
112 IF (unit_nr > 0 .AND. mp2_env%bse%bse_debug_print)
THEN
113 WRITE (unit_nr,
'(T2,A10,T13,A10)')
'BSE|DEBUG|',
'Creating A'
117 SELECT CASE (mp2_env%bse%bse_spin_config)
125 alpha_screening = mp2_env%bse%screening_factor
127 alpha_screening = 1.0_dp
139 CALL cp_fm_struct_create(fm_struct_a, context=fm_mat_s_ia_bse%matrix_struct%context, nrow_global=homo*virtual, &
140 ncol_global=homo*virtual, para_env=fm_mat_s_ia_bse%matrix_struct%para_env)
144 CALL cp_fm_struct_create(fm_struct_w, context=fm_mat_s_ab_bse%matrix_struct%context, nrow_global=homo**2, &
145 ncol_global=virtual**2, para_env=fm_mat_s_ab_bse%matrix_struct%para_env)
152 CALL parallel_gemm(transa=
"T", transb=
"N", m=homo*virtual, n=homo*virtual, k=dimen_ri, alpha=alpha, &
153 matrix_a=fm_mat_s_ia_bse, matrix_b=fm_mat_s_ia_bse, beta=0.0_dp, &
156 IF (unit_nr > 0 .AND. mp2_env%bse%bse_debug_print)
THEN
157 WRITE (unit_nr,
'(T2,A10,T13,A16)')
'BSE|DEBUG|',
'Allocated A_iajb'
163 CALL parallel_gemm(transa=
"T", transb=
"N", m=homo**2, n=virtual**2, k=dimen_ri, alpha=alpha_screening, &
164 matrix_a=fm_mat_s_bar_ij_bse, matrix_b=fm_mat_s_ab_bse, beta=0.0_dp, &
168 IF (unit_nr > 0 .AND. mp2_env%bse%bse_debug_print)
THEN
169 WRITE (unit_nr,
'(T2,A10,T13,A16)')
'BSE|DEBUG|',
'Allocated W_ijab'
174 nrow_local=nrow_local_a, &
175 ncol_local=ncol_local_a, &
176 row_indices=row_indices_a, &
177 col_indices=col_indices_a)
184 reordering = (/1, 3, 2, 4/)
186 virtual, virtual, unit_nr, reordering, mp2_env)
192 DO ii = 1, nrow_local_a
194 i_row_global = row_indices_a(ii)
196 DO jj = 1, ncol_local_a
198 j_col_global = col_indices_a(jj)
200 IF (i_row_global == j_col_global)
THEN
201 i_occ_row = (i_row_global - 1)/virtual + 1
202 a_virt_row = mod(i_row_global - 1, virtual) + 1
203 eigen_diff = eigenval(a_virt_row + homo) - eigenval(i_occ_row)
204 fm_a%local_data(ii, jj) = fm_a%local_data(ii, jj) + eigen_diff
215 CALL timestop(handle)
234 SUBROUTINE create_b(fm_mat_S_ia_bse, fm_mat_S_bar_ia_bse, fm_B, &
235 homo, virtual, dimen_RI, unit_nr, mp2_env)
237 TYPE(
cp_fm_type),
INTENT(IN) :: fm_mat_s_ia_bse, fm_mat_s_bar_ia_bse
239 INTEGER,
INTENT(IN) :: homo, virtual, dimen_ri, unit_nr
240 TYPE(
mp2_type),
INTENT(INOUT) :: mp2_env
242 CHARACTER(LEN=*),
PARAMETER :: routinen =
'create_B'
245 INTEGER,
DIMENSION(4) :: reordering
246 REAL(kind=
dp) :: alpha, alpha_screening
250 CALL timeset(routinen, handle)
252 IF (unit_nr > 0 .AND. mp2_env%bse%bse_debug_print)
THEN
253 WRITE (unit_nr,
'(T2,A10,T13,A10)')
'BSE|DEBUG|',
'Creating B'
257 SELECT CASE (mp2_env%bse%bse_spin_config)
265 alpha_screening = mp2_env%bse%screening_factor
267 alpha_screening = 1.0_dp
270 CALL cp_fm_struct_create(fm_struct_v, context=fm_mat_s_ia_bse%matrix_struct%context, nrow_global=homo*virtual, &
271 ncol_global=homo*virtual, para_env=fm_mat_s_ia_bse%matrix_struct%para_env)
278 IF (unit_nr > 0 .AND. mp2_env%bse%bse_debug_print)
THEN
279 WRITE (unit_nr,
'(T2,A10,T13,A16)')
'BSE|DEBUG|',
'Allocated B_iajb'
282 CALL parallel_gemm(transa=
"T", transb=
"N", m=homo*virtual, n=homo*virtual, k=dimen_ri, alpha=alpha, &
283 matrix_a=fm_mat_s_ia_bse, matrix_b=fm_mat_s_ia_bse, beta=0.0_dp, &
289 CALL parallel_gemm(transa=
"T", transb=
"N", m=homo*virtual, n=homo*virtual, k=dimen_ri, alpha=alpha_screening, &
290 matrix_a=fm_mat_s_bar_ia_bse, matrix_b=fm_mat_s_ia_bse, beta=0.0_dp, &
297 reordering = (/1, 4, 3, 2/)
299 virtual, virtual, unit_nr, reordering, mp2_env)
304 CALL timestop(handle)
325 fm_sqrt_A_minus_B, fm_inv_sqrt_A_minus_B, &
326 homo, virtual, unit_nr, mp2_env, diag_est)
329 TYPE(
cp_fm_type),
INTENT(INOUT) :: fm_c, fm_sqrt_a_minus_b, &
330 fm_inv_sqrt_a_minus_b
331 INTEGER,
INTENT(IN) :: homo, virtual, unit_nr
332 TYPE(
mp2_type),
INTENT(INOUT) :: mp2_env
333 REAL(kind=
dp),
INTENT(IN) :: diag_est
335 CHARACTER(LEN=*),
PARAMETER :: routinen =
'create_hermitian_form_of_ABBA'
337 INTEGER :: dim_mat, handle, n_dependent
338 REAL(kind=
dp),
DIMENSION(2) :: eigvals_ab_diff
339 TYPE(
cp_fm_type) :: fm_a_minus_b, fm_a_plus_b, fm_dummy, &
342 CALL timeset(routinen, handle)
344 IF (unit_nr > 0)
THEN
345 WRITE (unit_nr,
'(T2,A4,T7,A25,A39,ES6.0,A3)')
'BSE|',
'Diagonalizing aux. matrix', &
346 ' with size of A. This will take around ', diag_est,
" s."
363 CALL cp_fm_create(fm_sqrt_a_minus_b, fm_a%matrix_struct)
365 CALL cp_fm_create(fm_inv_sqrt_a_minus_b, fm_a%matrix_struct)
370 IF (unit_nr > 0 .AND. mp2_env%bse%bse_debug_print)
THEN
371 WRITE (unit_nr,
'(T2,A10,T13,A19)')
'BSE|DEBUG|',
'Created work arrays'
379 CALL cp_fm_to_fm(fm_a_minus_b, fm_inv_sqrt_a_minus_b)
387 CALL cp_fm_power(fm_inv_sqrt_a_minus_b, fm_dummy, -0.5_dp, 0.0_dp, n_dependent, eigvals=eigvals_ab_diff)
391 IF (eigvals_ab_diff(1) < 0)
THEN
392 CALL cp_abort(__location__, &
393 "Matrix (A-B) is not positive definite. "// &
394 "Hermitian diagonalization of full ABBA matrix is ill-defined.")
400 dim_mat = homo*virtual
401 CALL parallel_gemm(
"N",
"N", dim_mat, dim_mat, dim_mat, 1.0_dp, fm_inv_sqrt_a_minus_b, fm_a_minus_b, 0.0_dp, &
405 CALL parallel_gemm(
"N",
"N", dim_mat, dim_mat, dim_mat, 1.0_dp, fm_sqrt_a_minus_b, fm_a_plus_b, 0.0_dp, &
416 CALL parallel_gemm(
"N",
"N", dim_mat, dim_mat, dim_mat, 1.0_dp, fm_work_product, fm_sqrt_a_minus_b, 0.0_dp, &
420 IF (unit_nr > 0 .AND. mp2_env%bse%bse_debug_print)
THEN
421 WRITE (unit_nr,
'(T2,A10,T13,A36)')
'BSE|DEBUG|',
'Filled C=(A-B)^0.5 (A+B) (A-B)^0.5'
424 CALL timestop(handle)
444 fm_sqrt_A_minus_B, fm_inv_sqrt_A_minus_B, &
445 unit_nr, diag_est, mp2_env, qs_env, mo_coeff)
448 INTEGER,
INTENT(IN) :: homo, virtual, homo_irred
449 TYPE(
cp_fm_type),
INTENT(INOUT) :: fm_sqrt_a_minus_b, fm_inv_sqrt_a_minus_b
450 INTEGER,
INTENT(IN) :: unit_nr
451 REAL(kind=
dp),
INTENT(IN) :: diag_est
452 TYPE(
mp2_type),
INTENT(INOUT) :: mp2_env
454 TYPE(
cp_fm_type),
DIMENSION(:),
INTENT(IN) :: mo_coeff
456 CHARACTER(LEN=*),
PARAMETER :: routinen =
'diagonalize_C'
458 INTEGER :: diag_info, handle
459 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: exc_ens
460 TYPE(
cp_fm_type) :: fm_eigvec_x, fm_eigvec_y, fm_eigvec_z, &
461 fm_mat_eigvec_transform_diff, &
462 fm_mat_eigvec_transform_sum
464 CALL timeset(routinen, handle)
466 IF (unit_nr > 0)
THEN
467 WRITE (unit_nr,
'(T2,A4,T7,A17,A22,ES6.0,A3)')
'BSE|',
'Diagonalizing C. ', &
468 'This will take around ', diag_est,
' s.'
475 ALLOCATE (exc_ens(homo*virtual))
479 IF (diag_info /= 0)
THEN
480 CALL cp_abort(__location__, &
481 "Diagonalization of C=(A-B)^0.5 (A+B) (A-B)^0.5 failed in BSE")
487 IF (exc_ens(1) < 0)
THEN
488 IF (unit_nr > 0)
THEN
489 CALL cp_abort(__location__, &
490 "Matrix C=(A-B)^0.5 (A+B) (A-B)^0.5 has negative eigenvalues, i.e. "// &
491 "(A+B) is not positive definite.")
494 exc_ens = sqrt(exc_ens)
505 CALL cp_fm_create(fm_mat_eigvec_transform_sum, fm_c%matrix_struct)
507 CALL parallel_gemm(transa=
"N", transb=
"N", m=homo*virtual, n=homo*virtual, k=homo*virtual, alpha=1.0_dp, &
508 matrix_a=fm_sqrt_a_minus_b, matrix_b=fm_eigvec_z, beta=0.0_dp, &
509 matrix_c=fm_mat_eigvec_transform_sum)
515 CALL cp_fm_create(fm_mat_eigvec_transform_diff, fm_c%matrix_struct)
517 CALL parallel_gemm(transa=
"N", transb=
"N", m=homo*virtual, n=homo*virtual, k=homo*virtual, alpha=1.0_dp, &
518 matrix_a=fm_inv_sqrt_a_minus_b, matrix_b=fm_eigvec_z, beta=0.0_dp, &
519 matrix_c=fm_mat_eigvec_transform_diff)
529 CALL cp_fm_to_fm(fm_mat_eigvec_transform_sum, fm_eigvec_x)
535 CALL cp_fm_to_fm(fm_mat_eigvec_transform_sum, fm_eigvec_y)
542 CALL postprocess_bse(exc_ens, fm_eigvec_x, mp2_env, qs_env, mo_coeff, &
543 homo, virtual, homo_irred, unit_nr, &
544 .false., fm_eigvec_y)
550 CALL timestop(handle)
567 unit_nr, diag_est, mp2_env, qs_env, mo_coeff)
570 INTEGER,
INTENT(IN) :: homo, virtual, homo_irred, unit_nr
571 REAL(kind=
dp),
INTENT(IN) :: diag_est
572 TYPE(
mp2_type),
INTENT(INOUT) :: mp2_env
574 TYPE(
cp_fm_type),
DIMENSION(:),
INTENT(IN) :: mo_coeff
576 CHARACTER(LEN=*),
PARAMETER :: routinen =
'diagonalize_A'
578 INTEGER :: diag_info, handle
579 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: exc_ens
582 CALL timeset(routinen, handle)
585 IF (unit_nr > 0)
THEN
586 WRITE (unit_nr,
'(T2,A4,T7,A17,A22,ES6.0,A3)')
'BSE|',
'Diagonalizing A. ', &
587 'This will take around ', diag_est,
' s.'
594 ALLOCATE (exc_ens(homo*virtual))
598 IF (diag_info /= 0)
THEN
599 CALL cp_abort(__location__, &
600 "Diagonalization of A failed in TDA-BSE")
603 CALL postprocess_bse(exc_ens, fm_eigvec, mp2_env, qs_env, mo_coeff, &
604 homo, virtual, homo_irred, unit_nr, .true.)
609 CALL timestop(handle)
627 SUBROUTINE postprocess_bse(Exc_ens, fm_eigvec_X, mp2_env, qs_env, mo_coeff, &
628 homo, virtual, homo_irred, unit_nr, &
629 flag_TDA, fm_eigvec_Y)
631 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: exc_ens
633 TYPE(
mp2_type),
INTENT(INOUT) :: mp2_env
635 TYPE(
cp_fm_type),
DIMENSION(:),
INTENT(IN) :: mo_coeff
636 INTEGER :: homo, virtual, homo_irred, unit_nr
637 LOGICAL,
OPTIONAL :: flag_tda
638 TYPE(
cp_fm_type),
INTENT(IN),
OPTIONAL :: fm_eigvec_y
640 CHARACTER(LEN=*),
PARAMETER :: routinen =
'postprocess_bse'
642 CHARACTER(LEN=10) :: info_approximation, multiplet
643 INTEGER :: handle, i_exc, idir, n_moments_di, &
645 REAL(kind=
dp) :: alpha
646 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: oscill_str, ref_point_multipole
647 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: polarizability_residues, trans_mom_bse
649 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:) :: fm_dipole_ab_trunc, fm_dipole_ai_trunc, &
650 fm_dipole_ij_trunc, fm_quadpole_ab_trunc, fm_quadpole_ai_trunc, fm_quadpole_ij_trunc
652 DIMENSION(:) :: exc_descr
654 CALL timeset(routinen, handle)
657 IF (mp2_env%bse%bse_spin_config == 0)
THEN
658 multiplet =
"Singlet"
661 multiplet =
"Triplet"
664 IF (.NOT.
PRESENT(flag_tda))
THEN
668 info_approximation =
" -TDA- "
670 info_approximation =
"-ABBA-"
677 ALLOCATE (fm_dipole_ij_trunc(n_moments_di))
678 ALLOCATE (fm_dipole_ab_trunc(n_moments_di))
679 ALLOCATE (fm_dipole_ai_trunc(n_moments_di))
680 ALLOCATE (ref_point_multipole(3))
682 CALL get_multipoles_mo(fm_dipole_ai_trunc, fm_dipole_ij_trunc, fm_dipole_ab_trunc, &
683 qs_env, mo_coeff, ref_point_multipole, 1, &
684 homo, virtual, fm_eigvec_x%matrix_struct%context)
686 IF (mp2_env%bse%num_print_exc_descr > 0)
THEN
688 ALLOCATE (fm_quadpole_ij_trunc(n_moments_quad))
689 ALLOCATE (fm_quadpole_ab_trunc(n_moments_quad))
690 ALLOCATE (fm_quadpole_ai_trunc(n_moments_quad))
691 CALL get_multipoles_mo(fm_quadpole_ai_trunc, fm_quadpole_ij_trunc, fm_quadpole_ab_trunc, &
692 qs_env, mo_coeff, ref_point_multipole, 2, &
693 homo, virtual, fm_eigvec_x%matrix_struct%context)
695 ALLOCATE (exc_descr(mp2_env%bse%num_print_exc_descr))
696 DO i_exc = 1, mp2_env%bse%num_print_exc_descr
698 .false., unit_nr, mp2_env)
699 IF (.NOT. flag_tda)
THEN
701 .false., unit_nr, mp2_env)
704 fm_quadpole_ij_trunc, fm_quadpole_ab_trunc, &
705 fm_quadpole_ai_trunc, &
706 i_exc, homo, virtual, &
710 fm_quadpole_ij_trunc, fm_quadpole_ab_trunc, &
711 fm_quadpole_ai_trunc, &
712 i_exc, homo, virtual)
715 IF (.NOT. flag_tda)
THEN
721 IF (mp2_env%bse%bse_spin_config == 0)
THEN
723 trans_mom_bse, oscill_str, polarizability_residues, &
724 mp2_env, homo, virtual, unit_nr, &
730 multiplet, alpha, mp2_env, unit_nr)
734 info_approximation, mp2_env, unit_nr)
738 info_approximation, mp2_env, unit_nr, fm_eigvec_y)
742 homo, virtual, homo_irred, flag_tda, &
743 info_approximation, mp2_env, unit_nr)
745 IF (mp2_env%bse%num_print_exc_descr > 0)
THEN
747 mp2_env%bse%num_print_exc_descr, mp2_env%bse%bse_debug_print, &
748 mp2_env%bse%print_directional_exc_descr, &
753 IF (mp2_env%bse%do_nto_analysis)
THEN
754 IF (unit_nr > 0)
THEN
755 WRITE (unit_nr,
'(T2,A4)')
'BSE|'
756 WRITE (unit_nr,
'(T2,A4,T7,A47)') &
757 'BSE|',
"Calculating Natural Transition Orbitals (NTOs)."
758 WRITE (unit_nr,
'(T2,A4)')
'BSE|'
761 mo_coeff, homo, virtual, &
762 info_approximation, &
764 qs_env, unit_nr, mp2_env)
767 DO idir = 1, n_moments_di
772 IF (mp2_env%bse%num_print_exc_descr > 0)
THEN
773 DO idir = 1, n_moments_quad
778 DEALLOCATE (fm_quadpole_ai_trunc, fm_quadpole_ij_trunc, fm_quadpole_ab_trunc)
779 DEALLOCATE (exc_descr)
781 DEALLOCATE (fm_dipole_ai_trunc, fm_dipole_ij_trunc, fm_dipole_ab_trunc)
782 DEALLOCATE (ref_point_multipole)
783 IF (mp2_env%bse%bse_spin_config == 0)
THEN
784 DEALLOCATE (oscill_str, trans_mom_bse, polarizability_residues)
786 IF (unit_nr > 0)
THEN
787 WRITE (unit_nr,
'(T2,A4)')
'BSE|'
788 WRITE (unit_nr,
'(T2,A4)')
'BSE|'
791 CALL timestop(handle)
793 END SUBROUTINE postprocess_bse
Routines for the full diagonalization of GW + Bethe-Salpeter for computing electronic excitations.
subroutine, public diagonalize_a(fm_a, homo, virtual, homo_irred, unit_nr, diag_est, mp2_env, qs_env, mo_coeff)
Solving hermitian eigenvalue equation A X^n = Ω^n X^n.
subroutine, public diagonalize_c(fm_c, homo, virtual, homo_irred, fm_sqrt_a_minus_b, fm_inv_sqrt_a_minus_b, unit_nr, diag_est, mp2_env, qs_env, mo_coeff)
Solving eigenvalue equation C Z^n = (Ω^n)^2 Z^n . Here, the eigenvectors Z^n relate to X^n via Eq....
subroutine, public create_a(fm_mat_s_ia_bse, fm_mat_s_bar_ij_bse, fm_mat_s_ab_bse, fm_a, eigenval, unit_nr, homo, virtual, dimen_ri, mp2_env, para_env)
Matrix A constructed from GW energies and 3c-B-matrices (cf. subroutine mult_B_with_W) A_ia,...
subroutine, public create_b(fm_mat_s_ia_bse, fm_mat_s_bar_ia_bse, fm_b, homo, virtual, dimen_ri, unit_nr, mp2_env)
Matrix B constructed from 3c-B-matrices (cf. subroutine mult_B_with_W) B_ia,jb = α * v_ia,...
subroutine, public create_hermitian_form_of_abba(fm_a, fm_b, fm_c, fm_sqrt_a_minus_b, fm_inv_sqrt_a_minus_b, homo, virtual, unit_nr, mp2_env, diag_est)
Construct Matrix C=(A-B)^0.5 (A+B) (A-B)^0.5 to solve full BSE matrix as a hermitian problem (cf....
Routines for printing information in context of the BSE calculation.
subroutine, public print_output_header(homo, virtual, homo_irred, flag_tda, multiplet, alpha, mp2_env, unit_nr)
...
subroutine, public print_optical_properties(exc_ens, oscill_str, trans_mom_bse, polarizability_residues, homo, virtual, homo_irred, flag_tda, info_approximation, mp2_env, unit_nr)
...
subroutine, public print_exciton_descriptors(exc_descr, ref_point_multipole, unit_nr, num_print_exc_descr, print_checkvalue, print_directional_exc_descr, prefix_output, qs_env)
Prints exciton descriptors, cf. Mewes et al., JCTC 14, 710-725 (2018)
subroutine, public print_transition_amplitudes(fm_eigvec_x, homo, virtual, homo_irred, info_approximation, mp2_env, unit_nr, fm_eigvec_y)
...
subroutine, public print_excitation_energies(exc_ens, homo, virtual, flag_tda, multiplet, info_approximation, mp2_env, unit_nr)
...
Routines for computing excitonic properties, e.g. exciton diameter, from the BSE.
subroutine, public get_oscillator_strengths(fm_eigvec_x, exc_ens, fm_dipole_ai_trunc, trans_mom_bse, oscill_str, polarizability_residues, mp2_env, homo_red, virtual_red, unit_nr, fm_eigvec_y)
Compute and return BSE dipoles d_r^n = sqrt(2) sum_ia < ψ_i | r | ψ_a > ( X_ia^n + Y_ia^n ) and oscil...
subroutine, public get_exciton_descriptors(exc_descr, fm_x_ia, fm_multipole_ij_trunc, fm_multipole_ab_trunc, fm_multipole_ai_trunc, i_exc, homo, virtual, fm_y_ia)
...
subroutine, public calculate_ntos(fm_x, fm_y, mo_coeff, homo, virtual, info_approximation, oscill_str, qs_env, unit_nr, mp2_env)
...
Auxiliary routines for GW + Bethe-Salpeter for computing electronic excitations.
subroutine, public get_multipoles_mo(fm_multipole_ai_trunc, fm_multipole_ij_trunc, fm_multipole_ab_trunc, qs_env, mo_coeff, rpoint, n_moments, homo_red, virtual_red, context_bse)
...
subroutine, public reshuffle_eigvec(fm_eigvec, fm_eigvec_reshuffled, homo, virtual, n_exc, do_transpose, unit_nr, mp2_env)
...
subroutine, public comp_eigvec_coeff_bse(fm_work, eig_vals, beta, gamma, do_transpose)
Routine for computing the coefficients of the eigenvectors of the BSE matrix from a multiplication wi...
subroutine, public fm_general_add_bse(fm_out, fm_in, beta, nrow_secidx_in, ncol_secidx_in, nrow_secidx_out, ncol_secidx_out, unit_nr, reordering, mp2_env)
Adds and reorders full matrices with a combined index structure, e.g. adding W_ij,...
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
basic linear algebra operations for full matrices
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....
used for collecting some of the diagonalization schemes available for cp_fm_type. cp_fm_power also mo...
subroutine, public cp_fm_power(matrix, work, exponent, threshold, n_dependent, verbose, eigvals)
...
subroutine, public choose_eigv_solver(matrix, eigenvectors, eigenvalues, info)
Choose the Eigensolver depending on which library is available ELPA seems to be unstable for small sy...
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
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_set_all(matrix, alpha, beta)
set all elements of a matrix to the same value, and optionally the diagonal to a different one
subroutine, public cp_fm_create(matrix, matrix_struct, name, use_sp)
creates a new full matrix with the given structure
Calculation of the incomplete Gamma function F_n(t) for multi-center integrals over Cartesian Gaussia...
Defines the basic variable types.
integer, parameter, public dp
Interface to the message passing library MPI.
Types needed for MP2 calculations.
basic linear algebra operations for full matrixes
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
keeps the information about the structure of a full matrix
stores all the informations relevant to an mpi environment