1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-07-18 08:53:47 +02:00

Added providers for ee_pot and en_pot for e_pot. #41

This commit is contained in:
v1j4y 2021-10-13 18:07:15 +02:00
parent 7bf52f0e01
commit ca61af7a3d

View File

@ -797,6 +797,7 @@ qmckl_exit_code qmckl_provide_potential_energy(qmckl_context context) {
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
assert (ctx != NULL);
qmckl_exit_code rc;
if(!(ctx->nucleus.provided)) {
return qmckl_failwith( context,
QMCKL_NOT_PROVIDED,
@ -832,6 +833,22 @@ qmckl_exit_code qmckl_provide_potential_energy(qmckl_context context) {
NULL);
}
rc = qmckl_provide_ee_potential(ctx);
if (rc != QMCKL_SUCCESS) {
return qmckl_failwith( context,
QMCKL_NOT_PROVIDED,
"qmckl_ee_potential",
NULL);
}
rc = qmckl_provide_en_potential(ctx);
if (rc != QMCKL_SUCCESS) {
return qmckl_failwith( context,
QMCKL_NOT_PROVIDED,
"qmckl_en_potential",
NULL);
}
/* Compute if necessary */
if (ctx->electron.coord_new_date > ctx->local_energy.e_pot_date) {
@ -851,7 +868,6 @@ qmckl_exit_code qmckl_provide_potential_energy(qmckl_context context) {
ctx->local_energy.e_pot = e_pot;
}
qmckl_exit_code rc;
if (ctx->det.type == 'G') {
rc = qmckl_compute_potential_energy(context,
ctx->det.walk_num,