QMCNuclearForces Class Reference

This class will measure the nuclear forces for the system. More...

#include <QMCNuclearForces.h>

List of all members.

Public Member Functions

 QMCNuclearForces ()
 Creates an instance of the class.
 ~QMCNuclearForces ()
void initialize (QMCInput *input)
 Initialize the object.
void evaluate (Array1D< QMCWalkerData * > &walkerData, Array1D< Array2D< double > * > &xData, int num)
 This is the function that will be evaluated for each sampling.
void evaluate (QMCWalkerData &walkerData, Array2D< double > &xData)
 This is the function that is probably only going to be called during initialization.
double getTemperTerm (int nuc, int q, double r)
void calcCoefficients (int whichNucleus)
 As described in CCZ05, we will be using a polynomial as a part of the tempering term used to calculate the force in Eq.
void waveMemorization (int whichNucleus, int numKnots, double radialCutoff)
 This function is only called when we're using the Slater modification described in Eq.
void calculateNuclearContributions ()
 Since the force terms that depend upon 2 nuclei don't change in a calculation, we only want to calculate them once.
void getDensities (Array2D< double > &X, Array1D< qmcfloat > &densities)
 For a series of electronic coordinates, this function will calculate the density.
void printCubeLengths (Array2D< double > &points)
 A debugging function.
void printPoints (Array2D< double > &points)
 A debugging function.
void generateCube (Array2D< double > &cube, double length)
 This will create a cube centered at the origin.
void randomlyRotate (Array2D< double > &points, double scale)
 This will take the cube centered at the origin and give it a random rotation preserving the distance between the vertices as well as the center.
void operator= (const QMCNuclearForces &rhs)
 Sets two QMCNuclearForces objects equal.

Static Public Member Functions

static int getNumBins ()
 This is an arbitrary choice, so it can be static.

Private Attributes

QMCInputInput
QMCBasisFunctionBF
QMCWavefunctionWF
double fittingWeightM
 This is the m parameter 'm' used in CCZ05.
double numSamplesPerArea
 We want to know how many sample points per unit area on the surface of the shell to use for each knot point.
Array1D< int > numPolyBasisF
 This is the basis set size 'M' from CCZ05.
Array2D< Array1D< double > > basisCoeffs
 These are the coefficients c_k or a_k for the basis set.
Array1D< Array1D< double > > radialPoints
 These are the knot's radial values for each nucleus.
Array2D< Array1D< double > > waveValuesHF
 The memorized wavefunction as decomposed into s, px, py, and pz contributions.
Array2D< CubicSplinewaveValuesHFSpline
 This is the interpolating waveValuesHF.
Array2D< double > nucleusContributions
 The precalculated nucleus contributions to the force.
Array2D< qmcfloatorbitals
 Temp variable used by getDensities.
Array2D< qmcfloatChi
 Temp variable used by getDensities.
CubicSpline spliner
 Eventually, we probably want to remove this guy.


Detailed Description

This class will measure the nuclear forces for the system.

This is essentially a port from the fortran code graciously provided by Simone Chiesa as used in S. Chiesa, D.M. Ceperley, and S. Zhang, Phys. Rev. Lett. 94, 036404 (2005)

Definition at line 29 of file QMCNuclearForces.h.


Constructor & Destructor Documentation

QMCNuclearForces::QMCNuclearForces (  ) 

Creates an instance of the class.

Definition at line 10 of file QMCNuclearForces.cpp.

QMCNuclearForces::~QMCNuclearForces (  ) 


Member Function Documentation

void QMCNuclearForces::initialize ( QMCInput input  ) 

void QMCNuclearForces::evaluate ( Array1D< QMCWalkerData * > &  walkerData,
Array1D< Array2D< double > * > &  xData,
int  num 
)

This is the function that will be evaluated for each sampling.

It will calculate the force for several walkers at the same time.

Parameters:
X $3N$ dimensional configuration of electrons represented by a $N \times 3$ matrix

Definition at line 225 of file QMCNuclearForces.cpp.

References QMCMolecule::Atom_Labels, QMCMolecule::Atom_Positions, Array1D< T >::dim1(), QMCInput::flags, QMCMolecule::getNumberAtoms(), getNumBins(), getTemperTerm(), Input, QMCInput::Molecule, QMCFlags::nuclear_derivatives, nucleusContributions, radialPoints, and QMCMolecule::Z.

Referenced by QMCSCFJastrow::evaluate(), and evaluate().

void QMCNuclearForces::evaluate ( QMCWalkerData walkerData,
Array2D< double > &  xData 
)

This is the function that is probably only going to be called during initialization.

Parameters:
X $3N$ dimensional configuration of electrons represented by a $N \times 3$ matrix

Definition at line 168 of file QMCNuclearForces.cpp.

References Array1D< T >::deallocate(), and evaluate().

double QMCNuclearForces::getTemperTerm ( int  nuc,
int  q,
double  r 
)

void QMCNuclearForces::calcCoefficients ( int  whichNucleus  ) 

As described in CCZ05, we will be using a polynomial as a part of the tempering term used to calculate the force in Eq.

6. This function is called as a part of the initialization and calculates the coefficients of the polynomial.

It will also call waveMemorization if we will be using Eq. 9.

Definition at line 307 of file QMCNuclearForces.cpp.

References basisCoeffs, Array2D< T >::deallocate(), Array2D< T >::determinant_and_inverse(), Array1D< T >::dim1(), fastPower(), fittingWeightM, QMCInput::flags, Array2D< T >::gemm(), CubicSpline::initializeWithFunctionValues(), Input, CubicSpline::integrate(), QMCFlags::nuclear_derivatives, numPolyBasisF, radialPoints, spliner, waveMemorization(), and waveValuesHF.

Referenced by initialize().

void QMCNuclearForces::waveMemorization ( int  whichNucleus,
int  numKnots,
double  radialCutoff 
)

This function is only called when we're using the Slater modification described in Eq.

9.

We want to decompose the wavefunction into s, px, py, and pz contributions. First, we choose a cutoff radius beyond which we are not interested. Then inside this sphere, we record what the contributions are for a series of radial "knot" points distributed uniformly inside the cutoff.

We then create a spline so that we can evaluate these contributions cheaply.

numKnots is the number of radial points upon which the wavefunction will be memorized.

Definition at line 476 of file QMCNuclearForces.cpp.

References Array2D< T >::allocate(), Array1D< T >::allocate(), QMCMolecule::Atom_Positions, Chi, Array2D< T >::deallocate(), Array1D< T >::deallocate(), Array2D< T >::dim1(), generateCube(), getDensities(), Input, QMCInput::Molecule, numSamplesPerArea, orbitals, radialPoints, randomlyRotate(), waveValuesHF, and waveValuesHFSpline.

Referenced by calcCoefficients().

void QMCNuclearForces::calculateNuclearContributions (  ) 

Since the force terms that depend upon 2 nuclei don't change in a calculation, we only want to calculate them once.

Definition at line 676 of file QMCNuclearForces.cpp.

References Array2D< T >::allocate(), QMCMolecule::Atom_Positions, QMCMolecule::getNumberAtoms(), Input, QMCInput::Molecule, nucleusContributions, and QMCMolecule::Z.

Referenced by initialize().

void QMCNuclearForces::getDensities ( Array2D< double > &  X,
Array1D< qmcfloat > &  densities 
)

For a series of electronic coordinates, this function will calculate the density.

Parameters:
X $3N$ dimensional configuration of electrons represented by a $N \times 3$ matrix
densities the array of densities calculated for each point

Definition at line 553 of file QMCNuclearForces.cpp.

References Array1D< T >::allocate(), QMCWavefunction::AlphaOccupation, QMCWavefunction::BetaOccupation, BF, Chi, QMCWavefunction::CI_coeffs, Array2D< T >::dim1(), QMCBasisFunction::evaluateBasisFunctions(), QMCWavefunction::getNumberBasisFunctions(), QMCWavefunction::getNumberDeterminants(), QMCWavefunction::getNumberOrbitals(), QMCWavefunction::getUnusedIndicator(), Input, QMCWavefunction::OrbitalCoeffs, orbitals, QMCInput::WF, and WF.

Referenced by waveMemorization().

void QMCNuclearForces::printCubeLengths ( Array2D< double > &  points  ) 

A debugging function.

..

Definition at line 595 of file QMCNuclearForces.cpp.

References Array2D< T >::dim1().

void QMCNuclearForces::printPoints ( Array2D< double > &  points  ) 

A debugging function.

..

Definition at line 586 of file QMCNuclearForces.cpp.

References Array2D< T >::dim1().

void QMCNuclearForces::generateCube ( Array2D< double > &  cube,
double  length 
)

This will create a cube centered at the origin.

The distance between any two adjacent points will be length.

Definition at line 616 of file QMCNuclearForces.cpp.

References Array2D< T >::allocate().

Referenced by waveMemorization().

void QMCNuclearForces::randomlyRotate ( Array2D< double > &  points,
double  scale 
)

This will take the cube centered at the origin and give it a random rotation preserving the distance between the vertices as well as the center.

The parameter scale will then grow or shrink the cube.

Definition at line 631 of file QMCNuclearForces.cpp.

References Array2D< T >::deallocate(), Array2D< T >::dim1(), ran, and Random::unidev().

Referenced by waveMemorization().

static int QMCNuclearForces::getNumBins (  )  [inline, static]

This is an arbitrary choice, so it can be static.

It controls the resolution of our binning.

Definition at line 136 of file QMCNuclearForces.h.

Referenced by evaluate(), QMCWalker::initialize(), QMCRun::initialize(), and QMCManager::initialize().

void QMCNuclearForces::operator= ( const QMCNuclearForces rhs  ) 

Sets two QMCNuclearForces objects equal.

Parameters:
rhs object to set this object equal to


Member Data Documentation

Definition at line 150 of file QMCNuclearForces.h.

Referenced by getDensities(), and initialize().

Definition at line 151 of file QMCNuclearForces.h.

Referenced by getDensities(), and initialize().

This is the m parameter 'm' used in CCZ05.

Definition at line 156 of file QMCNuclearForces.h.

Referenced by calcCoefficients(), getTemperTerm(), and initialize().

We want to know how many sample points per unit area on the surface of the shell to use for each knot point.

Definition at line 162 of file QMCNuclearForces.h.

Referenced by initialize(), and waveMemorization().

This is the basis set size 'M' from CCZ05.

We want to permit it to be different for each atom.

Definition at line 168 of file QMCNuclearForces.h.

Referenced by calcCoefficients(), initialize(), and ~QMCNuclearForces().

These are the coefficients c_k or a_k for the basis set.

Definition at line 173 of file QMCNuclearForces.h.

Referenced by calcCoefficients(), getTemperTerm(), initialize(), and ~QMCNuclearForces().

These are the knot's radial values for each nucleus.

The last value in this array (independent of method) will be the radial cutoff 'R'.

Definition at line 179 of file QMCNuclearForces.h.

Referenced by calcCoefficients(), evaluate(), getTemperTerm(), initialize(), waveMemorization(), and ~QMCNuclearForces().

The memorized wavefunction as decomposed into s, px, py, and pz contributions.

Definition at line 185 of file QMCNuclearForces.h.

Referenced by calcCoefficients(), initialize(), waveMemorization(), and ~QMCNuclearForces().

This is the interpolating waveValuesHF.

Definition at line 190 of file QMCNuclearForces.h.

Referenced by getTemperTerm(), initialize(), waveMemorization(), and ~QMCNuclearForces().

The precalculated nucleus contributions to the force.

Definition at line 195 of file QMCNuclearForces.h.

Referenced by calculateNuclearContributions(), evaluate(), and ~QMCNuclearForces().

Temp variable used by getDensities.

Definition at line 200 of file QMCNuclearForces.h.

Referenced by getDensities(), waveMemorization(), and ~QMCNuclearForces().

Temp variable used by getDensities.

Definition at line 205 of file QMCNuclearForces.h.

Referenced by getDensities(), and waveMemorization().

Eventually, we probably want to remove this guy.

Definition at line 210 of file QMCNuclearForces.h.

Referenced by calcCoefficients(), and initialize().


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

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