mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-08-19 03:41:44 +02:00
Merge branch 'TREX-CoE-master'
This commit is contained in:
commit
b1699d58c9
5
.github/workflows/test-build.yml
vendored
5
.github/workflows/test-build.yml
vendored
@ -23,6 +23,11 @@ jobs:
|
||||
make -j 8
|
||||
make -j check
|
||||
make distcheck
|
||||
- name: Archive test log file
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: test-suite.log
|
||||
path: test-suite.log
|
||||
|
||||
# x86_macos:
|
||||
#
|
||||
|
@ -57,7 +57,7 @@ test_qmckl_f = tests/qmckl_f.f90
|
||||
test_qmckl_fo = tests/qmckl_f.o
|
||||
src_qmckl_f = src/qmckl_f.f90
|
||||
src_qmckl_fo = src/qmckl_f.o
|
||||
header_tests = tests/chbrclf.h
|
||||
header_tests = tests/chbrclf.h tests/n2.h
|
||||
|
||||
fortrandir = $(datadir)/$(PACKAGE_NAME)/fortran/
|
||||
dist_fortran_DATA = $(qmckl_f)
|
||||
@ -177,6 +177,7 @@ $(htmlize_el):
|
||||
|
||||
tests/chbrclf.h: $(qmckl_h)
|
||||
|
||||
tests/n2.h: $(qmckl_h)
|
||||
|
||||
generated.mk: $(ORG_FILES)
|
||||
$(PYTHON) $(srcdir)/tools/build_makefile.py
|
||||
|
15
configure.ac
15
configure.ac
@ -98,7 +98,6 @@ AC_CHECK_LIB([pthread], [pthread_create])
|
||||
# CFLAGS="${CFLAGS} ${OPENMP_CFLAGS}"
|
||||
#fi
|
||||
|
||||
|
||||
## BLAS
|
||||
#AX_BLAS([], [AC_MSG_ERROR([BLAS was not found.])])
|
||||
|
||||
@ -244,13 +243,13 @@ ${PACKAGE_NAME} Version ${PACKAGE_VERSION} ${QMCKL_DEVEL}
|
||||
|
||||
Prefix: '${prefix}'.
|
||||
|
||||
CC..........: ${CC}
|
||||
CPPFLAGS....: ${CPPFLAGS}
|
||||
CFLAGS......: ${CFLAGS}
|
||||
FC..........: ${FC}
|
||||
FCLAGS......: ${FCFLAGS}
|
||||
LDFLAGS:....: ${LDFLAGS}
|
||||
LIBS........: ${LIBS}
|
||||
CC..............: ${CC}
|
||||
CPPFLAGS........: ${CPPFLAGS}
|
||||
CFLAGS..........: ${CFLAGS}
|
||||
FC..............: ${FC}
|
||||
FCLAGS..........: ${FCFLAGS}
|
||||
LDFLAGS:........: ${LDFLAGS}
|
||||
LIBS............: ${LIBS}
|
||||
|
||||
Package features:
|
||||
${ARGS}
|
||||
|
1222
org/qmckl_ao.org
1222
org/qmckl_ao.org
File diff suppressed because it is too large
Load Diff
@ -31,6 +31,7 @@ int main() {
|
||||
#include "qmckl_nucleus_private_type.h"
|
||||
#include "qmckl_electron_private_type.h"
|
||||
#include "qmckl_ao_private_type.h"
|
||||
#include "qmckl_jastrow_private_type.h"
|
||||
#include "qmckl_nucleus_private_func.h"
|
||||
#include "qmckl_electron_private_func.h"
|
||||
#include "qmckl_ao_private_func.h"
|
||||
@ -118,6 +119,7 @@ typedef struct qmckl_context_struct {
|
||||
qmckl_nucleus_struct nucleus;
|
||||
qmckl_electron_struct electron;
|
||||
qmckl_ao_basis_struct ao_basis;
|
||||
qmckl_jastrow_struct jastrow;
|
||||
|
||||
/* To be implemented:
|
||||
qmckl_mo_struct mo;
|
||||
|
@ -1004,7 +1004,7 @@ integer function qmckl_distance_rescaled_f(context, transa, transb, m, n, &
|
||||
|
||||
if (transb == 'N' .or. transb == 'n') then
|
||||
continue
|
||||
else if (transa == 'T' .or. transa == 't') then
|
||||
else if (transb == 'T' .or. transb == 't') then
|
||||
transab = transab + 2
|
||||
else
|
||||
transab = -100
|
||||
|
@ -63,30 +63,29 @@ int main() {
|
||||
|
||||
The following data stored in the context:
|
||||
|
||||
| ~uninitialized~ | ~int32_t~ | Keeps bit set for uninitialized data |
|
||||
| ~num~ | ~int64_t~ | Total number of electrons |
|
||||
| ~up_num~ | ~int64_t~ | Number of up-spin electrons |
|
||||
| ~down_num~ | ~int64_t~ | Number of down-spin electrons |
|
||||
| ~walk_num~ | ~int64_t~ | Number of walkers |
|
||||
| ~rescale_factor_kappa_ee~ | ~double~ | The distance scaling factor |
|
||||
| ~rescale_factor_kappa_en~ | ~double~ | The distance scaling factor |
|
||||
| ~provided~ | ~bool~ | If true, ~electron~ is valid |
|
||||
| ~coord_new~ | ~double[walk_num][3][num]~ | New set of electron coordinates |
|
||||
| ~coord_old~ | ~double[walk_num][3][num]~ | Old set of electron coordinates |
|
||||
| ~coord_new_date~ | ~uint64_t~ | Last modification date of the coordinates |
|
||||
| ~ee_distance~ | ~double[walk_num][num][num]~ | Electron-electron distances |
|
||||
| ~ee_distance_date~ | ~uint64_t~ | Last modification date of the electron-electron distances |
|
||||
| ~en_distance~ | ~double[walk_num][nucl_num][num]~ | Electron-nucleus distances |
|
||||
| ~en_distance_date~ | ~uint64_t~ | Last modification date of the electron-electron distances |
|
||||
| ~ee_distance_rescaled~ | ~double[walk_num][num][num]~ | Electron-electron rescaled distances |
|
||||
| ~ee_distance_rescaled_date~ | ~uint64_t~ | Last modification date of the electron-electron distances |
|
||||
| ~ee_distance_rescaled_deriv_e~ | ~double[walk_num][4][num][num]~ | Electron-electron rescaled distances derivatives |
|
||||
| ~ee_distance_rescaled_deriv_e_date~ | ~uint64_t~ | Last modification date of the electron-electron distance derivatives |
|
||||
| ~en_distance_rescaled~ | ~double[walk_num][nucl_num][num]~ | Electron-nucleus distances |
|
||||
| ~en_distance_rescaled_date~ | ~uint64_t~ | Last modification date of the electron-electron distances |
|
||||
| ~en_distance_rescaled_deriv_e~ | ~double[walk_num][4][num][num]~ | Electron-electron rescaled distances derivatives |
|
||||
| ~en_distance_rescaled_deriv_e_date~ | ~uint64_t~ | Last modification date of the electron-electron distance derivatives |
|
||||
|
||||
| ~uninitialized~ | ~int32_t~ | Keeps bit set for uninitialized data |
|
||||
| ~num~ | ~int64_t~ | Total number of electrons |
|
||||
| ~up_num~ | ~int64_t~ | Number of up-spin electrons |
|
||||
| ~down_num~ | ~int64_t~ | Number of down-spin electrons |
|
||||
| ~walk_num~ | ~int64_t~ | Number of walkers |
|
||||
| ~rescale_factor_kappa_ee~ | ~double~ | The distance scaling factor |
|
||||
| ~rescale_factor_kappa_en~ | ~double~ | The distance scaling factor |
|
||||
| ~provided~ | ~bool~ | If true, ~electron~ is valid |
|
||||
| ~coord_new~ | ~double[walk_num][3][num]~ | New set of electron coordinates |
|
||||
| ~coord_old~ | ~double[walk_num][3][num]~ | Old set of electron coordinates |
|
||||
| ~coord_new_date~ | ~uint64_t~ | Last modification date of the coordinates |
|
||||
| ~ee_distance~ | ~double[walk_num][num][num]~ | Electron-electron distances |
|
||||
| ~ee_distance_date~ | ~uint64_t~ | Last modification date of the electron-electron distances |
|
||||
| ~en_distance~ | ~double[walk_num][nucl_num][num]~ | Electron-nucleus distances |
|
||||
| ~en_distance_date~ | ~uint64_t~ | Last modification date of the electron-electron distances |
|
||||
| ~ee_distance_rescaled~ | ~double[walk_num][num][num]~ | Electron-electron rescaled distances |
|
||||
| ~ee_distance_rescaled_date~ | ~uint64_t~ | Last modification date of the electron-electron distances |
|
||||
| ~ee_distance_rescaled_deriv_e~ | ~double[walk_num][4][num][num]~ | Electron-electron rescaled distances derivatives |
|
||||
| ~ee_distance_rescaled_deriv_e_date~ | ~uint64_t~ | Last modification date of the electron-electron distance derivatives |
|
||||
| ~en_distance_rescaled~ | ~double[walk_num][nucl_num][num]~ | Electron-nucleus distances |
|
||||
| ~en_distance_rescaled_date~ | ~uint64_t~ | Last modification date of the electron-electron distances |
|
||||
| ~en_distance_rescaled_deriv_e~ | ~double[walk_num][4][nucl_num][num]~ | Electron-electron rescaled distances derivatives |
|
||||
| ~en_distance_rescaled_deriv_e_date~ | ~uint64_t~ | Last modification date of the electron-electron distance derivatives |
|
||||
|
||||
** Data structure
|
||||
|
||||
@ -860,6 +859,20 @@ for (int64_t i=0 ; i<3*elec_num ; ++i) {
|
||||
qmckl_exit_code qmckl_get_electron_ee_distance(qmckl_context context, double* const distance);
|
||||
#+end_src
|
||||
|
||||
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
|
||||
interface
|
||||
integer(c_int32_t) function qmckl_get_electron_ee_distance(context, distance) &
|
||||
bind(C)
|
||||
use, intrinsic :: iso_c_binding
|
||||
import
|
||||
implicit none
|
||||
integer (c_int64_t) , intent(in) , value :: context
|
||||
real (c_double ) , intent(out) :: distance(*)
|
||||
end function
|
||||
end interface
|
||||
#+end_src
|
||||
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
qmckl_exit_code qmckl_get_electron_ee_distance(qmckl_context context, double* const distance)
|
||||
{
|
||||
@ -1552,7 +1565,6 @@ rc = qmckl_get_electron_ee_distance_rescaled_deriv_e(context, ee_distance_rescal
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
** Electron-nucleus distances
|
||||
|
||||
*** Get
|
||||
@ -1561,6 +1573,19 @@ rc = qmckl_get_electron_ee_distance_rescaled_deriv_e(context, ee_distance_rescal
|
||||
qmckl_exit_code qmckl_get_electron_en_distance(qmckl_context context, double* distance);
|
||||
#+end_src
|
||||
|
||||
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
|
||||
interface
|
||||
integer(c_int32_t) function qmckl_get_electron_en_distance(context, distance) &
|
||||
bind(C)
|
||||
use, intrinsic :: iso_c_binding
|
||||
import
|
||||
implicit none
|
||||
integer (c_int64_t) , intent(in) , value :: context
|
||||
real (c_double ) , intent(out) :: distance(*)
|
||||
end function
|
||||
end interface
|
||||
#+end_src
|
||||
|
||||
#+begin_src c :comments org :tangle (eval c) :noweb yes :exports none
|
||||
qmckl_exit_code qmckl_get_electron_en_distance(qmckl_context context, double* distance)
|
||||
{
|
||||
@ -2113,12 +2138,12 @@ assert(fabs(en_distance_rescaled[1][0][1] - 0.9584331688679852) < 1.e-12);
|
||||
The rescaled distances which is given as $R = (1 - \exp{-\kappa r})/\kappa$
|
||||
needs to be perturbed with respect to the nuclear coordinates.
|
||||
This data is stored in the ~en_distance_rescaled_deriv_e~ tensor. The
|
||||
The first three elements of this three index tensor ~[4][num][num]~ gives the
|
||||
The first three elements of this three index tensor ~[4][nucl_num][elec_num]~ gives the
|
||||
derivatives in the x, y, and z directions $dx, dy, dz$ and the last index
|
||||
gives the Laplacian $\partial x^2 + \partial y^2 + \partial z^2$.
|
||||
|
||||
*** Get
|
||||
|
||||
|
||||
#+begin_src c :comments org :tangle (eval h_func) :noweb yes
|
||||
qmckl_exit_code qmckl_get_electron_en_distance_rescaled_deriv_e(qmckl_context context, double* distance_rescaled_deriv_e);
|
||||
#+end_src
|
||||
|
5508
org/qmckl_jastrow.org
Normal file
5508
org/qmckl_jastrow.org
Normal file
File diff suppressed because it is too large
Load Diff
@ -38,7 +38,7 @@ Br -1.218470 -0.187436 -0.028227
|
||||
#+END_example
|
||||
|
||||
Nuclear coordinates are stored in atomic units in transposed format.
|
||||
|
||||
|
||||
#+begin_src c :tangle ../tests/chbrclf.h
|
||||
#define chbrclf_nucl_num ((int64_t) 5)
|
||||
|
||||
@ -526,15 +526,16 @@ F 1
|
||||
#+begin_src c :tangle ../tests/chbrclf.h
|
||||
#define chbrclf_shell_num 72
|
||||
#define chbrclf_prim_num 297
|
||||
#define chbrclf_ao_num 263
|
||||
|
||||
int64_t chbrclf_basis_nucleus_index[chbrclf_nucl_num] = {0, 14, 23, 27, 53};
|
||||
int64_t chbrclf_basis_nucleus_index[chbrclf_nucl_num] = {0, 14, 23, 37, 53};
|
||||
|
||||
int64_t chbrclf_basis_nucleus_shell_num[chbrclf_nucl_num] = {14, 9, 14, 16, 19};
|
||||
|
||||
int32_t chbrclf_basis_shell_ang_mom[chbrclf_shell_num] =
|
||||
{0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1, 1, 2, 2, 0,
|
||||
{0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1, 1, 2, 2, 0,
|
||||
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
|
||||
2, 2, 2, 3, 3, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3};
|
||||
2, 2, 2, 3, 3, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3};
|
||||
|
||||
int64_t chbrclf_basis_shell_prim_num[chbrclf_shell_num] =
|
||||
{10, 10, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 10,
|
||||
@ -553,7 +554,38 @@ double chbrclf_basis_shell_factor[chbrclf_shell_num] =
|
||||
{1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.};
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.};
|
||||
|
||||
double chbrclf_basis_ao_factor[chbrclf_ao_num] =
|
||||
{1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
|
||||
1., 1., 1.};
|
||||
|
||||
int64_t chbrclf_basis_ao_shell[chbrclf_ao_num] =
|
||||
{0, 1, 2, 3, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10,
|
||||
10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13,
|
||||
13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 16, 17, 18, 18, 18, 19, 19, 19, 20,
|
||||
20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 23, 24, 25, 26, 27, 28,
|
||||
28, 28, 29, 29, 29, 30, 30, 30, 31, 31, 31, 32, 32, 32, 32, 32, 32, 33, 33, 33,
|
||||
33, 33, 33, 34, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36,
|
||||
36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 38, 39, 40, 41, 42, 43, 43, 43, 44, 44,
|
||||
44, 45, 45, 45, 46, 46, 46, 47, 47, 47, 48, 48, 48, 48, 48, 48, 49, 49, 49, 49,
|
||||
49, 49, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 52, 52,
|
||||
52, 52, 52, 52, 52, 52, 52, 52, 53, 54, 55, 56, 57, 58, 59, 60, 60, 60, 61, 61,
|
||||
61, 62, 62, 62, 63, 63, 63, 64, 64, 64, 65, 65, 65, 66, 66, 66, 66, 66, 66, 67,
|
||||
67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 70, 70, 70,
|
||||
70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71};
|
||||
|
||||
double chbrclf_basis_exponent[chbrclf_prim_num] =
|
||||
{8.2360000000000000e+03, 1.2350000000000000e+03, 2.8080000000000001e+02,
|
||||
@ -1013,3 +1045,159 @@ double chbrclf_elec_coord[chbrclf_walk_num][chbrclf_elec_num][3] = { {
|
||||
|
||||
|
||||
#+END_src
|
||||
|
||||
|
||||
* N2
|
||||
|
||||
This test is mainly for the Jastrow factor and was supplied by
|
||||
Ramon Panades Baruetta. The coordinates and Jastrow coefficients
|
||||
have been taken from his fork of IRPJast. The core electrons are
|
||||
treated by pseudopotentials thus excluded from the actual calculation.
|
||||
|
||||
| Number of atoms | 2 |
|
||||
| Number of alpha electrons | 5 |
|
||||
| Number of beta electrons | 5 |
|
||||
| Number of core electrons | 4 |
|
||||
|
||||
** XYZ coordinates
|
||||
|
||||
#+BEGIN_example
|
||||
2
|
||||
N2
|
||||
N 0.000000 0.000000 0.000000
|
||||
N 0.000000 0.000000 2.059801
|
||||
#+END_example
|
||||
|
||||
Nuclear coordinates are stored in atomic units in transposed format.
|
||||
|
||||
#+begin_src c :tangle ../tests/n2.h
|
||||
#define n2_nucl_num ((int64_t) 2)
|
||||
|
||||
double n2_charge[n2_nucl_num] = { 5., 5.};
|
||||
|
||||
double n2_nucl_coord[3][n2_nucl_num] =
|
||||
{ {0.000000, 0.000000 },
|
||||
{0.000000, 0.000000 },
|
||||
{0.000000, 2.059801 } };
|
||||
#+end_src
|
||||
|
||||
** Electron coordinates
|
||||
|
||||
|
||||
Electron coordinates are stored in atomic units in normal format.
|
||||
|
||||
#+begin_src c :tangle ../tests/n2.h
|
||||
#define n2_elec_up_num ((int64_t) 5)
|
||||
#define n2_elec_dn_num ((int64_t) 5)
|
||||
#define n2_elec_num ((int64_t) 10)
|
||||
#define n2_walk_num ((int64_t) 1)
|
||||
|
||||
double n2_elec_coord[n2_walk_num][n2_elec_num][3] = { {
|
||||
{-0.250655104764153 , 0.503070975550133 , -0.166554344502303},
|
||||
{-0.587812193472177 , -0.128751981129274 , 0.187773606533075},
|
||||
{ 1.61335569047166 , -0.615556732874863 , -1.43165470979934 },
|
||||
{-4.901239896295210E-003 , -1.120440036458986E-002 , 1.99761909330422 },
|
||||
{ 0.766647499681200 , -0.293515395797937 , 3.66454589201239 },
|
||||
{-0.127732483187947 , -0.138975497694196 , -8.669850480215846E-002},
|
||||
{-0.232271834949124 , -1.059321673434182E-002 , -0.504862241464867},
|
||||
{ 1.09360863531826 , -2.036103063808752E-003 , -2.702796910818986E-002},
|
||||
{-0.108090166832043 , 0.189161729653261 , 2.15398313919894},
|
||||
{ 0.397978144318712 , -0.254277292595981 , 2.54553335476344}}};
|
||||
|
||||
#+end_src
|
||||
|
||||
** Jastrow related data
|
||||
|
||||
This test is mainly for the Jastrow factor and was supplied by
|
||||
Ramon Panades Baruetta.
|
||||
|
||||
#+begin_src c :tangle ../tests/n2.h
|
||||
/* Jastrow related */
|
||||
|
||||
#define n2_type_nucl_num ((int64_t) 1)
|
||||
#define n2_aord_num ((int64_t) 5)
|
||||
#define n2_bord_num ((int64_t) 5)
|
||||
#define n2_cord_num ((int64_t) 23)
|
||||
#define n2_dim_cord_vec ((int64_t) 23)
|
||||
|
||||
int64_t n2_type_nucl_vector[n2_nucl_num] = {
|
||||
1,
|
||||
1};
|
||||
|
||||
double n2_aord_vector[n2_aord_num + 1][n2_type_nucl_num] = {
|
||||
{ 0. },
|
||||
{ 0. },
|
||||
{-0.380512},
|
||||
{-0.157996},
|
||||
{-0.031558},
|
||||
{ 0.021512}};
|
||||
|
||||
double n2_bord_vector[n2_bord_num + 1] = {
|
||||
0.5 ,
|
||||
0.15366 ,
|
||||
0.0672262 ,
|
||||
0.02157 ,
|
||||
0.0073096 ,
|
||||
0.002866 };
|
||||
|
||||
double n2_cord_vector[n2_cord_num][n2_type_nucl_num] = {
|
||||
{ 5.717020e-01},
|
||||
{-5.142530e-01},
|
||||
{-5.130430e-01},
|
||||
{ 9.486000e-03},
|
||||
{-4.205000e-03},
|
||||
{ 4.263258e-01},
|
||||
{ 8.288150e-02},
|
||||
{ 5.118600e-03},
|
||||
{-2.997800e-03},
|
||||
{-5.270400e-03},
|
||||
{-7.500000e-05},
|
||||
{-8.301650e-02},
|
||||
{ 1.454340e-02},
|
||||
{ 5.143510e-02},
|
||||
{ 9.250000e-04},
|
||||
{-4.099100e-03},
|
||||
{ 4.327600e-03},
|
||||
{-1.654470e-03},
|
||||
{ 2.614000e-03},
|
||||
{-1.477000e-03},
|
||||
{-1.137000e-03},
|
||||
{-4.010475e-02},
|
||||
{ 6.106710e-03}};
|
||||
|
||||
double n2_cord_vector_full[n2_dim_cord_vec][n2_nucl_num] = {
|
||||
{ 5.717020e-01, 5.717020e-01},
|
||||
{-5.142530e-01, -5.142530e-01},
|
||||
{-5.130430e-01, -5.130430e-01},
|
||||
{ 9.486000e-03, 9.486000e-03},
|
||||
{-4.205000e-03, -4.205000e-03},
|
||||
{ 4.263258e-01, 4.263258e-01},
|
||||
{ 8.288150e-02, 8.288150e-02},
|
||||
{ 5.118600e-03, 5.118600e-03},
|
||||
{-2.997800e-03, -2.997800e-03},
|
||||
{-5.270400e-03, -5.270400e-03},
|
||||
{-7.500000e-05, -7.500000e-05},
|
||||
{-8.301650e-02, -8.301650e-02},
|
||||
{ 1.454340e-02, 1.454340e-02},
|
||||
{ 5.143510e-02, 5.143510e-02},
|
||||
{ 9.250000e-04, 9.250000e-04},
|
||||
{-4.099100e-03, -4.099100e-03},
|
||||
{ 4.327600e-03, 4.327600e-03},
|
||||
{-1.654470e-03, -1.654470e-03},
|
||||
{ 2.614000e-03, 2.614000e-03},
|
||||
{-1.477000e-03, -1.477000e-03},
|
||||
{-1.137000e-03, -1.137000e-03},
|
||||
{-4.010475e-02, -4.010475e-02},
|
||||
{ 6.106710e-03, 6.106710e-03}};
|
||||
|
||||
double n2_lkpm_of_cindex[4][n2_dim_cord_vec] = {
|
||||
{1, 1, 2, 0, 0, 0, 2, 1, 1, 2, 3, 0, 2, 1, 3, 0, 0, 1, 3, 1, 1, 0, 3},
|
||||
{1, 1, 3, 4, 0, 2, 2, 4, 0, 0, 2, 4, 1, 3, 1, 4, 0, 1, 1, 4, 1, 2, 0},
|
||||
{4, 1, 0, 0, 4, 2, 1, 4, 5, 0, 2, 3, 5, 0, 0, 3, 5, 1, 3, 2, 5, 0, 1},
|
||||
{2, 5, 1, 4, 1, 5, 0, 2, 1, 5, 1, 0, 1, 5, 2, 3, 0, 5, 1, 1, 0, 5, 2}};
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
# -*- mode: org -*-
|
||||
# vim: syntax=c
|
||||
|
@ -6,6 +6,7 @@ qmckl_numprec.org
|
||||
qmckl_nucleus.org
|
||||
qmckl_electron.org
|
||||
qmckl_ao.org
|
||||
qmckl_jastrow.org
|
||||
qmckl_distance.org
|
||||
qmckl_utils.org
|
||||
qmckl_tests.org
|
||||
|
@ -43,29 +43,29 @@ cat << EOF > ${OUTPUT}
|
||||
* ------------------------------------------
|
||||
* QMCkl - Quantum Monte Carlo kernel library
|
||||
* ------------------------------------------
|
||||
*
|
||||
*
|
||||
* Documentation : https://trex-coe.github.io/qmckl
|
||||
* Issues : https://github.com/trex-coe/qmckl/issues
|
||||
*
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2020, TREX Center of Excellence
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
@ -76,15 +76,19 @@ cat << EOF > ${OUTPUT}
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __QMCKL_H__
|
||||
#define __QMCKL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
@ -92,7 +96,7 @@ EOF
|
||||
|
||||
for i in ${HEADERS}
|
||||
do
|
||||
header=${srcdir}/src/$i
|
||||
header=${srcdir}/src/$i
|
||||
if [[ -f $header ]] ; then
|
||||
echo "/* $header */" >> ${OUTPUT}
|
||||
cat $header >> ${OUTPUT}
|
||||
@ -100,6 +104,9 @@ do
|
||||
done
|
||||
|
||||
cat << EOF >> ${OUTPUT}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
|
||||
|
@ -96,7 +96,6 @@ def parse_table(table):
|
||||
return result
|
||||
#+END_SRC
|
||||
|
||||
|
||||
*** Generates a C header
|
||||
|
||||
#+NAME: generate_c_header
|
||||
@ -124,13 +123,11 @@ for d in parse_table(table):
|
||||
results += [ f" {const}{c_type} {name}" ]
|
||||
|
||||
results=',\n'.join(results)
|
||||
template = f"""{rettyp} {fname} (
|
||||
{results} ); """
|
||||
template = f"""{rettyp} {fname} (\n{results} ); """
|
||||
return template
|
||||
|
||||
#+END_SRC
|
||||
|
||||
|
||||
*** Generates a C interface to the Fortran function
|
||||
|
||||
#+NAME: generate_c_interface
|
||||
@ -259,3 +256,4 @@ return results
|
||||
#+begin_src f90 :tangle (eval fh_func) :comments org :exports none
|
||||
#+end_src
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user