4
1
mirror of https://github.com/pfloos/quack synced 2024-11-13 17:43:58 +01:00
quack/src/AOtoMO/Hartree_matrix_MO_basis.f90

27 lines
612 B
Fortran

subroutine Hartree_matrix_MO_basis(nBas,c,P,Hc,G,H)
! Compute Hartree matrix in the MO basis
implicit none
include 'parameters.h'
! Input variables
integer,intent(in) :: nBas
double precision,intent(in) :: c(nBas,nBas),P(nBas,nBas)
double precision,intent(in) :: Hc(nBas,nBas),G(nBas,nBas,nBas,nBas)
! Output variables
double precision,intent(out) :: H(nBas,nBas)
! Compute Hartree matrix in the AO basis
call Hartree_matrix_AO_basis(nBas,P,Hc,G,H)
! Transform Hartree matrix in the MO basis
H = matmul(transpose(c),matmul(H,c))
end subroutine Hartree_matrix_MO_basis