Public Member Functions
Slater Class Reference

Handles the single particle wave functions in a matrix. More...

#include <slater.h>

List of all members.

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.

Detailed Description

Handles the single particle wave functions in a matrix.

Also calculates the inverse and the determinant of this matrix.


Member Function Documentation

void Slater::acceptMove ( int  movedParticle)

Slater::acceptMove updates the internal positions and sets the previous matrix and inverse to the current.

Parameters:
movedParticle
void Slater::constructMatrix ( vec2  r[])

Slater::constructMatrix constructs the matrix by use of the orbitals and particle positions.

Note:
The first half of the particles have spin up, while the others have spin down.
void Slater::gradient ( vec2  r[],
vec &  rGradient 
)

Slater::gradient calculates the Slater gradient ratio analytically as described in the project paper.

Parameters:
r
rGradienta 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.

Parameters:
particleNumber
Returns:
true if part of this determinant.
void Slater::initialize ( vec2  positions[])

Slater::initialize constructs the matrix and calculates the inverse numerically.

Parameters:
positions
double Slater::laplace ( vec2  r[])

Slater::laplace calculates the Slater-Laplace ratio analytically as described in the project paper.

Parameters:
r
Returns:
the value of the Slater-Laplace ratio
double Slater::ratio ( vec2 &  particlePosition,
int  movedParticle 
)
Note:
The first half of the particles have spin up, while the others have spin down.
Warning:
Call updateMatrix() before calling this function!
void Slater::setPreviousMovedParticle ( int  movedParticle)

Slater::setPreviousMovedParticle not used, left for reference.

Parameters:
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.

Parameters:
particlePositionThe new position for the moved particle
movedParticleThe index of the moved particle
Warning:
You need to run updateMatrix() before calling this function.
void Slater::updateMatrix ( vec2 &  particlePosition,
int  movedParticle 
)

Slater::updateMatrix changes the parts of the matrix affected by the moved particle's new position.

Parameters:
particlePositionThe new position for the moved particle
movedParticleThe index of the moved particle

The documentation for this class was generated from the following files:
 All Classes Functions