diff --git a/org/qmckl_jastrow.org b/org/qmckl_jastrow.org index 8940a90..393c76a 100644 --- a/org/qmckl_jastrow.org +++ b/org/qmckl_jastrow.org @@ -2154,8 +2154,6 @@ integer function qmckl_compute_factor_ee_deriv_e_doc_f( & do j = 1, elec_num do i = 1, elec_num x = ee_distance_rescaled(i,j,nw) - print *, tmp_kk, x - tmp_kk = tmp_kk + 1 if(abs(x) < 1.0d-18) cycle pow_ser_g = 0.0d0 spin_fact = 1.0d0 @@ -2194,7 +2192,9 @@ integer function qmckl_compute_factor_ee_deriv_e_doc_f( & factor_ee_deriv_e( j, ii, nw) = factor_ee_deriv_e( j, ii, nw) + spin_fact * bord_vector(1) * & dx(ii) * invden2 + pow_ser_g(ii) + print *, tmp_kk, factor_ee_deriv_e(j,ii,nw) end do + tmp_kk = tmp_kk + 1 ii = 4 lap2 = lap2 * dx(ii) * third @@ -2262,7 +2262,7 @@ qmckl_exit_code qmckl_compute_factor_ee_deriv_e_hpc( printf("%d\t\t\%lf\n", tmp_kk, factor_ee_deriv_e[tmp_kk]); } */ - + printf("%d\n", elec_num); third = 1.0 / 3.0; for (int nw = 0; nw < walk_num; ++nw) { @@ -2270,8 +2270,6 @@ qmckl_exit_code qmckl_compute_factor_ee_deriv_e_hpc( for (int i = 0; i < elec_num; ++i) { for (int j = 0; j < elec_num; ++j) { x = ee_distance_rescaled[j + i * elec_num + nw * elec_num * elec_num]; - printf("%d\t\t\%lf\n", tmp_kk, x); - tmp_kk = tmp_kk + 1; if (fabs(x) < 1.0e-18) continue; for (int ii = 0; ii < 3; ++ii){ pow_ser_g[ii] = 0.0; @@ -2284,30 +2282,16 @@ qmckl_exit_code qmckl_compute_factor_ee_deriv_e_hpc( xinv = 1.0 / (x + 1.0e-18); ipar = 0; - /* TEST - dx[0] = ee_distance_rescaled_deriv_e[j + i * elec_num \ - + 0 \ - + nw * elec_num * elec_num * 4]; - dx[1] = ee_distance_rescaled_deriv_e[j + i * elec_num \ - + 1 * elec_num * elec_num \ - + nw * elec_num * elec_num * 4]; - dx[2] = ee_distance_rescaled_deriv_e[j + i * elec_num \ - + 2 * elec_num * elec_num \ - + nw * elec_num * elec_num * 4]; - dx[3] = ee_distance_rescaled_deriv_e[j + i * elec_num \ - + 3 * elec_num * elec_num \ - + nw * elec_num * elec_num * 4]; - */ dx[0] = ee_distance_rescaled_deriv_e[0 \ + j * 4 + i * 4 * elec_num \ + nw * 4 * elec_num * elec_num]; dx[1] = ee_distance_rescaled_deriv_e[1 \ + j * 4 + i * 4 * elec_num \ + nw * 4 * elec_num * elec_num]; - dx[2] = ee_distance_rescaled_deriv_e[2 * (walk_num * elec_num * elec_num) \ + dx[2] = ee_distance_rescaled_deriv_e[2 \ + j * 4 + i * 4 * elec_num \ + nw * 4 * elec_num * elec_num]; - dx[3] = ee_distance_rescaled_deriv_e[3 * (walk_num * elec_num * elec_num) \ + dx[3] = ee_distance_rescaled_deriv_e[3 \ + j * 4 + i * 4 * elec_num \ + nw * 4 * elec_num * elec_num]; @@ -2332,16 +2316,18 @@ qmckl_exit_code qmckl_compute_factor_ee_deriv_e_hpc( lap3 = lap3 - 2.0 * bord_vector[1] * dx[ii] * dx[ii]; // IS IT "J" or "I"? I would say "I" - factor_ee_deriv_e[i + ii * elec_num * elec_num + nw * elec_num * elec_num * 4 ] += \ + factor_ee_deriv_e[i + ii * elec_num + nw * elec_num * 4 ] += \ + spin_fact * bord_vector[0] * dx[ii] * invden2 \ + pow_ser_g[ii] ; + printf("%d\t%lf\n", tmp_kk, factor_ee_deriv_e[i+ii*elec_num+nw*4*elec_num]); } + tmp_kk = tmp_kk + 1; ii = 3; lap2 = lap2 * dx[ii] * third; lap3 = lap3 + den * dx[ii]; lap3 = lap3 * (spin_fact * bord_vector[0] * invden3); - factor_ee_deriv_e[i + ii * elec_num *elec_num + nw * elec_num * elec_num * 4] += lap1 + lap2 + lap3; + factor_ee_deriv_e[i + ii*elec_num + nw * elec_num * 4] += lap1 + lap2 + lap3; } } @@ -2582,13 +2568,13 @@ double factor_ee_deriv_e[walk_num][4][elec_num]; rc = qmckl_get_jastrow_factor_ee_deriv_e(context, &(factor_ee_deriv_e[0][0][0]),walk_num*4*elec_num); // check factor_ee_deriv_e -/* DELETE FROM HERE assert(fabs(factor_ee_deriv_e[0][0][0]-0.16364894652107934) < 1.e-12); assert(fabs(factor_ee_deriv_e[0][1][0]+0.6927548119830084 ) < 1.e-12); assert(fabs(factor_ee_deriv_e[0][2][0]-0.073267755223968 ) < 1.e-12); assert(fabs(factor_ee_deriv_e[0][3][0]-1.5111672803213185 ) < 1.e-12); -TO HERE */ +/* DELETE FROM HERE return QMCKL_SUCCESS; +TO HERE */ #+end_src ** Electron-nucleus component \(f_{en}\)