1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2024-12-23 12:54:35 +01:00
qp_plugins_scemama/devel/cc/form_h.irp.f

74 lines
1.4 KiB
FortranFixed
Raw Normal View History

2019-09-14 14:15:25 +02:00
subroutine form_h(t1,tau,hvv,hoo,hvo)
2019-09-09 16:51:15 +02:00
! Scuseria Eqs. (5), (6) and (7)
implicit none
! Input variables
2019-09-14 14:15:25 +02:00
double precision,intent(in) :: t1(spin_occ_num,spin_vir_num)
double precision,intent(in) :: tau(spin_occ_num,spin_occ_num,spin_vir_num,spin_vir_num)
2019-09-09 16:51:15 +02:00
! Local variables
integer :: i,j,k,l
integer :: a,b,c,d
! Output variables
2019-09-14 14:15:25 +02:00
double precision,intent(out) :: hvv(spin_vir_num,spin_vir_num)
double precision,intent(out) :: hoo(spin_occ_num,spin_occ_num)
double precision,intent(out) :: hvo(spin_vir_num,spin_occ_num)
2019-09-09 16:51:15 +02:00
hvv(:,:) = 0d0
2019-09-14 14:15:25 +02:00
do b=1,spin_vir_num
2019-09-09 16:51:15 +02:00
hvv(b,b) = eV(b)
2019-09-14 14:15:25 +02:00
do a=1,spin_vir_num
do j=1,spin_occ_num
do k=1,spin_occ_num
do c=1,spin_vir_num
2019-09-09 16:51:15 +02:00
hvv(b,a) = hvv(b,a) - OOVV(j,k,b,c)*tau(j,k,a,c)
end do
end do
end do
end do
end do
hoo(:,:) = 0d0
2019-09-14 14:15:25 +02:00
do i=1,spin_occ_num
2019-09-09 16:51:15 +02:00
hoo(i,i) = eO(i)
2019-09-14 14:15:25 +02:00
do j=1,spin_occ_num
do k=1,spin_occ_num
do b=1,spin_vir_num
do c=1,spin_vir_num
2019-09-09 16:51:15 +02:00
hoo(i,j) = hoo(i,j) + OOVV(j,k,b,c)*tau(i,k,b,c)
end do
end do
end do
end do
end do
hvo(:,:) = 0d0
2019-09-14 14:15:25 +02:00
do j=1,spin_occ_num
do b=1,spin_vir_num
do c=1,spin_vir_num
do k=1,spin_occ_num
2019-09-09 16:51:15 +02:00
hvo(b,j) = hvo(b,j) + OOVV(j,k,b,c)*t1(k,c)
end do
end do
end do
end do
! print*,'hvv',hvv
end subroutine form_h