QMCProperties Class Reference

All of the quantities and properties evaluated during a calculation. More...

#include <QMCProperties.h>

List of all members.

Public Member Functions

 QMCProperties ()
 Creates an instance of the class.
 ~QMCProperties ()
void zeroOut ()
 Sets all of the data in the object to zero.
void operator= (const QMCProperties &rhs)
 Sets two objects equal.
QMCProperties operator+ (QMCProperties &rhs)
 Returns the sum of two QMCProperties.
void newSample (QMCProperties *newProperties, double weight, int nwalkers)
 Adds the statistics calculated for a time step to the object as new samples.
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

QMCProperty energy
 Total energy of the system.
QMCProperty tr_weight
QMCProperty energy2
QMCProperty kineticEnergy
 Kinetic energy of the system.
QMCProperty potentialEnergy
 Potential energy of the system.
QMCProperty neEnergy
 Keeps track of the nuc-e and e-e energy separately.
QMCProperty eeEnergy
QMCProperty logWeights
 Log of the weights on the walkers.
QMCProperty acceptanceProbability
 Probability a trial move is accepted.
QMCProperty distanceMovedAccepted
 Average distance an accepted move travels.
QMCProperty distanceMovedTrial
 Average distance for a trial move.
QMCProperty walkerAge
QMCProperty weightChange
QMCProperty growthRate

Static Public Attributes

static MPI_Datatype MPI_TYPE
 The MPI data type for a QMCProperties.
static MPI_Op MPI_REDUCE
 The MPI operation for performing MPI_Reduce on QMCProperties.

Static Private Member Functions

static void buildMpiType ()
 Build MPI_TYPE.
static void buildMpiReduce ()
 Build MPI_REDUCE.
static void Reduce_Function (QMCProperties *in, QMCProperties *inout, int *len, MPI_Datatype *dptr)
 An MPI function which allows MPI_Reduce to be used in adding QMCProperties.

Static Private Attributes

static bool mpiTypeCreated = false
 A flag which tells if MPI_TYPE has been generated.

Friends

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


Detailed Description

All of the quantities and properties evaluated during a calculation.

Definition at line 33 of file QMCProperties.h.


Constructor & Destructor Documentation

QMCProperties::QMCProperties (  ) 

Creates an instance of the class.

Definition at line 18 of file QMCProperties.cpp.

References buildMpiReduce(), buildMpiType(), mpiTypeCreated, and zeroOut().

QMCProperties::~QMCProperties (  ) 

Definition at line 32 of file QMCProperties.cpp.


Member Function Documentation

void QMCProperties::zeroOut (  ) 

void QMCProperties::operator= ( const QMCProperties rhs  ) 

QMCProperties QMCProperties::operator+ ( QMCProperties rhs  ) 

void QMCProperties::newSample ( QMCProperties 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 QMCProperties 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 54 of file QMCProperties.cpp.

References acceptanceProbability, distanceMovedAccepted, distanceMovedTrial, eeEnergy, energy, energy2, QMCProperty::getAverage(), QMCProperty::getNumberSamples(), growthRate, kineticEnergy, logWeights, neEnergy, QMCProperty::newSample(), potentialEnergy, walkerAge, and weightChange.

Referenced by QMCRun::calculateObservables(), and QMCManager::run().

void QMCProperties::toXML ( ostream &  strm  ) 

bool QMCProperties::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 200 of file QMCProperties.cpp.

References acceptanceProbability, QMCFlags::checkpoint_energy_only, distanceMovedAccepted, distanceMovedTrial, eeEnergy, energy, QMCInput::flags, globalInput, growthRate, kineticEnergy, logWeights, neEnergy, potentialEnergy, QMCProperty::readXML(), walkerAge, and weightChange.

Referenced by QMCRun::readXML().

void QMCProperties::buildMpiType (  )  [static, private]

void QMCProperties::buildMpiReduce (  )  [static, private]

Build MPI_REDUCE.

This must be changed when a property is added to or removed from this class.

Definition at line 390 of file QMCProperties.cpp.

References MPI_REDUCE, and Reduce_Function().

Referenced by QMCProperties().

void QMCProperties::Reduce_Function ( QMCProperties in,
QMCProperties inout,
int *  len,
MPI_Datatype *  dptr 
) [static, private]

An MPI function which allows MPI_Reduce to be used in adding QMCProperties.

Definition at line 469 of file QMCProperties.cpp.

References acceptanceProbability, distanceMovedAccepted, distanceMovedTrial, eeEnergy, energy, energy2, growthRate, kineticEnergy, logWeights, neEnergy, potentialEnergy, walkerAge, and weightChange.

Referenced by buildMpiReduce().


Friends And Related Function Documentation

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

Formats and prints the properties to a stream.

Definition at line 340 of file QMCProperties.cpp.


Member Data Documentation

Definition at line 41 of file QMCProperties.h.

Potential energy of the system.

Definition at line 52 of file QMCProperties.h.

Referenced by buildMpiType(), QMCWalker::calculateObservables(), newSample(), operator+(), operator<<(), operator=(), readXML(), Reduce_Function(), toXML(), and zeroOut().

Keeps track of the nuc-e and e-e energy separately.

Definition at line 57 of file QMCProperties.h.

Referenced by buildMpiType(), QMCWalker::calculateObservables(), newSample(), operator+(), operator<<(), operator=(), readXML(), Reduce_Function(), toXML(), and zeroOut().

bool QMCProperties::mpiTypeCreated = false [static, private]

A flag which tells if MPI_TYPE has been generated.

Definition at line 140 of file QMCProperties.h.

Referenced by QMCProperties().

MPI_Datatype QMCProperties::MPI_TYPE [static]

MPI_Op QMCProperties::MPI_REDUCE [static]

The MPI operation for performing MPI_Reduce on QMCProperties.

Definition at line 169 of file QMCProperties.h.

Referenced by buildMpiReduce(), QMCManager::gatherProperties(), QMCReadAndEvaluateConfigs::MPI_reduce(), and QMCManager::synchronizeDMCEnsemble().


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