1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2024-11-07 14:43:41 +01:00
qp_plugins_scemama/devel/cc/form_ubb.irp.f

59 lines
2.0 KiB
FortranFixed
Raw Normal View History

2019-09-14 14:20:55 +02:00
subroutine form_ubb(ubb)
2019-09-09 16:51:15 +02:00
! Form 2nd term in (T) correction
implicit none
! Local variables
integer :: i,j,k,l,m
integer :: a,b,c,d,e
! Output variables
2019-09-14 14:15:25 +02:00
double precision,intent(out) :: ubb(spin_occ_num,spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num,spin_vir_num)
2019-09-09 16:51:15 +02:00
ubb(:,:,:,:,:,:) = 0d0
2019-09-14 14:15:25 +02:00
do c=1,spin_vir_num
do b=1,spin_vir_num
do a=1,spin_vir_num
do k=1,spin_occ_num
do j=1,spin_occ_num
do i=1,spin_occ_num
2019-09-09 16:51:15 +02:00
2019-09-14 14:15:25 +02:00
do e=1,spin_vir_num
2019-09-09 16:51:15 +02:00
ubb(i,j,k,a,b,c) = ubb(i,j,k,a,b,c) &
2019-09-14 14:20:55 +02:00
+ t2_cc(i,j,a,e)*VVVO(b,c,e,k) &
+ t2_cc(i,j,b,e)*VVVO(c,a,e,k) &
+ t2_cc(i,j,c,e)*VVVO(a,b,e,k) &
+ t2_cc(k,i,a,e)*VVVO(b,c,e,j) &
+ t2_cc(k,i,b,e)*VVVO(c,a,e,j) &
+ t2_cc(k,i,c,e)*VVVO(a,b,e,j) &
+ t2_cc(j,k,a,e)*VVVO(b,c,e,i) &
+ t2_cc(j,k,b,e)*VVVO(c,a,e,i) &
+ t2_cc(j,k,c,e)*VVVO(a,b,e,i)
2019-09-09 16:51:15 +02:00
end do
2019-09-14 14:15:25 +02:00
do m=1,spin_occ_num
2019-09-09 16:51:15 +02:00
ubb(i,j,k,a,b,c) = ubb(i,j,k,a,b,c) &
2019-09-14 14:20:55 +02:00
+ t2_cc(i,m,a,b)*VOOO(c,m,j,k) &
+ t2_cc(i,m,b,c)*VOOO(a,m,j,k) &
+ t2_cc(i,m,c,a)*VOOO(b,m,j,k) &
+ t2_cc(j,m,a,b)*VOOO(c,m,k,i) &
+ t2_cc(j,m,b,c)*VOOO(a,m,k,i) &
+ t2_cc(j,m,c,a)*VOOO(b,m,k,i) &
+ t2_cc(k,m,a,b)*VOOO(c,m,i,j) &
+ t2_cc(k,m,b,c)*VOOO(a,m,i,j) &
+ t2_cc(k,m,c,a)*VOOO(b,m,i,j)
2019-09-09 16:51:15 +02:00
end do
end do
end do
end do
end do
end do
end do
end subroutine form_ubb