2019-09-14 14:28:30 +02:00
|
|
|
subroutine form_cF_nc(Foo,Fov,Fvv,cFoo,cFov,cFvv)
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
! Compute F terms in CCSD
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
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)
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
integer :: i,j,m,n
|
|
|
|
integer :: a,b,e,f
|
|
|
|
double precision,external :: Kronecker_Delta
|
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
double precision,intent(out) :: cFoo(spin_occ_num,spin_occ_num)
|
|
|
|
double precision,intent(out) :: cFov(spin_occ_num,spin_vir_num)
|
|
|
|
double precision,intent(out) :: cFvv(spin_vir_num,spin_vir_num)
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
! Occupied-occupied block
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do m=1,spin_occ_num
|
|
|
|
do i=1,spin_occ_num
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
cFoo(m,i) = (1d0 - Kronecker_delta(m,i))*Foo(m,i)
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do e=1,spin_vir_num
|
2019-09-14 14:20:55 +02:00
|
|
|
cFoo(m,i) = cFoo(m,i) + 0.5d0*t1_cc(i,e)*Fov(m,e)
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do e=1,spin_vir_num
|
|
|
|
do n=1,spin_occ_num
|
2019-09-14 14:20:55 +02:00
|
|
|
cFoo(m,i) = cFoo(m,i) + t1_cc(n,e)*OOOV(m,n,i,e)
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do e=1,spin_vir_num
|
|
|
|
do n=1,spin_occ_num
|
|
|
|
do f=1,spin_vir_num
|
2019-09-11 17:09:30 +02:00
|
|
|
cFoo(m,i) = cFoo(m,i) + 0.5d0*taus(i,n,e,f)*OOVV(m,n,e,f)
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
! Occupied-virtual block
|
|
|
|
|
|
|
|
cFov(:,:) = Fov(:,:)
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do m=1,spin_occ_num
|
|
|
|
do e=1,spin_vir_num
|
2019-09-11 17:09:30 +02:00
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do n=1,spin_occ_num
|
|
|
|
do f=1,spin_vir_num
|
2019-09-14 14:20:55 +02:00
|
|
|
cFov(m,e) = cFov(m,e) + t1_cc(n,f)*OOVV(m,n,e,f)
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
! Virtual-virtual block
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do a=1,spin_vir_num
|
|
|
|
do e=1,spin_vir_num
|
2019-09-11 17:09:30 +02:00
|
|
|
|
|
|
|
cFvv(a,e) = (1d0 - Kronecker_delta(a,e))*Fvv(a,e)
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do m=1,spin_occ_num
|
2019-09-14 14:20:55 +02:00
|
|
|
cFvv(a,e) = cFvv(a,e) - 0.5d0*t1_cc(m,a)*Fov(m,e)
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do m=1,spin_occ_num
|
|
|
|
do f=1,spin_vir_num
|
2019-09-14 14:20:55 +02:00
|
|
|
cFvv(a,e) = cFvv(a,e) + t1_cc(m,f)*OVVV(m,a,f,e)
|
2019-09-11 17:09:30 +02:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
2019-09-14 14:15:25 +02:00
|
|
|
do m=1,spin_occ_num
|
|
|
|
do n=1,spin_occ_num
|
|
|
|
do f=1,spin_vir_num
|
2019-09-11 17:09:30 +02:00
|
|
|
cFvv(a,e) = cFvv(a,e) - 0.5d0*taus(m,n,a,f)*OOVV(m,n,e,f)
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
end subroutine form_cF_nc
|