Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 379d552

Browse files
committed
Merge pull request #66 from scemama/master
Updated Pseudopotential and IRPF90/Ninja build
2 parents e8a3b20 + e66e38e commit 379d552

28 files changed

+233
-56
lines changed

scripts/get_basis.sh

+2
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,7 @@ then
5151
${EMSL_API_ROOT}/EMSL_api.py get_basis_data --treat_l --save --path="${tmpfile}" --basis="${basis}"
5252
else
5353
${EMSL_API_ROOT}/EMSL_api.py get_basis_data --save --path="${tmpfile}" --basis="${basis}" --db_path="${EMSL_API_ROOT}/db/Pseudo.db"
54+
# 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
55+
# echo $PWD/BASIS
5456
fi
5557

File renamed without changes.

scripts/install/install_curl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ then
2222
fi
2323

2424
rm -f -- ${QPACKAGE_ROOT}/bin/curl
25-
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${CURL_URL} CURL.tar.bz2
25+
${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${CURL_URL} CURL.tar.bz2
2626
tar -jxf CURL.tar.bz2 && rm CURL.tar.bz2 ||exit 1
2727
cd ${CURL} || exit 1
2828
mv curl.ermine ${QPACKAGE_ROOT}/bin/curl

scripts/install/install_docopt.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ fi
1616
cd ${QPACKAGE_ROOT}
1717

1818
rm -f -- scripts/${DOCOPT}{,c}
19-
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${DOCOPT_URL} ${DOCOPT}
19+
${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${DOCOPT_URL} ${DOCOPT}
2020

21-
mv ${DOCOPT} scripts/${DOCOPT}
21+
mv ${DOCOPT} scripts/${DOCOPT}

scripts/install/install_emsl.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fi
1515

1616
cd ${QPACKAGE_ROOT}
1717

18-
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz
18+
${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz
1919
tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1
2020
rm -rf EMSL_Basis
2121
mv ${BASE}-master EMSL_Basis

scripts/install/install_ezfio.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fi
1616
cd ${QPACKAGE_ROOT}
1717

1818
rm -rf -- EZFIO
19-
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz
19+
${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz
2020
tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1
2121
mv EZFIO-master EZFIO
2222

scripts/install/install_irpf90.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
cd ${QPACKAGE_ROOT}
1818

1919

20-
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz
20+
${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz
2121
tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1
2222
mv ${BASE}-master irpf90
2323
make -C irpf90 | tee install_irpf90.log

scripts/install/install_m4.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ rm -f l${QPACKAGE_ROOT}/bin/m4
2020
if [[ -z ${M4} ]]
2121
then
2222
rm -f -- bin/m4
23-
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${M4_URL} M4.tar.gz
23+
${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${M4_URL} M4.tar.gz
2424
tar -zxf M4.tar.gz && rm M4.tar.gz ||exit 1
2525
cd m4* || exit 1
2626
./configure && make || exit 1

scripts/install/install_ninja.sh

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
#
3+
# Installs the ninja build system
4+
# Thu May 28 13:21:16 CEST 2015
5+
6+
BASE="ninja"
7+
URL="https://github.com/martine/ninja/archive/master.tar.gz"
8+
if [[ -z ${QPACKAGE_ROOT} ]]
9+
then
10+
echo "The QPACKAGE_ROOT environment variable is not set."
11+
echo "Please reload the quantum_package.rc file."
12+
exit -1
13+
fi
14+
cd ${QPACKAGE_ROOT}
15+
${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py ${URL} ${QPACKAGE_ROOT}/${BASE}.tar.gz
16+
tar -zxf ${BASE}.tar.gz && rm ${BASE}.tar.gz ||exit 1
17+
rm -rf ${BASE}
18+
mv ${BASE}-master ${BASE}
19+
cd ${BASE}
20+
./configure.py --bootstrap
21+

scripts/install/install_ocaml.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ then
4545
done
4646
fi
4747
fi
48-
${QPACKAGE_ROOT}/scripts/fetch_from_web.py \
48+
${QPACKAGE_ROOT}/scripts/install/fetch_from_web.py \
4949
"https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh" opam_installer.sh
5050
chmod +x opam_installer.sh
5151
echo N | ./opam_installer.sh ${QPACKAGE_ROOT}/bin

scripts/module/create_Makefile_depend.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ DEPS="$NEEDED_MODULES"
2323
for M in ${DEPS}
2424
do
2525
# X is the list of external source files
26-
X=$(grep 'SRC=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2)
26+
X=$(grep '^SRC=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2)
2727
for f in ${X}
2828
do
2929
SRC+=" ${M}/${f}"
3030
done
31-
X=$(grep 'OBJ=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2)
31+
X=$(grep '^OBJ=' "${QPACKAGE_ROOT}/src/${M}/Makefile" 2>/dev/null |cut -d '=' -f 2)
3232
for f in ${X}
3333
do
3434
OBJ+=" IRPF90_temp/${M}/${f/IRPF90_temp//}"

src/AOs/dimensions_integrals.irp.f

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
implicit none
44
integer :: n_pt_sup
55
integer :: prim_power_l_max
6-
include 'constants.F'
6+
include 'include/constants.F'
77
prim_power_l_max = maxval(ao_power)
88
n_pt_max_integrals = 24 * prim_power_l_max + 4
99
n_pt_max_i_x = 8 * prim_power_l_max

src/Determinants/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Define here all new external source files and objects.Don't forget to prefix the
22
# object files with IRPF90_temp/
3-
SRC=H_apply_template.f
3+
#SRC=H_apply_template.f
4+
SRC=
45
OBJ=
56

67
include $(QPACKAGE_ROOT)/src/Makefile.common

src/Integrals_Bielec/ao_bi_integrals.irp.f

+8-8
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ double precision function general_primitive_integral(dim, &
519519
! Computes the integral <pq|rs> where p,q,r,s are Gaussian primitives
520520
END_DOC
521521
integer,intent(in) :: dim
522-
include 'constants.F'
522+
include 'include/constants.F'
523523
double precision, intent(in) :: P_new(0:max_dim,3),P_center(3),fact_p,p,p_inv
524524
double precision, intent(in) :: Q_new(0:max_dim,3),Q_center(3),fact_q,q,q_inv
525525
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,
665665
integer :: n_pt_sup
666666
double precision :: p,q,denom,coeff
667667
double precision :: I_f
668-
include 'constants.F'
668+
include 'include/constants.F'
669669
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
670670
ERI = 0.d0
671671
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
859859
integer, intent(in) :: a_x,d_x
860860
double precision, intent(in) :: P_center, Q_center
861861
double precision, intent(in) :: p,q,pq_inv,p10_1,p01_1,p10_2,p01_2,pq_inv_2
862-
include 'constants.F'
862+
include 'include/constants.F'
863863
double precision,intent(out) :: d(0:max_dim)
864864
double precision :: accu
865865
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)
916916
! recursive function involved in the bielectronic integral
917917
END_DOC
918918
integer , intent(in) :: n_pt_in
919-
include 'constants.F'
919+
include 'include/constants.F'
920920
double precision,intent(inout) :: d(0:max_dim)
921921
integer,intent(inout) :: nd
922922
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
950950
! recursive function involved in the bielectronic integral
951951
END_DOC
952952
integer , intent(in) :: n_pt_in
953-
include 'constants.F'
953+
include 'include/constants.F'
954954
double precision,intent(inout) :: d(0:max_dim)
955955
integer,intent(inout) :: nd
956956
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)
10361036
! recursive function involved in the bielectronic integral
10371037
END_DOC
10381038
integer , intent(in) :: n_pt_in
1039-
include 'constants.F'
1039+
include 'include/constants.F'
10401040
double precision,intent(inout) :: d(0:max_dim)
10411041
integer,intent(inout) :: nd
10421042
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)
10901090
! recursive function involved in the bielectronic integral
10911091
END_DOC
10921092
integer , intent(in) :: n_pt_in
1093-
include 'constants.F'
1093+
include 'include/constants.F'
10941094
double precision,intent(inout) :: d(0:max_dim)
10951095
integer,intent(inout) :: nd
10961096
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)
11521152
! recursive function involved in the bielectronic integral
11531153
END_DOC
11541154
integer , intent(in) :: dim
1155-
include 'constants.F'
1155+
include 'include/constants.F'
11561156
double precision :: d(0:max_dim)
11571157
integer,intent(inout) :: nd
11581158
integer, intent(in) :: c

src/Integrals_Monoelec/pot_ao_ints.irp.f

+7-7
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ double precision function NAI_pol_mult(A_center,B_center,power_A,power_B,alpha,b
148148
double precision :: d(0:n_pt_in),pouet,coeff,rho,dist,const,pouet_2,p,p_inv,factor
149149
double precision :: I_n_special_exact,integrate_bourrin,I_n_bibi
150150
double precision :: V_e_n,const_factor,dist_integral,tmp
151-
include 'constants.F'
151+
include 'include/constants.F'
152152
if ( (A_center(1)/=B_center(1)).or. &
153153
(A_center(2)/=B_center(2)).or. &
154154
(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)
351351
integer,intent(inout) :: nd
352352
integer, intent(in):: a,c
353353
double precision, intent(in) :: R1x(0:2),R1xp(0:2),R2x(0:2)
354-
include 'constants.F'
354+
include 'include/constants.F'
355355
double precision :: X(0:max_dim)
356356
double precision :: Y(0:max_dim)
357357
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: X, Y
@@ -417,7 +417,7 @@ recursive subroutine I_x1_pol_mult_mono_elec(a,c,R1x,R1xp,R2x,d,nd,n_pt_in)
417417
recursive subroutine I_x2_pol_mult_mono_elec(c,R1x,R1xp,R2x,d,nd,dim)
418418
implicit none
419419
integer , intent(in) :: dim
420-
include 'constants.F'
420+
include 'include/constants.F'
421421
double precision :: d(0:max_dim)
422422
integer,intent(inout) :: nd
423423
integer, intent(in):: c
@@ -492,7 +492,7 @@ double precision function int_gaus_pol(alpha,n)
492492
double precision :: alpha
493493
integer :: n
494494
double precision :: dble_fact
495-
include 'constants.F'
495+
include 'include/constants.F'
496496

497497
!if(iand(n,1).eq.1)then
498498
! int_gaus_pol= 0.d0
@@ -521,7 +521,7 @@ double precision function V_r(n,alpha)
521521
implicit none
522522
double precision :: alpha, fact
523523
integer :: n
524-
include 'constants.F'
524+
include 'include/constants.F'
525525
if(iand(n,1).eq.1)then
526526
V_r = 0.5d0 * fact(ishft(n,-1)) / (alpha ** (ishft(n,-1) + 1))
527527
else
@@ -549,7 +549,7 @@ double precision function V_theta(n,m)
549549
!! integral on "theta" with boundaries ( 0 ; pi) of [ cos(theta) **n sin(theta) **m ]
550550
integer :: n,m,i
551551
double precision :: Wallis, prod
552-
include 'constants.F'
552+
include 'include/constants.F'
553553
V_theta = 0.d0
554554
prod = 1.d0
555555
do i = 0,ishft(n,-1)-1
@@ -565,7 +565,7 @@ double precision function Wallis(n)
565565
implicit none
566566
double precision :: fact
567567
integer :: n,p
568-
include 'constants.F'
568+
include 'include/constants.F'
569569
if(iand(n,1).eq.0)then
570570
Wallis = fact(ishft(n,-1))
571571
Wallis = pi * fact(n) / (dble(ibset(0_8,n)) * (Wallis+Wallis)*Wallis)

src/MRCC/README.rst

+45
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,51 @@ Documentation
2020
.. Do not edit this section. It was auto-generated from the
2121
.. NEEDED_MODULES file.
2222
23+
`davidson_diag_hjj_mrcc <https://github.com/LCPQ/quantum_package/tree/master/src/MRCC/davidson.irp.f#L51>`_
24+
Davidson diagonalization with specific diagonal elements of the H matrix
25+
.br
26+
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
27+
.br
28+
dets_in : bitmasks corresponding to determinants
29+
.br
30+
u_in : guess coefficients on the various states. Overwritten
31+
on exit
32+
.br
33+
dim_in : leftmost dimension of u_in
34+
.br
35+
sze : Number of determinants
36+
.br
37+
N_st : Number of eigenstates
38+
.br
39+
iunit : Unit for the I/O
40+
.br
41+
Initial guess vectors are not necessarily orthonormal
42+
43+
`davidson_diag_mrcc <https://github.com/LCPQ/quantum_package/tree/master/src/MRCC/davidson.irp.f#L1>`_
44+
Davidson diagonalization.
45+
.br
46+
dets_in : bitmasks corresponding to determinants
47+
.br
48+
u_in : guess coefficients on the various states. Overwritten
49+
on exit
50+
.br
51+
dim_in : leftmost dimension of u_in
52+
.br
53+
sze : Number of determinants
54+
.br
55+
N_st : Number of eigenstates
56+
.br
57+
iunit : Unit number for the I/O
58+
.br
59+
Initial guess vectors are not necessarily orthonormal
60+
61+
`h_u_0_mrcc <https://github.com/LCPQ/quantum_package/tree/master/src/MRCC/davidson.irp.f#L355>`_
62+
Computes v_0 = H|u_0>
63+
.br
64+
n : number of determinants
65+
.br
66+
H_jj : array of <j|H|j>
67+
2368
`mrcc <https://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc.irp.f#L1>`_
2469
Undocumented
2570

src/Makefile.common

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.PHONY: default silent
2-
2+
export
33
ifneq ($(IN_MAKE),1)
44

55
default:

src/Makefile.config.example

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ OPENMP =1
22
PROFILE =0
33
DEBUG = 0
44

5-
IRPF90_FLAGS+= --align=32
5+
IRPF90_FLAGS+= --align=32
66
FC = ifort -g
77
#FC = cache_compile.py ifort -g # Accelerates compilation
88
FCFLAGS=
@@ -13,6 +13,7 @@ FCFLAGS+= -ip
1313
FCFLAGS+= -opt-prefetch
1414
FCFLAGS+= -ftz
1515
MKL=-mkl=parallel
16+
NINJA=ninja
1617

1718
ifeq ($(PROFILE),1)
1819
FC += -p -g

src/Perturbation/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Define here all new external source files and objects.Don't forget to prefix the
22
# object files with IRPF90_temp/
3-
SRC=perturbation_template.f
3+
SRC=
4+
#SRC=perturbation_template.f
45
OBJ=
56

67
include $(QPACKAGE_ROOT)/src/Makefile.common

src/Pseudo/EZFIO.cfg

+10-4
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,25 @@ default: False
5959
type: integer
6060
doc: Nb of points of the QMC grid
6161
interface: input
62-
default: 100
62+
default: 1000
6363

6464
[pseudo_grid_rmax]
6565
type: double precision
6666
doc: R_maxof the QMC grid
6767
interface: input
68-
default: 4.0
68+
default: 10.0
6969

70-
[pseudo_grid]
70+
[ao_pseudo_grid]
7171
type: double precision
7272
doc: QMC grid
7373
interface: output
74-
size: (pseudo.pseudo_grid_size,ao_basis.ao_num,-pseudo.pseudo_lmax:pseudo.pseudo_lmax,0:pseudo.pseudo_lmax,nuclei.nucl_num)
74+
size: (ao_basis.ao_num,-pseudo.pseudo_lmax:pseudo.pseudo_lmax,0:pseudo.pseudo_lmax,nuclei.nucl_num,pseudo.pseudo_grid_size)
75+
76+
[mo_pseudo_grid]
77+
type: double precision
78+
doc: QMC grid
79+
interface: output
80+
size: (ao_basis.ao_num,-pseudo.pseudo_lmax:pseudo.pseudo_lmax,0:pseudo.pseudo_lmax,nuclei.nucl_num,pseudo.pseudo_grid_size)
7581

7682
[pseudo_matrix]
7783
type: double precision

0 commit comments

Comments
 (0)