10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-02 11:25:26 +02:00

Canonical orthonormalization

This commit is contained in:
Anthony Scemama 2015-12-09 10:18:12 +01:00
parent fe2531a5dd
commit 6025113cbc
2 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,42 @@
BEGIN_PROVIDER [double precision, ao_ortho_canonical_coef, (ao_num_align,ao_num)]
implicit none
BEGIN_DOC
! matrix of the coefficients of the mos generated by the
! orthonormalization by the S^{-1/2} canonical transformation of the aos
! ao_ortho_canonical_coef(i,j) = coefficient of the ith ao on the jth ao_ortho_canonical orbital
END_DOC
integer :: i,j,k,l
tmp_matrix(:,:) = 0.d0
do j=1, ao_num
tmp_matrix(j,j) = 1.d0
enddo
call ortho_canonical(ao_overlap,ao_num_align,ao_num,ao_ortho_canonical_coef,ao_num_align,mo_tot_num)
SOFT_TOUCH mo_tot_num
END_PROVIDER
BEGIN_PROVIDER [double precision, ao_ortho_canonical_overlap, (ao_num_align,ao_num)]
implicit none
BEGIN_DOC
! overlap matrix of the ao_ortho_canonical
! supposed to be the Identity
END_DOC
integer :: i,j,k,l
double precision :: c
do j=1, ao_num
do i=1, ao_num
ao_ortho_canonical_overlap(i,j) = 0.d0
enddo
enddo
do k=1, ao_num
do j=1, ao_num
c = 0.d0
do l=1, ao_num
c += ao_ortho_canonical_coef(j,l) * ao_overlap(k,l)
enddo
do i=1, ao_num
ao_ortho_canonical_overlap(i,j) += ao_ortho_canonical_coef(i,k) * c
enddo
enddo
enddo
END_PROVIDER

View File

@ -0,0 +1,25 @@
BEGIN_PROVIDER [double precision, ao_ortho_canonical_nucl_elec_integral, (mo_tot_num_align,mo_tot_num)]
implicit none
integer :: i1,j1,i,j
double precision :: c_i1,c_j1
ao_ortho_canonical_nucl_elec_integral = 0.d0
!$OMP PARALLEL DO DEFAULT(none) &
!$OMP PRIVATE(i,j,i1,j1,c_j1,c_i1) &
!$OMP SHARED(mo_tot_num,ao_num,ao_ortho_canonical_coef, &
!$OMP ao_ortho_canonical_nucl_elec_integral, ao_nucl_elec_integral)
do i = 1, mo_tot_num
do j = 1, mo_tot_num
do i1 = 1,ao_num
c_i1 = ao_ortho_canonical_coef(i1,i)
do j1 = 1,ao_num
c_j1 = c_i1*ao_ortho_canonical_coef(j1,j)
ao_ortho_canonical_nucl_elec_integral(j,i) = ao_ortho_canonical_nucl_elec_integral(j,i) + &
c_j1 * ao_nucl_elec_integral(j1,i1)
enddo
enddo
enddo
enddo
!$OMP END PARALLEL DO
END_PROVIDER