4
1
mirror of https://github.com/pfloos/quack synced 2024-06-20 12:12:15 +02:00
quack/src/HF/exchange_potential.f90
2021-02-15 17:27:06 +01:00

35 lines
653 B
Fortran

subroutine exchange_potential(nBas,c,Fx,Vx)
! Compute the exchange potential in the MO basis
implicit none
include 'parameters.h'
! Input variables
integer,intent(in) :: nBas
double precision,intent(in) :: c(nBas,nBas)
double precision,intent(in) :: Fx(nBas,nBas)
! Local variables
integer :: mu,nu
integer :: p
! Output variables
double precision,intent(out) :: Vx(nBas)
! Compute Vx
Vx(:) = 0d0
do p=1,nBas
do mu=1,nBas
do nu=1,nBas
Vx(p) = Vx(p) + c(mu,p)*Fx(mu,nu)*c(nu,p)
end do
end do
end do
end subroutine exchange_potential