4
1
mirror of https://github.com/pfloos/quack synced 2024-06-27 07:32:17 +02:00
quack/src/QuAcK/self_energy_Tmatrix_diag.f90

94 lines
2.6 KiB
Fortran
Raw Normal View History

2019-10-20 08:18:58 +02:00
subroutine self_energy_Tmatrix_diag(eta,nBas,nC,nO,nV,nR,nOOs,nVVs,nOOt,nVVt,e, &
Omega1s,rho1s,Omega2s,rho2s,Omega1t,rho1t,Omega2t,rho2t, &
2020-04-06 19:40:42 +02:00
rho1st,rho2st,SigT)
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
2019-10-20 08:18:58 +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)
2019-10-20 08:18:58 +02:00
double precision,intent(in) :: Omega1s(nVVs),Omega1t(nVVt)
2020-04-06 19:40:42 +02:00
double precision,intent(in) :: rho1s(nBas,nO,nVVs),rho1t(nBas,nO,nVVt),rho1st(nBas,nO,nVVt)
2019-10-20 08:18:58 +02:00
double precision,intent(in) :: Omega2s(nOOs),Omega2t(nOOt)
2020-04-06 19:40:42 +02:00
double precision,intent(in) :: rho2s(nBas,nV,nOOs),rho2t(nBas,nV,nOOt),rho2st(nBas,nV,nOOt)
2019-10-06 22:35:36 +02:00
! Local variables
integer :: i,j,k,l,a,b,c,d,p,cd,kl
double precision :: eps
! Output variables
double precision,intent(out) :: SigT(nBas)
2020-04-06 19:40:42 +02:00
! Initialization
SigT(:) = 0d0
2019-10-20 08:18:58 +02:00
!----------------------------------------------
! Singlet part of the T-matrix self-energy
!----------------------------------------------
! Occupied part of the T-matrix self-energy
2019-10-06 22:35:36 +02:00
do p=nC+1,nBas-nR
do i=nC+1,nO
2020-03-14 23:00:44 +01:00
do cd=1,nVVs
2020-03-25 09:48:58 +01:00
eps = e(p) + e(i) - Omega1s(cd)
2020-03-21 16:31:39 +01:00
SigT(p) = SigT(p) + rho1s(p,i,cd)**2/eps
2019-10-06 22:35:36 +02:00
enddo
enddo
enddo
! Virtual part of the T-matrix self-energy
do p=nC+1,nBas-nR
2020-03-14 23:00:44 +01:00
do a=1,nV-nR
do kl=1,nOOs
2020-03-25 09:48:58 +01:00
eps = e(p) + e(nO+a) - Omega2s(kl)
2020-03-21 16:31:39 +01:00
SigT(p) = SigT(p) + rho2s(p,a,kl)**2/eps
2019-10-20 08:18:58 +02:00
enddo
enddo
enddo
!----------------------------------------------
! Triplet part of the T-matrix self-energy
!----------------------------------------------
! Occupied part of the T-matrix self-energy
do p=nC+1,nBas-nR
do i=nC+1,nO
2020-03-14 23:00:44 +01:00
do cd=1,nVVt
2020-03-25 09:48:58 +01:00
eps = e(p) + e(i) - Omega1t(cd)
SigT(p) = SigT(p) + rho1t(p,i,cd)**2/eps
2020-04-06 19:40:42 +02:00
SigT(p) = SigT(p) + rho1st(p,i,cd)**2/eps
2019-10-20 08:18:58 +02:00
enddo
enddo
enddo
2020-03-14 23:00:44 +01:00
! Virtual part of the T-matrix self-energy
2019-10-20 08:18:58 +02:00
do p=nC+1,nBas-nR
2020-03-14 23:00:44 +01:00
do a=1,nV-nR
do kl=1,nOOt
2020-03-25 09:48:58 +01:00
eps = e(p) + e(nO+a) - Omega2t(kl)
SigT(p) = SigT(p) + rho2t(p,a,kl)**2/eps
2020-04-06 19:40:42 +02:00
SigT(p) = SigT(p) + rho2st(p,a,kl)**2/eps
2019-10-06 22:35:36 +02:00
enddo
enddo
enddo
end subroutine self_energy_Tmatrix_diag