#include <QMCReadAndEvaluateConfigs.h>
Public Member Functions | |
| QMCReadAndEvaluateConfigs () | |
| Creates an instance of the class. | |
| QMCReadAndEvaluateConfigs (QMCInput *input, int cfgsToSkip) | |
| Creates an instance of the class and initializes it. | |
| void | initialize (QMCInput *input, int cfgsToSkip) |
| Initializes the object. | |
| void | rootCalculateProperties (Array1D< Array1D< double > > ¶ms, Array1D< QMCProperties > &properties) |
| Calculates properties (QMCProperties) for different parameter sets from walkers and related data saved to a file during a QMC calculation. | |
| void | workerCalculateProperties () |
| Calculates properties (QMCProperties) for different parameter sets from walkers and related data saved to a file during a QMC calculation. | |
Private Member Functions | |
| bool | AddNewConfigToProperites (Array1D< double > &Params, QMCProperties &Properties) |
| Given a set of parameters perform the necessary calcualtions and add the results to the properties. | |
| double | calc_E_Local_current () |
| double | calc_log_weight_current () |
| void | locally_CalculateProperties (Array1D< Array1D< double > > &Params, Array1D< QMCProperties > &Properties) |
| void | MPI_reduce (Array1D< QMCProperties > &local_Properties, Array1D< QMCProperties > &global_Properties) |
Private Attributes | |
| QMCInput * | Input |
| QMCJastrow | Jastrow |
| int | configsToSkip |
| int | Nelectrons |
| int | Natoms |
| Array2D< double > | R |
| double | D1 |
| Array2D< double > | D2 |
| double | lnJ |
| double | PE |
| double | weight |
Definition at line 36 of file QMCReadAndEvaluateConfigs.h.
| QMCReadAndEvaluateConfigs::QMCReadAndEvaluateConfigs | ( | ) |
| QMCReadAndEvaluateConfigs::QMCReadAndEvaluateConfigs | ( | QMCInput * | input, | |
| int | cfgsToSkip | |||
| ) |
Creates an instance of the class and initializes it.
| input | data input to control the calculation. |
Definition at line 18 of file QMCReadAndEvaluateConfigs.cpp.
References initialize().
| void QMCReadAndEvaluateConfigs::initialize | ( | QMCInput * | input, | |
| int | cfgsToSkip | |||
| ) |
Initializes the object.
| input | data input to control the calculation. |
Definition at line 24 of file QMCReadAndEvaluateConfigs.cpp.
References Array2D< T >::allocate(), configsToSkip, D2, QMCMolecule::getNumberAtoms(), QMCWavefunction::getNumberElectrons(), QMCJastrow::initialize(), Input, Jastrow, QMCInput::Molecule, Natoms, Nelectrons, R, and QMCInput::WF.
Referenced by QMCObjectiveFunction::initialize(), and QMCReadAndEvaluateConfigs().
| void QMCReadAndEvaluateConfigs::rootCalculateProperties | ( | Array1D< Array1D< double > > & | params, | |
| Array1D< QMCProperties > & | properties | |||
| ) |
Calculates properties (QMCProperties) for different parameter sets from walkers and related data saved to a file during a QMC calculation.
This function is called only by the root node. The non-root nodes should call workerCalculateProperties().
| params | array of parameters which parameterize the wavefunction. | |
| properties | properties calculated from params and the saved configurations. |
Definition at line 46 of file QMCReadAndEvaluateConfigs.cpp.
References Array1D< T >::allocate(), locally_CalculateProperties(), and MPI_reduce().
Referenced by QMCObjectiveFunction::evaluate().
| void QMCReadAndEvaluateConfigs::workerCalculateProperties | ( | ) |
Calculates properties (QMCProperties) for different parameter sets from walkers and related data saved to a file during a QMC calculation.
This function is called only by the non-root nodes. The root node should call rootCalculateProperties(params, properties).
Definition at line 112 of file QMCReadAndEvaluateConfigs.cpp.
References Array1D< T >::allocate(), Array1D< T >::dim1(), locally_CalculateProperties(), and MPI_reduce().
Referenced by QMCCorrelatedSamplingVMCOptimization::optimize().
| bool QMCReadAndEvaluateConfigs::AddNewConfigToProperites | ( | Array1D< double > & | Params, | |
| QMCProperties & | Properties | |||
| ) | [private] |
Given a set of parameters perform the necessary calcualtions and add the results to the properties.
Definition at line 245 of file QMCReadAndEvaluateConfigs.cpp.
References calc_E_Local_current(), calc_log_weight_current(), QMCProperties::energy, QMCJastrow::evaluate(), Input, Jastrow, QMCProperties::logWeights, MAXIMUM_ENERGY_VALUE, MAXIMUM_LOG_WEIGHT_VALUE, QMCProperty::newSample(), R, QMCInput::setAIParameters(), and weight.
Referenced by locally_CalculateProperties().
| double QMCReadAndEvaluateConfigs::calc_E_Local_current | ( | ) | [private] |
Definition at line 302 of file QMCReadAndEvaluateConfigs.cpp.
References D1, D2, QMCJastrow::getGradientLnJastrow(), QMCJastrow::getLaplacianLnJastrow(), Jastrow, Nelectrons, and PE.
Referenced by AddNewConfigToProperites().
| double QMCReadAndEvaluateConfigs::calc_log_weight_current | ( | ) | [private] |
Definition at line 369 of file QMCReadAndEvaluateConfigs.cpp.
References QMCJastrow::getLnJastrow(), Jastrow, and lnJ.
Referenced by AddNewConfigToProperites().
| void QMCReadAndEvaluateConfigs::locally_CalculateProperties | ( | Array1D< Array1D< double > > & | Params, | |
| Array1D< QMCProperties > & | Properties | |||
| ) | [private] |
Definition at line 178 of file QMCReadAndEvaluateConfigs.cpp.
References AddNewConfigToProperites(), Array1D< T >::allocate(), QMCConfigIO::close(), QMCFlags::config_file_name, configsToSkip, D1, D2, Array1D< T >::dim1(), QMCConfigIO::eof(), QMCInput::flags, Input, lnJ, QMCConfigIO::open(), QMCInput::outputer, PE, R, QMCConfigIO::readCorrelatedSamplingConfiguration(), and weight.
Referenced by rootCalculateProperties(), and workerCalculateProperties().
| void QMCReadAndEvaluateConfigs::MPI_reduce | ( | Array1D< QMCProperties > & | local_Properties, | |
| Array1D< QMCProperties > & | global_Properties | |||
| ) | [private] |
Definition at line 385 of file QMCReadAndEvaluateConfigs.cpp.
References Array1D< T >::allocate(), Array1D< T >::array(), Array1D< T >::dim1(), QMCProperties::MPI_REDUCE, and QMCProperties::MPI_TYPE.
Referenced by rootCalculateProperties(), and workerCalculateProperties().
QMCInput* QMCReadAndEvaluateConfigs::Input [private] |
Definition at line 79 of file QMCReadAndEvaluateConfigs.h.
Referenced by AddNewConfigToProperites(), initialize(), and locally_CalculateProperties().
QMCJastrow QMCReadAndEvaluateConfigs::Jastrow [private] |
Definition at line 82 of file QMCReadAndEvaluateConfigs.h.
Referenced by AddNewConfigToProperites(), calc_E_Local_current(), calc_log_weight_current(), and initialize().
int QMCReadAndEvaluateConfigs::configsToSkip [private] |
Definition at line 85 of file QMCReadAndEvaluateConfigs.h.
Referenced by initialize(), and locally_CalculateProperties().
int QMCReadAndEvaluateConfigs::Nelectrons [private] |
Definition at line 87 of file QMCReadAndEvaluateConfigs.h.
Referenced by calc_E_Local_current(), and initialize().
int QMCReadAndEvaluateConfigs::Natoms [private] |
Array2D<double> QMCReadAndEvaluateConfigs::R [private] |
Definition at line 91 of file QMCReadAndEvaluateConfigs.h.
Referenced by AddNewConfigToProperites(), initialize(), and locally_CalculateProperties().
double QMCReadAndEvaluateConfigs::D1 [private] |
Definition at line 92 of file QMCReadAndEvaluateConfigs.h.
Referenced by calc_E_Local_current(), and locally_CalculateProperties().
Array2D<double> QMCReadAndEvaluateConfigs::D2 [private] |
Definition at line 93 of file QMCReadAndEvaluateConfigs.h.
Referenced by calc_E_Local_current(), initialize(), and locally_CalculateProperties().
double QMCReadAndEvaluateConfigs::lnJ [private] |
Definition at line 94 of file QMCReadAndEvaluateConfigs.h.
Referenced by calc_log_weight_current(), and locally_CalculateProperties().
double QMCReadAndEvaluateConfigs::PE [private] |
Definition at line 95 of file QMCReadAndEvaluateConfigs.h.
Referenced by calc_E_Local_current(), and locally_CalculateProperties().
double QMCReadAndEvaluateConfigs::weight [private] |
Definition at line 96 of file QMCReadAndEvaluateConfigs.h.
Referenced by AddNewConfigToProperites(), and locally_CalculateProperties().
1.5.6