10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 20:35:19 +01:00
quantum_package/plugins/FourIdx/four_idx.irp.f
2017-09-25 20:23:50 +02:00

45 lines
1.3 KiB
Fortran

program FourIdx
use map_module
implicit none
BEGIN_DOC
! Performs a four index transformation of the two-electron integrals
END_DOC
type(map_type) :: test_map
integer(key_kind) :: key_max
integer(map_size_kind) :: sze
call bielec_integrals_index(ao_num,ao_num,ao_num,ao_num,key_max)
sze = key_max
call map_init(test_map,sze)
call four_index_transform(ao_integrals_map,test_map, &
mo_coef, size(mo_coef,1), &
1, 1, 1, 1, ao_num, ao_num, ao_num, ao_num, &
1, 1, 1, 1, mo_tot_num, mo_tot_num, mo_tot_num, mo_tot_num)
integer :: i,j,k,l
real(integral_kind) :: integral1, integral2
provide mo_bielec_integrals_in_map
do i=1,mo_tot_num
do j=1,mo_tot_num
do k=1,mo_tot_num
do l=1,mo_tot_num
call bielec_integrals_index(i,j,k,l,key_max)
call map_get(test_map,key_max,integral1)
call map_get(mo_integrals_map,key_max,integral2)
if (dabs(integral2) >=1.d-10 ) then
if (dabs(integral1 / integral2 -1.d0) > .001d0) then
print *, i,j,k,l
print *, integral1, integral2
print *, ''
endif
endif
enddo
enddo
enddo
enddo
end