QMCElectronNucleusCuspParameters Class Reference

A container for the parameters for replacing a Gaussian orbital with an exponential function in the region of a nucleus. More...

#include <QMCElectronNucleusCuspParameters.h>

List of all members.

Public Member Functions

 QMCElectronNucleusCuspParameters ()
 Initializes the parameters with default values.
void replaceOrbitalValues (double x, double y, double z, double r, double &orb_value, double &orb_gradx, double &orb_grady, double &orb_gradz, double &orb_laplacian)
 Replaces the original orbital values with those of the replacement orbital in the Slater determinant.
void replaceOrbitalValues (double x, double y, double z, double r, double &orb_value)
void fitReplacementOrbital (double temp_phi0)
 This function fits the parameters of the replacement orbital based on the value and derivatives of the original orbital at the radius of correction.
void initialize (const Array2D< qmcfloat > &temp_OrbitalCoefficients, double temp_n0, double temp_rc, const Polynomial &temp_idealCurve, int temp_Z)
 Sets the coefficients of the original orbital, the nuclear charge, and the value of the part of the orbital due to basis functions centered on other.
double get_rc ()
 Gets the radius of correction for this replacement orbital.
void set_rc (double temp_rc)
 Sets the radius of correction for this replacement orbital.
double getSigmaSq ()
 Gets the square of the maximum deviation of the replacement local energy from the ideal curve.
void operator= (const QMCElectronNucleusCuspParameters &rhs)
 Sets this object equal to another one.
void printParameters ()
 Prints out the parameters of this replacement orbital.

Private Member Functions

void evaluateOriginalOrbital (double x, double y, double z, double r, double &orig_value, double &orig_gradx, double &orig_grady, double &orig_gradz, double &orig_laplacian)
 Calculates the value, gradient, and laplacian of the original orbital.
void evaluateOriginalOrbital (double x, double y, double z, double r, double &orig_value)
void evaluateReplacementOrbital (double x, double y, double z, double r, double &rep_value, double &rep_gradx, double &rep_grady, double &rep_gradz, double &rep_laplacian)
 Calculates the value, gradient, and laplacian of the replacement orbital.
void evaluateReplacementOrbital (double x, double y, double z, double r, double &rep_value)
double calculateLocalEnergy (double r, bool rIsZero)
 Calculates the local energy of the replacement orbital at r.
void calculateSigmaSq ()
 Calculates the square deviation of the local energy of the replacement orbital from the ideal curve.
void findMaxDeviation (double lower, double upper, bool lowerBoundZero, double &max)
 Finds the maximum deviation of the local energy of the replacement orbital from the ideal curve on the interval lower to upper.

Private Attributes

double rc
 The radius of correction.
Polynomial alpha
 The polynomial in r.
Polynomial idealCurve
 The ideal local energy of the orbital.
double C
 This is a constant shift so that the exponential always has the same sign.
bool noC
 This variable is true if C == 0.0 (Parts of some formulas cancel out if this is true, and equality conditions involving doubles are bad form).
int sgn0
 sgn0=+/-1 depending on the sign of the orbital at the nucleus.
double sigma_sq
 The square of the max deviation of the local energy of the corrected orbital from the ideal curve.
double phi0
 The value of the corrected orbital at the nucleus.
double n0
 The value of the part of the orbital due to basis functions centered on other nuclei evaluated at this nucleus.
int Z
 The charge of the nucleus.
double Zeff
 The effective nuclear charge used to calculate the local energy of the replacement orbital.
Array2D< qmcfloatorbitalCoefficients
 The exponents and expansion coefficients of the part of the orbital due to s type Gaussians centered on this nucleus.

Friends

ostream & operator<< (ostream &strm, QMCElectronNucleusCuspParameters &rhs)
 Formats and prints the replacement orbital to a stream.


Detailed Description

A container for the parameters for replacing a Gaussian orbital with an exponential function in the region of a nucleus.

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\).

Definition at line 32 of file QMCElectronNucleusCuspParameters.h.


Constructor & Destructor Documentation

QMCElectronNucleusCuspParameters::QMCElectronNucleusCuspParameters (  ) 

Initializes the parameters with default values.

Definition at line 15 of file QMCElectronNucleusCuspParameters.cpp.

References C, noC, rc, sgn0, sigma_sq, Z, and Zeff.


Member Function Documentation

void QMCElectronNucleusCuspParameters::evaluateOriginalOrbital ( double  x,
double  y,
double  z,
double  r,
double &  orig_value,
double &  orig_gradx,
double &  orig_grady,
double &  orig_gradz,
double &  orig_laplacian 
) [private]

Calculates the value, gradient, and laplacian of the original orbital.

These values must be subtracted from the appropriate elements of the Slater determinant and replaced with those of the new orbital.

Parameters:
x the x coordinate of the electron
y the y coordinate of the electron
z the z coordinate of the electron
r the distance of the electron from the nucleus
orig_value the value of the original orbital
orig_gradx the x gradient of the original orbital
orig_grady the y gradient of the original orbital
orig_gradz the z gradient of the original orbital
orig_laplacian the laplacian of the original orbital

Definition at line 178 of file QMCElectronNucleusCuspParameters.cpp.

References orbitalCoefficients.

Referenced by printParameters(), and replaceOrbitalValues().

void QMCElectronNucleusCuspParameters::evaluateOriginalOrbital ( double  x,
double  y,
double  z,
double  r,
double &  orig_value 
) [private]

Definition at line 219 of file QMCElectronNucleusCuspParameters.cpp.

References orbitalCoefficients.

void QMCElectronNucleusCuspParameters::evaluateReplacementOrbital ( double  x,
double  y,
double  z,
double  r,
double &  rep_value,
double &  rep_gradx,
double &  rep_grady,
double &  rep_gradz,
double &  rep_laplacian 
) [private]

Calculates the value, gradient, and laplacian of the replacement orbital.

These values replace those calculated from the s type Gaussian basis functions centered on this nucleus.

Parameters:
x the x coordinate of the electron
y the y coordinate of the electron
z the z coordinate of the electron
r the distance of the electron from the nucleus
rep_value the value of the replacement orbital
rep_gradx the x gradient of the replacement orbital
rep_grady the y gradient of the replacement orbital
rep_gradz the z gradient of the replacement orbital
rep_laplacian the laplacian of the replacement orbital

Definition at line 246 of file QMCElectronNucleusCuspParameters.cpp.

References alpha, C, Polynomial::evaluate(), Polynomial::getFirstDerivativeValue(), Polynomial::getFunctionValue(), Polynomial::getSecondDerivativeValue(), and sgn0.

Referenced by printParameters(), and replaceOrbitalValues().

void QMCElectronNucleusCuspParameters::evaluateReplacementOrbital ( double  x,
double  y,
double  z,
double  r,
double &  rep_value 
) [private]

double QMCElectronNucleusCuspParameters::calculateLocalEnergy ( double  r,
bool  rIsZero 
) [private]

Calculates the local energy of the replacement orbital at r.

Definition at line 287 of file QMCElectronNucleusCuspParameters.cpp.

References alpha, C, Polynomial::evaluate(), Polynomial::getFirstDerivativeValue(), Polynomial::getFunctionValue(), Polynomial::getSecondDerivativeValue(), noC, sgn0, and Zeff.

Referenced by findMaxDeviation(), and printParameters().

void QMCElectronNucleusCuspParameters::calculateSigmaSq (  )  [private]

Calculates the square deviation of the local energy of the replacement orbital from the ideal curve.

Definition at line 465 of file QMCElectronNucleusCuspParameters.cpp.

References alpha, C, Array1D< T >::dim1(), findMaxDeviation(), Polynomial::getCoefficients(), Polynomial::getRoots(), Polynomial::initialize(), noC, rc, and sigma_sq.

Referenced by fitReplacementOrbital().

void QMCElectronNucleusCuspParameters::findMaxDeviation ( double  lower,
double  upper,
bool  lowerBoundZero,
double &  max 
) [private]

Finds the maximum deviation of the local energy of the replacement orbital from the ideal curve on the interval lower to upper.

Parameters:
lower the lower bound of the interval
upper the upper bound of the interval
lowerBoundZero is true if the lower bound is zero
max the maximum deviation on the interval

Definition at line 529 of file QMCElectronNucleusCuspParameters.cpp.

References calculateLocalEnergy(), Polynomial::evaluate(), Polynomial::getFunctionValue(), GOLD, idealCurve, and Z.

Referenced by calculateSigmaSq().

void QMCElectronNucleusCuspParameters::replaceOrbitalValues ( double  x,
double  y,
double  z,
double  r,
double &  orb_value,
double &  orb_gradx,
double &  orb_grady,
double &  orb_gradz,
double &  orb_laplacian 
)

Replaces the original orbital values with those of the replacement orbital in the Slater determinant.

Parameters:
x the x coordinate of the electron
y the y coordinate of the electron
z the z coordinate of the electron
r the distance from the electron to the nucleus
orb_value the value of the orbital
orb_gradx the x gradient of the orbital
orb_grady the y gradient of the orbital
orb_gradz the z gradient of the orbital
orb_laplacian the laplacian of the orbital

Definition at line 107 of file QMCElectronNucleusCuspParameters.cpp.

References evaluateOriginalOrbital(), evaluateReplacementOrbital(), and rc.

void QMCElectronNucleusCuspParameters::replaceOrbitalValues ( double  x,
double  y,
double  z,
double  r,
double &  orb_value 
)

void QMCElectronNucleusCuspParameters::fitReplacementOrbital ( double  temp_phi0  ) 

This function fits the parameters of the replacement orbital based on the value and derivatives of the original orbital at the radius of correction.

Parameters:
temp_phi0 the value of the replacement orbital at the nucleus.

Definition at line 331 of file QMCElectronNucleusCuspParameters.cpp.

References Array1D< T >::allocate(), alpha, C, calculateSigmaSq(), Array1D< T >::deallocate(), Polynomial::initialize(), n0, noC, orbitalCoefficients, phi0, rc, sgn0, Z, and Zeff.

Referenced by QMCElectronNucleusCusp::fitOrbitalParameters().

void QMCElectronNucleusCuspParameters::initialize ( const Array2D< qmcfloat > &  temp_OrbitalCoefficients,
double  temp_n0,
double  temp_rc,
const Polynomial temp_idealCurve,
int  temp_Z 
)

Sets the coefficients of the original orbital, the nuclear charge, and the value of the part of the orbital due to basis functions centered on other.

nuclei at this nucleus.

Parameters:
temp_OrbitalCoefficients the part of the orbital arising from s type Gaussian basis functions centered on this nucleus.
temp_idealCurve the ideal local energy curve
temp_Z the charge of the nucleus
temp_n0 the value of the part of the orbital due to basis functions centered on other nuclei at this nucleus.

Definition at line 47 of file QMCElectronNucleusCuspParameters.cpp.

References idealCurve, n0, orbitalCoefficients, rc, and Z.

Referenced by QMCElectronNucleusCusp::fitOrbitalParameters().

double QMCElectronNucleusCuspParameters::get_rc (  ) 

Gets the radius of correction for this replacement orbital.

Returns:
rc the radius of correction

Definition at line 74 of file QMCElectronNucleusCuspParameters.cpp.

References rc.

void QMCElectronNucleusCuspParameters::set_rc ( double  temp_rc  ) 

Sets the radius of correction for this replacement orbital.

Parameters:
temp_rc the radius of correction

Definition at line 95 of file QMCElectronNucleusCuspParameters.cpp.

References rc.

Referenced by QMCElectronNucleusCusp::fitReplacementOrbitals().

double QMCElectronNucleusCuspParameters::getSigmaSq (  ) 

Gets the square of the maximum deviation of the replacement local energy from the ideal curve.

Returns:
sigma_sq the square of the maximum deviation of the replacement local energy from the ideal curve

Definition at line 84 of file QMCElectronNucleusCuspParameters.cpp.

References sigma_sq.

Referenced by QMCElectronNucleusCusp::fitOrbitalParameters().

void QMCElectronNucleusCuspParameters::operator= ( const QMCElectronNucleusCuspParameters rhs  ) 

Sets this object equal to another one.

Parameters:
rhs the set of parameters to set this object equal to

Definition at line 26 of file QMCElectronNucleusCuspParameters.cpp.

References alpha, C, idealCurve, n0, noC, orbitalCoefficients, phi0, rc, sgn0, sigma_sq, Z, and Zeff.

void QMCElectronNucleusCuspParameters::printParameters (  ) 


Friends And Related Function Documentation

ostream& operator<< ( ostream &  strm,
QMCElectronNucleusCuspParameters rhs 
) [friend]

Formats and prints the replacement orbital to a stream.

Definition at line 657 of file QMCElectronNucleusCuspParameters.cpp.


Member Data Documentation

The ideal local energy of the orbital.

Definition at line 48 of file QMCElectronNucleusCuspParameters.h.

Referenced by findMaxDeviation(), initialize(), operator=(), and printParameters().

This is a constant shift so that the exponential always has the same sign.

Definition at line 53 of file QMCElectronNucleusCuspParameters.h.

Referenced by calculateLocalEnergy(), calculateSigmaSq(), evaluateReplacementOrbital(), fitReplacementOrbital(), operator=(), printParameters(), and QMCElectronNucleusCuspParameters().

This variable is true if C == 0.0 (Parts of some formulas cancel out if this is true, and equality conditions involving doubles are bad form).

Definition at line 59 of file QMCElectronNucleusCuspParameters.h.

Referenced by calculateLocalEnergy(), calculateSigmaSq(), fitReplacementOrbital(), operator=(), and QMCElectronNucleusCuspParameters().

sgn0=+/-1 depending on the sign of the orbital at the nucleus.

Definition at line 64 of file QMCElectronNucleusCuspParameters.h.

Referenced by calculateLocalEnergy(), evaluateReplacementOrbital(), fitReplacementOrbital(), operator=(), printParameters(), and QMCElectronNucleusCuspParameters().

The square of the max deviation of the local energy of the corrected orbital from the ideal curve.

Definition at line 70 of file QMCElectronNucleusCuspParameters.h.

Referenced by calculateSigmaSq(), getSigmaSq(), operator=(), printParameters(), and QMCElectronNucleusCuspParameters().

The value of the corrected orbital at the nucleus.

Definition at line 75 of file QMCElectronNucleusCuspParameters.h.

Referenced by fitReplacementOrbital(), operator=(), and printParameters().

The value of the part of the orbital due to basis functions centered on other nuclei evaluated at this nucleus.

Definition at line 81 of file QMCElectronNucleusCuspParameters.h.

Referenced by fitReplacementOrbital(), initialize(), operator=(), and printParameters().

The effective nuclear charge used to calculate the local energy of the replacement orbital.

Definition at line 92 of file QMCElectronNucleusCuspParameters.h.

Referenced by calculateLocalEnergy(), fitReplacementOrbital(), operator=(), printParameters(), and QMCElectronNucleusCuspParameters().

The exponents and expansion coefficients of the part of the orbital due to s type Gaussians centered on this nucleus.

This array is used to calculate the contribution of this part of the original orbital when an electron is within the radius of correction. It is not used to fit the parameters of the replacement orbital.

Definition at line 101 of file QMCElectronNucleusCuspParameters.h.

Referenced by evaluateOriginalOrbital(), fitReplacementOrbital(), initialize(), operator=(), and printParameters().


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

Generated on Sat Jul 5 16:14:03 2008 for QMcBeaver by  doxygen 1.5.6