1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-07-18 17:03:43 +02:00

Merge pull request #3 from v1j4y/gian_helpers_index_correction

Gian helpers index correction
This commit is contained in:
Gianfranco Abrusci 2022-02-04 17:21:27 +01:00 committed by GitHub
commit 12a7a66a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1624,7 +1624,7 @@ end function qmckl_compute_factor_ee_f
double* const factor_ee ) {
int ipar; // can we use a smaller integer?
double pow_ser, x, spin_fact, power_ser;
double pow_ser, x, x1, spin_fact, power_ser;
if (context == QMCKL_NULL_CONTEXT) {
return QMCKL_INVALID_CONTEXT;
@ -1646,13 +1646,14 @@ end function qmckl_compute_factor_ee_f
factor_ee[nw] = 0.0; // put init array here.
for (int j = 0; j < elec_num; ++j ) {
for (int i = 0; i < j; ++i) {
x = ee_distance_rescaled[j + elec_num*(i + elec_num*nw)];
x = ee_distance_rescaled[j * (walk_num * elec_num) + i * (walk_num) + nw];
x1 = x;
power_ser = 0.0;
spin_fact = 1.0;
ipar = 0; // index of asymp_jasb
for (int p = 1; p < bord_num; ++p) {
x = x * ee_distance_rescaled[j + elec_num*(i + elec_num*nw)];
x = x * x1;
power_ser = power_ser + bord_vector[p + 1] * x;
}
@ -1662,9 +1663,9 @@ end function qmckl_compute_factor_ee_f
}
factor_ee[nw] = factor_ee[nw] + spin_fact * bord_vector[0] * \
ee_distance_rescaled[j + elec_num*(i + elec_num*nw)] / \
x1 / \
(1.0 + bord_vector[1] * \
ee_distance_rescaled[j + elec_num*(i + elec_num*nw)]) \
x1) \
-asymp_jasb[ipar] + power_ser;
}