4
1
mirror of https://github.com/pfloos/quack synced 2024-06-27 23:52:19 +02:00
quack/src/MBPT/excitation_density_SOSEX.f90

36 lines
727 B
Fortran
Raw Normal View History

2019-04-02 09:59:30 +02:00
subroutine excitation_density_SOSEX(nBas,nC,nO,nR,nS,G,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-02 09:59:30 +02:00
double precision,intent(in) :: G(nBas,nBas,nBas,nBas),XpY(nS,nS)
2019-03-19 10:13:33 +01:00
! Local variables
2019-04-02 09:59:30 +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)
rho(:,:,:) = 0d0
2019-04-02 09:59:30 +02:00
do ia=1,nS
do x=nC+1,nBas-nR
do y=nC+1,nBas-nR
2019-03-19 10:13:33 +01:00
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) + G(x,y,b,j)*XpY(ia,jb)
2019-03-19 10:13:33 +01:00
enddo
enddo
enddo
enddo
enddo
end subroutine excitation_density_SOSEX