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

57 lines
1.3 KiB
Fortran
Raw Permalink Normal View History

2023-07-19 11:03:55 +02:00
subroutine GW_phBSE_static_kernel_A(eta,nBas,nC,nO,nV,nR,nS,lambda,ERI,Om,rho,KA)
2021-03-05 17:29:52 +01:00
2022-11-28 10:52:06 +01:00
! Compute the BSE static kernel for the resonant block
2021-03-05 17:29:52 +01:00
implicit none
include 'parameters.h'
! Input variables
2023-07-21 11:18:00 +02:00
integer,intent(in) :: nBas
integer,intent(in) :: nC
integer,intent(in) :: nO
integer,intent(in) :: nV
integer,intent(in) :: nR
integer,intent(in) :: nS
2021-03-05 17:29:52 +01:00
double precision,intent(in) :: eta
double precision,intent(in) :: lambda
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
2023-07-19 11:03:55 +02:00
double precision,intent(in) :: Om(nS)
2021-03-05 17:29:52 +01:00
double precision,intent(in) :: rho(nBas,nBas,nS)
! Local variables
double precision :: chi
double precision :: eps
integer :: i,j,a,b,ia,jb,kc
! Output variables
2023-07-19 11:03:55 +02:00
double precision,intent(out) :: KA(nS,nS)
2021-03-05 17:29:52 +01:00
2023-07-19 11:03:55 +02:00
! Compute static kernel
2021-03-05 17:29:52 +01:00
ia = 0
do i=nC+1,nO
do a=nO+1,nBas-nR
ia = ia + 1
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
chi = 0d0
do kc=1,nS
2023-07-19 11:03:55 +02:00
eps = Om(kc)**2 + eta**2
chi = chi + rho(i,j,kc)*rho(a,b,kc)*Om(kc)/eps
2023-12-03 18:47:30 +01:00
end do
2021-03-05 17:29:52 +01:00
2023-07-19 11:03:55 +02:00
KA(ia,jb) = 4d0*lambda*chi
2021-03-05 17:29:52 +01:00
2023-12-03 18:47:30 +01:00
end do
end do
end do
end do
2021-03-05 17:29:52 +01:00
2023-07-19 11:03:55 +02:00
end subroutine