2020-09-24 11:56:06 +02:00
|
|
|
subroutine self_energy_correlation(COHSEX,eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,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
|
|
|
|
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)
|
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
|
|
|
|
|
2020-09-24 11:56:06 +02:00
|
|
|
!-----------------------------!
|
|
|
|
! COHSEX static approximation !
|
|
|
|
!-----------------------------!
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
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
|
2020-09-21 23:04:26 +02:00
|
|
|
do jb=1,nS
|
|
|
|
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
|
|
|
|
|
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
|
2020-09-21 23:04:26 +02:00
|
|
|
do jb=1,nS
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
2020-09-24 11:56:06 +02:00
|
|
|
!----------------!
|
|
|
|
! GW self-energy !
|
|
|
|
!----------------!
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
! Occupied part of the correlation self-energy
|
|
|
|
|
|
|
|
do x=nC+1,nBas-nR
|
|
|
|
do y=nC+1,nBas-nR
|
|
|
|
do i=nC+1,nO
|
2020-09-21 23:04:26 +02:00
|
|
|
do jb=1,nS
|
|
|
|
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)
|
2019-03-19 10:13:33 +01:00
|
|
|
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
|
2020-09-21 23:04:26 +02:00
|
|
|
do jb=1,nS
|
|
|
|
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)
|
2019-03-19 10:13:33 +01:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
end subroutine self_energy_correlation
|