2019-09-22 21:15:53 +02:00
|
|
|
subroutine self_energy_correlation(COHSEX,SOSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,rhox,EcGM,SigC)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Compute correlation part of the self-energy
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2019-09-22 21:15:53 +02:00
|
|
|
logical,intent(in) :: COHSEX
|
|
|
|
logical,intent(in) :: SOSEX
|
|
|
|
double precision,intent(in) :: eta
|
2019-03-19 10:13:33 +01:00
|
|
|
integer,intent(in) :: nBas,nC,nO,nV,nR,nS
|
2019-09-22 21:15:53 +02:00
|
|
|
double precision,intent(in) :: e(nBas)
|
|
|
|
double precision,intent(in) :: Omega(nS)
|
|
|
|
double precision,intent(in) :: rho(nBas,nBas,nS)
|
|
|
|
double precision,intent(in) :: rhox(nBas,nBas,nS)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
2019-07-15 14:19:45 +02:00
|
|
|
integer :: i,j,a,b,p,x,y,jb
|
2019-09-22 21:15:53 +02:00
|
|
|
double precision :: eps
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
double precision,intent(out) :: SigC(nBas,nBas)
|
|
|
|
double precision,intent(out) :: EcGM
|
|
|
|
|
|
|
|
! Initialize
|
|
|
|
|
|
|
|
SigC = 0d0
|
|
|
|
|
|
|
|
! COHSEX static approximation
|
|
|
|
|
|
|
|
if(COHSEX) then
|
|
|
|
|
2019-07-15 14:19:45 +02:00
|
|
|
! COHSEX: SEX of the COHSEX correlation self-energy
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
do x=nC+1,nBas-nR
|
|
|
|
do y=nC+1,nBas-nR
|
|
|
|
do i=nC+1,nO
|
|
|
|
jb = 0
|
|
|
|
do j=nC+1,nO
|
|
|
|
do b=nO+1,nBas-nR
|
|
|
|
jb = jb + 1
|
2019-07-15 14:19:45 +02:00
|
|
|
SigC(x,y) = SigC(x,y) + 4d0*rho(x,i,jb)*rho(y,i,jb)/Omega(jb)
|
2019-03-19 10:13:33 +01:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
2019-07-15 14:19:45 +02:00
|
|
|
! COHSEX: COH part of the COHSEX correlation self-energy
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
do x=nC+1,nBas-nR
|
|
|
|
do y=nC+1,nBas-nR
|
2019-07-15 14:19:45 +02:00
|
|
|
do p=nC+1,nBas-nR
|
2019-03-19 10:13:33 +01:00
|
|
|
jb = 0
|
|
|
|
do j=nC+1,nO
|
|
|
|
do b=nO+1,nBas-nR
|
|
|
|
jb = jb + 1
|
2019-07-15 14:19:45 +02:00
|
|
|
SigC(x,y) = SigC(x,y) - 2d0*rho(x,p,jb)*rho(y,p,jb)/Omega(jb)
|
2019-03-19 10:13:33 +01:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
2019-04-01 15:53:39 +02:00
|
|
|
EcGM = 0d0
|
2019-03-19 10:13:33 +01:00
|
|
|
do i=nC+1,nO
|
2019-05-04 17:13:50 +02:00
|
|
|
EcGM = EcGM + 0.5d0*SigC(i,i)
|
2019-03-19 10:13:33 +01:00
|
|
|
enddo
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
! Occupied part of the correlation self-energy
|
|
|
|
|
|
|
|
do x=nC+1,nBas-nR
|
|
|
|
do y=nC+1,nBas-nR
|
|
|
|
do i=nC+1,nO
|
|
|
|
jb = 0
|
|
|
|
do j=nC+1,nO
|
|
|
|
do b=nO+1,nBas-nR
|
|
|
|
jb = jb + 1
|
|
|
|
eps = e(x) - e(i) + Omega(jb)
|
|
|
|
SigC(x,y) = SigC(x,y) + 2d0*rho(x,i,jb)*rho(y,i,jb)*eps/(eps**2 + eta**2)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
! Virtual part of the correlation self-energy
|
|
|
|
|
|
|
|
do x=nC+1,nBas-nR
|
|
|
|
do y=nC+1,nBas-nR
|
|
|
|
do a=nO+1,nBas-nR
|
|
|
|
jb = 0
|
|
|
|
do j=nC+1,nO
|
|
|
|
do b=nO+1,nBas-nR
|
|
|
|
jb = jb + 1
|
|
|
|
eps = e(x) - e(a) - Omega(jb)
|
|
|
|
SigC(x,y) = SigC(x,y) + 2d0*rho(x,a,jb)*rho(y,a,jb)*eps/(eps**2 + eta**2)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
if(SOSEX) then
|
|
|
|
|
|
|
|
! SOSEX: occupied part of the correlation self-energy
|
|
|
|
|
|
|
|
do x=nC+1,nBas-nR
|
|
|
|
do y=nC+1,nBas-nR
|
|
|
|
do i=nC+1,nO
|
|
|
|
jb = 0
|
|
|
|
do j=nC+1,nO
|
|
|
|
do b=nO+1,nBas-nR
|
|
|
|
jb = jb + 1
|
2019-09-22 21:15:53 +02:00
|
|
|
eps = e(x) - e(i) + Omega(jb)
|
|
|
|
SigC(x,y) = SigC(x,y) - rho(x,i,jb)*rhox(y,i,jb)*eps/(eps**2 + eta**2)
|
2019-03-19 10:13:33 +01:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
! SOSEX: virtual part of the correlation self-energy
|
|
|
|
|
|
|
|
do x=nC+1,nBas-nR
|
|
|
|
do y=nC+1,nBas-nR
|
|
|
|
do a=nO+1,nBas-nR
|
|
|
|
jb = 0
|
|
|
|
do j=nC+1,nO
|
|
|
|
do b=nO+1,nBas-nR
|
|
|
|
jb = jb + 1
|
2019-09-22 21:15:53 +02:00
|
|
|
eps = e(x) - e(a) - Omega(jb)
|
|
|
|
SigC(x,y) = SigC(x,y) - rho(x,a,jb)*rhox(y,a,jb)*eps/(eps**2 + eta**2)
|
2019-03-19 10:13:33 +01:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
end subroutine self_energy_correlation
|