1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2024-11-07 22:53:42 +01:00
qp_plugins_scemama/devel/cc/curly_W.irp.f

139 lines
3.3 KiB
FortranFixed
Raw Normal View History

2019-09-14 15:01:09 +02:00
BEGIN_PROVIDER [ double precision, cWoooo, (spin_occ_num,spin_occ_num,spin_occ_num,spin_occ_num) ]
implicit none
BEGIN_DOC
! Curly W in occ-occ-occ-occ block
END_DOC
integer :: i,j,m,n
integer :: a,b,e,f
2019-09-11 17:09:30 +02:00
cWoooo(:,:,:,:) = OOOO(:,:,:,:)
2019-09-14 14:15:25 +02:00
do e=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
cWoooo(m,n,i,j) = cWoooo(m,n,i,j) + &
t1_cc(j,e)*OOOV(m,n,i,e) - &
t1_cc(i,e)*OOOV(m,n,j,e)
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-11 17:09:30 +02:00
2019-09-14 15:01:09 +02:00
double precision :: x
2019-09-14 14:15:25 +02:00
do f=1,spin_vir_num
do e=1,spin_vir_num
do j=1,spin_occ_num
do i=1,spin_occ_num
2019-09-14 14:32:41 +02:00
x = 0.25d0*tau_cc(i,j,e,f)
2019-09-14 14:15:25 +02:00
do n=1,spin_occ_num
do m=1,spin_occ_num
2019-09-13 21:12:37 +02:00
cWoooo(m,n,i,j) = cWoooo(m,n,i,j) + x*OOVV(m,n,e,f)
2019-09-11 17:09:30 +02:00
end do
end do
end do
end do
end do
end do
2019-09-14 15:01:09 +02:00
END_PROVIDER
BEGIN_PROVIDER [ double precision, cWovvo, (spin_occ_num,spin_vir_num,spin_vir_num,spin_occ_num) ]
implicit none
BEGIN_DOC
! Curly W in occ-vir-vir-occ block
END_DOC
integer :: i,j,m,n
integer :: a,b,e,f
double precision :: x
2019-09-11 17:09:30 +02:00
cWovvo(:,:,:,:) = OVVO(:,:,:,:)
2019-09-14 14:15:25 +02:00
do f=1,spin_vir_num
do j=1,spin_occ_num
do e=1,spin_vir_num
do b=1,spin_vir_num
do m=1,spin_occ_num
2019-09-14 14:20:55 +02:00
cWovvo(m,b,e,j) = cWovvo(m,b,e,j) + t1_cc(j,f)*OVVV(m,b,e,f)
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-11 17:09:30 +02:00
2019-09-14 14:15:25 +02:00
do j=1,spin_occ_num
do e=1,spin_vir_num
do b=1,spin_vir_num
do n=1,spin_occ_num
do m=1,spin_occ_num
2019-09-14 14:20:55 +02:00
cWovvo(m,b,e,j) = cWovvo(m,b,e,j) - t1_cc(n,b)*OOVO(m,n,e,j)
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-11 17:09:30 +02:00
2019-09-14 14:15:25 +02:00
do j=1,spin_occ_num
do f=1,spin_vir_num
do b=1,spin_vir_num
do n=1,spin_occ_num
2019-09-14 14:20:55 +02:00
x = 0.5d0*t2_cc(j,n,f,b) + t1_cc(j,f)*t1_cc(n,b)
2019-09-14 14:15:25 +02:00
do e=1,spin_vir_num
do m=1,spin_occ_num
2019-09-13 21:12:37 +02:00
cWovvo(m,b,e,j) = cWovvo(m,b,e,j) - x *OOVV(m,n,e,f)
2019-09-11 17:09:30 +02:00
end do
end do
end do
end do
end do
end do
2019-09-14 15:01:09 +02:00
END_PROVIDER
BEGIN_PROVIDER [ double precision, cWvvvv, (spin_vir_num,spin_vir_num,spin_vir_num,spin_vir_num) ]
implicit none
BEGIN_DOC
! Curly W in vir-vir-vir-vir block
END_DOC
integer :: i,j,m,n
integer :: a,b,e,f
double precision :: x
2019-09-11 17:09:30 +02:00
cWvvvv(:,:,:,:) = VVVV(:,:,:,:)
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
do m=1,spin_occ_num
2019-09-14 14:20:55 +02:00
cWvvvv(a,b,e,f) = cWvvvv(a,b,e,f) - t1_cc(m,b)*VOVV(a,m,e,f) + t1_cc(m,a)*VOVV(b,m,e,f)
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-11 17:09:30 +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-13 21:12:37 +02:00
x = 0.d0
2019-09-14 14:15:25 +02:00
do n=1,spin_occ_num
do m=1,spin_occ_num
2019-09-14 14:32:41 +02:00
x = x + tau_cc(m,n,a,b)*OOVV(m,n,e,f)
2019-09-11 17:09:30 +02:00
end do
end do
2019-09-13 21:12:37 +02:00
cWvvvv(a,b,e,f) = cWvvvv(a,b,e,f) + 0.25d0*x
2019-09-11 17:09:30 +02:00
end do
end do
end do
end do
2019-09-14 15:01:09 +02:00
END_PROVIDER
2019-09-11 17:09:30 +02:00
2019-09-14 15:01:09 +02:00