2019-09-14 14:20:55 +02:00
|
|
|
subroutine CCSD_Ec_nc(Fov,EcCCSD)
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
! Compute the CCSD correlatio energy in non-conanical form
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
double precision,intent(in) :: Fov(spin_occ_num,spin_vir_num)
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
integer :: i,j,a,b
|
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
double precision,intent(out) :: EcCCSD
|
|
|
|
|
|
|
|
! Compute CCSD correlation energy
|
|
|
|
|
|
|
|
EcCCSD = 0d0
|
|
|
|
|
|
|
|
! Singles contribution
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do i=1,spin_occ_num
|
|
|
|
do a=1,spin_vir_num
|
2019-09-11 17:09:30 +02:00
|
|
|
|
2019-09-14 14:20:55 +02:00
|
|
|
EcCCSD = EcCCSD + Fov(i,a)*t1_cc(i,a)
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
! Doubles contribution
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do i=1,spin_occ_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do b=1,spin_vir_num
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
EcCCSD = EcCCSD &
|
2019-09-14 14:20:55 +02:00
|
|
|
+ 0.5d0*OOVV(i,j,a,b)*t1_cc(i,a)*t1_cc(j,b) &
|
|
|
|
+ 0.25d0*OOVV(i,j,a,b)*t2_cc(i,j,a,b)
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
end subroutine CCSD_Ec_nc
|