15 KiB
Slater Determinant
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).
Context
The following arrays are stored in the context:
type |
char |
α ('A' ) or β ('B' ) determinant |
walk_num |
int64_t |
Number of walkers |
det_num |
int64_t |
Number of determinants per walker |
fermi_num |
int64_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 |
int64_t |
Late modification date of Value, gradients, Laplacian of the MOs at electron positions |
Data structure
typedef struct qmckl_determinant_struct {
char type;
int64_t walk_num;
int64_t det_num;
int64_t fermi_num;
int64_t* mo_index_list;
double * det_matrix_list;
double * det_vgl;
int64_t det_vgl_date;
int32_t uninitialized;
bool provided;
} qmckl_determinant_struct;
The uninitialized
integer contains one bit set to one for each
initialization function which has not been called. It becomes equal
to zero after all initialization functions have been called. The
struct is then initialized and provided == true
.
Some values are initialized by default, and are not concerned by
this mechanism.
Access functions
When all the data for the slater determinants have been provided, the following
function returns true
.
bool qmckl_mo_basis_provided (const qmckl_context context);
#+NAME:post
Initialization functions
To set the basis set, all the following functions need to be called.
qmckl_exit_code qmckl_set_determinant_type (const qmckl_context context, const char *t);
qmckl_exit_code qmckl_set_determinant_walk_num (const qmckl_context context, const int64_t walk_num);
qmckl_exit_code qmckl_set_determinant_det_num (const qmckl_context context, const int64_t det_num);
qmckl_exit_code qmckl_set_determinant_fermi_num (const qmckl_context context, const int64_t fermi_num);
qmckl_exit_code qmckl_set_determinant_mo_index_list (const qmckl_context context, const int64_t* mo_index_list);
#+NAME:pre2
#+NAME:post2
When the basis set is completely entered, other data structures are computed to accelerate the calculations.
Fortran Interfaces
Test
Computation
Get
qmckl_context |
context |
in | Global state |
double |
det_vgl[5][walk_num][det_num] |
out | Value, gradients and Laplacian of the MOs |
qmckl_exit_code qmckl_get_determinant_det_vgl(qmckl_context context, double* const det_vgl);
qmckl_exit_code qmckl_compute_get_determinant_det_vgl (
const qmckl_context context,
double* const det_vgl );