2023-07-12 12:34:48 +02:00
|
|
|
BEGIN_PROVIDER [ integer, cholesky_mo_num ]
|
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Number of Cholesky vectors in MO basis
|
|
|
|
END_DOC
|
|
|
|
cholesky_mo_num = cholesky_ao_num
|
|
|
|
END_PROVIDER
|
|
|
|
|
|
|
|
BEGIN_PROVIDER [ double precision, cholesky_mo, (mo_num, mo_num, cholesky_mo_num) ]
|
2023-05-04 15:50:40 +02:00
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Cholesky vectors in MO basis
|
|
|
|
END_DOC
|
|
|
|
|
2023-07-05 19:12:03 +02:00
|
|
|
integer :: k, i, j
|
2023-05-04 15:50:40 +02:00
|
|
|
|
2023-05-26 11:48:08 +02:00
|
|
|
call set_multiple_levels_omp(.False.)
|
2023-05-04 15:50:40 +02:00
|
|
|
!$OMP PARALLEL DO PRIVATE(k)
|
2023-07-12 12:34:48 +02:00
|
|
|
do k=1,cholesky_mo_num
|
2023-07-05 19:12:03 +02:00
|
|
|
do j=1,mo_num
|
|
|
|
do i=1,mo_num
|
|
|
|
cholesky_mo(i,j,k) = cholesky_mo_transp(k,i,j)
|
|
|
|
enddo
|
|
|
|
enddo
|
2023-05-04 15:50:40 +02:00
|
|
|
enddo
|
|
|
|
!$OMP END PARALLEL DO
|
2023-05-17 16:55:29 +02:00
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|
2023-07-12 12:34:48 +02:00
|
|
|
BEGIN_PROVIDER [ double precision, cholesky_mo_transp, (cholesky_mo_num, mo_num, mo_num) ]
|
2023-05-17 16:55:29 +02:00
|
|
|
implicit none
|
|
|
|
BEGIN_DOC
|
|
|
|
! Cholesky vectors in MO basis
|
|
|
|
END_DOC
|
|
|
|
|
2023-07-05 19:12:03 +02:00
|
|
|
double precision, allocatable :: X(:,:,:)
|
2023-07-06 16:21:37 +02:00
|
|
|
integer :: ierr
|
2023-07-05 19:12:03 +02:00
|
|
|
print *, 'AO->MO Transformation of Cholesky vectors'
|
2023-06-12 14:05:36 +02:00
|
|
|
|
2023-07-12 12:34:48 +02:00
|
|
|
allocate(X(mo_num,cholesky_mo_num,ao_num), stat=ierr)
|
2023-07-06 16:21:37 +02:00
|
|
|
if (ierr /= 0) then
|
|
|
|
print *, irp_here, ': Allocation failed'
|
|
|
|
endif
|
2023-07-12 12:34:48 +02:00
|
|
|
call dgemm('T','N', ao_num*cholesky_mo_num, mo_num, ao_num, 1.d0, &
|
|
|
|
cholesky_ao, ao_num, mo_coef, ao_num, 0.d0, X, ao_num*cholesky_mo_num)
|
|
|
|
call dgemm('T','N', cholesky_mo_num*mo_num, mo_num, ao_num, 1.d0, &
|
|
|
|
X, ao_num, mo_coef, ao_num, 0.d0, cholesky_mo_transp, cholesky_mo_num*mo_num)
|
2023-07-05 19:12:03 +02:00
|
|
|
deallocate(X)
|
2023-05-04 15:50:40 +02:00
|
|
|
|
|
|
|
END_PROVIDER
|
|
|
|
|