mirror of
https://github.com/pfloos/quack
synced 2024-12-25 13:53:41 +01:00
34 lines
677 B
Fortran
34 lines
677 B
Fortran
subroutine unrestricted_hartree_potential(nBas,P,ERI,J)
|
|
|
|
! Compute the unrestricted version of the Hartree potential
|
|
|
|
implicit none
|
|
|
|
! Input variables
|
|
|
|
integer,intent(in) :: nBas
|
|
double precision,intent(in) :: P(nBas,nBas)
|
|
double precision,intent(in) :: ERI(nBas,nBas,nBas,nBas)
|
|
|
|
! Local variables
|
|
|
|
integer :: mu,nu,la,si
|
|
|
|
! Output variables
|
|
|
|
double precision,intent(out) :: J(nBas,nBas)
|
|
|
|
J(:,:) = 0d0
|
|
do si=1,nBas
|
|
do la=1,nBas
|
|
do nu=1,nBas
|
|
do mu=1,nBas
|
|
J(mu,nu) = J(mu,nu) + P(la,si)*ERI(mu,la,nu,si)
|
|
enddo
|
|
enddo
|
|
enddo
|
|
enddo
|
|
|
|
|
|
end subroutine unrestricted_hartree_potential
|