1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-07-18 17:03:43 +02:00
qmckl/org/qmckl_slater_determinant.org

108 lines
3.5 KiB
Org Mode
Raw Normal View History

2021-10-04 09:54:34 +02:00
#+TITLE: Slater Determinant
#+SETUPFILE: ../tools/theme.setup
#+INCLUDE: ../tools/lib.org
2021-10-04 15:42:22 +02:00
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\]).
2021-10-04 09:54:34 +02:00
2021-10-04 15:42:22 +02:00
ψ(x) = det|ϕ₁(x₁)...ϕᵢ(yᵢ)...ϕₙ(xₙ)|
2021-10-04 09:54:34 +02:00
2021-10-04 15:42:22 +02:00
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 <stdbool.h>
#+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 <stdio.h>
#include <math.h>
#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 <stdint.h>
#elif HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <assert.h>
#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 |
|-------------------+------------------------------------------+----------------------------------------------------------------------------------------|