10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

read_integrals

This commit is contained in:
Anthony Scemama 2017-09-26 14:54:18 +02:00
parent 2f82cb4ad7
commit 9e791e52d2
3 changed files with 33 additions and 18 deletions

View File

@ -70,23 +70,37 @@ subroutine run
call get_cache_map_n_elements_max(ao_integrals_map,n_elements_max) call get_cache_map_n_elements_max(ao_integrals_map,n_elements_max)
allocate(keys(n_elements_max), values(n_elements_max)) allocate(keys(n_elements_max), values(n_elements_max))
do i8=0_8,ao_integrals_map%map_size ! do i8=0_8,ao_integrals_map%map_size
n_elements = n_elements_max ! n_elements = n_elements_max
call get_cache_map(ao_integrals_map,i8,keys,values,n_elements) ! call get_cache_map(ao_integrals_map,i8,keys,values,n_elements)
do k1=1,n_elements ! do k1=1,n_elements
call bielec_integrals_index_reverse(kk,ii,ll,jj,keys(k1)) ! call bielec_integrals_index_reverse(kk,ii,ll,jj,keys(k1))
if ( (kk(1)>ao_num).or. & ! if ( (kk(1)>ao_num).or. &
(ii(1)>ao_num).or. & ! (ii(1)>ao_num).or. &
(jj(1)>ao_num).or. & ! (jj(1)>ao_num).or. &
(ll(1)>ao_num) ) then ! (ll(1)>ao_num) ) then
cycle ! cycle
! endif
! k = kk(1)
! i = ii(1)
! l = ll(1)
! j = jj(1)
! integral = values(k1)
! write (iunit,'(4(I6,X),F20.15)') k,i,l,j, integral
! enddo
! enddo
do i=1,ao_num
do k=1,ao_num
do j=1,ao_num
do l=1,ao_num
double precision, external :: get_ao_bielec_integral
integral = get_ao_bielec_integral(i,j,k,l,ao_integrals_map)
if (dabs(integral)>=1.e-15) then
write (iunit,'(4(I6),F20.15)') i,j,k,l, integral
endif endif
k = kk(1) enddo
i = ii(1) enddo
l = ll(1)
j = jj(1)
integral = values(k1)
write (iunit,'(4(I5,X),D22.15)') k,i,l,j, integral
enddo enddo
enddo enddo

View File

@ -49,7 +49,7 @@ program print_integrals
double precision :: get_mo_bielec_integral double precision :: get_mo_bielec_integral
integral = get_mo_bielec_integral(i,j,k,l,mo_integrals_map) integral = get_mo_bielec_integral(i,j,k,l,mo_integrals_map)
if (dabs(integral) > mo_integrals_threshold) then if (dabs(integral) > mo_integrals_threshold) then
write (iunit,'(4(I5,X),D22.15)') i,j,k,l, integral write (iunit,'(4(I6,X),F20.15)') i,j,k,l, integral
endif endif
!end if !end if
enddo enddo

View File

@ -68,6 +68,7 @@ subroutine run
call insert_into_ao_integrals_map(n_integrals,buffer_i,buffer_values) call insert_into_ao_integrals_map(n_integrals,buffer_i,buffer_values)
call map_sort(ao_integrals_map) call map_sort(ao_integrals_map)
call map_unique(ao_integrals_map)
call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints',ao_integrals_map) call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints',ao_integrals_map)
call ezfio_set_integrals_bielec_disk_access_ao_integrals('Read') call ezfio_set_integrals_bielec_disk_access_ao_integrals('Read')