2023-07-18 14:59:18 +02:00
|
|
|
subroutine regularized_self_energy_correlation_diag(eta,nBas,nC,nO,nV,nR,nS,e,Omega,rho,EcGM,SigC)
|
2021-12-16 14:47:13 +01:00
|
|
|
|
|
|
|
! Compute diagonal of the correlation part of the regularized 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) :: nS
|
|
|
|
double precision,intent(in) :: e(nBas)
|
|
|
|
double precision,intent(in) :: Omega(nS)
|
|
|
|
double precision,intent(in) :: rho(nBas,nBas,nS)
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
integer :: i,a,p,q,jb
|
2023-06-30 16:47:26 +02:00
|
|
|
double precision :: Dpijb,Dpajb
|
2021-12-16 14:47:13 +01:00
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
double precision,intent(out) :: SigC(nBas)
|
|
|
|
double precision,intent(out) :: EcGM
|
|
|
|
|
|
|
|
! Initialize
|
|
|
|
|
|
|
|
SigC(:) = 0d0
|
|
|
|
|
|
|
|
!-----------------------------
|
2023-07-18 14:59:18 +02:00
|
|
|
! GW self-energy
|
2021-12-16 14:47:13 +01:00
|
|
|
!-----------------------------
|
|
|
|
|
2023-07-18 14:59:18 +02:00
|
|
|
! Occupied part of the correlation self-energy
|
2021-12-16 14:47:13 +01:00
|
|
|
|
2023-07-18 14:59:18 +02:00
|
|
|
do p=nC+1,nBas-nR
|
2021-12-16 14:47:13 +01:00
|
|
|
do i=nC+1,nO
|
2023-07-18 14:59:18 +02:00
|
|
|
do jb=1,nS
|
|
|
|
Dpijb = e(p) - e(i) + Omega(jb)
|
|
|
|
SigC(p) = SigC(p) + 2d0*rho(p,i,jb)**2*(1d0 - exp(-2d0*eta*Dpijb*Dpijb))/Dpijb
|
|
|
|
end do
|
2021-12-16 14:47:13 +01:00
|
|
|
end do
|
2023-07-18 14:59:18 +02:00
|
|
|
end do
|
2021-12-16 14:47:13 +01:00
|
|
|
|
2023-07-18 14:59:18 +02:00
|
|
|
! Virtual part of the correlation self-energy
|
2021-12-16 14:47:13 +01:00
|
|
|
|
2023-07-18 14:59:18 +02:00
|
|
|
do p=nC+1,nBas-nR
|
|
|
|
do a=nO+1,nBas-nR
|
|
|
|
do jb=1,nS
|
|
|
|
Dpajb = e(p) - e(a) - Omega(jb)
|
|
|
|
SigC(p) = SigC(p) + 2d0*rho(p,a,jb)**2*(1d0 - exp(-2d0*eta*Dpajb*Dpajb))/Dpajb
|
2021-12-16 14:47:13 +01:00
|
|
|
end do
|
|
|
|
end do
|
2023-07-18 14:59:18 +02:00
|
|
|
end do
|
2021-12-16 14:47:13 +01:00
|
|
|
|
2023-07-18 14:59:18 +02:00
|
|
|
! Galitskii-Migdal correlation energy
|
2021-12-16 14:47:13 +01:00
|
|
|
|
2023-07-18 14:59:18 +02:00
|
|
|
EcGM = 0d0
|
|
|
|
do i=nC+1,nO
|
|
|
|
do a=nO+1,nBas-nR
|
|
|
|
do jb=1,nS
|
|
|
|
EcGM = EcGM - 4d0*rho(a,i,jb)**2
|
2021-12-16 14:47:13 +01:00
|
|
|
end do
|
|
|
|
end do
|
2023-07-18 14:59:18 +02:00
|
|
|
end do
|
2021-12-16 14:47:13 +01:00
|
|
|
|
2023-07-18 14:59:18 +02:00
|
|
|
end subroutine
|