QMCPropertyArrays Class Reference

This class has the same purpose as QMCProperties, except that I discovered that some MPI implementations do not handle mixing dynamic and static arrays in the same datatype if you're going to make an MPI datatype for it. More...

#include <QMCPropertyArrays.h>

List of all members.

Public Member Functions

 QMCPropertyArrays ()
 Creates an instance of the class.
 ~QMCPropertyArrays ()
void zeroOut ()
 Sets all of the data in the object to zero.
void matchParametersTo (const QMCPropertyArrays &rhs)
void operator= (const QMCPropertyArrays &rhs)
 Sets two objects equal.
QMCPropertyArrays operator+ (QMCPropertyArrays &rhs)
 Returns the sum of two QMCPropertyArrays.
void newSample (QMCPropertyArrays *newProperties, double weight, int nwalkers)
 Adds the statistics calculated for a time step to the object as new samples.
void setCalcForces (bool calcForces, int dim1, int dim2)
 Tells the object if basis function densities are being calculated.
void setCalcDensity (bool calcDensity, int nbasisfunctions)
 Tells the object if basis function densities are being calculated.
void toXML (ostream &strm)
 Writes the state of this object to an XML stream.
bool readXML (istream &strm)
 Loads the state of this object from an XML stream.

Public Attributes

Array1D< Array1D< QMCProperty > > props
Array1D< string > names
bool calc_forces
 Tells if nuclear forces are being calculated.
Array1D< Array2D< QMCProperty > > nuclearForces
 Forces for each atom.
int numDerHessSamples
 The first dimension will indicate which parameter the derivative is respect to.
Array2D< double > der
bool hessIsSymmetric
Array1D< Array2D< double > > hess
Array1D< QMCPropertycs_Energies
bool calc_density
 Tells if basis function density is being calculated.
int nBasisFunc
 The number of basis functions.
Array1D< QMCPropertychiDensity
 Densities for the basis functions.

Static Public Attributes

static int numFutureWalking = -1
 this will always be at least 1 with the smallest element 0 representing future walking turned off

Friends

ostream & operator<< (ostream &strm, QMCPropertyArrays &rhs)
 Formats and prints the properties to a stream.


Detailed Description

This class has the same purpose as QMCProperties, except that I discovered that some MPI implementations do not handle mixing dynamic and static arrays in the same datatype if you're going to make an MPI datatype for it.

So this class contains all the dynamic arrays of properties that we're going to want.

Definition at line 57 of file QMCPropertyArrays.h.


Constructor & Destructor Documentation

QMCPropertyArrays::QMCPropertyArrays (  ) 

QMCPropertyArrays::~QMCPropertyArrays (  ) 


Member Function Documentation

void QMCPropertyArrays::zeroOut (  ) 

void QMCPropertyArrays::matchParametersTo ( const QMCPropertyArrays rhs  ) 

void QMCPropertyArrays::operator= ( const QMCPropertyArrays rhs  ) 

Sets two objects equal.

Definition at line 239 of file QMCPropertyArrays.cpp.

References calc_density, calc_forces, chiDensity, cs_Energies, der, hess, matchParametersTo(), nuclearForces, numDerHessSamples, and props.

QMCPropertyArrays QMCPropertyArrays::operator+ ( QMCPropertyArrays rhs  ) 

void QMCPropertyArrays::newSample ( QMCPropertyArrays newProperties,
double  weight,
int  nwalkers 
)

Adds the statistics calculated for a time step to the object as new samples.

This is not the same as adding the two QMCPropertyArrays objects together.

Parameters:
newProperties the statistics calculated at the time step.
weight the weight of the new samples.
nwalkers the number of walkers used to make this sample.

Definition at line 201 of file QMCPropertyArrays.cpp.

References calc_density, calc_forces, chiDensity, cs_Energies, Array1D< T >::dim1(), nBasisFunc, nuclearForces, numFutureWalking, props, and Array1D< T >::size().

Referenced by QMCRun::calculateObservables().

void QMCPropertyArrays::setCalcForces ( bool  calcForces,
int  dim1,
int  dim2 
)

Tells the object if basis function densities are being calculated.

Parameters:
calcDensity- true if densities are being calculated.
nbasisfunctions- number of basis functions.

Definition at line 118 of file QMCPropertyArrays.cpp.

References Array1D< T >::allocate(), calc_forces, Array1D< T >::deallocate(), Array1D< T >::dim1(), nuclearForces, and numFutureWalking.

Referenced by QMCRun::initialize(), QMCManager::initialize(), and matchParametersTo().

void QMCPropertyArrays::setCalcDensity ( bool  calcDensity,
int  nbasisfunctions 
)

Tells the object if basis function densities are being calculated.

Parameters:
calcDensity- true if densities are being calculated.
nbasisfunctions- number of basis functions.

Definition at line 102 of file QMCPropertyArrays.cpp.

References Array1D< T >::allocate(), calc_density, chiDensity, Array1D< T >::deallocate(), and nBasisFunc.

Referenced by QMCRun::initialize(), QMCManager::initialize(), and matchParametersTo().

void QMCPropertyArrays::toXML ( ostream &  strm  ) 

Writes the state of this object to an XML stream.

Parameters:
strm XML stream

Definition at line 286 of file QMCPropertyArrays.cpp.

References calc_density, calc_forces, chiDensity, Array1D< T >::dim1(), QMCInput::flags, QMCFlags::future_walking, globalInput, names, nBasisFunc, nuclearForces, numFutureWalking, props, and Array1D< T >::size().

Referenced by QMCRun::toXML().

bool QMCPropertyArrays::readXML ( istream &  strm  ) 

Loads the state of this object from an XML stream.

Parameters:
strm XML stream
Returns:
whether the read was successful

Definition at line 333 of file QMCPropertyArrays.cpp.

References calc_density, calc_forces, chiDensity, Array1D< T >::dim1(), nBasisFunc, nuclearForces, numFutureWalking, props, and Array1D< T >::size().

Referenced by QMCRun::readXML().


Friends And Related Function Documentation

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

Formats and prints the properties to a stream.

Definition at line 384 of file QMCPropertyArrays.cpp.


Member Data Documentation

this will always be at least 1 with the smallest element 0 representing future walking turned off

Definition at line 65 of file QMCPropertyArrays.h.

Referenced by newSample(), operator+(), operator<<(), QMCPropertyArrays(), readXML(), setCalcForces(), toXML(), and zeroOut().

Definition at line 68 of file QMCPropertyArrays.h.

Referenced by operator<<(), QMCPropertyArrays(), and toXML().

Tells if nuclear forces are being calculated.

Definition at line 73 of file QMCPropertyArrays.h.

Referenced by matchParametersTo(), newSample(), operator+(), operator<<(), operator=(), QMCPropertyArrays(), readXML(), setCalcForces(), toXML(), zeroOut(), and ~QMCPropertyArrays().

The first dimension will indicate which parameter the derivative is respect to.

The second dimension will hold all the terms necessary to do the average.

Definition at line 86 of file QMCPropertyArrays.h.

Referenced by QMCWalker::calculateDerivatives(), QMCManager::gatherExtraProperties(), operator=(), and zeroOut().

Definition at line 91 of file QMCPropertyArrays.h.

Referenced by operator<<(), and zeroOut().

Tells if basis function density is being calculated.

Definition at line 99 of file QMCPropertyArrays.h.

Referenced by matchParametersTo(), newSample(), operator=(), QMCPropertyArrays(), readXML(), setCalcDensity(), toXML(), and zeroOut().

The number of basis functions.

Only has a value if calc_density is true.

Definition at line 104 of file QMCPropertyArrays.h.

Referenced by matchParametersTo(), newSample(), QMCPropertyArrays(), readXML(), setCalcDensity(), toXML(), and zeroOut().


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