4
1
mirror of https://github.com/pfloos/quack synced 2024-06-02 11:25:28 +02:00
quack/src/AOtoMO/AOtoMO.f90
2023-11-10 17:22:51 +01:00

27 lines
504 B
Fortran

subroutine AOtoMO(nBas,C,A,B)
! Perform AO to MO transformation of a matrix A for given coefficients c
implicit none
! Input variables
integer,intent(in) :: nBas
double precision,intent(in) :: C(nBas,nBas)
double precision,intent(in) :: A(nBas,nBas)
! Local variables
double precision,allocatable :: AC(:,:)
! Output variables
double precision,intent(out) :: B(nBas,nBas)
allocate(AC(nBas,nBas))
AC = matmul(A,C)
B = matmul(transpose(C),AC)
end subroutine