QMCThreeBodyCorrelationFunctionParameters Class Reference

This is a collection of parameters and related functions which describe the interaction of a nucleus and two electrons. More...

#include <QMCThreeBodyCorrelationFunctionParameters.h>

List of all members.

Public Member Functions

 QMCThreeBodyCorrelationFunctionParameters ()
 Creates an instance of the class.
 QMCThreeBodyCorrelationFunctionParameters (const QMCThreeBodyCorrelationFunctionParameters &rhs)
 Creates an instance of the class that is identical to another instance of the class.
 ~QMCThreeBodyCorrelationFunctionParameters ()
 Deallocates all of the memory used by the object and prepares it to be destroyed.
Array1D< double > getFreeParameters ()
 Gets the free parameters describing the three body interactions.
string getParticle1Type ()
 Gets the first particle type in the three body interaction described by this object.
string getParticle2Type ()
 Gets the second particle type in the three body interaction described by this object.
string getParticle3Type ()
 Gets the third particle type in the three body interaction described by this object.
int getNumberOfFreeParameters ()
 Gets the total number of free parameters used to describe the three body interaction.
int getNumberOfTotalParameters ()
 Gets the total number of parameters.
QMCThreeBodyCorrelationFunctiongetThreeBodyCorrelationFunction ()
 Gets the parameterized QMCThreeBodyCorrelationFunction used in QMCJastrow to describe the particular three body interaction when calculating the Jastrow function.
bool isUsed () const
 Is this correlation function "None"?
void setParticle1Type (string val)
 Sets the type of particle1 for the particular three body interaction described by this object.
void setParticle2Type (string val)
 Sets the type of particle2 for the particular particle-particle interaction described by this object.
void setParticle3Type (string val)
 Sets the type of particle3 for the particular particle-particle interaction described by this object.
void operator= (const QMCThreeBodyCorrelationFunctionParameters &rhs)
 Sets two QMCThreeBodyCorrelationFunctionParameters objects equal.
bool read (istream &strm)
 Loads the state of the object from an input stream.
double getCutoffDist ()
 Gets the cutoff distance for this three body correlation function.
void zeroOutDerivatives ()
 This function is used by QMCThreeBodyJastrow while calculating parameter derivatives.
void setFreeParameters (const Array1D< double > &free)
 takes a new set of free parameters and recreates the total parameter array free -> total (transformed)
void setTotalParameters (const Array1D< double > &total)
 takes a new set of free parameters and recreates the total parameter array total -> total (transformed) -> free
void totalDerivativesToFree (int &shift, Array1D< double > &p_a, Array1D< Array2D< double > > &p2_xa, Array1D< double > &p3_xxa) const
 This function is used by QMCThreeBodyJastrow while calculating parameter derivatives.
void totalDerivativesAccumulate (QMCThreeBodyCorrelationFunctionParameters &rhs)
 Add the derivative data from another object to ours.

Public Attributes

Array1D< double > pt_a
 The parameter derivatives are stored here.
Array1D< Array2D< double > > pt2_xa
Array1D< double > pt3_xxa

Private Member Functions

void initializeThreeBodyCorrelationFunctionParameters ()
void setThreeBodyCorrelationFunction ()
void getFree (const Array1D< double > &total, Array1D< double > &free)
 convert an array in the total basis into an array in the free basis free -> total (transformed)
void totalToFree (const Array1D< double > &total, Array1D< double > &free) const
 maps the (transformed) total parameter array to the free array (transformed) total -> free
int map (int l, int m, int n) const
 The position in the Array1Ds for this term.
void freeToTotal (const Array1D< double > &free, Array1D< double > &total)
 maps the free parameter array to the total parameter array free -> total (transformed)
void makeParamDepMatrix ()
 creates the transformation matrix which can apply the cusp and symmetry conditions to the total parameter array.
void gaussianParamDepMatrix ()
bool checkCuspAndSymmetry ()
 Verifies that total parameter array statisfies the cusp and symmetry conditions.

Private Attributes

Array1D< string > ParticleTypes
int NumberOfParameterTypes
Array1D< int > NumberOfParameters
Array1D< double > Parameters
 The current value of the parameters, it will change each optimization step.
Array1D< bool > isFree
 If the parameter at this index is independent, the value at the corresponding position in this array will be true.
Array1D< double > tempArray
int TotalNumberOfParameters
Array1D< double > freeParameters
int NumberOfFreeParameters
int NeN
int Nee
int C
double cutoff
Array2D< double > paramDepMatrix
string threeBodyCorrelationFunctionType
QMCThreeBodyCorrelationFunctionThreeBodyCorrelationFunction

Friends

ostream & operator<< (ostream &strm, QMCThreeBodyCorrelationFunctionParameters &rhs)
 Writes the state of the object to an output stream.


Detailed Description

This is a collection of parameters and related functions which describe the interaction of a nucleus and two electrons.

For example, an instance of this class could hold the information describing the interaction of a hydrogen nucleus, an up spin electron, and a down spin electron.

The interactions are parameterized in terms of "parameters" and "constants." "parameters" are modified during optimizations, and "constants" are not.

Definition at line 36 of file QMCThreeBodyCorrelationFunctionParameters.h.


Constructor & Destructor Documentation

QMCThreeBodyCorrelationFunctionParameters::QMCThreeBodyCorrelationFunctionParameters (  ) 

QMCThreeBodyCorrelationFunctionParameters::QMCThreeBodyCorrelationFunctionParameters ( const QMCThreeBodyCorrelationFunctionParameters rhs  ) 

Creates an instance of the class that is identical to another instance of the class.

Parameters:
rhs object to copy

Definition at line 295 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References ThreeBodyCorrelationFunction.

QMCThreeBodyCorrelationFunctionParameters::~QMCThreeBodyCorrelationFunctionParameters (  ) 

Deallocates all of the memory used by the object and prepares it to be destroyed.

Definition at line 449 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References Array1D< T >::deallocate(), freeParameters, isFree, NumberOfParameters, Parameters, ParticleTypes, and ThreeBodyCorrelationFunction.


Member Function Documentation

Array1D< double > QMCThreeBodyCorrelationFunctionParameters::getFreeParameters (  ) 

Gets the free parameters describing the three body interactions.

Not all of the parameters are free due to cusp and symmetry constraints.

Returns:
free parameters describing the three body interactions

Definition at line 5 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References freeParameters.

string QMCThreeBodyCorrelationFunctionParameters::getParticle1Type (  ) 

Gets the first particle type in the three body interaction described by this object.

The first particle should be a nucleus.

Returns:
particle1 type

Definition at line 301 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References ParticleTypes.

Referenced by QMCJastrowParameters::read().

string QMCThreeBodyCorrelationFunctionParameters::getParticle2Type (  ) 

Gets the second particle type in the three body interaction described by this object.

This particle should be an up or down electron.

Returns:
particle2 type

Definition at line 306 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References ParticleTypes.

Referenced by QMCJastrowParameters::read().

string QMCThreeBodyCorrelationFunctionParameters::getParticle3Type (  ) 

Gets the third particle type in the three body interaction described by this object.

This particle should be an up or down electron.

Returns:
particle3 type

Definition at line 311 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References ParticleTypes.

Referenced by QMCJastrowParameters::read().

int QMCThreeBodyCorrelationFunctionParameters::getNumberOfFreeParameters (  ) 

Gets the total number of free parameters used to describe the three body interaction.

Not all of the parameters are free because of cusp and symmetry constraints

Returns:
total number of free parameters

Definition at line 316 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References NumberOfFreeParameters.

int QMCThreeBodyCorrelationFunctionParameters::getNumberOfTotalParameters (  ) 

Gets the total number of parameters.

Returns:
total number of parameters

Definition at line 321 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References TotalNumberOfParameters.

Referenced by QMCThreeBodyJastrow::collectForPair().

QMCThreeBodyCorrelationFunction * QMCThreeBodyCorrelationFunctionParameters::getThreeBodyCorrelationFunction (  ) 

Gets the parameterized QMCThreeBodyCorrelationFunction used in QMCJastrow to describe the particular three body interaction when calculating the Jastrow function.

Returns:
function describing the three body interactions

Definition at line 437 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References ThreeBodyCorrelationFunction.

Referenced by QMCThreeBodyJastrow::collectForPair(), and QMCJastrowParameters::read().

bool QMCThreeBodyCorrelationFunctionParameters::isUsed (  )  const

void QMCThreeBodyCorrelationFunctionParameters::setParticle1Type ( string  val  ) 

Sets the type of particle1 for the particular three body interaction described by this object.

Definition at line 405 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References ParticleTypes.

void QMCThreeBodyCorrelationFunctionParameters::setParticle2Type ( string  val  ) 

Sets the type of particle2 for the particular particle-particle interaction described by this object.

Definition at line 410 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References ParticleTypes.

void QMCThreeBodyCorrelationFunctionParameters::setParticle3Type ( string  val  ) 

Sets the type of particle3 for the particular particle-particle interaction described by this object.

Definition at line 415 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References ParticleTypes.

void QMCThreeBodyCorrelationFunctionParameters::operator= ( const QMCThreeBodyCorrelationFunctionParameters rhs  ) 

bool QMCThreeBodyCorrelationFunctionParameters::read ( istream &  strm  ) 

Loads the state of the object from an input stream.

Load QMCThreeBodyCorrelationFunctionParameters of the form:
ParticleTypes: He Electron_up Electron_down
CorrelationFunctionType: Cambridge NumberOfParameterTypes: 2
NumberOfParametersOfEachType: 2 2
Parameters: 2.0 3.0 4.0 1.0 2.0 1.0 3.0 5.0
C: 3
Cutoff: 2.5
.

Parameters:
strm input stream

It is convenient to be able to sort parameters in the input file in such a way that increasing Nee or NeN will preserve optimized parameters. To do this, the input file orders parameters according to ascending powers.

In the input file, the no coefficient for a term with a power of 2 will appear ahead a term where the highest power is a 1. That is, the order will look like:

terms with max power 0 terms with max power 1 terms with max power 2 ... terms with max power max(NeN,Nee)

This way, if you increase Nee or NeN, the coefficients for all the new terms will appear at the end of the list.

If you degrease Nee or NeN, then the terms will be messed up.

In summary, in order to keep the same coefficient for an independent (l,m,n) term when you increase Nee or NeN, you will not have to change the input file. The dependent parameters may change.

Definition at line 48 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References Array1D< T >::allocate(), C, cutoff, Array2D< T >::deallocate(), Array1D< T >::deallocate(), Array1D< T >::dim1(), freeParameters, initializeThreeBodyCorrelationFunctionParameters(), isFree, makeParamDepMatrix(), map(), Nee, NeN, NumberOfFreeParameters, NumberOfParameters, NumberOfParameterTypes, paramDepMatrix, Parameters, ParticleTypes, Array1D< T >::read(), setThreeBodyCorrelationFunction(), setTotalParameters(), threeBodyCorrelationFunctionType, StringManipulation::toFirstUpperRestLower(), and TotalNumberOfParameters.

Referenced by QMCJastrowParameters::read().

double QMCThreeBodyCorrelationFunctionParameters::getCutoffDist (  ) 

Gets the cutoff distance for this three body correlation function.

Definition at line 420 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References cutoff.

void QMCThreeBodyCorrelationFunctionParameters::zeroOutDerivatives (  ) 

This function is used by QMCThreeBodyJastrow while calculating parameter derivatives.

Definition at line 326 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References Array1D< T >::dim1(), pt2_xa, pt3_xxa, and pt_a.

void QMCThreeBodyCorrelationFunctionParameters::setFreeParameters ( const Array1D< double > &  free  ) 

void QMCThreeBodyCorrelationFunctionParameters::setTotalParameters ( const Array1D< double > &  total  ) 

takes a new set of free parameters and recreates the total parameter array total -> total (transformed) -> free

Definition at line 348 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References Array1D< T >::allocate(), checkCuspAndSymmetry(), freeParameters, Array1D< T >::get(), getFree(), paramDepMatrix, Parameters, tempArray, and TotalNumberOfParameters.

Referenced by read().

void QMCThreeBodyCorrelationFunctionParameters::totalDerivativesToFree ( int &  shift,
Array1D< double > &  p_a,
Array1D< Array2D< double > > &  p2_xa,
Array1D< double > &  p3_xxa 
) const

void QMCThreeBodyCorrelationFunctionParameters::totalDerivativesAccumulate ( QMCThreeBodyCorrelationFunctionParameters rhs  ) 

Add the derivative data from another object to ours.

Definition at line 554 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References Array1D< T >::get(), isUsed(), pt2_xa, pt3_xxa, pt_a, and TotalNumberOfParameters.

Referenced by QMCThreeBodyJastrow::packageDerivatives().

void QMCThreeBodyCorrelationFunctionParameters::initializeThreeBodyCorrelationFunctionParameters (  )  [private]

void QMCThreeBodyCorrelationFunctionParameters::setThreeBodyCorrelationFunction (  )  [private]

void QMCThreeBodyCorrelationFunctionParameters::getFree ( const Array1D< double > &  total,
Array1D< double > &  free 
) [private]

convert an array in the total basis into an array in the free basis free -> total (transformed)

Definition at line 334 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References Array1D< T >::allocate(), Array1D< T >::get(), paramDepMatrix, tempArray, TotalNumberOfParameters, and totalToFree().

Referenced by setTotalParameters().

void QMCThreeBodyCorrelationFunctionParameters::totalToFree ( const Array1D< double > &  total,
Array1D< double > &  free 
) const [private]

maps the (transformed) total parameter array to the free array (transformed) total -> free

Definition at line 628 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References Array1D< T >::allocate(), cutoff, Array1D< T >::get(), isFree, map(), Nee, NeN, and NumberOfFreeParameters.

Referenced by getFree().

int QMCThreeBodyCorrelationFunctionParameters::map ( int  l,
int  m,
int  n 
) const [inline, private]

The position in the Array1Ds for this term.

Definition at line 224 of file QMCThreeBodyCorrelationFunctionParameters.h.

References Nee, and NeN.

Referenced by checkCuspAndSymmetry(), freeToTotal(), gaussianParamDepMatrix(), makeParamDepMatrix(), operator<<(), read(), totalDerivativesToFree(), and totalToFree().

void QMCThreeBodyCorrelationFunctionParameters::freeToTotal ( const Array1D< double > &  free,
Array1D< double > &  total 
) [private]

maps the free parameter array to the total parameter array free -> total (transformed)

Definition at line 666 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References cutoff, Array1D< T >::get(), isFree, map(), Nee, and NeN.

Referenced by setFreeParameters().

void QMCThreeBodyCorrelationFunctionParameters::makeParamDepMatrix (  )  [private]

creates the transformation matrix which can apply the cusp and symmetry conditions to the total parameter array.

this creates certain dependencies between the parameters. total -> (transformed) total

Definition at line 1081 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References Array2D< T >::allocate(), C, QMCInput::flags, gaussianParamDepMatrix(), globalInput, isFree, map(), Nee, NeN, paramDepMatrix, QMCFlags::reproduce_EE_with_NEE_jastrow, QMCFlags::reproduce_NE_with_NEE_jastrow, and TotalNumberOfParameters.

Referenced by read().

void QMCThreeBodyCorrelationFunctionParameters::gaussianParamDepMatrix (  )  [private]

bool QMCThreeBodyCorrelationFunctionParameters::checkCuspAndSymmetry (  )  [private]

Verifies that total parameter array statisfies the cusp and symmetry conditions.

It will also run some checks on the paramDepMatrix.

(transformed) total -> true total -> false

Definition at line 692 of file QMCThreeBodyCorrelationFunctionParameters.cpp.

References C, Array2D< T >::dim1(), Array2D< T >::isDependent(), isFree, map(), Nee, NeN, NumberOfFreeParameters, paramDepMatrix, Parameters, and Array2D< T >::transpose().

Referenced by setFreeParameters(), and setTotalParameters().


Friends And Related Function Documentation

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

Writes the state of the object to an output stream.

Definition at line 478 of file QMCThreeBodyCorrelationFunctionParameters.cpp.


Member Data Documentation

Definition at line 256 of file QMCThreeBodyCorrelationFunctionParameters.h.

Referenced by operator<<(), operator=(), and read().

If the parameter at this index is independent, the value at the corresponding position in this array will be true.

Definition at line 269 of file QMCThreeBodyCorrelationFunctionParameters.h.

Referenced by checkCuspAndSymmetry(), freeToTotal(), gaussianParamDepMatrix(), makeParamDepMatrix(), operator=(), read(), totalDerivativesToFree(), totalToFree(), and ~QMCThreeBodyCorrelationFunctionParameters().


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

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