#include <QMCElectronNucleusCusp.h>
Public Member Functions | |
QMCElectronNucleusCusp () | |
void | initialize (QMCInput *input, const Array2D< qmcfloat > &WFCoeffs) |
void | replaceCusps (Array2D< double > &X, int Start, int Stop, Array2D< qmcfloat > &D, Array2D< qmcfloat > &GradX, Array2D< qmcfloat > &GradY, Array2D< qmcfloat > &GradZ, Array2D< qmcfloat > &Laplacian_D) |
Replaces the entries in the Slater, gradient, and laplacian matrices arising from electrons that are too close to nuclei. | |
void | replaceCusps (Array2D< double > &X, int Start, int Stop, Array2D< qmcfloat > &D) |
void | fitReplacementOrbitals () |
Fits exponential functions for each orbital in the region of each nucleus. | |
void | operator= (const QMCElectronNucleusCusp &rhs) |
Sets this object equal to another QMCElectronNucleusCusp. | |
Private Member Functions | |
void | determineRc () |
Determines the radius of correction for a certain nucleus and orbital. | |
void | setSTypeCoeffs (int nuc, int orb) |
Gets the exponential and expansion coefficients of the part of the orbital due to the s type basis functions centered on the nucleus. | |
double | getOrigLocalEnergy (double r_orig) |
Calculates the local energy of the original orbital at r_orig. | |
double | evaluateOrigOrbital (double r_orig) |
Evaluates the original orbital at r_orig and returns its value. | |
double | getOrigGradient (double r_orig) |
Evaluates the gradient of the original orbital at r_orig and returns its value. | |
QMCElectronNucleusCuspParameters | fitOrbitalParameters () |
Fits the replacement orbital to the original orbital at rc. | |
Private Attributes | |
QMCInput * | Input |
Array2D < QMCElectronNucleusCuspParameters > | ORParams |
This array holds the parameters of the exponential functions for each nucleus and orbital. | |
Array2D< qmcfloat > | ORWF_coeffs |
This is the array of wavefunction coefficients. | |
QMCBasisFunction * | BF |
QMCBasisFunctionCoefficients * | BF_coeffs |
QMCMolecule * | Molecule |
Array2D< qmcfloat > | sTypeCoeffs |
This array holds the exponential and expansion coefficients for the part of an orbital arising from the s type Gaussian basis functions centered on a nucleus. | |
Polynomial | idealCurve |
The ideal curve is a benchmark for judging the behavior of the local energy of the original and replacement orbitals. | |
Array1D< double > | idealCurveParams |
The array of ideal curve parameters. | |
int | Z |
The charge of the nucleus we are considering. | |
int | norbitals |
int | natoms |
double | rc |
The radius of correction for a certain nucleus and orbital. | |
double | n0 |
The value of the orbital due to basis functions centered on other nuclei at this nucleus. | |
Friends | |
ostream & | operator<< (ostream &strm, QMCElectronNucleusCusp &rhs) |
Formats and prints the replacement orbitals to a stream. |
The new function is defined as \( =C+sgn0*exp(p(r)) \), where \(C\) is a constant, \(sgn0=+/-1\), and \(p(r)\) is a polynomial in \(r\). The value and first and second derivatives of the exponential orbital are fit to the original orbital at the radius of correction.
Definition at line 39 of file QMCElectronNucleusCusp.h.
QMCElectronNucleusCusp::QMCElectronNucleusCusp | ( | ) |
Definition at line 15 of file QMCElectronNucleusCusp.cpp.
void QMCElectronNucleusCusp::determineRc | ( | ) | [private] |
Determines the radius of correction for a certain nucleus and orbital.
The radius of correction is where the local energy of the orbital deviates from the ideal curve by more than a tolerance amount. Fits the ideal curve at rc.
Definition at line 172 of file QMCElectronNucleusCusp.cpp.
References Array1D< T >::allocate(), Polynomial::evaluate(), evaluateOrigOrbital(), Polynomial::getFunctionValue(), getOrigGradient(), getOrigLocalEnergy(), idealCurve, idealCurveParams, Polynomial::initialize(), rc, and Z.
Referenced by fitReplacementOrbitals().
void QMCElectronNucleusCusp::setSTypeCoeffs | ( | int | nuc, | |
int | orb | |||
) | [private] |
Gets the exponential and expansion coefficients of the part of the orbital due to the s type basis functions centered on the nucleus.
Also calculates n0, which is the value of the orbital due to basis functions centered on other nuclei at this nucleus.
nuc | the index of the nucleus | |
orb | the index of the orbital |
double QMCElectronNucleusCusp::getOrigLocalEnergy | ( | double | r_orig | ) | [private] |
Calculates the local energy of the original orbital at r_orig.
r_orig | the distance from the nucleus. |
Definition at line 694 of file QMCElectronNucleusCusp.cpp.
References sTypeCoeffs, and Z.
Referenced by determineRc().
double QMCElectronNucleusCusp::evaluateOrigOrbital | ( | double | r_orig | ) | [private] |
Evaluates the original orbital at r_orig and returns its value.
r_orig | the distance from the nucleus |
Definition at line 743 of file QMCElectronNucleusCusp.cpp.
References sTypeCoeffs.
Referenced by determineRc(), and fitOrbitalParameters().
double QMCElectronNucleusCusp::getOrigGradient | ( | double | r_orig | ) | [private] |
Evaluates the gradient of the original orbital at r_orig and returns its value.
r_orig | the distance from the nucleus |
Definition at line 721 of file QMCElectronNucleusCusp.cpp.
References sTypeCoeffs.
Referenced by determineRc().
QMCElectronNucleusCuspParameters QMCElectronNucleusCusp::fitOrbitalParameters | ( | ) | [private] |
Fits the replacement orbital to the original orbital at rc.
Minimizes the deviation of the local energy of the replacement orbital from the ideal curve with respect to its value at the nucleus.
Definition at line 424 of file QMCElectronNucleusCusp.cpp.
References evaluateOrigOrbital(), QMCElectronNucleusCuspParameters::fitReplacementOrbital(), QMCElectronNucleusCuspParameters::getSigmaSq(), GOLD, idealCurve, QMCElectronNucleusCuspParameters::initialize(), n0, rc, sTypeCoeffs, and Z.
Referenced by fitReplacementOrbitals().
Definition at line 33 of file QMCElectronNucleusCusp.cpp.
References Array2D< T >::allocate(), QMCInput::BF, BF, QMCMolecule::getNumberAtoms(), Input, QMCInput::Molecule, Molecule, natoms, norbitals, ORParams, and ORWF_coeffs.
Referenced by QMCSlater::initialize(), and QMCPotential_Energy::initialize().
void QMCElectronNucleusCusp::replaceCusps | ( | Array2D< double > & | X, | |
int | Start, | |||
int | Stop, | |||
Array2D< qmcfloat > & | D, | |||
Array2D< qmcfloat > & | GradX, | |||
Array2D< qmcfloat > & | GradY, | |||
Array2D< qmcfloat > & | GradZ, | |||
Array2D< qmcfloat > & | Laplacian_D | |||
) |
Replaces the entries in the Slater, gradient, and laplacian matrices arising from electrons that are too close to nuclei.
X | the array of positions of the electrons | |
D | the Slater matrix | |
Grad_D | the gradient matrix | |
Laplacian_D | the laplacian matrix |
Definition at line 580 of file QMCElectronNucleusCusp.cpp.
References QMCMolecule::Atom_Positions, Array2D< T >::dim1(), Molecule, natoms, norbitals, and ORParams.
Referenced by QMCSlater::evaluate(), and QMCPotential_Energy::evaluatePsuedoPotential().
void QMCElectronNucleusCusp::replaceCusps | ( | Array2D< double > & | X, | |
int | Start, | |||
int | Stop, | |||
Array2D< qmcfloat > & | D | |||
) |
Definition at line 643 of file QMCElectronNucleusCusp.cpp.
References QMCMolecule::Atom_Positions, Array2D< T >::dim1(), Molecule, natoms, norbitals, and ORParams.
void QMCElectronNucleusCusp::fitReplacementOrbitals | ( | ) |
Fits exponential functions for each orbital in the region of each nucleus.
Definition at line 46 of file QMCElectronNucleusCusp.cpp.
References QMCMolecule::Atom_Positions, BF, BF_coeffs, QMCBasisFunctionCoefficients::Coeffs, determineRc(), fitOrbitalParameters(), QMCBasisFunction::getBFCoeffs(), QMCBasisFunction::getNumberBasisFunctions(), QMCBasisFunctionCoefficients::getNumberBasisFunctions(), Molecule, n0, QMCBasisFunctionCoefficients::N_Gauss, natoms, norbitals, ORParams, ORWF_coeffs, QMCElectronNucleusCuspParameters::set_rc(), sTypeCoeffs, QMCBasisFunctionCoefficients::Type, QMCBasisFunctionCoefficients::xyz_powers, QMCMolecule::Z, and Z.
Referenced by QMCSlater::initialize(), and QMCPotential_Energy::initialize().
void QMCElectronNucleusCusp::operator= | ( | const QMCElectronNucleusCusp & | rhs | ) |
Sets this object equal to another QMCElectronNucleusCusp.
rhs | the object to set this one equal to |
Definition at line 19 of file QMCElectronNucleusCusp.cpp.
References BF, Input, Molecule, natoms, norbitals, ORParams, and ORWF_coeffs.
ostream& operator<< | ( | ostream & | strm, | |
QMCElectronNucleusCusp & | rhs | |||
) | [friend] |
Formats and prints the replacement orbitals to a stream.
Definition at line 765 of file QMCElectronNucleusCusp.cpp.
QMCInput* QMCElectronNucleusCusp::Input [private] |
Definition at line 43 of file QMCElectronNucleusCusp.h.
Referenced by initialize(), and operator=().
This array holds the parameters of the exponential functions for each nucleus and orbital.
The indexes are (nucleus,orbital).
Definition at line 49 of file QMCElectronNucleusCusp.h.
Referenced by fitReplacementOrbitals(), initialize(), operator=(), and replaceCusps().
Array2D<qmcfloat> QMCElectronNucleusCusp::ORWF_coeffs [private] |
This is the array of wavefunction coefficients.
Definition at line 54 of file QMCElectronNucleusCusp.h.
Referenced by fitReplacementOrbitals(), initialize(), and operator=().
QMCBasisFunction* QMCElectronNucleusCusp::BF [private] |
Definition at line 56 of file QMCElectronNucleusCusp.h.
Referenced by fitReplacementOrbitals(), initialize(), and operator=().
QMCMolecule* QMCElectronNucleusCusp::Molecule [private] |
Definition at line 58 of file QMCElectronNucleusCusp.h.
Referenced by fitReplacementOrbitals(), initialize(), operator=(), and replaceCusps().
Array2D<qmcfloat> QMCElectronNucleusCusp::sTypeCoeffs [private] |
This array holds the exponential and expansion coefficients for the part of an orbital arising from the s type Gaussian basis functions centered on a nucleus.
Definition at line 65 of file QMCElectronNucleusCusp.h.
Referenced by evaluateOrigOrbital(), fitOrbitalParameters(), fitReplacementOrbitals(), getOrigGradient(), and getOrigLocalEnergy().
Polynomial QMCElectronNucleusCusp::idealCurve [private] |
The ideal curve is a benchmark for judging the behavior of the local energy of the original and replacement orbitals.
Definition at line 71 of file QMCElectronNucleusCusp.h.
Referenced by determineRc(), and fitOrbitalParameters().
Array1D<double> QMCElectronNucleusCusp::idealCurveParams [private] |
The array of ideal curve parameters.
Definition at line 76 of file QMCElectronNucleusCusp.h.
Referenced by determineRc().
int QMCElectronNucleusCusp::Z [private] |
The charge of the nucleus we are considering.
Definition at line 81 of file QMCElectronNucleusCusp.h.
Referenced by determineRc(), fitOrbitalParameters(), fitReplacementOrbitals(), and getOrigLocalEnergy().
int QMCElectronNucleusCusp::norbitals [private] |
Definition at line 83 of file QMCElectronNucleusCusp.h.
Referenced by fitReplacementOrbitals(), initialize(), operator=(), and replaceCusps().
int QMCElectronNucleusCusp::natoms [private] |
Definition at line 83 of file QMCElectronNucleusCusp.h.
Referenced by fitReplacementOrbitals(), initialize(), operator=(), and replaceCusps().
double QMCElectronNucleusCusp::rc [private] |
The radius of correction for a certain nucleus and orbital.
Definition at line 88 of file QMCElectronNucleusCusp.h.
Referenced by determineRc(), and fitOrbitalParameters().
double QMCElectronNucleusCusp::n0 [private] |
The value of the orbital due to basis functions centered on other nuclei at this nucleus.
Definition at line 94 of file QMCElectronNucleusCusp.h.
Referenced by fitOrbitalParameters(), and fitReplacementOrbitals().