diff --git a/plugins/read_integral/NEEDED_CHILDREN_MODULES b/plugins/read_integral/NEEDED_CHILDREN_MODULES new file mode 100644 index 00000000..e492a3ce --- /dev/null +++ b/plugins/read_integral/NEEDED_CHILDREN_MODULES @@ -0,0 +1 @@ +Integrals_Monoelec Integrals_Bielec diff --git a/plugins/read_integral/README.rst b/plugins/read_integral/README.rst new file mode 100644 index 00000000..02b63512 --- /dev/null +++ b/plugins/read_integral/README.rst @@ -0,0 +1,30 @@ +============= +read_integral +============= + +Warning: CAN NOT CHANGE THE NUMBER OF MO ! + +Needed Modules +============== +.. Do not edit this section It was auto-generated +.. by the `update_README.py` script. + + +.. image:: tree_dependency.png + +* `Integrals_Monoelec `_ +* `Integrals_Bielec `_ + +Documentation +============= +.. Do not edit this section It was auto-generated +.. by the `update_README.py` script. + + +`print_integrals `_ + Undocumented + + +`run `_ + Undocumented + diff --git a/plugins/read_integral/print_integrals_mo.irp.f b/plugins/read_integral/print_integrals_mo.irp.f new file mode 100644 index 00000000..133e34b8 --- /dev/null +++ b/plugins/read_integral/print_integrals_mo.irp.f @@ -0,0 +1,61 @@ +program print_integrals + implicit none + + integer :: iunit + integer :: getunitandopen + + integer ::i,j,k,l + double precision :: integral + + iunit = getunitandopen('kinetic_mo','w') + do i=1,mo_tot_num + do j=1,mo_tot_num + write(iunit,*) i,j, mo_kinetic_integral(i,j) + enddo + enddo + close(iunit) + + iunit = getunitandopen('overlap_mo','w') + do i=1,mo_tot_num + do j=1,mo_tot_num + write(iunit,*) i,j, mo_overlap(i,j) + enddo + enddo + close(iunit) + + iunit = getunitandopen('nuclear_mo','w') + do i=1,mo_tot_num + do j=1,mo_tot_num + write(iunit,*) i,j, mo_nucl_elec_integral(i,j) + enddo + enddo + close(iunit) + + !iunit = getunitandopen('pseudo_mo','w') + !do i=1,mo_tot_num + ! do j=1,mo_tot_num + ! write(iunit,*) i,j, mo_pseudo_integral(i,j) + ! enddo + !enddo + !close(iunit) + + PROVIDE mo_bielec_integrals_in_map + iunit = getunitandopen('bielec_mo','w') + do l=1,mo_tot_num + do k=1,mo_tot_num + do j=l,mo_tot_num + do i=k,mo_tot_num + !if (i>=j) then + double precision :: get_mo_bielec_integral + integral = get_mo_bielec_integral(i,j,k,l,mo_integrals_map) + if (dabs(integral) > mo_integrals_threshold) then + write (iunit,'(4(I5,X),D22.15)') i,j,k,l, integral + endif + !end if + enddo + enddo + enddo + enddo + + close(iunit) +end diff --git a/plugins/read_integral/read_integrals_mo.irp.f b/plugins/read_integral/read_integrals_mo.irp.f new file mode 100644 index 00000000..e9868e56 --- /dev/null +++ b/plugins/read_integral/read_integrals_mo.irp.f @@ -0,0 +1,66 @@ +program print_integrals + call run +end + +subroutine run + use map_module + implicit none + + integer :: iunit + integer :: getunitandopen + + integer ::i,j,k,l + double precision :: integral + double precision, allocatable :: A(:,:) + + integer :: n_integrals + integer(key_kind), allocatable :: buffer_i(:) + real(integral_kind), allocatable :: buffer_values(:) + integer(key_kind) :: key + + call ezfio_set_mo_basis_mo_tot_num(mo_tot_num) + + allocate (A(mo_tot_num_align,mo_tot_num)) + + iunit = getunitandopen('kinetic_mo','r') + do + read (iunit,*,end=10) i,j, integral + A(i,j) = integral + enddo + 10 continue + close(iunit) + call write_one_e_integrals('mo_kinetic_integral', A, size(A,1), size(A,2)) + + + iunit = getunitandopen('nuclear_mo','r') + do + read (iunit,*,end=12) i,j, integral + A(i,j) = integral + enddo + 12 continue + close(iunit) + call write_one_e_integrals('mo_ne_integral', A, size(A,1), size(A,2)) + + call ezfio_set_integrals_monoelec_disk_access_mo_one_integrals("Read") + + allocate(buffer_i(mo_tot_num**4), buffer_values(mo_tot_num**4)) + + iunit = getunitandopen('bielec_mo','r') + n_integrals=0 + do + read (iunit,*,end=13) i,j,k,l, integral + n_integrals += 1 + call bielec_integrals_index(i, j, k, l, buffer_i(n_integrals) ) + buffer_values(n_integrals) = integral + enddo + 13 continue + close(iunit) + + call insert_into_mo_integrals_map(n_integrals,buffer_i,buffer_values) + + call map_sort(mo_integrals_map) + + call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints',mo_integrals_map) + call ezfio_set_integrals_bielec_disk_access_mo_integrals("Read") + +end diff --git a/plugins/read_integral/tree_dependency.png b/plugins/read_integral/tree_dependency.png new file mode 100644 index 00000000..e69de29b