diff --git a/data/module_gitignore b/data/module_gitignore index 3f4d78b6..f5461472 100644 --- a/data/module_gitignore +++ b/data/module_gitignore @@ -1,19 +1,20 @@ # Automatically created by $QP_ROOT/scripts/module/module_handler.py .ninja_deps .ninja_log -/home/scemama/quantum_package/src/tools/diagonalize_h -/home/scemama/quantum_package/src/tools/fcidump -/home/scemama/quantum_package/src/tools/four_idx_transform -/home/scemama/quantum_package/src/tools/molden -/home/scemama/quantum_package/src/tools/save_natorb -/home/scemama/quantum_package/src/tools/save_ortho_mos -/home/scemama/quantum_package/src/tools/write_integrals_erf +/vortex/u/eginer/qp_toto/quantum_package/src/tools/diagonalize_h +/vortex/u/eginer/qp_toto/quantum_package/src/tools/fcidump +/vortex/u/eginer/qp_toto/quantum_package/src/tools/four_idx_transform +/vortex/u/eginer/qp_toto/quantum_package/src/tools/molden +/vortex/u/eginer/qp_toto/quantum_package/src/tools/save_natorb +/vortex/u/eginer/qp_toto/quantum_package/src/tools/save_ortho_mos +/vortex/u/eginer/qp_toto/quantum_package/src/tools/write_integrals_erf IRPF90_man IRPF90_temp Makefile Makefile.depend ao_basis ao_one_e_integrals +ao_two_e_erf_integrals ao_two_e_integrals bitmask davidson @@ -31,6 +32,7 @@ iterations mo_basis mo_guess mo_one_e_integrals +mo_two_e_erf_integrals mo_two_e_integrals mpi mrpt_utils diff --git a/scripts/module/qp_plugins b/scripts/module/qp_plugins index 7979b61c..8d4f8a91 100755 --- a/scripts/module/qp_plugins +++ b/scripts/module/qp_plugins @@ -6,7 +6,7 @@ Usage: qp_plugins download qp_plugins install ... qp_plugins uninstall - qp_plugins create -n [...] + qp_plugins create -n [...] Options: list List all the plugins diff --git a/src/ao_two_e_erf_integrals/EZFIO.cfg b/src/ao_two_e_erf_integrals/EZFIO.cfg new file mode 100644 index 00000000..2df5c2ff --- /dev/null +++ b/src/ao_two_e_erf_integrals/EZFIO.cfg @@ -0,0 +1,13 @@ +[disk_access_ao_integrals_erf] +type: Disk_access +doc: Read/Write |AO| integrals with the long range interaction from/to disk [ Write | Read | None ] +interface: ezfio,provider,ocaml +default: None + +[mu_erf] +type: double precision +doc: cutting of the interaction in the range separated model +interface: ezfio,provider,ocaml +default: 0.5 +ezfio_name: mu_erf + diff --git a/src/ao_two_e_erf_integrals/NEED b/src/ao_two_e_erf_integrals/NEED new file mode 100644 index 00000000..842a7f5d --- /dev/null +++ b/src/ao_two_e_erf_integrals/NEED @@ -0,0 +1 @@ +ao_two_e_integrals diff --git a/src/ao_two_e_integrals/integrals_erf_in_map_slave.irp.f b/src/ao_two_e_erf_integrals/integrals_erf_in_map_slave.irp.f similarity index 100% rename from src/ao_two_e_integrals/integrals_erf_in_map_slave.irp.f rename to src/ao_two_e_erf_integrals/integrals_erf_in_map_slave.irp.f diff --git a/src/ao_two_e_integrals/map_integrals_erf.irp.f b/src/ao_two_e_erf_integrals/map_integrals_erf.irp.f similarity index 100% rename from src/ao_two_e_integrals/map_integrals_erf.irp.f rename to src/ao_two_e_erf_integrals/map_integrals_erf.irp.f diff --git a/src/ao_two_e_integrals/providers_ao_erf.irp.f b/src/ao_two_e_erf_integrals/providers_ao_erf.irp.f similarity index 98% rename from src/ao_two_e_integrals/providers_ao_erf.irp.f rename to src/ao_two_e_erf_integrals/providers_ao_erf.irp.f index dbb6f506..dd7330a6 100644 --- a/src/ao_two_e_integrals/providers_ao_erf.irp.f +++ b/src/ao_two_e_erf_integrals/providers_ao_erf.irp.f @@ -90,7 +90,7 @@ BEGIN_PROVIDER [ logical, ao_bielec_integrals_erf_in_map ] if (write_ao_integrals_erf) then call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints_erf',ao_integrals_erf_map) - call ezfio_set_ao_two_e_integrals_disk_access_ao_integrals_erf("Read") + call ezfio_set_ao_two_e_erf_integrals_disk_access_ao_integrals_erf("Read") endif END_PROVIDER diff --git a/src/ao_two_e_erf_integrals/read_write_erf.irp.f b/src/ao_two_e_erf_integrals/read_write_erf.irp.f new file mode 100644 index 00000000..5e3e5361 --- /dev/null +++ b/src/ao_two_e_erf_integrals/read_write_erf.irp.f @@ -0,0 +1,27 @@ + BEGIN_PROVIDER [ logical, read_ao_integrals_erf ] +&BEGIN_PROVIDER [ logical, write_ao_integrals_erf ] + implicit none + + BEGIN_DOC + ! Flag to read or write the |AO| erf integrals + END_DOC + + if (disk_access_ao_integrals_erf.EQ.'Read') then + read_ao_integrals_erf = .True. + write_ao_integrals_erf = .False. + + else if (disk_access_ao_integrals_erf.EQ.'Write') then + read_ao_integrals_erf = .False. + write_ao_integrals_erf = .True. + + else if (disk_access_ao_integrals_erf.EQ.'None') then + read_ao_integrals_erf = .False. + write_ao_integrals_erf = .False. + + else + print *, 'disk_access_ao_integrals_erf has a wrong type' + stop 1 + + endif + +END_PROVIDER diff --git a/src/ao_two_e_integrals/routines_save_integrals_erf.irp.f b/src/ao_two_e_erf_integrals/routines_save_integrals_erf.irp.f similarity index 88% rename from src/ao_two_e_integrals/routines_save_integrals_erf.irp.f rename to src/ao_two_e_erf_integrals/routines_save_integrals_erf.irp.f index ea6f9db8..a2544cc0 100644 --- a/src/ao_two_e_integrals/routines_save_integrals_erf.irp.f +++ b/src/ao_two_e_erf_integrals/routines_save_integrals_erf.irp.f @@ -4,7 +4,7 @@ subroutine save_erf_bi_elec_integrals_ao PROVIDE ao_bielec_integrals_erf_in_map call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/ao_ints_erf',ao_integrals_erf_map) - call ezfio_set_ao_two_e_integrals_disk_access_ao_integrals('Read') + call ezfio_set_ao_two_e_erf_integrals_disk_access_ao_integrals_erf('Read') end subroutine save_erf_bielec_ints_ao_into_ints_ao diff --git a/src/ao_two_e_integrals/two_e_integrals_erf.irp.f b/src/ao_two_e_erf_integrals/two_e_integrals_erf.irp.f similarity index 100% rename from src/ao_two_e_integrals/two_e_integrals_erf.irp.f rename to src/ao_two_e_erf_integrals/two_e_integrals_erf.irp.f diff --git a/src/ao_two_e_integrals/EZFIO.cfg b/src/ao_two_e_integrals/EZFIO.cfg index ba619e01..929f06b4 100644 --- a/src/ao_two_e_integrals/EZFIO.cfg +++ b/src/ao_two_e_integrals/EZFIO.cfg @@ -4,12 +4,6 @@ doc: Read/Write |AO| integrals from/to disk [ Write | Read | None ] interface: ezfio,provider,ocaml default: None -[disk_access_ao_integrals_erf] -type: Disk_access -doc: Read/Write |AO| integrals with the long range interaction from/to disk [ Write | Read | None ] -interface: ezfio,provider,ocaml -default: None - [ao_integrals_threshold] type: Threshold doc: If | (pq|rs) | < `ao_integrals_threshold` then (pq|rs) is zero @@ -24,10 +18,3 @@ interface: ezfio,provider,ocaml default: False ezfio_name: direct -[mu_erf] -type: double precision -doc: cutting of the interaction in the range separated model -interface: ezfio,provider,ocaml -default: 0.5 -ezfio_name: mu_erf - diff --git a/src/ao_two_e_integrals/read_write.irp.f b/src/ao_two_e_integrals/read_write.irp.f index e86d47c0..7a98d5a6 100644 --- a/src/ao_two_e_integrals/read_write.irp.f +++ b/src/ao_two_e_integrals/read_write.irp.f @@ -24,32 +24,4 @@ endif -END_PROVIDER - - BEGIN_PROVIDER [ logical, read_ao_integrals_erf ] -&BEGIN_PROVIDER [ logical, write_ao_integrals_erf ] - implicit none - - BEGIN_DOC - ! Flag to read or write the |AO| erf integrals - END_DOC - - if (disk_access_ao_integrals_erf.EQ.'Read') then - read_ao_integrals_erf = .True. - write_ao_integrals_erf = .False. - - else if (disk_access_ao_integrals_erf.EQ.'Write') then - read_ao_integrals_erf = .False. - write_ao_integrals_erf = .True. - - else if (disk_access_ao_integrals_erf.EQ.'None') then - read_ao_integrals_erf = .False. - write_ao_integrals_erf = .False. - - else - print *, 'disk_access_ao_integrals_erf has a wrong type' - stop 1 - - endif - END_PROVIDER diff --git a/src/dft_utils_one_e/NEED b/src/dft_utils_one_e/NEED index a7a531f8..abda94d1 100644 --- a/src/dft_utils_one_e/NEED +++ b/src/dft_utils_one_e/NEED @@ -4,3 +4,5 @@ mo_one_e_integrals mo_two_e_integrals ao_one_e_integrals ao_two_e_integrals +mo_two_e_erf_integrals +ao_two_e_erf_integrals diff --git a/src/dft_utils_two_body/psi_energy_erf.irp.f b/src/dft_utils_two_body/psi_energy_erf.irp.f index 9c995ec7..05ac19ec 100644 --- a/src/dft_utils_two_body/psi_energy_erf.irp.f +++ b/src/dft_utils_two_body/psi_energy_erf.irp.f @@ -61,19 +61,19 @@ END_PROVIDER do j= 1, elec_alpha_num do i = j+1, elec_alpha_num - bi_elec_ref_bitmask_energy_erf += mo_bielec_integral_erf_jj_anti(occ(i,1),occ(j,1)) - ref_bitmask_energy_erf += mo_bielec_integral_erf_jj_anti(occ(i,1),occ(j,1)) + bi_elec_ref_bitmask_energy_erf += mo_two_e_int_erf_jj_anti(occ(i,1),occ(j,1)) + ref_bitmask_energy_erf += mo_two_e_int_erf_jj_anti(occ(i,1),occ(j,1)) enddo enddo do j= 1, elec_beta_num do i = j+1, elec_beta_num - bi_elec_ref_bitmask_energy_erf += mo_bielec_integral_erf_jj_anti(occ(i,2),occ(j,2)) - ref_bitmask_energy_erf += mo_bielec_integral_erf_jj_anti(occ(i,2),occ(j,2)) + bi_elec_ref_bitmask_energy_erf += mo_two_e_int_erf_jj_anti(occ(i,2),occ(j,2)) + ref_bitmask_energy_erf += mo_two_e_int_erf_jj_anti(occ(i,2),occ(j,2)) enddo do i= 1, elec_alpha_num - bi_elec_ref_bitmask_energy_erf += mo_bielec_integral_erf_jj(occ(i,1),occ(j,2)) - ref_bitmask_energy_erf += mo_bielec_integral_erf_jj(occ(i,1),occ(j,2)) + bi_elec_ref_bitmask_energy_erf += mo_two_e_int_erf_jj(occ(i,1),occ(j,2)) + ref_bitmask_energy_erf += mo_two_e_int_erf_jj(occ(i,1),occ(j,2)) enddo enddo diff --git a/src/dft_utils_two_body/slater_rules_erf.irp.f b/src/dft_utils_two_body/slater_rules_erf.irp.f index 91c15c07..a1c3fd09 100644 --- a/src/dft_utils_two_body/slater_rules_erf.irp.f +++ b/src/dft_utils_two_body/slater_rules_erf.irp.f @@ -20,7 +20,7 @@ subroutine i_H_j_erf(key_i,key_j,Nint,hij) integer :: occ(Nint*bit_kind_size,2) double precision :: diag_H_mat_elem_erf, phase,phase_2 integer :: n_occ_ab(2) - PROVIDE mo_bielec_integrals_erf_in_map mo_integrals_erf_map big_array_exchange_integrals_erf + PROVIDE mo_bielec_integrals_erf_in_map mo_integrals_erf_map int_erf_3_index_exc ASSERT (Nint > 0) ASSERT (Nint == N_int) @@ -39,9 +39,9 @@ subroutine i_H_j_erf(key_i,key_j,Nint,hij) if (exc(0,1,1) == 1) then ! Mono alpha, mono beta if(exc(1,1,1) == exc(1,2,2) )then - hij = phase * big_array_exchange_integrals_erf(exc(1,1,1),exc(1,1,2),exc(1,2,1)) + hij = phase * int_erf_3_index_exc(exc(1,1,1),exc(1,1,2),exc(1,2,1)) else if (exc(1,2,1) ==exc(1,1,2))then - hij = phase * big_array_exchange_integrals_erf(exc(1,2,1),exc(1,1,1),exc(1,2,2)) + hij = phase * int_erf_3_index_exc(exc(1,2,1),exc(1,1,1),exc(1,2,2)) else hij = phase*get_mo_bielec_integral_erf( & exc(1,1,1), & @@ -84,10 +84,10 @@ subroutine i_H_j_erf(key_i,key_j,Nint,hij) p = exc(1,2,1) spin = 1 do i = 1, n_occ_ab(1) - hij += -big_array_exchange_integrals_erf(occ(i,1),m,p) + big_array_coulomb_integrals_erf(occ(i,1),m,p) + hij += -int_erf_3_index_exc(occ(i,1),m,p) + int_erf_3_index(occ(i,1),m,p) enddo do i = 1, n_occ_ab(2) - hij += big_array_coulomb_integrals_erf(occ(i,2),m,p) + hij += int_erf_3_index(occ(i,2),m,p) enddo else ! Mono beta @@ -95,10 +95,10 @@ subroutine i_H_j_erf(key_i,key_j,Nint,hij) p = exc(1,2,2) spin = 2 do i = 1, n_occ_ab(2) - hij += -big_array_exchange_integrals_erf(occ(i,2),m,p) + big_array_coulomb_integrals_erf(occ(i,2),m,p) + hij += -int_erf_3_index_exc(occ(i,2),m,p) + int_erf_3_index(occ(i,2),m,p) enddo do i = 1, n_occ_ab(1) - hij += big_array_coulomb_integrals_erf(occ(i,1),m,p) + hij += int_erf_3_index(occ(i,1),m,p) enddo endif hij = hij * phase @@ -124,21 +124,21 @@ double precision function diag_H_mat_elem_erf(key_i,Nint) ! alpha - alpha do i = 1, n_occ_ab(1) do j = i+1, n_occ_ab(1) - diag_H_mat_elem_erf += mo_bielec_integral_erf_jj_anti(occ(i,1),occ(j,1)) + diag_H_mat_elem_erf += mo_two_e_int_erf_jj_anti(occ(i,1),occ(j,1)) enddo enddo ! beta - beta do i = 1, n_occ_ab(2) do j = i+1, n_occ_ab(2) - diag_H_mat_elem_erf += mo_bielec_integral_erf_jj_anti(occ(i,2),occ(j,2)) + diag_H_mat_elem_erf += mo_two_e_int_erf_jj_anti(occ(i,2),occ(j,2)) enddo enddo ! alpha - beta do i = 1, n_occ_ab(1) do j = 1, n_occ_ab(2) - diag_H_mat_elem_erf += mo_bielec_integral_erf_jj(occ(i,1),occ(j,2)) + diag_H_mat_elem_erf += mo_two_e_int_erf_jj(occ(i,1),occ(j,2)) enddo enddo end @@ -155,7 +155,7 @@ subroutine i_H_j_mono_spin_erf(key_i,key_j,Nint,spin,hij) integer :: exc(0:2,2) double precision :: phase - PROVIDE big_array_exchange_integrals_erf mo_bielec_integrals_erf_in_map + PROVIDE int_erf_3_index_exc mo_bielec_integrals_erf_in_map call i_H_j_erf(key_i,key_j,Nint,hij) end @@ -176,7 +176,7 @@ subroutine i_H_j_double_spin_erf(key_i,key_j,Nint,hij) double precision :: phase double precision, external :: get_mo_bielec_integral_erf - PROVIDE big_array_exchange_integrals_erf mo_bielec_integrals_erf_in_map + PROVIDE int_erf_3_index_exc mo_bielec_integrals_erf_in_map call get_double_excitation_spin(key_i,key_j,exc,phase,Nint) hij = phase*(get_mo_bielec_integral_erf( & @@ -205,15 +205,15 @@ subroutine i_H_j_double_alpha_beta_erf(key_i,key_j,Nint,hij) double precision :: phase, phase2 double precision, external :: get_mo_bielec_integral_erf - PROVIDE big_array_exchange_integrals_erf mo_bielec_integrals_erf_in_map + PROVIDE int_erf_3_index_exc mo_bielec_integrals_erf_in_map call get_mono_excitation_spin(key_i(1,1),key_j(1,1),exc(0,1,1),phase,Nint) call get_mono_excitation_spin(key_i(1,2),key_j(1,2),exc(0,1,2),phase2,Nint) phase = phase*phase2 if (exc(1,1,1) == exc(1,2,2)) then - hij = phase * big_array_exchange_integrals_erf(exc(1,1,1),exc(1,1,2),exc(1,2,1)) + hij = phase * int_erf_3_index_exc(exc(1,1,1),exc(1,1,2),exc(1,2,1)) else if (exc(1,2,1) == exc(1,1,2)) then - hij = phase * big_array_exchange_integrals_erf(exc(1,2,1),exc(1,1,1),exc(1,2,2)) + hij = phase * int_erf_3_index_exc(exc(1,2,1),exc(1,1,1),exc(1,2,2)) else hij = phase*get_mo_bielec_integral_erf( & exc(1,1,1), & diff --git a/src/mo_two_e_erf_integrals/EZFIO.cfg b/src/mo_two_e_erf_integrals/EZFIO.cfg new file mode 100644 index 00000000..5c882d60 --- /dev/null +++ b/src/mo_two_e_erf_integrals/EZFIO.cfg @@ -0,0 +1,6 @@ +[disk_access_mo_integrals_erf] +type: Disk_access +doc: Read/Write MO integrals with the long range interaction from/to disk [ Write | Read | None ] +interface: ezfio,provider,ocaml +default: None + diff --git a/src/mo_two_e_erf_integrals/NEED b/src/mo_two_e_erf_integrals/NEED new file mode 100644 index 00000000..525f3eba --- /dev/null +++ b/src/mo_two_e_erf_integrals/NEED @@ -0,0 +1,3 @@ +ao_two_e_erf_integrals +mo_two_e_integrals +mo_basis diff --git a/src/mo_two_e_erf_integrals/README.rst b/src/mo_two_e_erf_integrals/README.rst new file mode 100644 index 00000000..ecd34cbc --- /dev/null +++ b/src/mo_two_e_erf_integrals/README.rst @@ -0,0 +1,20 @@ +====================== +mo_two_e_erf_integrals +====================== + +Here, all two-electron integrals (:math:`erf({\mu}_{erf} * r_{12})/r_{12}`) are computed. +As they have 4 indices and many are zero, they are stored in a map, as defined +in :file:`Utils/map_module.f90`. + +The range separation parameter :math:`{\mu}_{erf}` is the variable :option:`ao_two_e_erf_integrals mu_erf`. + +To fetch an |MO| integral, use +`get_mo_bielec_integral_erf(i,j,k,l,mo_integrals_map_erf)` + +The conventions are: + +* For |MO| integrals : = <12|12> + +Be aware that it might not be the same conventions for |MO| and |AO| integrals. + + diff --git a/src/mo_two_e_erf_integrals/core_quantities_erf.irp.f b/src/mo_two_e_erf_integrals/core_quantities_erf.irp.f new file mode 100644 index 00000000..9ff4672d --- /dev/null +++ b/src/mo_two_e_erf_integrals/core_quantities_erf.irp.f @@ -0,0 +1,38 @@ +BEGIN_PROVIDER [double precision, core_energy_erf] + implicit none + BEGIN_DOC +! energy from the core : contains all core-core contributionswith the erf interaction + END_DOC + integer :: i,j,k,l + core_energy_erf = 0.d0 + do i = 1, n_core_orb + j = list_core(i) + core_energy_erf += 2.d0 * mo_mono_elec_integral(j,j) + mo_two_e_int_erf_jj(j,j) + do k = i+1, n_core_orb + l = list_core(k) + core_energy_erf += 2.d0 * (2.d0 * mo_two_e_int_erf_jj(j,l) - mo_two_e_int_erf_jj_exchange(j,l)) + enddo + enddo + core_energy_erf += nuclear_repulsion + +END_PROVIDER + +BEGIN_PROVIDER [double precision, core_fock_operator_erf, (mo_tot_num,mo_tot_num)] + implicit none + integer :: i,j,k,l,m,n + double precision :: get_mo_bielec_integral_erf + BEGIN_DOC +! this is the contribution to the Fock operator from the core electrons with the erf interaction + END_DOC + core_fock_operator_erf = 0.d0 + do i = 1, n_act_orb + j = list_act(i) + do k = 1, n_act_orb + l = list_act(k) + do m = 1, n_core_orb + n = list_core(m) + core_fock_operator_erf(j,l) += 2.d0 * get_mo_bielec_integral_erf(j,n,l,n,mo_integrals_erf_map) - get_mo_bielec_integral_erf(j,n,n,l,mo_integrals_erf_map) + enddo + enddo + enddo +END_PROVIDER diff --git a/src/mo_two_e_erf_integrals/ints_erf_3_index.irp.f b/src/mo_two_e_erf_integrals/ints_erf_3_index.irp.f new file mode 100644 index 00000000..bd3da12b --- /dev/null +++ b/src/mo_two_e_erf_integrals/ints_erf_3_index.irp.f @@ -0,0 +1,28 @@ + BEGIN_PROVIDER [double precision, int_erf_3_index, (mo_tot_num,mo_tot_num, mo_tot_num)] +&BEGIN_PROVIDER [double precision, int_erf_3_index_exc,(mo_tot_num,mo_tot_num, mo_tot_num)] + implicit none + BEGIN_DOC + ! int_erf_3_index(i,j) = = (ii|jj) with the erf interaction + ! + ! int_erf_3_index_exc(i,j) = = (ij|ij) with the erf interaction + END_DOC + integer :: i,j,k,l + double precision :: get_mo_bielec_integral_erf + double precision :: integral + + do k = 1, mo_tot_num + do i = 1, mo_tot_num + do j = 1, mo_tot_num + l = j + integral = get_mo_bielec_integral_erf(i,j,k,l,mo_integrals_erf_map) + int_erf_3_index(j,i,k) = integral + l = j + integral = get_mo_bielec_integral_erf(i,j,l,k,mo_integrals_erf_map) + int_erf_3_index_exc(j,i,k) = integral + enddo + enddo + enddo + + +END_PROVIDER + diff --git a/src/mo_two_e_integrals/map_integrals_erf.irp.f b/src/mo_two_e_erf_integrals/map_integrals_erf.irp.f similarity index 100% rename from src/mo_two_e_integrals/map_integrals_erf.irp.f rename to src/mo_two_e_erf_integrals/map_integrals_erf.irp.f diff --git a/src/mo_two_e_integrals/mo_bi_integrals_erf.irp.f b/src/mo_two_e_erf_integrals/mo_bi_integrals_erf.irp.f similarity index 89% rename from src/mo_two_e_integrals/mo_bi_integrals_erf.irp.f rename to src/mo_two_e_erf_integrals/mo_bi_integrals_erf.irp.f index f7fed284..fe87d332 100644 --- a/src/mo_two_e_integrals/mo_bi_integrals_erf.irp.f +++ b/src/mo_two_e_erf_integrals/mo_bi_integrals_erf.irp.f @@ -55,15 +55,15 @@ BEGIN_PROVIDER [ logical, mo_bielec_integrals_erf_in_map ] if (write_mo_integrals_erf) then call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints_erf',mo_integrals_erf_map) - call ezfio_set_mo_two_e_integrals_disk_access_mo_integrals_erf("Read") + call ezfio_set_mo_two_e_erf_integrals_disk_access_mo_integrals_erf("Read") endif END_PROVIDER - BEGIN_PROVIDER [ double precision, mo_bielec_integral_erf_jj_from_ao, (mo_tot_num,mo_tot_num) ] -&BEGIN_PROVIDER [ double precision, mo_bielec_integral_erf_jj_exchange_from_ao, (mo_tot_num,mo_tot_num) ] -&BEGIN_PROVIDER [ double precision, mo_bielec_integral_erf_jj_anti_from_ao, (mo_tot_num,mo_tot_num) ] + BEGIN_PROVIDER [ double precision, mo_two_e_int_erf_jj_from_ao, (mo_tot_num,mo_tot_num) ] +&BEGIN_PROVIDER [ double precision, mo_two_e_int_erf_jj_exchange_from_ao, (mo_tot_num,mo_tot_num) ] +&BEGIN_PROVIDER [ double precision, mo_two_e_int_erf_jj_anti_from_ao, (mo_tot_num,mo_tot_num) ] BEGIN_DOC ! mo_bielec_integral_jj_from_ao(i,j) = J_ij ! mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij @@ -83,8 +83,8 @@ END_PROVIDER PROVIDE ao_bielec_integrals_erf_in_map mo_coef endif - mo_bielec_integral_erf_jj_from_ao = 0.d0 - mo_bielec_integral_erf_jj_exchange_from_ao = 0.d0 + mo_two_e_int_erf_jj_from_ao = 0.d0 + mo_two_e_int_erf_jj_exchange_from_ao = 0.d0 !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: iqrs, iqsr @@ -94,7 +94,7 @@ END_PROVIDER !$OMP iqrs, iqsr,iqri,iqis) & !$OMP SHARED(mo_tot_num,mo_coef_transp,ao_num,& !$OMP ao_integrals_threshold,do_direct_integrals) & - !$OMP REDUCTION(+:mo_bielec_integral_erf_jj_from_ao,mo_bielec_integral_erf_jj_exchange_from_ao) + !$OMP REDUCTION(+:mo_two_e_int_erf_jj_from_ao,mo_two_e_int_erf_jj_exchange_from_ao) allocate( int_value(ao_num), int_idx(ao_num), & iqrs(mo_tot_num,ao_num), iqis(mo_tot_num), iqri(mo_tot_num),& @@ -177,8 +177,8 @@ END_PROVIDER !DIR$ VECTOR ALIGNED do j=1,mo_tot_num c = mo_coef_transp(j,q)*mo_coef_transp(j,s) - mo_bielec_integral_erf_jj_from_ao(j,i) += c * iqis(i) - mo_bielec_integral_erf_jj_exchange_from_ao(j,i) += c * iqri(i) + mo_two_e_int_erf_jj_from_ao(j,i) += c * iqis(i) + mo_two_e_int_erf_jj_exchange_from_ao(j,i) += c * iqri(i) enddo enddo @@ -188,16 +188,16 @@ END_PROVIDER deallocate(iqrs,iqsr,int_value,int_idx) !$OMP END PARALLEL - mo_bielec_integral_erf_jj_anti_from_ao = mo_bielec_integral_erf_jj_from_ao - mo_bielec_integral_erf_jj_exchange_from_ao + mo_two_e_int_erf_jj_anti_from_ao = mo_two_e_int_erf_jj_from_ao - mo_two_e_int_erf_jj_exchange_from_ao ! end END_PROVIDER - BEGIN_PROVIDER [ double precision, mo_bielec_integral_erf_jj, (mo_tot_num,mo_tot_num) ] -&BEGIN_PROVIDER [ double precision, mo_bielec_integral_erf_jj_exchange, (mo_tot_num,mo_tot_num) ] -&BEGIN_PROVIDER [ double precision, mo_bielec_integral_erf_jj_anti, (mo_tot_num,mo_tot_num) ] + BEGIN_PROVIDER [ double precision, mo_two_e_int_erf_jj, (mo_tot_num,mo_tot_num) ] +&BEGIN_PROVIDER [ double precision, mo_two_e_int_erf_jj_exchange, (mo_tot_num,mo_tot_num) ] +&BEGIN_PROVIDER [ double precision, mo_two_e_int_erf_jj_anti, (mo_tot_num,mo_tot_num) ] implicit none BEGIN_DOC ! mo_bielec_integral_jj(i,j) = J_ij @@ -209,14 +209,14 @@ END_PROVIDER double precision :: get_mo_bielec_integral_erf PROVIDE mo_bielec_integrals_erf_in_map - mo_bielec_integral_erf_jj = 0.d0 - mo_bielec_integral_erf_jj_exchange = 0.d0 + mo_two_e_int_erf_jj = 0.d0 + mo_two_e_int_erf_jj_exchange = 0.d0 do j=1,mo_tot_num do i=1,mo_tot_num - mo_bielec_integral_erf_jj(i,j) = get_mo_bielec_integral_erf(i,j,i,j,mo_integrals_erf_map) - mo_bielec_integral_erf_jj_exchange(i,j) = get_mo_bielec_integral_erf(i,j,j,i,mo_integrals_erf_map) - mo_bielec_integral_erf_jj_anti(i,j) = mo_bielec_integral_erf_jj(i,j) - mo_bielec_integral_erf_jj_exchange(i,j) + mo_two_e_int_erf_jj(i,j) = get_mo_bielec_integral_erf(i,j,i,j,mo_integrals_erf_map) + mo_two_e_int_erf_jj_exchange(i,j) = get_mo_bielec_integral_erf(i,j,j,i,mo_integrals_erf_map) + mo_two_e_int_erf_jj_anti(i,j) = mo_two_e_int_erf_jj(i,j) - mo_two_e_int_erf_jj_exchange(i,j) enddo enddo @@ -229,16 +229,16 @@ subroutine clear_mo_erf_map ! Frees the memory of the MO map END_DOC call map_deinit(mo_integrals_erf_map) - FREE mo_integrals_erf_map mo_bielec_integral_erf_jj mo_bielec_integral_erf_jj_anti - FREE mo_bielec_integral_Erf_jj_exchange mo_bielec_integrals_erf_in_map + FREE mo_integrals_erf_map mo_two_e_int_erf_jj mo_two_e_int_erf_jj_anti + FREE mo_two_e_int_erf_jj_exchange mo_bielec_integrals_erf_in_map end subroutine provide_all_mo_integrals_erf implicit none - provide mo_integrals_erf_map mo_bielec_integral_erf_jj mo_bielec_integral_erf_jj_anti - provide mo_bielec_integral_erf_jj_exchange mo_bielec_integrals_erf_in_map + provide mo_integrals_erf_map mo_two_e_int_erf_jj mo_two_e_int_erf_jj_anti + provide mo_two_e_int_erf_jj_exchange mo_bielec_integrals_erf_in_map end diff --git a/src/mo_two_e_erf_integrals/read_write_erf.irp.f b/src/mo_two_e_erf_integrals/read_write_erf.irp.f new file mode 100644 index 00000000..4683350b --- /dev/null +++ b/src/mo_two_e_erf_integrals/read_write_erf.irp.f @@ -0,0 +1,27 @@ + BEGIN_PROVIDER [ logical, read_mo_integrals_erf ] +&BEGIN_PROVIDER [ logical, write_mo_integrals_erf ] + implicit none + + BEGIN_DOC + ! Flag to read or write the |MO| erf integrals + END_DOC + + if (disk_access_mo_integrals_erf.EQ.'Read') then + read_mo_integrals_erf = .True. + write_mo_integrals_erf = .False. + + else if (disk_access_mo_integrals_erf.EQ.'Write') then + read_mo_integrals_erf = .False. + write_mo_integrals_erf = .True. + + else if (disk_access_mo_integrals_erf.EQ.'None') then + read_mo_integrals_erf = .False. + write_mo_integrals_erf = .False. + + else + print *, 'disk_access_mo_integrals_erf has a wrong type' + stop 1 + + endif + +END_PROVIDER diff --git a/src/mo_two_e_integrals/routines_save_integrals_erf.irp.f b/src/mo_two_e_erf_integrals/routines_save_integrals_erf.irp.f similarity index 88% rename from src/mo_two_e_integrals/routines_save_integrals_erf.irp.f rename to src/mo_two_e_erf_integrals/routines_save_integrals_erf.irp.f index f806f938..84b7ec13 100644 --- a/src/mo_two_e_integrals/routines_save_integrals_erf.irp.f +++ b/src/mo_two_e_erf_integrals/routines_save_integrals_erf.irp.f @@ -4,7 +4,7 @@ subroutine save_erf_bi_elec_integrals_mo PROVIDE mo_bielec_integrals_erf_in_map call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints_erf',mo_integrals_erf_map) - call ezfio_set_mo_two_e_integrals_disk_access_mo_integrals('Read') + call ezfio_set_mo_two_e_erf_integrals_disk_access_mo_integrals_erf('Read') end subroutine save_erf_bielec_ints_mo_into_ints_mo diff --git a/src/mo_two_e_integrals/EZFIO.cfg b/src/mo_two_e_integrals/EZFIO.cfg index 3638cd65..bc18c779 100644 --- a/src/mo_two_e_integrals/EZFIO.cfg +++ b/src/mo_two_e_integrals/EZFIO.cfg @@ -4,12 +4,6 @@ doc: Read/Write |MO| integrals from/to disk [ Write | Read | None ] interface: ezfio,provider,ocaml default: None -[disk_access_mo_integrals_erf] -type: Disk_access -doc: Read/Write MO integrals with the long range interaction from/to disk [ Write | Read | None ] -interface: ezfio,provider,ocaml -default: None - [mo_integrals_threshold] type: Threshold doc: If | | < `mo_integrals_threshold` then is zero diff --git a/src/mo_two_e_integrals/core_quantities.irp.f b/src/mo_two_e_integrals/core_quantities.irp.f index a120cf78..ba573675 100644 --- a/src/mo_two_e_integrals/core_quantities.irp.f +++ b/src/mo_two_e_integrals/core_quantities.irp.f @@ -1,5 +1,8 @@ BEGIN_PROVIDER [double precision, core_energy] implicit none + BEGIN_DOC +! energy from the core : contains all core-core contributions + END_DOC integer :: i,j,k,l core_energy = 0.d0 do i = 1, n_core_orb diff --git a/src/mo_two_e_integrals/integrals_3_index.irp.f b/src/mo_two_e_integrals/integrals_3_index.irp.f index 91068d0d..9d31a017 100644 --- a/src/mo_two_e_integrals/integrals_3_index.irp.f +++ b/src/mo_two_e_integrals/integrals_3_index.irp.f @@ -1,6 +1,11 @@ BEGIN_PROVIDER [double precision, big_array_coulomb_integrals, (mo_tot_num,mo_tot_num, mo_tot_num)] &BEGIN_PROVIDER [double precision, big_array_exchange_integrals,(mo_tot_num,mo_tot_num, mo_tot_num)] implicit none + BEGIN_DOC + ! big_array_coulomb_integrals(i,j) = = (ii|jj) + ! + ! big_array_exchange_integrals(i,j) = = (ij|ij) + END_DOC integer :: i,j,k,l double precision :: get_mo_bielec_integral double precision :: integral @@ -20,27 +25,3 @@ END_PROVIDER - - BEGIN_PROVIDER [double precision, big_array_coulomb_integrals_erf, (mo_tot_num,mo_tot_num, mo_tot_num)] -&BEGIN_PROVIDER [double precision, big_array_exchange_integrals_erf,(mo_tot_num,mo_tot_num, mo_tot_num)] - implicit none - integer :: i,j,k,l - double precision :: get_mo_bielec_integral_erf - double precision :: integral - - do k = 1, mo_tot_num - do i = 1, mo_tot_num - do j = 1, mo_tot_num - l = j - integral = get_mo_bielec_integral_erf(i,j,k,l,mo_integrals_erf_map) - big_array_coulomb_integrals_erf(j,i,k) = integral - l = j - integral = get_mo_bielec_integral_erf(i,j,l,k,mo_integrals_erf_map) - big_array_exchange_integrals_erf(j,i,k) = integral - enddo - enddo - enddo - - -END_PROVIDER - diff --git a/src/mo_two_e_integrals/mo_bi_integrals.irp.f b/src/mo_two_e_integrals/mo_bi_integrals.irp.f index f13be07d..d0fba0ce 100644 --- a/src/mo_two_e_integrals/mo_bi_integrals.irp.f +++ b/src/mo_two_e_integrals/mo_bi_integrals.irp.f @@ -152,7 +152,7 @@ BEGIN_PROVIDER [ logical, mo_bielec_integrals_in_map ] if (write_mo_integrals.and.mpi_master) then call ezfio_set_work_empty(.False.) call map_save_to_disk(trim(ezfio_filename)//'/work/mo_ints',mo_integrals_map) - call ezfio_set_mo_two_e_integrals_disk_access_mo_integrals_erf('Read') + call ezfio_set_mo_two_e_integrals_disk_access_mo_integrals('Read') endif END_PROVIDER diff --git a/src/mo_two_e_integrals/read_write.irp.f b/src/mo_two_e_integrals/read_write.irp.f index f94b3df9..4a846fa3 100644 --- a/src/mo_two_e_integrals/read_write.irp.f +++ b/src/mo_two_e_integrals/read_write.irp.f @@ -24,32 +24,4 @@ endif -END_PROVIDER - - BEGIN_PROVIDER [ logical, read_mo_integrals_erf ] -&BEGIN_PROVIDER [ logical, write_mo_integrals_erf ] - implicit none - - BEGIN_DOC - ! Flag to read or write the |MO| erf integrals - END_DOC - - if (disk_access_mo_integrals_erf.EQ.'Read') then - read_mo_integrals_erf = .True. - write_mo_integrals_erf = .False. - - else if (disk_access_mo_integrals_erf.EQ.'Write') then - read_mo_integrals_erf = .False. - write_mo_integrals_erf = .True. - - else if (disk_access_mo_integrals_erf.EQ.'None') then - read_mo_integrals_erf = .False. - write_mo_integrals_erf = .False. - - else - print *, 'disk_access_mo_integrals_erf has a wrong type' - stop 1 - - endif - END_PROVIDER diff --git a/src/tools/NEED b/src/tools/NEED index c76c9daa..886ee1bb 100644 --- a/src/tools/NEED +++ b/src/tools/NEED @@ -1 +1,2 @@ fci +mo_two_e_erf_integrals