From ca61af7a3de788ef0cd6b43e5486e3badb244c1f Mon Sep 17 00:00:00 2001 From: v1j4y Date: Wed, 13 Oct 2021 18:07:15 +0200 Subject: [PATCH] Added providers for ee_pot and en_pot for e_pot. #41 --- org/qmckl_local_energy.org | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/org/qmckl_local_energy.org b/org/qmckl_local_energy.org index e537ee0..390ebb7 100644 --- a/org/qmckl_local_energy.org +++ b/org/qmckl_local_energy.org @@ -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,