mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-08 20:33:40 +01:00
Merge branch 'TREX-CoE:master' into master
This commit is contained in:
commit
7ee0b74e6a
5
.github/workflows/test-build.yml
vendored
5
.github/workflows/test-build.yml
vendored
@ -20,8 +20,9 @@ jobs:
|
||||
|
||||
- name: Install trexio
|
||||
run: |
|
||||
export VERSION=1.1.0
|
||||
wget https://github.com/TREX-CoE/trexio/releases/download/v${VERSION}/trexio-${VERSION}.tar.gz
|
||||
export TAG=v2.1.0
|
||||
export VERSION=2.1.0
|
||||
wget https://github.com/TREX-CoE/trexio/releases/download/${TAG}/trexio-${VERSION}.tar.gz
|
||||
tar -zxf trexio-${VERSION}.tar.gz
|
||||
cd trexio-${VERSION}
|
||||
./configure --prefix=/usr
|
||||
|
2
.github/workflows/vfc_test_workflow.yml
vendored
2
.github/workflows/vfc_test_workflow.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
- name: Install trexio
|
||||
run: |
|
||||
export VERSION=1.1.0
|
||||
export VERSION=2.1.0
|
||||
wget https://github.com/TREX-CoE/trexio/releases/download/v${VERSION}/trexio-${VERSION}.tar.gz
|
||||
tar -zxf trexio-${VERSION}.tar.gz
|
||||
cd trexio-${VERSION}
|
||||
|
28
Makefile.am
28
Makefile.am
@ -64,7 +64,7 @@ AM_CPPFLAGS += -DQMCKL_TEST_DIR=\"$(QMCKL_TEST_DIR)\"
|
||||
|
||||
|
||||
lib_LTLIBRARIES = src/libqmckl.la
|
||||
src_libqmckl_la_SOURCES = $(qmckl_h) $(src_qmckl_f) $(C_FILES) $(F_FILES) $(H_PRIVATE_FUNC_FILES) $(H_PRIVATE_TYPE_FILES) $(header_tests)
|
||||
src_libqmckl_la_SOURCES = $(qmckl_h) $(src_qmckl_f) $(C_FILES) $(F_FILES) $(H_PRIVATE_FUNC_FILES) $(H_PRIVATE_TYPE_FILES)
|
||||
|
||||
CLEANFILES+=$(test_qmckl_fo) $(src_qmckl_fo) $(test_qmckl_o) $(src_qmckl_o) $(FH_TYPE_FILES) $(FH_FUNC_FILES)
|
||||
|
||||
@ -76,20 +76,17 @@ ln_s_verbose = $(ln_s_verbose_@AM_V@)
|
||||
ln_s_verbose_ = $(ln_s_verbose_@AM_DEFAULT_V@)
|
||||
ln_s_verbose_0 = @echo " LN_S $<";
|
||||
|
||||
htmldir = share/doc/qmckl/html
|
||||
textdir = share/doc/qmckl/text
|
||||
htmlize_el=$(htmldir)/htmlize.el
|
||||
htmldir = $(docdir)/html
|
||||
textdir = $(docdir)/text
|
||||
htmldir_loc = share/doc/qmckl/html
|
||||
textdir_loc = share/doc/qmckl/text
|
||||
htmlize_el = $(htmldir_loc)/htmlize.el
|
||||
dist_html_DATA = $(HTML_FILES) \
|
||||
$(htmldir)/index.html \
|
||||
$(htmldir)/qmckl.css
|
||||
share/doc/qmckl/html/qmckl.css \
|
||||
share/doc/qmckl/html/index.html
|
||||
|
||||
dist_text_DATA = $(TEXT_FILES)
|
||||
|
||||
$(htmldir)/index.html: $(htmldir)/README.html
|
||||
$(ln_s_verbose)cd $(htmldir)/ && \
|
||||
rm -rf index.html && \
|
||||
$(LN_S) README.html index.html
|
||||
|
||||
|
||||
html-local: $(dist_html_DATA)
|
||||
text: $(dist_text_DATA)
|
||||
@ -99,16 +96,15 @@ doc: html text
|
||||
|
||||
if QMCKL_DEVEL
|
||||
|
||||
|
||||
if VFC_CI
|
||||
AM_LDFLAGS=-lvfc_probes -lvfc_probes_f
|
||||
endif
|
||||
|
||||
dist_src_DATA = $(ORG_FILES) $(TANGLED_FILES) $(EXPORTED_FILES) $(test_qmckl_f)
|
||||
EXTRA_DIST += $(ORG_FILES) $(TANGLED_FILES) $(EXPORTED_FILES) $(test_qmckl_f)
|
||||
|
||||
BUILT_SOURCES = $(C_FILES) $(F_FILES) $(FH_FUNC_FILES) $(FH_TYPE_FILES) $(H_FUNC_FILES) $(H_TYPE_FILES) $(H_PRIVATE_FUNC_FILES) $(H_PRIVATE_TYPE_FILES) $(src_qmckl_f) $(test_qmckl_f) $(qmckl_h) $(header_tests)
|
||||
|
||||
CLEANFILES += $(BUILT_SOURCES) $(C_TEST_FILES) $(F_TEST_FILES) $(TANGLED_FILES) $(C_TEST_FILES) $(F_TEST_FILES) $(src_qmckl_f) $(test_qmckl_f) $(qmckl_h) $(HTML_FILES) $(TEXT_FILES) $(htmldir)/index.html $(EXPORTED_FILES) $(header_tests)
|
||||
CLEANFILES += $(BUILT_SOURCES) $(C_TEST_FILES) $(F_TEST_FILES) $(TANGLED_FILES) $(C_TEST_FILES) $(F_TEST_FILES) $(src_qmckl_f) $(test_qmckl_f) $(qmckl_h) $(HTML_FILES) $(TEXT_FILES) $(EXPORTED_FILES) $(header_tests)
|
||||
|
||||
EXTRA_DIST += \
|
||||
tools/build_doc.sh \
|
||||
@ -156,8 +152,8 @@ $(src_qmckl_f): $(FH_FUNC_FILES) $(FH_TYPE_FILES)
|
||||
$(cat_h_verbose)top_builddir=$(abs_top_builddir) srcdir=$(abs_srcdir) src_qmckl_f=$(src_qmckl_f) $(srcdir)/tools/build_qmckl_f.sh
|
||||
|
||||
$(htmlize_el):
|
||||
$(MKDIR_P) $(htmldir)
|
||||
$(MKDIR_P) $(textdir)
|
||||
$(MKDIR_P) $(htmldir_loc)
|
||||
$(MKDIR_P) $(textdir_loc)
|
||||
abs_srcdir=$(abs_srcdir) $(srcdir)/tools/install_htmlize.sh $(htmlize_el)
|
||||
|
||||
tests/chbrclf.h: $(qmckl_h)
|
||||
|
@ -75,6 +75,7 @@ AC_PROG_CC
|
||||
m4_version_prereq([2.70],[], [AC_PROG_CC_C99])
|
||||
AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [AC_MSG_ERROR([The compiler does not support C99])])
|
||||
AC_PROG_CC_C_O
|
||||
AC_PROG_F77
|
||||
AC_PROG_FC
|
||||
AC_PROG_FC_C_O
|
||||
AC_FC_SRCEXT([f90])
|
||||
|
@ -16,23 +16,25 @@ grep TITLE $(cat table_of_contents) | tr ':' ' '
|
||||
#+end_src
|
||||
|
||||
#+RESULTS: toc
|
||||
| qmckl.org | #+TITLE | Introduction | | |
|
||||
| qmckl_error.org | #+TITLE | Error | handling | |
|
||||
| qmckl_context.org | #+TITLE | Context | | |
|
||||
| qmckl_memory.org | #+TITLE | Memory | management | |
|
||||
| qmckl_numprec.org | #+TITLE | Numerical | precision | |
|
||||
| qmckl_distance.org | #+TITLE | Inter-particle | distances | |
|
||||
| qmckl_nucleus.org | #+TITLE | Nucleus | | |
|
||||
| qmckl_electron.org | #+TITLE | Electrons | | |
|
||||
| qmckl_ao.org | #+TITLE | Atomic | Orbitals | |
|
||||
| qmckl_mo.org | #+TITLE | Molecular | Orbitals | |
|
||||
| qmckl_jastrow.org | #+TITLE | Jastrow | Factor | |
|
||||
| qmckl_sherman_morrison_woodbury.org | #+TITLE | Sherman-Morrison-Woodbury | | |
|
||||
| qmckl_utils.org | #+TITLE | Utility | functions | |
|
||||
| qmckl_blas.org | #+TITLE | BLAS | functions | |
|
||||
| qmckl_trexio.org | #+TITLE | TREXIO | I/O | library |
|
||||
| qmckl_verificarlo.org | #+TITLE | Verificarlo | CI | |
|
||||
| qmckl_tests.org | #+TITLE | Data | for | Tests |
|
||||
| qmckl.org | #+TITLE | Introduction | | |
|
||||
| qmckl_ao.org | #+TITLE | Atomic | Orbitals | |
|
||||
| qmckl_blas.org | #+TITLE | BLAS | functions | |
|
||||
| qmckl_context.org | #+TITLE | Context | | |
|
||||
| qmckl_determinant.org | #+TITLE | Slater | Determinant | |
|
||||
| qmckl_distance.org | #+TITLE | Inter-particle | distances | |
|
||||
| qmckl_electron.org | #+TITLE | Electrons | | |
|
||||
| qmckl_error.org | #+TITLE | Error | handling | |
|
||||
| qmckl_jastrow.org | #+TITLE | Jastrow | Factor | |
|
||||
| qmckl_local_energy.org | #+TITLE | Local | Energy | |
|
||||
| qmckl_memory.org | #+TITLE | Memory | management | |
|
||||
| qmckl_mo.org | #+TITLE | Molecular | Orbitals | |
|
||||
| qmckl_numprec.org | #+TITLE | Numerical | precision | |
|
||||
| qmckl_nucleus.org | #+TITLE | Nucleus | | |
|
||||
| qmckl_sherman_morrison_woodbury.org | #+TITLE | Sherman-Morrison-Woodbury | | |
|
||||
| qmckl_utils.org | #+TITLE | Utility | functions | |
|
||||
| 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
|
||||
result = []
|
||||
@ -45,19 +47,21 @@ return '\n'.join(result)
|
||||
|
||||
#+RESULTS:
|
||||
- [[./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_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_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_utils.html][Utility functions]]
|
||||
- [[./qmckl_blas.html][BLAS functions]]
|
||||
- [[./qmckl_trexio.html][TREXIO I/O library]]
|
||||
- [[./qmckl_verificarlo.html][Verificarlo CI]]
|
||||
- [[./qmckl_tests.html][Data for Tests]]
|
||||
|
4458
org/qmckl_ao.org
4458
org/qmckl_ao.org
File diff suppressed because it is too large
Load Diff
1263
org/qmckl_blas.org
1263
org/qmckl_blas.org
File diff suppressed because it is too large
Load Diff
@ -557,6 +557,7 @@ qmckl_exit_code qmckl_finalize_determinant(qmckl_context context) {
|
||||
"qmckl_finalize_determinant",
|
||||
NULL);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
#+end_src
|
||||
|
||||
@ -841,16 +842,18 @@ qmckl_exit_code qmckl_provide_det_vgl_beta(qmckl_context context) {
|
||||
:END:
|
||||
|
||||
#+NAME: qmckl_compute_det_vgl_alpha_args
|
||||
| ~qmckl_context~ | ~context~ | in | Global state |
|
||||
| ~int64_t~ | ~det_num_alpha~ | in | Number of determinants |
|
||||
| ~int64_t~ | ~walk_num~ | in | Number of walkers |
|
||||
| ~int64_t~ | ~alpha_num~ | in | Number of electrons |
|
||||
| ~int64_t~ | ~beta_num~ | in | Number of electrons |
|
||||
| ~int64_t~ | ~elec_num~ | in | Number of electrons |
|
||||
| ~int64_t~ | ~mo_index_alpha[det_num_alpha][walk_num][alpha_num]~ | in | MO indices for electrons |
|
||||
| ~int64_t~ | ~mo_num~ | in | Number of MOs |
|
||||
| ~double~ | ~mo_vgl[5][elec_num][mo_num]~ | in | Value, gradients and Laplacian of the MOs |
|
||||
| ~double~ | ~det_vgl_alpha[det_num_alpha][walk_num][5][alpha_num][alpha_num]~ | out | Value, gradients and Laplacian of the Det |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|------------------+------------------------------------------------------------+--------+-------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~det_num_alpha~ | ~int64_t~ | in | Number of determinants |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~alpha_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~beta_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~mo_index_alpha~ | ~int64_t[det_num_alpha][walk_num][alpha_num]~ | in | MO indices for electrons |
|
||||
| ~mo_num~ | ~int64_t~ | in | Number of MOs |
|
||||
| ~mo_vgl~ | ~double[5][elec_num][mo_num]~ | in | Value, gradients and Laplacian of the MOs |
|
||||
| ~det_vgl_alpha~ | ~double[det_num_alpha][walk_num][5][alpha_num][alpha_num]~ | out | Value, gradients and Laplacian of the Det |
|
||||
|
||||
#+begin_src f90 :comments org :tangle (eval f) :noweb yes
|
||||
integer function qmckl_compute_det_vgl_alpha_f(context, &
|
||||
@ -916,20 +919,20 @@ end function qmckl_compute_det_vgl_alpha_f
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_header(table=qmckl_compute_det_vgl_alpha_args,rettyp=get_value("CRetType"),fname="qmckl_compute_det_vgl_alpha"))
|
||||
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src c :tangle (eval h_func) :comments org
|
||||
qmckl_exit_code qmckl_compute_det_vgl_alpha (
|
||||
const qmckl_context context,
|
||||
const int64_t det_num_alpha,
|
||||
const int64_t walk_num,
|
||||
const int64_t alpha_num,
|
||||
const int64_t beta_num,
|
||||
const int64_t elec_num,
|
||||
const int64_t* mo_index_alpha,
|
||||
const int64_t mo_num,
|
||||
const double* mo_vgl,
|
||||
double* const det_vgl_alpha );
|
||||
const qmckl_context context,
|
||||
const int64_t det_num_alpha,
|
||||
const int64_t walk_num,
|
||||
const int64_t alpha_num,
|
||||
const int64_t beta_num,
|
||||
const int64_t elec_num,
|
||||
const int64_t* mo_index_alpha,
|
||||
const int64_t mo_num,
|
||||
const double* mo_vgl,
|
||||
double* const det_vgl_alpha );
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_compute_det_vgl_alpha_args,rettyp=get_value("CRetType"),fname="qmckl_compute_det_vgl_alpha"))
|
||||
@ -937,17 +940,17 @@ end function qmckl_compute_det_vgl_alpha_f
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
||||
integer(c_int32_t) function qmckl_compute_det_vgl_alpha &
|
||||
(context, &
|
||||
det_num_alpha, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
beta_num, &
|
||||
elec_num, &
|
||||
mo_index_alpha, &
|
||||
mo_num, &
|
||||
mo_vgl, &
|
||||
det_vgl_alpha) &
|
||||
bind(C) result(info)
|
||||
(context, &
|
||||
det_num_alpha, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
beta_num, &
|
||||
elec_num, &
|
||||
mo_index_alpha, &
|
||||
mo_num, &
|
||||
mo_vgl, &
|
||||
det_vgl_alpha) &
|
||||
bind(C) result(info)
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
implicit none
|
||||
@ -965,16 +968,16 @@ end function qmckl_compute_det_vgl_alpha_f
|
||||
|
||||
integer(c_int32_t), external :: qmckl_compute_det_vgl_alpha_f
|
||||
info = qmckl_compute_det_vgl_alpha_f &
|
||||
(context, &
|
||||
det_num_alpha, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
beta_num, &
|
||||
elec_num, &
|
||||
mo_index_alpha, &
|
||||
mo_num, &
|
||||
mo_vgl, &
|
||||
det_vgl_alpha)
|
||||
(context, &
|
||||
det_num_alpha, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
beta_num, &
|
||||
elec_num, &
|
||||
mo_index_alpha, &
|
||||
mo_num, &
|
||||
mo_vgl, &
|
||||
det_vgl_alpha)
|
||||
|
||||
end function qmckl_compute_det_vgl_alpha
|
||||
#+end_src
|
||||
@ -987,16 +990,18 @@ end function qmckl_compute_det_vgl_alpha_f
|
||||
:END:
|
||||
|
||||
#+NAME: qmckl_compute_det_vgl_beta_args
|
||||
| ~qmckl_context~ | ~context~ | in | Global state |
|
||||
| ~int64_t~ | ~det_num_beta~ | in | Number of determinants |
|
||||
| ~int64_t~ | ~walk_num~ | in | Number of walkers |
|
||||
| ~int64_t~ | ~alpha_num~ | in | Number of electrons |
|
||||
| ~int64_t~ | ~beta_num~ | in | Number of electrons |
|
||||
| ~int64_t~ | ~elec_num~ | in | Number of electrons |
|
||||
| ~int64_t~ | ~mo_index_beta[det_num_beta][walk_num][beta_num]~ | in | Number of electrons |
|
||||
| ~int64_t~ | ~mo_num~ | in | Number of MOs |
|
||||
| ~double~ | ~mo_vgl[5][elec_num][mo_num]~ | in | Value, gradients and Laplacian of the MOs |
|
||||
| ~double~ | ~det_vgl_beta[det_num_beta][walk_num][5][beta_num][beta_num]~ | out | Value, gradients and Laplacian of the Det |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|-----------------+---------------------------------------------------------+--------+-------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~det_num_beta~ | ~int64_t~ | in | Number of determinants |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~alpha_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~beta_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~mo_index_beta~ | ~int64_t[det_num_beta][walk_num][beta_num]~ | in | Number of electrons |
|
||||
| ~mo_num~ | ~int64_t~ | in | Number of MOs |
|
||||
| ~mo_vgl~ | ~double[5][elec_num][mo_num]~ | in | Value, gradients and Laplacian of the MOs |
|
||||
| ~det_vgl_beta~ | ~double[det_num_beta][walk_num][5][beta_num][beta_num]~ | out | Value, gradients and Laplacian of the Det |
|
||||
|
||||
#+begin_src f90 :comments org :tangle (eval f) :noweb yes
|
||||
integer function qmckl_compute_det_vgl_beta_f(context, &
|
||||
@ -1066,16 +1071,16 @@ end function qmckl_compute_det_vgl_beta_f
|
||||
#+RESULTS:
|
||||
#+begin_src c :tangle (eval h_func) :comments org
|
||||
qmckl_exit_code qmckl_compute_det_vgl_beta (
|
||||
const qmckl_context context,
|
||||
const int64_t det_num_beta,
|
||||
const int64_t walk_num,
|
||||
const int64_t alpha_num,
|
||||
const int64_t beta_num,
|
||||
const int64_t elec_num,
|
||||
const int64_t* mo_index_beta,
|
||||
const int64_t mo_num,
|
||||
const double* mo_vgl,
|
||||
double* const det_vgl_beta );
|
||||
const qmckl_context context,
|
||||
const int64_t det_num_beta,
|
||||
const int64_t walk_num,
|
||||
const int64_t alpha_num,
|
||||
const int64_t beta_num,
|
||||
const int64_t elec_num,
|
||||
const int64_t* mo_index_beta,
|
||||
const int64_t mo_num,
|
||||
const double* mo_vgl,
|
||||
double* const det_vgl_beta );
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_compute_det_vgl_beta_args,rettyp=get_value("CRetType"),fname="qmckl_compute_det_vgl_beta"))
|
||||
@ -1083,17 +1088,17 @@ end function qmckl_compute_det_vgl_beta_f
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
||||
integer(c_int32_t) function qmckl_compute_det_vgl_beta &
|
||||
(context, &
|
||||
det_num_beta, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
beta_num, &
|
||||
elec_num, &
|
||||
mo_index_beta, &
|
||||
mo_num, &
|
||||
mo_vgl, &
|
||||
det_vgl_beta) &
|
||||
bind(C) result(info)
|
||||
(context, &
|
||||
det_num_beta, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
beta_num, &
|
||||
elec_num, &
|
||||
mo_index_beta, &
|
||||
mo_num, &
|
||||
mo_vgl, &
|
||||
det_vgl_beta) &
|
||||
bind(C) result(info)
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
implicit none
|
||||
@ -1111,16 +1116,16 @@ end function qmckl_compute_det_vgl_beta_f
|
||||
|
||||
integer(c_int32_t), external :: qmckl_compute_det_vgl_beta_f
|
||||
info = qmckl_compute_det_vgl_beta_f &
|
||||
(context, &
|
||||
det_num_beta, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
beta_num, &
|
||||
elec_num, &
|
||||
mo_index_beta, &
|
||||
mo_num, &
|
||||
mo_vgl, &
|
||||
det_vgl_beta)
|
||||
(context, &
|
||||
det_num_beta, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
beta_num, &
|
||||
elec_num, &
|
||||
mo_index_beta, &
|
||||
mo_num, &
|
||||
mo_vgl, &
|
||||
det_vgl_beta)
|
||||
|
||||
end function qmckl_compute_det_vgl_beta
|
||||
#+end_src
|
||||
@ -1190,45 +1195,45 @@ rc = qmckl_set_ao_basis_prim_num (context, chbrclf_prim_num);
|
||||
assert(rc == QMCKL_SUCCESS);
|
||||
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(!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(!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(!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(!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(!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(!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(!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(!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);
|
||||
|
||||
rc = qmckl_set_ao_basis_ao_num(context, chbrclf_ao_num);
|
||||
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(qmckl_ao_basis_provided(context));
|
||||
@ -1236,7 +1241,7 @@ assert(qmckl_ao_basis_provided(context));
|
||||
|
||||
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);
|
||||
|
||||
/* Set up MO data */
|
||||
@ -1761,14 +1766,16 @@ qmckl_exit_code qmckl_provide_det_inv_matrix_beta(qmckl_context context) {
|
||||
:END:
|
||||
|
||||
#+NAME: qmckl_det_inv_matrix_alpha_args
|
||||
| ~qmckl_context~ | ~context~ | in | Global state |
|
||||
| ~int64_t~ | ~det_num_alpha~ | in | Number of determinants |
|
||||
| ~int64_t~ | ~walk_num~ | in | Number of walkers |
|
||||
| ~int64_t~ | ~alpha_num~ | in | Number of electrons |
|
||||
| ~double~ | ~det_vgl_alpha[det_num_alpha][walk_num][5][alpha_num][alpha_num]~ | in | determinant matrix Value, gradients and Laplacian of the MOs |
|
||||
| ~double~ | ~det_value_alpha[det_num_alpha][walk_num]~ | out | value of determinant matrix |
|
||||
| ~double~ | ~det_adj_matrix_alpha[det_num_alpha][walk_num][alpha_num][alpha_num]~ | out | adjoint of determinant matrix |
|
||||
| ~double~ | ~det_inv_matrix_alpha[det_num_alpha][walk_num][alpha_num][alpha_num]~ | out | inverse of determinant matrix |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|------------------------+------------------------------------------------------------+--------+--------------------------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~det_num_alpha~ | ~int64_t~ | in | Number of determinants |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~alpha_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~det_vgl_alpha~ | ~double[det_num_alpha][walk_num][5][alpha_num][alpha_num]~ | in | determinant matrix Value, gradients and Laplacian of the MOs |
|
||||
| ~det_value_alpha~ | ~double[det_num_alpha][walk_num]~ | out | value of determinant matrix |
|
||||
| ~det_adj_matrix_alpha~ | ~double[det_num_alpha][walk_num][alpha_num][alpha_num]~ | out | adjoint of determinant matrix |
|
||||
| ~det_inv_matrix_alpha~ | ~double[det_num_alpha][walk_num][alpha_num][alpha_num]~ | out | inverse of determinant matrix |
|
||||
|
||||
#+begin_src f90 :comments org :tangle (eval f) :noweb yes
|
||||
integer function qmckl_compute_det_inv_matrix_alpha_f(context, &
|
||||
@ -1814,14 +1821,23 @@ integer function qmckl_compute_det_inv_matrix_alpha_f(context, &
|
||||
|
||||
LDA = alpha_num
|
||||
do idet = 1, det_num_alpha
|
||||
do iwalk = 1, walk_num
|
||||
! Value
|
||||
matA(1:alpha_num,1:alpha_num) = det_vgl_alpha(1:alpha_num, 1:alpha_num, 1, iwalk, idet)
|
||||
res = qmckl_adjugate(context, alpha_num, LDA, matA, det_l)
|
||||
det_adj_matrix_alpha(1:alpha_num, 1:alpha_num, iwalk, idet) = matA
|
||||
det_inv_matrix_alpha(1:alpha_num, 1:alpha_num, iwalk, idet) = matA/det_l
|
||||
det_value_alpha(iwalk, idet) = det_l
|
||||
end do
|
||||
do iwalk = 1, walk_num
|
||||
! Value
|
||||
matA(1:alpha_num,1:alpha_num) = &
|
||||
det_vgl_alpha(1:alpha_num, 1:alpha_num, 1, iwalk, idet)
|
||||
|
||||
res = qmckl_adjugate(context, &
|
||||
alpha_num, matA, LDA, &
|
||||
det_adj_matrix_alpha(1, 1, iwalk, idet), &
|
||||
int(size(det_adj_matrix_alpha,1),8), &
|
||||
det_l)
|
||||
|
||||
det_inv_matrix_alpha(1:alpha_num, 1:alpha_num, iwalk, idet) = &
|
||||
(1.d0/det_l) * &
|
||||
det_adj_matrix_alpha(1:alpha_num, 1:alpha_num, iwalk, idet)
|
||||
|
||||
det_value_alpha(iwalk, idet) = det_l
|
||||
end do
|
||||
end do
|
||||
|
||||
deallocate(matA)
|
||||
@ -1833,14 +1849,14 @@ end function qmckl_compute_det_inv_matrix_alpha_f
|
||||
#+RESULTS:
|
||||
#+begin_src c :tangle (eval h_func) :comments org
|
||||
qmckl_exit_code qmckl_compute_det_inv_matrix_alpha (
|
||||
const qmckl_context context,
|
||||
const int64_t det_num_alpha,
|
||||
const int64_t walk_num,
|
||||
const int64_t alpha_num,
|
||||
const double* det_vgl_alpha,
|
||||
double* const det_value_alpha,
|
||||
double* const det_adj_matrix_alpha,
|
||||
double* const det_inv_matrix_alpha );
|
||||
const qmckl_context context,
|
||||
const int64_t det_num_alpha,
|
||||
const int64_t walk_num,
|
||||
const int64_t alpha_num,
|
||||
const double* det_vgl_alpha,
|
||||
double* const det_value_alpha,
|
||||
double* const det_adj_matrix_alpha,
|
||||
double* const det_inv_matrix_alpha );
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_det_inv_matrix_alpha_args,rettyp=get_value("CRetType"),fname="qmckl_compute_det_inv_matrix_alpha"))
|
||||
@ -1848,15 +1864,15 @@ end function qmckl_compute_det_inv_matrix_alpha_f
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
||||
integer(c_int32_t) function qmckl_compute_det_inv_matrix_alpha &
|
||||
(context, &
|
||||
det_num_alpha, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
det_vgl_alpha, &
|
||||
det_value_alpha, &
|
||||
det_adj_matrix_alpha, &
|
||||
det_inv_matrix_alpha) &
|
||||
bind(C) result(info)
|
||||
(context, &
|
||||
det_num_alpha, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
det_vgl_alpha, &
|
||||
det_value_alpha, &
|
||||
det_adj_matrix_alpha, &
|
||||
det_inv_matrix_alpha) &
|
||||
bind(C) result(info)
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
implicit none
|
||||
@ -1872,14 +1888,14 @@ end function qmckl_compute_det_inv_matrix_alpha_f
|
||||
|
||||
integer(c_int32_t), external :: qmckl_compute_det_inv_matrix_alpha_f
|
||||
info = qmckl_compute_det_inv_matrix_alpha_f &
|
||||
(context, &
|
||||
det_num_alpha, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
det_vgl_alpha, &
|
||||
det_value_alpha, &
|
||||
det_adj_matrix_alpha, &
|
||||
det_inv_matrix_alpha)
|
||||
(context, &
|
||||
det_num_alpha, &
|
||||
walk_num, &
|
||||
alpha_num, &
|
||||
det_vgl_alpha, &
|
||||
det_value_alpha, &
|
||||
det_adj_matrix_alpha, &
|
||||
det_inv_matrix_alpha)
|
||||
|
||||
end function qmckl_compute_det_inv_matrix_alpha
|
||||
#+end_src
|
||||
@ -1892,14 +1908,16 @@ end function qmckl_compute_det_inv_matrix_alpha_f
|
||||
:END:
|
||||
|
||||
#+NAME: qmckl_det_inv_matrix_beta_args
|
||||
| ~qmckl_context~ | ~context~ | in | Global state |
|
||||
| ~int64_t~ | ~det_num_beta~ | in | Number of determinants |
|
||||
| ~int64_t~ | ~walk_num~ | in | Number of walkers |
|
||||
| ~int64_t~ | ~beta_num~ | in | Number of electrons |
|
||||
| ~double~ | ~det_vgl_beta[det_num_beta][walk_num][5][beta_num][beta_num]~ | in | determinant matrix Value, gradients and Laplacian of the MOs |
|
||||
| ~double~ | ~det_value_beta[det_num_beta][walk_num]~ | out | value of determinant matrix |
|
||||
| ~double~ | ~det_adj_matrix_beta[det_num_beta][walk_num][beta_num][beta_num]~ | out | adjoint of determinant matrix |
|
||||
| ~double~ | ~det_inv_matrix_beta[det_num_beta][walk_num][beta_num][beta_num]~ | out | inverse of determinant matrix |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|-----------------------+---------------------------------------------------------+--------+--------------------------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~det_num_beta~ | ~int64_t~ | in | Number of determinants |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~beta_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~det_vgl_beta~ | ~double[det_num_beta][walk_num][5][beta_num][beta_num]~ | in | determinant matrix Value, gradients and Laplacian of the MOs |
|
||||
| ~det_value_beta~ | ~double[det_num_beta][walk_num]~ | out | value of determinant matrix |
|
||||
| ~det_adj_matrix_beta~ | ~double[det_num_beta][walk_num][beta_num][beta_num]~ | out | adjoint of determinant matrix |
|
||||
| ~det_inv_matrix_beta~ | ~double[det_num_beta][walk_num][beta_num][beta_num]~ | out | inverse of determinant matrix |
|
||||
|
||||
#+begin_src f90 :comments org :tangle (eval f) :noweb yes
|
||||
integer function qmckl_compute_det_inv_matrix_beta_f(context, &
|
||||
@ -1945,33 +1963,43 @@ integer function qmckl_compute_det_inv_matrix_beta_f(context, &
|
||||
|
||||
LDA = beta_num
|
||||
do idet = 1, det_num_beta
|
||||
do iwalk = 1, walk_num
|
||||
! Value
|
||||
matA(1:beta_num,1:beta_num) = det_vgl_beta(1:beta_num, 1:beta_num, 1, iwalk, idet)
|
||||
res = qmckl_adjugate(context, beta_num, LDA, matA, det_l)
|
||||
det_adj_matrix_beta(1:beta_num, 1:beta_num, iwalk, idet) = matA
|
||||
det_inv_matrix_beta(1:beta_num, 1:beta_num, iwalk, idet) = matA/det_l
|
||||
det_value_beta(iwalk, idet) = det_l
|
||||
end do
|
||||
do iwalk = 1, walk_num
|
||||
! Value
|
||||
matA(1:beta_num,1:beta_num) = &
|
||||
det_vgl_beta(1:beta_num, 1:beta_num, 1, iwalk, idet)
|
||||
|
||||
res = qmckl_adjugate(context, &
|
||||
beta_num, matA, LDA, &
|
||||
det_adj_matrix_beta(1, 1, iwalk, idet), &
|
||||
int(size(det_adj_matrix_beta,1),8), &
|
||||
det_l)
|
||||
|
||||
det_inv_matrix_beta(1:beta_num, 1:beta_num, iwalk, idet) = &
|
||||
(1.d0/det_l) * &
|
||||
det_adj_matrix_beta(1:beta_num, 1:beta_num, iwalk, idet)
|
||||
|
||||
det_value_beta(iwalk, idet) = det_l
|
||||
end do
|
||||
end do
|
||||
|
||||
|
||||
deallocate(matA)
|
||||
end function qmckl_compute_det_inv_matrix_beta_f
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_header(table=qmckl_det_inv_matrix_beta_args,rettyp=get_value("CRetType"),fname="qmckl_compute_det_inv_matrix_beta"))
|
||||
#+CALL: generate_c_header(table=qmckl_det_inv_matrix_beta_args,rettyp=get_value("CRetType"),fname="qmckl_compute_det_inv_matrix_beta"))
|
||||
|
||||
#+RESULTS:
|
||||
#+begin_src c :tangle (eval h_func) :comments org
|
||||
qmckl_exit_code qmckl_compute_det_inv_matrix_beta (
|
||||
const qmckl_context context,
|
||||
const int64_t det_num_beta,
|
||||
const int64_t walk_num,
|
||||
const int64_t beta_num,
|
||||
const double* det_vgl_beta,
|
||||
double* const det_value_beta,
|
||||
double* const det_adj_matrix_beta,
|
||||
double* const det_inv_matrix_beta );
|
||||
const qmckl_context context,
|
||||
const int64_t det_num_beta,
|
||||
const int64_t walk_num,
|
||||
const int64_t beta_num,
|
||||
const double* det_vgl_beta,
|
||||
double* const det_value_beta,
|
||||
double* const det_adj_matrix_beta,
|
||||
double* const det_inv_matrix_beta );
|
||||
#+end_src
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_det_inv_matrix_beta_args,rettyp=get_value("CRetType"),fname="qmckl_compute_det_inv_matrix_beta"))
|
||||
@ -1979,15 +2007,15 @@ end function qmckl_compute_det_inv_matrix_beta_f
|
||||
#+RESULTS:
|
||||
#+begin_src f90 :tangle (eval f) :comments org :exports none
|
||||
integer(c_int32_t) function qmckl_compute_det_inv_matrix_beta &
|
||||
(context, &
|
||||
det_num_beta, &
|
||||
walk_num, &
|
||||
beta_num, &
|
||||
det_vgl_beta, &
|
||||
det_value_beta, &
|
||||
det_adj_matrix_beta, &
|
||||
det_inv_matrix_beta) &
|
||||
bind(C) result(info)
|
||||
(context, &
|
||||
det_num_beta, &
|
||||
walk_num, &
|
||||
beta_num, &
|
||||
det_vgl_beta, &
|
||||
det_value_beta, &
|
||||
det_adj_matrix_beta, &
|
||||
det_inv_matrix_beta) &
|
||||
bind(C) result(info)
|
||||
|
||||
use, intrinsic :: iso_c_binding
|
||||
implicit none
|
||||
@ -2003,20 +2031,19 @@ end function qmckl_compute_det_inv_matrix_beta_f
|
||||
|
||||
integer(c_int32_t), external :: qmckl_compute_det_inv_matrix_beta_f
|
||||
info = qmckl_compute_det_inv_matrix_beta_f &
|
||||
(context, &
|
||||
det_num_beta, &
|
||||
walk_num, &
|
||||
beta_num, &
|
||||
det_vgl_beta, &
|
||||
det_value_beta, &
|
||||
det_adj_matrix_beta, &
|
||||
det_inv_matrix_beta)
|
||||
(context, &
|
||||
det_num_beta, &
|
||||
walk_num, &
|
||||
beta_num, &
|
||||
det_vgl_beta, &
|
||||
det_value_beta, &
|
||||
det_adj_matrix_beta, &
|
||||
det_inv_matrix_beta)
|
||||
|
||||
end function qmckl_compute_det_inv_matrix_beta
|
||||
#+end_src
|
||||
|
||||
|
||||
*** Test
|
||||
*** Test :noexport:
|
||||
#+begin_src c :tangle (eval c_test) :exports none
|
||||
// Get adjoint of the slater-determinant
|
||||
|
||||
|
@ -40,19 +40,21 @@ int main() {
|
||||
\]
|
||||
|
||||
#+NAME: qmckl_distance_sq_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| char | transa | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| char | transb | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| int64_t | m | in | Number of points in the first set |
|
||||
| int64_t | n | in | Number of points in the second set |
|
||||
| double | A[][lda] | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| int64_t | lda | in | Leading dimension of array ~A~ |
|
||||
| double | B[][ldb] | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| int64_t | ldb | in | Leading dimension of array ~B~ |
|
||||
| double | C[n][ldc] | out | Array containing the $m \times n$ matrix $C$ |
|
||||
| int64_t | ldc | in | Leading dimension of array ~C~ |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|-----------+------------------+--------+-----------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~transa~ | ~char~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~transb~ | ~char~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~m~ | ~int64_t~ | in | Number of points in the first set |
|
||||
| ~n~ | ~int64_t~ | in | Number of points in the second set |
|
||||
| ~A~ | ~double[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| ~lda~ | ~int64_t~ | in | Leading dimension of array ~A~ |
|
||||
| ~B~ | ~double[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| ~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~
|
||||
- ~m > 0~
|
||||
@ -66,8 +68,6 @@ int main() {
|
||||
- ~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 header
|
||||
|
||||
#+CALL: generate_c_header(table=qmckl_distance_sq_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
|
||||
|
||||
#+RESULTS:
|
||||
@ -83,10 +83,9 @@ int main() {
|
||||
const double* B,
|
||||
const int64_t ldb,
|
||||
double* const C,
|
||||
const int64_t ldc );
|
||||
const int64_t ldc );
|
||||
#+end_src
|
||||
|
||||
*** Source
|
||||
#+begin_src f90 :tangle (eval f)
|
||||
integer function qmckl_distance_sq_f(context, transa, transb, m, n, &
|
||||
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
|
||||
transposed.
|
||||
|
||||
** C interface :noexport:
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_distance_sq_args,rettyp=get_value("FRetType"),fname=get_value("Name"))
|
||||
|
||||
#+RESULTS:
|
||||
@ -284,7 +281,6 @@ end function qmckl_distance_sq_f
|
||||
|
||||
*** Test :noexport:
|
||||
#+begin_src f90 :tangle (eval f_test)
|
||||
|
||||
integer(qmckl_exit_code) function test_qmckl_distance_sq(context) bind(C)
|
||||
|
||||
use qmckl
|
||||
@ -441,17 +437,19 @@ end function test_qmckl_distance_sq
|
||||
the leading dimension: ~[n][3]~ in C and ~(3,n)~ in Fortran.
|
||||
|
||||
#+NAME: qmckl_distance_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| char | transa | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| char | transb | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| int64_t | m | in | Number of points in the first set |
|
||||
| int64_t | n | in | Number of points in the second set |
|
||||
| double | A[][lda] | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| int64_t | lda | in | Leading dimension of array ~A~ |
|
||||
| double | B[][ldb] | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| int64_t | ldb | in | Leading dimension of array ~B~ |
|
||||
| double | C[n][ldc] | out | Array containing the $m \times n$ matrix $C$ |
|
||||
| int64_t | ldc | in | Leading dimension of array ~C~ |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|-----------+------------------+--------+-----------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~transa~ | ~char~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~transb~ | ~char~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~m~ | ~int64_t~ | in | Number of points in the first set |
|
||||
| ~n~ | ~int64_t~ | in | Number of points in the second set |
|
||||
| ~A~ | ~double[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| ~lda~ | ~int64_t~ | in | Leading dimension of array ~A~ |
|
||||
| ~B~ | ~double[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| ~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
|
||||
|
||||
@ -484,7 +482,7 @@ end function test_qmckl_distance_sq
|
||||
const double* B,
|
||||
const int64_t ldb,
|
||||
double* const C,
|
||||
const int64_t ldc );
|
||||
const int64_t ldc );
|
||||
#+end_src
|
||||
|
||||
*** Source
|
||||
@ -881,18 +879,20 @@ end function test_qmckl_dist
|
||||
the leading dimension: ~[n][3]~ in C and ~(3,n)~ in Fortran.
|
||||
|
||||
#+NAME: qmckl_distance_rescaled_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| char | transa | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| char | transb | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| int64_t | m | in | Number of points in the first set |
|
||||
| int64_t | n | in | Number of points in the second set |
|
||||
| double | A[][lda] | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| int64_t | lda | in | Leading dimension of array ~A~ |
|
||||
| double | B[][ldb] | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| int64_t | ldb | in | Leading dimension of array ~B~ |
|
||||
| double | C[n][ldc] | out | Array containing the $m \times n$ matrix $C$ |
|
||||
| int64_t | ldc | in | Leading dimension of array ~C~ |
|
||||
| double | rescale_factor_kappa | in | Factor for calculating rescaled distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|------------------------+------------------+--------+-----------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~transa~ | ~char~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~transb~ | ~char~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~m~ | ~int64_t~ | in | Number of points in the first set |
|
||||
| ~n~ | ~int64_t~ | in | Number of points in the second set |
|
||||
| ~A~ | ~double[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| ~lda~ | ~int64_t~ | in | Leading dimension of array ~A~ |
|
||||
| ~B~ | ~double[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| ~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~ |
|
||||
| ~rescale_factor_kappa~ | ~double~ | in | Factor for calculating rescaled distances |
|
||||
|
||||
*** Requirements
|
||||
|
||||
@ -926,7 +926,7 @@ end function test_qmckl_dist
|
||||
const int64_t ldb,
|
||||
double* const C,
|
||||
const int64_t ldc,
|
||||
const double rescale_factor_kappa);
|
||||
const double rescale_factor_kappa );
|
||||
#+end_src
|
||||
|
||||
*** Source
|
||||
@ -1215,20 +1215,22 @@ end function qmckl_distance_rescaled_f
|
||||
the leading dimension: ~[n][3]~ in C and ~(3,n)~ in Fortran.
|
||||
|
||||
#+NAME: qmckl_distance_rescaled_deriv_e_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| char | transa | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| char | transb | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| int64_t | m | in | Number of points in the first set |
|
||||
| int64_t | n | in | Number of points in the second set |
|
||||
| double | A[][lda] | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| int64_t | lda | in | Leading dimension of array ~A~ |
|
||||
| double | B[][ldb] | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| int64_t | ldb | in | Leading dimension of array ~B~ |
|
||||
| double | C[4][n][ldc] | out | Array containing the $4 \times m \times n$ matrix $C$ |
|
||||
| int64_t | ldc | in | Leading dimension of array ~C~ |
|
||||
| double | rescale_factor_kappa | in | Factor for calculating rescaled distances derivatives |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|------------------------+---------------------+--------+-------------------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~transa~ | ~char~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~transb~ | ~char~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~m~ | ~int64_t~ | in | Number of points in the first set |
|
||||
| ~n~ | ~int64_t~ | in | Number of points in the second set |
|
||||
| ~A~ | ~double[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| ~lda~ | ~int64_t~ | in | Leading dimension of array ~A~ |
|
||||
| ~B~ | ~double[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| ~ldb~ | ~int64_t~ | in | Leading dimension of array ~B~ |
|
||||
| ~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~
|
||||
- ~m > 0~
|
||||
@ -1241,9 +1243,7 @@ end function qmckl_distance_rescaled_f
|
||||
- ~A~ is allocated with at least $3 \times m \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 header
|
||||
|
||||
|
||||
#+CALL: generate_c_header(table=qmckl_distance_rescaled_deriv_e_args,rettyp=get_value("CRetType"),fname=get_value("Name"))
|
||||
|
||||
#+RESULTS:
|
||||
@ -1260,10 +1260,9 @@ end function qmckl_distance_rescaled_f
|
||||
const int64_t ldb,
|
||||
double* const C,
|
||||
const int64_t ldc,
|
||||
const double rescale_factor_kappa);
|
||||
const double rescale_factor_kappa );
|
||||
#+end_src
|
||||
|
||||
*** Source
|
||||
#+begin_src f90 :tangle (eval f)
|
||||
integer function qmckl_distance_rescaled_deriv_e_f(context, transa, transb, m, n, &
|
||||
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_src
|
||||
|
||||
*** Performance
|
||||
|
||||
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,rettyp=get_value("FRetType"),fname=get_value("Name"))
|
||||
|
||||
#+CALL: generate_c_interface(table=qmckl_distance_rescaled_deriv_e_args,fname=get_value("Name"))
|
||||
|
||||
#+RESULTS:
|
||||
#+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
|
||||
real (c_double ) , intent(in) :: B(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
|
||||
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
|
||||
real (c_double ) , intent(in) :: B(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
|
||||
real (c_double ) , intent(in) , value :: rescale_factor_kappa
|
||||
|
||||
|
@ -68,6 +68,7 @@ int main() {
|
||||
|
||||
The following data stored in the context:
|
||||
|
||||
| Variable | Type | Description |
|
||||
|---------------------------+----------------------------+-------------------------------------------|
|
||||
| ~uninitialized~ | ~int32_t~ | Keeps bit set for uninitialized data |
|
||||
| ~num~ | ~int64_t~ | Total number of electrons |
|
||||
@ -83,6 +84,7 @@ int main() {
|
||||
|
||||
Computed data:
|
||||
|
||||
| Variable | Type | Description |
|
||||
|-------------------------------------+--------------------------------------+----------------------------------------------------------------------|
|
||||
| ~ee_distance~ | ~double[walk_num][num][num]~ | 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:
|
||||
|
||||
#+NAME: qmckl_ee_distance_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| double | coord[walk_num][3][elec_num] | in | Electron coordinates |
|
||||
| double | ee_distance[walk_num][elec_num][elec_num] | out | Electron-electron distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------+----------------------------------------+--------+-----------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_ee_distance_rescaled_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| double | rescale_factor_kappa_ee | in | Factor to rescale ee distances |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| double | coord[walk_num][3][elec_num] | in | Electron coordinates |
|
||||
| double | ee_distance[walk_num][elec_num][elec_num] | out | Electron-electron rescaled distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|----------------------------------------+---------------------------+--------+--------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~rescale_factor_kappa_ee~ | ~double~ | in | Factor to rescale ee 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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_ee_distance_rescaled_deriv_e_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| double | rescale_factor_kappa_ee | in | Factor to rescale ee distances |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| double | coord[walk_num][3][elec_num] | in | Electron coordinates |
|
||||
| double | ee_distance_deriv_e[walk_num][4][elec_num][elec_num] | out | Electron-electron rescaled distance derivatives |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------------------+-------------------------------------------+--------+-------------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~rescale_factor_kappa_ee~ | ~double~ | in | Factor to rescale ee distances |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_ee_potential_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| double | ee_distance[walk_num][elec_num][elec_num] | in | Electron-electron rescaled distances |
|
||||
| double | ee_pot[walk_num] | out | Electron-electron potential |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------+----------------------------------------+--------+--------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_en_distance_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nuclei |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| double | elec_coord[walk_num][3][elec_num] | in | Electron coordinates |
|
||||
| double | nucl_coord[3][elec_num] | in | Nuclear coordinates |
|
||||
| double | en_distance[walk_num][nucl_num][elec_num] | out | Electron-nucleus distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------+----------------------------------------+--------+----------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of nuclei |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~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
|
||||
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
|
||||
:END:
|
||||
|
||||
#+NAME: qmckl_en_distance_rescaled_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nuclei |
|
||||
| double | rescale_factor_kappa_en | in | The factor for rescaled distances |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| double | elec_coord[walk_num][3][elec_num] | in | Electron coordinates |
|
||||
| double | nucl_coord[3][elec_num] | in | Nuclear coordinates |
|
||||
| double | en_distance_rescaled_date[walk_num][nucl_num][elec_num] | out | Electron-nucleus distances |
|
||||
#+NAME: qmckl_en_distance_rescaled_args
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------------------+----------------------------------------+--------+-----------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of nuclei |
|
||||
| ~rescale_factor_kappa_en~ | ~double~ | in | The factor for rescaled distances |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_en_distance_rescaled_deriv_e_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nuclei |
|
||||
| double | rescale_factor_kappa_en | in | The factor for rescaled distances |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| double | elec_coord[walk_num][3][elec_num] | in | Electron coordinates |
|
||||
| double | nucl_coord[3][elec_num] | in | Nuclear coordinates |
|
||||
| double | en_distance_rescaled_deriv_e_date[walk_num][4][nucl_num][elec_num] | out | Electron-nucleus distance derivatives |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|--------------------------------+-------------------------------------------+--------+---------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of nuclei |
|
||||
| ~rescale_factor_kappa_en~ | ~double~ | in | The factor for rescaled distances |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_en_potential_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nucleii |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| double | charge[nucl_num] | in | charge of nucleus |
|
||||
| double | en_distance[walk_num][nucl_num][elec_num] | in | Electron-electron rescaled distances |
|
||||
| double | en_pot[walk_num] | out | Electron-electron potential |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------+----------------------------------------+--------+--------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~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
|
||||
integer function qmckl_compute_en_potential_f(context, elec_num, nucl_num, walk_num, &
|
||||
|
@ -76,51 +76,53 @@ int main() {
|
||||
|
||||
The following data stored in the context:
|
||||
|
||||
#+NAME: qmckl_jastrow_args
|
||||
|------------+--------------------------------------------+-----+-------------------------------------------------------------------|
|
||||
| ~int32_t~ | ~uninitialized~ | in | Keeps bit set for uninitialized data |
|
||||
| ~int64_t~ | ~aord_num~ | in | The number of a coeffecients |
|
||||
| ~int64_t~ | ~bord_num~ | in | The number of b coeffecients |
|
||||
| ~int64_t~ | ~cord_num~ | in | The number of c coeffecients |
|
||||
| ~int64_t~ | ~type_nucl_num~ | in | Number of Nucleii types |
|
||||
| ~int64_t~ | ~type_nucl_vector[nucl_num]~ | in | IDs of types of Nucleii |
|
||||
| ~double~ | ~aord_vector[aord_num + 1][type_nucl_num]~ | in | Order of a polynomial coefficients |
|
||||
| ~double~ | ~bord_vector[bord_num + 1]~ | in | Order of b polynomial coefficients |
|
||||
| ~double~ | ~cord_vector[cord_num][type_nucl_num]~ | in | Order of c polynomial coefficients |
|
||||
| ~double~ | ~factor_ee[walk_num]~ | out | Jastrow factor: electron-electron part |
|
||||
| ~uint64_t~ | ~factor_ee_date~ | out | Jastrow factor: electron-electron part |
|
||||
| ~double~ | ~factor_en[walk_num]~ | out | Jastrow factor: electron-nucleus part |
|
||||
| ~uint64_t~ | ~factor_en_date~ | out | Jastrow factor: electron-nucleus part |
|
||||
| ~double~ | ~factor_een[walk_num]~ | out | Jastrow factor: electron-electron-nucleus part |
|
||||
| ~uint64_t~ | ~factor_een_date~ | 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 |
|
||||
| ~uint64_t~ | ~factor_ee_deriv_e_date~ | out | Keep track of the date for the derivative |
|
||||
| ~double~ | ~factor_en_deriv_e[4][nelec][walk_num]~ | out | Derivative of the Jastrow factor: electron-electron-nucleus part |
|
||||
| ~uint64_t~ | ~factor_en_deriv_e_date~ | out | Keep track of the date for the en derivative |
|
||||
| ~double~ | ~factor_een_deriv_e[4][nelec][walk_num]~ | out | Derivative of the Jastrow factor: electron-electron-nucleus part |
|
||||
| ~uint64_t~ | ~factor_een_deriv_e_date~ | out | Keep track of the date for the een derivative |
|
||||
#+NAME: qmckl_jastrow_args
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------------------+---------------------------------------+--------+-------------------------------------------------------------------|
|
||||
| ~uninitialized~ | ~int32_t~ | in | Keeps bit set for uninitialized data |
|
||||
| ~aord_num~ | ~int64_t~ | in | The number of a coeffecients |
|
||||
| ~bord_num~ | ~int64_t~ | in | The number of b coeffecients |
|
||||
| ~cord_num~ | ~int64_t~ | in | The number of c coeffecients |
|
||||
| ~type_nucl_num~ | ~int64_t~ | in | Number of Nucleii types |
|
||||
| ~type_nucl_vector~ | ~int64_t[nucl_num]~ | in | IDs of types of Nucleii |
|
||||
| ~aord_vector~ | ~double[aord_num + 1][type_nucl_num]~ | in | Order of a polynomial coefficients |
|
||||
| ~bord_vector~ | ~double[bord_num + 1]~ | in | Order of b polynomial coefficients |
|
||||
| ~cord_vector~ | ~double[cord_num][type_nucl_num]~ | in | Order of c polynomial coefficients |
|
||||
| ~factor_ee~ | ~double[walk_num]~ | out | Jastrow factor: electron-electron part |
|
||||
| ~factor_ee_date~ | ~uint64_t~ | out | Jastrow factor: electron-electron part |
|
||||
| ~factor_en~ | ~double[walk_num]~ | out | Jastrow factor: electron-nucleus part |
|
||||
| ~factor_en_date~ | ~uint64_t~ | out | Jastrow factor: electron-nucleus part |
|
||||
| ~factor_een~ | ~double[walk_num]~ | out | Jastrow factor: electron-electron-nucleus part |
|
||||
| ~factor_een_date~ | ~uint64_t~ | out | Jastrow factor: electron-electron-nucleus part |
|
||||
| ~factor_ee_deriv_e~ | ~double[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 |
|
||||
| ~factor_en_deriv_e~ | ~double[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 |
|
||||
| ~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:
|
||||
|
||||
|------------+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------|
|
||||
| ~int64_t~ | ~dim_cord_vect~ | Number of unique C coefficients |
|
||||
| ~uint64_t~ | ~dim_cord_vect_date~ | Number of unique C coefficients |
|
||||
| ~double~ | ~asymp_jasb[2]~ | Asymptotic component |
|
||||
| ~uint64_t~ | ~asymp_jasb_date~ | Asymptotic component |
|
||||
| ~double~ | ~cord_vect_full[dim_cord_vect][nucl_num]~ | vector of non-zero coefficients |
|
||||
| ~uint64_t~ | ~cord_vect_full_date~ | Keep track of changes here |
|
||||
| ~int64_t~ | ~lkpm_combined_index[4][dim_cord_vect]~ | Transform l,k,p, and m into consecutive indices |
|
||||
| ~uint64_t~ | ~lkpm_combined_index_date~ | 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 |
|
||||
| ~double~ | ~dtmp_c[elec_num][4][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 |
|
||||
| ~uint64_t~ | ~een_rescaled_e_date~ | Keep track of the date of creation |
|
||||
| ~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 |
|
||||
| ~uint64_t~ | ~een_rescaled_n_date~ | Keep track of the date of creation |
|
||||
| ~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 |
|
||||
| ~uint64_t~ | ~een_rescaled_e_deriv_e_date~ | Keep track of the date of creation |
|
||||
| ~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 |
|
||||
| ~uint64_t~ | ~een_rescaled_n_deriv_e_date~ | Keep track of the date of creation |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|------------+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------|
|
||||
| ~dim_cord_vect~ | ~int64_t~ | Number of unique C coefficients | |
|
||||
| ~dim_cord_vect_date~ | ~uint64_t~ | Number of unique C coefficients | |
|
||||
| ~asymp_jasb~ | ~double[2]~ | Asymptotic component | |
|
||||
| ~asymp_jasb_date~ | ~uint64_t~ | Asymptotic component | |
|
||||
| ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | vector of non-zero coefficients | |
|
||||
| ~cord_vect_full_date~ | ~uint64_t~ | Keep track of changes here | |
|
||||
| ~lkpm_combined_index~ | ~int64_t[4][dim_cord_vect]~ | Transform l,k,p, and m into consecutive indices | |
|
||||
| ~lkpm_combined_index_date~ | ~uint64_t~ | Transform l,k,p, and m into consecutive indices | |
|
||||
| ~tmp_c~ | ~double[elec_num][nucl_num][ncord + 1][ncord][walk_num]~ | vector of non-zero coefficients | |
|
||||
| ~dtmp_c~ | ~double[elec_num][4][nucl_num][ncord + 1][ncord][walk_num]~ | vector of non-zero coefficients | |
|
||||
| ~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 | |
|
||||
| ~een_rescaled_e_date~ | ~uint64_t~ | 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 | |
|
||||
| ~een_rescaled_n_date~ | ~uint64_t~ | 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 | |
|
||||
| ~een_rescaled_e_deriv_e_date~ | ~uint64_t~ | 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:
|
||||
|
||||
@ -1282,11 +1284,13 @@ qmckl_exit_code qmckl_provide_asymp_jasb(qmckl_context context)
|
||||
:END:
|
||||
|
||||
#+NAME: qmckl_asymp_jasb_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | bord_num | in | Number of electrons |
|
||||
| double | bord_vector[bord_num + 1] | in | Number of walkers |
|
||||
| double | rescale_factor_kappa_ee | in | Electron coordinates |
|
||||
| double | asymp_jasb[2] | out | Electron-electron distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------------------+----------------------+--------+-----------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~bord_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_ee_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | up_num | in | Number of alpha electrons |
|
||||
| int64_t | bord_num | in | Number of coefficients |
|
||||
| double | bord_vector[bord_num + 1] | in | List of coefficients |
|
||||
| double | ee_distance_rescaled[walk_num][elec_num][elec_num] | in | Electron-electron distances |
|
||||
| double | asymp_jasb[2] | in | Electron-electron distances |
|
||||
| double | factor_ee[walk_num] | out | Electron-electron distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|------------------------+----------------------------------------+--------+-----------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~up_num~ | ~int64_t~ | in | Number of alpha electrons |
|
||||
| ~bord_num~ | ~int64_t~ | in | Number of coefficients |
|
||||
| ~bord_vector~ | ~double[bord_num+1]~ | in | List of coefficients |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_ee_deriv_e_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | up_num | in | Number of alpha electrons |
|
||||
| int64_t | bord_num | in | Number of coefficients |
|
||||
| double | bord_vector[bord_num + 1] | in | List of coefficients |
|
||||
| double | ee_distance_rescaled[walk_num][elec_num][elec_num] | in | Electron-electron distances |
|
||||
| double | ee_distance_rescaled_deriv_e[walk_num][4][elec_num][elec_num] | in | Electron-electron distances |
|
||||
| double | asymp_jasb[2] | in | Electron-electron distances |
|
||||
| double | factor_ee_deriv_e[walk_num][4][elec_num] | out | Electron-electron distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|--------------------------------+-------------------------------------------+--------+-----------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~up_num~ | ~int64_t~ | in | Number of alpha electrons |
|
||||
| ~bord_num~ | ~int64_t~ | in | Number of coefficients |
|
||||
| ~bord_vector~ | ~double[bord_num+1]~ | in | List of coefficients |
|
||||
| ~ee_distance_rescaled~ | ~double[walk_num][elec_num][elec_num]~ | in | 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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_en_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nucleii |
|
||||
| int64_t | type_nucl_num | in | Number of unique nuclei |
|
||||
| int64_t | type_nucl_vector[nucl_num] | in | IDs of unique nucleii |
|
||||
| int64_t | aord_num | in | Number of coefficients |
|
||||
| double | aord_vector[aord_num + 1][type_nucl_num] | in | List of coefficients |
|
||||
| double | en_distance_rescaled[walk_num][nucl_num][elec_num] | in | Electron-nucleus distances |
|
||||
| double | factor_en[walk_num] | out | Electron-nucleus jastrow |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|------------------------+----------------------------------------+--------+----------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
|
||||
| ~type_nucl_num~ | ~int64_t~ | in | Number of unique nuclei |
|
||||
| ~type_nucl_vector~ | ~int64_t[nucl_num]~ | in | IDs of unique nucleii |
|
||||
| ~aord_num~ | ~int64_t~ | in | Number of coefficients |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_en_deriv_e_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nucleii |
|
||||
| int64_t | type_nucl_num | in | Number of unique nuclei |
|
||||
| int64_t | type_nucl_vector[nucl_num] | in | IDs of unique nucleii |
|
||||
| int64_t | aord_num | in | Number of coefficients |
|
||||
| double | aord_vector[aord_num + 1][type_nucl_num] | in | List of coefficients |
|
||||
| double | en_distance_rescaled[walk_num][nucl_num][elec_num] | in | Electron-nucleus distances |
|
||||
| double | en_distance_rescaled_deriv_e[walk_num][4][nucl_num][elec_num] | in | Electron-nucleus distance derivatives |
|
||||
| double | factor_en_deriv_e[walk_num][4][elec_num] | out | Electron-nucleus jastrow |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|--------------------------------+-------------------------------------------+--------+---------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
|
||||
| ~type_nucl_num~ | ~int64_t~ | in | Number of unique nuclei |
|
||||
| ~type_nucl_vector~ | ~int64_t[nucl_num]~ | in | IDs of unique nucleii |
|
||||
| ~aord_num~ | ~int64_t~ | in | Number of coefficients |
|
||||
| ~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 |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_een_rescaled_e_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | cord_num | in | Order of polynomials |
|
||||
| double | rescale_factor_kappa_ee | in | Factor to rescale ee distances |
|
||||
| double | ee_distance[walk_num][elec_num][elec_num] | in | Electron-electron distances |
|
||||
| double | een_rescaled_e[walk_num][elec_num][elec_num][0:cord_num] | out | Electron-electron rescaled distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------------------+----------------------------------------------------+--------+--------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~cord_num~ | ~int64_t~ | in | Order of polynomials |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_een_rescaled_e_deriv_e_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | cord_num | in | Order of polynomials |
|
||||
| double | rescale_factor_kappa_ee | in | Factor to rescale ee distances |
|
||||
| double | coord_new[walk_num][3][elec_num] | in | Electron coordinates |
|
||||
| double | ee_distance[walk_num][elec_num][elec_num] | in | Electron-electron distances |
|
||||
| double | een_rescaled_e[walk_num][elec_num][elec_num][0:cord_num] | in | Electron-electron distances |
|
||||
| double | een_rescaled_e_deriv_e[walk_num][elec_num][4][elec_num][0:cord_num] | out | Electron-electron rescaled distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------------------+-------------------------------------------------------+--------+--------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~cord_num~ | ~int64_t~ | in | Order of polynomials |
|
||||
| ~rescale_factor_kappa_ee~ | ~double~ | in | Factor to rescale ee distances |
|
||||
| ~coord_new~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_een_rescaled_n_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of atoms |
|
||||
| int64_t | cord_num | in | Order of polynomials |
|
||||
| double | rescale_factor_kappa_en | in | Factor to rescale ee distances |
|
||||
| double | en_distance[walk_num][elec_num][nucl_num] | in | Electron-nucleus distances |
|
||||
| double | een_rescaled_n[walk_num][elec_num][nucl_num][0:cord_num] | out | Electron-nucleus rescaled distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------------------+----------------------------------------------------+--------+-------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of atoms |
|
||||
| ~cord_num~ | ~int64_t~ | in | Order of polynomials |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_compute_factor_een_rescaled_n_deriv_e_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of atoms |
|
||||
| int64_t | cord_num | in | Order of polynomials |
|
||||
| double | rescale_factor_kappa_en | in | Factor to rescale ee distances |
|
||||
| double | coord_new[walk_num][3][elec_num] | in | Electron coordinates |
|
||||
| double | coord[3][nucl_num] | in | Nuclear coordinates |
|
||||
| double | en_distance[walk_num][elec_num][nucl_num] | in | Electron-nucleus distances |
|
||||
| double | een_rescaled_n[walk_num][elec_num][nucl_num][0:cord_num] | in | Electron-nucleus distances |
|
||||
| double | een_rescaled_n_deriv_e[walk_num][elec_num][4][nucl_num][0:cord_num] | out | Electron-nucleus rescaled distances |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|---------------------------+-------------------------------------------------------+--------+-------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of atoms |
|
||||
| ~cord_num~ | ~int64_t~ | in | Order of polynomials |
|
||||
| ~rescale_factor_kappa_en~ | ~double~ | in | Factor to rescale ee distances |
|
||||
| ~coord_new~ | ~double[walk_num][3][elec_num]~ | in | Electron coordinates |
|
||||
| ~coord~ | ~double[3][nucl_num]~ | in | Nuclear coordinates |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_dim_cord_vect_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | cord_num | in | Order of polynomials |
|
||||
| int64_t | dim_cord_vect | out | dimension of cord_vect_full table |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|-----------------+-----------------+--------+-----------------------------------|
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_cord_vect_full_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | nucl_num | in | Number of atoms |
|
||||
| int64_t | dim_cord_vect | in | dimension of cord full table |
|
||||
| int64_t | type_nucl_num | in | dimension of cord full table |
|
||||
| int64_t | type_nucl_vector[nucl_num] | in | dimension of cord full table |
|
||||
| double | cord_vector[dim_cord_vect][type_nucl_num] | in | dimension of cord full table |
|
||||
| double | cord_vect_full[dim_cord_vect][nucl_num] | out | Full list of coefficients |
|
||||
|
||||
| Variable | Type | In/Out | Description |
|
||||
|--------------------+----------------------------------------+--------+------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of atoms |
|
||||
| ~dim_cord_vect~ | ~int64_t~ | in | dimension of cord full table |
|
||||
| ~type_nucl_num~ | ~int64_t~ | in | dimension of cord full table |
|
||||
| ~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
|
||||
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) &
|
||||
@ -4599,10 +4623,12 @@ end function qmckl_compute_cord_vect_full_f
|
||||
:END:
|
||||
|
||||
#+NAME: qmckl_factor_lkpm_combined_index_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | cord_num | in | Order of polynomials |
|
||||
| int64_t | dim_cord_vect | in | dimension of cord full table |
|
||||
| int64_t | lpkm_combined_index[4][dim_cord_vect] | out | Full list of combined indices |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|-----------------------+-----------------------------+--------+-------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~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
|
||||
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:
|
||||
|
||||
#+NAME: qmckl_factor_een_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nucleii |
|
||||
| int64_t | cord_num | in | order of polynomials |
|
||||
| int64_t | dim_cord_vect | in | dimension of full coefficient vector |
|
||||
| double | cord_vect_full[dim_cord_vect][nucl_num] | in | full coefficient vector |
|
||||
| int64_t | lkpm_combined_index[4][dim_cord_vect] | in | combined indices |
|
||||
| double | een_rescaled_e[walk_num][elec_num][elec_num][0:cord_num] | in | Electron-nucleus rescaled |
|
||||
| double | een_rescaled_n[walk_num][elec_num][nucl_num][0:cord_num] | in | Electron-nucleus rescaled factor |
|
||||
| double | factor_een[walk_num] | out | Electron-nucleus jastrow |
|
||||
|
||||
| Variable | Type | In/Out | Description |
|
||||
|-----------------------+----------------------------------------------------+--------+--------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
|
||||
| ~cord_num~ | ~int64_t~ | in | order of polynomials |
|
||||
| ~dim_cord_vect~ | ~int64_t~ | in | dimension of full coefficient vector |
|
||||
| ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | in | full coefficient vector |
|
||||
| ~lkpm_combined_index~ | ~int64_t[4][dim_cord_vect]~ | in | combined indices |
|
||||
| ~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
|
||||
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, &
|
||||
@ -5218,19 +5246,21 @@ qmckl_exit_code qmckl_provide_factor_een_deriv_e(qmckl_context context)
|
||||
:END:
|
||||
|
||||
#+NAME: qmckl_factor_een_deriv_e_args
|
||||
| qmckl_context | context | in | Global state |
|
||||
| int64_t | walk_num | in | Number of walkers |
|
||||
| int64_t | elec_num | in | Number of electrons |
|
||||
| int64_t | nucl_num | in | Number of nucleii |
|
||||
| int64_t | cord_num | in | order of polynomials |
|
||||
| int64_t | dim_cord_vect | in | dimension of full coefficient vector |
|
||||
| double | cord_vect_full[dim_cord_vect][nucl_num] | in | full coefficient vector |
|
||||
| int64_t | lkpm_combined_index[4][dim_cord_vect] | in | combined indices |
|
||||
| double | een_rescaled_e[walk_num][elec_num][elec_num][0:cord_num] | in | Electron-nucleus rescaled |
|
||||
| double | een_rescaled_n[walk_num][elec_num][nucl_num][0:cord_num] | in | Electron-nucleus rescaled factor |
|
||||
| double | een_rescaled_e_deriv_e[walk_num][elec_num][4][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 |
|
||||
| double | factor_een_deriv_e[walk_num][4][elec_num] | out | Electron-nucleus jastrow |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|--------------------------+-------------------------------------------------------+--------+--------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~walk_num~ | ~int64_t~ | in | Number of walkers |
|
||||
| ~elec_num~ | ~int64_t~ | in | Number of electrons |
|
||||
| ~nucl_num~ | ~int64_t~ | in | Number of nucleii |
|
||||
| ~cord_num~ | ~int64_t~ | in | order of polynomials |
|
||||
| ~dim_cord_vect~ | ~int64_t~ | in | dimension of full coefficient vector |
|
||||
| ~cord_vect_full~ | ~double[dim_cord_vect][nucl_num]~ | in | full coefficient vector |
|
||||
| ~lkpm_combined_index~ | ~int64_t[4][dim_cord_vect]~ | in | combined indices |
|
||||
| ~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 |
|
||||
| ~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
|
||||
integer function qmckl_compute_factor_een_deriv_e_f(context, walk_num, elec_num, nucl_num, cord_num, dim_cord_vect, &
|
||||
|
@ -625,45 +625,45 @@ rc = qmckl_set_ao_basis_prim_num (context, chbrclf_prim_num);
|
||||
assert(rc == QMCKL_SUCCESS);
|
||||
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(!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(!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(!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(!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(!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(!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(!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(!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);
|
||||
|
||||
rc = qmckl_set_ao_basis_ao_num(context, chbrclf_ao_num);
|
||||
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(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];
|
||||
|
||||
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);
|
||||
|
||||
/* Set up MO data */
|
||||
|
@ -194,7 +194,7 @@ b[2] = 3; assert(b[2] == 3);
|
||||
case some important information has been stored related to memory
|
||||
allocation and needs to be updated.
|
||||
|
||||
#+begin_src c :tangle (eval h_func)
|
||||
#+begin_src c :tangle (eval h_private_func)
|
||||
qmckl_exit_code qmckl_free(qmckl_context context,
|
||||
void * const ptr);
|
||||
#+end_src
|
||||
|
@ -226,7 +226,7 @@ qmckl_get_mo_basis_coefficient (const qmckl_context context,
|
||||
|
||||
assert (ctx->mo_basis.coefficient != NULL);
|
||||
memcpy(coefficient, ctx->mo_basis.coefficient,
|
||||
ctx->ao_basis.ao_num * ctx->mo_basis.mo_num * sizeof(int64_t));
|
||||
ctx->ao_basis.ao_num * ctx->mo_basis.mo_num * sizeof(double));
|
||||
|
||||
return QMCKL_SUCCESS;
|
||||
}
|
||||
@ -529,7 +529,7 @@ integer function qmckl_compute_mo_basis_vgl_f(context, &
|
||||
double precision , intent(in) :: ao_vgl(ao_num,elec_num,5)
|
||||
double precision , intent(in) :: coef_normalized(ao_num,mo_num)
|
||||
double precision , intent(out) :: mo_vgl(mo_num,elec_num,5)
|
||||
logical*8 :: TransA, TransB
|
||||
character :: TransA, TransB
|
||||
double precision,dimension(:,:),allocatable :: mo_vgl_big
|
||||
double precision,dimension(:,:),allocatable :: ao_vgl_big
|
||||
!double precision,dimension(:,:),allocatable :: coef_trans
|
||||
@ -546,8 +546,8 @@ integer function qmckl_compute_mo_basis_vgl_f(context, &
|
||||
!allocate(coef_all(mo_num*ao_num))
|
||||
!allocate(coef_trans(mo_num,ao_num))
|
||||
|
||||
TransA = .True.
|
||||
TransB = .False.
|
||||
TransA = 'T'
|
||||
TransB = 'N'
|
||||
alpha = 1.0d0
|
||||
beta = 0.0d0
|
||||
|
||||
@ -761,45 +761,45 @@ rc = qmckl_set_ao_basis_prim_num (context, chbrclf_prim_num);
|
||||
assert(rc == QMCKL_SUCCESS);
|
||||
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(!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(!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(!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(!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(!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(!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(!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(!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);
|
||||
|
||||
rc = qmckl_set_ao_basis_ao_num(context, chbrclf_ao_num);
|
||||
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(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];
|
||||
|
||||
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);
|
||||
|
||||
/* Set up MO data */
|
||||
|
117824
org/qmckl_tests.org
117824
org/qmckl_tests.org
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
#+SETUPFILE: ../tools/theme.setup
|
||||
#+INCLUDE: ../tools/lib.org
|
||||
|
||||
The [[https://github.com/trex-coe/trexio][TREXIO library]] enables easy and efficient input/output of wave
|
||||
The [[https://trex-coe.github.io/trexio/trex.html][TREXIO library]] enables easy and efficient input/output of wave
|
||||
function parameters. In this section we provide high-level functions
|
||||
to prepare the context by reading the required data from a TREXIO file.
|
||||
|
||||
@ -200,7 +200,7 @@ qmckl_trexio_read_nucleus_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (nucl_charge != NULL);
|
||||
|
||||
rcio = trexio_read_nucleus_charge_64(file, nucl_charge);
|
||||
rcio = trexio_read_safe_nucleus_charge_64(file, nucl_charge, nucleus_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
@ -208,6 +208,7 @@ qmckl_trexio_read_nucleus_X(qmckl_context context, trexio_t* const file)
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
//rc = qmckl_set_nucleus_charge(context, nucl_charge, nucleus_num);
|
||||
rc = qmckl_set_nucleus_charge(context, nucl_charge);
|
||||
|
||||
qmckl_free(context, nucl_charge);
|
||||
@ -240,7 +241,7 @@ qmckl_trexio_read_nucleus_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (nucl_coord != NULL);
|
||||
|
||||
rcio = trexio_read_nucleus_coord_64(file, nucl_coord);
|
||||
rcio = trexio_read_safe_nucleus_coord_64(file, nucl_coord, 3*nucleus_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
@ -248,6 +249,7 @@ qmckl_trexio_read_nucleus_X(qmckl_context context, trexio_t* const file)
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
//rc = qmckl_set_nucleus_coord(context, 'N', nucl_coord, 3*nucleus_num);
|
||||
rc = qmckl_set_nucleus_coord(context, 'N', nucl_coord);
|
||||
|
||||
qmckl_free(context, nucl_coord);
|
||||
@ -322,7 +324,7 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
int64_t shell_num = 0L;
|
||||
|
||||
rcio = trexio_read_basis_num_64(file, &shell_num);
|
||||
rcio = trexio_read_basis_shell_num_64(file, &shell_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
@ -385,8 +387,9 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
mem_info.size = nucleus_num * sizeof(int64_t);
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = nucleus_num * sizeof(int64_t);
|
||||
int64_t* nucleus_index = (int64_t*) qmckl_malloc(context, mem_info);
|
||||
|
||||
if (nucleus_index == NULL) {
|
||||
@ -398,15 +401,57 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (nucleus_index != NULL);
|
||||
|
||||
rcio = trexio_read_basis_nucleus_index_64(file, nucleus_index);
|
||||
/* Allocate temporary array */
|
||||
mem_info.size = shell_num * sizeof(int64_t);
|
||||
int64_t* tmp_array = (int64_t*) qmckl_malloc(context, mem_info);
|
||||
|
||||
if (tmp_array == NULL) {
|
||||
qmckl_free(context, nucleus_index);
|
||||
nucleus_index = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
"qmckl_trexio_read_basis_nucleus_index_X",
|
||||
NULL);
|
||||
}
|
||||
|
||||
assert (tmp_array != NULL);
|
||||
|
||||
/* Read in the temporary array */
|
||||
rcio = trexio_read_safe_basis_nucleus_index_64(file, tmp_array, shell_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
qmckl_free(context, nucleus_index);
|
||||
nucleus_index = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_nucleus_index",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_nucleus_index(context, nucleus_index);
|
||||
/* Reformat data */
|
||||
rc = qmckl_set_ao_basis_nucleus_index(context, nucleus_index, nucleus_num);
|
||||
|
||||
for (int i=shell_num-1 ; i>=0 ; --i) {
|
||||
const int k = tmp_array[i];
|
||||
if (k < 0 || k >= nucleus_num) {
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
qmckl_free(context, nucleus_index);
|
||||
nucleus_index = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_nucleus_index",
|
||||
"Irrelevant data in TREXIO file");
|
||||
}
|
||||
nucleus_index[k] = i;
|
||||
}
|
||||
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
|
||||
/* Store data */
|
||||
rc = qmckl_set_ao_basis_nucleus_index(context, nucleus_index, shell_num);
|
||||
|
||||
qmckl_free(context, nucleus_index);
|
||||
nucleus_index = NULL;
|
||||
@ -421,8 +466,9 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
mem_info.size = nucleus_num * sizeof(int64_t);
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = nucleus_num * sizeof(int64_t);
|
||||
int64_t* nucleus_shell_num = (int64_t*) qmckl_malloc(context, mem_info);
|
||||
|
||||
if (nucleus_shell_num == NULL) {
|
||||
@ -434,15 +480,60 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (nucleus_shell_num != NULL);
|
||||
|
||||
rcio = trexio_read_basis_nucleus_shell_num_64(file, nucleus_shell_num);
|
||||
/* Allocate temporary array */
|
||||
mem_info.size = shell_num * sizeof(int64_t);
|
||||
int64_t* tmp_array = (int64_t*) qmckl_malloc(context, mem_info);
|
||||
|
||||
if (tmp_array == NULL) {
|
||||
qmckl_free(context, nucleus_shell_num);
|
||||
nucleus_shell_num = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
"qmckl_trexio_read_basis_nucleus_shell_num_X",
|
||||
NULL);
|
||||
}
|
||||
|
||||
assert (tmp_array != NULL);
|
||||
|
||||
|
||||
/* Read in the temporary array */
|
||||
rcio = trexio_read_safe_basis_nucleus_index_64(file, tmp_array, shell_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
qmckl_free(context, nucleus_shell_num);
|
||||
nucleus_shell_num = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_nucleus_shell_num",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_nucleus_shell_num(context, nucleus_shell_num);
|
||||
/* Reformat data */
|
||||
for (int i=0 ; i<nucleus_num ; ++i) {
|
||||
nucleus_shell_num[i] = 0;
|
||||
}
|
||||
|
||||
for (int i=0 ; i<shell_num ; ++i) {
|
||||
const int k = tmp_array[i];
|
||||
if (k < 0 || k >= nucleus_num) {
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
qmckl_free(context, nucleus_shell_num);
|
||||
nucleus_shell_num = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_nucleus_shell_num",
|
||||
"Irrelevant data in TREXIO file");
|
||||
}
|
||||
nucleus_shell_num[k] += 1;
|
||||
}
|
||||
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
|
||||
/* Store data */
|
||||
rc = qmckl_set_ao_basis_nucleus_shell_num(context, nucleus_shell_num, shell_num);
|
||||
|
||||
qmckl_free(context, nucleus_shell_num);
|
||||
nucleus_shell_num = NULL;
|
||||
@ -457,6 +548,8 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = shell_num * sizeof(int32_t);
|
||||
|
||||
int32_t* shell_ang_mom = (int32_t*) qmckl_malloc(context, mem_info);
|
||||
@ -470,15 +563,19 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (shell_ang_mom != NULL);
|
||||
|
||||
rcio = trexio_read_basis_shell_ang_mom_32(file, shell_ang_mom);
|
||||
/* Read data */
|
||||
rcio = trexio_read_safe_basis_shell_ang_mom_32(file, shell_ang_mom, shell_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, shell_ang_mom);
|
||||
shell_ang_mom = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_shell_ang_mom",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_shell_ang_mom(context, shell_ang_mom);
|
||||
/* Store data */
|
||||
rc = qmckl_set_ao_basis_shell_ang_mom(context, shell_ang_mom, shell_num);
|
||||
|
||||
qmckl_free(context, shell_ang_mom);
|
||||
shell_ang_mom = NULL;
|
||||
@ -493,6 +590,8 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = shell_num * sizeof(int64_t);
|
||||
|
||||
int64_t* shell_prim_num = (int64_t*) qmckl_malloc(context, mem_info);
|
||||
@ -506,15 +605,58 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (shell_prim_num != NULL);
|
||||
|
||||
rcio = trexio_read_basis_shell_prim_num_64(file, shell_prim_num);
|
||||
/* Allocate temporary array */
|
||||
mem_info.size = prim_num * sizeof(int64_t);
|
||||
|
||||
int64_t* tmp_array = (int64_t*) qmckl_malloc(context, mem_info);
|
||||
|
||||
if (tmp_array == NULL) {
|
||||
qmckl_free(context, shell_prim_num);
|
||||
shell_prim_num = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
"qmckl_trexio_read_basis_shell_prim_num_X",
|
||||
NULL);
|
||||
}
|
||||
|
||||
assert (tmp_array != NULL);
|
||||
|
||||
/* Read data */
|
||||
rcio = trexio_read_safe_basis_shell_index_64 (file, tmp_array, prim_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, shell_prim_num);
|
||||
shell_prim_num = NULL;
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_shell_prim_num",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_shell_prim_num(context, shell_prim_num);
|
||||
/* Reformat data */
|
||||
for (int i=0 ; i<shell_num ; ++i) {
|
||||
shell_prim_num[i] = 0;
|
||||
}
|
||||
|
||||
for (int i=0 ; i<prim_num ; ++i) {
|
||||
const int k = tmp_array[i];
|
||||
if (k < 0 || k >= shell_num) {
|
||||
qmckl_free(context, tmp_array);
|
||||
qmckl_free(context, shell_prim_num);
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_shell_prim_num",
|
||||
"Irrelevant data in TREXIO file");
|
||||
}
|
||||
shell_prim_num[k] += 1;
|
||||
}
|
||||
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
|
||||
/* Store data */
|
||||
rc = qmckl_set_ao_basis_shell_prim_num(context, shell_prim_num, shell_num);
|
||||
|
||||
qmckl_free(context, shell_prim_num);
|
||||
shell_prim_num = NULL;
|
||||
@ -529,6 +671,8 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = shell_num * sizeof(int64_t);
|
||||
|
||||
int64_t* shell_prim_index = (int64_t*) qmckl_malloc(context, mem_info);
|
||||
@ -542,15 +686,54 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (shell_prim_index != NULL);
|
||||
|
||||
rcio = trexio_read_basis_shell_prim_index_64(file, shell_prim_index);
|
||||
/* Allocate temporary array */
|
||||
mem_info.size = prim_num * sizeof(int64_t);
|
||||
|
||||
int64_t* tmp_array = (int64_t*) qmckl_malloc(context, mem_info);
|
||||
|
||||
if (tmp_array == NULL) {
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
"qmckl_trexio_read_basis_shell_prim_index_X",
|
||||
NULL);
|
||||
}
|
||||
|
||||
assert (tmp_array != NULL);
|
||||
|
||||
/* Read data */
|
||||
rcio = trexio_read_safe_basis_shell_index_64(file, tmp_array, prim_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, shell_prim_index);
|
||||
shell_prim_index = NULL;
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_shell_prim_index",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_shell_prim_index(context, shell_prim_index);
|
||||
/* Reformat data */
|
||||
for (int i=prim_num-1 ; i>=0 ; --i) {
|
||||
const int k = tmp_array[i];
|
||||
if (k < 0 || k >= shell_num) {
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
qmckl_free(context, shell_prim_index);
|
||||
shell_prim_index = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_shell_prim_index",
|
||||
"Irrelevant data in TREXIO file");
|
||||
}
|
||||
shell_prim_index[k] = i;
|
||||
}
|
||||
|
||||
qmckl_free(context, tmp_array);
|
||||
tmp_array = NULL;
|
||||
|
||||
/* Store data */
|
||||
rc = qmckl_set_ao_basis_shell_prim_index(context, shell_prim_index, shell_num);
|
||||
|
||||
qmckl_free(context, shell_prim_index);
|
||||
shell_prim_index = NULL;
|
||||
@ -565,6 +748,8 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = shell_num * sizeof(double);
|
||||
|
||||
double* shell_factor = (double*) qmckl_malloc(context, mem_info);
|
||||
@ -578,15 +763,19 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (shell_factor != NULL);
|
||||
|
||||
rcio = trexio_read_basis_shell_factor_64(file, shell_factor);
|
||||
/* Read data */
|
||||
rcio = trexio_read_safe_basis_shell_factor_64(file, shell_factor, shell_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, shell_factor);
|
||||
shell_factor = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_shell_factor",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_shell_factor(context, shell_factor);
|
||||
/* Store data */
|
||||
rc = qmckl_set_ao_basis_shell_factor(context, shell_factor, shell_num);
|
||||
|
||||
qmckl_free(context, shell_factor);
|
||||
shell_factor = NULL;
|
||||
@ -601,6 +790,8 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = prim_num * sizeof(double);
|
||||
|
||||
double* exponent = (double*) qmckl_malloc(context, mem_info);
|
||||
@ -614,15 +805,19 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (exponent != NULL);
|
||||
|
||||
rcio = trexio_read_basis_exponent_64(file, exponent);
|
||||
/* Read data */
|
||||
rcio = trexio_read_safe_basis_exponent_64(file, exponent, prim_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, exponent);
|
||||
exponent = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_exponent",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_exponent(context, exponent);
|
||||
/* Store data */
|
||||
rc = qmckl_set_ao_basis_exponent(context, exponent, prim_num);
|
||||
|
||||
qmckl_free(context, exponent);
|
||||
exponent = NULL;
|
||||
@ -637,6 +832,8 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = prim_num * sizeof(double);
|
||||
|
||||
double* coefficient = (double*) qmckl_malloc(context, mem_info);
|
||||
@ -650,15 +847,19 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (coefficient != NULL);
|
||||
|
||||
rcio = trexio_read_basis_coefficient_64(file, coefficient);
|
||||
/* Read data */
|
||||
rcio = trexio_read_safe_basis_coefficient_64(file, coefficient, prim_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, coefficient);
|
||||
coefficient = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_coefficient",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_coefficient(context, coefficient);
|
||||
/* Store data */
|
||||
rc = qmckl_set_ao_basis_coefficient(context, coefficient, prim_num);
|
||||
|
||||
qmckl_free(context, coefficient);
|
||||
coefficient = NULL;
|
||||
@ -673,6 +874,8 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = prim_num * sizeof(double);
|
||||
|
||||
double* prim_factor = (double*) qmckl_malloc(context, mem_info);
|
||||
@ -686,15 +889,19 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (prim_factor != NULL);
|
||||
|
||||
rcio = trexio_read_basis_prim_factor_64(file, prim_factor);
|
||||
/* Read data */
|
||||
rcio = trexio_read_safe_basis_prim_factor_64(file, prim_factor, prim_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, prim_factor);
|
||||
prim_factor = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_basis_prim_factor",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_prim_factor(context, prim_factor);
|
||||
/* Read data */
|
||||
rc = qmckl_set_ao_basis_prim_factor(context, prim_factor, prim_num);
|
||||
|
||||
qmckl_free(context, prim_factor);
|
||||
prim_factor = NULL;
|
||||
@ -708,6 +915,8 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
#+begin_src c :tangle (eval c)
|
||||
{
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
|
||||
/* Allocate array for data */
|
||||
mem_info.size = ao_num * sizeof(double);
|
||||
|
||||
double* ao_normalization = (double*) qmckl_malloc(context, mem_info);
|
||||
@ -721,15 +930,19 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
|
||||
assert (ao_normalization != NULL);
|
||||
|
||||
rcio = trexio_read_ao_normalization_64(file, ao_normalization);
|
||||
/* Read data */
|
||||
rcio = trexio_read_safe_ao_normalization_64(file, ao_normalization, ao_num);
|
||||
if (rcio != TREXIO_SUCCESS) {
|
||||
qmckl_free(context, ao_normalization);
|
||||
ao_normalization = NULL;
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_FAILURE,
|
||||
"trexio_read_ao_normalization",
|
||||
trexio_string_of_error(rcio));
|
||||
}
|
||||
|
||||
rc = qmckl_set_ao_basis_ao_factor(context, ao_normalization);
|
||||
/* Store data */
|
||||
rc = qmckl_set_ao_basis_ao_factor(context, ao_normalization, ao_num);
|
||||
|
||||
qmckl_free(context, ao_normalization);
|
||||
ao_normalization = NULL;
|
||||
@ -1115,7 +1328,9 @@ double * mo_coef = (double*) malloc (ao_num * mo_num * sizeof(double));
|
||||
rc = qmckl_get_mo_basis_coefficient(context, mo_coef, mo_num*ao_num);
|
||||
assert (rc == QMCKL_SUCCESS);
|
||||
for (int i=0 ; i<ao_num * mo_num ; i++) {
|
||||
assert (mo_coef[i] == chbrclf_mo_coef[i]);
|
||||
printf("%d %e %e %e\n", i, mo_coef[i], chbrclf_mo_coef[i],
|
||||
( fabs(mo_coef[i] - chbrclf_mo_coef[i])/fabs(mo_coef[i])) );
|
||||
assert ( fabs(mo_coef[i] - chbrclf_mo_coef[i])/fabs(mo_coef[i]) < 1.e-12 );
|
||||
}
|
||||
free(mo_coef);
|
||||
charge = NULL;
|
||||
|
@ -11,7 +11,6 @@ qmckl_local_energy.org
|
||||
qmckl_memory.org
|
||||
qmckl_mo.org
|
||||
qmckl_numprec.org
|
||||
qmckl_distance.org
|
||||
qmckl_nucleus.org
|
||||
qmckl_sherman_morrison_woodbury.org
|
||||
qmckl_utils.org
|
||||
|
1
share/doc/qmckl/html/index.html
Normal file
1
share/doc/qmckl/html/index.html
Normal file
@ -0,0 +1 @@
|
||||
<meta http-equiv="refresh" content="0;URL=README.html">
|
File diff suppressed because it is too large
Load Diff
@ -1,34 +1,37 @@
|
||||
rank_basis_nucleus_index 1
|
||||
dims_basis_nucleus_index 0 2
|
||||
rank_basis_nucleus_shell_num 1
|
||||
dims_basis_nucleus_shell_num 0 2
|
||||
dims_basis_nucleus_index 0 12
|
||||
rank_basis_shell_ang_mom 1
|
||||
dims_basis_shell_ang_mom 0 12
|
||||
rank_basis_shell_prim_num 1
|
||||
dims_basis_shell_prim_num 0 12
|
||||
rank_basis_shell_factor 1
|
||||
dims_basis_shell_factor 0 12
|
||||
rank_basis_shell_prim_index 1
|
||||
dims_basis_shell_prim_index 0 12
|
||||
rank_basis_shell_index 1
|
||||
dims_basis_shell_index 0 50
|
||||
rank_basis_exponent 1
|
||||
dims_basis_exponent 0 50
|
||||
rank_basis_coefficient 1
|
||||
dims_basis_coefficient 0 50
|
||||
rank_basis_prim_factor 1
|
||||
dims_basis_prim_factor 0 50
|
||||
basis_num_isSet 1
|
||||
basis_num 12
|
||||
basis_prim_num_isSet 1
|
||||
basis_prim_num 50
|
||||
basis_shell_num_isSet 1
|
||||
basis_shell_num 12
|
||||
len_basis_type 9
|
||||
basis_type
|
||||
Gaussian
|
||||
basis_nucleus_index
|
||||
0
|
||||
6
|
||||
basis_nucleus_shell_num
|
||||
6
|
||||
6
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
basis_shell_ang_mom
|
||||
0
|
||||
0
|
||||
@ -42,19 +45,6 @@ basis_shell_ang_mom
|
||||
1
|
||||
1
|
||||
2
|
||||
basis_shell_prim_num
|
||||
9
|
||||
9
|
||||
1
|
||||
4
|
||||
1
|
||||
1
|
||||
9
|
||||
9
|
||||
1
|
||||
4
|
||||
1
|
||||
1
|
||||
basis_shell_factor
|
||||
9.9999971897081508e-01
|
||||
9.9999963111699008e-01
|
||||
@ -68,19 +58,57 @@ basis_shell_factor
|
||||
1.0000002163655846e+00
|
||||
1.0000000000000000e+00
|
||||
1.0000000000000002e+00
|
||||
basis_shell_prim_index
|
||||
basis_shell_index
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
7
|
||||
7
|
||||
7
|
||||
7
|
||||
7
|
||||
7
|
||||
7
|
||||
7
|
||||
7
|
||||
8
|
||||
9
|
||||
18
|
||||
19
|
||||
23
|
||||
24
|
||||
25
|
||||
34
|
||||
43
|
||||
44
|
||||
48
|
||||
49
|
||||
9
|
||||
9
|
||||
9
|
||||
10
|
||||
11
|
||||
basis_exponent
|
||||
2.9400000000000000e+03
|
||||
4.4119999999999999e+02
|
||||
|
@ -4,7 +4,7 @@ metadata_code_num_isSet 0
|
||||
metadata_author_num_isSet 0
|
||||
len_metadata_package_version 6
|
||||
metadata_package_version
|
||||
1.1.0
|
||||
2.0.0
|
||||
len_metadata_description 0
|
||||
metadata_description
|
||||
metadata_code
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -7,6 +7,8 @@ rank_nucleus_label 1
|
||||
dims_nucleus_label 0 2
|
||||
nucleus_num_isSet 1
|
||||
nucleus_num 2
|
||||
nucleus_repulsion_isSet 1
|
||||
nucleus_repulsion 3.4507806369169232e+00
|
||||
len_nucleus_point_group 0
|
||||
nucleus_point_group
|
||||
nucleus_charge
|
||||
|
@ -1,40 +1,97 @@
|
||||
rank_basis_nucleus_index 1
|
||||
dims_basis_nucleus_index 0 5
|
||||
rank_basis_nucleus_shell_num 1
|
||||
dims_basis_nucleus_shell_num 0 5
|
||||
dims_basis_nucleus_index 0 72
|
||||
rank_basis_shell_ang_mom 1
|
||||
dims_basis_shell_ang_mom 0 72
|
||||
rank_basis_shell_prim_num 1
|
||||
dims_basis_shell_prim_num 0 72
|
||||
rank_basis_shell_factor 1
|
||||
dims_basis_shell_factor 0 72
|
||||
rank_basis_shell_prim_index 1
|
||||
dims_basis_shell_prim_index 0 72
|
||||
rank_basis_shell_index 1
|
||||
dims_basis_shell_index 0 297
|
||||
rank_basis_exponent 1
|
||||
dims_basis_exponent 0 297
|
||||
rank_basis_coefficient 1
|
||||
dims_basis_coefficient 0 297
|
||||
rank_basis_prim_factor 1
|
||||
dims_basis_prim_factor 0 297
|
||||
basis_num_isSet 1
|
||||
basis_num 72
|
||||
basis_prim_num_isSet 1
|
||||
basis_prim_num 297
|
||||
basis_shell_num_isSet 1
|
||||
basis_shell_num 72
|
||||
len_basis_type 9
|
||||
basis_type
|
||||
Gaussian
|
||||
basis_nucleus_index
|
||||
0
|
||||
14
|
||||
23
|
||||
37
|
||||
53
|
||||
basis_nucleus_shell_num
|
||||
14
|
||||
9
|
||||
14
|
||||
16
|
||||
19
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
basis_shell_ang_mom
|
||||
0
|
||||
0
|
||||
@ -108,79 +165,6 @@ basis_shell_ang_mom
|
||||
2
|
||||
3
|
||||
3
|
||||
basis_shell_prim_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
|
||||
10
|
||||
1
|
||||
1
|
||||
1
|
||||
5
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
15
|
||||
15
|
||||
15
|
||||
1
|
||||
1
|
||||
1
|
||||
9
|
||||
9
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
20
|
||||
20
|
||||
20
|
||||
20
|
||||
1
|
||||
1
|
||||
1
|
||||
13
|
||||
13
|
||||
13
|
||||
1
|
||||
1
|
||||
1
|
||||
8
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
basis_shell_factor
|
||||
9.9999973955019195e-01
|
||||
9.9999948164842034e-01
|
||||
@ -254,13 +238,83 @@ basis_shell_factor
|
||||
1.0000000000000002e+00
|
||||
1.0000000000000002e+00
|
||||
1.0000000000000002e+00
|
||||
basis_shell_prim_index
|
||||
basis_shell_index
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
14
|
||||
14
|
||||
14
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
23
|
||||
23
|
||||
23
|
||||
23
|
||||
23
|
||||
23
|
||||
23
|
||||
23
|
||||
23
|
||||
24
|
||||
24
|
||||
24
|
||||
24
|
||||
24
|
||||
24
|
||||
24
|
||||
24
|
||||
24
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
29
|
||||
30
|
||||
@ -270,63 +324,218 @@ basis_shell_prim_index
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
37
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
38
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
43
|
||||
43
|
||||
43
|
||||
43
|
||||
43
|
||||
43
|
||||
43
|
||||
43
|
||||
44
|
||||
44
|
||||
44
|
||||
44
|
||||
44
|
||||
44
|
||||
44
|
||||
44
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51
|
||||
52
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
53
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
54
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
55
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
56
|
||||
57
|
||||
58
|
||||
59
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
60
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
61
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
62
|
||||
63
|
||||
64
|
||||
65
|
||||
66
|
||||
66
|
||||
66
|
||||
66
|
||||
66
|
||||
66
|
||||
66
|
||||
66
|
||||
67
|
||||
68
|
||||
69
|
||||
70
|
||||
71
|
||||
72
|
||||
77
|
||||
78
|
||||
79
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
100
|
||||
115
|
||||
130
|
||||
131
|
||||
132
|
||||
133
|
||||
142
|
||||
151
|
||||
152
|
||||
153
|
||||
154
|
||||
155
|
||||
156
|
||||
157
|
||||
158
|
||||
159
|
||||
179
|
||||
199
|
||||
219
|
||||
239
|
||||
240
|
||||
241
|
||||
242
|
||||
255
|
||||
268
|
||||
281
|
||||
282
|
||||
283
|
||||
284
|
||||
292
|
||||
293
|
||||
294
|
||||
295
|
||||
296
|
||||
basis_exponent
|
||||
8.2360000000000000e+03
|
||||
1.2350000000000000e+03
|
||||
|
@ -4,7 +4,7 @@ metadata_code_num_isSet 0
|
||||
metadata_author_num_isSet 0
|
||||
len_metadata_package_version 6
|
||||
metadata_package_version
|
||||
0.3.0
|
||||
2.0.0
|
||||
len_metadata_description 0
|
||||
metadata_description
|
||||
metadata_code
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,6 +7,8 @@ rank_nucleus_label 1
|
||||
dims_nucleus_label 0 5
|
||||
nucleus_num_isSet 1
|
||||
nucleus_num 5
|
||||
nucleus_repulsion_isSet 1
|
||||
nucleus_repulsion 3.1823098794361579e+02
|
||||
len_nucleus_point_group 0
|
||||
nucleus_point_group
|
||||
nucleus_charge
|
||||
|
@ -236,15 +236,15 @@ def main():
|
||||
output+= ["",
|
||||
"## Test files",
|
||||
"",
|
||||
"$(header_tests): $(TANGLED_FILES)",
|
||||
"$(test_qmckl_fo): $(test_qmckl_f)"]
|
||||
output += ["",
|
||||
"check_PROGRAMS = $(TESTS)" ]
|
||||
for f in sorted(TESTS.keys()):
|
||||
prefix = "tests_" + f.rsplit("/",1)[-1]
|
||||
output += [ prefix + "_SOURCES = " + \
|
||||
" ".join(TESTS[f]),
|
||||
" ".join(TESTS[f]) + " $(header_tests)",
|
||||
prefix + "_LDADD = src/libqmckl.la",
|
||||
prefix + "_LDFLAGS = -no-install",
|
||||
"" ]
|
||||
|
||||
tmp = "EXTRA_DIST += "
|
||||
|
@ -19,17 +19,19 @@
|
||||
** Table of function arguments
|
||||
|
||||
#+NAME: test
|
||||
| ~qmckl_context~ | ~context~ | in | Global state |
|
||||
| ~char~ | ~transa~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~char~ | ~transb~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~int64_t~ | ~m~ | in | Number of points in the first set |
|
||||
| ~int64_t~ | ~n~ | in | Number of points in the second set |
|
||||
| ~double~ | ~A[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| ~int64_t~ | ~lda~ | in | Leading dimension of array ~A~ |
|
||||
| ~double~ | ~B[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| ~int64_t~ | ~ldb~ | in | Leading dimension of array ~B~ |
|
||||
| ~double~ | ~C[n][ldc]~ | out | Array containing the $m \times n$ matrix $C$ |
|
||||
| ~int64_t~ | ~ldc~ | in | Leading dimension of array ~C~ |
|
||||
| Variable | Type | In/Out | Description |
|
||||
|-----------+------------------+--------+-----------------------------------------------|
|
||||
| ~context~ | ~qmckl_context~ | in | Global state |
|
||||
| ~transa~ | ~char~ | in | Array ~A~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~transb~ | ~char~ | in | Array ~B~ is ~'N'~: Normal, ~'T'~: Transposed |
|
||||
| ~m~ | ~int64_t~ | in | Number of points in the first set |
|
||||
| ~n~ | ~int64_t~ | in | Number of points in the second set |
|
||||
| ~A~ | ~double[][lda]~ | in | Array containing the $m \times 3$ matrix $A$ |
|
||||
| ~lda~ | ~int64_t~ | in | Leading dimension of array ~A~ |
|
||||
| ~B~ | ~double[][ldb]~ | in | Array containing the $n \times 3$ matrix $B$ |
|
||||
| ~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~ |
|
||||
|
||||
|
||||
*** Fortran-C type conversions
|
||||
@ -57,8 +59,6 @@ ctypeid_d = { '' : ''
|
||||
, 'qmckl_exit_code' : 'integer(c_int32_t)'
|
||||
, 'integer' : 'integer(c_int32_t)'
|
||||
, 'integer*8' : 'integer(c_int64_t)'
|
||||
, 'integer' : 'integer(c_uint32_t)'
|
||||
, 'integer*8' : 'integer(c_uint64_t)'
|
||||
, 'real' : 'real(c_float)'
|
||||
, 'real*8' : 'real(c_double)'
|
||||
, 'character' : 'character(c_char)'
|
||||
@ -74,9 +74,9 @@ def parse_table(table):
|
||||
result = []
|
||||
|
||||
for line in [ [x.replace('~','') for x in y] for y in table]:
|
||||
d = { "c_type" : line[0],
|
||||
d = { "name" : line[0],
|
||||
"c_type" : line[1],
|
||||
"inout" : line[2].lower(),
|
||||
"name" : line[1],
|
||||
"comment" : line[3] }
|
||||
|
||||
# Handle inout
|
||||
@ -88,12 +88,12 @@ def parse_table(table):
|
||||
d["inout"] == "inout"
|
||||
|
||||
# Find dimensions (replace [] by [*] to get * in Fortran dimensions)
|
||||
dims = d["name"].replace("[]","[*]").split('[')
|
||||
dims = d["c_type"].replace("[]","[*]").split('[')
|
||||
d["rank"] = len(dims) - 1
|
||||
if d["rank"] == 0:
|
||||
d["dims"] = []
|
||||
else:
|
||||
d["name"] = d["name"].split('[')[0].strip()
|
||||
d["c_type"] = d["c_type"].split('[')[0].strip()
|
||||
d["dims"] = [ x.replace(']','').strip() for x in dims[1:] ]
|
||||
|
||||
result.append(d)
|
||||
@ -104,7 +104,7 @@ def parse_table(table):
|
||||
*** Generates a C header
|
||||
|
||||
#+NAME: generate_c_header
|
||||
#+BEGIN_SRC python :var table=test :var rettyp=[] :var fname=[] :results drawer :noweb yes :wrap "src c :tangle (eval h_func) :comments org"
|
||||
#+BEGIN_SRC python :var table=test :var rettyp="qmckl_exit_code" :var fname=[] :results drawer :noweb yes :wrap "src c :tangle (eval h_func) :comments org"
|
||||
<<parse_table>>
|
||||
|
||||
results = []
|
||||
@ -133,6 +133,23 @@ return template
|
||||
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: generate_c_header
|
||||
#+begin_src c :tangle (eval h_func) :comments org
|
||||
qmckl_exit_code [] (
|
||||
const qmckl_context context,
|
||||
const char transa,
|
||||
const char transb,
|
||||
const int64_t m,
|
||||
const int64_t n,
|
||||
const double* A,
|
||||
const int64_t lda,
|
||||
const double* B,
|
||||
const int64_t ldb,
|
||||
double* const C,
|
||||
const int64_t ldc );
|
||||
#+end_src
|
||||
|
||||
|
||||
*** Generates a C interface to the Fortran function
|
||||
|
||||
#+NAME: generate_c_interface
|
||||
|
Loading…
Reference in New Issue
Block a user