#include <QMCPropertyArrays.h>
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< QMCProperty > | cs_Energies |
bool | calc_density |
Tells if basis function density is being calculated. | |
int | nBasisFunc |
The number of basis functions. | |
Array1D< QMCProperty > | chiDensity |
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. |
So this class contains all the dynamic arrays of properties that we're going to want.
Definition at line 57 of file QMCPropertyArrays.h.
QMCPropertyArrays::QMCPropertyArrays | ( | ) |
Creates an instance of the class.
Definition at line 18 of file QMCPropertyArrays.cpp.
References Array1D< T >::allocate(), calc_density, calc_forces, QMCInput::flags, QMCFlags::future_walking, FW_iR, FW_iR12, FW_iR12_2, FW_iR_2, FW_It, FW_KE, FW_KE_2, FW_KEg, FW_KEg_2, FW_PE, FW_PE_2, FW_R12, FW_R12_2, FW_R2, FW_R2_2, FW_TE, FW_TE_2, globalInput, QMCFlags::input_file_name, names, nBasisFunc, NUM_PROPS, numFutureWalking, props, Array1D< T >::size(), and zeroOut().
QMCPropertyArrays::~QMCPropertyArrays | ( | ) |
Definition at line 81 of file QMCPropertyArrays.cpp.
References calc_forces, chiDensity, Array2D< T >::deallocate(), Array1D< T >::deallocate(), der, Array1D< T >::dim1(), hess, nuclearForces, props, and Array1D< T >::size().
void QMCPropertyArrays::zeroOut | ( | ) |
Sets all of the data in the object to zero.
Definition at line 136 of file QMCPropertyArrays.cpp.
References Array2D< T >::allocate(), Array1D< T >::allocate(), calc_density, calc_forces, QMCFlags::calculate_Derivatives, chiDensity, cs_Energies, QMCInput::cs_Parameters, Array2D< T >::deallocate(), Array1D< T >::deallocate(), der, Array1D< T >::dim1(), QMCInput::flags, QMCInput::getNumberAIParameters(), globalInput, hess, hessIsSymmetric, nBasisFunc, nuclearForces, numDerHessSamples, numFutureWalking, QMCFlags::optimize_Psi_criteria, props, and Array1D< T >::size().
Referenced by QMCRun::calculateObservables(), QMCManager::gatherExtraProperties(), QMCRun::initialize(), matchParametersTo(), QMCPropertyArrays(), QMCRun::zeroOut(), and QMCManager::zeroOut().
void QMCPropertyArrays::matchParametersTo | ( | const QMCPropertyArrays & | rhs | ) |
Definition at line 229 of file QMCPropertyArrays.cpp.
References calc_density, calc_forces, Array2D< T >::dim1(), Array2D< T >::dim2(), Array1D< T >::get(), nBasisFunc, nuclearForces, setCalcDensity(), setCalcForces(), and zeroOut().
Referenced by operator+(), and operator=().
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 | ) |
Returns the sum of two QMCPropertyArrays.
Definition at line 261 of file QMCPropertyArrays.cpp.
References calc_forces, Array1D< T >::dim1(), matchParametersTo(), nuclearForces, numFutureWalking, props, and Array1D< T >::size().
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.
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.
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.
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.
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.
strm | XML stream |
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().
ostream& operator<< | ( | ostream & | strm, | |
QMCPropertyArrays & | rhs | |||
) | [friend] |
Formats and prints the properties to a stream.
Definition at line 384 of file QMCPropertyArrays.cpp.
int QMCPropertyArrays::numFutureWalking = -1 [static] |
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 67 of file QMCPropertyArrays.h.
Referenced by QMCWalker::calculateObservables(), QMCManager::gatherExtraProperties(), QMCDerivativeProperties::getVirialRatio(), QMCDerivativeProperties::getVirialRatioVariance(), newSample(), operator+(), operator<<(), operator=(), QMCPropertyArrays(), readXML(), toXML(), zeroOut(), and ~QMCPropertyArrays().
Array1D<string> QMCPropertyArrays::names |
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().
Forces for each atom.
Definition at line 78 of file QMCPropertyArrays.h.
Referenced by QMCWalker::calculateObservables(), QMCManager::gatherForces(), matchParametersTo(), newSample(), operator+(), operator<<(), operator=(), readXML(), setCalcForces(), toXML(), QMCManager::writeForces(), 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().
Array2D<double> QMCPropertyArrays::der |
Definition at line 87 of file QMCPropertyArrays.h.
Referenced by QMCWalker::calculateDerivatives(), QMCManager::gatherExtraProperties(), QMCDerivativeProperties::getParameterGradient(), QMCDerivativeProperties::getParameterHamiltonian(), QMCDerivativeProperties::getParameterHessian(), QMCDerivativeProperties::getParameterOverlap(), operator<<(), operator=(), zeroOut(), and ~QMCPropertyArrays().
Array1D< Array2D<double> > QMCPropertyArrays::hess |
Definition at line 92 of file QMCPropertyArrays.h.
Referenced by QMCWalker::calculateDerivatives(), QMCManager::gatherExtraProperties(), QMCDerivativeProperties::getParameterHamiltonian(), QMCDerivativeProperties::getParameterHessian(), QMCDerivativeProperties::getParameterOverlap(), operator<<(), operator=(), zeroOut(), and ~QMCPropertyArrays().
Definition at line 94 of file QMCPropertyArrays.h.
Referenced by QMCWalker::calculateObservables(), QMCManager::gatherExtraProperties(), QMCDerivativeProperties::getCorrelatedSamples(), newSample(), operator<<(), 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().
Densities for the basis functions.
Definition at line 109 of file QMCPropertyArrays.h.
Referenced by QMCWalker::calculateObservables(), QMCManager::gatherDensities(), newSample(), operator=(), readXML(), setCalcDensity(), toXML(), QMCManager::writeBFDensity(), zeroOut(), and ~QMCPropertyArrays().