10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-06 22:24:00 +01:00
quantum_package/src/Integrals_Monoelec/check_orthonormality.irp.f

32 lines
549 B
Fortran
Raw Normal View History

2014-04-16 22:16:32 +02:00
program check_ortho
implicit none
call do_print
print *, '--'
print *, '--'
call orthonormalize_mos
call do_print
end
subroutine do_print
implicit none
integer :: i,j
real :: off_diag, diag
off_diag = 0.
diag = 0.
do j=1,mo_tot_num
do i=1,mo_tot_num
off_diag += abs(mo_overlap(i,j))
enddo
diag += abs(mo_overlap(j,j))
off_diag -= abs(mo_overlap(j,j))
enddo
print *, 'Diag = ', abs(1.d0-diag/dble(mo_tot_num))
print *, 'Off-Diag = ', off_diag/(dble(mo_tot_num)**2-dble(mo_tot_num))
print *, '--'
end