4
1
mirror of https://github.com/pfloos/quack synced 2024-08-09 22:28:36 +02:00
quack/src/AOtoMO/Hartree_matrix_MO_basis.f90

27 lines
569 B
Fortran
Raw Normal View History

2023-10-26 09:35:48 +02:00
subroutine Hartree_matrix_MO_basis(nBas,c,P,G,H)
2019-03-19 10:13:33 +01:00
! 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)
2023-10-26 09:35:48 +02:00
double precision,intent(in) :: G(nBas,nBas,nBas,nBas)
2019-03-19 10:13:33 +01:00
! Output variables
double precision,intent(out) :: H(nBas,nBas)
! Compute Hartree matrix in the AO basis
2023-10-26 09:35:48 +02:00
call Hartree_matrix_AO_basis(nBas,P,G,H)
2019-03-19 10:13:33 +01:00
! Transform Hartree matrix in the MO basis
H = matmul(transpose(c),matmul(H,c))
end subroutine