From 10ae28d78d599240232b415d96a6541b2333fb14 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sat, 14 Sep 2019 14:28:30 +0200 Subject: [PATCH] Removed taus --- devel/cc/CCSD.irp.f | 9 +++------ devel/cc/form_cF_nc.irp.f | 4 +--- devel/cc/form_taus_nc.irp.f | 25 ++++++++++--------------- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/devel/cc/CCSD.irp.f b/devel/cc/CCSD.irp.f index b8f0c55..14d0bdf 100644 --- a/devel/cc/CCSD.irp.f +++ b/devel/cc/CCSD.irp.f @@ -37,7 +37,6 @@ subroutine CCSD double precision,allocatable :: r2(:,:,:,:) double precision,allocatable :: tau(:,:,:,:) - double precision,allocatable :: taus(:,:,:,:) ! Hello world @@ -65,7 +64,7 @@ subroutine CCSD ! Guess amplitudes - allocate(tau(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num),taus(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)) + allocate(tau(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)) ! Initialization @@ -76,7 +75,6 @@ subroutine CCSD Conv = 1d0 nSCF = 0 - call form_taus_nc(taus) call form_tau_nc (tau) EcMP2 = 0.25d0*u_dot_v(OOVV,tau,size(OOVV)) @@ -100,7 +98,7 @@ subroutine CCSD nSCF = nSCF + 1 - call form_cf_nc (taus, & + call form_cf_nc ( & spin_fock_matrix_mo_oo, & spin_fock_matrix_mo_ov, & spin_fock_matrix_mo_vv, & @@ -127,7 +125,6 @@ subroutine CCSD t2_cc(:,:,:,:) = t2_cc(:,:,:,:) - r2(:,:,:,:)/delta_OOVV(:,:,:,:) TOUCH t1_cc t2_cc - call form_taus_nc(taus) call form_tau_nc (tau) ! Compute correlation energy @@ -166,7 +163,7 @@ subroutine CCSD deallocate( & cFvv,cFoo,cFov, & cWoooo,cWvvvv,cWovvo, & - tau,taus, & + tau, & r1,r2) !------------------------------------------------------------------------ diff --git a/devel/cc/form_cF_nc.irp.f b/devel/cc/form_cF_nc.irp.f index 6498d80..ad5d298 100644 --- a/devel/cc/form_cF_nc.irp.f +++ b/devel/cc/form_cF_nc.irp.f @@ -1,4 +1,4 @@ -subroutine form_cF_nc(taus,Foo,Fov,Fvv,cFoo,cFov,cFvv) +subroutine form_cF_nc(Foo,Fov,Fvv,cFoo,cFov,cFvv) ! Compute F terms in CCSD @@ -6,8 +6,6 @@ subroutine form_cF_nc(taus,Foo,Fov,Fvv,cFoo,cFov,cFvv) ! Input variables - double precision,intent(in) :: taus(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num) - double precision,intent(in) :: Foo(spin_occ_num,spin_occ_num) double precision,intent(in) :: Fov(spin_occ_num,spin_vir_num) double precision,intent(in) :: Fvv(spin_vir_num,spin_vir_num) diff --git a/devel/cc/form_taus_nc.irp.f b/devel/cc/form_taus_nc.irp.f index 669a1ba..32d6566 100644 --- a/devel/cc/form_taus_nc.irp.f +++ b/devel/cc/form_taus_nc.irp.f @@ -1,28 +1,23 @@ -subroutine form_taus_nc(taus) +BEGIN_PROVIDER [ double precision, taus, (spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)] + implicit none + BEGIN_DOC + ! Tau_s + END_DOC -! Form tau in CCSD - - implicit none - -! Local variables - - integer :: i,j,k,l - integer :: a,b,c,d - -! Output variables - - double precision,intent(out) :: taus(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num) + integer :: i,j,a,b do b=1,spin_vir_num do a=1,spin_vir_num do j=1,spin_occ_num do i=1,spin_occ_num - taus(i,j,a,b) = t2_cc(i,j,a,b) + 0.5d0*(t1_cc(i,a)*t1_cc(j,b) - t1_cc(i,b)*t1_cc(j,a)) + taus(i,j,a,b) = t2_cc(i,j,a,b) + 0.5d0*( & + t1_cc(i,a)*t1_cc(j,b) - & + t1_cc(i,b)*t1_cc(j,a) ) enddo enddo enddo enddo -end subroutine form_taus_nc +END_PROVIDER