diff --git a/scripts/get_basis.sh b/scripts/get_basis.sh index 7cfe8305..af493a3f 100755 --- a/scripts/get_basis.sh +++ b/scripts/get_basis.sh @@ -43,8 +43,5 @@ then exit 1 fi - - -#${EMSL_API_ROOT}/EMSL_api.py get_basis_data --treat_l --save --path="${tmpfile}" --basis="${basis}" - -${EMSL_API_ROOT}/EMSL_api.py get_basis_data --save --path="${tmpfile}" --basis="${basis}" --db_path="${EMSL_API_ROOT}/db/Pseudo.db" \ No newline at end of file +${EMSL_API_ROOT}/EMSL_api.py get_basis_data --treat_l --save --path="${tmpfile}" --basis="${basis}" +#${EMSL_API_ROOT}/EMSL_api.py get_basis_data --treat_l --save --path="${tmpfile}" --basis="${basis}" --db_path="${EMSL_API_ROOT}/db/Pseudo.db" \ No newline at end of file diff --git a/scripts/pseudo/create_ez.sh b/scripts/pseudo/create_ez.sh deleted file mode 100755 index 65c12c5e..00000000 --- a/scripts/pseudo/create_ez.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# $1 name -# $2 mult - -echo "name" $1 -echo "basis" $2 -echo "mul" $3 -echo "\`get_basis.sh\` need to be changed" - -rm -R $1.ezfio -qp_create_ezfio_from_xyz $1.xyz -b $2 -m $3 -~/quantum_package/scripts/pseudo/put_pseudo_in_ezfio.py $1.ezfio \ No newline at end of file diff --git a/src/MonoInts/Makefile b/src/MonoInts/Makefile index 8ae5c9fb..b1f3b02c 100644 --- a/src/MonoInts/Makefile +++ b/src/MonoInts/Makefile @@ -1,6 +1,6 @@ # Define here all new external source files and objects.Don't forget to prefix the # object files with IRPF90_temp/ -SRC=int.f90 -OBJ=IRPF90_temp/int.o +SRC= +OBJ= include $(QPACKAGE_ROOT)/src/Makefile.common \ No newline at end of file diff --git a/src/MonoInts/NEEDED_CHILDREN_MODULES b/src/MonoInts/NEEDED_CHILDREN_MODULES index b936db90..be46a359 100644 --- a/src/MonoInts/NEEDED_CHILDREN_MODULES +++ b/src/MonoInts/NEEDED_CHILDREN_MODULES @@ -1 +1 @@ -MOs +MOs Pseudo_integrals diff --git a/src/MonoInts/README.rst b/src/MonoInts/README.rst index 80bba2b0..ac4983a9 100644 --- a/src/MonoInts/README.rst +++ b/src/MonoInts/README.rst @@ -5,6 +5,7 @@ Needed Modules .. NEEDED_MODULES file. * `MOs `_ +* `Pseudo_integrals `_ Documentation ============= @@ -57,80 +58,44 @@ Documentation array of the mono electronic hamiltonian on the MOs basis : sum of the kinetic and nuclear electronic potential -`a_coef `_ - Undocumented - -`b_coef `_ - Undocumented - -`ddfact2 `_ - Undocumented - -`erf0 `_ - Undocumented - -`gammln `_ - Undocumented - -`gammp `_ - Undocumented - -`gcf `_ - Undocumented - -`gser `_ - Undocumented - -`rinteg `_ - Undocumented - -`rintgauss `_ - Undocumented - -`sabpartial `_ - Undocumented - `orthonormalize_mos `_ Undocumented `ao_nucl_elec_integral `_ interaction nuclear electron -`ao_nucl_elec_integral_per_atom `_ +`ao_nucl_elec_integral_per_atom `_ ao_nucl_elec_integral_per_atom(i,j,k) = - where Rk is the geometry of the kth atom -`ao_nucl_elec_integral_pseudo `_ - interaction nuclear electron - -`give_polynom_mult_center_mono_elec `_ +`give_polynom_mult_center_mono_elec `_ Undocumented -`i_x1_pol_mult_mono_elec `_ +`i_x1_pol_mult_mono_elec `_ Undocumented -`i_x2_pol_mult_mono_elec `_ +`i_x2_pol_mult_mono_elec `_ Undocumented -`int_gaus_pol `_ +`int_gaus_pol `_ Undocumented -`nai_pol_mult `_ +`nai_pol_mult `_ Undocumented -`v_e_n `_ +`v_e_n `_ Undocumented -`v_phi `_ +`v_phi `_ Undocumented -`v_r `_ +`v_r `_ Undocumented -`v_theta `_ +`v_theta `_ Undocumented -`wallis `_ +`wallis `_ Undocumented `mo_nucl_elec_integral `_ @@ -251,8 +216,5 @@ Documentation array of the integrals of MO_i * y^2 MO_j array of the integrals of MO_i * z^2 MO_j -`compute_integrals_pseudo `_ - Undocumented - diff --git a/src/MonoInts/pot_ao_ints.irp.f b/src/MonoInts/pot_ao_ints.irp.f index da9f1d68..87c66629 100644 --- a/src/MonoInts/pot_ao_ints.irp.f +++ b/src/MonoInts/pot_ao_ints.irp.f @@ -10,7 +10,11 @@ integer :: i,j,k,l,n_pt_in,m double precision ::overlap_x,overlap_y,overlap_z,overlap,dx,NAI_pol_mult - ao_nucl_elec_integral = ao_nucl_elec_integral_pseudo ! 0.d0 + if (do_pseudo.eqv..TRUE.) then + ao_nucl_elec_integral = ao_nucl_elec_integral_pseudo + else + ao_nucl_elec_integral = 0.d0 + endif ! _ ! /| / |_) @@ -69,177 +73,6 @@ END_PROVIDER - BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral_pseudo, (ao_num_align,ao_num)] - BEGIN_DOC -! interaction nuclear electron - END_DOC - implicit none - double precision :: alpha, beta, gama, delta - integer :: num_A,num_B - double precision :: A_center(3),B_center(3),C_center(3) - integer :: power_A(3),power_B(3) - integer :: i,j,k,l,n_pt_in,m - double precision :: Vloc, Vpseudo - - double precision :: cpu_1, cpu_2, wall_1, wall_2, wall_0 - integer :: thread_num - - ao_nucl_elec_integral_pseudo = 0.d0 - - ! - ! | _ _ _. | - ! |_ (_) (_ (_| | - ! - !! Parameters of the local part of pseudo: - - integer klocmax - integer, allocatable :: n_k(:,:) - double precision, allocatable :: v_k(:,:), dz_k(:,:) - - call ezfio_get_pseudo_klocmax(klocmax) - - allocate(n_k(nucl_num,klocmax),v_k(nucl_num,klocmax), dz_k(nucl_num,klocmax)) - - call ezfio_get_pseudo_v_k(v_k) - call ezfio_get_pseudo_n_k(n_k) - call ezfio_get_pseudo_dz_k(dz_k) - - !! Dump array - integer, allocatable :: n_k_dump(:) - double precision, allocatable :: v_k_dump(:), dz_k_dump(:) - - allocate(n_k_dump(1:klocmax), v_k_dump(1:klocmax), dz_k_dump(1:klocmax)) - - - ! - ! |\ | _ ._ | _ _ _. | - ! | \| (_) | | | (_) (_ (_| | - ! - !! Parameters of non local part of pseudo: - - integer :: kmax,lmax - integer, allocatable :: n_kl(:,:,:) - double precision, allocatable :: v_kl(:,:,:), dz_kl(:,:,:) - - call ezfio_get_pseudo_lmaxpo(lmax) - call ezfio_get_pseudo_kmax(kmax) - !lmax plus one -> lmax - lmax = lmax - 1 - - allocate(n_kl(nucl_num,kmax,0:lmax), v_kl(nucl_num,kmax,0:lmax), dz_kl(nucl_num,kmax,0:lmax)) - - call ezfio_get_pseudo_n_kl(n_kl) - call ezfio_get_pseudo_v_kl(v_kl) - call ezfio_get_pseudo_dz_kl(dz_kl) - - - !! Dump array - integer, allocatable :: n_kl_dump(:,:) - double precision, allocatable :: v_kl_dump(:,:), dz_kl_dump(:,:) - - allocate(n_kl_dump(kmax,0:lmax), v_kl_dump(kmax,0:lmax), dz_kl_dump(kmax,0:lmax)) - - ! _ - ! / _. | _ | - ! \_ (_| | (_ |_| | - ! - - write(output_monoints,*) 'Providing the nuclear electron pseudo integrals ' - - call wall_time(wall_1) - call cpu_time(cpu_1) - - !$OMP PARALLEL & - !$OMP DEFAULT (NONE) & - !$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,C_center,power_A,power_B, & - !$OMP num_A,num_B,Z,c,n_pt_in, & - !$OMP v_k_dump,n_k_dump, dz_k_dump, n_kl_dump, v_kl_dump, dz_kl_dump, & - !$OMP wall_0,wall_2,thread_num, output_monoints) & - !$OMP SHARED (ao_num,ao_prim_num,ao_expo_transp,ao_power,ao_nucl,nucl_coord,ao_coef_transp, & - !$OMP n_pt_max_integrals,ao_nucl_elec_integral_pseudo,nucl_num,nucl_charge, & - !$OMP klocmax,lmax,kmax,v_k,n_k, dz_k, n_kl, v_kl, dz_kl, & - !$OMP wall_1) - - n_pt_in = n_pt_max_integrals - - !$OMP DO SCHEDULE (guided) - - do j = 1, ao_num - - num_A = ao_nucl(j) - power_A(1:3)= ao_power(j,1:3) - A_center(1:3) = nucl_coord(num_A,1:3) - - do i = 1, ao_num - - num_B = ao_nucl(i) - power_B(1:3)= ao_power(i,1:3) - B_center(1:3) = nucl_coord(num_B,1:3) - - do l=1,ao_prim_num(j) - alpha = ao_expo_transp(l,j) - - do m=1,ao_prim_num(i) - beta = ao_expo_transp(m,i) - double precision :: c - c = 0.d0 - - do k = 1, nucl_num - double precision :: Z - Z = nucl_charge(k) - - C_center(1:3) = nucl_coord(k,1:3) - - v_k_dump = v_k(k,1:klocmax) - n_k_dump = n_k(k,1:klocmax) - dz_k_dump = dz_k(k,1:klocmax) - - c = c + Vloc(klocmax, v_k_dump,n_k_dump, dz_k_dump, & - A_center,power_A,alpha,B_center,power_B,beta,C_center) - - - n_kl_dump = n_kl(k,1:kmax,0:lmax) - v_kl_dump = v_kl(k,1:kmax,0:lmax) - dz_kl_dump = dz_kl(k,1:kmax,0:lmax) - - c = c + Vpseudo(lmax,kmax,v_kl_dump,n_kl_dump,dz_kl_dump,A_center,power_A,alpha,B_center,power_B,beta,C_center) - - enddo - ao_nucl_elec_integral_pseudo(i,j) = ao_nucl_elec_integral_pseudo(i,j) + & - ao_coef_transp(l,j)*ao_coef_transp(m,i)*c - enddo - enddo - enddo - - call wall_time(wall_2) - if (thread_num == 0) then - if (wall_2 - wall_0 > 1.d0) then - wall_0 = wall_2 - write(output_monoints,*) 100.*float(j)/float(ao_num), '% in ', & - wall_2-wall_1, 's' - endif - endif - enddo - - !$OMP END DO - !$OMP END PARALLEL - - -! _ -! | \ _ _. | | _ _ _. _|_ _ -! |_/ (/_ (_| | | (_) (_ (_| |_ (/_ -! - - deallocate(n_k,v_k, dz_k) - deallocate(n_k_dump,v_k_dump, dz_k_dump) - - deallocate(n_kl,v_kl, dz_kl) - deallocate(n_kl_dump,v_kl_dump, dz_kl_dump) - - -END_PROVIDER - - BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral_per_atom, (ao_num_align,ao_num,nucl_num)] BEGIN_DOC ! ao_nucl_elec_integral_per_atom(i,j,k) = - diff --git a/src/MonoInts/test_michel.irp.f b/src/MonoInts/test_michel.irp.f deleted file mode 100644 index ef905479..00000000 --- a/src/MonoInts/test_michel.irp.f +++ /dev/null @@ -1,200 +0,0 @@ -!! -!! Computation of Vps, matrix element of the -!! pseudo-potential centered at point C -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! Vps= < Phi_A | Vloc(C) + Vpp(C) | Phi_B> -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! Phi_M (M=A,B) Cartesian gaussian orbital centered at point M : -!! Phi_M = (x-M_x)**n^M_x *(y-M_y)**n^M_y *(z-M_z)**n^M_z exp(-g_M rM**2) -!! with rM**2=(x-M_x)**2 + (y-M_y)**2 + (z-M_z)**2 -!! -!!** Vloc(C)= \sum_{k=1}^klocmax v_k rC**n_k exp(-dz_k rC**2) -!! -!!** Vpp(C)= \sum_{l=0}^lmax v_l(rC) \sum_{m=-l}^{m=l} |Y_lm> : -!! function Vpseudo(lmax,kmax,v_kl,n_kl,dz_kl,a,n_a,g_a,b,n_b,g_b,c) -!! lmax of formula above -!! kmax of formula above -!! v_kl = array v_kl(kmax_max,0:lmax_max) -!! n_kl = array n_kl(kmax_max,0:lmax_max) -!! dz_kl = array dz_kl(kmax_max,0:lmax_max) -!! n_a(1),n_a(2),n_a(3) -!! a(1),a(2),a(3) -!! g_a -!! n_b(1),n_b(2),n_b(3) -!! b(1),b(2),b(3) -!! g_b -!! c(1),c(2),c(3) -!! -!! Routine computing : -!! function Vloc(klocmax,v_k,n_k,dz_k,a,n_a,g_a,b,n_b,g_b,c) -!! klocmax of formula above -!! v_k = array v_k(klocmax_max) -!! n_k = array n_k(klocmax_max) -!! dz_k= array dz_k(klocmax_max) -!! Routine total matrix element : -!! function Vps(a,n_a,g_a,b,n_b,g_b,c,klocmax,v_k,n_k,dz_k,lmax,kmax,v_kl,n_kl,dz_kl) -!! -!! Routines Vps_num, Vpseudo_num, and Vloc_num = brute force numerical -!! estimations of the same integrals - - -program compute_integrals_pseudo - implicit none - integer n_a(3),n_b(3),npts - double precision g_a,g_b,a(3),b(3),c(3) - double precision Vpseudo,Vpseudo_num,Vloc,Vloc_num - double precision v3,v4 - - - double precision vps,vps_num - - ! PSEUDOS - integer nptsgridmax,nptsgrid - double precision coefs_pseudo,ptsgrid - - double precision rmax - double precision time_1,time_2,time_3,time_4,time_5 - integer kga,kgb,na1,na2,na3,nb1,nb2,nb3 - - CALL RANDOM_SEED() - - nptsgrid=50 - call initpseudos(nptsgrid) - - PROVIDE ezfio_filename - - ! - ! | _ _ _. | - ! |_ (_) (_ (_| | - ! - - integer klocmax - integer, allocatable :: n_k(:) - double precision, allocatable :: v_k(:), dz_k(:) - - call ezfio_get_pseudo_klocmax(klocmax) - - allocate(n_k(klocmax),v_k(klocmax), dz_k(klocmax)) - - call ezfio_get_pseudo_v_k(v_k) - call ezfio_get_pseudo_n_k(n_k) - call ezfio_get_pseudo_dz_k(dz_k) - - print*, "klocmax", klocmax - - print*, "n_k_ezfio", n_k - print*, "v_k_ezfio",v_k - print*, "dz_k_ezfio", dz_k - - ! - ! |\ | _ ._ | _ _ _. | - ! | \| (_) | | | (_) (_ (_| | - ! - - !! Parameters of non local part of pseudo: - - integer :: kmax,lmax - integer, allocatable :: n_kl(:,:) - double precision, allocatable :: v_kl(:,:), dz_kl(:,:) - - call ezfio_get_pseudo_lmaxpo(lmax) - call ezfio_get_pseudo_kmax(kmax) - lmax = lmax - 1 - - allocate(n_kl(kmax,0:lmax), v_kl(kmax,0:lmax), dz_kl(kmax,0:lmax)) - - call ezfio_get_pseudo_n_kl(n_kl) - call ezfio_get_pseudo_v_kl(v_kl) - call ezfio_get_pseudo_dz_kl(dz_kl) - - - print*, "lmax",lmax - print*, "kmax", kmax - - print*,"n_kl_ezfio", n_kl - print*,"v_kl_ezfio", v_kl - print*,"dz_kl_ezfio", dz_kl - - ! _ - ! / _. | _ | - ! \_ (_| | (_ |_| | - ! - -! write(*,*)'a?' -! read*,a(1),a(2),a(3) - !write(*,*)'b?' - !read*,b(1),b(2),b(3) -! b(1)=-0.1d0 -! b(2)=-0.2d0 -! b(3)=0.3d0 -! !write(*,*)'a?' -! !read*,c(1),c(2),c(3) -! c(1)=0.1d0 -! c(2)=0.2d0 -! c(3)=0.3d0 - - a(1)= 0.d0 - a(2)= 0.d0 - a(3)= 0.d0 - - b(1)= 0.d0 - b(2)= 0.d0 - b(3)= 0.d0 - - c(1)= 0.d0 - c(2)= 0.d0 - c(3)= 0.d0 - - print*,'ntps? rmax for brute force integration' - read*,npts,rmax - - do kga=0,5 - g_a=10.d0**kga - do kgb=0,5 - g_b=10.d0**kgb - - do na1=0,1 - do na2=0,1 - do na3=0,1 - do nb1=0,1 - do nb2=0,1 - do nb3=0,1 - n_a(1)=na1 - n_a(2)=na2 - n_a(3)=na3 - n_b(1)=nb1 - n_b(2)=nb2 - n_b(3)=nb3 - - v3=Vps(a,n_a,g_a,b,n_b,g_b,c,klocmax,v_k,n_k,dz_k,lmax,kmax,v_kl,n_kl,dz_kl) - v4=Vps_num(npts,rmax,a,n_a,g_a,b,n_b,g_b,c,klocmax,v_k,n_k,dz_k,lmax,kmax,v_kl,n_kl,dz_kl) - print*,'Vps= ',v3,' Vps_num=',v4,' diff=',v4-v3 - write(33,'(3f10.6)')v3,v4,v4-v3 - - enddo - enddo - enddo - enddo - enddo - enddo - enddo - enddo - -end diff --git a/src/NEEDED_MODULES b/src/NEEDED_MODULES index 80176c68..4533ccfe 100644 --- a/src/NEEDED_MODULES +++ b/src/NEEDED_MODULES @@ -1 +1 @@ -AOs Bielec_integrals Bitmask CID CID_SC2_selected CID_selected CIS CISD CISD_selected CISD_SC2_selected Determinants Electrons Ezfio_files Full_CI Generators_full Hartree_Fock MOGuess MonoInts MOs MP2 Nuclei Output Selectors_full Utils Molden FCIdump Generators_CAS CAS_SD DDCI_selected MRCC +AOs Bielec_integrals Bitmask CID CID_SC2_selected CID_selected CIS CISD CISD_selected CISD_SC2_selected Determinants Electrons Ezfio_files Full_CI Generators_full Hartree_Fock MOGuess MonoInts MOs MP2 Nuclei Output Selectors_full Utils Molden FCIdump Generators_CAS CAS_SD DDCI_selected MRCC Pseudo_integrals diff --git a/src/Pseudo_integrals/ASSUMPTIONS.rst b/src/Pseudo_integrals/ASSUMPTIONS.rst new file mode 100644 index 00000000..e69de29b diff --git a/src/Pseudo_integrals/Makefile b/src/Pseudo_integrals/Makefile new file mode 100644 index 00000000..5cf11b78 --- /dev/null +++ b/src/Pseudo_integrals/Makefile @@ -0,0 +1,6 @@ +# Define here all new external source files and objects.Don't forget to prefix the +# object files with IRPF90_temp/ +SRC=int.f90 +OBJ=IRPF90_temp/int.o + +include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Pseudo_integrals/NEEDED_CHILDREN_MODULES b/src/Pseudo_integrals/NEEDED_CHILDREN_MODULES new file mode 100644 index 00000000..4692ec21 --- /dev/null +++ b/src/Pseudo_integrals/NEEDED_CHILDREN_MODULES @@ -0,0 +1 @@ +AOs Electrons diff --git a/src/Pseudo_integrals/README.rst b/src/Pseudo_integrals/README.rst new file mode 100644 index 00000000..a62f9afc --- /dev/null +++ b/src/Pseudo_integrals/README.rst @@ -0,0 +1,28 @@ +======================= +Pseudo_integrals Module +======================= + +Documentation +============= + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +`ao_nucl_elec_integral_pseudo `_ + interaction nuclear electron + +`do_pseudo `_ + Using pseudo potential integral of not + If true, check all the {alpha,beta} electron and Z + + + +Needed Modules +============== + +.. Do not edit this section. It was auto-generated from the +.. NEEDED_MODULES file. + +* `AOs `_ +* `Electrons `_ + diff --git a/src/MonoInts/int.f90 b/src/Pseudo_integrals/int.f90 similarity index 100% rename from src/MonoInts/int.f90 rename to src/Pseudo_integrals/int.f90 diff --git a/src/Pseudo_integrals/pot_ao_ints_pseudo.irp.f b/src/Pseudo_integrals/pot_ao_ints_pseudo.irp.f new file mode 100644 index 00000000..eaa1d985 --- /dev/null +++ b/src/Pseudo_integrals/pot_ao_ints_pseudo.irp.f @@ -0,0 +1,178 @@ + BEGIN_PROVIDER [logical, do_pseudo] + BEGIN_DOC +! Using pseudo potential integral of not +! If true, check all the {alpha,beta} electron and Z + END_DOC + + call ezfio_get_pseudo_do_pseudo(do_pseudo) + +END_PROVIDER + + + BEGIN_PROVIDER [ double precision, ao_nucl_elec_integral_pseudo, (ao_num_align,ao_num)] + BEGIN_DOC +! interaction nuclear electron + END_DOC + implicit none + double precision :: alpha, beta, gama, delta + integer :: num_A,num_B + double precision :: A_center(3),B_center(3),C_center(3) + integer :: power_A(3),power_B(3) + integer :: i,j,k,l,n_pt_in,m + double precision :: Vloc, Vpseudo + + double precision :: cpu_1, cpu_2, wall_1, wall_2, wall_0 + integer :: thread_num + + ao_nucl_elec_integral_pseudo = 0.d0 + + ! + ! | _ _ _. | + ! |_ (_) (_ (_| | + ! + !! Parameters of the local part of pseudo: + + integer klocmax + integer, allocatable :: n_k(:,:) + double precision, allocatable :: v_k(:,:), dz_k(:,:) + + call ezfio_get_pseudo_klocmax(klocmax) + + allocate(n_k(nucl_num,klocmax),v_k(nucl_num,klocmax), dz_k(nucl_num,klocmax)) + + call ezfio_get_pseudo_v_k(v_k) + call ezfio_get_pseudo_n_k(n_k) + call ezfio_get_pseudo_dz_k(dz_k) + + !! Dump array + integer, allocatable :: n_k_dump(:) + double precision, allocatable :: v_k_dump(:), dz_k_dump(:) + + allocate(n_k_dump(1:klocmax), v_k_dump(1:klocmax), dz_k_dump(1:klocmax)) + + + ! + ! |\ | _ ._ | _ _ _. | + ! | \| (_) | | | (_) (_ (_| | + ! + !! Parameters of non local part of pseudo: + + integer :: kmax,lmax + integer, allocatable :: n_kl(:,:,:) + double precision, allocatable :: v_kl(:,:,:), dz_kl(:,:,:) + + call ezfio_get_pseudo_lmaxpo(lmax) + call ezfio_get_pseudo_kmax(kmax) + !lmax plus one -> lmax + lmax = lmax - 1 + + allocate(n_kl(nucl_num,kmax,0:lmax), v_kl(nucl_num,kmax,0:lmax), dz_kl(nucl_num,kmax,0:lmax)) + + call ezfio_get_pseudo_n_kl(n_kl) + call ezfio_get_pseudo_v_kl(v_kl) + call ezfio_get_pseudo_dz_kl(dz_kl) + + + !! Dump array + integer, allocatable :: n_kl_dump(:,:) + double precision, allocatable :: v_kl_dump(:,:), dz_kl_dump(:,:) + + allocate(n_kl_dump(kmax,0:lmax), v_kl_dump(kmax,0:lmax), dz_kl_dump(kmax,0:lmax)) + + ! _ + ! / _. | _ | + ! \_ (_| | (_ |_| | + ! + + write(output_monoints,*) 'Providing the nuclear electron pseudo integrals ' + + call wall_time(wall_1) + call cpu_time(cpu_1) + + !$OMP PARALLEL & + !$OMP DEFAULT (NONE) & + !$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,C_center,power_A,power_B, & + !$OMP num_A,num_B,Z,c,n_pt_in, & + !$OMP v_k_dump,n_k_dump, dz_k_dump, n_kl_dump, v_kl_dump, dz_kl_dump, & + !$OMP wall_0,wall_2,thread_num, output_monoints) & + !$OMP SHARED (ao_num,ao_prim_num,ao_expo_transp,ao_power,ao_nucl,nucl_coord,ao_coef_transp, & + !$OMP ao_nucl_elec_integral_pseudo,nucl_num,nucl_charge, & + !$OMP klocmax,lmax,kmax,v_k,n_k, dz_k, n_kl, v_kl, dz_kl, & + !$OMP wall_1) + + !$OMP DO SCHEDULE (guided) + + do j = 1, ao_num + + num_A = ao_nucl(j) + power_A(1:3)= ao_power(j,1:3) + A_center(1:3) = nucl_coord(num_A,1:3) + + do i = 1, ao_num + + num_B = ao_nucl(i) + power_B(1:3)= ao_power(i,1:3) + B_center(1:3) = nucl_coord(num_B,1:3) + + do l=1,ao_prim_num(j) + alpha = ao_expo_transp(l,j) + + do m=1,ao_prim_num(i) + beta = ao_expo_transp(m,i) + double precision :: c + c = 0.d0 + + do k = 1, nucl_num + double precision :: Z + Z = nucl_charge(k) + + C_center(1:3) = nucl_coord(k,1:3) + + v_k_dump = v_k(k,1:klocmax) + n_k_dump = n_k(k,1:klocmax) + dz_k_dump = dz_k(k,1:klocmax) + + c = c + Vloc(klocmax, v_k_dump,n_k_dump, dz_k_dump, & + A_center,power_A,alpha,B_center,power_B,beta,C_center) + + + n_kl_dump = n_kl(k,1:kmax,0:lmax) + v_kl_dump = v_kl(k,1:kmax,0:lmax) + dz_kl_dump = dz_kl(k,1:kmax,0:lmax) + + c = c + Vpseudo(lmax,kmax,v_kl_dump,n_kl_dump,dz_kl_dump,A_center,power_A,alpha,B_center,power_B,beta,C_center) + + enddo + ao_nucl_elec_integral_pseudo(i,j) = ao_nucl_elec_integral_pseudo(i,j) + & + ao_coef_transp(l,j)*ao_coef_transp(m,i)*c + enddo + enddo + enddo + + call wall_time(wall_2) + if (thread_num == 0) then + if (wall_2 - wall_0 > 1.d0) then + wall_0 = wall_2 + write(output_monoints,*) 100.*float(j)/float(ao_num), '% in ', & + wall_2-wall_1, 's' + endif + endif + enddo + + !$OMP END DO + !$OMP END PARALLEL + + +! _ +! | \ _ _. | | _ _ _. _|_ _ +! |_/ (/_ (_| | | (_) (_ (_| |_ (/_ +! + + deallocate(n_k,v_k, dz_k) + deallocate(n_k_dump,v_k_dump, dz_k_dump) + + deallocate(n_kl,v_kl, dz_kl) + deallocate(n_kl_dump,v_kl_dump, dz_kl_dump) + + +END_PROVIDER diff --git a/src/MonoInts/pseudo.ezfio_config b/src/Pseudo_integrals/pseudo.ezfio_config similarity index 100% rename from src/MonoInts/pseudo.ezfio_config rename to src/Pseudo_integrals/pseudo.ezfio_config diff --git a/src/Utils/README.rst b/src/Utils/README.rst index 68a4f080..ff16f3ed 100644 --- a/src/Utils/README.rst +++ b/src/Utils/README.rst @@ -160,6 +160,39 @@ Documentation `rint_sum `_ Needed for the calculation of two-electron integrals. +`a_coef `_ + Undocumented + +`b_coef `_ + Undocumented + +`ddfact2 `_ + Undocumented + +`erf0 `_ + Undocumented + +`gammln `_ + Undocumented + +`gammp `_ + Undocumented + +`gcf `_ + Undocumented + +`gser `_ + Undocumented + +`rinteg `_ + Undocumented + +`rintgauss `_ + Undocumented + +`sabpartial `_ + Undocumented + `overlap_a_b_c `_ Undocumented diff --git a/src/MonoInts/need.irp.f b/src/Utils/need.irp.f similarity index 100% rename from src/MonoInts/need.irp.f rename to src/Utils/need.irp.f