10
1
mirror of https://github.com/pfloos/quack synced 2024-12-26 14:23:38 +01:00
QuAcK/src/eDFT/restricted_fock_exchange_potential.f90

37 lines
723 B
Fortran
Raw Normal View History

2020-07-06 20:57:27 +02:00
subroutine restricted_fock_exchange_potential(nBas,P,ERI,Fx)
2019-03-13 11:07:31 +01:00
! Compute the Fock exchange 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) :: Fx(nBas,nBas)
! Compute HF exchange matrix
Fx(:,:) = 0d0
2020-03-18 16:06:29 +01:00
do si=1,nBas
do la=1,nBas
do nu=1,nBas
2019-03-13 11:07:31 +01:00
do mu=1,nBas
2020-03-14 23:00:44 +01:00
Fx(mu,nu) = Fx(mu,nu) - P(la,si)*ERI(mu,la,si,nu)
2019-03-13 11:07:31 +01:00
enddo
enddo
enddo
enddo
2020-03-16 22:08:04 +01:00
Fx(:,:) = 0.5d0*Fx(:,:)
2020-07-06 20:57:27 +02:00
end subroutine restricted_fock_exchange_potential