subroutine form_tau_nc(t1,t2,tau) ! Form tau in CCSD 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) ! Local variables integer :: i,j,k,l integer :: a,b,c,d ! Output variables double precision,intent(out) :: tau(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num) do b=1,spin_vir_num do a=1,spin_vir_num do j=1,spin_occ_num do i=1,spin_occ_num tau(i,j,a,b) = t2(i,j,a,b) + t1(i,a)*t1(j,b) - t1(i,b)*t1(j,a) enddo enddo enddo enddo end subroutine form_tau_nc