2019-09-14 15:01:09 +02:00
|
|
|
BEGIN_PROVIDER [ double precision, r2_cc, (spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num) ]
|
2019-09-17 23:25:40 +02:00
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
2019-09-14 15:01:09 +02:00
|
|
|
! t2 residues in non-canonical CCSD
|
2019-09-17 23:25:40 +02:00
|
|
|
END_DOC
|
2019-09-13 21:12:37 +02:00
|
|
|
integer :: i,j,m,n
|
|
|
|
integer :: a,b,e,f
|
2019-09-14 15:01:09 +02:00
|
|
|
double precision :: x
|
2019-09-17 23:25:40 +02:00
|
|
|
double precision, allocatable :: tmp_oo(:,:), tmp_oo2(:,:)
|
2019-09-11 17:09:30 +02:00
|
|
|
|
2019-09-17 23:25:40 +02:00
|
|
|
allocate ( tmp_oo(spin_occ_num,spin_occ_num) )
|
|
|
|
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(:,:,:,:) = OOVV(:,:,:,:)
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do e=1,spin_vir_num
|
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
2019-09-17 23:25:40 +02:00
|
|
|
if (a == b) cycle
|
|
|
|
tmp_oo(:,:) = c_spin_fock_matrix_mo_vv(b,e) * t2_cc(:,:,a,e)
|
|
|
|
do m=1,spin_occ_num
|
|
|
|
x = 0.5d0 * t1_cc(m,b) * c_spin_fock_matrix_mo_ov(m,e)
|
|
|
|
if (x == 0.d0) cycle
|
|
|
|
tmp_oo(:,:) = tmp_oo(:,:) - t2_cc(:,:,a,e)*x
|
|
|
|
enddo
|
|
|
|
r2_cc(:,:,a,b) = r2_cc(:,:,a,b) + tmp_oo(:,:)
|
|
|
|
r2_cc(:,:,b,a) = r2_cc(:,:,b,a) - tmp_oo(:,:)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
do m=1,spin_occ_num
|
2019-09-14 14:15:25 +02:00
|
|
|
do j=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
x = c_spin_fock_matrix_mo_oo(m,j)
|
2019-09-17 23:25:40 +02:00
|
|
|
r2_cc(:,j,b,e) = r2_cc(:,j,b,e) - t2_cc(:,m,b,e)*x
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-11 17:09:30 +02:00
|
|
|
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + t2_cc(j,m,a,b)*c_spin_fock_matrix_mo_oo(m,i)
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
x = 0.5d0*c_spin_fock_matrix_mo_ov(m,e)
|
2019-09-13 21:12:37 +02:00
|
|
|
if (x == 0.d0) cycle
|
2019-09-14 14:15:25 +02:00
|
|
|
do j=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) - x*t2_cc(i,m,a,b)*t1_cc(j,e)
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
|
|
|
end do
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
x = 0.5d0*c_spin_fock_matrix_mo_ov(m,e)
|
2019-09-14 14:15:25 +02:00
|
|
|
do j=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + x*t2_cc(j,m,a,b)*t1_cc(i,e)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
do n=1,spin_occ_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + 0.5d0*tau_cc(m,n,a,b)*cWoooo(m,n,i,j)
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
|
|
|
end do
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do f=1,spin_vir_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
2019-09-17 23:25:40 +02:00
|
|
|
x = 0.5d0*cWvvvv(a,b,e,f)
|
2019-09-14 15:06:02 +02:00
|
|
|
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
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
2019-09-14 15:06:02 +02:00
|
|
|
endif
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do m=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
2019-09-17 23:25:40 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + t2_cc(i,m,a,e)*cWovvo(m,b,e,j)
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
|
|
|
end do
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-14 14:20:55 +02:00
|
|
|
x = t1_cc(m,a)*OVVO(m,b,e,j)
|
2019-09-14 14:15:25 +02:00
|
|
|
do i=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) - t1_cc(i,e)*x
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-17 23:25:40 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) - t2_cc(j,m,a,e)*cWovvo(m,b,e,i)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + t1_cc(j,e)*t1_cc(m,a)*OVVO(m,b,e,i)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do m=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) - t2_cc(i,m,b,e)*cWovvo(m,a,e,j)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-17 23:25:40 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + t1_cc(i,e)*t1_cc(m,b)*OVVO(m,a,e,j)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do e=1,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
|
|
|
|
do m=1,spin_occ_num
|
2019-09-17 23:25:40 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + t2_cc(j,m,b,e)*cWovvo(m,a,e,i)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) - t1_cc(j,e)*t1_cc(m,b)*OVVO(m,a,e,i)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do i=1,spin_occ_num
|
2019-09-17 23:25:40 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + t1_cc(i,e)*VVVO(a,b,e,j)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do e=1,spin_vir_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
do j=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) - t1_cc(j,e)*VVVO(a,b,e,i)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-17 23:25:40 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) - t1_cc(m,a)*OVOO(m,b,i,j)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do b=1,spin_vir_num
|
|
|
|
do a=1,spin_vir_num
|
|
|
|
do j=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
|
|
|
do m=1,spin_occ_num
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(i,j,a,b) = r2_cc(i,j,a,b) + t1_cc(m,b)*OVOO(m,a,i,j)
|
2019-09-13 21:12:37 +02:00
|
|
|
end do
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-09-17 23:25:40 +02:00
|
|
|
|
|
|
|
! Final expression of the t2 residue
|
|
|
|
|
2019-09-14 15:01:09 +02:00
|
|
|
r2_cc(:,:,:,:) = delta_oovv(:,:,:,:)*t2_cc(:,:,:,:) - r2_cc(:,:,:,:)
|
2019-09-17 23:25:40 +02:00
|
|
|
|
2019-09-14 15:01:09 +02:00
|
|
|
END_PROVIDER
|