4
1
mirror of https://github.com/pfloos/quack synced 2024-06-02 11:25:28 +02:00
quack/src/GF/GF2_dSigC.f90

53 lines
1.2 KiB
Fortran
Raw Permalink Normal View History

2023-09-07 15:37:19 +02:00
double precision function GF2_dSigC(p,w,eta,nBas,nC,nO,nV,nR,eHF,ERI)
2023-06-30 19:17:35 +02:00
! Compute diagonal of the correlation part of the self-energy
implicit none
include 'parameters.h'
! Input variables
integer,intent(in) :: p
double precision,intent(in) :: w
double precision,intent(in) :: eta
2023-09-07 15:37:19 +02:00
integer,intent(in) :: nBas,nC,nO,nV,nR
2023-06-30 19:17:35 +02:00
double precision,intent(in) :: eHF(nBas)
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
! Local variables
integer :: i,j,a,b
double precision :: eps
2023-07-03 14:41:46 +02:00
! Initialize
2023-06-30 19:17:35 +02:00
2023-07-27 17:43:18 +02:00
GF2_dSigC = 0d0
2023-06-30 19:17:35 +02:00
! Occupied part of the correlation self-energy
2023-07-12 22:37:04 +02:00
2023-06-30 19:17:35 +02:00
do i=nC+1,nO
2023-07-12 22:37:04 +02:00
do j=nC+1,nO
do a=nO+1,nBas-nR
2023-06-30 19:17:35 +02:00
2023-07-12 22:37:04 +02:00
eps = w + eHF(a) - eHF(i) - eHF(j)
2023-07-27 17:43:18 +02:00
GF2_dSigC = GF2_dSigC - (2d0*ERI(p,a,i,j) - ERI(p,a,j,i))*ERI(p,a,i,j)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
2023-06-30 19:17:35 +02:00
2023-07-12 22:37:04 +02:00
end do
end do
2023-06-30 19:17:35 +02:00
end do
2023-07-12 22:37:04 +02:00
2023-06-30 19:17:35 +02:00
! Virtual part of the correlation self-energy
2023-07-12 22:37:04 +02:00
2023-06-30 19:17:35 +02:00
do i=nC+1,nO
2023-07-12 22:37:04 +02:00
do a=nO+1,nBas-nR
do b=nO+1,nBas-nR
2023-06-30 19:17:35 +02:00
2023-07-12 22:37:04 +02:00
eps = w + eHF(i) - eHF(a) - eHF(b)
2023-07-27 17:43:18 +02:00
GF2_dSigC = GF2_dSigC - (2d0*ERI(p,i,a,b) - ERI(p,i,b,a))*ERI(p,i,a,b)*(eps**2 - eta**2)/(eps**2 + eta**2)**2
2023-06-30 19:17:35 +02:00
end do
end do
2023-07-12 22:37:04 +02:00
end do
2023-06-30 19:17:35 +02:00
2023-07-12 22:37:04 +02:00
end function