1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2025-04-30 04:15:00 +02:00

first commit

This commit is contained in:
Emiel Slootman 2024-11-18 16:11:28 +01:00
parent a5d7354a0f
commit 2abe007fff
4 changed files with 4365 additions and 1 deletions

View File

@ -34,6 +34,7 @@ int main() {
#include "qmckl_ao_private_type.h"
#include "qmckl_mo_private_type.h"
#include "qmckl_jastrow_champ_private_type.h"
#include "qmckl_jastrow_champ_single_private_type.h"
#include "qmckl_determinant_private_type.h"
#include "qmckl_local_energy_private_type.h"
#include "qmckl_point_private_func.h"
@ -42,6 +43,7 @@ int main() {
#include "qmckl_ao_private_func.h"
#include "qmckl_mo_private_func.h"
#include "qmckl_jastrow_champ_private_func.h"
#include "qmckl_jastrow_champ_single_private_func.h"
#include "qmckl_determinant_private_func.h"
#include "qmckl_local_energy_private_func.h"
#+end_src
@ -129,6 +131,7 @@ typedef struct qmckl_context_struct {
/* Points */
qmckl_point_struct point;
qmckl_jastrow_champ_single_struct single_point;
/* -- Molecular system -- */
qmckl_nucleus_struct nucleus;
@ -224,6 +227,7 @@ qmckl_context_touch(const qmckl_context context)
ctx->date += 1UL;
ctx->point.date = ctx-> date;
ctx->electron.walker.point.date = ctx-> date;
return QMCKL_SUCCESS;
}
#+end_src

View File

@ -2974,6 +2974,12 @@ qmckl_compute_jastrow_champ_factor_ee_gl_hpc(const qmckl_context context,
double * restrict factor_ee_gl_3 = factor_ee_gl_2 + elec_num;
for (int i = 0; i < elec_num; ++i) {
if (j == i && j == 0) {
factor_ee_gl_0[i] = 0;
factor_ee_gl_1[i] = 0;
factor_ee_gl_2[i] = 0;
factor_ee_gl_3[i] = 0;
}
if (j == i) continue;
double x = xj[i];

File diff suppressed because it is too large Load Diff

View File

@ -266,7 +266,11 @@ qmckl_exit_code qmckl_set_mo_basis_coefficient(qmckl_context context,
{
int32_t mask = 1 << 1;
<<pre>>
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
return QMCKL_NULL_CONTEXT;
}
qmckl_context_struct* const ctx = (qmckl_context_struct*) context;
if (ctx->mo_basis.coefficient != NULL) {
qmckl_exit_code rc = qmckl_free(context, ctx->mo_basis.coefficient);
@ -301,6 +305,20 @@ qmckl_exit_code qmckl_set_mo_basis_coefficient(qmckl_context context,
}
#+end_src
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
interface
integer(qmckl_exit_code) function qmckl_set_mo_basis_coefficient (context, &
coefficient, size_max) bind(C)
use, intrinsic :: iso_c_binding
import
implicit none
integer (c_int64_t) , intent(in) , value :: context
real(c_double) , intent(in) :: coefficient(*)
integer (c_int64_t) , intent(in), value :: size_max
end function qmckl_set_mo_basis_coefficient
end interface
#+end_src
When the basis set is completely entered, other data structures are
computed to accelerate the calculations.
@ -369,6 +387,7 @@ qmckl_exit_code qmckl_finalize_mo_basis(qmckl_context context) {
}
#+end_src
** Cusp adjsutment functions
To activate the cusp adjustment, the user must enter the radius of