mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 20:36:01 +01:00
Added missing provider calls for ee_pot and en_pot. #41
This commit is contained in:
parent
4167f2a1c1
commit
fade372e02
@ -201,7 +201,7 @@ if ( (ctx->electron.uninitialized & mask) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
#+end_src
|
||||
|
||||
|
||||
*** Number of electrons
|
||||
|
||||
#+begin_src c :comments org :tangle (eval h_func) :exports none
|
||||
@ -1641,6 +1641,9 @@ qmckl_exit_code qmckl_provide_ee_potential(qmckl_context context)
|
||||
|
||||
if (!ctx->electron.provided) return QMCKL_NOT_PROVIDED;
|
||||
|
||||
qmckl_exit_code rc = qmckl_provide_ee_distance(context);
|
||||
if (rc != QMCKL_SUCCESS) return rc;
|
||||
|
||||
/* Compute if necessary */
|
||||
if (ctx->electron.coord_new_date > ctx->electron.ee_pot_date) {
|
||||
|
||||
@ -1721,7 +1724,6 @@ integer function qmckl_compute_ee_potential_f(context, elec_num, walk_num, &
|
||||
info = QMCKL_INVALID_ARG_3
|
||||
return
|
||||
endif
|
||||
print *,"In calc ee_pot\n"
|
||||
|
||||
ee_pot = 0.0d0
|
||||
do nw=1,walk_num
|
||||
@ -2673,6 +2675,9 @@ qmckl_exit_code qmckl_provide_en_potential(qmckl_context context)
|
||||
if (!ctx->electron.provided) return QMCKL_NOT_PROVIDED;
|
||||
if (!ctx->nucleus.provided) return QMCKL_NOT_PROVIDED;
|
||||
|
||||
qmckl_exit_code rc = qmckl_provide_en_distance(context);
|
||||
if (rc != QMCKL_SUCCESS) return rc;
|
||||
|
||||
/* Compute if necessary */
|
||||
if (ctx->electron.coord_new_date > ctx->electron.en_pot_date) {
|
||||
|
||||
|
@ -957,9 +957,9 @@ integer function qmckl_compute_potential_energy_f(context, walk_num, &
|
||||
return
|
||||
endif
|
||||
|
||||
e_pot = 0.0d0 !+ repulsion
|
||||
e_pot = 0.0d0 + repulsion
|
||||
do iwalk = 1, walk_num
|
||||
e_pot(iwalk) = e_pot(iwalk) + ee_pot(iwalk) !+ en_pot(iwalk)
|
||||
e_pot(iwalk) = e_pot(iwalk) + ee_pot(iwalk) + en_pot(iwalk)
|
||||
end do
|
||||
|
||||
end function qmckl_compute_potential_energy_f
|
||||
|
Loading…
Reference in New Issue
Block a user