2024-09-03 16:44:57 +02:00
|
|
|
subroutine RGTpp_self_energy_diag(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,nOOt,nVVt,e,Om1s,rho1s,Om2s,rho2s,Om1t,rho1t,Om2t,rho2t, &
|
2023-07-27 19:17:20 +02:00
|
|
|
EcGM,Sig,Z)
|
2019-10-06 22:35:36 +02:00
|
|
|
|
|
|
|
! Compute diagonal of the correlation part of the T-matrix self-energy
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
double precision,intent(in) :: eta
|
|
|
|
integer,intent(in) :: nBas
|
|
|
|
integer,intent(in) :: nC
|
|
|
|
integer,intent(in) :: nO
|
|
|
|
integer,intent(in) :: nV
|
|
|
|
integer,intent(in) :: nR
|
2023-07-27 19:17:20 +02:00
|
|
|
integer,intent(in) :: nOOs,nOOt
|
|
|
|
integer,intent(in) :: nVVs,nVVt
|
2019-10-06 22:35:36 +02:00
|
|
|
double precision,intent(in) :: e(nBas)
|
2023-07-27 19:17:20 +02:00
|
|
|
double precision,intent(in) :: Om1s(nVVs),Om1t(nVVt)
|
|
|
|
double precision,intent(in) :: rho1s(nBas,nBas,nVVs),rho1t(nBas,nBas,nVVt)
|
|
|
|
double precision,intent(in) :: Om2s(nOOs),Om2t(nOOt)
|
|
|
|
double precision,intent(in) :: rho2s(nBas,nBas,nOOs),rho2t(nBas,nBas,nOOt)
|
2019-10-06 22:35:36 +02:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
2022-01-06 13:48:15 +01:00
|
|
|
integer :: i,j,a,b,p,cd,kl
|
2023-07-12 14:13:45 +02:00
|
|
|
double precision :: num,eps
|
2019-10-06 22:35:36 +02:00
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
2022-01-06 13:48:15 +01:00
|
|
|
double precision,intent(inout) :: EcGM
|
2023-07-12 14:13:45 +02:00
|
|
|
double precision,intent(inout) :: Sig(nBas)
|
|
|
|
double precision,intent(inout) :: Z(nBas)
|
2019-10-06 22:35:36 +02:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
! Initialization
|
|
|
|
|
|
|
|
Sig(:) = 0d0
|
|
|
|
Z(:) = 0d0
|
|
|
|
EcGM = 0d0
|
|
|
|
|
|
|
|
!--------------------------------------!
|
|
|
|
! Occupied part of the Tpp self-energy !
|
|
|
|
!--------------------------------------!
|
2019-10-06 22:35:36 +02:00
|
|
|
|
|
|
|
do p=nC+1,nBas-nR
|
|
|
|
do i=nC+1,nO
|
2023-07-12 14:13:45 +02:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
do cd=1,nVVs
|
|
|
|
eps = e(p) + e(i) - Om1s(cd)
|
|
|
|
num = rho1s(p,i,cd)**2
|
2023-07-12 14:13:45 +02:00
|
|
|
Sig(p) = Sig(p) + num*eps/(eps**2 + eta**2)
|
|
|
|
Z(p) = Z(p) - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
2023-07-12 14:13:45 +02:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
do cd=1,nVVt
|
|
|
|
eps = e(p) + e(i) - Om1t(cd)
|
|
|
|
num = rho1t(p,i,cd)**2
|
|
|
|
Sig(p) = Sig(p) + num*eps/(eps**2 + eta**2)
|
|
|
|
Z(p) = Z(p) - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
2023-07-31 14:47:09 +02:00
|
|
|
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
|
|
|
end do
|
2019-10-06 22:35:36 +02:00
|
|
|
|
2021-10-16 18:51:53 +02:00
|
|
|
!----------------------------------------------
|
|
|
|
! Virtual part of the T-matrix self-energy
|
|
|
|
!----------------------------------------------
|
2019-10-06 22:35:36 +02:00
|
|
|
|
|
|
|
do p=nC+1,nBas-nR
|
2021-10-17 23:04:22 +02:00
|
|
|
do a=nO+1,nBas-nR
|
2023-07-12 14:13:45 +02:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
do kl=1,nOOs
|
|
|
|
eps = e(p) + e(a) - Om2s(kl)
|
|
|
|
num = rho2s(p,a,kl)**2
|
2023-07-12 14:13:45 +02:00
|
|
|
Sig(p) = Sig(p) + num*eps/(eps**2 + eta**2)
|
|
|
|
Z(p) = Z(p) - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
2023-07-12 14:13:45 +02:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
do kl=1,nOOt
|
|
|
|
eps = e(p) + e(a) - Om2t(kl)
|
|
|
|
num = rho2t(p,a,kl)**2
|
|
|
|
Sig(p) = Sig(p) + num*eps/(eps**2 + eta**2)
|
|
|
|
Z(p) = Z(p) - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
2023-07-27 19:17:20 +02:00
|
|
|
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
|
|
|
end do
|
2019-10-06 22:35:36 +02:00
|
|
|
|
2022-01-06 13:48:15 +01:00
|
|
|
!----------------------------------------------
|
|
|
|
! Galitskii-Migdal correlation energy
|
|
|
|
!----------------------------------------------
|
|
|
|
|
|
|
|
do i=nC+1,nO
|
|
|
|
do j=nC+1,nO
|
2023-07-12 14:13:45 +02:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
do cd=1,nVVs
|
|
|
|
eps = e(i) + e(j) - Om1s(cd)
|
|
|
|
num = rho1s(i,j,cd)**2
|
2023-07-12 14:13:45 +02:00
|
|
|
EcGM = EcGM + num*eps/(eps**2 + eta**2)
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
2023-07-12 14:13:45 +02:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
do cd=1,nVVt
|
|
|
|
eps = e(i) + e(j) - Om1t(cd)
|
|
|
|
num = rho1t(i,j,cd)**2
|
|
|
|
EcGM = EcGM + num*eps/(eps**2 + eta**2)
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
2023-07-27 19:17:20 +02:00
|
|
|
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
|
|
|
end do
|
2022-01-06 13:48:15 +01:00
|
|
|
|
|
|
|
do a=nO+1,nBas-nR
|
|
|
|
do b=nO+1,nBas-nR
|
2023-07-12 14:13:45 +02:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
do kl=1,nOOs
|
|
|
|
eps = e(a) + e(b) - Om2s(kl)
|
|
|
|
num = rho2s(a,b,kl)**2
|
2023-07-12 14:13:45 +02:00
|
|
|
EcGM = EcGM - num*eps/(eps**2 + eta**2)
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
2023-07-12 14:13:45 +02:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
do kl=1,nOOt
|
|
|
|
eps = e(a) + e(b) - Om2t(kl)
|
|
|
|
num = rho2t(a,b,kl)**2
|
|
|
|
EcGM = EcGM - num*eps/(eps**2 + eta**2)
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
2023-07-27 19:17:20 +02:00
|
|
|
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
|
|
|
end do
|
2022-01-06 13:48:15 +01:00
|
|
|
|
2023-07-27 19:17:20 +02:00
|
|
|
Z(:) = 1d0/(1d0 - Z(:))
|
|
|
|
|
2023-07-04 10:32:47 +02:00
|
|
|
end subroutine
|