2023-10-26 09:35:48 +02:00
|
|
|
subroutine Hartree_matrix_AO_basis(nBas,P,G,H)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Compute Hartree matrix in the AO basis
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
include 'parameters.h'
|
|
|
|
|
|
|
|
! Input variables
|
|
|
|
|
|
|
|
integer,intent(in) :: nBas
|
|
|
|
double precision,intent(in) :: P(nBas,nBas)
|
2023-10-26 09:35:48 +02:00
|
|
|
double precision,intent(in) :: G(nBas,nBas,nBas,nBas)
|
2019-03-19 10:13:33 +01:00
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
integer :: mu,nu,la,si
|
|
|
|
|
|
|
|
! Output variables
|
|
|
|
|
|
|
|
double precision,intent(out) :: H(nBas,nBas)
|
|
|
|
|
2023-10-26 09:35:48 +02:00
|
|
|
H(:,:) = 0d0
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
do mu=1,nBas
|
|
|
|
do nu=1,nBas
|
|
|
|
do la=1,nBas
|
|
|
|
do si=1,nBas
|
|
|
|
H(mu,nu) = H(mu,nu) + P(la,si)*G(mu,la,nu,si)
|
2023-12-03 18:47:30 +01:00
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
2019-03-19 10:13:33 +01:00
|
|
|
|
2023-07-18 14:59:18 +02:00
|
|
|
end subroutine
|