#include <QMCDansWalkerInitialization.h>
Public Member Functions | |
~QMCDansWalkerInitialization () | |
QMCDansWalkerInitialization (QMCInput *input) | |
Creates an instance of the class and initializes it. | |
Array2D< double > | initializeWalkerPosition () |
Generates an initial configuration of the electrons. | |
Private Member Functions | |
Array2D< double > | dist_energy_level (int Z, int n, int nalpha, int nbeta) |
Distributes electrons in an energy level and gives them a random rotation. | |
Array2D< int > | assign_electrons_to_nuclei () |
From the wavefunction, decides how many alpha and beta electrons are on each nucleus. | |
Array2D< double > | dist_center (int atomic_charge, int n_e, int n_a, int n_b) |
Distributes electrons around a nucleus. | |
double | generatePhiCoordinate (int index) |
Generates a phi coordinate with respect to the distribution indicated by the index. | |
double | generateThetaCoordinate (int index) |
Generates a theta coordinate with respect to the distribution indicated by the index. | |
Array1D< double > | generateRadialDistances (int Z, int n, int nelecs) |
Generates radial coordinates for each electron with respect to the distribution for the indicated atomic charge and energy level. | |
Static Private Member Functions | |
static void | initializeArrays () |
Private Attributes | |
QMCInput * | Input |
Static Private Attributes | |
static Array1D< CubicSpline > | phiSplines |
The array of cubic splines made for the phi distributions made from the data in the AngleDistributions class. | |
static Array1D< int > | phiSplinesMade |
The phiSplinesMade array indicates if a spline has been made for a distribution. | |
static Array1D< CubicSpline > | thetaSplines |
The array of cubic splines made for the theta distributions made from the data in the AngleDistributions class. | |
static Array1D< int > | thetaSplinesMade |
The thetaSplinesMade array indicates if a spline has been made for a distribution. | |
static Array2D< CubicSpline > | radialSplines |
The array of cubic splines made for the radial distributions made from the data in the RadialDistributions class. | |
static Array2D< int > | radialSplinesMade |
The radialSplinesMade array indicates if a spline has been made for a distribution. | |
static Array1D< double > | x_array |
The x_array goes from 0 to 1 in steps of .05 and is the same for all distributions. | |
static bool | arraysInitialized = false |
Definition at line 18 of file QMCDansWalkerInitialization.h.
QMCDansWalkerInitialization::~QMCDansWalkerInitialization | ( | ) |
Definition at line 18 of file QMCDansWalkerInitialization.cpp.
References arraysInitialized, Array2D< T >::deallocate(), Array1D< T >::deallocate(), phiSplines, phiSplinesMade, radialSplines, radialSplinesMade, thetaSplines, thetaSplinesMade, and x_array.
QMCDansWalkerInitialization::QMCDansWalkerInitialization | ( | QMCInput * | input | ) |
Creates an instance of the class and initializes it.
input | input data for the calculation. |
Definition at line 8 of file QMCDansWalkerInitialization.cpp.
References arraysInitialized, initializeArrays(), and Input.
Array2D< double > QMCDansWalkerInitialization::initializeWalkerPosition | ( | ) | [virtual] |
Generates an initial configuration of the electrons.
Implements QMCInitializeWalker.
Definition at line 62 of file QMCDansWalkerInitialization.cpp.
References Array2D< T >::allocate(), assign_electrons_to_nuclei(), QMCMolecule::Atom_Positions, dist_center(), QMCInput::flags, QMCWavefunction::getNumberElectrons(), Input, QMCInput::Molecule, QMCFlags::Natoms, QMCInput::WF, and QMCMolecule::Z.
void QMCDansWalkerInitialization::initializeArrays | ( | ) | [static, private] |
Definition at line 44 of file QMCDansWalkerInitialization.cpp.
References Array2D< T >::allocate(), Array1D< T >::allocate(), phiSplines, phiSplinesMade, radialSplines, radialSplinesMade, thetaSplines, thetaSplinesMade, and x_array.
Referenced by QMCDansWalkerInitialization().
Array2D< double > QMCDansWalkerInitialization::dist_energy_level | ( | int | Z, | |
int | n, | |||
int | nalpha, | |||
int | nbeta | |||
) | [private] |
Distributes electrons in an energy level and gives them a random rotation.
Z | atomic charge of the nucleus. | |
n | energy level. | |
nalpha | number of alpha electrons. | |
nbeta | number of beta electrons. |
Definition at line 632 of file QMCDansWalkerInitialization.cpp.
References generatePhiCoordinate(), generateRadialDistances(), generateThetaCoordinate(), PI, ran, Array1D< T >::rotate(), Random::sindev(), and Random::unidev().
Referenced by dist_center().
Array2D< int > QMCDansWalkerInitialization::assign_electrons_to_nuclei | ( | ) | [private] |
From the wavefunction, decides how many alpha and beta electrons are on each nucleus.
Definition at line 458 of file QMCDansWalkerInitialization.cpp.
References QMCWavefunction::AlphaOccupation, QMCWavefunction::BetaOccupation, QMCInput::BF, QMCWavefunction::CI_coeffs, QMCInput::flags, QMCBasisFunction::getNumberBasisFunctions(), QMCWavefunction::getNumberBasisFunctions(), QMCWavefunction::getNumberDeterminants(), QMCWavefunction::getNumberOrbitals(), QMCWavefunction::getUnusedIndicator(), Input, QMCFlags::Natoms, QMCWavefunction::OrbitalCoeffs, ran, Random::unidev(), and QMCInput::WF.
Referenced by initializeWalkerPosition().
Array2D< double > QMCDansWalkerInitialization::dist_center | ( | int | atomic_charge, | |
int | n_e, | |||
int | n_a, | |||
int | n_b | |||
) | [private] |
Distributes electrons around a nucleus.
atomic_charge | atomic charge of the nucleus. total number of electrons. number of alpha electrons. number of beta electrons. |
Definition at line 566 of file QMCDansWalkerInitialization.cpp.
References dist_energy_level().
Referenced by initializeWalkerPosition().
double QMCDansWalkerInitialization::generatePhiCoordinate | ( | int | index | ) | [private] |
Generates a phi coordinate with respect to the distribution indicated by the index.
If no spline has been made yet for that distribution, it is made.
index | of the distribution. |
Definition at line 734 of file QMCDansWalkerInitialization.cpp.
References AngleDistributions::getPhiArray(), phiSplines, phiSplinesMade, PI, ran, Random::unidev(), and x_array.
Referenced by dist_energy_level().
double QMCDansWalkerInitialization::generateThetaCoordinate | ( | int | index | ) | [private] |
Generates a theta coordinate with respect to the distribution indicated by the index.
If no spline has been made for that distribution, it is made.
index | of the distribution. |
Definition at line 808 of file QMCDansWalkerInitialization.cpp.
References AngleDistributions::getThetaArray(), ran, Random::sindev(), thetaSplines, thetaSplinesMade, Random::unidev(), and x_array.
Referenced by dist_energy_level().
Array1D< double > QMCDansWalkerInitialization::generateRadialDistances | ( | int | Z, | |
int | n, | |||
int | nelecs | |||
) | [private] |
Generates radial coordinates for each electron with respect to the distribution for the indicated atomic charge and energy level.
Z | atomic charge. | |
n | energy level. | |
nelecs | number of electrons. |
Definition at line 902 of file QMCDansWalkerInitialization.cpp.
References RadialDistributions::getRadialArray(), radialSplines, radialSplinesMade, ran, Random::unidev(), and x_array.
Referenced by dist_energy_level().
QMCInput* QMCDansWalkerInitialization::Input [private] |
Definition at line 38 of file QMCDansWalkerInitialization.h.
Referenced by assign_electrons_to_nuclei(), initializeWalkerPosition(), and QMCDansWalkerInitialization().
Array1D< CubicSpline > QMCDansWalkerInitialization::phiSplines [static, private] |
The array of cubic splines made for the phi distributions made from the data in the AngleDistributions class.
Definition at line 44 of file QMCDansWalkerInitialization.h.
Referenced by generatePhiCoordinate(), initializeArrays(), and ~QMCDansWalkerInitialization().
Array1D< int > QMCDansWalkerInitialization::phiSplinesMade [static, private] |
The phiSplinesMade array indicates if a spline has been made for a distribution.
The element equals 0 if no spline has been made, and 1 if a spline has been made.
Definition at line 51 of file QMCDansWalkerInitialization.h.
Referenced by generatePhiCoordinate(), initializeArrays(), and ~QMCDansWalkerInitialization().
Array1D< CubicSpline > QMCDansWalkerInitialization::thetaSplines [static, private] |
The array of cubic splines made for the theta distributions made from the data in the AngleDistributions class.
Definition at line 57 of file QMCDansWalkerInitialization.h.
Referenced by generateThetaCoordinate(), initializeArrays(), and ~QMCDansWalkerInitialization().
Array1D< int > QMCDansWalkerInitialization::thetaSplinesMade [static, private] |
The thetaSplinesMade array indicates if a spline has been made for a distribution.
The element equals 0 if no spline has been made, and 1 if a spline has been made.
Definition at line 64 of file QMCDansWalkerInitialization.h.
Referenced by generateThetaCoordinate(), initializeArrays(), and ~QMCDansWalkerInitialization().
Array2D< CubicSpline > QMCDansWalkerInitialization::radialSplines [static, private] |
The array of cubic splines made for the radial distributions made from the data in the RadialDistributions class.
Definition at line 70 of file QMCDansWalkerInitialization.h.
Referenced by generateRadialDistances(), initializeArrays(), and ~QMCDansWalkerInitialization().
Array2D< int > QMCDansWalkerInitialization::radialSplinesMade [static, private] |
The radialSplinesMade array indicates if a spline has been made for a distribution.
The element equals 0 if no spline has been made, and 1 if a spline has been made.
Definition at line 77 of file QMCDansWalkerInitialization.h.
Referenced by generateRadialDistances(), initializeArrays(), and ~QMCDansWalkerInitialization().
Array1D< double > QMCDansWalkerInitialization::x_array [static, private] |
The x_array goes from 0 to 1 in steps of .05 and is the same for all distributions.
Definition at line 83 of file QMCDansWalkerInitialization.h.
Referenced by generatePhiCoordinate(), generateRadialDistances(), generateThetaCoordinate(), initializeArrays(), and ~QMCDansWalkerInitialization().
bool QMCDansWalkerInitialization::arraysInitialized = false [static, private] |
Definition at line 87 of file QMCDansWalkerInitialization.h.
Referenced by QMCDansWalkerInitialization(), and ~QMCDansWalkerInitialization().