1
0
mirror of https://gitlab.com/scemama/qp_plugins_scemama.git synced 2024-12-22 12:23:37 +01:00

Update read integrals

This commit is contained in:
Anthony Scemama 2022-12-07 09:53:26 +01:00
parent d8b80f4b55
commit 2d20035e02

View File

@ -104,19 +104,19 @@ subroutine run
! ---------------
PROVIDE ao_integrals_map
allocate(buffer_i(ao_num**3), buffer_values(ao_num**3))
allocate(Vi(4,ao_num**3), V(ao_num**3))
integer*4 :: BUFSIZE
BUFSIZE=ao_num**2
allocate(buffer_i(BUFSIZE), buffer_values(BUFSIZE))
allocate(Vi(4,BUFSIZE), V(BUFSIZE))
integer*8 :: offset, icount
open(unit=104,file='tmp')
offset = 0_8
icount = size(V)
icount = BUFSIZE
rc = TREXIO_SUCCESS
do while (icount == size(V))
rc = trexio_read_ao_2e_int_eri(f, offset, icount, Vi, V)
if (rc /= TREXIO_SUCCESS) then
exit
endif
do m=1,icount
i = Vi(1,m)
j = Vi(2,m)
@ -125,11 +125,16 @@ subroutine run
integral = V(m)
call two_e_integrals_index(i, j, k, l, buffer_i(m) )
buffer_values(m) = integral
write(104,'(4(I5,X),2D22.15)') i,j,k,l, integral
enddo
call insert_into_ao_integrals_map(int(icount,4),buffer_i,buffer_values)
offset = offset + icount
if (rc /= TREXIO_SUCCESS) then
exit
endif
end do
n_integrals = offset
close(104)
call map_sort(ao_integrals_map)
call map_unique(ao_integrals_map)