2021-10-22 21:10:31 +02:00
|
|
|
subroutine excitation_density_SOSEX(nBas,nC,nO,nR,nS,ERI,XpY,rho)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2021-10-22 21:10:31 +02:00
|
|
|
! Compute excitation densities for SOSEX
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
implicit none
|
2021-10-22 21:10:31 +02:00
|
|
|
include 'parameters.h'
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2021-10-22 21:10:31 +02:00
|
|
|
integer,intent(in) :: nBas
|
|
|
|
integer,intent(in) :: nC
|
|
|
|
integer,intent(in) :: nO
|
|
|
|
integer,intent(in) :: nR
|
|
|
|
integer,intent(in) :: nS
|
|
|
|
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
|
|
|
double precision,intent(in) :: XpY(nS,nS,nspin)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
2021-10-22 21:10:31 +02:00
|
|
|
integer :: ispin
|
|
|
|
integer :: p,q
|
|
|
|
integer :: i,a,j,b
|
|
|
|
integer :: ia,jb
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
2021-10-22 21:10:31 +02:00
|
|
|
double precision,intent(out) :: rho(nBas,nBas,nS,nspin)
|
|
|
|
|
|
|
|
rho(:,:,:,:) = 0d0
|
|
|
|
|
|
|
|
! Singlet part
|
|
|
|
|
|
|
|
ispin = 1
|
|
|
|
|
|
|
|
do ia=1,nS
|
|
|
|
do p=nC+1,nBas-nR
|
|
|
|
do q=nC+1,nBas-nR
|
|
|
|
jb = 0
|
|
|
|
do j=nC+1,nO
|
|
|
|
do b=nO+1,nBas-nR
|
|
|
|
jb = jb + 1
|
|
|
|
rho(p,q,ia,ispin) = rho(p,q,ia,ispin) + ERI(p,j,q,b)*XpY(ia,jb,ispin)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
! Triplet part
|
|
|
|
|
|
|
|
ispin = 2
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2019-04-02 09:59:30 +02:00
|
|
|
do ia=1,nS
|
2021-10-22 21:10:31 +02:00
|
|
|
do p=nC+1,nBas-nR
|
|
|
|
do q=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
|
2021-10-22 21:10:31 +02:00
|
|
|
rho(p,q,ia,ispin) = rho(p,q,ia,ispin) + (ERI(p,j,q,b) - ERI(p,j,b,q))*XpY(ia,jb,ispin)
|
2019-03-19 10:13:33 +01:00
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
end subroutine excitation_density_SOSEX
|