From 3552856ca79f40687f331a885dbb603857fcc38b Mon Sep 17 00:00:00 2001 From: eginer Date: Tue, 11 Mar 2025 18:37:00 +0100 Subject: [PATCH] working on extra_basis_int --- external/ezfio | 2 +- .../extra_basis_int/extra_basis_int.irp.f | 22 ++++++++++---- .../local/extra_basis_int/pot_ao_ints.irp.f | 29 +++++++++++++++++++ src/ao_extra_basis/qp_copy_extra_basis | 2 +- 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/external/ezfio b/external/ezfio index dba01c4f..d02132ea 160000 --- a/external/ezfio +++ b/external/ezfio @@ -1 +1 @@ -Subproject commit dba01c4fe0ff7b84c5ecfb1c7c77ec68781311b3 +Subproject commit d02132ea79217c16fd24242e8f8b8a6c3ff68091 diff --git a/plugins/local/extra_basis_int/extra_basis_int.irp.f b/plugins/local/extra_basis_int/extra_basis_int.irp.f index 1d35b1c2..13c31f36 100644 --- a/plugins/local/extra_basis_int/extra_basis_int.irp.f +++ b/plugins/local/extra_basis_int/extra_basis_int.irp.f @@ -11,18 +11,28 @@ program extra_basis_int ! call routine_pot_ne ! call routine_test_pot_ne_extra_mixed ! call routine_test_coul_1s - call print_v_ne_extra_basis - call print_v_ne_basis +! call print_v_ne_extra_basis +! call print_v_ne_basis + call test_v_ne_a_extra_basis end +subroutine test_v_ne_a_extra_basis + implicit none + integer :: i,j + do i = 1, ao_extra_num + write(*,'(100(F16.10,X))')pot_vne_A_extra_basis(1:ao_extra_num,i) + enddo +end + + subroutine test_overlap implicit none integer :: i,j - do i = 1, ao_extra_num - do j = 1, ao_extra_num - write(33,*)ao_extra_overlap(j,i) - enddo + do i = 1, ao_num +! do j = 1, ao_num + write(33,'(100(F16.10,X))')ao_extra_overlap_mixed(i,1:ao_extra_num) +! enddo enddo end diff --git a/plugins/local/extra_basis_int/pot_ao_ints.irp.f b/plugins/local/extra_basis_int/pot_ao_ints.irp.f index 5f3af244..1828f980 100644 --- a/plugins/local/extra_basis_int/pot_ao_ints.irp.f +++ b/plugins/local/extra_basis_int/pot_ao_ints.irp.f @@ -1,3 +1,32 @@ +BEGIN_PROVIDER [ double precision, pot_vne_A_extra_basis, (ao_extra_num,ao_extra_num)] + implicit none + BEGIN_DOC + ! + ! Computes the following integral : + ! $\sum_{R in nuclei} -Z $ + ! + ! + ! where $\chi_i(r)$ AND $\chi_j(r)$ belongs to the extra basis + END_DOC + integer :: mu,nu,k_nucl + double precision :: mu_in, R_nucl(3),charge_nucl, integral + double precision :: NAI_pol_mult_erf_ao_extra + mu_in = 10.d0**10 + pot_vne_A_extra_basis = 0.d0 + do mu = 1, ao_extra_num + do nu = 1, ao_extra_num + do k_nucl = 1, nucl_num + R_nucl(1:3) = nucl_coord_transp(1:3,k_nucl) + charge_nucl = nucl_charge(k_nucl) + integral = NAI_pol_mult_erf_ao_extra(mu, nu, mu_in, R_nucl) + pot_vne_A_extra_basis(nu,mu) += -integral * charge_nucl + enddo + enddo + enddo + +END_PROVIDER + + double precision function NAI_pol_mult_erf_ao_extra(i_ao, j_ao, mu_in, C_center) diff --git a/src/ao_extra_basis/qp_copy_extra_basis b/src/ao_extra_basis/qp_copy_extra_basis index cb435e18..6d0e17b8 100755 --- a/src/ao_extra_basis/qp_copy_extra_basis +++ b/src/ao_extra_basis/qp_copy_extra_basis @@ -58,7 +58,7 @@ do done i=primitives_normalized newfile=primitives_normalized_extra -cp ${EZFIO_extra}/ao_basis/$i ${EZFIO_target}/ao_extra_basis/$newfile +cp ${EZFIO_extra}/basis/$i ${EZFIO_target}/ao_extra_basis/$newfile echo "COPYING ALL DATA FROM "$EZFIO_extra"/aux_quantities/ to "${EZFIO_target}"/ao_extra_basis/" i=data_one_e_dm_tot_ao.gz