2024-01-29 17:20:57 +01:00
|
|
|
double precision function GW_RedSigC(p,w,eta,nBas,nC,nO,nV,nR,nS,e,Om,rho)
|
2020-02-12 12:25:24 +01:00
|
|
|
|
|
|
|
! Compute the derivative of the correlation part of the self-energy
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2023-07-18 15:07:07 +02:00
|
|
|
integer,intent(in) :: p
|
2020-02-12 12:25:24 +01:00
|
|
|
double precision,intent(in) :: w
|
|
|
|
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)
|
2023-07-27 16:43:15 +02:00
|
|
|
double precision,intent(in) :: Om(nS)
|
2020-02-12 12:25:24 +01:00
|
|
|
double precision,intent(in) :: rho(nBas,nBas,nS)
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
2023-07-27 17:43:18 +02:00
|
|
|
integer :: i,a,m
|
2023-07-30 22:01:44 +02:00
|
|
|
double precision :: num,eps
|
2020-02-12 12:25:24 +01:00
|
|
|
|
|
|
|
! Initialize
|
|
|
|
|
2024-01-29 17:20:57 +01:00
|
|
|
GW_RedSigC = 0d0
|
2020-02-12 12:25:24 +01:00
|
|
|
|
2023-07-27 17:43:18 +02:00
|
|
|
! Occupied part of the correlation self-energy
|
2020-02-12 12:25:24 +01:00
|
|
|
|
2023-07-27 17:43:18 +02:00
|
|
|
do i=nC+1,nO
|
2023-10-25 13:19:21 +02:00
|
|
|
do m=1,nS
|
|
|
|
eps = w - e(i) + Om(m)
|
|
|
|
num = 2d0*rho(p,i,m)**2
|
2024-01-29 17:20:57 +01:00
|
|
|
GW_RedSigC = GW_RedSigC - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
2023-10-25 13:19:21 +02:00
|
|
|
end do
|
|
|
|
end do
|
2020-02-12 12:25:24 +01:00
|
|
|
|
|
|
|
! Virtual part of the correlation self-energy
|
2023-07-27 17:43:18 +02:00
|
|
|
|
|
|
|
do a=nO+1,nBas-nR
|
2023-10-25 13:19:21 +02:00
|
|
|
do m=1,nS
|
|
|
|
eps = w - e(a) - Om(m)
|
|
|
|
num = 2d0*rho(p,a,m)**2
|
2024-01-29 17:20:57 +01:00
|
|
|
GW_RedSigC = GW_RedSigC - num*(eps**2 - eta**2)/(eps**2 + eta**2)**2
|
2023-10-25 13:19:21 +02:00
|
|
|
end do
|
|
|
|
end do
|
2020-02-12 12:25:24 +01:00
|
|
|
|
2023-07-27 16:43:15 +02:00
|
|
|
end function
|