1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-12-22 12:23:56 +01:00

All tests pass without trexio

This commit is contained in:
Anthony Scemama 2022-01-06 02:28:13 +01:00
parent d248a53ffa
commit 53e2e7bb05
11 changed files with 451 additions and 404 deletions

View File

@ -16,23 +16,25 @@ grep TITLE $(cat table_of_contents) | tr ':' ' '
#+end_src #+end_src
#+RESULTS: toc #+RESULTS: toc
| qmckl.org | #+TITLE | Introduction | | | | qmckl.org | #+TITLE | Introduction | | |
| qmckl_error.org | #+TITLE | Error | handling | | | qmckl_ao.org | #+TITLE | Atomic | Orbitals | |
| qmckl_context.org | #+TITLE | Context | | | | qmckl_blas.org | #+TITLE | BLAS | functions | |
| qmckl_memory.org | #+TITLE | Memory | management | | | qmckl_context.org | #+TITLE | Context | | |
| qmckl_numprec.org | #+TITLE | Numerical | precision | | | qmckl_determinant.org | #+TITLE | Slater | Determinant | |
| qmckl_distance.org | #+TITLE | Inter-particle | distances | | | qmckl_distance.org | #+TITLE | Inter-particle | distances | |
| qmckl_nucleus.org | #+TITLE | Nucleus | | | | qmckl_electron.org | #+TITLE | Electrons | | |
| qmckl_electron.org | #+TITLE | Electrons | | | | qmckl_error.org | #+TITLE | Error | handling | |
| qmckl_ao.org | #+TITLE | Atomic | Orbitals | | | qmckl_jastrow.org | #+TITLE | Jastrow | Factor | |
| qmckl_mo.org | #+TITLE | Molecular | Orbitals | | | qmckl_local_energy.org | #+TITLE | Local | Energy | |
| qmckl_jastrow.org | #+TITLE | Jastrow | Factor | | | qmckl_memory.org | #+TITLE | Memory | management | |
| qmckl_sherman_morrison_woodbury.org | #+TITLE | Sherman-Morrison-Woodbury | | | | qmckl_mo.org | #+TITLE | Molecular | Orbitals | |
| qmckl_utils.org | #+TITLE | Utility | functions | | | qmckl_numprec.org | #+TITLE | Numerical | precision | |
| qmckl_blas.org | #+TITLE | BLAS | functions | | | qmckl_nucleus.org | #+TITLE | Nucleus | | |
| qmckl_trexio.org | #+TITLE | TREXIO | I/O | library | | qmckl_sherman_morrison_woodbury.org | #+TITLE | Sherman-Morrison-Woodbury | | |
| qmckl_verificarlo.org | #+TITLE | Verificarlo | CI | | | qmckl_utils.org | #+TITLE | Utility | functions | |
| qmckl_tests.org | #+TITLE | Data | for | Tests | | qmckl_trexio.org | #+TITLE | TREXIO | I/O | library |
| qmckl_verificarlo.org | #+TITLE | Verificarlo | CI | |
| qmckl_tests.org | #+TITLE | Data | for | Tests |
#+begin_src python :var data=toc :exports results :results raw #+begin_src python :var data=toc :exports results :results raw
result = [] result = []
@ -45,19 +47,21 @@ return '\n'.join(result)
#+RESULTS: #+RESULTS:
- [[./qmckl.html][Introduction]] - [[./qmckl.html][Introduction]]
- [[./qmckl_error.html][Error handling]]
- [[./qmckl_context.html][Context]]
- [[./qmckl_memory.html][Memory management]]
- [[./qmckl_numprec.html][Numerical precision]]
- [[./qmckl_distance.html][Inter-particle distances]]
- [[./qmckl_nucleus.html][Nucleus]]
- [[./qmckl_electron.html][Electrons]]
- [[./qmckl_ao.html][Atomic Orbitals]] - [[./qmckl_ao.html][Atomic Orbitals]]
- [[./qmckl_mo.html][Molecular Orbitals]] - [[./qmckl_blas.html][BLAS functions]]
- [[./qmckl_context.html][Context]]
- [[./qmckl_determinant.html][Slater Determinant]]
- [[./qmckl_distance.html][Inter-particle distances]]
- [[./qmckl_electron.html][Electrons]]
- [[./qmckl_error.html][Error handling]]
- [[./qmckl_jastrow.html][Jastrow Factor]] - [[./qmckl_jastrow.html][Jastrow Factor]]
- [[./qmckl_local_energy.html][Local Energy]]
- [[./qmckl_memory.html][Memory management]]
- [[./qmckl_mo.html][Molecular Orbitals]]
- [[./qmckl_numprec.html][Numerical precision]]
- [[./qmckl_nucleus.html][Nucleus]]
- [[./qmckl_sherman_morrison_woodbury.html][Sherman-Morrison-Woodbury]] - [[./qmckl_sherman_morrison_woodbury.html][Sherman-Morrison-Woodbury]]
- [[./qmckl_utils.html][Utility functions]] - [[./qmckl_utils.html][Utility functions]]
- [[./qmckl_blas.html][BLAS functions]]
- [[./qmckl_trexio.html][TREXIO I/O library]] - [[./qmckl_trexio.html][TREXIO I/O library]]
- [[./qmckl_verificarlo.html][Verificarlo CI]] - [[./qmckl_verificarlo.html][Verificarlo CI]]
- [[./qmckl_tests.html][Data for Tests]] - [[./qmckl_tests.html][Data for Tests]]

View File

@ -102,7 +102,7 @@ int main() {
* Context * Context
** Constant data ** Constant data
The following arrays are stored in the context, and need to be set The following arrays are stored in the context, and need to be set
when initializing the library: when initializing the library:
@ -127,7 +127,7 @@ int main() {
| ~ao_factor~ | ~double[ao_num]~ | Normalization factor of the AO | | ~ao_factor~ | ~double[ao_num]~ | Normalization factor of the AO |
For H_2 with the following basis set, For H_2 with the following basis set,
#+NAME: basis #+NAME: basis
#+BEGIN_EXAMPLE #+BEGIN_EXAMPLE
HYDROGEN HYDROGEN
@ -183,7 +183,7 @@ prim_factor = [ 1.0006253235944540e+01, 2.4169531573445120e+00, 7.96109248497664
#+END_EXAMPLE #+END_EXAMPLE
A scalar variable ~$V$~ present in this table can be set or get by A scalar variable ~$V$~ present in this table can be set or get by
calling the functions: calling the functions:
#+NAME: template_scalar_c #+NAME: template_scalar_c
#+begin_src C :tangle no #+begin_src C :tangle no
@ -372,7 +372,7 @@ qmckl_set_ao_basis_type(qmckl_context context,
{ {
<<pre2>> <<pre2>>
if (t != 'G' && t != 'S') { if (basis_type != 'G' && basis_type != 'S') {
return qmckl_failwith( context, return qmckl_failwith( context,
QMCKL_INVALID_ARG_2, QMCKL_INVALID_ARG_2,
"qmckl_set_ao_basis_type", "qmckl_set_ao_basis_type",
@ -386,7 +386,7 @@ qmckl_set_ao_basis_type(qmckl_context context,
} }
#+end_src #+end_src
#+begin_src c :comments org :tangle (eval h_func) #+begin_src c :comments org :tangle (eval h_func)
qmckl_exit_code qmckl_exit_code
qmckl_set_ao_basis_shell_num (qmckl_context context, qmckl_set_ao_basis_shell_num (qmckl_context context,
@ -396,7 +396,7 @@ qmckl_set_ao_basis_shell_num (qmckl_context context,
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none #+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
qmckl_exit_code qmckl_exit_code
qmckl_set_ao_basis_shell_num (qmckl_context context, qmckl_set_ao_basis_shell_num (qmckl_context context,
const int64_t shell_num); const int64_t shell_num)
{ {
<<pre2>> <<pre2>>
@ -434,7 +434,7 @@ qmckl_set_ao_basis_prim_num (qmckl_context context,
qmckl_exit_code qmckl_exit_code
qmckl_set_ao_basis_prim_num (qmckl_context context, qmckl_set_ao_basis_prim_num (qmckl_context context,
const int64_t prim_num) const int64_t prim_num)
{ {
<<pre2>> <<pre2>>
if (prim_num <= 0) { if (prim_num <= 0) {
@ -478,7 +478,7 @@ qmckl_set_ao_basis_ao_num (qmckl_context context,
qmckl_exit_code qmckl_exit_code
qmckl_set_ao_basis_ao_num (qmckl_context context, qmckl_set_ao_basis_ao_num (qmckl_context context,
const int64_t ao_num) const int64_t ao_num)
{ {
<<pre2>> <<pre2>>
if (ao_num <= 0) { if (ao_num <= 0) {
@ -509,7 +509,7 @@ qmckl_set_ao_basis_ao_num (qmckl_context context,
<<post2>> <<post2>>
} }
#+end_src #+end_src
#+begin_src c :comments org :tangle (eval h_func) #+begin_src c :comments org :tangle (eval h_func)
qmckl_exit_code qmckl_exit_code
@ -584,7 +584,7 @@ qmckl_set_ao_basis_nucleus_shell_num (qmckl_context context,
qmckl_exit_code qmckl_exit_code
qmckl_set_ao_basis_nucleus_shell_num (qmckl_context context, qmckl_set_ao_basis_nucleus_shell_num (qmckl_context context,
const int64_t* nucleus_shell_num, const int64_t* nucleus_shell_num,
const int64_t size_max); const int64_t size_max)
{ {
<<pre2>> <<pre2>>
@ -646,7 +646,7 @@ qmckl_set_ao_basis_shell_ang_mom (qmckl_context context,
qmckl_exit_code qmckl_exit_code
qmckl_set_ao_basis_shell_ang_mom (qmckl_context context, qmckl_set_ao_basis_shell_ang_mom (qmckl_context context,
const int32_t* shell_ang_mom, const int32_t* shell_ang_mom,
const int64_t size_max); const int64_t size_max)
{ {
<<pre2>> <<pre2>>
@ -1083,6 +1083,7 @@ qmckl_exit_code
qmckl_set_ao_basis_ao_factor (qmckl_context context, qmckl_set_ao_basis_ao_factor (qmckl_context context,
const double* ao_factor, const double* ao_factor,
const int64_t size_max) const int64_t size_max)
{
<<pre2>> <<pre2>>
int32_t mask = 1 << 13; int32_t mask = 1 << 13;
@ -1146,7 +1147,7 @@ qmckl_set_ao_basis_cartesian (qmckl_context context,
<<pre2>> <<pre2>>
int32_t mask = 1; int32_t mask = 1;
ctx->ao_basis.ao_cartesian = t; ctx->ao_basis.ao_cartesian = cartesian;
<<post2>> <<post2>>
} }
@ -1341,7 +1342,7 @@ end interface
#+begin_src c :comments org :tangle (eval h_func) #+begin_src c :comments org :tangle (eval h_func)
qmckl_exit_code qmckl_exit_code
qmckl_get_ao_basis_type (const qmckl_context context, qmckl_get_ao_basis_type (const qmckl_context context,
char* const basis_type) char* const basis_type);
#+end_src #+end_src
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none #+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
@ -1789,7 +1790,7 @@ qmckl_get_ao_basis_shell_factor (const qmckl_context context,
#+end_src #+end_src
#+begin_src c :comments org :tangle (eval h_func) #+begin_src c :comments org :tangle (eval h_func)
qmckl_exit_code qmckl_exit_code
qmckl_get_ao_basis_exponent (const qmckl_context context, qmckl_get_ao_basis_exponent (const qmckl_context context,
double* const exponent, double* const exponent,
@ -1843,7 +1844,7 @@ qmckl_get_ao_basis_exponent (const qmckl_context context,
#+end_src #+end_src
#+begin_src c :comments org :tangle (eval h_func) #+begin_src c :comments org :tangle (eval h_func)
qmckl_exit_code qmckl_exit_code
qmckl_get_ao_basis_coefficient (const qmckl_context context, qmckl_get_ao_basis_coefficient (const qmckl_context context,
double* const coefficient, double* const coefficient,
@ -2069,7 +2070,7 @@ bool qmckl_ao_basis_provided(const qmckl_context context) {
**** Fortran interface **** Fortran interface
#+begin_src f90 :tangle (eval fh_func) :comments org #+begin_src f90 :tangle (eval fh_func) :comments org
interface interface
integer(c_int32_t) function qmckl_get_ao_basis_type (context, & integer(c_int32_t) function qmckl_get_ao_basis_type (context, &
basis_type) bind(C) basis_type) bind(C)
@ -2466,9 +2467,9 @@ for (int64_t i=0 ; i < ao_num ; ++i) {
| ~ao_vgl~ | ~double[5][elec_num][ao_num]~ | Value, gradients, Laplacian of the primitives at electron positions | | ~ao_vgl~ | ~double[5][elec_num][ao_num]~ | Value, gradients, Laplacian of the primitives at electron positions |
| ~ao_vgl_date~ | ~uint64_t~ | Last modification date of Value, gradients, Laplacian of the AOs at electron positions | | ~ao_vgl_date~ | ~uint64_t~ | Last modification date of Value, gradients, Laplacian of the AOs at electron positions |
*** After initialization *** After initialization
When the basis set is completely entered, extra data structures may be When the basis set is completely entered, extra data structures may be
computed to accelerate the calculations. The primitives within each computed to accelerate the calculations. The primitives within each
contraction are sorted in ascending order of their exponents, such contraction are sorted in ascending order of their exponents, such
@ -2619,7 +2620,7 @@ qmckl_get_ao_basis_primitive_vgl (qmckl_context context,
double* const primitive_vgl, double* const primitive_vgl,
const int64_t size_max); const int64_t size_max);
#+end_src #+end_src
Returns the array of values, gradients an Laplacian of primitive Returns the array of values, gradients an Laplacian of primitive
basis functions evaluated at the current coordinates. basis functions evaluated at the current coordinates.
See section [[Computation of primitives]]. See section [[Computation of primitives]].
@ -2657,7 +2658,7 @@ qmckl_get_ao_basis_primitive_vgl (qmckl_context context,
return QMCKL_SUCCESS; return QMCKL_SUCCESS;
} }
#+end_src #+end_src
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none #+begin_src f90 :tangle (eval fh_func) :comments org :exports none
interface interface
integer(c_int32_t) function qmckl_get_ao_basis_primitive_vgl & integer(c_int32_t) function qmckl_get_ao_basis_primitive_vgl &
@ -2689,7 +2690,7 @@ qmckl_get_ao_basis_shell_vgl (qmckl_context context,
qmckl_exit_code qmckl_exit_code
qmckl_get_ao_basis_shell_vgl (qmckl_context context, qmckl_get_ao_basis_shell_vgl (qmckl_context context,
double* const shell_vgl, double* const shell_vgl,
const int64_t size_max); const int64_t size_max)
{ {
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) { if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
return qmckl_failwith( context, return qmckl_failwith( context,
@ -2746,7 +2747,7 @@ qmckl_get_ao_basis_ao_vgl (qmckl_context context,
Returns the array of values, gradients an Laplacian of the atomic orbitals Returns the array of values, gradients an Laplacian of the atomic orbitals
evaluated at the current coordinates. evaluated at the current coordinates.
See section [[Combining radial and polynomial parts]]. See section [[Combining radial and polynomial parts]].
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none #+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
qmckl_exit_code qmckl_exit_code
qmckl_get_ao_basis_ao_vgl (qmckl_context context, qmckl_get_ao_basis_ao_vgl (qmckl_context context,
@ -2757,7 +2758,7 @@ qmckl_get_ao_basis_ao_vgl (qmckl_context context,
if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) { if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) {
return qmckl_failwith( context, return qmckl_failwith( context,
QMCKL_INVALID_CONTEXT, QMCKL_INVALID_CONTEXT,
"qmckl_get_ao_vgl", "qmckl_get_ao_basis_ao_vgl",
NULL); NULL);
} }
@ -3062,7 +3063,7 @@ assert(0 == test_qmckl_ao_gaussian_vgl(context));
const double* elec_coord, const double* elec_coord,
const double* nucl_coord, const double* nucl_coord,
const double* expo, const double* expo,
double* const primitive_vgl ); double* const primitive_vgl );
#+end_src #+end_src
@ -3311,7 +3312,8 @@ print ( "[7][4][26] : %e"% lf(a,x,y))
double prim_vgl[5][elec_num][prim_num]; double prim_vgl[5][elec_num][prim_num];
rc = qmckl_get_ao_basis_primitive_vgl(context, &(prim_vgl[0][0][0])); rc = qmckl_get_ao_basis_primitive_vgl(context, &(prim_vgl[0][0][0]),
(int64_t) 5*elec_num*prim_num );
assert (rc == QMCKL_SUCCESS); assert (rc == QMCKL_SUCCESS);
assert( fabs(prim_vgl[0][26][7] - ( 1.0501570432064878E-003)) < 1.e-14 ); assert( fabs(prim_vgl[0][26][7] - ( 1.0501570432064878E-003)) < 1.e-14 );
@ -3398,7 +3400,7 @@ for (j=0 ; j<elec_num ; ++j) {
const double* nucl_coord, const double* nucl_coord,
const double* expo, const double* expo,
const double* coef_normalized, const double* coef_normalized,
double* const shell_vgl ); double* const shell_vgl );
#+end_src #+end_src
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
@ -3723,7 +3725,8 @@ print ( "[1][4][26] : %25.15e"% lf(a,x,y))
double shell_vgl[5][elec_num][shell_num]; double shell_vgl[5][elec_num][shell_num];
rc = qmckl_get_ao_basis_shell_vgl(context, &(shell_vgl[0][0][0])); rc = qmckl_get_ao_basis_shell_vgl(context, &(shell_vgl[0][0][0]),
(int64_t) 5*elec_num*shell_num);
assert (rc == QMCKL_SUCCESS); assert (rc == QMCKL_SUCCESS);
printf(" shell_vgl[1][0][26] %25.15e\n", shell_vgl[0][26][1]); printf(" shell_vgl[1][0][26] %25.15e\n", shell_vgl[0][26][1]);
@ -3741,7 +3744,7 @@ print ( "[1][4][26] : %25.15e"% lf(a,x,y))
} }
#+end_src #+end_src
* Polynomial part * Polynomial part
Going from the atomic basis set to AOs implies a systematic Going from the atomic basis set to AOs implies a systematic
@ -3801,7 +3804,7 @@ print ( "[1][4][26] : %25.15e"% lf(a,x,y))
const double* X, const double* X,
const int32_t* LMAX, const int32_t* LMAX,
double* const P, double* const P,
const int64_t ldp ); const int64_t ldp );
#+end_src #+end_src
#+begin_src f90 :tangle (eval f) #+begin_src f90 :tangle (eval f)
@ -4035,7 +4038,7 @@ assert(0 == test_qmckl_ao_power(context));
int32_t* const L, int32_t* const L,
const int64_t ldl, const int64_t ldl,
double* const VGL, double* const VGL,
const int64_t ldv ); const int64_t ldv );
#+end_src #+end_src
@ -4748,7 +4751,8 @@ assert(rc == QMCKL_SUCCESS);
double ao_vgl[5][elec_num][ao_num]; double ao_vgl[5][elec_num][ao_num];
rc = qmckl_get_ao_vgl(context, &(ao_vgl[0][0][0])); rc = qmckl_get_ao_basis_ao_vgl(context, &(ao_vgl[0][0][0]),
(int64_t) 5*elec_num*ao_num);
assert (rc == QMCKL_SUCCESS); assert (rc == QMCKL_SUCCESS);
printf("\n"); printf("\n");

View File

@ -35,8 +35,8 @@ int main() {
| Variable | Type | In/Out | Description | | Variable | Type | In/Out | Description |
|-----------+-----------------+--------+---------------------------------------| |-----------+-----------------+--------+---------------------------------------|
| ~context~ | ~qmckl_context~ | in | Global state | | ~context~ | ~qmckl_context~ | in | Global state |
| ~TransA~ | ~bool~ | in | Number of rows of the input matrix | | ~TransA~ | ~char~ | in | 'T' is transposed |
| ~TransB~ | ~bool~ | in | Number of rows of the input matrix | | ~TransB~ | ~char~ | in | 'T' is transposed |
| ~m~ | ~int64_t~ | in | Number of rows of the input matrix | | ~m~ | ~int64_t~ | in | Number of rows of the input matrix |
| ~n~ | ~int64_t~ | in | Number of columns of the input matrix | | ~n~ | ~int64_t~ | in | Number of columns of the input matrix |
| ~k~ | ~int64_t~ | in | Number of columns of the input matrix | | ~k~ | ~int64_t~ | in | Number of columns of the input matrix |
@ -68,8 +68,8 @@ int main() {
#+begin_src c :tangle (eval h_func) :comments org #+begin_src c :tangle (eval h_func) :comments org
qmckl_exit_code qmckl_dgemm ( qmckl_exit_code qmckl_dgemm (
const qmckl_context context, const qmckl_context context,
const bool TransA, const char TransA,
const bool TransB, const char TransB,
const int64_t m, const int64_t m,
const int64_t n, const int64_t n,
const int64_t k, const int64_t k,
@ -90,7 +90,7 @@ integer function qmckl_dgemm_f(context, TransA, TransB, &
use qmckl use qmckl
implicit none implicit none
integer(qmckl_context), intent(in) :: context integer(qmckl_context), intent(in) :: context
logical*8 , intent(in) :: TransA, TransB character , intent(in) :: TransA, TransB
integer*8 , intent(in) :: m, n, k integer*8 , intent(in) :: m, n, k
double precision , intent(in) :: alpha, beta double precision , intent(in) :: alpha, beta
integer*8 , intent(in) :: lda integer*8 , intent(in) :: lda
@ -122,18 +122,18 @@ integer function qmckl_dgemm_f(context, TransA, TransB, &
return return
endif endif
if (LDA_2 /= m) then if (LDA <= 0) then
info = QMCKL_INVALID_ARG_9 info = QMCKL_INVALID_ARG_9
return return
endif endif
if (LDB_2 /= k) then if (LDB <= 0) then
info = QMCKL_INVALID_ARG_10 info = QMCKL_INVALID_ARG_11
return return
endif endif
if (LDC /= m) then if (LDC <= 0) then
info = QMCKL_INVALID_ARG_13 info = QMCKL_INVALID_ARG_14
return return
endif endif
@ -157,8 +157,8 @@ end function qmckl_dgemm_f
implicit none implicit none
integer (c_int64_t) , intent(in) , value :: context integer (c_int64_t) , intent(in) , value :: context
logical*8 , intent(in) , value :: TransA character , intent(in) , value :: TransA
logical*8 , intent(in) , value :: TransB character , intent(in) , value :: TransB
integer (c_int64_t) , intent(in) , value :: m integer (c_int64_t) , intent(in) , value :: m
integer (c_int64_t) , intent(in) , value :: n integer (c_int64_t) , intent(in) , value :: n
integer (c_int64_t) , intent(in) , value :: k integer (c_int64_t) , intent(in) , value :: k
@ -192,8 +192,8 @@ end function qmckl_dgemm_f
implicit none implicit none
integer (c_int64_t) , intent(in) , value :: context integer (c_int64_t) , intent(in) , value :: context
logical*8 , intent(in) , value :: TransA character , intent(in) , value :: TransA
logical*8 , intent(in) , value :: TransB character , intent(in) , value :: TransB
integer (c_int64_t) , intent(in) , value :: m integer (c_int64_t) , intent(in) , value :: m
integer (c_int64_t) , intent(in) , value :: n integer (c_int64_t) , intent(in) , value :: n
integer (c_int64_t) , intent(in) , value :: k integer (c_int64_t) , intent(in) , value :: k
@ -221,11 +221,11 @@ integer(qmckl_exit_code) function test_qmckl_dgemm(context) bind(C)
double precision, allocatable :: A(:,:), B(:,:), C(:,:), D(:,:) double precision, allocatable :: A(:,:), B(:,:), C(:,:), D(:,:)
integer*8 :: m, n, k, LDA, LDB, LDC integer*8 :: m, n, k, LDA, LDB, LDC
integer*8 :: i,j,l integer*8 :: i,j,l
logical*8 :: TransA, TransB character :: TransA, TransB
double precision :: x, alpha, beta double precision :: x, alpha, beta
TransA = .False. TransA = 'N'
TransB = .False. TransB = 'N'
m = 1_8 m = 1_8
k = 4_8 k = 4_8
n = 6_8 n = 6_8
@ -400,7 +400,7 @@ subroutine adjugate2(A,LDA,B,LDB,na,det_l)
double precision :: C(2,2) double precision :: C(2,2)
call cofactor2(A,LDA,C,2,na,det_l) call cofactor2(A,LDA,C,2_8,na,det_l)
B(1,1) = C(1,1) B(1,1) = C(1,1)
B(2,1) = C(1,2) B(2,1) = C(1,2)
@ -419,7 +419,7 @@ subroutine adjugate3(a,LDA,B,LDB,na,det_l)
double precision :: C(4,3) double precision :: C(4,3)
call cofactor3(A,LDA,C,4,na,det_l) call cofactor3(A,LDA,C,4_8,na,det_l)
B(1,1) = C(1,1) B(1,1) = C(1,1)
B(1,2) = C(2,1) B(1,2) = C(2,1)
@ -443,7 +443,7 @@ subroutine adjugate4(a,LDA,B,LDB,na,det_l)
double precision :: C(4,4) double precision :: C(4,4)
call cofactor4(A,LDA,B,4,na,det_l) call cofactor4(A,LDA,B,4_8,na,det_l)
B(1,1) = C(1,1) B(1,1) = C(1,1)
B(1,2) = C(2,1) B(1,2) = C(2,1)
@ -474,7 +474,7 @@ subroutine adjugate5(A,LDA,B,LDB,na,det_l)
double precision :: C(8,5) double precision :: C(8,5)
call cofactor5(A,LDA,C,8,na,det_l) call cofactor5(A,LDA,C,8_8,na,det_l)
B(1,1) = C(1,1) B(1,1) = C(1,1)
B(1,2) = C(2,1) B(1,2) = C(2,1)
@ -526,7 +526,6 @@ subroutine cofactor3(a,LDA,b,LDB,na,det_l)
integer*8, intent(in) :: LDA, LDB integer*8, intent(in) :: LDA, LDB
integer*8, intent(in) :: na integer*8, intent(in) :: na
double precision, intent(inout) :: det_l double precision, intent(inout) :: det_l
double precision :: b(4,3)
integer :: i integer :: i
det_l = a(1,1)*(a(2,2)*a(3,3)-a(2,3)*a(3,2)) & det_l = a(1,1)*(a(2,2)*a(3,3)-a(2,3)*a(3,2)) &
@ -554,7 +553,6 @@ subroutine cofactor4(a,LDA,b,LDB,na,det_l)
integer*8, intent(in) :: LDA, LDB integer*8, intent(in) :: LDA, LDB
integer*8, intent(in) :: na integer*8, intent(in) :: na
double precision, intent(inout) :: det_l double precision, intent(inout) :: det_l
double precision :: b(4,4)
integer :: i,j integer :: i,j
det_l = a(1,1)*(a(2,2)*(a(3,3)*a(4,4)-a(3,4)*a(4,3)) & det_l = a(1,1)*(a(2,2)*(a(3,3)*a(4,4)-a(3,4)*a(4,3)) &
-a(2,3)*(a(3,2)*a(4,4)-a(3,4)*a(4,2)) & -a(2,3)*(a(3,2)*a(4,4)-a(3,4)*a(4,2)) &
@ -598,7 +596,6 @@ subroutine cofactor5(A,LDA,B,LDB,na,det_l)
integer*8, intent(in) :: LDA, LDB integer*8, intent(in) :: LDA, LDB
integer*8, intent(in) :: na integer*8, intent(in) :: na
double precision, intent(inout) :: det_l double precision, intent(inout) :: det_l
double precision :: b(5,5)
integer :: i,j integer :: i,j
det_l = a(1,1)*(a(2,2)*(a(3,3)*(a(4,4)*a(5,5)-a(4,5)*a(5,4))-a(3,4)*( & det_l = a(1,1)*(a(2,2)*(a(3,3)*(a(4,4)*a(5,5)-a(4,5)*a(5,4))-a(3,4)*( &
@ -824,10 +821,10 @@ end
#+begin_src f90 :tangle (eval f) #+begin_src f90 :tangle (eval f)
subroutine adjugate_general(context, na, A, LDA, det_l) subroutine adjugate_general(context, na, A, LDA, B, LDB, det_l)
use qmckl use qmckl
implicit none implicit none
integer(qmckl_context) intent(in) :: context integer(qmckl_context), intent(in) :: context
double precision, intent(in) :: A (LDA,na) double precision, intent(in) :: A (LDA,na)
integer*8, intent(in) :: LDA integer*8, intent(in) :: LDA
double precision, intent(out) :: B (LDB,na) double precision, intent(out) :: B (LDB,na)

View File

@ -1194,45 +1194,45 @@ rc = qmckl_set_ao_basis_prim_num (context, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_nucleus_index (context, nucleus_index); rc = qmckl_set_ao_basis_nucleus_index (context, nucleus_index, nucl_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_nucleus_shell_num (context, nucleus_shell_num); rc = qmckl_set_ao_basis_nucleus_shell_num (context, nucleus_shell_num, nucl_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_ang_mom (context, shell_ang_mom); rc = qmckl_set_ao_basis_shell_ang_mom (context, shell_ang_mom, shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_factor (context, shell_factor); rc = qmckl_set_ao_basis_shell_factor (context, shell_factor, shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_prim_num (context, shell_prim_num); rc = qmckl_set_ao_basis_shell_prim_num (context, shell_prim_num, shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_prim_index (context, shell_prim_index); rc = qmckl_set_ao_basis_shell_prim_index (context, shell_prim_index, shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_exponent (context, exponent); rc = qmckl_set_ao_basis_exponent (context, exponent, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_coefficient (context, coefficient); rc = qmckl_set_ao_basis_coefficient (context, coefficient, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_prim_factor (context, prim_factor); rc = qmckl_set_ao_basis_prim_factor (context, prim_factor, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
rc = qmckl_set_ao_basis_ao_num(context, chbrclf_ao_num); rc = qmckl_set_ao_basis_ao_num(context, chbrclf_ao_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
rc = qmckl_set_ao_basis_ao_factor (context, ao_factor); rc = qmckl_set_ao_basis_ao_factor (context, ao_factor, chbrclf_ao_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(qmckl_ao_basis_provided(context)); assert(qmckl_ao_basis_provided(context));
@ -1240,7 +1240,7 @@ assert(qmckl_ao_basis_provided(context));
double ao_vgl[5][walk_num][elec_num][chbrclf_ao_num]; double ao_vgl[5][walk_num][elec_num][chbrclf_ao_num];
rc = qmckl_get_ao_vgl(context, &(ao_vgl[0][0][0][0])); rc = qmckl_get_ao_basis_ao_vgl(context, &(ao_vgl[0][0][0][0]), (int64_t) 5*walk_num*elec_num*chbrclf_ao_num);
assert (rc == QMCKL_SUCCESS); assert (rc == QMCKL_SUCCESS);
/* Set up MO data */ /* Set up MO data */

View File

@ -40,19 +40,21 @@ int main() {
\] \]
#+NAME: qmckl_distance_sq_args #+NAME: qmckl_distance_sq_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| char | transa | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed | |-----------+------------------+--------+-----------------------------------------------|
| char | transb | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | m | in | Number of points in the first set | | ~transa~ | ~char~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
| int64_t | n | in | Number of points in the second set | | ~transb~ | ~char~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
| double | A[][lda] | in | Array containing the $m \times 3$ matrix $A$ | | ~m~ | ~int64_t~ | in | Number of points in the first set |
| int64_t | lda | in | Leading dimension of array ~A~ | | ~n~ | ~int64_t~ | in | Number of points in the second set |
| double | B[][ldb] | in | Array containing the $n \times 3$ matrix $B$ | | ~A~ | ~double[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
| int64_t | ldb | in | Leading dimension of array ~B~ | | ~lda~ | ~int64_t~ | in | Leading dimension of array ~A~ |
| double | C[n][ldc] | out | Array containing the $m \times n$ matrix $C$ | | ~B~ | ~double[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
| int64_t | ldc | in | Leading dimension of array ~C~ | | ~ldb~ | ~int64_t~ | in | Leading dimension of array ~B~ |
| ~C~ | ~double[n][ldc]~ | out | Array containing the $m \times n$ matrix $C$ |
| ~ldc~ | ~int64_t~ | in | Leading dimension of array ~C~ |
*** Requirements Requirements:
- ~context~ is not ~QMCKL_NULL_CONTEXT~ - ~context~ is not ~QMCKL_NULL_CONTEXT~
- ~m > 0~ - ~m > 0~
@ -66,8 +68,6 @@ int main() {
- ~B~ is allocated with at least $3 \times n \times 8$ bytes - ~B~ is allocated with at least $3 \times n \times 8$ bytes
- ~C~ is allocated with at least $m \times n \times 8$ bytes - ~C~ is allocated with at least $m \times n \times 8$ bytes
*** C header
#+CALL: generate_c_header(table=qmckl_distance_sq_args,rettyp=get_value("CRetType"),fname=get_value("Name")) #+CALL: generate_c_header(table=qmckl_distance_sq_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
#+RESULTS: #+RESULTS:
@ -83,10 +83,9 @@ int main() {
const double* B, const double* B,
const int64_t ldb, const int64_t ldb,
double* const C, double* const C,
const int64_t ldc ); const int64_t ldc );
#+end_src #+end_src
*** Source
#+begin_src f90 :tangle (eval f) #+begin_src f90 :tangle (eval f)
integer function qmckl_distance_sq_f(context, transa, transb, m, n, & integer function qmckl_distance_sq_f(context, transa, transb, m, n, &
A, LDA, B, LDB, C, LDC) & A, LDA, B, LDB, C, LDC) &
@ -222,8 +221,6 @@ end function qmckl_distance_sq_f
This function is more efficient when ~A~ and ~B~ are This function is more efficient when ~A~ and ~B~ are
transposed. transposed.
** C interface :noexport:
#+CALL: generate_c_interface(table=qmckl_distance_sq_args,rettyp=get_value("FRetType"),fname=get_value("Name")) #+CALL: generate_c_interface(table=qmckl_distance_sq_args,rettyp=get_value("FRetType"),fname=get_value("Name"))
#+RESULTS: #+RESULTS:
@ -284,7 +281,6 @@ end function qmckl_distance_sq_f
*** Test :noexport: *** Test :noexport:
#+begin_src f90 :tangle (eval f_test) #+begin_src f90 :tangle (eval f_test)
integer(qmckl_exit_code) function test_qmckl_distance_sq(context) bind(C) integer(qmckl_exit_code) function test_qmckl_distance_sq(context) bind(C)
use qmckl use qmckl
@ -441,17 +437,19 @@ end function test_qmckl_distance_sq
the leading dimension: ~[n][3]~ in C and ~(3,n)~ in Fortran. the leading dimension: ~[n][3]~ in C and ~(3,n)~ in Fortran.
#+NAME: qmckl_distance_args #+NAME: qmckl_distance_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| char | transa | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed | |-----------+------------------+--------+-----------------------------------------------|
| char | transb | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | m | in | Number of points in the first set | | ~transa~ | ~char~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
| int64_t | n | in | Number of points in the second set | | ~transb~ | ~char~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
| double | A[][lda] | in | Array containing the $m \times 3$ matrix $A$ | | ~m~ | ~int64_t~ | in | Number of points in the first set |
| int64_t | lda | in | Leading dimension of array ~A~ | | ~n~ | ~int64_t~ | in | Number of points in the second set |
| double | B[][ldb] | in | Array containing the $n \times 3$ matrix $B$ | | ~A~ | ~double[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
| int64_t | ldb | in | Leading dimension of array ~B~ | | ~lda~ | ~int64_t~ | in | Leading dimension of array ~A~ |
| double | C[n][ldc] | out | Array containing the $m \times n$ matrix $C$ | | ~B~ | ~double[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
| int64_t | ldc | in | Leading dimension of array ~C~ | | ~ldb~ | ~int64_t~ | in | Leading dimension of array ~B~ |
| ~C~ | ~double[n][ldc]~ | out | Array containing the $m \times n$ matrix $C$ |
| ~ldc~ | ~int64_t~ | in | Leading dimension of array ~C~ |
*** Requirements *** Requirements
@ -484,7 +482,7 @@ end function test_qmckl_distance_sq
const double* B, const double* B,
const int64_t ldb, const int64_t ldb,
double* const C, double* const C,
const int64_t ldc ); const int64_t ldc );
#+end_src #+end_src
*** Source *** Source
@ -881,18 +879,20 @@ end function test_qmckl_dist
the leading dimension: ~[n][3]~ in C and ~(3,n)~ in Fortran. the leading dimension: ~[n][3]~ in C and ~(3,n)~ in Fortran.
#+NAME: qmckl_distance_rescaled_args #+NAME: qmckl_distance_rescaled_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| char | transa | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed | |------------------------+------------------+--------+-----------------------------------------------|
| char | transb | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | m | in | Number of points in the first set | | ~transa~ | ~char~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
| int64_t | n | in | Number of points in the second set | | ~transb~ | ~char~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
| double | A[][lda] | in | Array containing the $m \times 3$ matrix $A$ | | ~m~ | ~int64_t~ | in | Number of points in the first set |
| int64_t | lda | in | Leading dimension of array ~A~ | | ~n~ | ~int64_t~ | in | Number of points in the second set |
| double | B[][ldb] | in | Array containing the $n \times 3$ matrix $B$ | | ~A~ | ~double[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
| int64_t | ldb | in | Leading dimension of array ~B~ | | ~lda~ | ~int64_t~ | in | Leading dimension of array ~A~ |
| double | C[n][ldc] | out | Array containing the $m \times n$ matrix $C$ | | ~B~ | ~double[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
| int64_t | ldc | in | Leading dimension of array ~C~ | | ~ldb~ | ~int64_t~ | in | Leading dimension of array ~B~ |
| double | rescale_factor_kappa | in | Factor for calculating rescaled distances | | ~C~ | ~double[n][ldc]~ | out | Array containing the $m \times n$ matrix $C$ |
| ~ldc~ | ~int64_t~ | in | Leading dimension of array ~C~ |
| ~rescale_factor_kappa~ | ~double~ | in | Factor for calculating rescaled distances |
*** Requirements *** Requirements
@ -926,7 +926,7 @@ end function test_qmckl_dist
const int64_t ldb, const int64_t ldb,
double* const C, double* const C,
const int64_t ldc, const int64_t ldc,
const double rescale_factor_kappa); const double rescale_factor_kappa );
#+end_src #+end_src
*** Source *** Source
@ -1215,20 +1215,22 @@ end function qmckl_distance_rescaled_f
the leading dimension: ~[n][3]~ in C and ~(3,n)~ in Fortran. the leading dimension: ~[n][3]~ in C and ~(3,n)~ in Fortran.
#+NAME: qmckl_distance_rescaled_deriv_e_args #+NAME: qmckl_distance_rescaled_deriv_e_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| char | transa | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed | |------------------------+---------------------+--------+-------------------------------------------------------|
| char | transb | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | m | in | Number of points in the first set | | ~transa~ | ~char~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
| int64_t | n | in | Number of points in the second set | | ~transb~ | ~char~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
| double | A[][lda] | in | Array containing the $m \times 3$ matrix $A$ | | ~m~ | ~int64_t~ | in | Number of points in the first set |
| int64_t | lda | in | Leading dimension of array ~A~ | | ~n~ | ~int64_t~ | in | Number of points in the second set |
| double | B[][ldb] | in | Array containing the $n \times 3$ matrix $B$ | | ~A~ | ~double[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
| int64_t | ldb | in | Leading dimension of array ~B~ | | ~lda~ | ~int64_t~ | in | Leading dimension of array ~A~ |
| double | C[4][n][ldc] | out | Array containing the $4 \times m \times n$ matrix $C$ | | ~B~ | ~double[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
| int64_t | ldc | in | Leading dimension of array ~C~ | | ~ldb~ | ~int64_t~ | in | Leading dimension of array ~B~ |
| double | rescale_factor_kappa | in | Factor for calculating rescaled distances derivatives | | ~C~ | ~double[4][n][ldc]~ | out | Array containing the $4 \times m \times n$ matrix $C$ |
| ~ldc~ | ~int64_t~ | in | Leading dimension of array ~C~ |
| ~rescale_factor_kappa~ | ~double~ | in | Factor for calculating rescaled distances derivatives |
*** Requirements Requirements:
- ~context~ is not ~QMCKL_NULL_CONTEXT~ - ~context~ is not ~QMCKL_NULL_CONTEXT~
- ~m > 0~ - ~m > 0~
@ -1241,9 +1243,7 @@ end function qmckl_distance_rescaled_f
- ~A~ is allocated with at least $3 \times m \times 8$ bytes - ~A~ is allocated with at least $3 \times m \times 8$ bytes
- ~B~ is allocated with at least $3 \times n \times 8$ bytes - ~B~ is allocated with at least $3 \times n \times 8$ bytes
- ~C~ is allocated with at least $4 \times m \times n \times 8$ bytes - ~C~ is allocated with at least $4 \times m \times n \times 8$ bytes
*** C header
#+CALL: generate_c_header(table=qmckl_distance_rescaled_deriv_e_args,rettyp=get_value("CRetType"),fname=get_value("Name")) #+CALL: generate_c_header(table=qmckl_distance_rescaled_deriv_e_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
#+RESULTS: #+RESULTS:
@ -1260,10 +1260,9 @@ end function qmckl_distance_rescaled_f
const int64_t ldb, const int64_t ldb,
double* const C, double* const C,
const int64_t ldc, const int64_t ldc,
const double rescale_factor_kappa); const double rescale_factor_kappa );
#+end_src #+end_src
*** Source
#+begin_src f90 :tangle (eval f) #+begin_src f90 :tangle (eval f)
integer function qmckl_distance_rescaled_deriv_e_f(context, transa, transb, m, n, & integer function qmckl_distance_rescaled_deriv_e_f(context, transa, transb, m, n, &
A, LDA, B, LDB, C, LDC, rescale_factor_kappa) & A, LDA, B, LDB, C, LDC, rescale_factor_kappa) &
@ -1450,13 +1449,9 @@ integer function qmckl_distance_rescaled_deriv_e_f(context, transa, transb, m, n
end function qmckl_distance_rescaled_deriv_e_f end function qmckl_distance_rescaled_deriv_e_f
#+end_src #+end_src
*** Performance
This function is more efficient when ~A~ and ~B~ are transposed. This function is more efficient when ~A~ and ~B~ are transposed.
** C interface :noexport: #+CALL: generate_c_interface(table=qmckl_distance_rescaled_deriv_e_args,fname=get_value("Name"))
#+CALL: generate_c_interface(table=qmckl_distance_rescaled_deriv_e_args,rettyp=get_value("FRetType"),fname=get_value("Name"))
#+RESULTS: #+RESULTS:
#+begin_src f90 :tangle (eval f) :comments org :exports none #+begin_src f90 :tangle (eval f) :comments org :exports none
@ -1476,7 +1471,7 @@ end function qmckl_distance_rescaled_deriv_e_f
integer (c_int64_t) , intent(in) , value :: lda integer (c_int64_t) , intent(in) , value :: lda
real (c_double ) , intent(in) :: B(ldb,*) real (c_double ) , intent(in) :: B(ldb,*)
integer (c_int64_t) , intent(in) , value :: ldb integer (c_int64_t) , intent(in) , value :: ldb
real (c_double ) , intent(out) :: C(4,ldc,n) real (c_double ) , intent(out) :: C(ldc,n,4)
integer (c_int64_t) , intent(in) , value :: ldc integer (c_int64_t) , intent(in) , value :: ldc
real (c_double ) , intent(in) , value :: rescale_factor_kappa real (c_double ) , intent(in) , value :: rescale_factor_kappa
@ -1508,7 +1503,7 @@ end function qmckl_distance_rescaled_deriv_e_f
integer (c_int64_t) , intent(in) , value :: lda integer (c_int64_t) , intent(in) , value :: lda
real (c_double ) , intent(in) :: B(ldb,*) real (c_double ) , intent(in) :: B(ldb,*)
integer (c_int64_t) , intent(in) , value :: ldb integer (c_int64_t) , intent(in) , value :: ldb
real (c_double ) , intent(out) :: C(4,ldc,n) real (c_double ) , intent(out) :: C(ldc,n,4)
integer (c_int64_t) , intent(in) , value :: ldc integer (c_int64_t) , intent(in) , value :: ldc
real (c_double ) , intent(in) , value :: rescale_factor_kappa real (c_double ) , intent(in) , value :: rescale_factor_kappa

View File

@ -68,6 +68,7 @@ int main() {
The following data stored in the context: The following data stored in the context:
| Variable | Type | Description |
|---------------------------+----------------------------+-------------------------------------------| |---------------------------+----------------------------+-------------------------------------------|
| ~uninitialized~ | ~int32_t~ | Keeps bit set for uninitialized data | | ~uninitialized~ | ~int32_t~ | Keeps bit set for uninitialized data |
| ~num~ | ~int64_t~ | Total number of electrons | | ~num~ | ~int64_t~ | Total number of electrons |
@ -83,6 +84,7 @@ int main() {
Computed data: Computed data:
| Variable | Type | Description |
|-------------------------------------+--------------------------------------+----------------------------------------------------------------------| |-------------------------------------+--------------------------------------+----------------------------------------------------------------------|
| ~ee_distance~ | ~double[walk_num][num][num]~ | Electron-electron distances | | ~ee_distance~ | ~double[walk_num][num][num]~ | Electron-electron distances |
| ~ee_distance_date~ | ~uint64_t~ | Last modification date of the electron-electron distances | | ~ee_distance_date~ | ~uint64_t~ | Last modification date of the electron-electron distances |
@ -976,11 +978,13 @@ qmckl_exit_code qmckl_provide_ee_distance(qmckl_context context)
:END: :END:
#+NAME: qmckl_ee_distance_args #+NAME: qmckl_ee_distance_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | elec_num | in | Number of electrons | |---------------+----------------------------------------+--------+-----------------------------|
| int64_t | walk_num | in | Number of walkers | | ~context~ | ~qmckl_context~ | in | Global state |
| double | coord[walk_num][3][elec_num] | in | Electron coordinates | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | ee_distance[walk_num][elec_num][elec_num] | out | Electron-electron distances | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| ~coord~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
| ~ee_distance~ | ~double[walk_num][elec_num][elec_num]~ | out | Electron-electron distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_ee_distance_f(context, elec_num, walk_num, coord, ee_distance) & integer function qmckl_compute_ee_distance_f(context, elec_num, walk_num, coord, ee_distance) &
@ -1215,12 +1219,14 @@ qmckl_exit_code qmckl_provide_ee_distance_rescaled(qmckl_context context)
:END: :END:
#+NAME: qmckl_ee_distance_rescaled_args #+NAME: qmckl_ee_distance_rescaled_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | elec_num | in | Number of electrons | |----------------------------------------+---------------------------+--------+--------------------------------------|
| double | rescale_factor_kappa_ee | in | Factor to rescale ee distances | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | walk_num | in | Number of walkers | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | coord[walk_num][3][elec_num] | in | Electron coordinates | | ~rescale_factor_kappa_ee~ | ~double~ | in | Factor to rescale ee distances |
| double | ee_distance[walk_num][elec_num][elec_num] | out | Electron-electron rescaled distances | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| ~coord~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
| ~ee_distance~ | ~double[walk_num][elec_num][elec_num]~ | out | Electron-electron rescaled distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_ee_distance_rescaled_f(context, elec_num, rescale_factor_kappa_ee, walk_num, & integer function qmckl_compute_ee_distance_rescaled_f(context, elec_num, rescale_factor_kappa_ee, walk_num, &
@ -1459,12 +1465,14 @@ qmckl_exit_code qmckl_provide_ee_distance_rescaled_deriv_e(qmckl_context context
:END: :END:
#+NAME: qmckl_ee_distance_rescaled_deriv_e_args #+NAME: qmckl_ee_distance_rescaled_deriv_e_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | elec_num | in | Number of electrons | |---------------------------+-------------------------------------------+--------+-------------------------------------------------|
| double | rescale_factor_kappa_ee | in | Factor to rescale ee distances | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | walk_num | in | Number of walkers | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | coord[walk_num][3][elec_num] | in | Electron coordinates | | ~rescale_factor_kappa_ee~ | ~double~ | in | Factor to rescale ee distances |
| double | ee_distance_deriv_e[walk_num][4][elec_num][elec_num] | out | Electron-electron rescaled distance derivatives | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| ~coord~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
| ~ee_distance_deriv_e~ | ~double[walk_num][4][elec_num][elec_num]~ | out | Electron-electron rescaled distance derivatives |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_ee_distance_rescaled_deriv_e_f(context, elec_num, rescale_factor_kappa_ee, walk_num, & integer function qmckl_compute_ee_distance_rescaled_deriv_e_f(context, elec_num, rescale_factor_kappa_ee, walk_num, &
@ -1688,11 +1696,13 @@ qmckl_exit_code qmckl_provide_ee_potential(qmckl_context context)
:END: :END:
#+NAME: qmckl_ee_potential_args #+NAME: qmckl_ee_potential_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | elec_num | in | Number of electrons | |---------------+----------------------------------------+--------+--------------------------------------|
| int64_t | walk_num | in | Number of walkers | | ~context~ | ~qmckl_context~ | in | Global state |
| double | ee_distance[walk_num][elec_num][elec_num] | in | Electron-electron rescaled distances | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | ee_pot[walk_num] | out | Electron-electron potential | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| ~ee_distance~ | ~double[walk_num][elec_num][elec_num]~ | in | Electron-electron rescaled distances |
| ~ee_pot~ | ~double[walk_num]~ | out | Electron-electron potential |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_ee_potential_f(context, elec_num, walk_num, & integer function qmckl_compute_ee_potential_f(context, elec_num, walk_num, &
@ -1897,13 +1907,15 @@ qmckl_exit_code qmckl_provide_en_distance(qmckl_context context)
:END: :END:
#+NAME: qmckl_en_distance_args #+NAME: qmckl_en_distance_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | elec_num | in | Number of electrons | |---------------+----------------------------------------+--------+----------------------------|
| int64_t | nucl_num | in | Number of nuclei | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | walk_num | in | Number of walkers | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | elec_coord[walk_num][3][elec_num] | in | Electron coordinates | | ~nucl_num~ | ~int64_t~ | in | Number of nuclei |
| double | nucl_coord[3][elec_num] | in | Nuclear coordinates | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| double | en_distance[walk_num][nucl_num][elec_num] | out | Electron-nucleus distances | | ~elec_coord~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
| ~nucl_coord~ | ~double[3][elec_num]~ | in | Nuclear coordinates |
| ~en_distance~ | ~double[walk_num][nucl_num][elec_num]~ | out | Electron-nucleus distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_en_distance_f(context, elec_num, nucl_num, walk_num, elec_coord, nucl_coord, en_distance) & integer function qmckl_compute_en_distance_f(context, elec_num, nucl_num, walk_num, elec_coord, nucl_coord, en_distance) &
@ -2170,15 +2182,17 @@ qmckl_exit_code qmckl_provide_en_distance_rescaled(qmckl_context context)
:FRetType: qmckl_exit_code :FRetType: qmckl_exit_code
:END: :END:
#+NAME: qmckl_en_distance_rescaled_args #+NAME: qmckl_en_distance_rescaled_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | elec_num | in | Number of electrons | |---------------------------+----------------------------------------+--------+-----------------------------------|
| int64_t | nucl_num | in | Number of nuclei | | ~context~ | ~qmckl_context~ | in | Global state |
| double | rescale_factor_kappa_en | in | The factor for rescaled distances | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| int64_t | walk_num | in | Number of walkers | | ~nucl_num~ | ~int64_t~ | in | Number of nuclei |
| double | elec_coord[walk_num][3][elec_num] | in | Electron coordinates | | ~rescale_factor_kappa_en~ | ~double~ | in | The factor for rescaled distances |
| double | nucl_coord[3][elec_num] | in | Nuclear coordinates | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| double | en_distance_rescaled_date[walk_num][nucl_num][elec_num] | out | Electron-nucleus distances | | ~elec_coord~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
| ~nucl_coord~ | ~double[3][elec_num]~ | in | Nuclear coordinates |
| ~en_distance_rescaled~ | ~double[walk_num][nucl_num][elec_num]~ | out | Electron-nucleus distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_en_distance_rescaled_f(context, elec_num, nucl_num, rescale_factor_kappa_en, walk_num, elec_coord, & integer function qmckl_compute_en_distance_rescaled_f(context, elec_num, nucl_num, rescale_factor_kappa_en, walk_num, elec_coord, &
@ -2457,14 +2471,16 @@ qmckl_exit_code qmckl_provide_en_distance_rescaled_deriv_e(qmckl_context context
:END: :END:
#+NAME: qmckl_en_distance_rescaled_deriv_e_args #+NAME: qmckl_en_distance_rescaled_deriv_e_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | elec_num | in | Number of electrons | |--------------------------------+-------------------------------------------+--------+---------------------------------------|
| int64_t | nucl_num | in | Number of nuclei | | ~context~ | ~qmckl_context~ | in | Global state |
| double | rescale_factor_kappa_en | in | The factor for rescaled distances | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| int64_t | walk_num | in | Number of walkers | | ~nucl_num~ | ~int64_t~ | in | Number of nuclei |
| double | elec_coord[walk_num][3][elec_num] | in | Electron coordinates | | ~rescale_factor_kappa_en~ | ~double~ | in | The factor for rescaled distances |
| double | nucl_coord[3][elec_num] | in | Nuclear coordinates | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| double | en_distance_rescaled_deriv_e_date[walk_num][4][nucl_num][elec_num] | out | Electron-nucleus distance derivatives | | ~elec_coord~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
| ~nucl_coord~ | ~double[3][elec_num]~ | in | Nuclear coordinates |
| ~en_distance_rescaled_deriv_e~ | ~double[walk_num][4][nucl_num][elec_num]~ | out | Electron-nucleus distance derivatives |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_en_distance_rescaled_deriv_e_f(context, elec_num, nucl_num, & integer function qmckl_compute_en_distance_rescaled_deriv_e_f(context, elec_num, nucl_num, &
@ -2726,13 +2742,15 @@ qmckl_exit_code qmckl_provide_en_potential(qmckl_context context)
:END: :END:
#+NAME: qmckl_en_potential_args #+NAME: qmckl_en_potential_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | elec_num | in | Number of electrons | |---------------+----------------------------------------+--------+--------------------------------------|
| int64_t | nucl_num | in | Number of nucleii | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | walk_num | in | Number of walkers | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | charge[nucl_num] | in | charge of nucleus | | ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
| double | en_distance[walk_num][nucl_num][elec_num] | in | Electron-electron rescaled distances | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| double | en_pot[walk_num] | out | Electron-electron potential | | ~charge~ | ~double[nucl_num]~ | in | charge of nucleus |
| ~en_distance~ | ~double[walk_num][nucl_num][elec_num]~ | in | Electron-electron rescaled distances |
| ~en_pot~ | ~double[walk_num]~ | out | Electron-electron potential |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_en_potential_f(context, elec_num, nucl_num, walk_num, & integer function qmckl_compute_en_potential_f(context, elec_num, nucl_num, walk_num, &

View File

@ -76,51 +76,53 @@ int main() {
The following data stored in the context: The following data stored in the context:
#+NAME: qmckl_jastrow_args #+NAME: qmckl_jastrow_args
|------------+--------------------------------------------+-----+-------------------------------------------------------------------| | Variable | Type | In/Out | Description |
| ~int32_t~ | ~uninitialized~ | in | Keeps bit set for uninitialized data | |---------------------------+---------------------------------------+--------+-------------------------------------------------------------------|
| ~int64_t~ | ~aord_num~ | in | The number of a coeffecients | | ~uninitialized~ | ~int32_t~ | in | Keeps bit set for uninitialized data |
| ~int64_t~ | ~bord_num~ | in | The number of b coeffecients | | ~aord_num~ | ~int64_t~ | in | The number of a coeffecients |
| ~int64_t~ | ~cord_num~ | in | The number of c coeffecients | | ~bord_num~ | ~int64_t~ | in | The number of b coeffecients |
| ~int64_t~ | ~type_nucl_num~ | in | Number of Nucleii types | | ~cord_num~ | ~int64_t~ | in | The number of c coeffecients |
| ~int64_t~ | ~type_nucl_vector[nucl_num]~ | in | IDs of types of Nucleii | | ~type_nucl_num~ | ~int64_t~ | in | Number of Nucleii types |
| ~double~ | ~aord_vector[aord_num + 1][type_nucl_num]~ | in | Order of a polynomial coefficients | | ~type_nucl_vector~ | ~int64_t[nucl_num]~ | in | IDs of types of Nucleii |
| ~double~ | ~bord_vector[bord_num + 1]~ | in | Order of b polynomial coefficients | | ~aord_vector~ | ~double[aord_num + 1][type_nucl_num]~ | in | Order of a polynomial coefficients |
| ~double~ | ~cord_vector[cord_num][type_nucl_num]~ | in | Order of c polynomial coefficients | | ~bord_vector~ | ~double[bord_num + 1]~ | in | Order of b polynomial coefficients |
| ~double~ | ~factor_ee[walk_num]~ | out | Jastrow factor: electron-electron part | | ~cord_vector~ | ~double[cord_num][type_nucl_num]~ | in | Order of c polynomial coefficients |
| ~uint64_t~ | ~factor_ee_date~ | out | Jastrow factor: electron-electron part | | ~factor_ee~ | ~double[walk_num]~ | out | Jastrow factor: electron-electron part |
| ~double~ | ~factor_en[walk_num]~ | out | Jastrow factor: electron-nucleus part | | ~factor_ee_date~ | ~uint64_t~ | out | Jastrow factor: electron-electron part |
| ~uint64_t~ | ~factor_en_date~ | out | Jastrow factor: electron-nucleus part | | ~factor_en~ | ~double[walk_num]~ | out | Jastrow factor: electron-nucleus part |
| ~double~ | ~factor_een[walk_num]~ | out | Jastrow factor: electron-electron-nucleus part | | ~factor_en_date~ | ~uint64_t~ | out | Jastrow factor: electron-nucleus part |
| ~uint64_t~ | ~factor_een_date~ | out | Jastrow factor: electron-electron-nucleus part | | ~factor_een~ | ~double[walk_num]~ | out | Jastrow factor: electron-electron-nucleus part |
| ~double~ | ~factor_ee_deriv_e[4][nelec][walk_num]~ | out | Derivative of the Jastrow factor: electron-electron-nucleus part | | ~factor_een_date~ | ~uint64_t~ | out | Jastrow factor: electron-electron-nucleus part |
| ~uint64_t~ | ~factor_ee_deriv_e_date~ | out | Keep track of the date for the derivative | | ~factor_ee_deriv_e~ | ~double[4][nelec][walk_num]~ | out | Derivative of the Jastrow factor: electron-electron-nucleus part |
| ~double~ | ~factor_en_deriv_e[4][nelec][walk_num]~ | out | Derivative of the Jastrow factor: electron-electron-nucleus part | | ~factor_ee_deriv_e_date~ | ~uint64_t~ | out | Keep track of the date for the derivative |
| ~uint64_t~ | ~factor_en_deriv_e_date~ | out | Keep track of the date for the en derivative | | ~factor_en_deriv_e~ | ~double[4][nelec][walk_num]~ | out | Derivative of the Jastrow factor: electron-electron-nucleus part |
| ~double~ | ~factor_een_deriv_e[4][nelec][walk_num]~ | out | Derivative of the Jastrow factor: electron-electron-nucleus part | | ~factor_en_deriv_e_date~ | ~uint64_t~ | out | Keep track of the date for the en derivative |
| ~uint64_t~ | ~factor_een_deriv_e_date~ | out | Keep track of the date for the een derivative | | ~factor_een_deriv_e~ | ~double[4][nelec][walk_num]~ | out | Derivative of the Jastrow factor: electron-electron-nucleus part |
| ~factor_een_deriv_e_date~ | ~uint64_t~ | out | Keep track of the date for the een derivative |
computed data: computed data:
|------------+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------| | Variable | Type | In/Out | Description |
| ~int64_t~ | ~dim_cord_vect~ | Number of unique C coefficients | |------------+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------|
| ~uint64_t~ | ~dim_cord_vect_date~ | Number of unique C coefficients | | ~dim_cord_vect~ | ~int64_t~ | Number of unique C coefficients | |
| ~double~ | ~asymp_jasb[2]~ | Asymptotic component | | ~dim_cord_vect_date~ | ~uint64_t~ | Number of unique C coefficients | |
| ~uint64_t~ | ~asymp_jasb_date~ | Asymptotic component | | ~asymp_jasb~ | ~double[2]~ | Asymptotic component | |
| ~double~ | ~cord_vect_full[dim_cord_vect][nucl_num]~ | vector of non-zero coefficients | | ~asymp_jasb_date~ | ~uint64_t~ | Asymptotic component | |
| ~uint64_t~ | ~cord_vect_full_date~ | Keep track of changes here | | ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | vector of non-zero coefficients | |
| ~int64_t~ | ~lkpm_combined_index[4][dim_cord_vect]~ | Transform l,k,p, and m into consecutive indices | | ~cord_vect_full_date~ | ~uint64_t~ | Keep track of changes here | |
| ~uint64_t~ | ~lkpm_combined_index_date~ | Transform l,k,p, and m into consecutive indices | | ~lkpm_combined_index~ | ~int64_t[4][dim_cord_vect]~ | Transform l,k,p, and m into consecutive indices | |
| ~double~ | ~tmp_c[elec_num][nucl_num][ncord + 1][ncord][walk_num]~ | vector of non-zero coefficients | | ~lkpm_combined_index_date~ | ~uint64_t~ | Transform l,k,p, and m into consecutive indices | |
| ~double~ | ~dtmp_c[elec_num][4][nucl_num][ncord + 1][ncord][walk_num]~ | vector of non-zero coefficients | | ~tmp_c~ | ~double[elec_num][nucl_num][ncord + 1][ncord][walk_num]~ | vector of non-zero coefficients | |
| ~double~ | ~een_rescaled_e[walk_num][elec_num][elec_num][0:cord_num]~ | The electron-electron rescaled distances raised to the powers defined by cord | | ~dtmp_c~ | ~double[elec_num][4][nucl_num][ncord + 1][ncord][walk_num]~ | vector of non-zero coefficients | |
| ~uint64_t~ | ~een_rescaled_e_date~ | Keep track of the date of creation | | ~een_rescaled_e~ | ~double[walk_num][elec_num][elec_num][0:cord_num]~ | The electron-electron rescaled distances raised to the powers defined by cord | |
| ~double~ | ~een_rescaled_n[walk_num][elec_num][nucl_num][0:cord_num]~ | The electron-electron rescaled distances raised to the powers defined by cord | | ~een_rescaled_e_date~ | ~uint64_t~ | Keep track of the date of creation | |
| ~uint64_t~ | ~een_rescaled_n_date~ | Keep track of the date of creation | | ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | The electron-electron rescaled distances raised to the powers defined by cord | |
| ~double~ | ~een_rescaled_e_deriv_e[walk_num][elec_num][4][elec_num][0:cord_num]~ | The electron-electron rescaled distances raised to the powers defined by cord derivatives wrt electrons | | ~een_rescaled_n_date~ | ~uint64_t~ | Keep track of the date of creation | |
| ~uint64_t~ | ~een_rescaled_e_deriv_e_date~ | Keep track of the date of creation | | ~een_rescaled_e_deriv_e~ | ~double[walk_num][elec_num][4][elec_num][0:cord_num]~ | The electron-electron rescaled distances raised to the powers defined by cord derivatives wrt electrons | |
| ~double~ | ~een_rescaled_n_deriv_e[walk_num][elec_num][4][nucl_num][0:cord_num]~ | The electron-electron rescaled distances raised to the powers defined by cord derivatives wrt electrons | | ~een_rescaled_e_deriv_e_date~ | ~uint64_t~ | Keep track of the date of creation | |
| ~uint64_t~ | ~een_rescaled_n_deriv_e_date~ | Keep track of the date of creation | | ~een_rescaled_n_deriv_e~ | ~double[walk_num][elec_num][4][nucl_num][0:cord_num]~ | The electron-electron rescaled distances raised to the powers defined by cord derivatives wrt electrons | |
| ~een_rescaled_n_deriv_e_date~ | ~uint64_t~ | Keep track of the date of creation | |
For H2O we have the following data: For H2O we have the following data:
@ -1282,11 +1284,13 @@ qmckl_exit_code qmckl_provide_asymp_jasb(qmckl_context context)
:END: :END:
#+NAME: qmckl_asymp_jasb_args #+NAME: qmckl_asymp_jasb_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | bord_num | in | Number of electrons | |---------------------------+----------------------+--------+-----------------------------|
| double | bord_vector[bord_num + 1] | in | Number of walkers | | ~context~ | ~qmckl_context~ | in | Global state |
| double | rescale_factor_kappa_ee | in | Electron coordinates | | ~bord_num~ | ~int64_t~ | in | Number of electrons |
| double | asymp_jasb[2] | out | Electron-electron distances | | ~bord_vector~ | ~double[bord_num+1]~ | in | Number of walkers |
| ~rescale_factor_kappa_ee~ | ~double~ | in | Electron coordinates |
| ~asymp_jasb~ | ~double[2]~ | out | Electron-electron distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_asymp_jasb_f(context, bord_num, bord_vector, rescale_factor_kappa_ee, asymp_jasb) & integer function qmckl_compute_asymp_jasb_f(context, bord_num, bord_vector, rescale_factor_kappa_ee, asymp_jasb) &
@ -1544,15 +1548,17 @@ qmckl_exit_code qmckl_provide_factor_ee(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_ee_args #+NAME: qmckl_factor_ee_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |------------------------+----------------------------------------+--------+-----------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | up_num | in | Number of alpha electrons | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| int64_t | bord_num | in | Number of coefficients | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | bord_vector[bord_num + 1] | in | List of coefficients | | ~up_num~ | ~int64_t~ | in | Number of alpha electrons |
| double | ee_distance_rescaled[walk_num][elec_num][elec_num] | in | Electron-electron distances | | ~bord_num~ | ~int64_t~ | in | Number of coefficients |
| double | asymp_jasb[2] | in | Electron-electron distances | | ~bord_vector~ | ~double[bord_num+1]~ | in | List of coefficients |
| double | factor_ee[walk_num] | out | Electron-electron distances | | ~ee_distance_rescaled~ | ~double[walk_num][elec_num][elec_num]~ | in | Electron-electron distances |
| ~asymp_jasb~ | ~double[2]~ | in | Electron-electron distances |
| ~factor_ee~ | ~double[walk_num]~ | out | Electron-electron distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_factor_ee_f(context, walk_num, elec_num, up_num, bord_num, & integer function qmckl_compute_factor_ee_f(context, walk_num, elec_num, up_num, bord_num, &
@ -1848,16 +1854,18 @@ qmckl_exit_code qmckl_provide_factor_ee_deriv_e(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_ee_deriv_e_args #+NAME: qmckl_factor_ee_deriv_e_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |--------------------------------+-------------------------------------------+--------+-----------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | up_num | in | Number of alpha electrons | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| int64_t | bord_num | in | Number of coefficients | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | bord_vector[bord_num + 1] | in | List of coefficients | | ~up_num~ | ~int64_t~ | in | Number of alpha electrons |
| double | ee_distance_rescaled[walk_num][elec_num][elec_num] | in | Electron-electron distances | | ~bord_num~ | ~int64_t~ | in | Number of coefficients |
| double | ee_distance_rescaled_deriv_e[walk_num][4][elec_num][elec_num] | in | Electron-electron distances | | ~bord_vector~ | ~double[bord_num+1]~ | in | List of coefficients |
| double | asymp_jasb[2] | in | Electron-electron distances | | ~ee_distance_rescaled~ | ~double[walk_num][elec_num][elec_num]~ | in | Electron-electron distances |
| double | factor_ee_deriv_e[walk_num][4][elec_num] | out | Electron-electron distances | | ~ee_distance_rescaled_deriv_e~ | ~double[walk_num][4][elec_num][elec_num]~ | in | Electron-electron distances |
| ~asymp_jasb~ | ~double[2]~ | in | Electron-electron distances |
| ~factor_ee_deriv_e~ | ~double[walk_num][4][elec_num]~ | out | Electron-electron distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_factor_ee_deriv_e_f(context, walk_num, elec_num, up_num, bord_num, & integer function qmckl_compute_factor_ee_deriv_e_f(context, walk_num, elec_num, up_num, bord_num, &
@ -2254,16 +2262,18 @@ qmckl_exit_code qmckl_provide_factor_en(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_en_args #+NAME: qmckl_factor_en_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |------------------------+----------------------------------------+--------+----------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | nucl_num | in | Number of nucleii | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| int64_t | type_nucl_num | in | Number of unique nuclei | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| int64_t | type_nucl_vector[nucl_num] | in | IDs of unique nucleii | | ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
| int64_t | aord_num | in | Number of coefficients | | ~type_nucl_num~ | ~int64_t~ | in | Number of unique nuclei |
| double | aord_vector[aord_num + 1][type_nucl_num] | in | List of coefficients | | ~type_nucl_vector~ | ~int64_t[nucl_num]~ | in | IDs of unique nucleii |
| double | en_distance_rescaled[walk_num][nucl_num][elec_num] | in | Electron-nucleus distances | | ~aord_num~ | ~int64_t~ | in | Number of coefficients |
| double | factor_en[walk_num] | out | Electron-nucleus jastrow | | ~aord_vector~ | ~double[aord_num+1][type_nucl_num]~ | in | List of coefficients |
| ~en_distance_rescaled~ | ~double[walk_num][nucl_num][elec_num]~ | in | Electron-nucleus distances |
| ~factor_en~ | ~double[walk_num]~ | out | Electron-nucleus jastrow |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_factor_en_f(context, walk_num, elec_num, nucl_num, type_nucl_num, & integer function qmckl_compute_factor_en_f(context, walk_num, elec_num, nucl_num, type_nucl_num, &
@ -2549,17 +2559,19 @@ qmckl_exit_code qmckl_provide_factor_en_deriv_e(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_en_deriv_e_args #+NAME: qmckl_factor_en_deriv_e_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |--------------------------------+-------------------------------------------+--------+---------------------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | nucl_num | in | Number of nucleii | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| int64_t | type_nucl_num | in | Number of unique nuclei | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| int64_t | type_nucl_vector[nucl_num] | in | IDs of unique nucleii | | ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
| int64_t | aord_num | in | Number of coefficients | | ~type_nucl_num~ | ~int64_t~ | in | Number of unique nuclei |
| double | aord_vector[aord_num + 1][type_nucl_num] | in | List of coefficients | | ~type_nucl_vector~ | ~int64_t[nucl_num]~ | in | IDs of unique nucleii |
| double | en_distance_rescaled[walk_num][nucl_num][elec_num] | in | Electron-nucleus distances | | ~aord_num~ | ~int64_t~ | in | Number of coefficients |
| double | en_distance_rescaled_deriv_e[walk_num][4][nucl_num][elec_num] | in | Electron-nucleus distance derivatives | | ~aord_vector~ | ~double[aord_num+1][type_nucl_num]~ | in | List of coefficients |
| double | factor_en_deriv_e[walk_num][4][elec_num] | out | Electron-nucleus jastrow | | ~en_distance_rescaled~ | ~double[walk_num][nucl_num][elec_num]~ | in | Electron-nucleus distances |
| ~en_distance_rescaled_deriv_e~ | ~double[walk_num][4][nucl_num][elec_num]~ | in | Electron-nucleus distance derivatives |
| ~factor_en_deriv_e~ | ~double[walk_num][4][elec_num]~ | out | Electron-nucleus jastrow |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_factor_en_deriv_e_f(context, walk_num, elec_num, nucl_num, type_nucl_num, & integer function qmckl_compute_factor_en_deriv_e_f(context, walk_num, elec_num, nucl_num, type_nucl_num, &
@ -2949,13 +2961,15 @@ qmckl_exit_code qmckl_provide_een_rescaled_e(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_een_rescaled_e_args #+NAME: qmckl_factor_een_rescaled_e_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |---------------------------+----------------------------------------------------+--------+--------------------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | cord_num | in | Order of polynomials | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| double | rescale_factor_kappa_ee | in | Factor to rescale ee distances | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | ee_distance[walk_num][elec_num][elec_num] | in | Electron-electron distances | | ~cord_num~ | ~int64_t~ | in | Order of polynomials |
| double | een_rescaled_e[walk_num][elec_num][elec_num][0:cord_num] | out | Electron-electron rescaled distances | | ~rescale_factor_kappa_ee~ | ~double~ | in | Factor to rescale ee distances |
| ~ee_distance~ | ~double[walk_num][elec_num][elec_num]~ | in | Electron-electron distances |
| ~een_rescaled_e~ | ~double[walk_num][elec_num][elec_num][0:cord_num]~ | out | Electron-electron rescaled distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_een_rescaled_e_f(context, walk_num, elec_num, cord_num, rescale_factor_kappa_ee, & integer function qmckl_compute_een_rescaled_e_f(context, walk_num, elec_num, cord_num, rescale_factor_kappa_ee, &
@ -3269,15 +3283,17 @@ qmckl_exit_code qmckl_provide_een_rescaled_e_deriv_e(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_een_rescaled_e_deriv_e_args #+NAME: qmckl_factor_een_rescaled_e_deriv_e_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |---------------------------+-------------------------------------------------------+--------+--------------------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | cord_num | in | Order of polynomials | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| double | rescale_factor_kappa_ee | in | Factor to rescale ee distances | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | coord_new[walk_num][3][elec_num] | in | Electron coordinates | | ~cord_num~ | ~int64_t~ | in | Order of polynomials |
| double | ee_distance[walk_num][elec_num][elec_num] | in | Electron-electron distances | | ~rescale_factor_kappa_ee~ | ~double~ | in | Factor to rescale ee distances |
| double | een_rescaled_e[walk_num][elec_num][elec_num][0:cord_num] | in | Electron-electron distances | | ~coord_new~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
| double | een_rescaled_e_deriv_e[walk_num][elec_num][4][elec_num][0:cord_num] | out | Electron-electron rescaled distances | | ~ee_distance~ | ~double[walk_num][elec_num][elec_num]~ | in | Electron-electron distances |
| ~een_rescaled_e~ | ~double[walk_num][elec_num][elec_num][0:cord_num]~ | in | Electron-electron distances |
| ~een_rescaled_e_deriv_e~ | ~double[walk_num][elec_num][4][elec_num][0:cord_num]~ | out | Electron-electron rescaled distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_factor_een_rescaled_e_deriv_e_f(context, walk_num, elec_num, cord_num, rescale_factor_kappa_ee, & integer function qmckl_compute_factor_een_rescaled_e_deriv_e_f(context, walk_num, elec_num, cord_num, rescale_factor_kappa_ee, &
@ -3626,14 +3642,16 @@ qmckl_exit_code qmckl_provide_een_rescaled_n(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_een_rescaled_n_args #+NAME: qmckl_factor_een_rescaled_n_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |---------------------------+----------------------------------------------------+--------+-------------------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | nucl_num | in | Number of atoms | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| int64_t | cord_num | in | Order of polynomials | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | rescale_factor_kappa_en | in | Factor to rescale ee distances | | ~nucl_num~ | ~int64_t~ | in | Number of atoms |
| double | en_distance[walk_num][elec_num][nucl_num] | in | Electron-nucleus distances | | ~cord_num~ | ~int64_t~ | in | Order of polynomials |
| double | een_rescaled_n[walk_num][elec_num][nucl_num][0:cord_num] | out | Electron-nucleus rescaled distances | | ~rescale_factor_kappa_en~ | ~double~ | in | Factor to rescale ee distances |
| ~en_distance~ | ~double[walk_num][elec_num][nucl_num]~ | in | Electron-nucleus distances |
| ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | out | Electron-nucleus rescaled distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_een_rescaled_n_f(context, walk_num, elec_num, nucl_num, cord_num, rescale_factor_kappa_en, & integer function qmckl_compute_een_rescaled_n_f(context, walk_num, elec_num, nucl_num, cord_num, rescale_factor_kappa_en, &
@ -3930,17 +3948,19 @@ qmckl_exit_code qmckl_provide_een_rescaled_n_deriv_e(qmckl_context context)
:END: :END:
#+NAME: qmckl_compute_factor_een_rescaled_n_deriv_e_args #+NAME: qmckl_compute_factor_een_rescaled_n_deriv_e_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |---------------------------+-------------------------------------------------------+--------+-------------------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | nucl_num | in | Number of atoms | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| int64_t | cord_num | in | Order of polynomials | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| double | rescale_factor_kappa_en | in | Factor to rescale ee distances | | ~nucl_num~ | ~int64_t~ | in | Number of atoms |
| double | coord_new[walk_num][3][elec_num] | in | Electron coordinates | | ~cord_num~ | ~int64_t~ | in | Order of polynomials |
| double | coord[3][nucl_num] | in | Nuclear coordinates | | ~rescale_factor_kappa_en~ | ~double~ | in | Factor to rescale ee distances |
| double | en_distance[walk_num][elec_num][nucl_num] | in | Electron-nucleus distances | | ~coord_new~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
| double | een_rescaled_n[walk_num][elec_num][nucl_num][0:cord_num] | in | Electron-nucleus distances | | ~coord~ | ~double[3][nucl_num]~ | in | Nuclear coordinates |
| double | een_rescaled_n_deriv_e[walk_num][elec_num][4][nucl_num][0:cord_num] | out | Electron-nucleus rescaled distances | | ~en_distance~ | ~double[walk_num][elec_num][nucl_num]~ | in | Electron-nucleus distances |
| ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | in | Electron-nucleus distances |
| ~een_rescaled_n_deriv_e~ | ~double[walk_num][elec_num][4][nucl_num][0:cord_num]~ | out | Electron-nucleus rescaled distances |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_factor_een_rescaled_n_deriv_e_f(context, walk_num, elec_num, nucl_num, & integer function qmckl_compute_factor_een_rescaled_n_deriv_e_f(context, walk_num, elec_num, nucl_num, &
@ -4409,9 +4429,11 @@ qmckl_exit_code qmckl_provide_lkpm_combined_index(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_dim_cord_vect_args #+NAME: qmckl_factor_dim_cord_vect_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | cord_num | in | Order of polynomials | |-----------------+-----------------+--------+-----------------------------------|
| int64_t | dim_cord_vect | out | dimension of cord_vect_full table | | ~context~ | ~qmckl_context~ | in | Global state |
| ~cord_num~ | ~int64_t~ | in | Order of polynomials |
| ~dim_cord_vect~ | ~int64_t~ | out | dimension of cord_vect_full table |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_dim_cord_vect_f(context, cord_num, dim_cord_vect) & integer function qmckl_compute_dim_cord_vect_f(context, cord_num, dim_cord_vect) &
@ -4496,14 +4518,16 @@ end function qmckl_compute_dim_cord_vect_f
:END: :END:
#+NAME: qmckl_factor_cord_vect_full_args #+NAME: qmckl_factor_cord_vect_full_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | nucl_num | in | Number of atoms | |--------------------+----------------------------------------+--------+------------------------------|
| int64_t | dim_cord_vect | in | dimension of cord full table | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | type_nucl_num | in | dimension of cord full table | | ~nucl_num~ | ~int64_t~ | in | Number of atoms |
| int64_t | type_nucl_vector[nucl_num] | in | dimension of cord full table | | ~dim_cord_vect~ | ~int64_t~ | in | dimension of cord full table |
| double | cord_vector[dim_cord_vect][type_nucl_num] | in | dimension of cord full table | | ~type_nucl_num~ | ~int64_t~ | in | dimension of cord full table |
| double | cord_vect_full[dim_cord_vect][nucl_num] | out | Full list of coefficients | | ~type_nucl_vector~ | ~int64_t[nucl_num]~ | in | dimension of cord full table |
| ~cord_vector~ | ~double[dim_cord_vect][type_nucl_num]~ | in | dimension of cord full table |
| ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | out | Full list of coefficients |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_cord_vect_full_f(context, nucl_num, dim_cord_vect, type_nucl_num, & integer function qmckl_compute_cord_vect_full_f(context, nucl_num, dim_cord_vect, type_nucl_num, &
type_nucl_vector, cord_vector, cord_vect_full) & type_nucl_vector, cord_vector, cord_vect_full) &
@ -4599,10 +4623,12 @@ end function qmckl_compute_cord_vect_full_f
:END: :END:
#+NAME: qmckl_factor_lkpm_combined_index_args #+NAME: qmckl_factor_lkpm_combined_index_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | cord_num | in | Order of polynomials | |-----------------------+-----------------------------+--------+-------------------------------|
| int64_t | dim_cord_vect | in | dimension of cord full table | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | lpkm_combined_index[4][dim_cord_vect] | out | Full list of combined indices | | ~cord_num~ | ~int64_t~ | in | Order of polynomials |
| ~dim_cord_vect~ | ~int64_t~ | in | dimension of cord full table |
| ~lpkm_combined_index~ | ~int64_t[4][dim_cord_vect]~ | out | Full list of combined indices |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_lkpm_combined_index_f(context, cord_num, dim_cord_vect, & integer function qmckl_compute_lkpm_combined_index_f(context, cord_num, dim_cord_vect, &
@ -4887,18 +4913,20 @@ qmckl_exit_code qmckl_provide_factor_een(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_een_args #+NAME: qmckl_factor_een_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |-----------------------+----------------------------------------------------+--------+--------------------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | nucl_num | in | Number of nucleii | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| int64_t | cord_num | in | order of polynomials | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| int64_t | dim_cord_vect | in | dimension of full coefficient vector | | ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
| double | cord_vect_full[dim_cord_vect][nucl_num] | in | full coefficient vector | | ~cord_num~ | ~int64_t~ | in | order of polynomials |
| int64_t | lkpm_combined_index[4][dim_cord_vect] | in | combined indices | | ~dim_cord_vect~ | ~int64_t~ | in | dimension of full coefficient vector |
| double | een_rescaled_e[walk_num][elec_num][elec_num][0:cord_num] | in | Electron-nucleus rescaled | | ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | in | full coefficient vector |
| double | een_rescaled_n[walk_num][elec_num][nucl_num][0:cord_num] | in | Electron-nucleus rescaled factor | | ~lkpm_combined_index~ | ~int64_t[4][dim_cord_vect]~ | in | combined indices |
| double | factor_een[walk_num] | out | Electron-nucleus jastrow | | ~een_rescaled_e~ | ~double[walk_num][elec_num][elec_num][0:cord_num]~ | in | Electron-nucleus rescaled |
| ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | in | Electron-nucleus rescaled factor |
| ~factor_een~ | ~double[walk_num]~ | out | Electron-nucleus jastrow |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_factor_een_f(context, walk_num, elec_num, nucl_num, cord_num, dim_cord_vect, & integer function qmckl_compute_factor_een_f(context, walk_num, elec_num, nucl_num, cord_num, dim_cord_vect, &
cord_vect_full, lkpm_combined_index, & cord_vect_full, lkpm_combined_index, &
@ -5218,19 +5246,21 @@ qmckl_exit_code qmckl_provide_factor_een_deriv_e(qmckl_context context)
:END: :END:
#+NAME: qmckl_factor_een_deriv_e_args #+NAME: qmckl_factor_een_deriv_e_args
| qmckl_context | context | in | Global state | | Variable | Type | In/Out | Description |
| int64_t | walk_num | in | Number of walkers | |--------------------------+-------------------------------------------------------+--------+--------------------------------------|
| int64_t | elec_num | in | Number of electrons | | ~context~ | ~qmckl_context~ | in | Global state |
| int64_t | nucl_num | in | Number of nucleii | | ~walk_num~ | ~int64_t~ | in | Number of walkers |
| int64_t | cord_num | in | order of polynomials | | ~elec_num~ | ~int64_t~ | in | Number of electrons |
| int64_t | dim_cord_vect | in | dimension of full coefficient vector | | ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
| double | cord_vect_full[dim_cord_vect][nucl_num] | in | full coefficient vector | | ~cord_num~ | ~int64_t~ | in | order of polynomials |
| int64_t | lkpm_combined_index[4][dim_cord_vect] | in | combined indices | | ~dim_cord_vect~ | ~int64_t~ | in | dimension of full coefficient vector |
| double | een_rescaled_e[walk_num][elec_num][elec_num][0:cord_num] | in | Electron-nucleus rescaled | | ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | in | full coefficient vector |
| double | een_rescaled_n[walk_num][elec_num][nucl_num][0:cord_num] | in | Electron-nucleus rescaled factor | | ~lkpm_combined_index~ | ~int64_t[4][dim_cord_vect]~ | in | combined indices |
| double | een_rescaled_e_deriv_e[walk_num][elec_num][4][elec_num][0:cord_num] | in | Electron-nucleus rescaled | | ~een_rescaled_e~ | ~double[walk_num][elec_num][elec_num][0:cord_num]~ | in | Electron-nucleus rescaled |
| double | een_rescaled_n_deriv_e[walk_num][elec_num][4][nucl_num][0:cord_num] | in | Electron-nucleus rescaled factor | | ~een_rescaled_n~ | ~double[walk_num][elec_num][nucl_num][0:cord_num]~ | in | Electron-nucleus rescaled factor |
| double | factor_een_deriv_e[walk_num][4][elec_num] | out | Electron-nucleus jastrow | | ~een_rescaled_e_deriv_e~ | ~double[walk_num][elec_num][4][elec_num][0:cord_num]~ | in | Electron-nucleus rescaled |
| ~een_rescaled_n_deriv_e~ | ~double[walk_num][elec_num][4][nucl_num][0:cord_num]~ | in | Electron-nucleus rescaled factor |
| ~factor_een_deriv_e~ | ~double[walk_num][4][elec_num]~ | out | Electron-nucleus jastrow |
#+begin_src f90 :comments org :tangle (eval f) :noweb yes #+begin_src f90 :comments org :tangle (eval f) :noweb yes
integer function qmckl_compute_factor_een_deriv_e_f(context, walk_num, elec_num, nucl_num, cord_num, dim_cord_vect, & integer function qmckl_compute_factor_een_deriv_e_f(context, walk_num, elec_num, nucl_num, cord_num, dim_cord_vect, &

View File

@ -625,45 +625,45 @@ rc = qmckl_set_ao_basis_prim_num (context, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_nucleus_index (context, nucleus_index); rc = qmckl_set_ao_basis_nucleus_index (context, nucleus_index, nucl_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_nucleus_shell_num (context, nucleus_shell_num); rc = qmckl_set_ao_basis_nucleus_shell_num (context, nucleus_shell_num, nucl_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_ang_mom (context, shell_ang_mom); rc = qmckl_set_ao_basis_shell_ang_mom (context, shell_ang_mom, chbrclf_shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_factor (context, shell_factor); rc = qmckl_set_ao_basis_shell_factor (context, shell_factor, chbrclf_shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_prim_num (context, shell_prim_num); rc = qmckl_set_ao_basis_shell_prim_num (context, shell_prim_num, chbrclf_shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_prim_index (context, shell_prim_index); rc = qmckl_set_ao_basis_shell_prim_index (context, shell_prim_index, chbrclf_shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_exponent (context, exponent); rc = qmckl_set_ao_basis_exponent (context, exponent, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_coefficient (context, coefficient); rc = qmckl_set_ao_basis_coefficient (context, coefficient, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_prim_factor (context, prim_factor); rc = qmckl_set_ao_basis_prim_factor (context, prim_factor, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
rc = qmckl_set_ao_basis_ao_num(context, chbrclf_ao_num); rc = qmckl_set_ao_basis_ao_num(context, chbrclf_ao_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
rc = qmckl_set_ao_basis_ao_factor (context, ao_factor); rc = qmckl_set_ao_basis_ao_factor (context, ao_factor, chbrclf_ao_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(qmckl_ao_basis_provided(context)); assert(qmckl_ao_basis_provided(context));
@ -671,7 +671,8 @@ assert(qmckl_ao_basis_provided(context));
double ao_vgl[5][walk_num][elec_num][chbrclf_ao_num]; double ao_vgl[5][walk_num][elec_num][chbrclf_ao_num];
rc = qmckl_get_ao_vgl(context, &(ao_vgl[0][0][0][0])); rc = qmckl_get_ao_basis_ao_vgl(context, &(ao_vgl[0][0][0][0]),
(int64_t) 5*walk_num*elec_num*chbrclf_ao_num);
assert (rc == QMCKL_SUCCESS); assert (rc == QMCKL_SUCCESS);
/* Set up MO data */ /* Set up MO data */

View File

@ -761,45 +761,45 @@ rc = qmckl_set_ao_basis_prim_num (context, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_nucleus_index (context, nucleus_index); rc = qmckl_set_ao_basis_nucleus_index (context, nucleus_index, nucl_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_nucleus_shell_num (context, nucleus_shell_num); rc = qmckl_set_ao_basis_nucleus_shell_num (context, nucleus_shell_num, nucl_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_ang_mom (context, shell_ang_mom); rc = qmckl_set_ao_basis_shell_ang_mom (context, shell_ang_mom, chbrclf_shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_factor (context, shell_factor); rc = qmckl_set_ao_basis_shell_factor (context, shell_factor, chbrclf_shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_prim_num (context, shell_prim_num); rc = qmckl_set_ao_basis_shell_prim_num (context, shell_prim_num, chbrclf_shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_shell_prim_index (context, shell_prim_index); rc = qmckl_set_ao_basis_shell_prim_index (context, shell_prim_index, chbrclf_shell_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_exponent (context, exponent); rc = qmckl_set_ao_basis_exponent (context, exponent, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_coefficient (context, coefficient); rc = qmckl_set_ao_basis_coefficient (context, coefficient, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(!qmckl_ao_basis_provided(context)); assert(!qmckl_ao_basis_provided(context));
rc = qmckl_set_ao_basis_prim_factor (context, prim_factor); rc = qmckl_set_ao_basis_prim_factor (context, prim_factor, chbrclf_prim_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
rc = qmckl_set_ao_basis_ao_num(context, chbrclf_ao_num); rc = qmckl_set_ao_basis_ao_num(context, chbrclf_ao_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
rc = qmckl_set_ao_basis_ao_factor (context, ao_factor); rc = qmckl_set_ao_basis_ao_factor (context, ao_factor, chbrclf_ao_num);
assert(rc == QMCKL_SUCCESS); assert(rc == QMCKL_SUCCESS);
assert(qmckl_ao_basis_provided(context)); assert(qmckl_ao_basis_provided(context));
@ -807,7 +807,8 @@ assert(qmckl_ao_basis_provided(context));
double ao_vgl[5][walk_num][elec_num][chbrclf_ao_num]; double ao_vgl[5][walk_num][elec_num][chbrclf_ao_num];
rc = qmckl_get_ao_vgl(context, &(ao_vgl[0][0][0][0])); rc = qmckl_get_ao_basis_ao_vgl(context, &(ao_vgl[0][0][0][0]),
(int64_t) 5*walk_num*elec_num*chbrclf_ao_num);
assert (rc == QMCKL_SUCCESS); assert (rc == QMCKL_SUCCESS);
/* Set up MO data */ /* Set up MO data */

View File

@ -11,7 +11,6 @@ qmckl_local_energy.org
qmckl_memory.org qmckl_memory.org
qmckl_mo.org qmckl_mo.org
qmckl_numprec.org qmckl_numprec.org
qmckl_distance.org
qmckl_nucleus.org qmckl_nucleus.org
qmckl_sherman_morrison_woodbury.org qmckl_sherman_morrison_woodbury.org
qmckl_utils.org qmckl_utils.org

View File

@ -59,8 +59,6 @@ ctypeid_d = { '' : ''
, 'qmckl_exit_code' : 'integer(c_int32_t)' , 'qmckl_exit_code' : 'integer(c_int32_t)'
, 'integer' : 'integer(c_int32_t)' , 'integer' : 'integer(c_int32_t)'
, 'integer*8' : 'integer(c_int64_t)' , 'integer*8' : 'integer(c_int64_t)'
, 'integer' : 'integer(c_uint32_t)'
, 'integer*8' : 'integer(c_uint64_t)'
, 'real' : 'real(c_float)' , 'real' : 'real(c_float)'
, 'real*8' : 'real(c_double)' , 'real*8' : 'real(c_double)'
, 'character' : 'character(c_char)' , 'character' : 'character(c_char)'