2019-04-01 16:32:55 +02:00
|
|
|
subroutine excitation_density(nBas,nC,nO,nR,nS,c,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) :: c(nBas,nBas)
|
|
|
|
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
|
|
|
|
|
2019-04-01 16:32:55 +02:00
|
|
|
integer :: ia,jb,x,y,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
|
|
|
|
2019-04-01 16:32:55 +02:00
|
|
|
do x=nC+1,nBas-nR
|
|
|
|
do y=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
|
2019-04-02 09:59:30 +02:00
|
|
|
rho(x,y,ia) = rho(x,y,ia) + ERI(x,j,y,b)*XpY(ia,jb)
|
2019-03-19 10:13:33 +01:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
end subroutine excitation_density
|