From 367d0ff108180dd4d243f765c24fc350e3e1f495 Mon Sep 17 00:00:00 2001 From: v1j4y Date: Fri, 11 Feb 2022 17:19:36 +0100 Subject: [PATCH] Fixed een_rescaled_n. --- org/qmckl_jastrow.org | 128 +++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 63 deletions(-) diff --git a/org/qmckl_jastrow.org b/org/qmckl_jastrow.org index a74069e..72e916c 100644 --- a/org/qmckl_jastrow.org +++ b/org/qmckl_jastrow.org @@ -3635,11 +3635,11 @@ assert(fabs(een_rescaled_e_deriv_e[0][2][1][0][5] + 0.5880599146214673 ) < 1. *** Get #+begin_src c :comments org :tangle (eval h_func) :noweb yes -qmckl_exit_code qmckl_get_jastrow_een_rescaled_n(qmckl_context context, double* const distance_rescaled); +qmckl_exit_code qmckl_get_jastrow_een_rescaled_n(qmckl_context context, double* const distance_rescaled, int64_t* size_max); #+end_src #+begin_src c :comments org :tangle (eval c) :noweb yes :exports none -qmckl_exit_code qmckl_get_jastrow_een_rescaled_n(qmckl_context context, double* const distance_rescaled) +qmckl_exit_code qmckl_get_jastrow_een_rescaled_n(qmckl_context context, double* const distance_rescaled, int64_t* size_max) { if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) { return QMCKL_NULL_CONTEXT; @@ -3655,6 +3655,7 @@ qmckl_exit_code qmckl_get_jastrow_een_rescaled_n(qmckl_context context, double* size_t sze = ctx->electron.num * ctx->nucleus.num * ctx->electron.walk_num * (ctx->jastrow.cord_num + 1); memcpy(distance_rescaled, ctx->jastrow.een_rescaled_n, sze * sizeof(double)); + (*size_max)=sze; return QMCKL_SUCCESS; } @@ -3738,7 +3739,7 @@ qmckl_exit_code qmckl_provide_een_rescaled_n(qmckl_context context) | ~cord_num~ | ~int64_t~ | in | Order of polynomials | | ~rescale_factor_kappa_en~ | ~double~ | in | Factor to rescale ee distances | | ~en_distance~ | ~double[walk_num][elec_num][nucl_num]~ | in | Electron-nucleus distances | - | ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | out | Electron-nucleus rescaled distances | + | ~een_rescaled_n~ | ~double[walk_num][0:cord_num][nucl_num][elec_num]~ | out | Electron-nucleus rescaled distances | #+begin_src f90 :comments org :tangle (eval f) :noweb yes integer function qmckl_compute_een_rescaled_n_f(context, walk_num, elec_num, nucl_num, cord_num, rescale_factor_kappa_en, & @@ -3753,7 +3754,7 @@ integer function qmckl_compute_een_rescaled_n_f(context, walk_num, elec_num, nuc integer*8 , intent(in) :: cord_num double precision , intent(in) :: rescale_factor_kappa_en double precision , intent(in) :: en_distance(elec_num,nucl_num,walk_num) - double precision , intent(out) :: een_rescaled_n(0:cord_num,nucl_num,elec_num,walk_num) + double precision , intent(out) :: een_rescaled_n(elec_num,nucl_num,0:cord_num,walk_num) double precision :: x integer*8 :: i, a, k, l, nw @@ -3789,18 +3790,18 @@ integer function qmckl_compute_een_rescaled_n_f(context, walk_num, elec_num, nuc do nw = 1, walk_num ! prepare the actual een table - een_rescaled_n(0, :, :, nw) = 1.0d0 + een_rescaled_n(:, :, 0, nw) = 1.0d0 do a = 1, nucl_num do i = 1, elec_num - een_rescaled_n(1, a, i, nw) = dexp(-rescale_factor_kappa_en * en_distance(i, a, nw)) + een_rescaled_n(i, a, 1, nw) = dexp(-rescale_factor_kappa_en * en_distance(i, a, nw)) end do end do do l = 2, cord_num do a = 1, nucl_num do i = 1, elec_num - een_rescaled_n(l, a, i, nw) = een_rescaled_n(l - 1, a, i, nw) * een_rescaled_n(1, a, i, nw) + een_rescaled_n(i, a, l, nw) = een_rescaled_n(i, a, l - 1, nw) * een_rescaled_n(i, a, 1, nw) end do end do end do @@ -3849,7 +3850,7 @@ end function qmckl_compute_een_rescaled_n_f integer (c_int64_t) , intent(in) , value :: cord_num real (c_double ) , intent(in) , value :: rescale_factor_kappa_en real (c_double ) , intent(in) :: en_distance(nucl_num,elec_num,walk_num) - real (c_double ) , intent(out) :: een_rescaled_n(0:cord_num,nucl_num,elec_num,walk_num) + real (c_double ) , intent(out) :: een_rescaled_n(nucl_num,elec_num,0:cord_num,walk_num) integer(c_int32_t), external :: qmckl_compute_een_rescaled_n_f info = qmckl_compute_een_rescaled_n_f & @@ -3912,16 +3913,17 @@ print(" een_rescaled_n[1, 5, 2] = ",een_rescaled_n[1, 5, 2]) #+begin_src c :tangle (eval c_test) assert(qmckl_electron_provided(context)); -double een_rescaled_n[walk_num][elec_num][nucl_num][(cord_num + 1)]; -rc = qmckl_get_jastrow_een_rescaled_n(context, &(een_rescaled_n[0][0][0][0])); +double een_rescaled_n[walk_num][(cord_num + 1)][nucl_num][elec_num]; +size_max=0; +rc = qmckl_get_jastrow_een_rescaled_n(context, &(een_rescaled_n[0][0][0][0]),&size_max); // value of (0,2,1) -assert(fabs(een_rescaled_n[0][2][0][1]-0.10612983920006765) < 1.e-12); -assert(fabs(een_rescaled_n[0][3][0][1]-0.135652809635553) < 1.e-12); -assert(fabs(een_rescaled_n[0][4][0][1]-0.023391817607642338) < 1.e-12); -assert(fabs(een_rescaled_n[0][3][1][2]-0.880957224822116) < 1.e-12); -assert(fabs(een_rescaled_n[0][4][1][2]-0.027185942659395074) < 1.e-12); -assert(fabs(een_rescaled_n[0][5][1][2]-0.01343938025140174) < 1.e-12); +assert(fabs(een_rescaled_n[0][1][0][2]-0.10612983920006765) < 1.e-12); +assert(fabs(een_rescaled_n[0][1][0][3]-0.135652809635553) < 1.e-12); +assert(fabs(een_rescaled_n[0][1][0][4]-0.023391817607642338) < 1.e-12); +assert(fabs(een_rescaled_n[0][2][1][3]-0.880957224822116) < 1.e-12); +assert(fabs(een_rescaled_n[0][2][1][4]-0.027185942659395074) < 1.e-12); +assert(fabs(een_rescaled_n[0][2][1][5]-0.01343938025140174) < 1.e-12); #+end_src @@ -4046,7 +4048,7 @@ qmckl_exit_code qmckl_provide_een_rescaled_n_deriv_e(qmckl_context context) | ~coord_new~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates | | ~coord~ | ~double[3][nucl_num]~ | in | Nuclear coordinates | | ~en_distance~ | ~double[walk_num][elec_num][nucl_num]~ | in | Electron-nucleus distances | - | ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | in | Electron-nucleus distances | + | ~een_rescaled_n~ | ~double[walk_num][0:cord_num][nucl_num][elec_num]~ | in | Electron-nucleus distances | | ~een_rescaled_n_deriv_e~ | ~double[walk_num][elec_num][4][nucl_num][0:cord_num]~ | out | Electron-nucleus rescaled distances | #+begin_src f90 :comments org :tangle (eval f) :noweb yes @@ -4065,7 +4067,7 @@ integer function qmckl_compute_factor_een_rescaled_n_deriv_e_f(context, walk_num double precision , intent(in) :: coord_new(elec_num,3,walk_num) double precision , intent(in) :: coord(nucl_num,3) double precision , intent(in) :: en_distance(elec_num,nucl_num,walk_num) - double precision , intent(in) :: een_rescaled_n(0:cord_num,nucl_num,elec_num,walk_num) + double precision , intent(in) :: een_rescaled_n(elec_num,nucl_num,0:cord_num,walk_num) double precision , intent(out) :: een_rescaled_n_deriv_e(0:cord_num,nucl_num,4,elec_num,walk_num) double precision,dimension(:,:,:),allocatable :: elnuc_dist_deriv_e double precision :: x, ria_inv, kappa_l @@ -4130,7 +4132,7 @@ integer function qmckl_compute_factor_een_rescaled_n_deriv_e_f(context, walk_num do ii = 1, 4 een_rescaled_n_deriv_e(l, a, ii, i, nw) = een_rescaled_n_deriv_e(l, a, ii, i, nw) * & - een_rescaled_n(l, a, i, nw) + een_rescaled_n(i, a, l, nw) end do end do end do @@ -4986,7 +4988,7 @@ end function qmckl_compute_lkpm_combined_index_f | ~nucl_num~ | ~int64_t~ | in | Number of nucleii | | ~walk_num~ | ~int64_t~ | in | Number of walkers | | ~een_rescaled_e~ | ~double[walk_num][0:cord_num][elec_num][elec_num]~ | in | Electron-electron rescaled factor | - | ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | in | Electron-nucleus rescaled factor | + | ~een_rescaled_n~ | ~double[walk_num][0:cord_num][nucl_num][elec_num]~ | in | Electron-nucleus rescaled factor | | ~tmp_c~ | ~double[walk_num][0:cord_num-1][0:cord_num][nucl_num][elec_num]~ | out | vector of non-zero coefficients | #+begin_src f90 :comments org :tangle (eval f) :noweb yes @@ -5001,11 +5003,11 @@ integer function qmckl_compute_tmp_c_f(context, cord_num, elec_num, nucl_num, & integer*8 , intent(in) :: nucl_num integer*8 , intent(in) :: walk_num double precision , intent(in) :: een_rescaled_e(elec_num, elec_num, 0:cord_num, walk_num) - double precision , intent(in) :: een_rescaled_n(0:cord_num, nucl_num, elec_num, walk_num) + double precision , intent(in) :: een_rescaled_n(elec_num, nucl_num, 0:cord_num, walk_num) double precision , intent(out) :: tmp_c(elec_num, nucl_num,0:cord_num, 0:cord_num-1, walk_num) double precision :: x - double precision,dimension(:,:,:,:),allocatable :: een_rescaled_e_T - double precision,dimension(:,:,:,:),allocatable :: een_rescaled_n_T + !double precision,dimension(:,:,:,:),allocatable :: een_rescaled_e_T + !double precision,dimension(:,:,:,:),allocatable :: een_rescaled_n_T integer*8 :: i, j, a, l, kk, p, lmax, nw character :: TransA, TransB double precision :: alpha, beta @@ -5017,7 +5019,7 @@ integer function qmckl_compute_tmp_c_f(context, cord_num, elec_num, nucl_num, & beta = 0.0d0 !allocate(een_rescaled_e_T(elec_num,elec_num,0:cord_num,walk_num)) - allocate(een_rescaled_n_T(elec_num,nucl_num,0:cord_num,walk_num)) + !allocate(een_rescaled_n_T(elec_num,nucl_num,0:cord_num,walk_num)) !do nw = 1,walk_num !do i = 1, elec_num ! do j = 1, elec_num @@ -5027,15 +5029,15 @@ integer function qmckl_compute_tmp_c_f(context, cord_num, elec_num, nucl_num, & ! end do !end do !end do - do nw = 1,walk_num - do i = 1, elec_num - do j = 1, nucl_num - do l = 0,cord_num - een_rescaled_n_T(i,j,l,nw) = een_rescaled_n(l,j,i,nw) - end do - end do - end do - end do + !do nw = 1,walk_num + !do i = 1, elec_num + ! do j = 1, nucl_num + ! do l = 0,cord_num + ! een_rescaled_n_T(i,j,l,nw) = een_rescaled_n(l,j,i,nw) + ! end do + ! end do + !end do + !end do info = QMCKL_SUCCESS @@ -5063,14 +5065,14 @@ integer function qmckl_compute_tmp_c_f(context, cord_num, elec_num, nucl_num, & N = nucl_num*(cord_num + 1) K = elec_num LDA = size(een_rescaled_e,1) - LDB = size(een_rescaled_n_T,1) + LDB = size(een_rescaled_n,1) LDC = size(tmp_c,1) do nw=1, walk_num do i=0, cord_num-1 info = qmckl_dgemm(context,TransA, TransB, M, N, K, alpha, & een_rescaled_e(1,1,i,nw),LDA*1_8, & - een_rescaled_n_T(1,1,0,nw),LDB*1_8, & + een_rescaled_n(1,1,0,nw),LDB*1_8, & beta, & tmp_c(1,1,0,i,nw),LDC) end do @@ -5084,7 +5086,7 @@ integer function qmckl_compute_tmp_c_f(context, cord_num, elec_num, nucl_num, & !end do !deallocate(een_rescaled_e_T) - deallocate(een_rescaled_n_T) + !deallocate(een_rescaled_n_T) end function qmckl_compute_tmp_c_f #+end_src @@ -5121,7 +5123,7 @@ end function qmckl_compute_tmp_c_f integer (c_int64_t) , intent(in) , value :: nucl_num integer (c_int64_t) , intent(in) , value :: walk_num real (c_double ) , intent(in) :: een_rescaled_e(elec_num,elec_num,0:cord_num,walk_num) - real (c_double ) , intent(in) :: een_rescaled_n(0:cord_num,nucl_num,elec_num,walk_num) + real (c_double ) , intent(in) :: een_rescaled_n(elec_num,nucl_num,0:cord_num,walk_num) real (c_double ) , intent(out) :: tmp_c(elec_num,nucl_num,0:cord_num,0:cord_num-1,walk_num) integer(c_int32_t), external :: qmckl_compute_tmp_c_f @@ -5147,7 +5149,7 @@ end function qmckl_compute_tmp_c_f | ~nucl_num~ | ~int64_t~ | in | Number of nucleii | | ~walk_num~ | ~int64_t~ | in | Number of walkers | | ~een_rescaled_e_deriv_e~ | ~double[walk_num][0:cord_num][elec_num][4][elec_num]~ | in | Electron-electron rescaled factor derivatives | - | ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | in | Electron-nucleus rescaled factor | + | ~een_rescaled_n~ | ~double[walk_num][0:cord_num][nucl_num][elec_num]~ | in | Electron-nucleus rescaled factor | | ~dtmp_c~ | ~double[walk_num][0:cord_num-1][0:cord_num][nucl_num][elec_num]~ | out | vector of non-zero coefficients | #+begin_src f90 :comments org :tangle (eval f) :noweb yes @@ -5162,7 +5164,7 @@ integer function qmckl_compute_dtmp_c_f(context, cord_num, elec_num, nucl_num, & integer*8 , intent(in) :: nucl_num integer*8 , intent(in) :: walk_num double precision , intent(in) :: een_rescaled_e_deriv_e(elec_num, 4, elec_num, 0:cord_num, walk_num) - double precision , intent(in) :: een_rescaled_n(0:cord_num, nucl_num, elec_num, walk_num) + double precision , intent(in) :: een_rescaled_n(elec_num, nucl_num, 0:cord_num, walk_num) double precision , intent(out) :: dtmp_c(elec_num, 4, nucl_num,0:cord_num, 0:cord_num-1, walk_num) double precision :: x integer*8 :: i, j, a, l, kk, p, lmax, nw, ii @@ -5170,7 +5172,7 @@ integer function qmckl_compute_dtmp_c_f(context, cord_num, elec_num, nucl_num, & double precision :: alpha, beta integer*8 :: M, N, K, LDA, LDB, LDC !double precision,dimension(:,:,:,:,:),allocatable :: een_rescaled_e_deriv_e_T - double precision,dimension(:,:,:,:),allocatable :: een_rescaled_n_T + !double precision,dimension(:,:,:,:),allocatable :: een_rescaled_n_T TransA = 'N' TransB = 'N' @@ -5180,8 +5182,8 @@ integer function qmckl_compute_dtmp_c_f(context, cord_num, elec_num, nucl_num, & info = QMCKL_SUCCESS !allocate(een_rescaled_e_deriv_e_T(elec_num,4,elec_num,0:cord_num,walk_num)) - allocate(een_rescaled_n_T(elec_num,nucl_num,0:cord_num,walk_num)) - do nw = 1,walk_num + !allocate(een_rescaled_n_T(elec_num,nucl_num,0:cord_num,walk_num)) + !do nw = 1,walk_num !do i = 1, elec_num ! do ii = 1, 4 ! do j = 1, elec_num @@ -5191,14 +5193,14 @@ integer function qmckl_compute_dtmp_c_f(context, cord_num, elec_num, nucl_num, & ! end do ! end do !end do - do i = 1, elec_num - do j = 1, nucl_num - do l = 0,cord_num - een_rescaled_n_T(i,j,l,nw) = een_rescaled_n(l,j,i,nw) - end do - end do - end do - end do + !do i = 1, elec_num + ! do j = 1, nucl_num + ! do l = 0,cord_num + ! een_rescaled_n_T(i,j,l,nw) = een_rescaled_n(l,j,i,nw) + ! end do + ! end do + !end do + !end do if (context == QMCKL_NULL_CONTEXT) then info = QMCKL_INVALID_CONTEXT @@ -5224,21 +5226,21 @@ integer function qmckl_compute_dtmp_c_f(context, cord_num, elec_num, nucl_num, & N = nucl_num*(cord_num + 1) K = elec_num LDA = 4*size(een_rescaled_e_deriv_e,1) - LDB = size(een_rescaled_n_T,1) + LDB = size(een_rescaled_n,1) LDC = 4*size(dtmp_c,1) do nw=1, walk_num do i=0, cord_num-1 info = qmckl_dgemm(context,TransA, TransB, M, N, K, alpha, & een_rescaled_e_deriv_e(1,1,1,i,nw),LDA*1_8, & - een_rescaled_n_T(1,1,0,nw),LDB*1_8, & + een_rescaled_n(1,1,0,nw),LDB*1_8, & beta, & dtmp_c(1,1,1,0,i,nw),LDC) end do end do !deallocate(een_rescaled_e_deriv_e_T) - deallocate(een_rescaled_n_T) + !deallocate(een_rescaled_n_T) end function qmckl_compute_dtmp_c_f #+end_src @@ -5275,7 +5277,7 @@ end function qmckl_compute_dtmp_c_f integer (c_int64_t) , intent(in) , value :: nucl_num integer (c_int64_t) , intent(in) , value :: walk_num real (c_double ) , intent(in) :: een_rescaled_e_deriv_e(elec_num,4,elec_num,0:cord_num,walk_num) - real (c_double ) , intent(in) :: een_rescaled_n(0:cord_num,nucl_num,elec_num,walk_num) + real (c_double ) , intent(in) :: een_rescaled_n(elec_num,nucl_num,0:cord_num,walk_num) real (c_double ) , intent(out) :: dtmp_c(elec_num,nucl_num,0:cord_num,0:cord_num-1,walk_num) integer(c_int32_t), external :: qmckl_compute_dtmp_c_f @@ -5669,7 +5671,7 @@ end function qmckl_compute_factor_een_naive_f | ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | in | full coefficient vector | | ~lkpm_combined_index~ | ~int64_t[4][dim_cord_vect]~ | in | combined indices | | ~tmp_c~ | ~double[walk_num][0:cord_num-1][0:cord_num][nucl_num][elec_num]~ | vector of non-zero coefficients | | - | ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | in | Electron-nucleus rescaled factor | + | ~een_rescaled_n~ | ~double[walk_num][0:cord_num][nucl_num][elec_num]~ | in | Electron-nucleus rescaled factor | | ~factor_een~ | ~double[walk_num]~ | out | Electron-nucleus jastrow | #+begin_src f90 :comments org :tangle (eval f) :noweb yes @@ -5684,7 +5686,7 @@ integer function qmckl_compute_factor_een_f(context, walk_num, elec_num, nucl_nu integer*8 , intent(in) :: lkpm_combined_index(dim_cord_vect,4) double precision , intent(in) :: cord_vect_full(nucl_num, dim_cord_vect) double precision , intent(in) :: tmp_c(elec_num, nucl_num,0:cord_num, 0:cord_num-1, walk_num) - double precision , intent(in) :: een_rescaled_n(0:cord_num, nucl_num, elec_num, walk_num) + double precision , intent(in) :: een_rescaled_n(elec_num, nucl_num, 0:cord_num, walk_num) double precision , intent(out) :: factor_een(walk_num) integer*8 :: i, a, j, l, k, p, m, n, nw @@ -5732,7 +5734,7 @@ integer function qmckl_compute_factor_een_f(context, walk_num, elec_num, nucl_nu accu = 0.0d0 do j = 1, elec_num - accu = accu + een_rescaled_n(m,a,j,nw) * tmp_c(j,a,m+l,k,nw) + accu = accu + een_rescaled_n(j,a,m,nw) * tmp_c(j,a,m+l,k,nw) end do factor_een(nw) = factor_een(nw) + accu * cn end do @@ -5790,7 +5792,7 @@ end function qmckl_compute_factor_een_f real (c_double ) , intent(in) :: cord_vect_full(nucl_num,dim_cord_vect) integer (c_int64_t) , intent(in) :: lkpm_combined_index(dim_cord_vect,4) real (c_double ) , intent(in) :: een_rescaled_e(0:cord_num,elec_num,elec_num,walk_num) - real (c_double ) , intent(in) :: een_rescaled_n(0:cord_num,nucl_num,elec_num,walk_num) + real (c_double ) , intent(in) :: een_rescaled_n(elec_num,nucl_num,0:cord_num,walk_num) real (c_double ) , intent(out) :: factor_een(walk_num) integer(c_int32_t), external :: qmckl_compute_factor_een_f @@ -6202,7 +6204,7 @@ end function qmckl_compute_factor_een_deriv_e_naive_f | ~lkpm_combined_index~ | ~int64_t[4][dim_cord_vect]~ | in | combined indices | | ~tmp_c~ | ~double[walk_num][0:cord_num-1][0:cord_num][nucl_num][elec_num]~ | in | Temporary intermediate tensor | | ~dtmp_c~ | ~double[walk_num][0:cord_num-1][0:cord_num][nucl_num][4][elec_num]~ | in | vector of non-zero coefficients | - | ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | in | Electron-nucleus rescaled factor | + | ~een_rescaled_n~ | ~double[walk_num][0:cord_num][nucl_num][elec_num]~ | in | Electron-nucleus rescaled factor | | ~een_rescaled_n_deriv_e~ | ~double[walk_num][elec_num][4][nucl_num][0:cord_num]~ | in | Derivative of Electron-nucleus rescaled factor | | ~factor_een_deriv_e~ | ~double[walk_num][4][elec_num]~ | out | Derivative of Electron-nucleus jastrow | @@ -6220,7 +6222,7 @@ integer function qmckl_compute_factor_een_deriv_e_f(context, walk_num, elec_num, double precision , intent(in) :: cord_vect_full(nucl_num, dim_cord_vect) double precision , intent(in) :: tmp_c(elec_num, nucl_num,0:cord_num, 0:cord_num-1, walk_num) double precision , intent(in) :: dtmp_c(elec_num, 4, nucl_num,0:cord_num, 0:cord_num-1, walk_num) - double precision , intent(in) :: een_rescaled_n(0:cord_num, nucl_num, elec_num, walk_num) + double precision , intent(in) :: een_rescaled_n(elec_num, nucl_num, 0:cord_num, walk_num) double precision , intent(in) :: een_rescaled_n_deriv_e(0:cord_num, nucl_num, 4, elec_num, walk_num) double precision , intent(out) :: factor_een_deriv_e(elec_num,4,walk_num) @@ -6271,8 +6273,8 @@ integer function qmckl_compute_factor_een_deriv_e_f(context, walk_num, elec_num, do j = 1, elec_num factor_een_deriv_e(j,ii,nw) = factor_een_deriv_e(j,ii,nw) + (& tmp_c(j,a,m,k,nw) * een_rescaled_n_deriv_e(m+l,a,ii,j,nw) + & - (dtmp_c(j,ii,a,m,k,nw)) * een_rescaled_n(m+l,a,j,nw) + & - (dtmp_c(j,ii,a,m+l,k,nw)) * een_rescaled_n(m,a,j,nw) + & + (dtmp_c(j,ii,a,m,k,nw)) * een_rescaled_n(j,a,m+l,nw) + & + (dtmp_c(j,ii,a,m+l,k,nw)) * een_rescaled_n(j,a,m ,nw) + & tmp_c(j,a,m+l,k,nw) * een_rescaled_n_deriv_e(m,a,ii,j,nw) & ) * cn end do @@ -6350,7 +6352,7 @@ end function qmckl_compute_factor_een_deriv_e_f integer (c_int64_t) , intent(in) :: lkpm_combined_index(dim_cord_vect,4) real (c_double ) , intent(in) :: tmp_c(elec_num,nucl_num,0:cord_num,0:cord_num-1,walk_num) real (c_double ) , intent(in) :: dtmp_c(elec_num,4,nucl_num,0:cord_num,0:cord_num-1,walk_num) - real (c_double ) , intent(in) :: een_rescaled_n(0:cord_num,nucl_num,elec_num,walk_num) + real (c_double ) , intent(in) :: een_rescaled_n(elec_num,nucl_num,0:cord_num,walk_num) real (c_double ) , intent(in) :: een_rescaled_n_deriv_e(0:cord_num,nucl_num,4,elec_num,walk_num) real (c_double ) , intent(out) :: factor_een_deriv_e(elec_num,4,walk_num)