2020-03-26 16:57:46 +01:00
|
|
|
subroutine CCD_correlation_energy(nC,nO,nV,nR,OOVV,t2,EcCCD)
|
|
|
|
|
|
|
|
! Compute the CCD energy
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
integer,intent(in) :: nC,nO,nV,nR
|
2020-10-19 14:20:35 +02:00
|
|
|
double precision,intent(in) :: OOVV(nO-nC,nO-nC,nV-nR,nV-nR)
|
|
|
|
double precision,intent(in) :: t2(nO-nC,nO-nC,nV-nR,nV-nR)
|
2020-03-26 16:57:46 +01:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
integer :: i,j,a,b
|
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
double precision,intent(out) :: EcCCD
|
|
|
|
|
|
|
|
EcCCD = 0d0
|
2020-10-19 14:20:35 +02:00
|
|
|
do i=1,nO-nC
|
|
|
|
do j=1,nO-nC
|
2020-03-26 16:57:46 +01:00
|
|
|
do a=1,nV-nR
|
|
|
|
do b=1,nV-nR
|
|
|
|
|
|
|
|
EcCCD = EcCCD + OOVV(i,j,a,b)*t2(i,j,a,b)
|
|
|
|
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
EcCCD = 0.25d0*EcCCD
|
|
|
|
|
|
|
|
end subroutine CCD_correlation_energy
|