QMCBasisFunction Class Reference

This class stores all of the parameters that a gaussian basis set is constructed from for a MOLECULE. More...

#include <QMCBasisFunction.h>

List of all members.

Public Member Functions

 QMCBasisFunction ()
 Creates an instance of the class.
void initialize (QMCFlags *flags, QMCMolecule *molecule)
 Initializes the class with data input to control the calculation and provide the molecular geometry.
void evaluateBasisFunctions (Array2D< double > &X, Array2D< qmcfloat > &chi_value)
 Calculates the value of the basis funcions.
void angularGrid (Array2D< double > &grid, int nuc, Array2D< Array1D< double > > &angularCi)
 Psuedopotential grids all have a fixed radius from their nucleus, so we can precalculate the angular terms x^a y^b z^c at the very beginning of a run.
void basisFunctionsOnGrid (Array2D< double > &grid, int nuc, Array2D< Array1D< double > > &angularCi, Array2D< qmcfloat > &chi_val)
 This evaluates the basis functions at all the grid points.
void evaluateBasisFunctions (Array2D< double > &X, int start, int stop, Array2D< qmcfloat > &chi_value, Array2D< qmcfloat > &chi_grx, Array2D< qmcfloat > &chi_gry, Array2D< qmcfloat > &chi_grz, Array2D< qmcfloat > &chi_laplacian)
 Calculates the value, gradient, and Laplacian of the basis funcions.
void operator= (const QMCBasisFunction &rhs)
 Sets two QMCBasisFunctions objects equal.
void read (string runfile)
 Loads the state of the object from a file.
int getNumberBasisFunctions (int i)
 Returns how many basis functions are located on a specific atom.
QMCBasisFunctionCoefficientsgetBFCoeffs (int i)
 Returns the basis function coefficients for atom i.

Protected Attributes

QMCFlagsflags
QMCMoleculeMolecule
int N_BasisFunctions
Array1D
< QMCBasisFunctionCoefficients
BFCoeffs
 Array containing the QMCBasisFunctionCoefficients for all the atoms.
Array1D< double > Xcalc
Array2D< int > BFLookupTable

Private Member Functions

void initializeInterpolations ()
 Initializes the interpolations for the radial components of all basis functions.
void initializeInterpolation (int bfc_number, int orbital, CubicSplineWithGeometricProgressionGrid &S, int whichDerivative)
 Initializes the interpolation for the radial component of a basis function or it's derivatives.

Static Private Member Functions

static double radialFunction (QMCBasisFunctionCoefficients &BFC, int orbital, double r_sq)
 Radial part of a basis function.
static double radialFunctionFirstDerivative (QMCBasisFunctionCoefficients &BFC, int orbital, double r_sq)
 First derivative of the radial part of a basis function.
static double radialFunctionSecondDerivative (QMCBasisFunctionCoefficients &BFC, int orbital, double r_sq)
 Second derivative of the radial part of a basis function.

Private Attributes

Array2D
< CubicSplineWithGeometricProgressionGrid
RadialFunctionInterpolation
 Interpolation of the radial part of a basis function.
Array2D
< CubicSplineWithGeometricProgressionGrid
RadialFunctionFirstDerivativeInterpolation
 Interpolation of the first derivative of the radial part of a basis function.
Array2D
< CubicSplineWithGeometricProgressionGrid
RadialFunctionSecondDerivativeInterpolation
 Interpolation of the second derivative of the radial part of a basis function.
bool use_radial_interpolation
 Boolean flag indicating if the interpolated radial component of the basis functions should be used.

Friends

class QMCPsiPotential
istream & operator>> (istream &strm, QMCBasisFunction &rhs)
 Loads the state of the object from an input stream.
ostream & operator<< (ostream &strm, QMCBasisFunction &rhs)
 Writes the state of the object to an output stream.


Detailed Description

This class stores all of the parameters that a gaussian basis set is constructed from for a MOLECULE.

This contains a QMCBasisFunctionCoefficent for each atom type.

Definition at line 55 of file QMCBasisFunction.h.


Constructor & Destructor Documentation

QMCBasisFunction::QMCBasisFunction (  ) 

Creates an instance of the class.

Definition at line 36 of file QMCBasisFunction.cpp.


Member Function Documentation

void QMCBasisFunction::initialize ( QMCFlags flags,
QMCMolecule molecule 
)

Initializes the class with data input to control the calculation and provide the molecular geometry.

Parameters:
flags input control information
molecule information about the specific molecule

Definition at line 39 of file QMCBasisFunction.cpp.

References Array1D< T >::allocate(), flags, Molecule, and Xcalc.

Referenced by QMCInput::read().

void QMCBasisFunction::evaluateBasisFunctions ( Array2D< double > &  X,
Array2D< qmcfloat > &  chi_value 
)

void QMCBasisFunction::angularGrid ( Array2D< double > &  grid,
int  nuc,
Array2D< Array1D< double > > &  angularCi 
)

Psuedopotential grids all have a fixed radius from their nucleus, so we can precalculate the angular terms x^a y^b z^c at the very beginning of a run.

For basisfunctions that are not centered at the nucleus, we translate them to the nucleus, where the angular terms become: (rx-x0)^a (ry-y0)^b (rz-z0)^c

We then expand this out into a polynomial in powers of r.

It doesn't seem to be a significant performance improvement, but it seemed like a good idea.

Parameters:
grid the grid of points on the unit shell
nuc the nucleus index for our grid
angularCi (output) the coefficients Ci of the polynomials

Definition at line 574 of file QMCBasisFunction.cpp.

References QMCMolecule::Atom_Positions, BFCoeffs, Array1D< T >::dim1(), Array2D< T >::dim1(), flags, Molecule, N_BasisFunctions, and QMCFlags::Natoms.

Referenced by QMCPotential_Energy::initialize().

void QMCBasisFunction::basisFunctionsOnGrid ( Array2D< double > &  grid,
int  nuc,
Array2D< Array1D< double > > &  angularCi,
Array2D< qmcfloat > &  chi_val 
)

This evaluates the basis functions at all the grid points.

It takes advantage of the precalculated angular terms.

Parameters:
grid the grid of points on the unit shell
nuc the nucleus index for our grid
angularCi the coefficients Ci of the polynomials produced by angularGrid
angularCi (output) the evaluated basis functions

Definition at line 484 of file QMCBasisFunction.cpp.

References Array2D< T >::array(), Array1D< T >::array(), QMCMolecule::Atom_Positions, BFCoeffs, Array1D< T >::dim1(), Array2D< T >::dim1(), flags, Molecule, QMCFlags::Natoms, and Xcalc.

Referenced by QMCPotential_Energy::evaluatePsuedoPotential().

void QMCBasisFunction::evaluateBasisFunctions ( Array2D< double > &  X,
int  start,
int  stop,
Array2D< qmcfloat > &  chi_value,
Array2D< qmcfloat > &  chi_grx,
Array2D< qmcfloat > &  chi_gry,
Array2D< qmcfloat > &  chi_grz,
Array2D< qmcfloat > &  chi_laplacian 
)

Calculates the value, gradient, and Laplacian of the basis funcions.

Definition at line 287 of file QMCBasisFunction.cpp.

References Array1D< T >::array(), QMCMolecule::Atom_Positions, BFCoeffs, flags, Molecule, QMCFlags::Natoms, and Xcalc.

void QMCBasisFunction::operator= ( const QMCBasisFunction rhs  ) 

Sets two QMCBasisFunctions objects equal.

Parameters:
rhs object to set this object equal to

Definition at line 149 of file QMCBasisFunction.cpp.

References BFCoeffs, BFLookupTable, flags, Molecule, N_BasisFunctions, RadialFunctionFirstDerivativeInterpolation, RadialFunctionInterpolation, RadialFunctionSecondDerivativeInterpolation, use_radial_interpolation, and Xcalc.

void QMCBasisFunction::read ( string  runfile  ) 

Loads the state of the object from a file.

Parameters:
runfile file to load

Definition at line 217 of file QMCBasisFunction.cpp.

Referenced by QMCInput::read().

int QMCBasisFunction::getNumberBasisFunctions ( int  i  ) 

Returns how many basis functions are located on a specific atom.

This can probably be depricated once we have a good initialization scheme and not MikesJacked one.

Parameters:
i index of atom
Returns:
number of basis functions on the atom

Definition at line 167 of file QMCBasisFunction.cpp.

References BFCoeffs.

Referenced by QMCDansWalkerInitialization::assign_electrons_to_nuclei(), QMCMikesJackedWalkerInitialization::electrons_and_radii(), and QMCElectronNucleusCusp::fitReplacementOrbitals().

QMCBasisFunctionCoefficients * QMCBasisFunction::getBFCoeffs ( int  i  ) 

Returns the basis function coefficients for atom i.

Parameters:
i the index of the atom whose BF coefficients we want
Returns:
BFCoeffs of atom i

Definition at line 172 of file QMCBasisFunction.cpp.

References BFCoeffs.

Referenced by QMCElectronNucleusCusp::fitReplacementOrbitals().

double QMCBasisFunction::radialFunction ( QMCBasisFunctionCoefficients BFC,
int  orbital,
double  r_sq 
) [static, private]

Radial part of a basis function.

A basis function can be factored into $x^{i}y^{j}z^{k}\theta(r)$ where $\theta(r)$ is the radial portion of the basis function. The function is in terms of $r^2$ instead of $r$ to make it's evaluation faster. To evaluate $\theta(r)$, evaluate the function at $r^2$.

Definition at line 238 of file QMCBasisFunction.cpp.

References QMCBasisFunctionCoefficients::Coeffs, and QMCBasisFunctionCoefficients::N_Gauss.

Referenced by initializeInterpolation().

double QMCBasisFunction::radialFunctionFirstDerivative ( QMCBasisFunctionCoefficients BFC,
int  orbital,
double  r_sq 
) [static, private]

First derivative of the radial part of a basis function.

A basis function can be factored into $x^{i}y^{j}z^{k}\theta(r)$ where $\theta(r)$ is the radial portion of the basis function. The function is in terms of $r^2$ instead of $r$ to make it's evaluation faster. To evaluate $\theta'(r)$, evaluate the function at $r^2$.

Definition at line 256 of file QMCBasisFunction.cpp.

References QMCBasisFunctionCoefficients::Coeffs, and QMCBasisFunctionCoefficients::N_Gauss.

Referenced by initializeInterpolation().

double QMCBasisFunction::radialFunctionSecondDerivative ( QMCBasisFunctionCoefficients BFC,
int  orbital,
double  r_sq 
) [static, private]

Second derivative of the radial part of a basis function.

A basis function can be factored into $x^{i}y^{j}z^{k}\theta(r)$ where $\theta(r)$ is the radial portion of the basis function. The function is in terms of $r^2$ instead of $r$ to make it's evaluation faster. To evaluate $\theta'(r)$, evaluate the function at $r^2$.

Definition at line 273 of file QMCBasisFunction.cpp.

References QMCBasisFunctionCoefficients::Coeffs, and QMCBasisFunctionCoefficients::N_Gauss.

Referenced by initializeInterpolation().

void QMCBasisFunction::initializeInterpolations (  )  [private]

void QMCBasisFunction::initializeInterpolation ( int  bfc_number,
int  orbital,
CubicSplineWithGeometricProgressionGrid S,
int  whichDerivative 
) [private]

Initializes the interpolation for the radial component of a basis function or it's derivatives.

Parameters:
S class used to interpolate the function.
whichDerivative the derivative of the radial function to calculate the interpolation for.

Definition at line 102 of file QMCBasisFunction.cpp.

References QMCFlags::basis_function_interpolation_first_point, BFCoeffs, Array1D< T >::dim1(), flags, CubicSpline::initializeWithFunctionValues(), QMCFlags::number_basis_function_interpolation_grid_points, radialFunction(), radialFunctionFirstDerivative(), radialFunctionSecondDerivative(), and CubicSplineWithGeometricProgressionGrid::setGridParameters().

Referenced by initializeInterpolations().


Friends And Related Function Documentation

friend class QMCPsiPotential [friend]

Definition at line 58 of file QMCBasisFunction.h.

istream& operator>> ( istream &  strm,
QMCBasisFunction rhs 
) [friend]

Loads the state of the object from an input stream.

read in coefficients

Definition at line 177 of file QMCBasisFunction.cpp.

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

Writes the state of the object to an output stream.

Definition at line 208 of file QMCBasisFunction.cpp.


Member Data Documentation

Definition at line 173 of file QMCBasisFunction.h.

Referenced by angularGrid(), operator=(), and operator>>().

Array1D<double> QMCBasisFunction::Xcalc [protected]

Definition at line 183 of file QMCBasisFunction.h.

Referenced by operator=(), and operator>>().

Interpolation of the radial part of a basis function.

A basis function can be factored into $x^{i}y^{j}z^{k}\theta(r)$ where $\theta(r)$ is the radial portion of the basis function. The interpolation is in terms of $r^2$ instead of $r$ to make it's evaluation faster. To evaluate $\theta(r)$, evaluate the interpolation at $r^2$.

Definition at line 225 of file QMCBasisFunction.h.

Referenced by initializeInterpolations(), and operator=().

Interpolation of the first derivative of the radial part of a basis function.

A basis function can be factored into $x^{i}y^{j}z^{k}\theta(r)$ where $\theta(r)$ is the radial portion of the basis function. The interpolation is in terms of $r^2$ instead of $r$ to make it's evaluation faster. To evaluate $\theta'(r)$, evaluate the interpolation at $r^2$.

Definition at line 236 of file QMCBasisFunction.h.

Referenced by initializeInterpolations(), and operator=().

Interpolation of the second derivative of the radial part of a basis function.

A basis function can be factored into $x^{i}y^{j}z^{k}\theta(r)$ where $\theta(r)$ is the radial portion of the basis function. The interpolation is in terms of $r^2$ instead of $r$ to make it's evaluation faster. To evaluate $\theta''(r)$, evaluate the interpolation at $r^2$.

Definition at line 247 of file QMCBasisFunction.h.

Referenced by initializeInterpolations(), and operator=().

Boolean flag indicating if the interpolated radial component of the basis functions should be used.

Definition at line 253 of file QMCBasisFunction.h.

Referenced by initializeInterpolations(), and operator=().


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

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