mirror of
https://gitlab.com/scemama/qp_plugins_scemama.git
synced 2024-08-30 07:53:39 +02:00
53 lines
1.0 KiB
Fortran
53 lines
1.0 KiB
Fortran
subroutine CCSD_Ec_nc(t1,t2,Fov,EcCCSD)
|
|
|
|
! Compute the CCSD correlatio energy in non-conanical form
|
|
|
|
implicit none
|
|
|
|
! Input variables
|
|
|
|
double precision,intent(in) :: t1(spin_occ_num,spin_vir_num)
|
|
double precision,intent(in) :: t2(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)
|
|
|
|
double precision,intent(in) :: Fov(spin_occ_num,spin_vir_num)
|
|
|
|
! Local variables
|
|
|
|
integer :: i,j,a,b
|
|
|
|
! Output variables
|
|
|
|
double precision,intent(out) :: EcCCSD
|
|
|
|
! Compute CCSD correlation energy
|
|
|
|
EcCCSD = 0d0
|
|
|
|
! Singles contribution
|
|
|
|
do i=1,spin_occ_num
|
|
do a=1,spin_vir_num
|
|
|
|
EcCCSD = EcCCSD + Fov(i,a)*t1(i,a)
|
|
|
|
end do
|
|
end do
|
|
|
|
! Doubles contribution
|
|
|
|
do i=1,spin_occ_num
|
|
do j=1,spin_occ_num
|
|
do a=1,spin_vir_num
|
|
do b=1,spin_vir_num
|
|
|
|
EcCCSD = EcCCSD &
|
|
+ 0.5d0*OOVV(i,j,a,b)*t1(i,a)*t1(j,b) &
|
|
+ 0.25d0*OOVV(i,j,a,b)*t2(i,j,a,b)
|
|
|
|
end do
|
|
end do
|
|
end do
|
|
end do
|
|
|
|
end subroutine CCSD_Ec_nc
|