4
1
mirror of https://github.com/pfloos/quack synced 2024-11-09 07:33:55 +01:00
quack/src/AOtoMO/exchange_matrix_AO_basis.f90

34 lines
665 B
Fortran
Raw Normal View History

2021-02-15 17:27:06 +01:00
subroutine exchange_matrix_AO_basis(nBas,P,ERI,K)
2019-03-19 10:13:33 +01:00
! Compute exchange matrix in the AO basis
implicit none
include 'parameters.h'
! Input variables
integer,intent(in) :: nBas
double precision,intent(in) :: P(nBas,nBas)
2021-02-15 17:27:06 +01:00
double precision,intent(in) :: ERI(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) :: K(nBas,nBas)
K = 0d0
do nu=1,nBas
do si=1,nBas
do la=1,nBas
do mu=1,nBas
2021-02-15 17:27:06 +01:00
K(mu,nu) = K(mu,nu) - P(la,si)*ERI(mu,la,si,nu)
2019-03-19 10:13:33 +01:00
enddo
enddo
enddo
enddo
end subroutine exchange_matrix_AO_basis