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

37 lines
661 B
Fortran
Raw Normal View History

2020-03-26 16:57:46 +01:00
subroutine CCSD_correlation_energy(nC,nO,nV,nR,OOVV,tau,EcCCSD)
! Compute the CCSD energy
implicit none
! Input variables
integer,intent(in) :: nC,nO,nV,nR
double precision,intent(in) :: OOVV(nO,nO,nV,nV)
double precision,intent(in) :: tau(nO,nO,nV,nV)
! Local variables
integer :: i,j,a,b
! Output variables
double precision,intent(out) :: EcCCSD
EcCCSD = 0d0
do i=nC+1,nO
do j=nC+1,nO
do a=1,nV-nR
do b=1,nV-nR
EcCCSD = EcCCSD + OOVV(i,j,a,b)*tau(i,j,a,b)
enddo
enddo
enddo
enddo
EcCCSD = 0.5d0*EcCCSD
end subroutine CCSD_correlation_energy