Handles the single particle wave functions in a matrix. More...
#include <slater.h>
Public Member Functions | |
Slater (Config *config, Orbital *orbitals[], bool spinUp_) | |
double | determinant (vec2 r[]) |
void | constructMatrix (vec2 r[]) |
Slater::constructMatrix constructs the matrix by use of the orbitals and particle positions. | |
mat | matrix () |
mat | inverse () |
void | updateInverse (vec2 &particlePosition, int movedParticle) |
Slater::updateInverse changes the parts of the inverse matrix affected by the moved particle's new position. | |
void | calculateInverseNumerically () |
Slater::calculateInverseNumerically Calculates the inverse numerically given the current matrix. Uses Armadillo to calculate the inverse and listens to exceptions due to singular matrices. | |
void | setPreviousMovedParticle (int movedParticle) |
Slater::setPreviousMovedParticle not used, left for reference. | |
double | ratio (vec2 &particlePosition, int movedParticle) |
void | acceptMove (int movedParticle) |
Slater::acceptMove updates the internal positions and sets the previous matrix and inverse to the current. | |
void | initialize (vec2 positions[]) |
Slater::initialize constructs the matrix and calculates the inverse numerically. | |
double | laplace (vec2 r[]) |
Slater::laplace calculates the Slater-Laplace ratio analytically as described in the project paper. | |
void | gradient (vec2 r[], vec &rGradient) |
Slater::gradient calculates the Slater gradient ratio analytically as described in the project paper. | |
bool | hasParticle (int particleNumber) const |
Slater::hasParticle checks if a particle number is considered a part of this Slater determinant based on whether this is a spin up or down determinant. | |
void | rejectMove () |
Slater::rejectMove resets the current matrix to the previous and resets positions as well. | |
void | updateMatrix (vec2 &particlePosition, int movedParticle) |
Slater::updateMatrix changes the parts of the matrix affected by the moved particle's new position. |
Handles the single particle wave functions in a matrix.
Also calculates the inverse and the determinant of this matrix.
void Slater::acceptMove | ( | int | movedParticle | ) |
Slater::acceptMove updates the internal positions and sets the previous matrix and inverse to the current.
movedParticle |
void Slater::constructMatrix | ( | vec2 | r[] | ) |
Slater::constructMatrix constructs the matrix by use of the orbitals and particle positions.
void Slater::gradient | ( | vec2 | r[], |
vec & | rGradient | ||
) |
Slater::gradient calculates the Slater gradient ratio analytically as described in the project paper.
r | |
rGradient | a reference to a vec object that should store the gradient - must be of nDimensions * nParticles size from before |
bool Slater::hasParticle | ( | int | particleNumber | ) | const |
Slater::hasParticle checks if a particle number is considered a part of this Slater determinant based on whether this is a spin up or down determinant.
particleNumber |
void Slater::initialize | ( | vec2 | positions[] | ) |
Slater::initialize constructs the matrix and calculates the inverse numerically.
positions |
double Slater::laplace | ( | vec2 | r[] | ) |
Slater::laplace calculates the Slater-Laplace ratio analytically as described in the project paper.
r |
double Slater::ratio | ( | vec2 & | particlePosition, |
int | movedParticle | ||
) |
void Slater::setPreviousMovedParticle | ( | int | movedParticle | ) |
Slater::setPreviousMovedParticle not used, left for reference.
movedParticle |
void Slater::updateInverse | ( | vec2 & | particlePosition, |
int | movedParticle | ||
) |
Slater::updateInverse changes the parts of the inverse matrix affected by the moved particle's new position.
particlePosition | The new position for the moved particle |
movedParticle | The index of the moved particle |
void Slater::updateMatrix | ( | vec2 & | particlePosition, |
int | movedParticle | ||
) |
Slater::updateMatrix changes the parts of the matrix affected by the moved particle's new position.
particlePosition | The new position for the moved particle |
movedParticle | The index of the moved particle |