diff --git a/org/qmckl_electron.org b/org/qmckl_electron.org index 1435fe4..ef43a46 100644 --- a/org/qmckl_electron.org +++ b/org/qmckl_electron.org @@ -1721,6 +1721,7 @@ 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 @@ -1771,6 +1772,12 @@ end function qmckl_compute_ee_potential_f #+end_src *** Test + #+begin_src c :tangle (eval c_test) +double ee_pot[walk_num]; + +rc = qmckl_get_electron_ee_potential(context, &(ee_pot[0])); +assert (rc == QMCKL_SUCCESS); + #+end_src ** Electron-nucleus distances *** Get @@ -2617,7 +2624,7 @@ assert (rc == QMCKL_SUCCESS); where \(\mathcal{V}_{en}\) is the ~en~ potential, \[r_{iA}\] the ~en~ distance and \[Z_A\] is the nuclear charge. - + *** Get #+begin_src c :comments org :tangle (eval h_func) :noweb yes @@ -2806,6 +2813,12 @@ end function qmckl_compute_en_potential_f #+end_src *** Test + #+begin_src c :tangle (eval c_test) +double en_pot[walk_num]; + +rc = qmckl_get_electron_en_potential(context, &(en_pot[0])); +assert (rc == QMCKL_SUCCESS); + #+end_src * End of files :noexport: diff --git a/org/qmckl_local_energy.org b/org/qmckl_local_energy.org index 8193ba7..ce85465 100644 --- a/org/qmckl_local_energy.org +++ b/org/qmckl_local_energy.org @@ -846,6 +846,14 @@ qmckl_exit_code qmckl_provide_potential_energy(qmckl_context context) { NULL); } + rc = qmckl_provide_ee_potential(context); + if (rc != QMCKL_SUCCESS) { + return qmckl_failwith( context, + QMCKL_NOT_PROVIDED, + "qmckl_ee_potential", + NULL); + } + rc = qmckl_provide_en_potential(context); if (rc != QMCKL_SUCCESS) { return qmckl_failwith( context, @@ -949,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) + en_pot(iwalk) + ee_pot(iwalk) + e_pot(iwalk) = e_pot(iwalk) + ee_pot(iwalk) !+ en_pot(iwalk) end do end function qmckl_compute_potential_energy_f