diff --git a/org/qmckl_jastrow_champ.org b/org/qmckl_jastrow_champ.org index 1f1dbad..8be1e7b 100644 --- a/org/qmckl_jastrow_champ.org +++ b/org/qmckl_jastrow_champ.org @@ -143,7 +143,7 @@ int main() { | ~bord_num~ | ~int64_t~ | The number of b coeffecients | | ~cord_num~ | ~int64_t~ | The number of c coeffecients | | ~type_nucl_num~ | ~int64_t~ | Number of Nuclei types | - | ~type_nucl_vector~ | ~int64_t[nucl_num]~ | IDs of types of Nuclei | + | ~type_nucl_vector~ | ~int64_t[nucl_num]~ | IDs of types of Nuclei. These use 0-based indexing as in C. | | ~a_vector~ | ~double[aord_num + 1][type_nucl_num]~ | a polynomial coefficients | | ~b_vector~ | ~double[bord_num + 1]~ | b polynomial coefficients | | ~c_vector~ | ~double[dim_c_vector][type_nucl_num]~ | c polynomial coefficients | @@ -578,6 +578,19 @@ qmckl_set_jastrow_champ_type_nucl_vector(qmckl_context context, "type_nucl_vector = NULL"); } + for (int i=0 ; i= type_nucl_num) { + return qmckl_failwith( context, QMCKL_INVALID_ARG_2, + "qmckl_set_type_nucl_vector", + "Inconsistent values of type_nucl_vector (>=nucl_num). Values should use 0-based indexing as in C." ); + } + } + if (ctx->jastrow_champ.type_nucl_vector != NULL) { qmckl_exit_code rc = qmckl_free(context, ctx->jastrow_champ.type_nucl_vector); if (rc != QMCKL_SUCCESS) {