mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 18:16:28 +01:00
Added tests for ee_pot and en_pot. #41
This commit is contained in:
parent
0928f9ea14
commit
4167f2a1c1
@ -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
|
||||
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user