#+TITLE: Slater Determinant #+SETUPFILE: ../tools/theme.setup #+INCLUDE: ../tools/lib.org The slater deteminant is required for the calculation of the wavefunction, gradient, and derivatives. These quantities will be used to calculate the local Energy (\[E_L\]). ψ(x) = det|ϕ₁(x₁)...ϕᵢ(yᵢ)...ϕₙ(xₙ)| Concerning the gradient and laplacian, in fact what is actually calculated is the ratio of the gradient/laplacian and the determinant of the slater matrix: ∇ψ(x)/ψ(x) and ∇²ψ(x)/ψ(x) This avoids the unnecessary multiplication and division of by the determinant ψ(x). * Headers :noexport: #+begin_src elisp :noexport :results none (org-babel-lob-ingest "../tools/lib.org") #+end_src #+begin_src c :tangle (eval h_private_type) #ifndef QMCKL_MO_HPT #define QMCKL_MO_HPT #include #+end_src #+begin_src c :tangle (eval c_test) :noweb yes #include "qmckl.h" #include "assert.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "chbrclf.h" #include "qmckl_ao_private_func.h" #include "qmckl_mo_private_func.h" #include "qmckl_slater_determinant_private_func.h" int main() { qmckl_context context; context = qmckl_context_create(); qmckl_exit_code rc; #+end_src #+begin_src c :tangle (eval c) #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_STDINT_H #include #elif HAVE_INTTYPES_H #include #endif #include #include #include #include #include "qmckl.h" #include "qmckl_context_private_type.h" #include "qmckl_memory_private_type.h" #include "qmckl_memory_private_func.h" #include "qmckl_ao_private_type.h" #include "qmckl_ao_private_func.h" #include "qmckl_mo_private_type.h" #include "qmckl_mo_private_func.h" #include "qmckl_slater_determinant_private_type.h" #include "qmckl_slater_determinant_private_func.h" #+end_src * Context The following arrays are stored in the context: |-----------------+-------------------------------+------------------------------------| | ~type~ | ~char~ | α (~'A'~) or β (~'B'~) determinant | | ~walk_num~ | ~uint64_t~ | Number of walkers | | ~det_num~ | ~uint64_t~ | Number of determinants per walker | | ~fermi_num~ | ~uint64_t~ | Number of number of fermions | | ~mo_index_list~ | ~mo_index[walk_num][det_num]~ | Index of MOs for each walker | Computed data: |-------------------+------------------------------------------+----------------------------------------------------------------------------------------| | ~det_matrix_list~ | ~[walk_num][det_num][mo_num][fermi_num]~ | The slater matrix for each determinant of each walker. | |-------------------+------------------------------------------+----------------------------------------------------------------------------------------| | ~det_vgl~ | ~[5][walk_num][det_num]~ | Value, gradients, Laplacian of the MOs at electron positions | | ~det_vgl_date~ | ~uint64_t~ | Late modification date of Value, gradients, Laplacian of the MOs at electron positions | |-------------------+------------------------------------------+----------------------------------------------------------------------------------------|