diff --git a/devel/cc/CCSD.irp.f b/devel/cc/CCSD.irp.f index 2cfc15d..e1eff59 100644 --- a/devel/cc/CCSD.irp.f +++ b/devel/cc/CCSD.irp.f @@ -21,7 +21,7 @@ subroutine CCSD integer :: nSCF double precision :: Conv double precision :: EcMP2 - double precision :: ECCSD,EcCCSD + double precision :: ECCSD double precision :: EcCCT double precision :: get_two_e_integral,u_dot_v @@ -83,10 +83,6 @@ subroutine CCSD t2_cc(:,:,:,:) = t2_cc(:,:,:,:) - r2_cc(:,:,:,:)/delta_OOVV(:,:,:,:) TOUCH t1_cc t2_cc -! Compute correlation energy - - call CCSD_Ec_nc(spin_fock_matrix_mo_ov,EcCCSD) - ! Dump results ECCSD = ERHF + EcCCSD @@ -120,9 +116,7 @@ subroutine CCSD !------------------------------------------------------------------------ if(doCCSDT) then write(*,*) "Starting (T) calculation" -! call cpu_time(start_CCSDT)V call CCSDT(EcCCT) -! call cpu_time(end_CCSDT) call write_time(6) ! t_CCSDT = end_CCSDT - start_CCSDT diff --git a/devel/cc/CCSD_Ec_nc.irp.f b/devel/cc/CCSD_Ec_nc.irp.f index f071096..cfaa91b 100644 --- a/devel/cc/CCSD_Ec_nc.irp.f +++ b/devel/cc/CCSD_Ec_nc.irp.f @@ -1,23 +1,13 @@ -subroutine CCSD_Ec_nc(Fov,EcCCSD) - -! Compute the CCSD correlatio energy in non-conanical form - - implicit none - -! Input variables - - double precision,intent(in) :: Fov(spin_occ_num,spin_vir_num) +BEGIN_PROVIDER [ double precision, EcCCSD ] + implicit none + BEGIN_DOC + ! CCSD correlation energy in non-canonical form + END_DOC ! Local variables integer :: i,j,a,b -! Output variables - - double precision,intent(out) :: EcCCSD - -! Compute CCSD correlation energy - EcCCSD = 0d0 ! Singles contribution @@ -25,7 +15,7 @@ subroutine CCSD_Ec_nc(Fov,EcCCSD) do i=1,spin_occ_num do a=1,spin_vir_num - EcCCSD = EcCCSD + Fov(i,a)*t1_cc(i,a) + EcCCSD = EcCCSD + spin_fock_matrix_mo_ov(i,a)*t1_cc(i,a) end do end do @@ -46,4 +36,5 @@ subroutine CCSD_Ec_nc(Fov,EcCCSD) end do end do -end subroutine CCSD_Ec_nc +END_PROVIDER + diff --git a/devel/cc/r2_cc.irp.f b/devel/cc/r2_cc.irp.f index 758d9a6..9450a5e 100644 --- a/devel/cc/r2_cc.irp.f +++ b/devel/cc/r2_cc.irp.f @@ -150,11 +150,13 @@ BEGIN_PROVIDER [ double precision, r2_cc, (spin_occ_num,spin_occ_num,spin_vir_nu do b=1,spin_vir_num do a=1,spin_vir_num x = 0.5d0*cWvvvv(a,b,e,f) - do j=1,spin_occ_num - do i=1,spin_occ_num - r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + x*tau_cc(i,j,e,f) + if (x /= 0.d0) then + do j=1,spin_occ_num + do i=1,spin_occ_num + r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + x*tau_cc(i,j,e,f) + end do end do - end do + endif end do end do end do