2019-03-19 10:13:33 +01:00
|
|
|
subroutine AOtoMO_transform(nBas,c,A)
|
|
|
|
|
|
|
|
! 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)
|
|
|
|
|
2021-11-18 13:34:08 +01:00
|
|
|
integer :: i,j
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
! Output variables
|
|
|
|
|
|
|
|
double precision,intent(inout):: A(nBas,nBas)
|
|
|
|
|
|
|
|
A = matmul(transpose(c),matmul(A,c))
|
|
|
|
|
2021-11-18 13:34:08 +01:00
|
|
|
! do j=1,nBas
|
|
|
|
! do i=1,nBas
|
|
|
|
! write(10,'(I5,I5,F16.10)') i,j,A(i,j)
|
|
|
|
! enddo
|
|
|
|
! enddo
|
|
|
|
|
|
|
|
|
2019-03-19 10:13:33 +01:00
|
|
|
end subroutine AOtoMO_transform
|