10
1
mirror of https://github.com/pfloos/quack synced 2024-12-26 14:23:38 +01:00
QuAcK/src/GT/GTpp_SigC.f90

74 lines
2.0 KiB
Fortran
Raw Normal View History

2023-07-27 19:17:20 +02:00
double precision function GTpp_SigC(p,w,eta,nBas,nC,nO,nV,nR,nOOs,nVVs,nOOt,nVVt,e,Om1s,rho1s,Om2s,rho2s, &
Om1t,rho1t,Om2t,rho2t)
2023-06-30 19:17:35 +02:00
! Compute diagonal of the correlation part of the self-energy
implicit none
include 'parameters.h'
! Input variables
integer,intent(in) :: p
double precision,intent(in) :: w
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
2023-06-30 19:17:35 +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)
2023-06-30 19:17:35 +02:00
! Local variables
integer :: i,a,cd,kl
double precision :: eps
! Initialize
2023-07-27 16:43:15 +02:00
GTpp_SigC = 0d0
2023-06-30 19:17:35 +02:00
!----------------------------------------------
! Occupied part of the T-matrix self-energy
!----------------------------------------------
2023-07-12 22:37:04 +02:00
2023-06-30 19:17:35 +02:00
do i=nC+1,nO
2023-07-27 19:17:20 +02:00
do cd=1,nVVs
eps = w + e(i) - Om1s(cd)
GTpp_SigC = GTpp_SigC + rho1s(p,i,cd)**2*eps/(eps**2 + eta**2)
2023-07-12 22:37:04 +02:00
enddo
2023-07-27 19:17:20 +02:00
do cd=1,nVVt
eps = w + e(i) - Om1t(cd)
GTpp_SigC = GTpp_SigC + rho1t(p,i,cd)**2*eps/(eps**2 + eta**2)
enddo
2023-06-30 19:17:35 +02:00
enddo
2023-07-12 22:37:04 +02:00
2023-06-30 19:17:35 +02:00
!----------------------------------------------
! Virtual part of the T-matrix self-energy
!----------------------------------------------
2023-07-12 22:37:04 +02:00
2023-06-30 19:17:35 +02:00
do a=nO+1,nBas-nR
2023-07-27 19:17:20 +02:00
do kl=1,nOOs
eps = w + e(a) - Om2s(kl)
GTpp_SigC = GTpp_SigC + rho2s(p,a,kl)**2*eps/(eps**2 + eta**2)
enddo
do kl=1,nOOt
eps = w + e(a) - Om2t(kl)
GTpp_SigC = GTpp_SigC + rho2t(p,a,kl)**2*eps/(eps**2 + eta**2)
2023-07-12 22:37:04 +02:00
enddo
2023-07-27 19:17:20 +02:00
2023-06-30 19:17:35 +02:00
enddo
2023-07-12 22:37:04 +02:00
end function