10
1
mirror of https://github.com/pfloos/quack synced 2024-12-25 13:53:41 +01:00
QuAcK/src/MBPT/excitation_density.f90

38 lines
760 B
Fortran
Raw Normal View History

2019-04-02 22:58:24 +02:00
subroutine 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
integer,intent(in) :: nBas,nC,nO,nR,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
2019-03-19 10:13:33 +01:00
2020-04-26 16:07:45 +02:00
do p=nC+1,nBas-nR
do q=nC+1,nBas-nR
2019-03-19 10:13:33 +01:00
do ia=1,nS
jb = 0
do j=nC+1,nO
do b=nO+1,nBas-nR
jb = jb + 1
2020-04-26 16:07:45 +02:00
rho(p,q,ia) = rho(p,q,ia) + ERI(p,j,q,b)*XpY(ia,jb)
2019-03-19 10:13:33 +01:00
enddo
enddo
enddo
enddo
enddo
end subroutine excitation_density