mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-18 03:11:44 +02:00
Merge pull request #3 from v1j4y/gian_helpers_index_correction
Gian helpers index correction
This commit is contained in:
commit
12a7a66a62
@ -1624,7 +1624,7 @@ end function qmckl_compute_factor_ee_f
|
|||||||
double* const factor_ee ) {
|
double* const factor_ee ) {
|
||||||
|
|
||||||
int ipar; // can we use a smaller integer?
|
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) {
|
if (context == QMCKL_NULL_CONTEXT) {
|
||||||
return QMCKL_INVALID_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.
|
factor_ee[nw] = 0.0; // put init array here.
|
||||||
for (int j = 0; j < elec_num; ++j ) {
|
for (int j = 0; j < elec_num; ++j ) {
|
||||||
for (int i = 0; i < j; ++i) {
|
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;
|
power_ser = 0.0;
|
||||||
spin_fact = 1.0;
|
spin_fact = 1.0;
|
||||||
ipar = 0; // index of asymp_jasb
|
ipar = 0; // index of asymp_jasb
|
||||||
|
|
||||||
for (int p = 1; p < bord_num; ++p) {
|
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;
|
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] * \
|
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] * \
|
(1.0 + bord_vector[1] * \
|
||||||
ee_distance_rescaled[j + elec_num*(i + elec_num*nw)]) \
|
x1) \
|
||||||
-asymp_jasb[ipar] + power_ser;
|
-asymp_jasb[ipar] + power_ser;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user