diff --git a/scripts/get_basis.sh b/scripts/get_basis.sh index a2f07e4e..5db71852 100755 --- a/scripts/get_basis.sh +++ b/scripts/get_basis.sh @@ -51,5 +51,7 @@ then ${EMSL_API_ROOT}/EMSL_api.py get_basis_data --treat_l --save --path="${tmpfile}" --basis="${basis}" else ${EMSL_API_ROOT}/EMSL_api.py get_basis_data --save --path="${tmpfile}" --basis="${basis}" --db_path="${EMSL_API_ROOT}/db/Pseudo.db" +# echo ${EMSL_API_ROOT}/EMSL_api.py get_basis_data --save --path="${tmpfile}" --basis="${basis}" --db_path="${EMSL_API_ROOT}/db/Pseudo.db" 1>&2 +# echo $PWD/BASIS fi diff --git a/scripts/fetch_from_web.py b/scripts/install/fetch_from_web.py similarity index 100% rename from scripts/fetch_from_web.py rename to scripts/install/fetch_from_web.py diff --git a/scripts/install/install_curl.sh b/scripts/install/install_curl.sh index b2e47481..5f32e384 100755 --- a/scripts/install/install_curl.sh +++ b/scripts/install/install_curl.sh @@ -22,7 +22,7 @@ then fi rm -f -- ${QPACKAGE_ROOT}/bin/curl -${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${CURL_URL} CURL.tar.bz2 +${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${CURL_URL} CURL.tar.bz2 tar -jxf CURL.tar.bz2 && rm CURL.tar.bz2 ||exit 1 cd ${CURL} || exit 1 mv curl.ermine ${QPACKAGE_ROOT}/bin/curl diff --git a/scripts/install/install_docopt.sh b/scripts/install/install_docopt.sh index 6f799c47..7e55ea45 100755 --- a/scripts/install/install_docopt.sh +++ b/scripts/install/install_docopt.sh @@ -16,6 +16,6 @@ fi cd ${QPACKAGE_ROOT} rm -f -- scripts/${DOCOPT}{,c} -${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${DOCOPT_URL} ${DOCOPT} +${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${DOCOPT_URL} ${DOCOPT} -mv ${DOCOPT} scripts/${DOCOPT} \ No newline at end of file +mv ${DOCOPT} scripts/${DOCOPT} diff --git a/scripts/install/install_emsl.sh b/scripts/install/install_emsl.sh index b01afb6e..b0bbc820 100755 --- a/scripts/install/install_emsl.sh +++ b/scripts/install/install_emsl.sh @@ -15,7 +15,7 @@ fi cd ${QPACKAGE_ROOT} -${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz +${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1 rm -rf EMSL_Basis mv ${BASE}-master EMSL_Basis diff --git a/scripts/install/install_ezfio.sh b/scripts/install/install_ezfio.sh index c0033ca8..7e9a39e2 100755 --- a/scripts/install/install_ezfio.sh +++ b/scripts/install/install_ezfio.sh @@ -16,7 +16,7 @@ fi cd ${QPACKAGE_ROOT} rm -rf -- EZFIO -${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz +${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1 mv EZFIO-master EZFIO diff --git a/scripts/install/install_irpf90.sh b/scripts/install/install_irpf90.sh index d93340d2..d7043882 100755 --- a/scripts/install/install_irpf90.sh +++ b/scripts/install/install_irpf90.sh @@ -17,7 +17,7 @@ fi cd ${QPACKAGE_ROOT} -${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz +${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1 mv ${BASE}-master irpf90 make -C irpf90 | tee install_irpf90.log diff --git a/scripts/install/install_m4.sh b/scripts/install/install_m4.sh index 8bf514fd..6495b82e 100755 --- a/scripts/install/install_m4.sh +++ b/scripts/install/install_m4.sh @@ -20,7 +20,7 @@ rm -f l${QPACKAGE_ROOT}/bin/m4 if [[ -z ${M4} ]] then rm -f -- bin/m4 - ${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${M4_URL} M4.tar.gz + ${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${M4_URL} M4.tar.gz tar -zxf M4.tar.gz && rm M4.tar.gz ||exit 1 cd m4* || exit 1 ./configure && make || exit 1 diff --git a/scripts/install/install_ninja.sh b/scripts/install/install_ninja.sh new file mode 100755 index 00000000..438d6098 --- /dev/null +++ b/scripts/install/install_ninja.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Installs the ninja build system +# Thu May 28 13:21:16 CEST 2015 + +BASE="ninja" +URL="https://github.com/martine/ninja/archive/master.tar.gz" +if [[ -z ${QPACKAGE_ROOT} ]] +then + echo "The QPACKAGE_ROOT environment variable is not set." + echo "Please reload the quantum_package.rc file." + exit -1 +fi +cd ${QPACKAGE_ROOT} +${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz +tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1 +rm -rf ${BASE} +mv ${BASE}-master ${BASE} +cd ${BASE} +./configure.py --bootstrap + diff --git a/scripts/install/install_ocaml.sh b/scripts/install/install_ocaml.sh index 1cefba6c..fe02e9df 100755 --- a/scripts/install/install_ocaml.sh +++ b/scripts/install/install_ocaml.sh @@ -45,7 +45,7 @@ then done fi fi -${QPACKAGE_ROOT}/scripts/fetch_from_web.py \ +${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py \ "https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh" opam_installer.sh chmod +x opam_installer.sh echo N | ./opam_installer.sh ${QPACKAGE_ROOT}/bin diff --git a/scripts/module/create_Makefile_depend.sh b/scripts/module/create_Makefile_depend.sh index 56e1c5e0..2485bb97 100755 --- a/scripts/module/create_Makefile_depend.sh +++ b/scripts/module/create_Makefile_depend.sh @@ -23,12 +23,12 @@ DEPS="$NEEDED_MODULES" for M in ${DEPS} do # X is the list of external source files - X=$(grep 'SRC=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2) + X=$(grep '^SRC=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2) for f in ${X} do SRC+=" ${M}/${f}" done - X=$(grep 'OBJ=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2) + X=$(grep '^OBJ=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2) for f in ${X} do OBJ+=" IRPF90_temp/${M}/${f/IRPF90_temp//}" diff --git a/src/AOs/dimensions_integrals.irp.f b/src/AOs/dimensions_integrals.irp.f index 635e1a0e..d1beea61 100644 --- a/src/AOs/dimensions_integrals.irp.f +++ b/src/AOs/dimensions_integrals.irp.f @@ -3,7 +3,7 @@ implicit none integer :: n_pt_sup integer :: prim_power_l_max - include 'constants.F' + include 'include/constants.F' prim_power_l_max = maxval(ao_power) n_pt_max_integrals = 24 * prim_power_l_max + 4 n_pt_max_i_x = 8 * prim_power_l_max diff --git a/src/Determinants/Makefile b/src/Determinants/Makefile index 092d879d..51375558 100644 --- a/src/Determinants/Makefile +++ b/src/Determinants/Makefile @@ -1,6 +1,7 @@ # Define here all new external source files and objects.Don't forget to prefix the # object files with IRPF90_temp/ -SRC=H_apply_template.f +#SRC=H_apply_template.f +SRC= OBJ= include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Integrals_Bielec/ao_bi_integrals.irp.f b/src/Integrals_Bielec/ao_bi_integrals.irp.f index a9fc3eb1..e213c2b9 100644 --- a/src/Integrals_Bielec/ao_bi_integrals.irp.f +++ b/src/Integrals_Bielec/ao_bi_integrals.irp.f @@ -519,7 +519,7 @@ double precision function general_primitive_integral(dim, & ! Computes the integral where p,q,r,s are Gaussian primitives END_DOC integer,intent(in) :: dim - include 'constants.F' + include 'include/constants.F' double precision, intent(in) :: P_new(0:max_dim,3),P_center(3),fact_p,p,p_inv double precision, intent(in) :: Q_new(0:max_dim,3),Q_center(3),fact_q,q,q_inv integer, intent(in) :: iorder_p(3) @@ -665,7 +665,7 @@ double precision function ERI(alpha,beta,delta,gama,a_x,b_x,c_x,d_x,a_y,b_y,c_y, integer :: n_pt_sup double precision :: p,q,denom,coeff double precision :: I_f - include 'constants.F' + include 'include/constants.F' if(iand(a_x+b_x+c_x+d_x,1).eq.1.or.iand(a_y+b_y+c_y+d_y,1).eq.1.or.iand(a_z+b_z+c_z+d_z,1).eq.1)then ERI = 0.d0 return @@ -859,7 +859,7 @@ subroutine give_polynom_mult_center_x(P_center,Q_center,a_x,d_x,p,q,n_pt_in,pq_i integer, intent(in) :: a_x,d_x double precision, intent(in) :: P_center, Q_center double precision, intent(in) :: p,q,pq_inv,p10_1,p01_1,p10_2,p01_2,pq_inv_2 - include 'constants.F' + include 'include/constants.F' double precision,intent(out) :: d(0:max_dim) double precision :: accu accu = 0.d0 @@ -916,7 +916,7 @@ subroutine I_x1_pol_mult(a,c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in) ! recursive function involved in the bielectronic integral END_DOC integer , intent(in) :: n_pt_in - include 'constants.F' + include 'include/constants.F' double precision,intent(inout) :: d(0:max_dim) integer,intent(inout) :: nd integer, intent(in) :: a,c @@ -950,7 +950,7 @@ recursive subroutine I_x1_pol_mult_recurs(a,c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt ! recursive function involved in the bielectronic integral END_DOC integer , intent(in) :: n_pt_in - include 'constants.F' + include 'include/constants.F' double precision,intent(inout) :: d(0:max_dim) integer,intent(inout) :: nd integer, intent(in) :: a,c @@ -1036,7 +1036,7 @@ recursive subroutine I_x1_pol_mult_a1(c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in) ! recursive function involved in the bielectronic integral END_DOC integer , intent(in) :: n_pt_in - include 'constants.F' + include 'include/constants.F' double precision,intent(inout) :: d(0:max_dim) integer,intent(inout) :: nd integer, intent(in) :: c @@ -1090,7 +1090,7 @@ recursive subroutine I_x1_pol_mult_a2(c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in) ! recursive function involved in the bielectronic integral END_DOC integer , intent(in) :: n_pt_in - include 'constants.F' + include 'include/constants.F' double precision,intent(inout) :: d(0:max_dim) integer,intent(inout) :: nd integer, intent(in) :: c @@ -1152,7 +1152,7 @@ recursive subroutine I_x2_pol_mult(c,B_10,B_01,B_00,C_00,D_00,d,nd,dim) ! recursive function involved in the bielectronic integral END_DOC integer , intent(in) :: dim - include 'constants.F' + include 'include/constants.F' double precision :: d(0:max_dim) integer,intent(inout) :: nd integer, intent(in) :: c diff --git a/src/Integrals_Monoelec/pot_ao_ints.irp.f b/src/Integrals_Monoelec/pot_ao_ints.irp.f index 1e84d3d4..300bf99f 100644 --- a/src/Integrals_Monoelec/pot_ao_ints.irp.f +++ b/src/Integrals_Monoelec/pot_ao_ints.irp.f @@ -148,7 +148,7 @@ double precision :: P_center(3) double precision :: d(0:n_pt_in),pouet,coeff,rho,dist,const,pouet_2,p,p_inv,factor double precision :: I_n_special_exact,integrate_bourrin,I_n_bibi double precision :: V_e_n,const_factor,dist_integral,tmp -include 'constants.F' +include 'include/constants.F' if ( (A_center(1)/=B_center(1)).or. & (A_center(2)/=B_center(2)).or. & (A_center(3)/=B_center(3)).or. & @@ -351,7 +351,7 @@ recursive subroutine I_x1_pol_mult_mono_elec(a,c,R1x,R1xp,R2x,d,nd,n_pt_in) integer,intent(inout) :: nd integer, intent(in):: a,c double precision, intent(in) :: R1x(0:2),R1xp(0:2),R2x(0:2) - include 'constants.F' + include 'include/constants.F' double precision :: X(0:max_dim) double precision :: Y(0:max_dim) !DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: X, Y @@ -417,7 +417,7 @@ end recursive subroutine I_x2_pol_mult_mono_elec(c,R1x,R1xp,R2x,d,nd,dim) implicit none integer , intent(in) :: dim - include 'constants.F' + include 'include/constants.F' double precision :: d(0:max_dim) integer,intent(inout) :: nd integer, intent(in):: c @@ -492,7 +492,7 @@ implicit none double precision :: alpha integer :: n double precision :: dble_fact -include 'constants.F' +include 'include/constants.F' !if(iand(n,1).eq.1)then ! int_gaus_pol= 0.d0 @@ -521,7 +521,7 @@ double precision function V_r(n,alpha) implicit none double precision :: alpha, fact integer :: n -include 'constants.F' +include 'include/constants.F' if(iand(n,1).eq.1)then V_r = 0.5d0 * fact(ishft(n,-1)) / (alpha ** (ishft(n,-1) + 1)) else @@ -549,7 +549,7 @@ implicit none !! integral on "theta" with boundaries ( 0 ; pi) of [ cos(theta) **n sin(theta) **m ] integer :: n,m,i double precision :: Wallis, prod -include 'constants.F' +include 'include/constants.F' V_theta = 0.d0 prod = 1.d0 do i = 0,ishft(n,-1)-1 @@ -565,7 +565,7 @@ double precision function Wallis(n) implicit none double precision :: fact integer :: n,p -include 'constants.F' +include 'include/constants.F' if(iand(n,1).eq.0)then Wallis = fact(ishft(n,-1)) Wallis = pi * fact(n) / (dble(ibset(0_8,n)) * (Wallis+Wallis)*Wallis) diff --git a/src/MRCC/README.rst b/src/MRCC/README.rst index ece272a1..091aa1b2 100644 --- a/src/MRCC/README.rst +++ b/src/MRCC/README.rst @@ -20,6 +20,51 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. +`davidson_diag_hjj_mrcc `_ + Davidson diagonalization with specific diagonal elements of the H matrix + .br + H_jj : specific diagonal H matrix elements to diagonalize de Davidson + .br + dets_in : bitmasks corresponding to determinants + .br + u_in : guess coefficients on the various states. Overwritten + on exit + .br + dim_in : leftmost dimension of u_in + .br + sze : Number of determinants + .br + N_st : Number of eigenstates + .br + iunit : Unit for the I/O + .br + Initial guess vectors are not necessarily orthonormal + +`davidson_diag_mrcc `_ + Davidson diagonalization. + .br + dets_in : bitmasks corresponding to determinants + .br + u_in : guess coefficients on the various states. Overwritten + on exit + .br + dim_in : leftmost dimension of u_in + .br + sze : Number of determinants + .br + N_st : Number of eigenstates + .br + iunit : Unit number for the I/O + .br + Initial guess vectors are not necessarily orthonormal + +`h_u_0_mrcc `_ + Computes v_0 = H|u_0> + .br + n : number of determinants + .br + H_jj : array of + `mrcc `_ Undocumented diff --git a/src/Makefile.common b/src/Makefile.common index 606e6f7c..d6c9dd90 100644 --- a/src/Makefile.common +++ b/src/Makefile.common @@ -1,5 +1,5 @@ .PHONY: default silent - +export ifneq ($(IN_MAKE),1) default: diff --git a/src/Makefile.config.example b/src/Makefile.config.example index 410bd0e2..14272070 100644 --- a/src/Makefile.config.example +++ b/src/Makefile.config.example @@ -2,7 +2,7 @@ OPENMP =1 PROFILE =0 DEBUG = 0 -IRPF90_FLAGS+= --align=32 +IRPF90_FLAGS+= --align=32 FC = ifort -g #FC = cache_compile.py ifort -g # Accelerates compilation FCFLAGS= @@ -13,6 +13,7 @@ FCFLAGS+= -ip FCFLAGS+= -opt-prefetch FCFLAGS+= -ftz MKL=-mkl=parallel +NINJA=ninja ifeq ($(PROFILE),1) FC += -p -g diff --git a/src/Perturbation/Makefile b/src/Perturbation/Makefile index b668f388..fe655ac1 100644 --- a/src/Perturbation/Makefile +++ b/src/Perturbation/Makefile @@ -1,6 +1,7 @@ # Define here all new external source files and objects.Don't forget to prefix the # object files with IRPF90_temp/ -SRC=perturbation_template.f +SRC= +#SRC=perturbation_template.f OBJ= include $(QPACKAGE_ROOT)/src/Makefile.common diff --git a/src/Pseudo/EZFIO.cfg b/src/Pseudo/EZFIO.cfg index bf3909d1..9804c807 100644 --- a/src/Pseudo/EZFIO.cfg +++ b/src/Pseudo/EZFIO.cfg @@ -59,19 +59,25 @@ default: False type: integer doc: Nb of points of the QMC grid interface: input -default: 100 +default: 1000 [pseudo_grid_rmax] type: double precision doc: R_maxof the QMC grid interface: input -default: 4.0 +default: 10.0 -[pseudo_grid] +[ao_pseudo_grid] type: double precision doc: QMC grid interface: output -size: (pseudo.pseudo_grid_size,ao_basis.ao_num,-pseudo.pseudo_lmax:pseudo.pseudo_lmax,0:pseudo.pseudo_lmax,nuclei.nucl_num) +size: (ao_basis.ao_num,-pseudo.pseudo_lmax:pseudo.pseudo_lmax,0:pseudo.pseudo_lmax,nuclei.nucl_num,pseudo.pseudo_grid_size) + +[mo_pseudo_grid] +type: double precision +doc: QMC grid +interface: output +size: (ao_basis.ao_num,-pseudo.pseudo_lmax:pseudo.pseudo_lmax,0:pseudo.pseudo_lmax,nuclei.nucl_num,pseudo.pseudo_grid_size) [pseudo_matrix] type: double precision diff --git a/src/QmcChem/README.rst b/src/QmcChem/README.rst index c4b467d7..b1f1b738 100644 --- a/src/QmcChem/README.rst +++ b/src/QmcChem/README.rst @@ -8,6 +8,39 @@ Documentation .. Do not edit this section. It was auto-generated from the .. NEEDED_MODULES file. +`ao_pseudo_grid `_ + Grid points for f(|r-r_A|) = \int Y_{lm}^{C} (|r-r_C|, \Omega_C) \chi_i^{A} (r-r_A) d\Omega_C + .br + + +`aux_pseudo_integral `_ + Pseudo-potential + +`aux_pseudo_integral_local `_ + Local pseudo-potential + +`aux_pseudo_integral_non_local `_ + Local pseudo-potential + +`mo_pseudo_grid `_ + Grid points for f(|r-r_A|) = \int Y_{lm}^{C} (|r-r_C|, \Omega_C) \phi_i^{A} (r-r_A) d\Omega_C + .br + + +`test_pseudo_grid_ao `_ + Undocumented + +`pseudo_matrix `_ + Pseudo-potential expressed in the basis of ao products + +`write_pseudopotential `_ + Write the pseudo_potential into the EZFIO file + +`save_for_qmc `_ + Undocumented + Needed Modules diff --git a/src/QmcChem/pot_ao_pseudo_ints.irp.f b/src/QmcChem/pot_ao_pseudo_ints.irp.f index 24d75504..0aa2a98c 100644 --- a/src/QmcChem/pot_ao_pseudo_ints.irp.f +++ b/src/QmcChem/pot_ao_pseudo_ints.irp.f @@ -220,9 +220,9 @@ END_PROVIDER deallocate(n_kl_dump,v_kl_dump, dz_kl_dump) - END_PROVIDER +END_PROVIDER -BEGIN_PROVIDER [ double precision, pseudo_grid, (pseudo_grid_size,ao_num,-pseudo_lmax:pseudo_lmax,0:pseudo_lmax,nucl_num) ] +BEGIN_PROVIDER [ double precision, ao_pseudo_grid, (ao_num,-pseudo_lmax:pseudo_lmax,0:pseudo_lmax,nucl_num,pseudo_grid_size) ] implicit none BEGIN_DOC ! Grid points for f(|r-r_A|) = \int Y_{lm}^{C} (|r-r_C|, \Omega_C) \chi_i^{A} (r-r_A) d\Omega_C @@ -249,19 +249,19 @@ BEGIN_PROVIDER [ double precision, pseudo_grid, (pseudo_grid_size,ao_num,-pseudo r(j) = r(j-1) + dr enddo - pseudo_grid = 0.d0 - do k=1,nucl_num - c(1:3) = nucl_coord(k,1:3) - do l=0,pseudo_lmax - do i=1,ao_num - a(1:3) = nucl_coord(ao_nucl(i),1:3) - n_a(1:3) = ao_power(i,1:3) - do j=1,pseudo_grid_size + ao_pseudo_grid = 0.d0 + do j=1,pseudo_grid_size + do k=1,nucl_num + c(1:3) = nucl_coord(k,1:3) + do l=0,pseudo_lmax + do i=1,ao_num + a(1:3) = nucl_coord(ao_nucl(i),1:3) + n_a(1:3) = ao_power(i,1:3) do p=1,ao_prim_num(i) g_a = ao_expo_ordered_transp(p,i) do m=-l,l y = ylm_orb(l,m,c,a,n_a,g_a,r(j)) - pseudo_grid(j,i,m,l,k) = pseudo_grid(j,i,m,l,k) + & + ao_pseudo_grid(i,m,l,k,j) = ao_pseudo_grid(i,m,l,k,j) + & ao_coef_normalized_ordered_transp(p,i)*y enddo enddo @@ -273,3 +273,69 @@ BEGIN_PROVIDER [ double precision, pseudo_grid, (pseudo_grid_size,ao_num,-pseudo END_PROVIDER +BEGIN_PROVIDER [ double precision, mo_pseudo_grid, (ao_num,-pseudo_lmax:pseudo_lmax,0:pseudo_lmax,nucl_num,pseudo_grid_size) ] + implicit none + BEGIN_DOC +! Grid points for f(|r-r_A|) = \int Y_{lm}^{C} (|r-r_C|, \Omega_C) \phi_i^{A} (r-r_A) d\Omega_C +! +! + END_DOC + ! l,m : Y(l,m) parameters + ! c(3) : pseudopotential center + ! a(3) : Atomic Orbital center + ! n_a(3) : Powers of x,y,z in the Atomic Orbital + ! g_a : Atomic Orbital exponent + ! r : Distance between the Atomic Orbital center and the considered point + double precision, external :: ylm_orb + integer :: n_a(3) + double precision :: a(3), c(3), g_a + integer :: i,j,k,l,m,n,p + double precision :: r(pseudo_grid_size), dr, Ulc + double precision :: y + + dr = pseudo_grid_rmax/dble(pseudo_grid_size) + r(1) = 0.d0 + do j=2,pseudo_grid_size + r(j) = r(j-1) + dr + enddo + + mo_pseudo_grid = 0.d0 + do n=1,pseudo_grid_size + do k=1,nucl_num + do l=0,pseudo_lmax + do m=-l,l + do j=1,mo_tot_num + do i=1,ao_num + mo_pseudo_grid(j,m,l,k,n) = mo_pseudo_grid(j,m,l,k,n) + & + ao_pseudo_grid(i,m,l,k,n) * mo_coef(i,j) + enddo + enddo + enddo + enddo + enddo + enddo + +END_PROVIDER + +double precision function test_pseudo_grid_ao(i,j) + implicit none + integer, intent(in) :: i,j + integer :: k,l,m,n + double precision :: r, dr,u + dr = pseudo_grid_rmax/dble(pseudo_grid_size) + + test_pseudo_grid_ao = 0.d0 + r = 0.d0 + do k=1,pseudo_grid_size + do n=1,nucl_num + do l = 0,pseudo_lmax + u = pseudo_v_kl(n,l,1) * exp(-pseudo_dz_kl(n,l,1)*r*r)* r*r*dr + do m=-l,l + test_pseudo_grid_ao += ao_pseudo_grid(i,m,l,n,k) * ao_pseudo_grid(j,m,l,n,k) * u + enddo + enddo + enddo + r = r+dr + enddo +end diff --git a/src/QmcChem/pseudo.irp.f b/src/QmcChem/pseudo.irp.f index b0cd57a5..abf4a5b8 100644 --- a/src/QmcChem/pseudo.irp.f +++ b/src/QmcChem/pseudo.irp.f @@ -4,7 +4,8 @@ subroutine write_pseudopotential ! Write the pseudo_potential into the EZFIO file END_DOC ! call ezfio_set_pseudo_pseudo_matrix(pseudo_matrix) - call ezfio_set_pseudo_pseudo_grid(pseudo_grid) +! call ezfio_set_pseudo_ao_pseudo_grid(ao_pseudo_grid) + call ezfio_set_pseudo_mo_pseudo_grid(mo_pseudo_grid) end diff --git a/src/QmcChem/save_for_qmcchem.irp.f b/src/QmcChem/save_for_qmcchem.irp.f index cfc18338..4b028a7c 100644 --- a/src/QmcChem/save_for_qmcchem.irp.f +++ b/src/QmcChem/save_for_qmcchem.irp.f @@ -1,8 +1,8 @@ program save_for_qmc read_wf = .True. TOUCH read_wf -! call save_dets_qmcchem call write_spindeterminants -! call write_pseudopotential -! call save_aux_basis + if (do_pseudo) then + call write_pseudopotential + endif end diff --git a/src/Utils/integration.irp.f b/src/Utils/integration.irp.f index 89dc559d..ddeee2a9 100644 --- a/src/Utils/integration.irp.f +++ b/src/Utils/integration.irp.f @@ -6,7 +6,7 @@ subroutine give_explicit_poly_and_gaussian_x(P_new,P_center,p,fact_k,iorder,alph ! fact_k (x-x_P)^iorder(1) (y-y_P)^iorder(2) (z-z_P)^iorder(3) exp(-p(r-P)^2) END_DOC implicit none - include 'constants.F' + include 'include/constants.F' integer, intent(in) :: dim integer, intent(in) :: a,b ! powers : (x-xa)**a_x = (x-A(1))**a(1) double precision, intent(in) :: alpha, beta ! exponents @@ -53,7 +53,7 @@ subroutine give_explicit_poly_and_gaussian(P_new,P_center,p,fact_k,iorder,alpha, ! * [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 ) END_DOC implicit none - include 'constants.F' + include 'include/constants.F' integer, intent(in) :: dim integer, intent(in) :: a(3),b(3) ! powers : (x-xa)**a_x = (x-A(1))**a(1) double precision, intent(in) :: alpha, beta ! exponents @@ -131,7 +131,7 @@ subroutine give_explicit_poly_and_gaussian_double(P_new,P_center,p,fact_k,iorder ! * [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 ) END_DOC implicit none - include 'constants.F' + include 'include/constants.F' integer, intent(in) :: dim integer, intent(in) :: a(3),b(3) ! powers : (x-xa)**a_x = (x-A(1))**a(1) double precision, intent(in) :: alpha, beta, gama ! exponents diff --git a/src/Utils/need.irp.f b/src/Utils/need.irp.f index 22cb6a48..f34dbad6 100644 --- a/src/Utils/need.irp.f +++ b/src/Utils/need.irp.f @@ -46,7 +46,7 @@ double precision function rinteg(n,u) implicit double precision(a-h,o-z) - include 'constants.F' + include '../include/constants.F' ! pi=dacos(-1.d0) ichange=1 factor=1.d0 diff --git a/src/Utils/one_e_integration.irp.f b/src/Utils/one_e_integration.irp.f index d356454b..591e07a5 100644 --- a/src/Utils/one_e_integration.irp.f +++ b/src/Utils/one_e_integration.irp.f @@ -34,7 +34,7 @@ end subroutine overlap_A_B_C(dim,alpha,beta,gama,a,b,A_center,B_center,Nucl_center,overlap) implicit none - include 'constants.F' + include 'include/constants.F' integer, intent(in) :: dim integer, intent(in) :: a(3),b(3) ! powers : (x-xa)**a_x = (x-A(1))**a(1) double precision, intent(in) :: alpha, beta, gama ! exponents diff --git a/tests/unit_test/unit_test.py b/tests/unit_test/unit_test.py index 598300c5..119d7676 100755 --- a/tests/unit_test/unit_test.py +++ b/tests/unit_test/unit_test.py @@ -20,7 +20,7 @@ Energy = namedtuple('Energy', ['without_pseudo', 'with_pseudo']) # O p t # # ~#~#~ # -precision = 2.e-7 +precision = 5.e-7 # A test get a geo file and a basis file. # A global dict containt the result for this test @@ -169,7 +169,7 @@ def run_hf(geo, basis, mult=1, pseudo=False, remove_after_sucess=True): ref_energy["sto-3g"]["methane"] = Energy(-39.7267433402, None) ref_energy["vdz"]["SO2"] = Energy(None, -41.48912297776174) - ref_energy["vdz"]["HBO"] = Energy(None, -19.11982530413317) + ref_energy["vdz"]["HBO"] = Energy(None, -19.119821904) # ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ # # G l o b a l _ v a r i a b l e #