diff --git a/src/ao_cart_two_e_ints/NEED b/src/ao_cart_two_e_ints/NEED index dba58c3d..7f3c706a 100644 --- a/src/ao_cart_two_e_ints/NEED +++ b/src/ao_cart_two_e_ints/NEED @@ -1,6 +1,6 @@ hamiltonian ao_one_e_ints pseudo -bitmask ao_basis two_e_ints_keywords +electrons diff --git a/src/ao_cart_two_e_ints/cholesky.irp.f b/src/ao_cart_two_e_ints/cholesky.irp.f index be89c766..eb0dc0a9 100644 --- a/src/ao_cart_two_e_ints/cholesky.irp.f +++ b/src/ao_cart_two_e_ints/cholesky.irp.f @@ -12,7 +12,7 @@ double precision function get_ao_cart$_erf_integ_chol(i,j,k,l) end -BEGIN_PROVIDER [ double precision, cholesky_ao_cart$_erf_transp, (cholesky_ao$_erf_cart_num, ao_cart_num, ao_cart_num) ] +BEGIN_PROVIDER [ double precision, cholesky_ao_cart$_erf_transp, (cholesky_ao_cart$_erf_num, ao_cart_num, ao_cart_num) ] implicit none BEGIN_DOC ! Transposed of the Cholesky vectors in AO basis set @@ -86,14 +86,14 @@ END_PROVIDER call wall_time(wall0) ! Will be reallocated at the end - deallocate(cholesky_ao) + deallocate(cholesky_ao_cart$_erf) if (read_ao_cart$_erf_cholesky) then print *, 'Reading Cholesky AO$_erf vectors from disk...' iunit = getUnitAndOpen(trim(ezfio_work_dir)//'cholesky_ao_cart$_erf', 'R') read(iunit) rank - allocate(cholesky_ao(ao_cart_num,ao_cart_num,rank), stat=ierr) - read(iunit) cholesky_ao + allocate(cholesky_ao_cart$_erf(ao_cart_num,ao_cart_num,rank), stat=ierr) + read(iunit) cholesky_ao_cart$_erf close(iunit) cholesky_ao_cart$_erf_num = rank @@ -429,7 +429,7 @@ END_PROVIDER deallocate( addr1, addr2, Delta_col, computed ) - allocate(cholesky_ao(ao_cart_num,ao_cart_num,rank), stat=ierr) + allocate(cholesky_ao_cart$_erf(ao_cart_num,ao_cart_num,rank), stat=ierr) if (ierr /= 0) then call print_memory_usage() @@ -442,7 +442,7 @@ END_PROVIDER !$OMP PARALLEL DO PRIVATE(k,j) do k=1,rank do j=1,ao_cart_num - cholesky_ao(1:ao_cart_num,j,k) = L((j-1_8)*ao_cart_num+1_8:1_8*j*ao_cart_num,rank-k+1) + cholesky_ao_cart$_erf(1:ao_cart_num,j,k) = L((j-1_8)*ao_cart_num+1_8:1_8*j*ao_cart_num,rank-k+1) enddo enddo !$OMP END PARALLEL DO @@ -453,9 +453,9 @@ END_PROVIDER if (write_ao_cart$_erf_cholesky) then print *, 'Writing Cholesky AO$_erf vectors to disk...' - iunit = getUnitAndOpen(trim(ezfio_work_dir)//'cholesky_ao_cart', 'W') + iunit = getUnitAndOpen(trim(ezfio_work_dir)//'cholesky_ao_cart$_erf', 'W') write(iunit) rank - write(iunit) cholesky_ao_cart + write(iunit) cholesky_ao_cart$_erf close(iunit) call ezfio_set_ao_cart_two_e_ints_io_ao_cart$_erf_cholesky('Read') endif diff --git a/src/ao_cart_two_e_ints/two_e_integrals.irp.f b/src/ao_cart_two_e_ints/two_e_integrals.irp.f index 7afb3095..e1f475ee 100644 --- a/src/ao_cart_two_e_ints/two_e_integrals.irp.f +++ b/src/ao_cart_two_e_ints/two_e_integrals.irp.f @@ -1,4 +1,3 @@ - ! --- logical function do_schwartz_accel(i,j,k,l) @@ -360,41 +359,6 @@ integer function ao_cart_l4(i,j,k,l) ao_cart_l4 = ao_cart_l(i)*ao_cart_l(j)*ao_cart_l(k)*ao_cart_l(l) end - - -subroutine compute_ao_cart_two_e_integrals(j,k,l,sze,buffer_value) - implicit none - - BEGIN_DOC - ! Compute AO 1/r12 integrals for all i and fixed j,k,l - END_DOC - - include 'utils/constants.include.F' - integer, intent(in) :: j,k,l,sze - real(integral_kind), intent(out) :: buffer_value(sze) - double precision :: ao_cart_two_e_integral - - integer :: i - logical, external :: ao_cart_one_e_integral_zero - logical, external :: ao_cart_two_e_integral_zero - - - if (ao_cart_one_e_integral_zero(j,l)) then - buffer_value = 0._integral_kind - return - endif - - do i = 1, ao_cart_num - if (ao_cart_two_e_integral_zero(i,j,k,l)) then - buffer_value(i) = 0._integral_kind - cycle - endif - !DIR$ FORCEINLINE - buffer_value(i) = ao_cart_two_e_integral(i,k,j,l) - enddo - -end - BEGIN_PROVIDER [ double precision, ao_cart_two_e_integral_schwartz, (ao_cart_num, ao_cart_num) ] BEGIN_DOC diff --git a/src/ao_cart_two_e_ints/two_e_integrals_erf.irp.f b/src/ao_cart_two_e_ints/two_e_integrals_erf.irp.f index 2f19fb41..ed2f3495 100644 --- a/src/ao_cart_two_e_ints/two_e_integrals_erf.irp.f +++ b/src/ao_cart_two_e_ints/two_e_integrals_erf.irp.f @@ -276,48 +276,6 @@ double precision function ao_cart_two_e_integral_schwartz_accel_erf(i,j,k,l) end - -subroutine compute_ao_cart_two_e_integrals_erf(j,k,l,sze,buffer_value) - implicit none - use map_module - - BEGIN_DOC - ! Compute AO 1/r12 integrals for all i and fixed j,k,l - END_DOC - - include 'utils/constants.include.F' - integer, intent(in) :: j,k,l,sze - real(integral_kind), intent(out) :: buffer_value(sze) - double precision :: ao_cart_two_e_integral_erf - - integer :: i - logical, external :: ao_cart_one_e_integral_zero - logical, external :: ao_cart_two_e_integral_zero - - if (ao_cart_one_e_integral_zero(j,l)) then - buffer_value = 0._integral_kind - return - endif - if (ao_cart_two_e_integral_erf_schwartz(j,l) < thresh ) then - buffer_value = 0._integral_kind - return - endif - - do i = 1, ao_cart_num - if (ao_cart_two_e_integral_zero(i,j,k,l)) then - buffer_value(i) = 0._integral_kind - cycle - endif - if (ao_cart_two_e_integral_erf_schwartz(i,k)*ao_cart_two_e_integral_erf_schwartz(j,l) < thresh ) then - buffer_value(i) = 0._integral_kind - cycle - endif - !DIR$ FORCEINLINE - buffer_value(i) = ao_cart_two_e_integral_erf(i,k,j,l) - enddo - -end - double precision function general_primitive_integral_erf(dim, & P_new,P_center,fact_p,p,p_inv,iorder_p, & Q_new,Q_center,fact_q,q,q_inv,iorder_q) diff --git a/src/two_e_ints_keywords/EZFIO.cfg b/src/two_e_ints_keywords/EZFIO.cfg index 1be271ac..a704a943 100644 --- a/src/two_e_ints_keywords/EZFIO.cfg +++ b/src/two_e_ints_keywords/EZFIO.cfg @@ -11,7 +11,6 @@ doc: If | (ii|jj) | < `ao_cholesky_threshold` then (ii|jj) is zero interface: ezfio,provider,ocaml default: 1.e-12 - [do_ao_cholesky] type: logical doc: Perform Cholesky decomposition of AO integrals @@ -23,3 +22,21 @@ type: logical doc: If true, use only the long range part of the two-electron integrals instead of 1/r12 interface: ezfio, provider, ocaml default: False + +[io_ao_cart_cholesky] +type: Disk_access +doc: Read/Write |AO| Cholesky integrals from/to disk [ Write | Read | None ] +interface: ezfio,provider,ocaml +default: None + +[io_ao_cart_erf_cholesky] +type: Disk_access +doc: Read/Write |AO| Cholesky ERF integrals from/to disk [ Write | Read | None ] +interface: ezfio,provider,ocaml +default: None + +[io_ao_cart_cgtos_cholesky] +type: Disk_access +doc: Read/Write |AO| Cholesky CGTOS integrals from/to disk [ Write | Read | None ] +interface: ezfio,provider,ocaml +default: None