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

48 lines
1.1 KiB
Fortran
Raw Normal View History

2023-07-04 10:51:03 +02:00
subroutine GW_excitation_density(nBas,nC,nO,nR,nS,ERI,XpY,rho)
2019-03-19 10:13:33 +01:00
! Compute excitation densities
implicit none
! 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) :: nR
integer,intent(in) :: nS
2019-04-01 16:32:55 +02:00
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
double precision,intent(in) :: XpY(nS,nS)
2019-03-19 10:13:33 +01:00
! Local variables
2020-04-26 16:07:45 +02:00
integer :: ia,jb,p,q,j,b
2019-03-19 10:13:33 +01:00
! Output variables
double precision,intent(out) :: rho(nBas,nBas,nS)
2019-04-01 16:32:55 +02:00
rho(:,:,:) = 0d0
2023-03-14 14:12:19 +01:00
!$OMP PARALLEL &
!$OMP SHARED(nC,nBas,nR,nO,nS,rho,ERI,XpY) &
!$OMP PRIVATE(q,p,jb,ia) &
!$OMP DEFAULT(NONE)
!$OMP DO
do q=nC+1,nBas-nR
do p=nC+1,nBas-nR
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
do ia=1,nS
rho(p,q,ia) = rho(p,q,ia) + ERI(p,j,q,b)*XpY(ia,jb)
2023-12-03 18:47:30 +01:00
end do
end do
end do
end do
end do
2023-03-14 14:12:19 +01:00
!$OMP END DO
!$OMP END PARALLEL
2019-03-19 10:13:33 +01:00
2023-07-04 10:51:03 +02:00
end subroutine