2020-09-24 11:56:06 +02:00
|
|
|
subroutine Bethe_Salpeter_A_matrix_dynamic(eta,nBas,nC,nO,nV,nR,nS,lambda,eGW,OmRPA,rho_RPA,OmBSE,A_dyn)
|
2020-04-22 00:39:52 +02:00
|
|
|
|
|
|
|
! Compute the dynamic part of the Bethe-Salpeter equation matrices
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
integer,intent(in) :: nBas,nC,nO,nV,nR,nS
|
|
|
|
double precision,intent(in) :: eta
|
|
|
|
double precision,intent(in) :: lambda
|
2020-04-23 23:13:15 +02:00
|
|
|
double precision,intent(in) :: eGW(nBas)
|
2020-04-22 00:39:52 +02:00
|
|
|
double precision,intent(in) :: OmRPA(nS)
|
2020-09-24 11:56:06 +02:00
|
|
|
double precision,intent(in) :: rho_RPA(nBas,nBas,nS)
|
2020-04-22 09:55:58 +02:00
|
|
|
double precision,intent(in) :: OmBSE
|
2020-04-22 00:39:52 +02:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
2020-04-23 23:13:15 +02:00
|
|
|
integer :: maxS
|
2020-04-22 00:39:52 +02:00
|
|
|
double precision :: chi
|
|
|
|
double precision :: eps
|
|
|
|
integer :: i,j,a,b,ia,jb,kc
|
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
2020-04-23 23:13:15 +02:00
|
|
|
double precision,intent(out) :: A_dyn(nS,nS)
|
2020-04-22 00:39:52 +02:00
|
|
|
|
2020-04-23 23:13:15 +02:00
|
|
|
! Initialization
|
|
|
|
|
|
|
|
A_dyn(:,:) = 0d0
|
|
|
|
|
|
|
|
! Number of poles taken into account
|
|
|
|
|
|
|
|
maxS = nS
|
|
|
|
|
|
|
|
! Build dynamic A matrix
|
2020-04-22 00:39:52 +02:00
|
|
|
|
|
|
|
ia = 0
|
|
|
|
do i=nC+1,nO
|
|
|
|
do a=nO+1,nBas-nR
|
|
|
|
ia = ia + 1
|
|
|
|
jb = 0
|
|
|
|
do j=nC+1,nO
|
|
|
|
do b=nO+1,nBas-nR
|
|
|
|
jb = jb + 1
|
|
|
|
|
|
|
|
chi = 0d0
|
2020-04-23 23:13:15 +02:00
|
|
|
do kc=1,maxS
|
2020-04-22 00:39:52 +02:00
|
|
|
|
2020-09-24 11:56:06 +02:00
|
|
|
chi = chi + rho_RPA(i,j,kc)*rho_RPA(a,b,kc)*OmRPA(kc)/(OmRPA(kc)**2 + eta**2)
|
2020-04-22 00:39:52 +02:00
|
|
|
|
|
|
|
enddo
|
|
|
|
|
2020-04-23 23:13:15 +02:00
|
|
|
A_dyn(ia,jb) = A_dyn(ia,jb) - 4d0*lambda*chi
|
2020-04-22 00:39:52 +02:00
|
|
|
|
|
|
|
chi = 0d0
|
2020-04-23 23:13:15 +02:00
|
|
|
do kc=1,maxS
|
2020-04-22 00:39:52 +02:00
|
|
|
|
2020-06-17 22:10:08 +02:00
|
|
|
eps = + OmBSE - OmRPA(kc) - (eGW(a) - eGW(j))
|
2020-09-24 11:56:06 +02:00
|
|
|
chi = chi + rho_RPA(i,j,kc)*rho_RPA(a,b,kc)*eps/(eps**2 + eta**2)
|
2020-04-22 00:39:52 +02:00
|
|
|
|
2020-06-17 22:10:08 +02:00
|
|
|
eps = + OmBSE - OmRPA(kc) - (eGW(b) - eGW(i))
|
2020-09-24 11:56:06 +02:00
|
|
|
chi = chi + rho_RPA(i,j,kc)*rho_RPA(a,b,kc)*eps/(eps**2 + eta**2)
|
2020-04-22 00:39:52 +02:00
|
|
|
|
|
|
|
enddo
|
|
|
|
|
2020-04-23 23:13:15 +02:00
|
|
|
A_dyn(ia,jb) = A_dyn(ia,jb) - 2d0*lambda*chi
|
2020-04-22 00:39:52 +02:00
|
|
|
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
end subroutine Bethe_Salpeter_A_matrix_dynamic
|