mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 18:16:28 +01:00
Added providers for ee_pot and en_pot for e_pot. #41
This commit is contained in:
parent
7bf52f0e01
commit
ca61af7a3d
@ -797,6 +797,7 @@ qmckl_exit_code qmckl_provide_potential_energy(qmckl_context context) {
|
|||||||
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
|
||||||
assert (ctx != NULL);
|
assert (ctx != NULL);
|
||||||
|
|
||||||
|
qmckl_exit_code rc;
|
||||||
if(!(ctx->nucleus.provided)) {
|
if(!(ctx->nucleus.provided)) {
|
||||||
return qmckl_failwith( context,
|
return qmckl_failwith( context,
|
||||||
QMCKL_NOT_PROVIDED,
|
QMCKL_NOT_PROVIDED,
|
||||||
@ -832,6 +833,22 @@ qmckl_exit_code qmckl_provide_potential_energy(qmckl_context context) {
|
|||||||
NULL);
|
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 */
|
/* Compute if necessary */
|
||||||
if (ctx->electron.coord_new_date > ctx->local_energy.e_pot_date) {
|
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;
|
ctx->local_energy.e_pot = e_pot;
|
||||||
}
|
}
|
||||||
|
|
||||||
qmckl_exit_code rc;
|
|
||||||
if (ctx->det.type == 'G') {
|
if (ctx->det.type == 'G') {
|
||||||
rc = qmckl_compute_potential_energy(context,
|
rc = qmckl_compute_potential_energy(context,
|
||||||
ctx->det.walk_num,
|
ctx->det.walk_num,
|
||||||
|
Loading…
Reference in New Issue
Block a user