4
1
mirror of https://github.com/pfloos/quack synced 2024-11-19 04:22:39 +01:00
quack/src/QuAcK/form_ub.f90

49 lines
1.2 KiB
Fortran
Raw Normal View History

2020-03-26 16:57:46 +01:00
subroutine form_ub(nC,nO,nV,nR,OOVV,t1,ub)
2019-03-19 10:13:33 +01:00
! Form 1st term in (T) correction
implicit none
! Input variables
2020-03-26 16:57:46 +01:00
integer,intent(in) :: nC,nO,nV,nR
2019-03-19 10:13:33 +01:00
double precision,intent(in) :: OOVV(nO,nO,nV,nV)
double precision,intent(in) :: t1(nO,nV)
! Local variables
integer :: i,j,k,l
integer :: a,b,c,d
! Output variables
double precision,intent(out) :: ub(nO,nO,nO,nV,nV,nV)
2020-03-26 16:57:46 +01:00
do i=nC+1,nO
do j=nC+1,nO
do k=nC+1,nO
do a=1,nV-nR
do b=1,nV-nR
do c=1,nV-nR
2019-03-19 10:13:33 +01:00
ub(i,j,k,a,b,c) = t1(i,a)*OOVV(j,k,b,c) &
+ t1(i,b)*OOVV(j,k,c,a) &
+ t1(i,c)*OOVV(j,k,a,b) &
+ t1(j,a)*OOVV(k,i,b,c) &
+ t1(j,b)*OOVV(k,i,c,a) &
+ t1(j,c)*OOVV(k,i,a,b) &
+ t1(k,a)*OOVV(i,j,b,c) &
+ t1(k,b)*OOVV(i,j,c,a) &
+ t1(k,c)*OOVV(i,j,a,b)
end do
end do
end do
end do
end do
end do
end subroutine form_ub