4
1
mirror of https://github.com/pfloos/quack synced 2024-06-26 15:12:17 +02:00
quack/src/GT/self_energy_Tmatrix.f90

64 lines
1.8 KiB
Fortran
Raw Normal View History

2021-10-16 18:51:53 +02:00
subroutine self_energy_Tmatrix(eta,nBas,nC,nO,nV,nR,nOO,nVV,e,Omega1,rho1,Omega2,rho2,SigT)
2019-10-06 22:35:36 +02:00
! Compute 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
integer,intent(in) :: nOO
integer,intent(in) :: nVV
double precision,intent(in) :: e(nBas)
double precision,intent(in) :: Omega1(nVV)
2021-10-16 18:51:53 +02:00
double precision,intent(in) :: rho1(nBas,nBas,nVV)
2019-10-06 22:35:36 +02:00
double precision,intent(in) :: Omega2(nOO)
2021-10-16 18:51:53 +02:00
double precision,intent(in) :: rho2(nBas,nBas,nOO)
2019-10-06 22:35:36 +02:00
! Local variables
integer :: i,j,k,l,a,b,c,d,p,q,cd,kl
double precision :: eps
! Output variables
2021-10-17 23:04:22 +02:00
double precision,intent(inout) :: SigT(nBas,nBas)
2019-10-06 22:35:36 +02:00
2021-10-16 18:51:53 +02:00
!----------------------------------------------
! Occupied part of the T-matrix self-energy
!----------------------------------------------
2019-10-06 22:35:36 +02:00
do p=nC+1,nBas-nR
do q=nC+1,nBas-nR
do i=nC+1,nO
2021-10-16 18:51:53 +02:00
do cd=1,nVV
2021-10-17 23:04:22 +02:00
eps = e(p) + e(i) - Omega1(cd)
SigT(p,q) = SigT(p,q) + rho1(p,i,cd)*rho1(q,i,cd)*eps/(eps**2 + eta**2)
2019-10-06 22:35:36 +02:00
enddo
enddo
enddo
enddo
2021-10-16 18:51:53 +02:00
!----------------------------------------------
2019-10-06 22:35:36 +02:00
! Virtual part of the T-matrix self-energy
2021-10-16 18:51:53 +02:00
!----------------------------------------------
2019-10-06 22:35:36 +02:00
do p=nC+1,nBas-nR
do q=nC+1,nBas-nR
2021-10-17 23:04:22 +02:00
do a=nO+1,nBas-nR
2021-10-16 18:51:53 +02:00
do kl=1,nOO
2021-10-17 23:04:22 +02:00
eps = e(p) + e(a) - Omega2(kl)
SigT(p,q) = SigT(p,q) + rho2(p,a,kl)*rho2(q,a,kl)*eps/(eps**2 + eta**2)
2019-10-06 22:35:36 +02:00
enddo
enddo
enddo
enddo
end subroutine self_energy_Tmatrix