mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
This commit is contained in:
parent
cfd0c87505
commit
145e18f394
2
configure
vendored
2
configure
vendored
@ -231,7 +231,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
elif [[ ${PACKAGE} = qmckl ]] ; then
|
elif [[ ${PACKAGE} = qmckl ]] ; then
|
||||||
|
|
||||||
VERSION=0.5.2
|
VERSION=0.5.3
|
||||||
execute << EOF
|
execute << EOF
|
||||||
cd "\${QP_ROOT}"/external
|
cd "\${QP_ROOT}"/external
|
||||||
wget https://github.com/TREX-CoE/qmckl/releases/download/v${VERSION}/qmckl-${VERSION}.tar.gz
|
wget https://github.com/TREX-CoE/qmckl/releases/download/v${VERSION}/qmckl-${VERSION}.tar.gz
|
||||||
|
@ -49,12 +49,13 @@ if __name__ == '__main__':
|
|||||||
ezfio.set_jastrow_jast_qmckl_type_nucl_num(jastrow['type_num'])
|
ezfio.set_jastrow_jast_qmckl_type_nucl_num(jastrow['type_num'])
|
||||||
charges = ezfio.get_nuclei_nucl_charge()
|
charges = ezfio.get_nuclei_nucl_charge()
|
||||||
types = {}
|
types = {}
|
||||||
k = 0
|
k = 1
|
||||||
for c in charges:
|
for c in charges:
|
||||||
if c not in types:
|
if c not in types:
|
||||||
types[c] = k
|
types[c] = k
|
||||||
k += 1
|
k += 1
|
||||||
type_nucl_vector = [types[c] for c in charges]
|
type_nucl_vector = [types[c] for c in charges]
|
||||||
|
print(type_nucl_vector)
|
||||||
ezfio.set_jastrow_jast_qmckl_type_nucl_vector(type_nucl_vector)
|
ezfio.set_jastrow_jast_qmckl_type_nucl_vector(type_nucl_vector)
|
||||||
ezfio.set_jastrow_jast_qmckl_rescale_ee(jastrow['scale_k'])
|
ezfio.set_jastrow_jast_qmckl_rescale_ee(jastrow['scale_k'])
|
||||||
ezfio.set_jastrow_jast_qmckl_rescale_en([jastrow['scale_k'] for i in type_nucl_vector])
|
ezfio.set_jastrow_jast_qmckl_rescale_en([jastrow['scale_k'] for i in type_nucl_vector])
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
!
|
!
|
||||||
! notice the -1 sign: in this way three_e_4_idx_direct_bi_ort can be directly used to compute Slater rules with a + sign
|
! notice the -1 sign: in this way three_e_4_idx_direct_bi_ort can be directly used to compute Slater rules with a + sign
|
||||||
!
|
!
|
||||||
! three_e_4_idx_direct_bi_ort (m,j,k,i) : Lk Ri Imm Ijj + Lj Rj Imm Iki + Lm Rm Ijj Iki
|
! three_e_4_idx_direct_bi_ort (m,j,k,i) : Lk Ri Imm Ijj + Lj Rj Imm Iki + Lm Rm Ijj Iki
|
||||||
! three_e_4_idx_exch13_bi_ort (m,j,k,i) : Lk Rm Imi Ijj + Lj Rj Imi Ikm + Lm Ri Ijj Ikm
|
! three_e_4_idx_exch13_bi_ort (m,j,k,i) : Lk Rm Imi Ijj + Lj Rj Imi Ikm + Lm Ri Ijj Ikm
|
||||||
! three_e_4_idx_exch23_bi_ort (m,j,k,i) : Lk Ri Imj Ijm + Lj Rm Imj Iki + Lm Rj Ijm Iki
|
! three_e_4_idx_exch23_bi_ort (m,j,k,i) : Lk Ri Imj Ijm + Lj Rm Imj Iki + Lm Rj Ijm Iki
|
||||||
! three_e_4_idx_cycle_1_bi_ort(m,j,k,i) : Lk Rm Imj Iji + Lj Ri Imj Ikm + Lm Rj Iji Ikm
|
! three_e_4_idx_cycle_1_bi_ort(m,j,k,i) : Lk Rm Imj Iji + Lj Ri Imj Ikm + Lm Rj Iji Ikm
|
||||||
!
|
!
|
||||||
END_DOC
|
END_DOC
|
||||||
|
|
||||||
@ -74,8 +74,8 @@
|
|||||||
|
|
||||||
!$OMP PARALLEL &
|
!$OMP PARALLEL &
|
||||||
!$OMP DEFAULT (NONE) &
|
!$OMP DEFAULT (NONE) &
|
||||||
!$OMP PRIVATE (n, ipoint, tmp_loc_1, tmp_loc_2, tmp_2d, tmp1, tmp2) &
|
!$OMP PRIVATE (k, i, j, m, n, ipoint, tmp_loc_1, tmp_loc_2, tmp_2d, tmp1, tmp2) &
|
||||||
!$OMP SHARED (mo_num, n_points_final_grid, i, k, &
|
!$OMP SHARED (mo_num, n_points_final_grid, &
|
||||||
!$OMP mos_l_in_r_array_transp, mos_r_in_r_array_transp, &
|
!$OMP mos_l_in_r_array_transp, mos_r_in_r_array_transp, &
|
||||||
!$OMP int2_grad1_u12_bimo_t, final_weight_at_r_vector, &
|
!$OMP int2_grad1_u12_bimo_t, final_weight_at_r_vector, &
|
||||||
!$OMP tmp_aux_1, tmp_aux_2, &
|
!$OMP tmp_aux_1, tmp_aux_2, &
|
||||||
@ -125,17 +125,17 @@
|
|||||||
|
|
||||||
do n = 1, mo_num
|
do n = 1, mo_num
|
||||||
do ipoint = 1, n_points_final_grid
|
do ipoint = 1, n_points_final_grid
|
||||||
|
|
||||||
tmp_loc_1 = mos_l_in_r_array_transp(ipoint,k) * mos_r_in_r_array_transp(ipoint,n)
|
tmp_loc_1 = mos_l_in_r_array_transp(ipoint,k) * mos_r_in_r_array_transp(ipoint,n)
|
||||||
tmp_loc_2 = mos_l_in_r_array_transp(ipoint,n) * mos_r_in_r_array_transp(ipoint,i)
|
tmp_loc_2 = mos_l_in_r_array_transp(ipoint,n) * mos_r_in_r_array_transp(ipoint,i)
|
||||||
|
|
||||||
tmp1(ipoint,1,n) = int2_grad1_u12_bimo_t(ipoint,1,n,i) * tmp_loc_1 + int2_grad1_u12_bimo_t(ipoint,1,k,n) * tmp_loc_2
|
tmp1(ipoint,1,n) = int2_grad1_u12_bimo_t(ipoint,1,n,i) * tmp_loc_1 + int2_grad1_u12_bimo_t(ipoint,1,k,n) * tmp_loc_2
|
||||||
tmp1(ipoint,2,n) = int2_grad1_u12_bimo_t(ipoint,2,n,i) * tmp_loc_1 + int2_grad1_u12_bimo_t(ipoint,2,k,n) * tmp_loc_2
|
tmp1(ipoint,2,n) = int2_grad1_u12_bimo_t(ipoint,2,n,i) * tmp_loc_1 + int2_grad1_u12_bimo_t(ipoint,2,k,n) * tmp_loc_2
|
||||||
tmp1(ipoint,3,n) = int2_grad1_u12_bimo_t(ipoint,3,n,i) * tmp_loc_1 + int2_grad1_u12_bimo_t(ipoint,3,k,n) * tmp_loc_2
|
tmp1(ipoint,3,n) = int2_grad1_u12_bimo_t(ipoint,3,n,i) * tmp_loc_1 + int2_grad1_u12_bimo_t(ipoint,3,k,n) * tmp_loc_2
|
||||||
tmp1(ipoint,4,n) = int2_grad1_u12_bimo_t(ipoint,1,n,i) * int2_grad1_u12_bimo_t(ipoint,1,k,n) &
|
tmp1(ipoint,4,n) = int2_grad1_u12_bimo_t(ipoint,1,n,i) * int2_grad1_u12_bimo_t(ipoint,1,k,n) &
|
||||||
+ int2_grad1_u12_bimo_t(ipoint,2,n,i) * int2_grad1_u12_bimo_t(ipoint,2,k,n) &
|
+ int2_grad1_u12_bimo_t(ipoint,2,n,i) * int2_grad1_u12_bimo_t(ipoint,2,k,n) &
|
||||||
+ int2_grad1_u12_bimo_t(ipoint,3,n,i) * int2_grad1_u12_bimo_t(ipoint,3,k,n)
|
+ int2_grad1_u12_bimo_t(ipoint,3,n,i) * int2_grad1_u12_bimo_t(ipoint,3,k,n)
|
||||||
|
|
||||||
tmp2(ipoint,1,n) = final_weight_at_r_vector(ipoint) * int2_grad1_u12_bimo_t(ipoint,1,i,n)
|
tmp2(ipoint,1,n) = final_weight_at_r_vector(ipoint) * int2_grad1_u12_bimo_t(ipoint,1,i,n)
|
||||||
tmp2(ipoint,2,n) = final_weight_at_r_vector(ipoint) * int2_grad1_u12_bimo_t(ipoint,2,i,n)
|
tmp2(ipoint,2,n) = final_weight_at_r_vector(ipoint) * int2_grad1_u12_bimo_t(ipoint,2,i,n)
|
||||||
tmp2(ipoint,3,n) = final_weight_at_r_vector(ipoint) * int2_grad1_u12_bimo_t(ipoint,3,i,n)
|
tmp2(ipoint,3,n) = final_weight_at_r_vector(ipoint) * int2_grad1_u12_bimo_t(ipoint,3,i,n)
|
||||||
@ -225,7 +225,7 @@
|
|||||||
print *, ' wall time for three_e_4_idx_bi_ort', wall1 - wall0
|
print *, ' wall time for three_e_4_idx_bi_ort', wall1 - wall0
|
||||||
call print_memory_usage()
|
call print_memory_usage()
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
! ---
|
! ---
|
||||||
|
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
BEGIN_PROVIDER [ integer*8, qmckl_ctx_jastrow ]
|
BEGIN_PROVIDER [ integer*8, qmckl_ctx_jastrow ]
|
||||||
use qmckl
|
use qmckl
|
||||||
|
use iso_c_binding
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Context for the QMCKL library
|
! Context for the QMCKL library
|
||||||
END_DOC
|
END_DOC
|
||||||
integer(qmckl_exit_code) :: rc
|
integer(qmckl_exit_code) :: rc
|
||||||
|
logical(c_bool) :: c_true = .True.
|
||||||
|
|
||||||
qmckl_ctx_jastrow = qmckl_context_create()
|
qmckl_ctx_jastrow = qmckl_context_create()
|
||||||
|
|
||||||
|
rc = qmckl_set_jastrow_champ_spin_independent(qmckl_ctx_jastrow, c_true)
|
||||||
|
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||||
|
if (rc /= QMCKL_SUCCESS) stop -1
|
||||||
|
|
||||||
rc = qmckl_set_nucleus_num(qmckl_ctx_jastrow, nucl_num*1_8)
|
rc = qmckl_set_nucleus_num(qmckl_ctx_jastrow, nucl_num*1_8)
|
||||||
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||||
if (rc /= QMCKL_SUCCESS) stop -1
|
if (rc /= QMCKL_SUCCESS) stop -1
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
print *, ' parameters for nuclei jastrow'
|
print *, ' parameters for nuclei jastrow'
|
||||||
print *, ' i, Z, j1b_pen, j1b_pen_coef'
|
print *, ' i, Z, j1b_pen, j1b_pen_coef'
|
||||||
do i = 1, nucl_num
|
do i = 1, nucl_num
|
||||||
write(*,"(I4, 2x, 3(E15.7, 2X))"), i, nucl_charge(i), j1b_pen(i), j1b_pen_coef(i)
|
write(*,'(I4, 2x, 3(E15.7, 2X))') i, nucl_charge(i), j1b_pen(i), j1b_pen_coef(i)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
Loading…
Reference in New Issue
Block a user