![]() |
QMCPACK
|
QMC drivers that implement QMC algorithms. More...
Classes | |
class | CSVMC |
Implements the VMC algorithm using umbrella sampling. More... | |
class | CSVMCUpdateAll |
Implements the VMC algorithm using umbrella sampling. More... | |
class | CSVMCUpdatePbyP |
Implements the VMC algorithm More... | |
class | CSVMCUpdatePbyPWithDriftFast |
Implements the VMC algorithm with drift. More... | |
class | DMC |
DMC driver using OpenMP paragra. More... | |
class | DMCBatched |
Implements a DMC using particle-by-particle threaded and batched moves. More... | |
class | QMCDriver |
abstract base class for QMC engines More... | |
class | QMCDriverNew |
QMCDriverNew Base class for Unified Drivers. More... | |
class | RMC |
Implements a RMC using threaded execution. More... | |
class | RMCUpdateAllWithDrift |
Implements the RMC algorithm using all electron moves More... | |
class | RMCUpdatePbyPWithDrift |
Implements the RMC algorithm using all electron moves More... | |
class | SOVMCUpdateAll |
Implements the Spin VMC algorithm using particle-by-particle move. More... | |
class | SOVMCUpdatePbyP |
Implements the VMC algorithm using particle-by-particle move, including spin-moves More... | |
class | VMC |
Implements a VMC using particle-by-particle move. More... | |
class | VMCBatched |
Implements a VMC using particle-by-particle move. More... | |
class | VMCUpdateAll |
Implements the VMC algorithm using particle-by-particle move. More... | |
class | VMCUpdatePbyP |
Implements the VMC algorithm using particle-by-particle move. More... | |
class | CostFunctionCrowdData |
Implements wave-function optimization. More... | |
class | QMCCostFunction |
Implements wave-function optimization. More... | |
class | QMCCostFunctionBase |
Implements wave-function optimization. More... | |
class | QMCFixedSampleLinearOptimize |
Implements wave-function optimization. More... | |
QMC drivers that implement QMC algorithms.
class qmcplusplus::CSVMC |
Implements the VMC algorithm using umbrella sampling.
Energy difference method with multiple H/Psi. Consult S. Chiesa's note.
Public Member Functions | |
CSVMC (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm) | |
Constructor. More... | |
bool | run () override |
Run the CSVMC algorithm. More... | |
bool | put (xmlNodePtr cur) override |
allocate internal data here before run() is called More... | |
QMCRunType | getRunType () override |
![]() | |
QMCDriver (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm, const std::string &QMC_driver_type, bool enable_profiling=false) | |
Constructor. More... | |
~QMCDriver () override | |
int | current () const |
return current step More... | |
void | setUpdateMode (bool pbyp) override |
set the update mode More... | |
void | setStatus (const std::string &aname, const std::string &h5name, bool append) override |
Set the status of the QMCDriver. More... | |
void | add_H_and_Psi (QMCHamiltonian *h, TrialWaveFunction *psi) override |
add QMCHamiltonian/TrialWaveFunction pair for multiple More... | |
void | process (xmlNodePtr cur) override |
initialize with xmlNode More... | |
xmlNodePtr | getQMCNode () |
return a xmlnode with update More... | |
void | putWalkers (std::vector< xmlNodePtr > &wset) override |
Read walker configurations from *.config.h5 files. More... | |
void | putTraces (xmlNodePtr txml) override |
void | requestTraces (bool traces) override |
void | putWalkerLogs (xmlNodePtr wlxml) override |
void | requestWalkerLogs (bool allow_walker_logs_) override |
std::string | getEngineName () override |
template<class PDT > | |
void | setValue (const std::string &aname, PDT x) |
void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) override |
set the BranchEngineType More... | |
std::unique_ptr< BranchEngineType > | getBranchEngine () override |
return BranchEngineType* More... | |
int | addObservable (const std::string &aname) |
RealType | getObservable (int i) |
void | setTau (RealType i) |
void | setWalkerOffsets () |
set global offsets of the walkers More... | |
RefVector< RandomBase< FullPrecRealType > > | getRngRefs () const |
return the random generators More... | |
RandomBase< FullPrecRealType > & | getRng (int i) override |
return the i-th random generator More... | |
unsigned long | getDriverMode () override |
![]() | |
virtual | ~QMCDriverInterface () |
virtual void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
![]() | |
CloneManager () | |
Constructor. More... | |
virtual | ~CloneManager () |
virtual destructor More... | |
void | makeClones (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &ham) |
void | makeClones (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &ham) |
void | makeClones (MCWalkerConfiguration &wg, TrialWaveFunction &guide) |
void | makeClones (TrialWaveFunction &guide) |
RealType | acceptRatio () const |
Private Member Functions | |
CSVMC (const CSVMC &)=delete | |
Copy Constructor (disabled) More... | |
CSVMC & | operator= (const CSVMC &)=delete |
Copy operator (disabled). More... | |
void | resetRun () |
Private Attributes | |
std::string | UseDrift |
int | prevSteps |
int | prevStepsBetweenSamples |
int | equilBlocks |
blocks over which normalization factors are accumulated More... | |
CSEnergyEstimator * | multiEstimator |
CSUpdateBase * | Mover |
Additional Inherited Members | |
![]() | |
enum | { QMC_UPDATE_MODE, QMC_MULTIPLE, QMC_OPTIMIZE, QMC_WARMUP } |
enumeration coupled with QMCMode More... | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | Buffer_t = Walker_t::Buffer_t |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | BranchEngineType = SimpleFixedNodeBranch |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
![]() | |
static void | clearClones () |
![]() | |
std::bitset< QMC_MODE_MAX > | qmc_driver_mode |
bits to classify QMCDriver More... | |
bool | allow_traces |
whether to allow traces More... | |
xmlNodePtr | traces_xml |
traces xml More... | |
bool | allow_walker_logs |
whether to allow traces More... | |
xmlNodePtr | walker_logs_xml |
traces xml More... | |
EstimatorManagerBase * | Estimators |
Observables manager. More... | |
std::unique_ptr< TraceManager > | Traces |
Traces manager. More... | |
std::unique_ptr< WalkerLogManager > | wlog_manager_ |
Traces manager. More... | |
![]() | |
bool | putQMCInfo (xmlNodePtr cur) |
Parses the xml input file for parameter definitions for a single qmc simulation. More... | |
void | addWalkers (int nwalkers) |
Add walkers to the end of the ensemble of walkers. More... | |
void | recordBlock (int block) override |
record the state of the block More... | |
bool | finalize (int block, bool dumpwalkers=true) |
finalize a qmc section More... | |
std::string | getRotationName (std::string RootName) |
std::string | getLastRotationName (std::string RootName) |
const std::string & | get_root_name () const override |
![]() | |
RefVector< WalkerLogCollector > | getWalkerLogCollectorRefs () |
![]() | |
const ProjectData & | project_data_ |
top-level project data information More... | |
std::unique_ptr< BranchEngineType > | branchEngine |
branch engine More... | |
DriftModifierBase * | DriftModifier |
drift modifer More... | |
bool | ResetRandom |
randomize it More... | |
bool | AppendRun |
flag to append or restart the run More... | |
bool | DumpConfig |
flag to turn off dumping configurations More... | |
bool | IsQMCDriver |
true, if it is a real QMC engine More... | |
int | MyCounter |
the number of times this QMCDriver is executed More... | |
int | kDelay |
the number to delay updates by More... | |
int | Period4CheckPoint |
period of dumping walker configurations and everything else for restart More... | |
int | Period4CheckProperties |
period of dumping walker positions and IDs for Forward Walking More... | |
int | Period4WalkerDump |
period of recording walker configurations More... | |
int | Period4ConfigDump |
period of recording walker positions and IDs for forward walking afterwards More... | |
IndexType | CurrentStep |
current step More... | |
IndexType | nBlocks |
maximum number of blocks More... | |
IndexType | nSteps |
maximum number of steps More... | |
IndexType | nSubSteps |
number of steps between a step: VMCs do not evaluate energies More... | |
IndexType | nWarmupSteps |
number of warmup steps More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves /rejected More... | |
IndexType | nBlocksBetweenRecompute |
the number of blocks between recomptePsi More... | |
IndexType | nTargetWalkers |
the number of walkers More... | |
IndexType | nTargetSamples |
the number of saved samples More... | |
IndexType | nStepsBetweenSamples |
alternate method of setting QMC run parameters More... | |
RealType | nSamplesPerThread |
samples per thread More... | |
RealType | nTargetPopulation |
target population More... | |
RealType | Tau |
timestep More... | |
int | MaxCPUSecs |
maximum cpu in secs More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
xmlNodePtr | qmcNode |
pointer to qmc node in xml file More... | |
const std::string | QMCType |
type of QMC driver More... | |
std::string | h5FileRoot |
the root of h5File More... | |
std::string | RootName |
root of all the output files More... | |
ParameterSet | m_param |
store any parameter that has to be read from a file More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
std::unique_ptr< HDFWalkerOutput > | wOut |
record engine for walkers More... | |
std::vector< TrialWaveFunction * > | Psi1 |
a list of TrialWaveFunctions for multiple method More... | |
std::vector< QMCHamiltonian * > | H1 |
a list of QMCHamiltonians for multiple method More... | |
UPtrVector< RandomBase< FullPrecRealType > > | Rng |
Random number generators. More... | |
std::vector< xmlNodePtr > | mcwalkerNodePtr |
a list of mcwalkerset element More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
RealType | SpinMass |
spin mass for spinor calcs More... | |
int | rotation |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
![]() | |
const IndexType | NumThreads |
number of threads More... | |
std::vector< QMCUpdateBase * > | Movers |
update engines More... | |
std::vector< EstimatorManagerBase * > | estimatorClones |
estimator managers More... | |
std::vector< TraceManager * > | traceClones |
trace managers More... | |
UPtrVector< WalkerLogCollector > | wlog_collectors |
trace collectors More... | |
UPtrVector< CSUpdateBase > | CSMovers |
std::vector< int > | wPerRank |
Walkers per MPI rank. More... | |
![]() | |
static UPtrVector< MCWalkerConfiguration > | wClones_uptr |
walkers More... | |
static std::vector< MCWalkerConfiguration * > | wClones |
static UPtrVector< MCWalkerConfiguration > | wgClones |
static UPtrVector< TrialWaveFunction > | psiClones_uptr |
trial wavefunctions More... | |
static std::vector< TrialWaveFunction * > | psiClones |
static UPtrVector< TrialWaveFunction > | guideClones_uptr |
guide wavefunctions More... | |
static std::vector< TrialWaveFunction * > | guideClones |
static UPtrVector< QMCHamiltonian > | hClones_uptr |
Hamiltonians. More... | |
static std::vector< QMCHamiltonian * > | hClones |
static std::vector< UPtrVector< MCWalkerConfiguration > > | WPoolClones_uptr |
static std::vector< std::vector< MCWalkerConfiguration * > > | WPoolClones |
static std::vector< UPtrVector< TrialWaveFunction > > | PsiPoolClones_uptr |
static std::vector< std::vector< TrialWaveFunction * > > | PsiPoolClones |
static std::vector< UPtrVector< QMCHamiltonian > > | HPoolClones_uptr |
static std::vector< std::vector< QMCHamiltonian * > > | HPoolClones |
CSVMC | ( | const ProjectData & | project_data, |
MCWalkerConfiguration & | w, | ||
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
Communicate * | comm | ||
) |
Constructor.
Definition at line 37 of file CSVMC.cpp.
References ParameterSet::add(), CSVMC::equilBlocks, QMCDriver::m_param, QMCDriver::qmc_driver_mode, QMCDriver::QMC_MULTIPLE, QMCDriver::RootName, and CSVMC::UseDrift.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 46 of file CSVMC.h.
References qmcplusplus::CSVMC.
|
overridevirtual |
allocate internal data here before run() is called
Implements QMCDriverInterface.
Definition at line 58 of file CSVMC.cpp.
References ParameterSet::add(), qmcplusplus::app_log(), qmcplusplus::ceil(), QMCDriver::CurrentStep, QMCDriver::DumpConfig, ParameterSet::get(), WalkerConfigurations::getActiveWalkers(), QMCDriver::m_param, MPIObjectBase::myComm, QMCDriver::MyCounter, QMCDriver::nBlocks, QMCDriver::nSamplesPerThread, QMCDriver::nSteps, QMCDriver::nStepsBetweenSamples, QMCDriver::nSubSteps, QMCDriver::nTargetPopulation, QMCDriver::nTargetSamples, omp_get_max_threads(), QMCDriver::Period4CheckPoint, QMCDriver::Period4WalkerDump, CSVMC::prevSteps, CSVMC::prevStepsBetweenSamples, ParameterSet::put(), qmcplusplus::qmc_common, QMCState::qmc_counter, Communicate::size(), QMCDriver::Tau, and QMCDriver::W.
|
private |
Definition at line 210 of file CSVMC.cpp.
References APP_ABORT, qmcplusplus::app_log(), WalkerConfigurations::begin(), QMCDriver::branchEngine, RandomNumberControl::Children, copy(), CloneManager::CSMovers, QMCDriver::DriftModifier, CloneManager::estimatorClones, QMCDriver::Estimators, FairDivideLow(), WalkerConfigurations::getActiveWalkers(), QMCDriver::H1, CloneManager::HPoolClones, CloneManager::makeClones(), CloneManager::Movers, QMCDriver::nSamplesPerThread, QMCDriver::nTargetSamples, CloneManager::NumThreads, QMCDriver::nWarmupSteps, QMCDriver::Psi1, CloneManager::PsiPoolClones, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, QMCDriver::qmcNode, QMCDriver::Rng, CloneManager::traceClones, QMCDriver::Traces, CSVMC::UseDrift, QMCDriver::W, CloneManager::wClones, and CloneManager::wPerRank.
Referenced by CSVMC::run().
|
overridevirtual |
Run the CSVMC algorithm.
Similar to VMC::run
write samples to a file
Implements QMCDriverInterface.
Definition at line 143 of file CSVMC.cpp.
References qmcplusplus::app_log(), WalkerConfigurations::begin(), RandomNumberControl::Children, ParticleSet::Collectables, CloneManager::CSMovers, QMCDriver::CurrentStep, QMCDriver::DumpConfig, MCWalkerConfiguration::dumpEnsemble(), CloneManager::estimatorClones, QMCDriver::Estimators, QMCDriver::finalize(), MPIObjectBase::myComm, QMCDriver::nBlocks, QMCDriver::nSteps, CloneManager::NumThreads, omp_get_thread_num(), QMCDriver::Period4CheckProperties, QMCDriver::Period4WalkerDump, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, QMCDriver::recordBlock(), CSVMC::resetRun(), QMCDriver::Rng, PooledData< T >::size(), Communicate::size(), EstimatorManagerBase::start(), EstimatorManagerBase::stop(), EstimatorManagerBase::stopBlock(), CloneManager::traceClones, QMCDriver::Traces, QMCDriver::W, CloneManager::wClones, QMCDriver::wOut, and CloneManager::wPerRank.
|
private |
blocks over which normalization factors are accumulated
Definition at line 53 of file CSVMC.h.
Referenced by CSVMC::CSVMC().
|
private |
|
private |
|
private |
Definition at line 50 of file CSVMC.h.
Referenced by CSVMC::put().
|
private |
Definition at line 51 of file CSVMC.h.
Referenced by CSVMC::put().
|
private |
Definition at line 49 of file CSVMC.h.
Referenced by CSVMC::CSVMC(), and CSVMC::resetRun().
class qmcplusplus::CSVMCUpdateAll |
Implements the VMC algorithm using umbrella sampling.
Energy difference method with multiple H/Psi. Consult S. Chiesa's note.
Definition at line 32 of file CSVMCUpdateAll.h.
Public Member Functions | |
CSVMCUpdateAll (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
void | advanceWalker (Walker_t &thisWalker, bool recompute) override |
move a walker More... | |
![]() | |
CSUpdateBase (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &h, RandomBase< FullPrecRealType > &rg) | |
~CSUpdateBase () override | |
void | computeSumRatio (const std::vector< RealType > &logpsi, const std::vector< RealType > &avgNorm, std::vector< RealType > &sumratio) |
void | computeSumRatio (const Matrix< RealType > &ratioij, std::vector< RealType > &sumratio) |
void | computeSumRatio (const std::vector< RealType > &logpsi, const std::vector< RealType > &avgNorm, Matrix< RealType > &ratioij, std::vector< RealType > &sumratio) |
void | updateRatioMatrix (const std::vector< RealType > &ratio_pbyp, Matrix< RealType > &ratioij) |
void | resizeWorkSpace (int nw, int nptcls) |
void | updateNorms () |
void | updateAvgWeights () |
void | initCSWalkers (WalkerIter_t it, WalkerIter_t it_end, bool resetNorms) |
void | initCSWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end, bool resetNorms) |
void | updateCSWalkers (WalkerIter_t it, WalkerIter_t it_end) |
![]() | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, TrialWaveFunction &guide, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Alt Constructor. More... | |
virtual | ~QMCUpdateBase () |
destructor More... | |
RealType | acceptRatio () const |
void | resetRun (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, const DriftModifierBase *driftmodifer) |
reset the QMCUpdateBase parameters More... | |
void | resetRun2 (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, WalkerLogCollector *wlog_collector_, const DriftModifierBase *driftmodifer) |
RealType | getTau () |
void | setTau (RealType t) |
RealType | getSpinMass () |
void | setSpinMass (RealType m) |
void | getLogs (std::vector< RealType > &logs) |
void | set_step (int step) |
void | startRun (int blocks, bool record) |
start a run More... | |
void | stopRun () |
stop a run More... | |
void | stopRun2 () |
void | startBlock (int steps) |
prepare to start a block More... | |
void | stopBlock (bool collectall=true) |
stop a block More... | |
void | setMultiplicity (WalkerIter_t it, WalkerIter_t it_end) |
set the multiplicity of the walkers to branch More... | |
void | setMultiplicity (Walker_t &awalker) const |
virtual void | initWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker buffers for PbyP update More... | |
virtual void | initWalkers (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker for walker update More... | |
virtual bool | put (xmlNodePtr cur) |
process options More... | |
void | accumulate (WalkerIter_t it, WalkerIter_t it_end) |
virtual void | advanceWalkers (WalkerIter_t it, WalkerIter_t it_end, bool recompute) |
advance walkers executed at each step More... | |
virtual RealType | advanceWalkerForEE (Walker_t &w1, std::vector< PosType > &dR, std::vector< int > &iats, std::vector< int > &rs, std::vector< RealType > &ratios) |
int | RMC_checkIndex (int N, int NMax) |
void | RMC_checkWalkerBounds (WalkerIter_t &it, WalkerIter_t first, WalkerIter_t last) |
RealType | logBackwardGF (const ParticleSet::ParticlePos &displ) |
Additional Inherited Members | |
![]() | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | WalkerIter_t = MCWalkerConfiguration::iterator |
using | BranchEngineType = SimpleFixedNodeBranch |
using | mPosType = PosType |
using | mTensorType = TensorType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
int | nPsi |
bool | useDrift |
std::vector< RealType > | logpsi |
std::vector< RealType > | sumratio |
std::vector< RealType > | invsumratio |
std::vector< RealType > | avgNorm |
std::vector< RealType > | avgWeight |
std::vector< RealType > | logNorm |
std::vector< RealType > | cumNorm |
std::vector< RealType > | instRij |
std::vector< RealType > | ratio |
Matrix< RealType > | ratioIJ |
std::string | useDriftOption |
Matrix< RealType > | RatioIJ |
CSEnergyEstimator * | multiEstimator |
multiple estimator More... | |
std::vector< QMCHamiltonian * > | H1 |
a list of QMCHamiltonians for multiple method More... | |
std::vector< TrialWaveFunction * > | Psi1 |
a list of TrialWaveFunctions for multiple method More... | |
std::vector< ParticleSet::ParticleGradient * > | G1 |
std::vector< ParticleSet::ParticleLaplacian * > | L1 |
std::vector< GradType > | g1_old |
std::vector< GradType > | g1_new |
![]() | |
int | nSubSteps |
number of steps per measurement More... | |
DriverDebugChecks | debug_checks_ = DriverDebugChecks::ALL_OFF |
determine additional checks for debugging purpose More... | |
std::string | debug_checks_str_ |
IndexType | MaxAge |
MaxAge>0 indicates branch is done. More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves rejected More... | |
IndexType | nAllRejected |
Total number of the steps when all the particle moves are rejected. More... | |
IndexType | nNodeCrossing |
Total number of node crossings per block. More... | |
IndexType | NonLocalMoveAccepted |
Total numer of non-local moves accepted. More... | |
RealType | Tau |
timestep More... | |
RealType | spinMass |
spin mass More... | |
bool | UseDrift |
use Drift More... | |
RealType | csoffset |
normalization offset for cs type runs. More... | |
TraceManager * | Traces |
traces More... | |
WalkerLogCollector * | wlog_collector |
![]() | |
RealType | getNodeCorrection (const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled) |
evaluate the ratio of scaled velocity and velocity More... | |
QMCUpdateBase (const QMCUpdateBase &)=delete | |
copy constructor (disabled) More... | |
![]() | |
static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
![]() | |
bool | UpdatePbyP |
update particle-by-particle More... | |
IndexType | NumPtcl |
number of particles More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
RealType | m_tauovermass |
tau/mass More... | |
RealType | m_r2max |
maximum displacement^2 More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
TrialWaveFunction & | Guide |
guide function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
RandomBase< FullPrecRealType > & | RandomGen |
random number generator More... | |
const BranchEngineType * | branchEngine |
branch engine, stateless reference to the one in QMCDriver More... | |
const DriftModifierBase * | DriftModifier |
drift modifer, stateless reference to the one in QMCDriver More... | |
EstimatorManagerBase * | Estimators |
estimator More... | |
ParameterSet | myParams |
parameters More... | |
std::vector< RealType > | MassInvS |
1/Mass per species More... | |
std::vector< RealType > | MassInvP |
1/Mass per particle More... | |
std::vector< RealType > | SqrtTauOverMass |
sqrt(tau/Mass) per particle More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
ParticleSet::ParticleScalar | deltaS |
temporart storage for spin displacement More... | |
ParticleSet::ParticleGradient | G |
storage for differential gradients for PbyP update More... | |
ParticleSet::ParticleGradient | dG |
ParticleSet::ParticleLaplacian | L |
storage for differential laplacians for PbyP update More... | |
ParticleSet::ParticleLaplacian | dL |
CSVMCUpdateAll | ( | MCWalkerConfiguration & | w, |
std::vector< TrialWaveFunction *> & | psi, | ||
std::vector< QMCHamiltonian *> & | h, | ||
RandomBase< FullPrecRealType > & | rg | ||
) |
Constructor.
Definition at line 33 of file CSVMCUpdateAll.cpp.
References QMCUpdateBase::UpdatePbyP.
|
overridevirtual |
move a walker
Implements QMCUpdateBase.
Definition at line 42 of file CSVMCUpdateAll.cpp.
References Walker< t_traits, p_traits >::Age, CSUpdateBase::avgNorm, CSUpdateBase::cumNorm, QMCUpdateBase::deltaR, qmcplusplus::exp(), ParticleSet::G, CSUpdateBase::G1, Walker< t_traits, p_traits >::getPropertyBase(), CSUpdateBase::H1, CSUpdateBase::invsumratio, ParticleSet::L, CSUpdateBase::L1, CSUpdateBase::logpsi, qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAllParticles(), QMCUpdateBase::MassInvS, Walker< t_traits, p_traits >::Multiplicity, QMCUpdateBase::nAccept, CSUpdateBase::nPsi, QMCUpdateBase::nReject, Walker< t_traits, p_traits >::Properties, CSUpdateBase::Psi1, ParticleSet::R, Walker< t_traits, p_traits >::R, Random, QMCUpdateBase::RandomGen, qmcplusplus::sqrt(), CSUpdateBase::sumratio, QMCUpdateBase::Tau, and QMCUpdateBase::W.
class qmcplusplus::CSVMCUpdatePbyP |
Implements the VMC algorithm
Definition at line 24 of file CSVMCUpdatePbyP.h.
Public Member Functions | |
CSVMCUpdatePbyP (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
~CSVMCUpdatePbyP () override | |
void | advanceWalker (Walker_t &thisWalker, bool recompute) override |
move a walker More... | |
![]() | |
CSUpdateBase (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &h, RandomBase< FullPrecRealType > &rg) | |
~CSUpdateBase () override | |
void | computeSumRatio (const std::vector< RealType > &logpsi, const std::vector< RealType > &avgNorm, std::vector< RealType > &sumratio) |
void | computeSumRatio (const Matrix< RealType > &ratioij, std::vector< RealType > &sumratio) |
void | computeSumRatio (const std::vector< RealType > &logpsi, const std::vector< RealType > &avgNorm, Matrix< RealType > &ratioij, std::vector< RealType > &sumratio) |
void | updateRatioMatrix (const std::vector< RealType > &ratio_pbyp, Matrix< RealType > &ratioij) |
void | resizeWorkSpace (int nw, int nptcls) |
void | updateNorms () |
void | updateAvgWeights () |
void | initCSWalkers (WalkerIter_t it, WalkerIter_t it_end, bool resetNorms) |
void | initCSWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end, bool resetNorms) |
void | updateCSWalkers (WalkerIter_t it, WalkerIter_t it_end) |
![]() | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, TrialWaveFunction &guide, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Alt Constructor. More... | |
virtual | ~QMCUpdateBase () |
destructor More... | |
RealType | acceptRatio () const |
void | resetRun (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, const DriftModifierBase *driftmodifer) |
reset the QMCUpdateBase parameters More... | |
void | resetRun2 (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, WalkerLogCollector *wlog_collector_, const DriftModifierBase *driftmodifer) |
RealType | getTau () |
void | setTau (RealType t) |
RealType | getSpinMass () |
void | setSpinMass (RealType m) |
void | getLogs (std::vector< RealType > &logs) |
void | set_step (int step) |
void | startRun (int blocks, bool record) |
start a run More... | |
void | stopRun () |
stop a run More... | |
void | stopRun2 () |
void | startBlock (int steps) |
prepare to start a block More... | |
void | stopBlock (bool collectall=true) |
stop a block More... | |
void | setMultiplicity (WalkerIter_t it, WalkerIter_t it_end) |
set the multiplicity of the walkers to branch More... | |
void | setMultiplicity (Walker_t &awalker) const |
virtual void | initWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker buffers for PbyP update More... | |
virtual void | initWalkers (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker for walker update More... | |
virtual bool | put (xmlNodePtr cur) |
process options More... | |
void | accumulate (WalkerIter_t it, WalkerIter_t it_end) |
virtual void | advanceWalkers (WalkerIter_t it, WalkerIter_t it_end, bool recompute) |
advance walkers executed at each step More... | |
virtual RealType | advanceWalkerForEE (Walker_t &w1, std::vector< PosType > &dR, std::vector< int > &iats, std::vector< int > &rs, std::vector< RealType > &ratios) |
int | RMC_checkIndex (int N, int NMax) |
void | RMC_checkWalkerBounds (WalkerIter_t &it, WalkerIter_t first, WalkerIter_t last) |
RealType | logBackwardGF (const ParticleSet::ParticlePos &displ) |
Additional Inherited Members | |
![]() | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | WalkerIter_t = MCWalkerConfiguration::iterator |
using | BranchEngineType = SimpleFixedNodeBranch |
using | mPosType = PosType |
using | mTensorType = TensorType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
int | nPsi |
bool | useDrift |
std::vector< RealType > | logpsi |
std::vector< RealType > | sumratio |
std::vector< RealType > | invsumratio |
std::vector< RealType > | avgNorm |
std::vector< RealType > | avgWeight |
std::vector< RealType > | logNorm |
std::vector< RealType > | cumNorm |
std::vector< RealType > | instRij |
std::vector< RealType > | ratio |
Matrix< RealType > | ratioIJ |
std::string | useDriftOption |
Matrix< RealType > | RatioIJ |
CSEnergyEstimator * | multiEstimator |
multiple estimator More... | |
std::vector< QMCHamiltonian * > | H1 |
a list of QMCHamiltonians for multiple method More... | |
std::vector< TrialWaveFunction * > | Psi1 |
a list of TrialWaveFunctions for multiple method More... | |
std::vector< ParticleSet::ParticleGradient * > | G1 |
std::vector< ParticleSet::ParticleLaplacian * > | L1 |
std::vector< GradType > | g1_old |
std::vector< GradType > | g1_new |
![]() | |
int | nSubSteps |
number of steps per measurement More... | |
DriverDebugChecks | debug_checks_ = DriverDebugChecks::ALL_OFF |
determine additional checks for debugging purpose More... | |
std::string | debug_checks_str_ |
IndexType | MaxAge |
MaxAge>0 indicates branch is done. More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves rejected More... | |
IndexType | nAllRejected |
Total number of the steps when all the particle moves are rejected. More... | |
IndexType | nNodeCrossing |
Total number of node crossings per block. More... | |
IndexType | NonLocalMoveAccepted |
Total numer of non-local moves accepted. More... | |
RealType | Tau |
timestep More... | |
RealType | spinMass |
spin mass More... | |
bool | UseDrift |
use Drift More... | |
RealType | csoffset |
normalization offset for cs type runs. More... | |
TraceManager * | Traces |
traces More... | |
WalkerLogCollector * | wlog_collector |
![]() | |
RealType | getNodeCorrection (const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled) |
evaluate the ratio of scaled velocity and velocity More... | |
QMCUpdateBase (const QMCUpdateBase &)=delete | |
copy constructor (disabled) More... | |
![]() | |
static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
![]() | |
bool | UpdatePbyP |
update particle-by-particle More... | |
IndexType | NumPtcl |
number of particles More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
RealType | m_tauovermass |
tau/mass More... | |
RealType | m_r2max |
maximum displacement^2 More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
TrialWaveFunction & | Guide |
guide function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
RandomBase< FullPrecRealType > & | RandomGen |
random number generator More... | |
const BranchEngineType * | branchEngine |
branch engine, stateless reference to the one in QMCDriver More... | |
const DriftModifierBase * | DriftModifier |
drift modifer, stateless reference to the one in QMCDriver More... | |
EstimatorManagerBase * | Estimators |
estimator More... | |
ParameterSet | myParams |
parameters More... | |
std::vector< RealType > | MassInvS |
1/Mass per species More... | |
std::vector< RealType > | MassInvP |
1/Mass per particle More... | |
std::vector< RealType > | SqrtTauOverMass |
sqrt(tau/Mass) per particle More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
ParticleSet::ParticleScalar | deltaS |
temporart storage for spin displacement More... | |
ParticleSet::ParticleGradient | G |
storage for differential gradients for PbyP update More... | |
ParticleSet::ParticleGradient | dG |
ParticleSet::ParticleLaplacian | L |
storage for differential laplacians for PbyP update More... | |
ParticleSet::ParticleLaplacian | dL |
CSVMCUpdatePbyP | ( | MCWalkerConfiguration & | w, |
std::vector< TrialWaveFunction *> & | psi, | ||
std::vector< QMCHamiltonian *> & | h, | ||
RandomBase< FullPrecRealType > & | rg | ||
) |
Constructor.
Definition at line 30 of file CSVMCUpdatePbyP.cpp.
|
override |
Definition at line 37 of file CSVMCUpdatePbyP.cpp.
|
overridevirtual |
move a walker
Implements QMCUpdateBase.
Definition at line 39 of file CSVMCUpdatePbyP.cpp.
References ParticleSet::accept_rejectMove(), CSUpdateBase::avgNorm, CSUpdateBase::computeSumRatio(), CSUpdateBase::cumNorm, Walker< t_traits, p_traits >::DataSet, QMCUpdateBase::deltaR, ParticleSet::donePbyP(), ParticleSet::first(), ParticleSet::G, CSUpdateBase::G1, Walker< t_traits, p_traits >::getPropertyBase(), ParticleSet::groups(), CSUpdateBase::H1, CSUpdateBase::invsumratio, ParticleSet::L, Walker< t_traits, p_traits >::L, CSUpdateBase::L1, ParticleSet::last(), ParticleSet::loadWalker(), CSUpdateBase::logpsi, qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAndCheck(), QMCUpdateBase::MassInvS, Walker< t_traits, p_traits >::Multiplicity, QMCUpdateBase::nAccept, QMCUpdateBase::nAllRejected, norm(), CSUpdateBase::nPsi, QMCUpdateBase::nReject, QMCUpdateBase::nSubSteps, Walker< t_traits, p_traits >::Properties, CSUpdateBase::Psi1, QMCUpdateBase::RandomGen, CSUpdateBase::ratio, CSUpdateBase::RatioIJ, ParticleSet::saveWalker(), qmcplusplus::sqrt(), CSUpdateBase::sumratio, QMCUpdateBase::Tau, CSUpdateBase::updateRatioMatrix(), and QMCUpdateBase::W.
class qmcplusplus::CSVMCUpdatePbyPWithDriftFast |
Implements the VMC algorithm with drift.
Definition at line 43 of file CSVMCUpdatePbyP.h.
Public Member Functions | |
CSVMCUpdatePbyPWithDriftFast (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
~CSVMCUpdatePbyPWithDriftFast () override | |
void | advanceWalker (Walker_t &thisWalker, bool recompute) override |
move a walker More... | |
![]() | |
CSUpdateBase (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &h, RandomBase< FullPrecRealType > &rg) | |
~CSUpdateBase () override | |
void | computeSumRatio (const std::vector< RealType > &logpsi, const std::vector< RealType > &avgNorm, std::vector< RealType > &sumratio) |
void | computeSumRatio (const Matrix< RealType > &ratioij, std::vector< RealType > &sumratio) |
void | computeSumRatio (const std::vector< RealType > &logpsi, const std::vector< RealType > &avgNorm, Matrix< RealType > &ratioij, std::vector< RealType > &sumratio) |
void | updateRatioMatrix (const std::vector< RealType > &ratio_pbyp, Matrix< RealType > &ratioij) |
void | resizeWorkSpace (int nw, int nptcls) |
void | updateNorms () |
void | updateAvgWeights () |
void | initCSWalkers (WalkerIter_t it, WalkerIter_t it_end, bool resetNorms) |
void | initCSWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end, bool resetNorms) |
void | updateCSWalkers (WalkerIter_t it, WalkerIter_t it_end) |
![]() | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, TrialWaveFunction &guide, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Alt Constructor. More... | |
virtual | ~QMCUpdateBase () |
destructor More... | |
RealType | acceptRatio () const |
void | resetRun (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, const DriftModifierBase *driftmodifer) |
reset the QMCUpdateBase parameters More... | |
void | resetRun2 (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, WalkerLogCollector *wlog_collector_, const DriftModifierBase *driftmodifer) |
RealType | getTau () |
void | setTau (RealType t) |
RealType | getSpinMass () |
void | setSpinMass (RealType m) |
void | getLogs (std::vector< RealType > &logs) |
void | set_step (int step) |
void | startRun (int blocks, bool record) |
start a run More... | |
void | stopRun () |
stop a run More... | |
void | stopRun2 () |
void | startBlock (int steps) |
prepare to start a block More... | |
void | stopBlock (bool collectall=true) |
stop a block More... | |
void | setMultiplicity (WalkerIter_t it, WalkerIter_t it_end) |
set the multiplicity of the walkers to branch More... | |
void | setMultiplicity (Walker_t &awalker) const |
virtual void | initWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker buffers for PbyP update More... | |
virtual void | initWalkers (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker for walker update More... | |
virtual bool | put (xmlNodePtr cur) |
process options More... | |
void | accumulate (WalkerIter_t it, WalkerIter_t it_end) |
virtual void | advanceWalkers (WalkerIter_t it, WalkerIter_t it_end, bool recompute) |
advance walkers executed at each step More... | |
virtual RealType | advanceWalkerForEE (Walker_t &w1, std::vector< PosType > &dR, std::vector< int > &iats, std::vector< int > &rs, std::vector< RealType > &ratios) |
int | RMC_checkIndex (int N, int NMax) |
void | RMC_checkWalkerBounds (WalkerIter_t &it, WalkerIter_t first, WalkerIter_t last) |
RealType | logBackwardGF (const ParticleSet::ParticlePos &displ) |
Additional Inherited Members | |
![]() | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | WalkerIter_t = MCWalkerConfiguration::iterator |
using | BranchEngineType = SimpleFixedNodeBranch |
using | mPosType = PosType |
using | mTensorType = TensorType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
int | nPsi |
bool | useDrift |
std::vector< RealType > | logpsi |
std::vector< RealType > | sumratio |
std::vector< RealType > | invsumratio |
std::vector< RealType > | avgNorm |
std::vector< RealType > | avgWeight |
std::vector< RealType > | logNorm |
std::vector< RealType > | cumNorm |
std::vector< RealType > | instRij |
std::vector< RealType > | ratio |
Matrix< RealType > | ratioIJ |
std::string | useDriftOption |
Matrix< RealType > | RatioIJ |
CSEnergyEstimator * | multiEstimator |
multiple estimator More... | |
std::vector< QMCHamiltonian * > | H1 |
a list of QMCHamiltonians for multiple method More... | |
std::vector< TrialWaveFunction * > | Psi1 |
a list of TrialWaveFunctions for multiple method More... | |
std::vector< ParticleSet::ParticleGradient * > | G1 |
std::vector< ParticleSet::ParticleLaplacian * > | L1 |
std::vector< GradType > | g1_old |
std::vector< GradType > | g1_new |
![]() | |
int | nSubSteps |
number of steps per measurement More... | |
DriverDebugChecks | debug_checks_ = DriverDebugChecks::ALL_OFF |
determine additional checks for debugging purpose More... | |
std::string | debug_checks_str_ |
IndexType | MaxAge |
MaxAge>0 indicates branch is done. More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves rejected More... | |
IndexType | nAllRejected |
Total number of the steps when all the particle moves are rejected. More... | |
IndexType | nNodeCrossing |
Total number of node crossings per block. More... | |
IndexType | NonLocalMoveAccepted |
Total numer of non-local moves accepted. More... | |
RealType | Tau |
timestep More... | |
RealType | spinMass |
spin mass More... | |
bool | UseDrift |
use Drift More... | |
RealType | csoffset |
normalization offset for cs type runs. More... | |
TraceManager * | Traces |
traces More... | |
WalkerLogCollector * | wlog_collector |
![]() | |
RealType | getNodeCorrection (const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled) |
evaluate the ratio of scaled velocity and velocity More... | |
QMCUpdateBase (const QMCUpdateBase &)=delete | |
copy constructor (disabled) More... | |
![]() | |
static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
![]() | |
bool | UpdatePbyP |
update particle-by-particle More... | |
IndexType | NumPtcl |
number of particles More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
RealType | m_tauovermass |
tau/mass More... | |
RealType | m_r2max |
maximum displacement^2 More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
TrialWaveFunction & | Guide |
guide function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
RandomBase< FullPrecRealType > & | RandomGen |
random number generator More... | |
const BranchEngineType * | branchEngine |
branch engine, stateless reference to the one in QMCDriver More... | |
const DriftModifierBase * | DriftModifier |
drift modifer, stateless reference to the one in QMCDriver More... | |
EstimatorManagerBase * | Estimators |
estimator More... | |
ParameterSet | myParams |
parameters More... | |
std::vector< RealType > | MassInvS |
1/Mass per species More... | |
std::vector< RealType > | MassInvP |
1/Mass per particle More... | |
std::vector< RealType > | SqrtTauOverMass |
sqrt(tau/Mass) per particle More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
ParticleSet::ParticleScalar | deltaS |
temporart storage for spin displacement More... | |
ParticleSet::ParticleGradient | G |
storage for differential gradients for PbyP update More... | |
ParticleSet::ParticleGradient | dG |
ParticleSet::ParticleLaplacian | L |
storage for differential laplacians for PbyP update More... | |
ParticleSet::ParticleLaplacian | dL |
CSVMCUpdatePbyPWithDriftFast | ( | MCWalkerConfiguration & | w, |
std::vector< TrialWaveFunction *> & | psi, | ||
std::vector< QMCHamiltonian *> & | h, | ||
RandomBase< FullPrecRealType > & | rg | ||
) |
Constructor.
UpdatePbyP With Drift Fast.
Definition at line 150 of file CSVMCUpdatePbyP.cpp.
References APP_ABORT.
|
override |
Definition at line 157 of file CSVMCUpdatePbyP.cpp.
|
overridevirtual |
class qmcplusplus::DMC |
DMC driver using OpenMP paragra.
This is the main DMC driver with MPI/OpenMP loops over the walkers.
Public Member Functions | |
DMC (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, UPtrVector< RandomBase< QMCTraits::FullPrecRealType >> &rngs, Communicate *comm, bool enable_profiling) | |
Constructor. More... | |
bool | run () override |
bool | put (xmlNodePtr cur) override |
void | setTau (RealType i) |
QMCRunType | getRunType () override |
![]() | |
QMCDriver (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm, const std::string &QMC_driver_type, bool enable_profiling=false) | |
Constructor. More... | |
~QMCDriver () override | |
int | current () const |
return current step More... | |
void | setUpdateMode (bool pbyp) override |
set the update mode More... | |
void | setStatus (const std::string &aname, const std::string &h5name, bool append) override |
Set the status of the QMCDriver. More... | |
void | add_H_and_Psi (QMCHamiltonian *h, TrialWaveFunction *psi) override |
add QMCHamiltonian/TrialWaveFunction pair for multiple More... | |
void | process (xmlNodePtr cur) override |
initialize with xmlNode More... | |
xmlNodePtr | getQMCNode () |
return a xmlnode with update More... | |
void | putWalkers (std::vector< xmlNodePtr > &wset) override |
Read walker configurations from *.config.h5 files. More... | |
void | putTraces (xmlNodePtr txml) override |
void | requestTraces (bool traces) override |
void | putWalkerLogs (xmlNodePtr wlxml) override |
void | requestWalkerLogs (bool allow_walker_logs_) override |
std::string | getEngineName () override |
template<class PDT > | |
void | setValue (const std::string &aname, PDT x) |
void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) override |
set the BranchEngineType More... | |
std::unique_ptr< BranchEngineType > | getBranchEngine () override |
return BranchEngineType* More... | |
int | addObservable (const std::string &aname) |
RealType | getObservable (int i) |
void | setTau (RealType i) |
void | setWalkerOffsets () |
set global offsets of the walkers More... | |
RefVector< RandomBase< FullPrecRealType > > | getRngRefs () const |
return the random generators More... | |
RandomBase< FullPrecRealType > & | getRng (int i) override |
return the i-th random generator More... | |
unsigned long | getDriverMode () override |
![]() | |
virtual | ~QMCDriverInterface () |
virtual void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
![]() | |
CloneManager () | |
Constructor. More... | |
virtual | ~CloneManager () |
virtual destructor More... | |
void | makeClones (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &ham) |
void | makeClones (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &ham) |
void | makeClones (MCWalkerConfiguration &wg, TrialWaveFunction &guide) |
void | makeClones (TrialWaveFunction &guide) |
RealType | acceptRatio () const |
Private Member Functions | |
void | resetUpdateEngines () |
DMC (const DMC &)=delete | |
Copy Constructor (disabled) More... | |
DMC & | operator= (const DMC &)=delete |
Copy operator (disabled). More... | |
Private Attributes | |
UPtrVector< RandomBase< QMCTraits::FullPrecRealType > > & | rngs_ |
IndexType | KillNodeCrossing |
Index to determine what to do when node crossing is detected. More... | |
IndexType | BranchInterval |
Interval between branching. More... | |
std::string | BranchInfo |
hdf5 file name for Branch conditions More... | |
std::string | KillWalker |
input std::string to determine kill walkers or not More... | |
std::string | SwapWalkers |
input std::string to determine swap walkers among mpi processors More... | |
std::string | L2 |
input to control diffusion with L2 operator More... | |
std::string | Reconfiguration |
input std::string to determine to use reconfiguration More... | |
std::string | NonLocalMove |
input std::string to determine to use nonlocal move More... | |
IndexType | mover_MaxAge |
input to control maximum age allowed for walkers. More... | |
Additional Inherited Members | |
![]() | |
enum | { QMC_UPDATE_MODE, QMC_MULTIPLE, QMC_OPTIMIZE, QMC_WARMUP } |
enumeration coupled with QMCMode More... | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | Buffer_t = Walker_t::Buffer_t |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | BranchEngineType = SimpleFixedNodeBranch |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
![]() | |
static void | clearClones () |
![]() | |
std::bitset< QMC_MODE_MAX > | qmc_driver_mode |
bits to classify QMCDriver More... | |
bool | allow_traces |
whether to allow traces More... | |
xmlNodePtr | traces_xml |
traces xml More... | |
bool | allow_walker_logs |
whether to allow traces More... | |
xmlNodePtr | walker_logs_xml |
traces xml More... | |
EstimatorManagerBase * | Estimators |
Observables manager. More... | |
std::unique_ptr< TraceManager > | Traces |
Traces manager. More... | |
std::unique_ptr< WalkerLogManager > | wlog_manager_ |
Traces manager. More... | |
![]() | |
bool | putQMCInfo (xmlNodePtr cur) |
Parses the xml input file for parameter definitions for a single qmc simulation. More... | |
void | addWalkers (int nwalkers) |
Add walkers to the end of the ensemble of walkers. More... | |
void | recordBlock (int block) override |
record the state of the block More... | |
bool | finalize (int block, bool dumpwalkers=true) |
finalize a qmc section More... | |
std::string | getRotationName (std::string RootName) |
std::string | getLastRotationName (std::string RootName) |
const std::string & | get_root_name () const override |
![]() | |
RefVector< WalkerLogCollector > | getWalkerLogCollectorRefs () |
![]() | |
const ProjectData & | project_data_ |
top-level project data information More... | |
std::unique_ptr< BranchEngineType > | branchEngine |
branch engine More... | |
DriftModifierBase * | DriftModifier |
drift modifer More... | |
bool | ResetRandom |
randomize it More... | |
bool | AppendRun |
flag to append or restart the run More... | |
bool | DumpConfig |
flag to turn off dumping configurations More... | |
bool | IsQMCDriver |
true, if it is a real QMC engine More... | |
int | MyCounter |
the number of times this QMCDriver is executed More... | |
int | kDelay |
the number to delay updates by More... | |
int | Period4CheckPoint |
period of dumping walker configurations and everything else for restart More... | |
int | Period4CheckProperties |
period of dumping walker positions and IDs for Forward Walking More... | |
int | Period4WalkerDump |
period of recording walker configurations More... | |
int | Period4ConfigDump |
period of recording walker positions and IDs for forward walking afterwards More... | |
IndexType | CurrentStep |
current step More... | |
IndexType | nBlocks |
maximum number of blocks More... | |
IndexType | nSteps |
maximum number of steps More... | |
IndexType | nSubSteps |
number of steps between a step: VMCs do not evaluate energies More... | |
IndexType | nWarmupSteps |
number of warmup steps More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves /rejected More... | |
IndexType | nBlocksBetweenRecompute |
the number of blocks between recomptePsi More... | |
IndexType | nTargetWalkers |
the number of walkers More... | |
IndexType | nTargetSamples |
the number of saved samples More... | |
IndexType | nStepsBetweenSamples |
alternate method of setting QMC run parameters More... | |
RealType | nSamplesPerThread |
samples per thread More... | |
RealType | nTargetPopulation |
target population More... | |
RealType | Tau |
timestep More... | |
int | MaxCPUSecs |
maximum cpu in secs More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
xmlNodePtr | qmcNode |
pointer to qmc node in xml file More... | |
const std::string | QMCType |
type of QMC driver More... | |
std::string | h5FileRoot |
the root of h5File More... | |
std::string | RootName |
root of all the output files More... | |
ParameterSet | m_param |
store any parameter that has to be read from a file More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
std::unique_ptr< HDFWalkerOutput > | wOut |
record engine for walkers More... | |
std::vector< TrialWaveFunction * > | Psi1 |
a list of TrialWaveFunctions for multiple method More... | |
std::vector< QMCHamiltonian * > | H1 |
a list of QMCHamiltonians for multiple method More... | |
UPtrVector< RandomBase< FullPrecRealType > > | Rng |
Random number generators. More... | |
std::vector< xmlNodePtr > | mcwalkerNodePtr |
a list of mcwalkerset element More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
RealType | SpinMass |
spin mass for spinor calcs More... | |
int | rotation |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
![]() | |
const IndexType | NumThreads |
number of threads More... | |
std::vector< QMCUpdateBase * > | Movers |
update engines More... | |
std::vector< EstimatorManagerBase * > | estimatorClones |
estimator managers More... | |
std::vector< TraceManager * > | traceClones |
trace managers More... | |
UPtrVector< WalkerLogCollector > | wlog_collectors |
trace collectors More... | |
UPtrVector< CSUpdateBase > | CSMovers |
std::vector< int > | wPerRank |
Walkers per MPI rank. More... | |
![]() | |
static UPtrVector< MCWalkerConfiguration > | wClones_uptr |
walkers More... | |
static std::vector< MCWalkerConfiguration * > | wClones |
static UPtrVector< MCWalkerConfiguration > | wgClones |
static UPtrVector< TrialWaveFunction > | psiClones_uptr |
trial wavefunctions More... | |
static std::vector< TrialWaveFunction * > | psiClones |
static UPtrVector< TrialWaveFunction > | guideClones_uptr |
guide wavefunctions More... | |
static std::vector< TrialWaveFunction * > | guideClones |
static UPtrVector< QMCHamiltonian > | hClones_uptr |
Hamiltonians. More... | |
static std::vector< QMCHamiltonian * > | hClones |
static std::vector< UPtrVector< MCWalkerConfiguration > > | WPoolClones_uptr |
static std::vector< std::vector< MCWalkerConfiguration * > > | WPoolClones |
static std::vector< UPtrVector< TrialWaveFunction > > | PsiPoolClones_uptr |
static std::vector< std::vector< TrialWaveFunction * > > | PsiPoolClones |
static std::vector< UPtrVector< QMCHamiltonian > > | HPoolClones_uptr |
static std::vector< std::vector< QMCHamiltonian * > > | HPoolClones |
DMC | ( | const ProjectData & | project_data, |
MCWalkerConfiguration & | w, | ||
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
UPtrVector< RandomBase< QMCTraits::FullPrecRealType >> & | rngs, | ||
Communicate * | comm, | ||
bool | enable_profiling | ||
) |
Constructor.
Definition at line 44 of file DMC.cpp.
References ParameterSet::add(), DMC::KillWalker, DMC::L2, QMCDriver::m_param, DMC::mover_MaxAge, DMC::NonLocalMove, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, DMC::Reconfiguration, and QMCDriver::RootName.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 45 of file DMC.h.
References qmcplusplus::DMC.
|
overridevirtual |
Implements QMCDriverInterface.
Definition at line 339 of file DMC.cpp.
References ParameterSet::add(), DMC::BranchInterval, and ParameterSet::put().
|
private |
Definition at line 70 of file DMC.cpp.
References APP_ABORT, qmcplusplus::app_log(), WalkerConfigurations::begin(), QMCDriver::branchEngine, DMC::BranchInterval, copy(), MCWalkerConfiguration::createWalkers(), QMCDriver::DriftModifier, Timer::elapsed(), CloneManager::estimatorClones, QMCDriver::Estimators, FairDivideLow(), WalkerConfigurations::getActiveWalkers(), QMCDriver::H, CloneManager::hClones, ParticleSet::isSpinor(), DMC::KillNodeCrossing, DMC::L2, MCWalkerConfiguration::loadEnsemble(), CloneManager::makeClones(), DMC::mover_MaxAge, CloneManager::Movers, QMCDriver::nBlocks, QMCDriver::nSteps, CloneManager::NumThreads, QMCDriver::Psi, CloneManager::psiClones, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, QMCDriver::qmcNode, DMC::Reconfiguration, QMCDriver::Rng, DMC::rngs_, QMCDriver::setWalkerOffsets(), QMCDriver::SpinMass, CloneManager::traceClones, QMCDriver::Traces, QMCDriver::W, CloneManager::wClones, CloneManager::wlog_collectors, QMCDriver::wlog_manager_, and CloneManager::wPerRank.
Referenced by DMC::run().
|
overridevirtual |
Implements QMCDriverInterface.
Definition at line 228 of file DMC.cpp.
References CloneManager::acceptRatio(), qmcplusplus::app_log(), Communicate::bcast(), QMCDriver::branchEngine, DMC::BranchInterval, ParticleSet::Collectables, QMCDriver::CurrentStep, QMCDriver::DumpConfig, QMCDriver::Estimators, FairDivideLow(), QMCDriver::finalize(), WalkerConfigurations::getActiveWalkers(), Communicate::getName(), CloneManager::getWalkerLogCollectorRefs(), QMCDriver::MaxCPUSecs, CloneManager::Movers, MPIObjectBase::myComm, QMCDriver::nBlocks, QMCDriver::nBlocksBetweenRecompute, QMCDriver::nSteps, CloneManager::NumThreads, omp_get_thread_num(), QMCDriver::Period4CheckPoint, QMCDriver::Period4CheckProperties, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, Communicate::rank(), DMC::Reconfiguration, QMCDriver::recordBlock(), DMC::resetUpdateEngines(), QMCDriver::Rng, DMC::rngs_, qmcplusplus::run_time_manager, EstimatorManagerBase::setCollectionMode(), PooledData< T >::size(), LoopTimer< CLOCK >::start(), EstimatorManagerBase::start(), EstimatorManagerBase::startBlock(), LoopTimer< CLOCK >::stop(), EstimatorManagerBase::stop(), EstimatorManagerBase::stopBlock(), CloneManager::traceClones, QMCDriver::Traces, QMCDriver::W, CloneManager::wClones, QMCDriver::wlog_manager_, and CloneManager::wPerRank.
Referenced by qmcplusplus::TEST_CASE().
void setTau | ( | RealType | i | ) |
|
private |
|
private |
Interval between branching.
Definition at line 54 of file DMC.h.
Referenced by DMC::put(), DMC::resetUpdateEngines(), and DMC::run().
|
private |
Index to determine what to do when node crossing is detected.
Definition at line 52 of file DMC.h.
Referenced by DMC::resetUpdateEngines().
|
private |
input std::string to determine kill walkers or not
Definition at line 58 of file DMC.h.
Referenced by DMC::DMC().
|
private |
input to control diffusion with L2 operator
Definition at line 62 of file DMC.h.
Referenced by DMC::DMC(), and DMC::resetUpdateEngines().
|
private |
input to control maximum age allowed for walkers.
Definition at line 68 of file DMC.h.
Referenced by DMC::DMC(), and DMC::resetUpdateEngines().
|
private |
input std::string to determine to use nonlocal move
Definition at line 66 of file DMC.h.
Referenced by DMC::DMC().
|
private |
input std::string to determine to use reconfiguration
Definition at line 64 of file DMC.h.
Referenced by DMC::DMC(), DMC::resetUpdateEngines(), and DMC::run().
|
private |
Definition at line 49 of file DMC.h.
Referenced by DMC::resetUpdateEngines(), and DMC::run().
class qmcplusplus::DMCBatched |
Implements a DMC using particle-by-particle threaded and batched moves.
Definition at line 35 of file DMCBatched.h.
Public Types | |
using | Base = QMCDriverNew |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
using | PosType = QMCTraits::PosType |
using | ParticlePositions = PtclOnLatticeTraits::ParticlePos |
![]() | |
enum | { QMC_UPDATE_MODE, QMC_MULTIPLE, QMC_OPTIMIZE, QMC_WARMUP } |
separate but similar to QMCModeEnum More... | |
using | RealType = QMCTraits::RealType |
using | IndexType = QMCTraits::IndexType |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
using | MCPWalker = MCPopulation::MCPWalker |
using | WFBuffer = MCPopulation::WFBuffer |
using | SetNonLocalMoveHandler = std::function< void(QMCHamiltonian &)> |
![]() | |
using | BranchEngineType = SimpleFixedNodeBranch |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
Public Member Functions | |
DMCBatched (const ProjectData &project_data, QMCDriverInput &&qmcdriver_input, const std::optional< EstimatorManagerInput > &global_emi, DMCDriverInput &&input, WalkerConfigurations &wc, MCPopulation &&pop, Communicate *comm) | |
Constructor. More... | |
DMCBatched (const DMCBatched &)=delete | |
Copy Constructor (disabled) More... | |
DMCBatched & | operator= (const DMCBatched &)=delete |
Copy operator (disabled). More... | |
DMCBatched (DMCBatched &&)=default | |
~DMCBatched () override | |
void | process (xmlNodePtr cur) override |
DMCBatched driver will eventually ignore cur. More... | |
bool | run () override |
QMCRunType | getRunType () override |
void | setNonLocalMoveHandler (QMCHamiltonian &hamiltonian) |
![]() | |
QMCDriverNew (const ProjectData &project_data, QMCDriverInput &&input, const std::optional< EstimatorManagerInput > &global_emi, WalkerConfigurations &wc, MCPopulation &&population, const std::string timer_prefix, Communicate *comm, const std::string &QMC_driver_type) | |
Constructor. More... | |
QMCDriverNew (QMCDriverNew &&)=default | |
Move Constructor. More... | |
QMCDriverNew (const QMCDriverNew &)=delete | |
Copy Constructor (disabled). More... | |
QMCDriverNew & | operator= (const QMCDriverNew &)=delete |
Copy operator (disabled). More... | |
~QMCDriverNew () override | |
bool | putQMCInfo (xmlNodePtr cur) |
void | makeLocalWalkers (int nwalkers, RealType reserve) |
Adjust populations local walkers to this number. More... | |
DriftModifierBase & | get_drift_modifier () const |
void | recordBlock (int block) override |
record the state of the block More... | |
bool | finalize (int block, bool dumpwalkers=true) |
finalize a qmc section More... | |
IndexType | current () const |
return current step More... | |
void | setStatus (const std::string &aname, const std::string &h5name, bool append) override |
Set the status of the QMCDriver. More... | |
void | add_H_and_Psi (QMCHamiltonian *h, TrialWaveFunction *psi) override |
void | createRngsStepContexts (int num_crowds) |
Creates Random Number generators for crowds and step contexts. More... | |
void | putWalkers (std::vector< xmlNodePtr > &wset) override |
Read walker configurations from *.config.h5 files. More... | |
RefVector< RandomBase< FullPrecRealType > > | getRngRefs () const |
RandomBase< FullPrecRealType > & | getRng (int i) override |
return the i-th random generator More... | |
std::string | getEngineName () override |
intended for logging output and debugging you should base behavior on type preferably at compile time or if necessary at runtime using and protected by dynamic cast. More... | |
unsigned long | getDriverMode () override |
IndexType | get_num_living_walkers () const |
IndexType | get_num_dead_walkers () const |
const QMCDriverInput & | getQMCDriverInput () const |
bool | put (xmlNodePtr cur) override |
More... | |
void | setUpdateMode (bool pbyp) override |
should be set in input don't see a reason to set individually More... | |
void | putTraces (xmlNodePtr txml) override |
void | requestTraces (bool allow_traces) override |
void | putWalkerLogs (xmlNodePtr wlxml) override |
void | requestWalkerLogs (bool allow_walker_logs_) override |
![]() | |
virtual | ~QMCDriverInterface () |
virtual void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) |
virtual std::unique_ptr< BranchEngineType > | getBranchEngine () |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
Static Public Member Functions | |
static void | runDMCStep (int crowd_id, const StateForThread &sft, DriverTimers &timers, DMCTimers &dmc_timers, UPtrVector< ContextForSteps > &move_context, UPtrVector< Crowd > &crowds) |
![]() | |
static void | initialLogEvaluation (int crowd_id, UPtrVector< Crowd > &crowds, UPtrVector< ContextForSteps > &step_context) |
template<typename RT , CoordsType CT> | |
static void | scaleBySqrtTau (const TauParams< RT, CT > &taus, MCCoords< CT > &coords) |
template<typename RT , CoordsType CT> | |
static void | computeLogGreensFunction (const MCCoords< CT > &coords, const TauParams< RT, CT > &taus, std::vector< QMCTraits::RealType > &log_gb) |
calculates Green Function from displacements stored in MCCoords [param, out] log_g More... | |
Static Private Member Functions | |
template<CoordsType CT> | |
static void | advanceWalkers (const StateForThread &sft, Crowd &crowd, DriverTimers &timers, DMCTimers &dmc_timers, ContextForSteps &move_context, bool recompute, bool accumulate_this_step) |
Private Attributes | |
const DMCDriverInput | dmcdriver_input_ |
DMCTimers | dmc_timers_ |
I think its better if these have there own type and variable name. More... | |
IndexType | branch_interval_ |
Interval between branching. More... | |
std::unique_ptr< SFNBranch > | branch_engine_ |
branch engine More... | |
std::unique_ptr< WalkerControl > | walker_controller_ |
walker controller for load-balance More... | |
Friends | |
class | qmcplusplus::testing::DMCBatchedTest |
Additional Inherited Members | |
![]() | |
std::bitset< QMC_MODE_MAX > | qmc_driver_mode_ |
bits to classify QMCDriver More... | |
bool | allow_walker_logs |
whether to allow walker logs More... | |
WalkerLogInput | walker_logs_input |
walker logs input More... | |
![]() | |
void | initializeQMC (const AdjustedWalkerCounts &awc) |
Do common section starting tasks for VMC and DMC. More... | |
void | measureImbalance (const std::string &tag) const |
inject additional barrier and measure load imbalance. More... | |
void | endBlock () |
end of a block operations. Aggregates statistics across all MPI ranks and write to disk. More... | |
const std::string & | get_root_name () const override |
![]() | |
static QMCDriverNew::AdjustedWalkerCounts | adjustGlobalWalkerCount (Communicate &comm, const IndexType current_configs, const IndexType requested_total_walkers, const IndexType requested_walkers_per_rank, const RealType reserve_walkers, int num_crowds) |
}@ More... | |
static size_t | determineStepsPerBlock (IndexType global_walkers, IndexType requested_samples, IndexType requested_steps, IndexType blocks) |
pure function calculating the actual number of steps per block More... | |
static void | checkNumCrowdsLTNumThreads (const int num_crowds) |
static void | checkLogAndGL (Crowd &crowd, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
static void | setWalkerOffsets (WalkerConfigurations &, Communicate *comm) |
update the global offsets of walker configurations after active walkers being touched. More... | |
![]() | |
QMCDriverInput | qmcdriver_input_ |
RealType | max_disp_sq_ |
they should be limited to values that can be changed from input or are live state. More... | |
IndexType | target_samples_ |
the number of saved samples More... | |
IndexType | nBlocksBetweenRecompute |
the number of blocks between recomptePsi More... | |
UPtrVector< Crowd > | crowds_ |
}@ More... | |
std::string | h5_file_root_ |
std::unique_ptr< DriftModifierBase > | drift_modifier_ |
drift modifer More... | |
int | k_delay |
the number to delay updates by More... | |
int | walker_dump_period |
period of recording walker configurations More... | |
IndexType | current_step_ |
size_t | steps_per_block_ = 0 |
actual number of steps per block More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves /rejected More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
const std::string | QMCType |
type of qmc: assigned by subclasses More... | |
MCPopulation | population_ |
the entire (on node) walker population it serves VMCBatch and DMCBatch right now but will be polymorphic More... | |
struct DriverWalkerResourceCollection | golden_resource_ |
the golden multi walker shared resource serves ParticleSet TrialWaveFunction right now but actually should be based on MCPopulation. More... | |
const MultiWalkerDispatchers | dispatchers_ |
multi walker dispatchers More... | |
std::unique_ptr< EstimatorManagerNew > | estimator_manager_ |
Observables manager Has very problematic owner ship and life cycle. More... | |
std::unique_ptr< HDFWalkerOutput > | wOut |
record engine for walkers More... | |
UPtrVector< ContextForSteps > | step_contexts_ |
Per crowd move contexts, this is where the DistanceTables etc. More... | |
UPtrVector< RandomBase< FullPrecRealType > > | Rng |
Random number generators. More... | |
std::vector< xmlNodePtr > | mcwalkerNodePtr |
a list of mcwalkerset element More... | |
DriverTimers | timers_ |
period of dumping walker configurations and everything else for restart More... | |
ScopedProfiler | driver_scope_profiler_ |
profile the driver lifetime More... | |
const ProjectData & | project_data_ |
project info for accessing global fileroot and series id More... | |
WalkerConfigurations & | walker_configs_ref_ |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
using Base = QMCDriverNew |
Definition at line 38 of file DMCBatched.h.
Definition at line 39 of file DMCBatched.h.
Definition at line 41 of file DMCBatched.h.
using PosType = QMCTraits::PosType |
Definition at line 40 of file DMCBatched.h.
DMCBatched | ( | const ProjectData & | project_data, |
QMCDriverInput && | qmcdriver_input, | ||
const std::optional< EstimatorManagerInput > & | global_emi, | ||
DMCDriverInput && | input, | ||
WalkerConfigurations & | wc, | ||
MCPopulation && | pop, | ||
Communicate * | comm | ||
) |
Constructor.
Constructor maintains proper ownership of input parameters.
Note you must call the Base constructor before the derived class sets QMCType
Definition at line 44 of file DMCBatched.cpp.
|
delete |
Copy Constructor (disabled)
|
default |
|
overridedefault |
|
staticprivate |
Definition at line 72 of file DMCBatched.cpp.
References DMCBatched::StateForThread::branch_engine, SFNBranch::branchWeight(), QMCDriverNew::DriverTimers::buffer_timer, qmcplusplus::CHECKGL_AFTER_MOVES, qmcplusplus::CHECKGL_AFTER_TMOVE, QMCDriverNew::checkLogAndGL(), QMCDriverNew::DriverTimers::collectables_timer, QMCDriverNew::computeLogGreensFunction(), qmcplusplus::crowd, qmcplusplus::dot(), DMCBatched::StateForThread::drift_modifier, QMCDriverNew::DriverTimers::estimators_timer, qmcplusplus::exp(), QMCDriverInput::get_debug_checks(), MCPopulation::get_ptclgrp_inv_mass(), ContextForSteps::get_random_gen(), QMCDriverInput::get_spin_mass(), QMCDriverInput::get_tau(), DriftModifierBase::getDrifts(), DMCBatched::StateForThread::global_step, QMCDriverNew::DriverTimers::hamiltonian_timer, qmcplusplus::isfinite(), qmcplusplus::makeGaussRandomWithEngine(), QMCDriverNew::DriverTimers::movepbyp_timer, norm(), qmcplusplus::hdf::num_walkers, SFNBranch::phaseChanged(), DMCBatched::StateForThread::population, DMCBatched::StateForThread::qmcdrv_input, QMCDriverNew::DriverTimers::resource_timer, QMCDriverNew::scaleBySqrtTau(), TimerType< CLOCK >::start(), DMCBatched::DMCTimers::step_begin_recompute_timer, TimerType< CLOCK >::stop(), DMCBatched::DMCTimers::tmove_timer, qmcplusplus::twf, qmcplusplus::walker, and qmcplusplus::hdf::walkers.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 127 of file DMCBatched.h.
References qmcplusplus::DMC_BATCH.
|
delete |
Copy operator (disabled).
|
overridevirtual |
DMCBatched driver will eventually ignore cur.
This is the shared entry point from QMCMain so cannot be updated yet
Contains logic that sets walkers_per_rank_ TargetWalkers trump walkers, if it is not set walkers which is by default per rank for the batched drivers from this or the previous section wins.
walkers is still badly named.
Implements QMCDriverNew.
Definition at line 375 of file DMCBatched.cpp.
References QMCDriverNew::adjustGlobalWalkerCount(), qmcplusplus::app_log(), Communicate::barrier_and_abort(), DMCBatched::branch_engine_, QMCDriverNew::determineStepsPerBlock(), DMCBatched::dmcdriver_input_, Timer::elapsed(), DMCDriverInput::get_branch_interval(), DMCDriverInput::get_feedback(), DMCDriverInput::get_max_age(), QMCDriverInput::get_max_blocks(), QMCDriverInput::get_num_crowds(), MCPopulation::get_num_global_walkers(), DMCDriverInput::get_reconfiguration(), DMCDriverInput::get_refenergy_update_scheme(), QMCDriverInput::get_requested_samples(), QMCDriverInput::get_requested_steps(), DMCDriverInput::get_reserve(), QMCDriverInput::get_tau(), QMCDriverInput::get_total_walkers(), QMCDriverInput::get_walkers_per_rank(), WalkerConfigurations::getActiveWalkers(), QMCDriverNew::AdjustedWalkerCounts::global_walkers, QMCDriverNew::initializeQMC(), MPIObjectBase::myComm, qmcplusplus::node, QMCDriverNew::population_, qmcplusplus::print_mem(), QMCDriverNew::qmcdriver_input_, Random, QMCDriverNew::steps_per_block_, qmcplusplus::UNLIMITED_HISTORY, QMCDriverNew::walker_configs_ref_, and DMCBatched::walker_controller_.
|
overridevirtual |
Implements QMCDriverInterface.
Definition at line 432 of file DMCBatched.cpp.
References QMCDriverNew::allow_walker_logs, qmcplusplus::app_debug_stream(), qmcplusplus::app_log(), qmcplusplus::app_summary(), Communicate::barrier(), Communicate::bcast(), DMCBatched::branch_engine_, qmcplusplus::crowd, QMCDriverNew::crowds_, DMCBatched::dmc_timers_, DMCBatched::dmcdriver_input_, QMCDriverNew::drift_modifier_, QMCDriverNew::endBlock(), QMCDriverNew::estimator_manager_, QMCDriverNew::finalize(), QMCDriverInput::get_blocks_between_recompute(), MCPopulation::get_golden_electrons(), MCPopulation::get_hamiltonians(), QMCDriverInput::get_max_blocks(), QMCDriverInput::get_measure_imbalance(), QMCDriverInput::get_recalculate_properties_period(), DMCDriverInput::get_reconfiguration(), QMCDriverNew::get_root_name(), ProjectData::getMaxCPUSeconds(), ProjectData::getTitle(), ParticleSet::getTotalNum(), Crowd::getWalkerLogCollectorRefs(), DMCBatched::StateForThread::global_step, qmcplusplus::ham, QMCDriverNew::DriverTimers::init_walkers_timer, QMCDriverNew::initialLogEvaluation(), DMCBatched::StateForThread::is_recomputing_block, WalkerLogManager::makeCollector(), MCPopulation::measureGlobalEnergyVariance(), QMCDriverNew::measureImbalance(), MPIObjectBase::myComm, qmcplusplus::hdf::num_blocks, QMCDriverNew::population_, qmcplusplus::print_mem(), QMCDriverNew::DriverTimers::production_timer, QMCDriverNew::project_data_, QMCDriverNew::qmc_driver_mode_, QMCDriverNew::QMC_UPDATE_MODE, QMCDriverNew::qmcdriver_input_, Communicate::rank(), DMCBatched::StateForThread::recalculate_properties_period, QMCDriverNew::recordBlock(), MCPopulation::redistributeWalkers(), QMCDriverNew::DriverTimers::run_steps_timer, qmcplusplus::run_time_manager, DMCBatched::runDMCStep(), DMCBatched::setNonLocalMoveHandler(), WalkerLogManager::startRun(), DMCBatched::StateForThread::step, QMCDriverNew::step_contexts_, QMCDriverNew::steps_per_block_, WalkerLogManager::stopRun(), QMCDriverNew::timers_, DMCBatched::walker_controller_, QMCDriverNew::walker_logs_input, and WalkerLogManager::writeBuffers().
|
static |
Definition at line 347 of file DMCBatched.cpp.
References qmcplusplus::crowd, MCPopulation::get_golden_electrons(), DMCBatched::StateForThread::is_recomputing_block, ParticleSet::isSpinor(), DMCBatched::StateForThread::population, DMCBatched::StateForThread::step, and DMCBatched::StateForThread::steps_per_block.
Referenced by DMCBatched::run().
void setNonLocalMoveHandler | ( | QMCHamiltonian & | hamiltonian | ) |
Definition at line 65 of file DMCBatched.cpp.
References DMCBatched::dmcdriver_input_, DMCDriverInput::get_alpha(), DMCDriverInput::get_gamma(), DMCDriverInput::get_non_local_move(), QMCDriverInput::get_tau(), QMCDriverNew::qmcdriver_input_, and QMCHamiltonian::setNonLocalMoves().
Referenced by DMCBatched::run().
|
friend |
Definition at line 153 of file DMCBatched.h.
|
private |
branch engine
Definition at line 140 of file DMCBatched.h.
Referenced by DMCBatched::process(), and DMCBatched::run().
|
private |
Interval between branching.
Definition at line 138 of file DMCBatched.h.
|
private |
I think its better if these have there own type and variable name.
Definition at line 136 of file DMCBatched.h.
Referenced by DMCBatched::run().
|
private |
Definition at line 132 of file DMCBatched.h.
Referenced by DMCBatched::process(), DMCBatched::run(), and DMCBatched::setNonLocalMoveHandler().
|
private |
walker controller for load-balance
Definition at line 142 of file DMCBatched.h.
Referenced by DMCBatched::process(), and DMCBatched::run().
class qmcplusplus::QMCDriver |
abstract base class for QMC engines
Definition at line 71 of file QMCDriver.h.
Public Types | |
enum | { QMC_UPDATE_MODE, QMC_MULTIPLE, QMC_OPTIMIZE, QMC_WARMUP } |
enumeration coupled with QMCMode More... | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | Buffer_t = Walker_t::Buffer_t |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | BranchEngineType = SimpleFixedNodeBranch |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
Public Member Functions | |
QMCDriver (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm, const std::string &QMC_driver_type, bool enable_profiling=false) | |
Constructor. More... | |
~QMCDriver () override | |
int | current () const |
return current step More... | |
void | setUpdateMode (bool pbyp) override |
set the update mode More... | |
void | setStatus (const std::string &aname, const std::string &h5name, bool append) override |
Set the status of the QMCDriver. More... | |
void | add_H_and_Psi (QMCHamiltonian *h, TrialWaveFunction *psi) override |
add QMCHamiltonian/TrialWaveFunction pair for multiple More... | |
void | process (xmlNodePtr cur) override |
initialize with xmlNode More... | |
xmlNodePtr | getQMCNode () |
return a xmlnode with update More... | |
void | putWalkers (std::vector< xmlNodePtr > &wset) override |
Read walker configurations from *.config.h5 files. More... | |
void | putTraces (xmlNodePtr txml) override |
void | requestTraces (bool traces) override |
void | putWalkerLogs (xmlNodePtr wlxml) override |
void | requestWalkerLogs (bool allow_walker_logs_) override |
std::string | getEngineName () override |
template<class PDT > | |
void | setValue (const std::string &aname, PDT x) |
void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) override |
set the BranchEngineType More... | |
std::unique_ptr< BranchEngineType > | getBranchEngine () override |
return BranchEngineType* More... | |
int | addObservable (const std::string &aname) |
RealType | getObservable (int i) |
void | setTau (RealType i) |
void | setWalkerOffsets () |
set global offsets of the walkers More... | |
RefVector< RandomBase< FullPrecRealType > > | getRngRefs () const |
return the random generators More... | |
RandomBase< FullPrecRealType > & | getRng (int i) override |
return the i-th random generator More... | |
unsigned long | getDriverMode () override |
![]() | |
virtual bool | run ()=0 |
virtual bool | put (xmlNodePtr cur)=0 |
virtual QMCRunType | getRunType ()=0 |
virtual | ~QMCDriverInterface () |
virtual void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
Public Attributes | |
std::bitset< QMC_MODE_MAX > | qmc_driver_mode |
bits to classify QMCDriver More... | |
bool | allow_traces |
whether to allow traces More... | |
xmlNodePtr | traces_xml |
traces xml More... | |
bool | allow_walker_logs |
whether to allow traces More... | |
xmlNodePtr | walker_logs_xml |
traces xml More... | |
EstimatorManagerBase * | Estimators |
Observables manager. More... | |
std::unique_ptr< TraceManager > | Traces |
Traces manager. More... | |
std::unique_ptr< WalkerLogManager > | wlog_manager_ |
Traces manager. More... | |
Protected Member Functions | |
bool | putQMCInfo (xmlNodePtr cur) |
Parses the xml input file for parameter definitions for a single qmc simulation. More... | |
void | addWalkers (int nwalkers) |
Add walkers to the end of the ensemble of walkers. More... | |
void | recordBlock (int block) override |
record the state of the block More... | |
bool | finalize (int block, bool dumpwalkers=true) |
finalize a qmc section More... | |
std::string | getRotationName (std::string RootName) |
std::string | getLastRotationName (std::string RootName) |
const std::string & | get_root_name () const override |
Protected Attributes | |
const ProjectData & | project_data_ |
top-level project data information More... | |
std::unique_ptr< BranchEngineType > | branchEngine |
branch engine More... | |
DriftModifierBase * | DriftModifier |
drift modifer More... | |
bool | ResetRandom |
randomize it More... | |
bool | AppendRun |
flag to append or restart the run More... | |
bool | DumpConfig |
flag to turn off dumping configurations More... | |
bool | IsQMCDriver |
true, if it is a real QMC engine More... | |
int | MyCounter |
the number of times this QMCDriver is executed More... | |
int | kDelay |
the number to delay updates by More... | |
int | Period4CheckPoint |
period of dumping walker configurations and everything else for restart More... | |
int | Period4CheckProperties |
period of dumping walker positions and IDs for Forward Walking More... | |
int | Period4WalkerDump |
period of recording walker configurations More... | |
int | Period4ConfigDump |
period of recording walker positions and IDs for forward walking afterwards More... | |
IndexType | CurrentStep |
current step More... | |
IndexType | nBlocks |
maximum number of blocks More... | |
IndexType | nSteps |
maximum number of steps More... | |
IndexType | nSubSteps |
number of steps between a step: VMCs do not evaluate energies More... | |
IndexType | nWarmupSteps |
number of warmup steps More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves /rejected More... | |
IndexType | nBlocksBetweenRecompute |
the number of blocks between recomptePsi More... | |
IndexType | nTargetWalkers |
the number of walkers More... | |
IndexType | nTargetSamples |
the number of saved samples More... | |
IndexType | nStepsBetweenSamples |
alternate method of setting QMC run parameters More... | |
RealType | nSamplesPerThread |
samples per thread More... | |
RealType | nTargetPopulation |
target population More... | |
RealType | Tau |
timestep More... | |
int | MaxCPUSecs |
maximum cpu in secs More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
xmlNodePtr | qmcNode |
pointer to qmc node in xml file More... | |
const std::string | QMCType |
type of QMC driver More... | |
std::string | h5FileRoot |
the root of h5File More... | |
std::string | RootName |
root of all the output files More... | |
ParameterSet | m_param |
store any parameter that has to be read from a file More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
std::unique_ptr< HDFWalkerOutput > | wOut |
record engine for walkers More... | |
std::vector< TrialWaveFunction * > | Psi1 |
a list of TrialWaveFunctions for multiple method More... | |
std::vector< QMCHamiltonian * > | H1 |
a list of QMCHamiltonians for multiple method More... | |
UPtrVector< RandomBase< FullPrecRealType > > | Rng |
Random number generators. More... | |
std::vector< xmlNodePtr > | mcwalkerNodePtr |
a list of mcwalkerset element More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
RealType | SpinMass |
spin mass for spinor calcs More... | |
int | rotation |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
Private Attributes | |
NewTimer & | checkpoint_timer_ |
ScopedProfiler | driver_scope_profiler_ |
profile the driver lifetime More... | |
using Buffer_t = Walker_t::Buffer_t |
Definition at line 84 of file QMCDriver.h.
Definition at line 85 of file QMCDriver.h.
Definition at line 83 of file QMCDriver.h.
anonymous enum |
enumeration coupled with QMCMode
Enumerator | |
---|---|
QMC_UPDATE_MODE | |
QMC_MULTIPLE | |
QMC_OPTIMIZE | |
QMC_WARMUP |
Definition at line 75 of file QMCDriver.h.
QMCDriver | ( | const ProjectData & | project_data, |
MCWalkerConfiguration & | w, | ||
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
Communicate * | comm, | ||
const std::string & | QMC_driver_type, | ||
bool | enable_profiling = false |
||
) |
Constructor.
Definition at line 44 of file QMCDriver.cpp.
References ParameterSet::add(), QMCDriver::allow_traces, QMCDriver::allow_walker_logs, QMCDriver::AppendRun, QMCDriver::CurrentStep, DEPRECATED, QMCDriver::DumpConfig, WalkerConfigurations::getActiveWalkers(), QMCDriver::IsQMCDriver, QMCDriver::m_param, QMCDriver::MaxCPUSecs, QMCDriver::MyCounter, QMCDriver::nAccept, QMCDriver::nBlocks, QMCDriver::nBlocksBetweenRecompute, QMCDriver::nReject, QMCDriver::nSamplesPerThread, QMCDriver::nSteps, QMCDriver::nStepsBetweenSamples, QMCDriver::nSubSteps, QMCDriver::nTargetPopulation, QMCDriver::nTargetSamples, QMCDriver::nTargetWalkers, QMCDriver::nWarmupSteps, QMCDriver::Period4CheckPoint, QMCDriver::Period4CheckProperties, QMCDriver::Period4ConfigDump, QMCDriver::Period4WalkerDump, QMCDriver::ResetRandom, QMCDriver::rotation, QMCDriver::SpinMass, QMCDriver::Tau, QMCDriver::W, and QMCDriver::walker_logs_xml.
|
override |
Definition at line 145 of file QMCDriver.cpp.
References QMCDriver::DriftModifier.
|
overridevirtual |
add QMCHamiltonian/TrialWaveFunction pair for multiple
h | QMCHamiltonian |
psi | TrialWaveFunction |
Multiple drivers use multiple H/Psi pairs to perform correlated sampling for energy difference evaluations.
Implements QMCDriverInterface.
Definition at line 151 of file QMCDriver.cpp.
References QMCDriver::H1, and QMCDriver::Psi1.
|
inline |
Definition at line 176 of file QMCDriver.h.
References EstimatorManagerBase::addObservable(), and QMCDriver::Estimators.
|
protected |
Add walkers to the end of the ensemble of walkers.
nwalkers | number of walkers to add |
Definition at line 338 of file QMCDriver.cpp.
References qmcplusplus::app_log(), WalkerConfigurations::begin(), MCWalkerConfiguration::createWalkers(), WalkerConfigurations::destroyWalkers(), WalkerConfigurations::end(), WalkerConfigurations::getActiveWalkers(), ParticleSet::R, QMCDriver::setWalkerOffsets(), and QMCDriver::W.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), QMCDriver::putQMCInfo(), and RMC::resetReptiles().
|
inline |
|
protected |
finalize a qmc section
block | current block |
dumpwalkers | if true, dump walkers |
Accumulate energy and weight is written to a hdf5 file. Finialize the estimators
Definition at line 318 of file QMCDriver.cpp.
References QMCDriver::branchEngine, QMCDriver::DumpConfig, InfoStream::flush(), WalkerConfigurations::getActiveWalkers(), infoLog, infoSummary, MPIObjectBase::myComm, QMCDriver::MyCounter, QMCDriver::nTargetWalkers, QMCDriver::RootName, QMCDriver::W, QMCDriver::wOut, and RandomNumberControl::write().
Referenced by VMC::run(), RMC::run(), DMC::run(), and CSVMC::run().
|
inlineoverrideprotectedvirtual |
Implements QMCDriverInterface.
Definition at line 378 of file QMCDriver.h.
References QMCDriver::RootName.
Referenced by QMCFixedSampleLinearOptimize::run(), and QMCFixedSampleLinearOptimize::test_run().
|
inlineoverridevirtual |
return BranchEngineType*
Reimplemented from QMCDriverInterface.
Definition at line 174 of file QMCDriver.h.
References QMCDriver::branchEngine.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 212 of file QMCDriver.h.
References QMCDriver::qmc_driver_mode.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 162 of file QMCDriver.h.
References QMCDriver::QMCType.
|
protected |
Definition at line 293 of file QMCDriver.cpp.
References QMCDriver::RootName, and QMCDriver::rotation.
|
inline |
Definition at line 184 of file QMCDriver.h.
References QMCDriver::Estimators, and EstimatorManagerBase::getObservable().
xmlNodePtr getQMCNode | ( | ) |
return a xmlnode with update
Definition at line 516 of file QMCDriver.cpp.
References QMCDriver::CurrentStep, getContent(), getXMLAttributeValue(), and QMCDriver::qmcNode.
|
inlineoverridevirtual |
return the i-th random generator
Implements QMCDriverInterface.
Definition at line 210 of file QMCDriver.h.
References QMCDriver::Rng.
|
inline |
return the random generators
Definition at line 201 of file QMCDriver.h.
References QMCDriver::Rng.
|
protected |
Definition at line 278 of file QMCDriver.cpp.
References QMCDriver::RootName, and QMCDriver::rotation.
|
overridevirtual |
initialize with xmlNode
process a <qmc> element
cur | xmlNode with qmc tag |
This function is called before QMCDriver::run and following actions are taken:
Implements QMCDriverInterface.
Definition at line 172 of file QMCDriver.cpp.
References QMCDriver::allow_traces, QMCDriver::allow_walker_logs, qmcplusplus::app_log(), QMCDriver::branchEngine, qmcplusplus::createDriftModifier(), QMCDriver::deltaR, QMCDriver::drift, QMCDriver::DriftModifier, QMCDriver::Estimators, InfoStream::flush(), WalkerConfigurations::getGlobalNumWalkers(), ParticleSet::getTotalNum(), QMCDriver::H, QMCDriver::H1, QMCDriver::h5FileRoot, infoLog, infoSummary, RandomNumberControl::make_seeds(), MPIObjectBase::myComm, DriftModifierBase::parseXML(), QMCDriverInterface::put(), EstimatorManagerBase::put(), QMCDriver::putQMCInfo(), QMCDriver::qmcNode, QMCDriver::ResetRandom, MCWalkerConfiguration::resetWalkerProperty(), QMCDriver::RootName, QMCDriver::Tau, QMCDriver::Traces, QMCDriver::traces_xml, QMCDriver::W, QMCDriver::walker_logs_xml, QMCDriver::wlog_manager_, and QMCDriver::wOut.
Referenced by qmcplusplus::TEST_CASE().
|
protected |
Parses the xml input file for parameter definitions for a single qmc simulation.
Basic parameters are handled here and each driver will perform its own initialization with the input attribute list
Definition at line 399 of file QMCDriver.cpp.
References OhmmsAttributeSet::add(), QMCDriver::addWalkers(), qmcplusplus::app_log(), qmcplusplus::app_warning(), QMCDriver::AppendRun, QMCDriver::CurrentStep, QMCDriver::DumpConfig, WalkerConfigurations::getActiveWalkers(), MPIObjectBase::getName(), QMCDriver::IsQMCDriver, QMCDriver::kDelay, QMCDriver::m_param, QMCDriver::nBlocks, QMCDriver::nSteps, QMCDriver::nSubSteps, QMCDriver::nTargetWalkers, omp_get_max_threads(), QMCDriver::Period4CheckPoint, QMCDriver::Period4ConfigDump, QMCDriver::Period4WalkerDump, ParameterSet::put(), OhmmsAttributeSet::put(), qmcplusplus::qmc_common, QMCState::qmc_counter, QMCDriver::ResetRandom, and QMCDriver::W.
Referenced by QMCDriver::process(), and WaveFunctionTester::put().
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 154 of file QMCDriver.h.
References QMCDriver::traces_xml.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 158 of file QMCDriver.h.
References QMCDriver::walker_logs_xml.
|
overridevirtual |
Read walker configurations from *.config.h5 files.
wset | list of xml elements containing mcwalkerset |
Implements QMCDriverInterface.
Definition at line 253 of file QMCDriver.cpp.
References Communicate::allreduce(), Communicate::bcast(), WalkerConfigurations::getActiveWalkers(), ParticleSet::getTotalNum(), QMCDriver::h5FileRoot, MPIObjectBase::myComm, Communicate::rank(), WalkerConfigurations::setWalkerOffsets(), Communicate::size(), and QMCDriver::W.
|
overrideprotectedvirtual |
record the state of the block
block | current block |
virtual function with a default implementation
Implements QMCDriverInterface.
Definition at line 307 of file QMCDriver.cpp.
References QMCDriver::branchEngine, QMCDriver::checkpoint_timer_, QMCDriver::DumpConfig, MPIObjectBase::myComm, QMCDriver::Period4CheckPoint, QMCDriver::RootName, QMCDriver::W, QMCDriver::wOut, and RandomNumberControl::write().
Referenced by VMC::run(), RMC::run(), DMC::run(), and CSVMC::run().
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 156 of file QMCDriver.h.
References QMCDriver::allow_traces.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 160 of file QMCDriver.h.
References QMCDriver::allow_walker_logs.
|
inlineoverride |
set the BranchEngineType
Definition at line 171 of file QMCDriver.h.
References QMCDriver::branchEngine.
|
overridevirtual |
Set the status of the QMCDriver.
aname | the root file name |
h5name | root name of the master hdf5 file containing previous qmcrun |
append | if true, the run is a continuation of the previous qmc |
All output files will be of the form "aname.s00X.suffix", where "X" is number of previous QMC runs for the simulation and "suffix" is the suffix for the output file.
Implements QMCDriverInterface.
Definition at line 234 of file QMCDriver.cpp.
References qmcplusplus::app_log(), QMCDriver::AppendRun, QMCDriver::h5FileRoot, QMCDriver::QMCType, and QMCDriver::RootName.
|
inline |
|
inlineoverridevirtual |
set the update mode
pbyp | if true, use particle-by-particle update |
Implements QMCDriverInterface.
Definition at line 122 of file QMCDriver.h.
References QMCDriver::qmc_driver_mode, and QMCDriver::QMC_UPDATE_MODE.
|
inline |
Definition at line 165 of file QMCDriver.h.
References QMCDriver::m_param, and ParameterSet::setValue().
void setWalkerOffsets | ( | ) |
set global offsets of the walkers
Definition at line 370 of file QMCDriver.cpp.
References Communicate::allreduce(), qmcplusplus::app_log(), WalkerConfigurations::EnsembleProperty, WalkerConfigurations::getActiveWalkers(), MPIObjectBase::myComm, MCDataType< T >::NumSamples, Communicate::rank(), WalkerConfigurations::setWalkerOffsets(), Communicate::size(), QMCDriver::W, and MCDataType< T >::Weight.
Referenced by QMCDriver::addWalkers(), and DMC::resetUpdateEngines().
bool allow_traces |
whether to allow traces
Definition at line 96 of file QMCDriver.h.
Referenced by QMCDriver::process(), QMCDriver::QMCDriver(), and QMCDriver::requestTraces().
bool allow_walker_logs |
whether to allow traces
Definition at line 101 of file QMCDriver.h.
Referenced by QMCDriver::process(), QMCDriver::QMCDriver(), and QMCDriver::requestWalkerLogs().
|
protected |
flag to append or restart the run
Definition at line 224 of file QMCDriver.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), and QMCDriver::setStatus().
|
protected |
branch engine
Definition at line 218 of file QMCDriver.h.
Referenced by QMCDriver::finalize(), QMCFixedSampleLinearOptimize::generateSamples(), QMCDriver::getBranchEngine(), QMCDriver::process(), QMCDriver::recordBlock(), VMC::resetRun(), CSVMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), RMC::run(), DMC::run(), and QMCDriver::setBranchEngine().
|
private |
Definition at line 381 of file QMCDriver.h.
Referenced by QMCDriver::recordBlock().
|
protected |
current step
Definition at line 263 of file QMCDriver.h.
Referenced by QMCDriver::current(), QMCDriver::getQMCNode(), VMC::put(), CSVMC::put(), QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), RMC::resetRun(), VMC::run(), RMC::run(), DMC::run(), and CSVMC::run().
|
protected |
temporary storage for random displacement
Definition at line 350 of file QMCDriver.h.
Referenced by QMCDriver::process().
|
protected |
temporary storage for drift
Definition at line 347 of file QMCDriver.h.
Referenced by QMCDriver::process().
|
protected |
drift modifer
Definition at line 220 of file QMCDriver.h.
Referenced by QMCDriver::process(), VMC::resetRun(), CSVMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), and QMCDriver::~QMCDriver().
|
private |
profile the driver lifetime
Definition at line 383 of file QMCDriver.h.
|
protected |
flag to turn off dumping configurations
Definition at line 226 of file QMCDriver.h.
Referenced by QMCDriver::finalize(), VMC::put(), CSVMC::put(), QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), QMCDriver::recordBlock(), VMC::run(), DMC::run(), and CSVMC::run().
EstimatorManagerBase* Estimators |
Observables manager.
Definition at line 192 of file QMCDriver.h.
Referenced by QMCDriver::addObservable(), QMCDriver::getObservable(), QMCDriver::process(), VMC::resetRun(), CSVMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), VMC::run(), RMC::run(), DMC::run(), and CSVMC::run().
|
protected |
Hamiltonian.
Definition at line 329 of file QMCDriver.h.
Referenced by WaveFunctionTester::printEloc(), QMCDriver::process(), QMCFixedSampleLinearOptimize::processOptXML(), VMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), WaveFunctionTester::run(), WaveFunctionTester::runCloneTest(), WaveFunctionTester::runDerivCloneTest(), WaveFunctionTester::runDerivNLPPTest(), WaveFunctionTester::runDerivTest(), WaveFunctionTester::runGradSourceTest(), WaveFunctionTester::runRatioTest(), WaveFunctionTester::runRatioTest2(), and WaveFunctionTester::runZeroVarianceTest().
|
protected |
a list of QMCHamiltonians for multiple method
Definition at line 338 of file QMCDriver.h.
Referenced by QMCDriver::add_H_and_Psi(), QMCDriver::process(), and CSVMC::resetRun().
|
protected |
the root of h5File
Definition at line 315 of file QMCDriver.h.
Referenced by QMCFixedSampleLinearOptimize::generateSamples(), QMCDriver::process(), QMCFixedSampleLinearOptimize::processOptXML(), QMCDriver::putWalkers(), and QMCDriver::setStatus().
|
protected |
true, if it is a real QMC engine
Definition at line 228 of file QMCDriver.h.
Referenced by QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), and QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
protected |
the number to delay updates by
Definition at line 237 of file QMCDriver.h.
Referenced by QMCDriver::putQMCInfo().
|
protected |
Time-step factor .
Definition at line 305 of file QMCDriver.h.
|
protected |
store any parameter that has to be read from a file
Definition at line 320 of file QMCDriver.h.
Referenced by CSVMC::CSVMC(), DMC::DMC(), QMCFixedSampleLinearOptimize::processOptXML(), VMC::put(), RMC::put(), CSVMC::put(), QMCFixedSampleLinearOptimize::put(), QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), RMC::resetRun(), RMC::RMC(), QMCDriver::setValue(), VMC::VMC(), and WaveFunctionTester::WaveFunctionTester().
|
protected |
Time-step factor .
Definition at line 307 of file QMCDriver.h.
|
protected |
maximum cpu in secs
Definition at line 302 of file QMCDriver.h.
Referenced by QMCDriver::QMCDriver(), VMC::run(), RMC::run(), and DMC::run().
|
protected |
a list of mcwalkerset element
Definition at line 344 of file QMCDriver.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML().
|
protected |
the number of times this QMCDriver is executed
MyCounter is initialized to zero by the constructor and is incremented whenever a run is completed by calling finalize(int block) or using MyCounter++ as in RQMC.
Definition at line 235 of file QMCDriver.h.
Referenced by QMCDriver::finalize(), QMCFixedSampleLinearOptimize::finish(), VMC::put(), CSVMC::put(), and QMCDriver::QMCDriver().
|
protected |
counter for number of moves accepted
Definition at line 278 of file QMCDriver.h.
Referenced by QMCDriver::QMCDriver().
|
protected |
maximum number of blocks
Definition at line 266 of file QMCDriver.h.
Referenced by QMCFixedSampleLinearOptimize::generateSamples(), VMC::put(), CSVMC::put(), QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), RMC::resetRun(), DMC::resetUpdateEngines(), VMC::run(), RMC::run(), DMC::run(), and CSVMC::run().
|
protected |
the number of blocks between recomptePsi
Definition at line 284 of file QMCDriver.h.
Referenced by QMCDriver::QMCDriver(), VMC::run(), and DMC::run().
|
protected |
counter for number of moves /rejected
Definition at line 281 of file QMCDriver.h.
Referenced by QMCDriver::QMCDriver().
|
protected |
samples per thread
Definition at line 293 of file QMCDriver.h.
Referenced by VMC::put(), CSVMC::put(), QMCDriver::QMCDriver(), VMC::resetRun(), and CSVMC::resetRun().
|
protected |
maximum number of steps
Definition at line 269 of file QMCDriver.h.
Referenced by VMC::put(), CSVMC::put(), QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), RMC::resetRun(), DMC::resetUpdateEngines(), VMC::run(), RMC::run(), DMC::run(), CSVMC::run(), and VMC::VMC().
|
protected |
alternate method of setting QMC run parameters
Definition at line 291 of file QMCDriver.h.
Referenced by VMC::put(), CSVMC::put(), QMCDriver::QMCDriver(), and VMC::VMC().
|
protected |
number of steps between a step: VMCs do not evaluate energies
Definition at line 272 of file QMCDriver.h.
Referenced by VMC::put(), CSVMC::put(), QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), VMC::resetRun(), and RMC::resetRun().
|
protected |
target population
Definition at line 295 of file QMCDriver.h.
Referenced by VMC::put(), CSVMC::put(), QMCDriver::QMCDriver(), and VMC::resetRun().
|
protected |
the number of saved samples
Definition at line 289 of file QMCDriver.h.
Referenced by VMC::put(), CSVMC::put(), QMCDriver::QMCDriver(), VMC::resetRun(), and CSVMC::resetRun().
|
protected |
the number of walkers
Definition at line 287 of file QMCDriver.h.
Referenced by QMCDriver::finalize(), QMCDriver::putQMCInfo(), and QMCDriver::QMCDriver().
|
protected |
number of warmup steps
Definition at line 275 of file QMCDriver.h.
Referenced by QMCDriver::QMCDriver(), VMC::resetRun(), CSVMC::resetRun(), and RMC::resetRun().
|
protected |
period of dumping walker configurations and everything else for restart
The unit is a block.
Definition at line 242 of file QMCDriver.h.
Referenced by VMC::put(), CSVMC::put(), QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), QMCDriver::recordBlock(), and DMC::run().
|
protected |
period of dumping walker positions and IDs for Forward Walking
The unit is in steps.Period to recalculate the walker properties from scratch.
Definition at line 249 of file QMCDriver.h.
Referenced by QMCDriver::QMCDriver(), VMC::run(), RMC::run(), DMC::run(), and CSVMC::run().
|
protected |
period of recording walker positions and IDs for forward walking afterwards
Definition at line 260 of file QMCDriver.h.
Referenced by QMCDriver::putQMCInfo(), and QMCDriver::QMCDriver().
|
protected |
period of recording walker configurations
Default is 0 indicating that only the last configuration will be saved.
Definition at line 255 of file QMCDriver.h.
Referenced by VMC::put(), CSVMC::put(), QMCDriver::putQMCInfo(), QMCDriver::QMCDriver(), RMC::resetRun(), VMC::run(), RMC::run(), and CSVMC::run().
|
protected |
top-level project data information
Definition at line 216 of file QMCDriver.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML().
|
protected |
trial function
Definition at line 326 of file QMCDriver.h.
Referenced by WaveFunctionTester::checkGradientAtConfiguration(), WaveFunctionTester::computeNumericalGrad(), WaveFunctionTester::printEloc(), QMCFixedSampleLinearOptimize::processOptXML(), VMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), WaveFunctionTester::runBasicTest(), WaveFunctionTester::runCloneTest(), WaveFunctionTester::runDerivCloneTest(), WaveFunctionTester::runDerivNLPPTest(), WaveFunctionTester::runDerivTest(), WaveFunctionTester::runGradSourceTest(), WaveFunctionTester::runNodePlot(), WaveFunctionTester::runRatioTest(), WaveFunctionTester::runRatioTest2(), WaveFunctionTester::runRatioV(), and WaveFunctionTester::runZeroVarianceTest().
|
protected |
a list of TrialWaveFunctions for multiple method
Definition at line 335 of file QMCDriver.h.
Referenced by QMCDriver::add_H_and_Psi(), and CSVMC::resetRun().
std::bitset<QMC_MODE_MAX> qmc_driver_mode |
bits to classify QMCDriver
Definition at line 93 of file QMCDriver.h.
Referenced by CSVMC::CSVMC(), DMC::DMC(), QMCDriver::getDriverMode(), QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), VMC::resetRun(), CSVMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), RMC::RMC(), VMC::run(), RMC::run(), DMC::run(), CSVMC::run(), QMCDriver::setUpdateMode(), and VMC::VMC().
|
protected |
pointer to qmc node in xml file
Definition at line 310 of file QMCDriver.h.
Referenced by QMCDriver::getQMCNode(), QMCDriver::process(), VMC::resetRun(), CSVMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), and WaveFunctionTester::run().
|
protected |
type of QMC driver
Definition at line 313 of file QMCDriver.h.
Referenced by QMCDriver::getEngineName(), and QMCDriver::setStatus().
|
protected |
randomize it
Definition at line 222 of file QMCDriver.h.
Referenced by QMCDriver::process(), QMCDriver::putQMCInfo(), and QMCDriver::QMCDriver().
|
protected |
Random number generators.
Definition at line 341 of file QMCDriver.h.
Referenced by QMCDriver::getRng(), QMCDriver::getRngRefs(), VMC::resetRun(), CSVMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), VMC::run(), RMC::run(), DMC::run(), CSVMC::run(), WaveFunctionTester::run(), and WaveFunctionTester::runDerivCloneTest().
|
protected |
root of all the output files
Definition at line 317 of file QMCDriver.h.
Referenced by CSVMC::CSVMC(), DMC::DMC(), QMCDriver::finalize(), QMCFixedSampleLinearOptimize::generateSamples(), QMCDriver::get_root_name(), QMCDriver::getLastRotationName(), QMCDriver::getRotationName(), QMCDriver::process(), QMCFixedSampleLinearOptimize::processOptXML(), QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), QMCDriver::recordBlock(), RMC::RMC(), WaveFunctionTester::runNodePlot(), QMCDriver::setStatus(), and VMC::VMC().
|
protected |
Definition at line 375 of file QMCDriver.h.
Referenced by QMCDriver::getLastRotationName(), QMCDriver::getRotationName(), and QMCDriver::QMCDriver().
|
protected |
spin mass for spinor calcs
Definition at line 353 of file QMCDriver.h.
Referenced by QMCDriver::QMCDriver(), VMC::resetRun(), and DMC::resetUpdateEngines().
|
protected |
timestep
Definition at line 299 of file QMCDriver.h.
Referenced by QMCDriver::process(), VMC::put(), CSVMC::put(), QMCDriver::QMCDriver(), RMC::resetRun(), WaveFunctionTester::runRatioTest(), WaveFunctionTester::runRatioTest2(), WaveFunctionTester::runRatioV(), and QMCDriver::setTau().
std::unique_ptr<TraceManager> Traces |
Traces manager.
Definition at line 195 of file QMCDriver.h.
Referenced by QMCDriver::process(), VMC::resetRun(), CSVMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), VMC::run(), RMC::run(), DMC::run(), and CSVMC::run().
xmlNodePtr traces_xml |
traces xml
Definition at line 98 of file QMCDriver.h.
Referenced by QMCDriver::process(), and QMCDriver::putTraces().
|
protected |
walker ensemble
Definition at line 323 of file QMCDriver.h.
Referenced by QMCDriver::addWalkers(), WaveFunctionTester::checkGradientAtConfiguration(), WaveFunctionTester::checkGradients(), WaveFunctionTester::computeNumericalGrad(), QMCDriver::finalize(), QMCFixedSampleLinearOptimize::finish(), WaveFunctionTester::printEloc(), QMCDriver::process(), QMCFixedSampleLinearOptimize::processOptXML(), VMC::put(), CSVMC::put(), QMCDriver::putQMCInfo(), QMCDriver::putWalkers(), QMCDriver::QMCDriver(), QMCDriver::recordBlock(), RMC::resetReptiles(), VMC::resetRun(), CSVMC::resetRun(), RMC::resetRun(), DMC::resetUpdateEngines(), VMC::run(), RMC::run(), DMC::run(), CSVMC::run(), WaveFunctionTester::runBasicTest(), WaveFunctionTester::runCloneTest(), WaveFunctionTester::runDerivCloneTest(), WaveFunctionTester::runDerivNLPPTest(), WaveFunctionTester::runDerivTest(), WaveFunctionTester::runGradSourceTest(), WaveFunctionTester::runNodePlot(), WaveFunctionTester::runRatioTest(), WaveFunctionTester::runRatioTest2(), WaveFunctionTester::runRatioV(), WaveFunctionTester::runZeroVarianceTest(), and QMCDriver::setWalkerOffsets().
xmlNodePtr walker_logs_xml |
traces xml
Definition at line 103 of file QMCDriver.h.
Referenced by QMCDriver::process(), QMCDriver::putWalkerLogs(), and QMCDriver::QMCDriver().
std::unique_ptr<WalkerLogManager> wlog_manager_ |
Traces manager.
Definition at line 198 of file QMCDriver.h.
Referenced by QMCDriver::process(), VMC::resetRun(), DMC::resetUpdateEngines(), VMC::run(), and DMC::run().
|
protected |
record engine for walkers
Definition at line 332 of file QMCDriver.h.
Referenced by QMCDriver::finalize(), QMCDriver::process(), QMCDriver::recordBlock(), VMC::run(), and CSVMC::run().
class qmcplusplus::QMCDriverNew |
QMCDriverNew Base class for Unified Drivers.
Definition at line 75 of file QMCDriverNew.h.
Public Types | |
enum | { QMC_UPDATE_MODE, QMC_MULTIPLE, QMC_OPTIMIZE, QMC_WARMUP } |
separate but similar to QMCModeEnum More... | |
using | RealType = QMCTraits::RealType |
using | IndexType = QMCTraits::IndexType |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
using | MCPWalker = MCPopulation::MCPWalker |
using | WFBuffer = MCPopulation::WFBuffer |
using | SetNonLocalMoveHandler = std::function< void(QMCHamiltonian &)> |
![]() | |
using | BranchEngineType = SimpleFixedNodeBranch |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
Public Member Functions | |
QMCDriverNew (const ProjectData &project_data, QMCDriverInput &&input, const std::optional< EstimatorManagerInput > &global_emi, WalkerConfigurations &wc, MCPopulation &&population, const std::string timer_prefix, Communicate *comm, const std::string &QMC_driver_type) | |
Constructor. More... | |
QMCDriverNew (QMCDriverNew &&)=default | |
Move Constructor. More... | |
QMCDriverNew (const QMCDriverNew &)=delete | |
Copy Constructor (disabled). More... | |
QMCDriverNew & | operator= (const QMCDriverNew &)=delete |
Copy operator (disabled). More... | |
~QMCDriverNew () override | |
bool | putQMCInfo (xmlNodePtr cur) |
void | makeLocalWalkers (int nwalkers, RealType reserve) |
Adjust populations local walkers to this number. More... | |
DriftModifierBase & | get_drift_modifier () const |
void | recordBlock (int block) override |
record the state of the block More... | |
bool | finalize (int block, bool dumpwalkers=true) |
finalize a qmc section More... | |
IndexType | current () const |
return current step More... | |
void | setStatus (const std::string &aname, const std::string &h5name, bool append) override |
Set the status of the QMCDriver. More... | |
void | add_H_and_Psi (QMCHamiltonian *h, TrialWaveFunction *psi) override |
void | createRngsStepContexts (int num_crowds) |
Creates Random Number generators for crowds and step contexts. More... | |
void | putWalkers (std::vector< xmlNodePtr > &wset) override |
Read walker configurations from *.config.h5 files. More... | |
RefVector< RandomBase< FullPrecRealType > > | getRngRefs () const |
RandomBase< FullPrecRealType > & | getRng (int i) override |
return the i-th random generator More... | |
std::string | getEngineName () override |
intended for logging output and debugging you should base behavior on type preferably at compile time or if necessary at runtime using and protected by dynamic cast. More... | |
unsigned long | getDriverMode () override |
IndexType | get_num_living_walkers () const |
IndexType | get_num_dead_walkers () const |
const QMCDriverInput & | getQMCDriverInput () const |
![]() | |
virtual bool | run ()=0 |
virtual QMCRunType | getRunType ()=0 |
virtual | ~QMCDriverInterface () |
virtual void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) |
virtual std::unique_ptr< BranchEngineType > | getBranchEngine () |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
Public Attributes | |
std::bitset< QMC_MODE_MAX > | qmc_driver_mode_ |
bits to classify QMCDriver More... | |
bool | allow_walker_logs |
whether to allow walker logs More... | |
WalkerLogInput | walker_logs_input |
walker logs input More... | |
Protected Member Functions | |
void | initializeQMC (const AdjustedWalkerCounts &awc) |
Do common section starting tasks for VMC and DMC. More... | |
void | measureImbalance (const std::string &tag) const |
inject additional barrier and measure load imbalance. More... | |
void | endBlock () |
end of a block operations. Aggregates statistics across all MPI ranks and write to disk. More... | |
QMCDriverInput | qmcdriver_input_ |
RealType | max_disp_sq_ |
they should be limited to values that can be changed from input or are live state. More... | |
IndexType | target_samples_ |
the number of saved samples More... | |
IndexType | nBlocksBetweenRecompute |
the number of blocks between recomptePsi More... | |
UPtrVector< Crowd > | crowds_ |
}@ More... | |
std::string | h5_file_root_ |
std::unique_ptr< DriftModifierBase > | drift_modifier_ |
drift modifer More... | |
int | k_delay |
the number to delay updates by More... | |
int | walker_dump_period |
period of recording walker configurations More... | |
IndexType | current_step_ |
size_t | steps_per_block_ = 0 |
actual number of steps per block More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves /rejected More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
const std::string | QMCType |
type of qmc: assigned by subclasses More... | |
MCPopulation | population_ |
the entire (on node) walker population it serves VMCBatch and DMCBatch right now but will be polymorphic More... | |
struct DriverWalkerResourceCollection | golden_resource_ |
the golden multi walker shared resource serves ParticleSet TrialWaveFunction right now but actually should be based on MCPopulation. More... | |
const MultiWalkerDispatchers | dispatchers_ |
multi walker dispatchers More... | |
std::unique_ptr< EstimatorManagerNew > | estimator_manager_ |
Observables manager Has very problematic owner ship and life cycle. More... | |
std::unique_ptr< HDFWalkerOutput > | wOut |
record engine for walkers More... | |
UPtrVector< ContextForSteps > | step_contexts_ |
Per crowd move contexts, this is where the DistanceTables etc. More... | |
UPtrVector< RandomBase< FullPrecRealType > > | Rng |
Random number generators. More... | |
std::vector< xmlNodePtr > | mcwalkerNodePtr |
a list of mcwalkerset element More... | |
DriverTimers | timers_ |
period of dumping walker configurations and everything else for restart More... | |
ScopedProfiler | driver_scope_profiler_ |
profile the driver lifetime More... | |
const ProjectData & | project_data_ |
project info for accessing global fileroot and series id More... | |
WalkerConfigurations & | walker_configs_ref_ |
class | qmcplusplus::testing::VMCBatchedTest |
class | qmcplusplus::testing::DMCBatchedTest |
class | qmcplusplus::testing::QMCDriverNewTestWrapper |
std::ostream & | operator<< (std::ostream &o_stream, const QMCDriverNew &qmcd) |
const std::string & | get_root_name () const override |
bool | put (xmlNodePtr cur) override |
More... | |
void | process (xmlNodePtr cur) override=0 |
QMCDriverNew driver second (3rd, 4th...) stage of constructing a valid driver. More... | |
void | setUpdateMode (bool pbyp) override |
should be set in input don't see a reason to set individually More... | |
void | putTraces (xmlNodePtr txml) override |
void | requestTraces (bool allow_traces) override |
void | putWalkerLogs (xmlNodePtr wlxml) override |
void | requestWalkerLogs (bool allow_walker_logs_) override |
static void | initialLogEvaluation (int crowd_id, UPtrVector< Crowd > &crowds, UPtrVector< ContextForSteps > &step_context) |
template<typename RT , CoordsType CT> | |
static void | scaleBySqrtTau (const TauParams< RT, CT > &taus, MCCoords< CT > &coords) |
template<typename RT , CoordsType CT> | |
static void | computeLogGreensFunction (const MCCoords< CT > &coords, const TauParams< RT, CT > &taus, std::vector< QMCTraits::RealType > &log_gb) |
calculates Green Function from displacements stored in MCCoords [param, out] log_g More... | |
static QMCDriverNew::AdjustedWalkerCounts | adjustGlobalWalkerCount (Communicate &comm, const IndexType current_configs, const IndexType requested_total_walkers, const IndexType requested_walkers_per_rank, const RealType reserve_walkers, int num_crowds) |
}@ More... | |
static size_t | determineStepsPerBlock (IndexType global_walkers, IndexType requested_samples, IndexType requested_steps, IndexType blocks) |
pure function calculating the actual number of steps per block More... | |
static void | checkNumCrowdsLTNumThreads (const int num_crowds) |
static void | checkLogAndGL (Crowd &crowd, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
static void | setWalkerOffsets (WalkerConfigurations &, Communicate *comm) |
update the global offsets of walker configurations after active walkers being touched. More... | |
Additional Inherited Members | |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
Definition at line 80 of file QMCDriverNew.h.
using IndexType = QMCTraits::IndexType |
Definition at line 79 of file QMCDriverNew.h.
using MCPWalker = MCPopulation::MCPWalker |
Definition at line 93 of file QMCDriverNew.h.
using RealType = QMCTraits::RealType |
Definition at line 78 of file QMCDriverNew.h.
using SetNonLocalMoveHandler = std::function<void(QMCHamiltonian&)> |
Definition at line 96 of file QMCDriverNew.h.
using WFBuffer = MCPopulation::WFBuffer |
Definition at line 94 of file QMCDriverNew.h.
anonymous enum |
separate but similar to QMCModeEnum
a code smell
Enumerator | |
---|---|
QMC_UPDATE_MODE | |
QMC_MULTIPLE | |
QMC_OPTIMIZE | |
QMC_WARMUP |
Definition at line 85 of file QMCDriverNew.h.
QMCDriverNew | ( | const ProjectData & | project_data, |
QMCDriverInput && | input, | ||
const std::optional< EstimatorManagerInput > & | global_emi, | ||
WalkerConfigurations & | wc, | ||
MCPopulation && | population, | ||
const std::string | timer_prefix, | ||
Communicate * | comm, | ||
const std::string & | QMC_driver_type | ||
) |
Constructor.
Has nasty workaround for RandomNumberControl.
Num crowds must be less than omp_get_max_threads because RandomNumberControl is global c lib function masquerading as a C++ object.
Definition at line 46 of file QMCDriverNew.cpp.
References qmcplusplus::comm, qmcplusplus::createDriftModifier(), QMCDriverNew::drift_modifier_, QMCDriverNew::estimator_manager_, QMCDriverInput::get_drift_modifier(), QMCDriverInput::get_drift_modifier_unr_a(), QMCDriverInput::get_estimator_manager_input(), MCPopulation::get_golden_hamiltonian(), QMCDriverNew::get_root_name(), qmcplusplus::lattice, QMCDriverNew::max_disp_sq_, MPIObjectBase::myComm, QMCDriverNew::population_, QMCDriverNew::qmcdriver_input_, and QMCDriverNew::wOut.
|
default |
Move Constructor.
|
delete |
Copy Constructor (disabled).
|
override |
Definition at line 112 of file QMCDriverNew.cpp.
References RandomNumberControl::Children, and QMCDriverNew::Rng.
|
inlineoverridevirtual |
|
staticprotected |
}@
pure function returning AdjustedWalkerCounts data structure
The logic is now walker counts is fairly simple. TotalWalkers trumps all other walker parameters If TotalWalkers is absent walkers_per_rank is used. if they are both absent then the default is one walker per crowd, each rank has crowds walkers. if crowds aren't specified you get one per main level thread.
You can have crowds or ranks with no walkers. You cannot have more crowds than threads.
passing num_ranks instead of internally querying comm->size() makes unit testing much quicker.
Definition at line 407 of file QMCDriverNew.cpp.
References Communicate::allreduce(), qmcplusplus::app_warning(), QMCDriverNew::checkNumCrowdsLTNumThreads(), qmcplusplus::comm, error(), fairDivide(), qmcplusplus::num_ranks, Communicate::rank(), Communicate::size(), and QMCDriverNew::AdjustedWalkerCounts::walkers_per_rank.
Referenced by QMCDriverNewTestWrapper::process(), VMCBatched::process(), DMCBatched::process(), QMCFixedSampleLinearOptimizeBatched::processOptXML(), and QMCDriverNewTestWrapper::testAdjustGlobalWalkerCount().
|
staticprotected |
check logpsi and grad and lap against values computed from scratch
Definition at line 548 of file QMCDriverNew.cpp.
References qmcplusplus::abs(), qmcplusplus::crowd, qmcplusplus::dot(), qmcplusplus::exp(), qmcplusplus::log_values(), and qmcplusplus::sqrt().
Referenced by VMCBatched::advanceWalkers(), and DMCBatched::advanceWalkers().
|
staticprotected |
Definition at line 119 of file QMCDriverNew.cpp.
Referenced by QMCDriverNew::adjustGlobalWalkerCount().
|
inlinestatic |
calculates Green Function from displacements stored in MCCoords [param, out] log_g
Definition at line 270 of file QMCDriverNew.h.
References qmcplusplus::dot(), and qmcplusplus::POS_SPIN.
Referenced by VMCBatched::advanceWalkers(), DMCBatched::advanceWalkers(), and qmcplusplus::TEST_CASE().
void createRngsStepContexts | ( | int | num_crowds | ) |
Creates Random Number generators for crowds and step contexts.
This is quite dangerous in that number of crowds can be > omp_get_max_threads() This is used instead of actually passing number of threads/crowds controlling threads all over RandomNumberControl.
Definition at line 298 of file QMCDriverNew.cpp.
References qmcplusplus::app_warning(), RandomNumberControl::Children, RandomNumberControl::make_seeds(), QMCDriverNew::Rng, and QMCDriverNew::step_contexts_.
Referenced by QMCDriverNew::initializeQMC().
|
inline |
return current step
Definition at line 181 of file QMCDriverNew.h.
References QMCDriverNew::current_step_.
|
staticprotected |
pure function calculating the actual number of steps per block
global_walkers | the total number of walkers over all the MPI ranks |
requested_samples | the number of samples from user input "samples". <=0 treated as no input |
requested_steps | the number steps per block from user input "steps". <=0 treated as no input |
blocks | the number of blocks. Must be positive. |
Definition at line 473 of file QMCDriverNew.cpp.
Referenced by VMCBatched::process(), DMCBatched::process(), and QMCDriverNewTestWrapper::testDetermineStepsPerBlock().
|
protected |
end of a block operations. Aggregates statistics across all MPI ranks and write to disk.
The scalar estimator collection is quite strange.
get the average cpu_block time per crowd cpu_block_time /= crowds_.size();
Definition at line 505 of file QMCDriverNew.cpp.
References qmcplusplus::app_warning(), qmcplusplus::crowd, QMCDriverNew::crowds_, QMCDriverNew::DriverTimers::endblock_timer, QMCDriverNew::estimator_manager_, and QMCDriverNew::timers_.
Referenced by VMCBatched::run(), and DMCBatched::run().
bool finalize | ( | int | block, |
bool | dumpwalkers = true |
||
) |
finalize a qmc section
block | current block |
dumpwalkers | if true, dump walkers |
Accumulate energy and weight is written to a hdf5 file. Finialize the estimators
Definition at line 251 of file QMCDriverNew.cpp.
References qmcplusplus::app_log(), InfoStream::flush(), QMCDriverInput::get_dump_config(), QMCDriverNew::get_root_name(), WalkerConfigurations::getGlobalNumWalkers(), QMCDriverNew::getRngRefs(), infoLog, infoSummary, MPIObjectBase::myComm, QMCDriverNew::population_, QMCDriverNew::qmcdriver_input_, MCPopulation::saveWalkerConfigurations(), QMCDriverNew::setWalkerOffsets(), QMCDriverNew::walker_configs_ref_, QMCDriverNew::wOut, and RandomNumberControl::write().
Referenced by VMCBatched::run(), and DMCBatched::run().
|
inline |
Definition at line 162 of file QMCDriverNew.h.
References QMCDriverNew::drift_modifier_.
|
inline |
Definition at line 221 of file QMCDriverNew.h.
References MCPopulation::get_dead_walkers(), and QMCDriverNew::population_.
|
inline |
Definition at line 220 of file QMCDriverNew.h.
References MCPopulation::get_walkers(), and QMCDriverNew::population_.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverrideprotectedvirtual |
Implements QMCDriverInterface.
Definition at line 331 of file QMCDriverNew.h.
References ProjectData::currentMainRoot(), and QMCDriverNew::project_data_.
Referenced by QMCDriverNew::finalize(), QMCFixedSampleLinearOptimizeBatched::generateSamples(), QMCFixedSampleLinearOptimizeBatched::one_shift_run(), QMCFixedSampleLinearOptimizeBatched::processOptXML(), QMCDriverNew::QMCDriverNew(), QMCDriverNew::recordBlock(), QMCFixedSampleLinearOptimizeBatched::run(), VMCBatched::run(), DMCBatched::run(), QMCDriverNew::setStatus(), and QMCFixedSampleLinearOptimizeBatched::test_run().
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 218 of file QMCDriverNew.h.
References QMCDriverNew::qmc_driver_mode_.
|
inlineoverridevirtual |
intended for logging output and debugging you should base behavior on type preferably at compile time or if necessary at runtime using and protected by dynamic cast.
QMCType is primarily for use in the debugger.
Implements QMCDriverInterface.
Definition at line 217 of file QMCDriverNew.h.
References QMCDriverNew::QMCType.
|
inline |
Definition at line 223 of file QMCDriverNew.h.
References QMCDriverNew::qmcdriver_input_.
|
inlineoverridevirtual |
return the i-th random generator
Implements QMCDriverInterface.
Definition at line 210 of file QMCDriverNew.h.
References QMCDriverNew::Rng.
|
inline |
Definition at line 201 of file QMCDriverNew.h.
References QMCDriverNew::Rng.
Referenced by QMCDriverNew::finalize(), and QMCDriverNew::recordBlock().
|
protected |
Do common section starting tasks for VMC and DMC.
set up population_, crowds_, rngs and step_contexts_
Definition at line 130 of file QMCDriverNew.cpp.
References app_debug, qmcplusplus::app_summary(), QMCDriverInput::areWalkersSerialized(), QMCHamiltonian::createResource(), TrialWaveFunction::createResource(), ParticleSet::createResource(), QMCDriverNew::createRngsStepContexts(), QMCDriverNew::crowds_, QMCDriverNew::dispatchers_, QMCDriverNew::estimator_manager_, MCPopulation::get_golden_electrons(), MCPopulation::get_golden_hamiltonian(), MCPopulation::get_golden_twf(), QMCDriverInput::get_max_blocks(), QMCDriverInput::get_measure_imbalance(), QMCDriverInput::get_requested_steps(), QMCDriverNew::AdjustedWalkerCounts::global_walkers, QMCDriverNew::golden_resource_, DriverWalkerResourceCollection::ham_res, QMCHamiltonian::informOperatorsOfListener(), QMCDriverNew::makeLocalWalkers(), QMCDriverNew::measureImbalance(), MPIObjectBase::myComm, QMCDriverNew::population_, DriverWalkerResourceCollection::pset_res, QMCDriverNew::qmcdriver_input_, QMCDriverNew::QMCType, Communicate::rank(), MCPopulation::redistributeWalkers(), QMCDriverNew::AdjustedWalkerCounts::reserve_walkers, MCPopulation::set_num_global_walkers(), QMCDriverNew::DriverTimers::startup_timer, QMCDriverNew::steps_per_block_, QMCDriverNew::timers_, DriverWalkerResourceCollection::twf_res, QMCDriverNew::AdjustedWalkerCounts::walkers_per_crowd, and QMCDriverNew::AdjustedWalkerCounts::walkers_per_rank.
Referenced by QMCDriverNewTestWrapper::process(), VMCBatched::process(), and DMCBatched::process().
|
static |
Definition at line 317 of file QMCDriverNew.cpp.
References QMCHamiltonian::auxHevaluate(), qmcplusplus::crowd, qmcplusplus::ham, qmcplusplus::pset, QMCHamiltonian::saveProperty(), qmcplusplus::twf, qmcplusplus::walker, and qmcplusplus::hdf::walkers.
Referenced by VMCBatched::run(), and DMCBatched::run().
void makeLocalWalkers | ( | int | nwalkers, |
RealType | reserve | ||
) |
Adjust populations local walkers to this number.
nwalkers | number of walkers to add |
Definition at line 271 of file QMCDriverNew.cpp.
References QMCDriverNew::DriverTimers::create_walkers_timer, MCPopulation::createWalkers(), MCPopulation::get_walkers(), MCPopulation::killLastWalker(), QMCDriverNew::population_, MCPopulation::spawnWalker(), QMCDriverNew::timers_, and QMCDriverNew::walker_configs_ref_.
Referenced by QMCDriverNew::initializeQMC().
|
protected |
inject additional barrier and measure load imbalance.
Definition at line 618 of file QMCDriverNew.cpp.
References qmcplusplus::app_log(), Communicate::barrier(), Timer::elapsed(), Communicate::gather(), QMCDriverNew::DriverTimers::imbalance_timer, MPIObjectBase::myComm, Communicate::rank(), Communicate::size(), and QMCDriverNew::timers_.
Referenced by QMCDriverNew::initializeQMC(), VMCBatched::run(), DMCBatched::run(), and QMCDriverNewTestWrapper::testMeasureImbalance().
|
delete |
Copy operator (disabled).
|
overridepure virtual |
QMCDriverNew driver second (3rd, 4th...) stage of constructing a valid driver.
This is the shared entry point with legacy, from QMCMain so the API cannot be updated yet
Implements QMCDriverInterface.
Implemented in DMCBatched, VMCBatched, QMCFixedSampleLinearOptimizeBatched, and QMCDriverNewTestWrapper.
|
inlineoverridevirtual |
bool putQMCInfo | ( | xmlNodePtr | cur | ) |
|
inlineoverridevirtual |
|
overridevirtual |
Implements QMCDriverInterface.
Definition at line 382 of file QMCDriverNew.cpp.
References WalkerLogInput::present, InputSection::readXML(), and QMCDriverNew::walker_logs_input.
|
overridevirtual |
Read walker configurations from *.config.h5 files.
wset | list of xml elements containing mcwalkerset |
All this does is look in the walker xml section for the hdf file. It reads that (I think) and if there are active walkers declares it a restart run.
This inferred behavior is asking for trouble. Unified driver will not support until restart feature is re-architected
Implements QMCDriverInterface.
Definition at line 221 of file QMCDriverNew.cpp.
References Communicate::bcast(), MCPopulation::get_golden_electrons(), WalkerConfigurations::getActiveWalkers(), ParticleSet::getTotalNum(), QMCDriverNew::h5_file_root_, MPIObjectBase::myComm, QMCDriverNew::population_, QMCDriverNew::setWalkerOffsets(), and QMCDriverNew::walker_configs_ref_.
|
overridevirtual |
record the state of the block
block | current block |
virtual function with a default implementation
Implements QMCDriverInterface.
Definition at line 239 of file QMCDriverNew.cpp.
References QMCDriverNew::DriverTimers::checkpoint_timer, QMCDriverInput::get_check_point_period(), QMCDriverInput::get_dump_config(), QMCDriverNew::get_root_name(), QMCDriverNew::getRngRefs(), MPIObjectBase::myComm, QMCDriverNew::population_, QMCDriverNew::qmcdriver_input_, MCPopulation::saveWalkerConfigurations(), QMCDriverNew::setWalkerOffsets(), QMCDriverNew::timers_, QMCDriverNew::walker_configs_ref_, QMCDriverNew::wOut, and RandomNumberControl::write().
Referenced by VMCBatched::run(), and DMCBatched::run().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 253 of file QMCDriverNew.h.
References QMCDriverNew::allow_walker_logs.
|
inlinestatic |
Definition at line 257 of file QMCDriverNew.h.
References qmcplusplus::POS_SPIN.
Referenced by VMCBatched::advanceWalkers(), DMCBatched::advanceWalkers(), and qmcplusplus::TEST_CASE().
|
overridevirtual |
Set the status of the QMCDriver.
QMCDriverNew ignores h5name if you want to read and h5 config you have to explicitly do so.
aname | the root file name, ignored |
h5name | root name of the master hdf5 file containing previous qmcrun |
append | if true, the run is a continuation of the previous qmc |
All output files will be of the form "aname.s00X.suffix", where "X" is number of previous QMC runs for the simulation and "suffix" is the suffix for the output file.
Implements QMCDriverInterface.
Definition at line 199 of file QMCDriverNew.cpp.
References qmcplusplus::app_log(), QMCDriverNew::get_root_name(), QMCDriverNew::h5_file_root_, and QMCDriverNew::QMCType.
Referenced by qmcplusplus::TEST_CASE().
|
inlineoverridevirtual |
should be set in input don't see a reason to set individually
pbyp | if true, use particle-by-particle update |
Implements QMCDriverInterface.
Definition at line 246 of file QMCDriverNew.h.
References QMCDriverNew::qmc_driver_mode_, and QMCDriverNew::QMC_UPDATE_MODE.
|
staticprotected |
update the global offsets of walker configurations after active walkers being touched.
Definition at line 642 of file QMCDriverNew.cpp.
References Communicate::allreduce(), qmcplusplus::comm, WalkerConfigurations::getActiveWalkers(), Communicate::rank(), WalkerConfigurations::setWalkerOffsets(), and Communicate::size().
Referenced by QMCDriverNew::finalize(), QMCDriverNew::putWalkers(), and QMCDriverNew::recordBlock().
|
friend |
Definition at line 393 of file QMCDriverNew.cpp.
|
friend |
Definition at line 490 of file QMCDriverNew.h.
|
friend |
Definition at line 491 of file QMCDriverNew.h.
|
friend |
Definition at line 489 of file QMCDriverNew.h.
bool allow_walker_logs |
whether to allow walker logs
Definition at line 106 of file QMCDriverNew.h.
Referenced by QMCDriverNew::requestWalkerLogs(), VMCBatched::run(), and DMCBatched::run().
|
protected |
}@
Definition at line 389 of file QMCDriverNew.h.
Referenced by QMCDriverNew::endBlock(), QMCDriverNewTestWrapper::get_num_crowds(), QMCDriverNew::initializeQMC(), VMCBatched::run(), and DMCBatched::run().
|
protected |
Definition at line 405 of file QMCDriverNew.h.
Referenced by QMCDriverNew::current(), and qmcplusplus::operator<<().
|
protected |
multi walker dispatchers
Definition at line 436 of file QMCDriverNew.h.
Referenced by QMCDriverNew::initializeQMC().
|
protected |
drift modifer
Definition at line 394 of file QMCDriverNew.h.
Referenced by QMCDriverNew::get_drift_modifier(), QMCDriverNew::QMCDriverNew(), VMCBatched::run(), and DMCBatched::run().
|
protected |
profile the driver lifetime
Definition at line 475 of file QMCDriverNew.h.
|
protected |
Observables manager Has very problematic owner ship and life cycle.
Can be transferred via branch manager one driver to the next indefinitely TODO: Modify Branch manager and others to clear this up.
Definition at line 443 of file QMCDriverNew.h.
Referenced by QMCDriverNew::endBlock(), QMCDriverNew::initializeQMC(), QMCDriverNew::QMCDriverNew(), VMCBatched::run(), and DMCBatched::run().
|
protected |
the golden multi walker shared resource serves ParticleSet TrialWaveFunction right now but actually should be based on MCPopulation.
per crowd resources are copied from this gold instance it should be activated when dispatchers don't serialize walkers
Definition at line 433 of file QMCDriverNew.h.
Referenced by QMCDriverNew::initializeQMC().
|
protected |
Definition at line 391 of file QMCDriverNew.h.
Referenced by QMCFixedSampleLinearOptimizeBatched::generateSamples(), QMCFixedSampleLinearOptimizeBatched::processOptXML(), QMCDriverNew::putWalkers(), and QMCDriverNew::setStatus().
|
protected |
the number to delay updates by
Definition at line 397 of file QMCDriverNew.h.
|
protected |
Time-step factor .
Definition at line 416 of file QMCDriverNew.h.
|
protected |
Time-step factor .
Definition at line 418 of file QMCDriverNew.h.
|
protected |
they should be limited to values that can be changed from input or are live state.
Definition at line 380 of file QMCDriverNew.h.
Referenced by QMCDriverNew::QMCDriverNew().
|
protected |
a list of mcwalkerset element
Definition at line 456 of file QMCDriverNew.h.
Referenced by QMCFixedSampleLinearOptimizeBatched::processOptXML().
|
protected |
counter for number of moves accepted
Definition at line 410 of file QMCDriverNew.h.
|
protected |
the number of blocks between recomptePsi
Definition at line 385 of file QMCDriverNew.h.
|
protected |
counter for number of moves /rejected
Definition at line 413 of file QMCDriverNew.h.
|
protected |
the entire (on node) walker population it serves VMCBatch and DMCBatch right now but will be polymorphic
Definition at line 426 of file QMCDriverNew.h.
Referenced by VMCBatched::enable_sample_collection(), QMCDriverNew::finalize(), QMCDriverNew::get_num_dead_walkers(), QMCDriverNew::get_num_living_walkers(), QMCDriverNew::initializeQMC(), QMCDriverNew::makeLocalWalkers(), qmcplusplus::operator<<(), DMCBatched::process(), QMCFixedSampleLinearOptimizeBatched::processOptXML(), QMCDriverNew::putWalkers(), QMCDriverNew::QMCDriverNew(), QMCDriverNew::recordBlock(), VMCBatched::run(), and DMCBatched::run().
|
protected |
project info for accessing global fileroot and series id
Definition at line 478 of file QMCDriverNew.h.
Referenced by QMCDriverNew::get_root_name(), QMCFixedSampleLinearOptimizeBatched::processOptXML(), VMCBatched::run(), and DMCBatched::run().
std::bitset<QMC_MODE_MAX> qmc_driver_mode_ |
bits to classify QMCDriver
Definition at line 103 of file QMCDriverNew.h.
Referenced by QMCDriverNew::getDriverMode(), QMCFixedSampleLinearOptimizeBatched::QMCFixedSampleLinearOptimizeBatched(), VMCBatched::run(), DMCBatched::run(), and QMCDriverNew::setUpdateMode().
|
protected |
Definition at line 372 of file QMCDriverNew.h.
Referenced by VMCBatched::enable_sample_collection(), QMCDriverNew::finalize(), QMCDriverNew::getQMCDriverInput(), QMCDriverNew::initializeQMC(), qmcplusplus::operator<<(), QMCDriverNewTestWrapper::process(), VMCBatched::process(), DMCBatched::process(), QMCFixedSampleLinearOptimizeBatched::processOptXML(), QMCDriverNew::QMCDriverNew(), QMCDriverNew::recordBlock(), VMCBatched::run(), DMCBatched::run(), and DMCBatched::setNonLocalMoveHandler().
|
protected |
type of qmc: assigned by subclasses
Definition at line 421 of file QMCDriverNew.h.
Referenced by QMCDriverNew::getEngineName(), QMCDriverNew::initializeQMC(), and QMCDriverNew::setStatus().
|
protected |
Random number generators.
Definition at line 453 of file QMCDriverNew.h.
Referenced by QMCDriverNew::createRngsStepContexts(), QMCDriverNew::getRng(), QMCDriverNew::getRngRefs(), and QMCDriverNew::~QMCDriverNew().
|
protected |
Per crowd move contexts, this is where the DistanceTables etc.
reside
Definition at line 450 of file QMCDriverNew.h.
Referenced by QMCDriverNew::createRngsStepContexts(), VMCBatched::run(), and DMCBatched::run().
|
protected |
actual number of steps per block
Definition at line 407 of file QMCDriverNew.h.
Referenced by VMCBatched::enable_sample_collection(), QMCDriverNew::initializeQMC(), qmcplusplus::operator<<(), VMCBatched::process(), DMCBatched::process(), VMCBatched::run(), and DMCBatched::run().
|
protected |
the number of saved samples
Definition at line 382 of file QMCDriverNew.h.
Referenced by qmcplusplus::operator<<().
|
protected |
period of dumping walker configurations and everything else for restart
The unit is a block.}@
Definition at line 472 of file QMCDriverNew.h.
Referenced by QMCDriverNew::endBlock(), QMCDriverNew::initializeQMC(), QMCDriverNew::makeLocalWalkers(), QMCDriverNew::measureImbalance(), QMCDriverNew::recordBlock(), VMCBatched::run(), and DMCBatched::run().
|
protected |
Definition at line 481 of file QMCDriverNew.h.
Referenced by QMCDriverNew::finalize(), QMCDriverNew::makeLocalWalkers(), VMCBatched::process(), DMCBatched::process(), QMCFixedSampleLinearOptimizeBatched::processOptXML(), QMCDriverNew::putWalkers(), and QMCDriverNew::recordBlock().
|
protected |
period of recording walker configurations
Default is 0 indicating that only the last configuration will be saved.
Definition at line 403 of file QMCDriverNew.h.
WalkerLogInput walker_logs_input |
walker logs input
Definition at line 108 of file QMCDriverNew.h.
Referenced by QMCDriverNew::putWalkerLogs(), VMCBatched::run(), and DMCBatched::run().
|
protected |
record engine for walkers
Definition at line 446 of file QMCDriverNew.h.
Referenced by QMCDriverNew::finalize(), QMCDriverNew::QMCDriverNew(), and QMCDriverNew::recordBlock().
class qmcplusplus::RMC |
Public Types | |
using | ParticlePos = ParticleSet::ParticlePos |
Constructor. More... | |
using | ReptileConfig_t = Reptile::ReptileConfig_t |
![]() | |
enum | { QMC_UPDATE_MODE, QMC_MULTIPLE, QMC_OPTIMIZE, QMC_WARMUP } |
enumeration coupled with QMCMode More... | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | Buffer_t = Walker_t::Buffer_t |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | BranchEngineType = SimpleFixedNodeBranch |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
Public Member Functions | |
RMC (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm) | |
Constructor. More... | |
bool | run () override |
bool | put (xmlNodePtr cur) override |
QMCRunType | getRunType () override |
![]() | |
QMCDriver (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm, const std::string &QMC_driver_type, bool enable_profiling=false) | |
Constructor. More... | |
~QMCDriver () override | |
int | current () const |
return current step More... | |
void | setUpdateMode (bool pbyp) override |
set the update mode More... | |
void | setStatus (const std::string &aname, const std::string &h5name, bool append) override |
Set the status of the QMCDriver. More... | |
void | add_H_and_Psi (QMCHamiltonian *h, TrialWaveFunction *psi) override |
add QMCHamiltonian/TrialWaveFunction pair for multiple More... | |
void | process (xmlNodePtr cur) override |
initialize with xmlNode More... | |
xmlNodePtr | getQMCNode () |
return a xmlnode with update More... | |
void | putWalkers (std::vector< xmlNodePtr > &wset) override |
Read walker configurations from *.config.h5 files. More... | |
void | putTraces (xmlNodePtr txml) override |
void | requestTraces (bool traces) override |
void | putWalkerLogs (xmlNodePtr wlxml) override |
void | requestWalkerLogs (bool allow_walker_logs_) override |
std::string | getEngineName () override |
template<class PDT > | |
void | setValue (const std::string &aname, PDT x) |
void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) override |
set the BranchEngineType More... | |
std::unique_ptr< BranchEngineType > | getBranchEngine () override |
return BranchEngineType* More... | |
int | addObservable (const std::string &aname) |
RealType | getObservable (int i) |
void | setTau (RealType i) |
void | setWalkerOffsets () |
set global offsets of the walkers More... | |
RefVector< RandomBase< FullPrecRealType > > | getRngRefs () const |
return the random generators More... | |
RandomBase< FullPrecRealType > & | getRng (int i) override |
return the i-th random generator More... | |
unsigned long | getDriverMode () override |
![]() | |
virtual | ~QMCDriverInterface () |
virtual void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
![]() | |
CloneManager () | |
Constructor. More... | |
virtual | ~CloneManager () |
virtual destructor More... | |
void | makeClones (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &ham) |
void | makeClones (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &ham) |
void | makeClones (MCWalkerConfiguration &wg, TrialWaveFunction &guide) |
void | makeClones (TrialWaveFunction &guide) |
RealType | acceptRatio () const |
Private Member Functions | |
void | resetVars () |
check the run-time environments More... | |
void | resetRun () |
void | resetReptiles (int nReptiles, int nbeads, RealType tau) |
void | resetReptiles (std::vector< ReptileConfig_t > &reptile_samps, RealType tau) |
void | resetReptiles (std::vector< ParticlePos > &walker_samps, int nbeads, RealType tau) |
RMC (const RMC &)=delete | |
copy constructor (disabled) More... | |
RMC & | operator= (const RMC &)=delete |
Copy operator (disabled). More... | |
Private Attributes | |
int | prestepsVMC |
std::string | rescaleDrift |
option to enable/disable drift equation for RMC More... | |
RealType | beta |
projection time of reptile More... | |
int | myPeriod4WalkerDump |
period for walker dump More... | |
int | beads |
number of beads on the reptile, beta/tau More... | |
int | nReptiles |
int | resizeReptile |
rescale for time step studies. some int>2 and new beads are inserted in between the old ones. More... | |
bool | fromScratch |
std::vector< int > | Action |
std::vector< int > | TransProb |
Additional Inherited Members | |
![]() | |
static void | clearClones () |
![]() | |
std::bitset< QMC_MODE_MAX > | qmc_driver_mode |
bits to classify QMCDriver More... | |
bool | allow_traces |
whether to allow traces More... | |
xmlNodePtr | traces_xml |
traces xml More... | |
bool | allow_walker_logs |
whether to allow traces More... | |
xmlNodePtr | walker_logs_xml |
traces xml More... | |
EstimatorManagerBase * | Estimators |
Observables manager. More... | |
std::unique_ptr< TraceManager > | Traces |
Traces manager. More... | |
std::unique_ptr< WalkerLogManager > | wlog_manager_ |
Traces manager. More... | |
![]() | |
bool | putQMCInfo (xmlNodePtr cur) |
Parses the xml input file for parameter definitions for a single qmc simulation. More... | |
void | addWalkers (int nwalkers) |
Add walkers to the end of the ensemble of walkers. More... | |
void | recordBlock (int block) override |
record the state of the block More... | |
bool | finalize (int block, bool dumpwalkers=true) |
finalize a qmc section More... | |
std::string | getRotationName (std::string RootName) |
std::string | getLastRotationName (std::string RootName) |
const std::string & | get_root_name () const override |
![]() | |
RefVector< WalkerLogCollector > | getWalkerLogCollectorRefs () |
![]() | |
const ProjectData & | project_data_ |
top-level project data information More... | |
std::unique_ptr< BranchEngineType > | branchEngine |
branch engine More... | |
DriftModifierBase * | DriftModifier |
drift modifer More... | |
bool | ResetRandom |
randomize it More... | |
bool | AppendRun |
flag to append or restart the run More... | |
bool | DumpConfig |
flag to turn off dumping configurations More... | |
bool | IsQMCDriver |
true, if it is a real QMC engine More... | |
int | MyCounter |
the number of times this QMCDriver is executed More... | |
int | kDelay |
the number to delay updates by More... | |
int | Period4CheckPoint |
period of dumping walker configurations and everything else for restart More... | |
int | Period4CheckProperties |
period of dumping walker positions and IDs for Forward Walking More... | |
int | Period4WalkerDump |
period of recording walker configurations More... | |
int | Period4ConfigDump |
period of recording walker positions and IDs for forward walking afterwards More... | |
IndexType | CurrentStep |
current step More... | |
IndexType | nBlocks |
maximum number of blocks More... | |
IndexType | nSteps |
maximum number of steps More... | |
IndexType | nSubSteps |
number of steps between a step: VMCs do not evaluate energies More... | |
IndexType | nWarmupSteps |
number of warmup steps More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves /rejected More... | |
IndexType | nBlocksBetweenRecompute |
the number of blocks between recomptePsi More... | |
IndexType | nTargetWalkers |
the number of walkers More... | |
IndexType | nTargetSamples |
the number of saved samples More... | |
IndexType | nStepsBetweenSamples |
alternate method of setting QMC run parameters More... | |
RealType | nSamplesPerThread |
samples per thread More... | |
RealType | nTargetPopulation |
target population More... | |
RealType | Tau |
timestep More... | |
int | MaxCPUSecs |
maximum cpu in secs More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
xmlNodePtr | qmcNode |
pointer to qmc node in xml file More... | |
const std::string | QMCType |
type of QMC driver More... | |
std::string | h5FileRoot |
the root of h5File More... | |
std::string | RootName |
root of all the output files More... | |
ParameterSet | m_param |
store any parameter that has to be read from a file More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
std::unique_ptr< HDFWalkerOutput > | wOut |
record engine for walkers More... | |
std::vector< TrialWaveFunction * > | Psi1 |
a list of TrialWaveFunctions for multiple method More... | |
std::vector< QMCHamiltonian * > | H1 |
a list of QMCHamiltonians for multiple method More... | |
UPtrVector< RandomBase< FullPrecRealType > > | Rng |
Random number generators. More... | |
std::vector< xmlNodePtr > | mcwalkerNodePtr |
a list of mcwalkerset element More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
RealType | SpinMass |
spin mass for spinor calcs More... | |
int | rotation |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
![]() | |
const IndexType | NumThreads |
number of threads More... | |
std::vector< QMCUpdateBase * > | Movers |
update engines More... | |
std::vector< EstimatorManagerBase * > | estimatorClones |
estimator managers More... | |
std::vector< TraceManager * > | traceClones |
trace managers More... | |
UPtrVector< WalkerLogCollector > | wlog_collectors |
trace collectors More... | |
UPtrVector< CSUpdateBase > | CSMovers |
std::vector< int > | wPerRank |
Walkers per MPI rank. More... | |
![]() | |
static UPtrVector< MCWalkerConfiguration > | wClones_uptr |
walkers More... | |
static std::vector< MCWalkerConfiguration * > | wClones |
static UPtrVector< MCWalkerConfiguration > | wgClones |
static UPtrVector< TrialWaveFunction > | psiClones_uptr |
trial wavefunctions More... | |
static std::vector< TrialWaveFunction * > | psiClones |
static UPtrVector< TrialWaveFunction > | guideClones_uptr |
guide wavefunctions More... | |
static std::vector< TrialWaveFunction * > | guideClones |
static UPtrVector< QMCHamiltonian > | hClones_uptr |
Hamiltonians. More... | |
static std::vector< QMCHamiltonian * > | hClones |
static std::vector< UPtrVector< MCWalkerConfiguration > > | WPoolClones_uptr |
static std::vector< std::vector< MCWalkerConfiguration * > > | WPoolClones |
static std::vector< UPtrVector< TrialWaveFunction > > | PsiPoolClones_uptr |
static std::vector< std::vector< TrialWaveFunction * > > | PsiPoolClones |
static std::vector< UPtrVector< QMCHamiltonian > > | HPoolClones_uptr |
static std::vector< std::vector< QMCHamiltonian * > > | HPoolClones |
using ParticlePos = ParticleSet::ParticlePos |
RMC | ( | const ProjectData & | project_data, |
MCWalkerConfiguration & | w, | ||
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
Communicate * | comm | ||
) |
Constructor.
Definition at line 38 of file RMC.cpp.
References RMC::Action, ParameterSet::add(), ParticleSet::addProperty(), RMC::beads, RMC::beta, QMCDriver::m_param, RMC::prestepsVMC, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, QMCDriver::QMC_WARMUP, RMC::rescaleDrift, RMC::resizeReptile, QMCDriver::RootName, and RMC::TransProb.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 39 of file RMC.h.
References qmcplusplus::RMC.
|
overridevirtual |
Implements QMCDriverInterface.
Definition at line 305 of file RMC.cpp.
References QMCDriver::m_param, and ParameterSet::put().
|
private |
Definition at line 312 of file RMC.cpp.
References QMCDriver::addWalkers(), WalkerConfigurations::begin(), FairDivideLow(), WalkerConfigurations::getActiveWalkers(), MCWalkerConfiguration::ReptileList, and QMCDriver::W.
Referenced by RMC::resetReptiles(), and RMC::resetRun().
|
private |
Definition at line 330 of file RMC.cpp.
References APP_ABORT, MCWalkerConfiguration::ReptileList, RMC::resetReptiles(), and QMCDriver::W.
|
private |
Definition at line 349 of file RMC.cpp.
References APP_ABORT, MCWalkerConfiguration::ReptileList, RMC::resetReptiles(), and QMCDriver::W.
|
private |
Definition at line 143 of file RMC.cpp.
References RMC::Action, qmcplusplus::app_log(), RMC::beads, WalkerConfigurations::begin(), RMC::beta, QMCDriver::branchEngine, RandomNumberControl::Children, QMCDriver::CurrentStep, QMCDriver::DriftModifier, WalkerConfigurations::end(), CloneManager::estimatorClones, QMCDriver::Estimators, RMC::fromScratch, QMCDriver::H, CloneManager::hClones, QMCDriver::m_param, CloneManager::makeClones(), CloneManager::Movers, RMC::myPeriod4WalkerDump, QMCDriver::nBlocks, RMC::nReptiles, QMCDriver::nSteps, QMCDriver::nSubSteps, CloneManager::NumThreads, QMCDriver::nWarmupSteps, QMCDriver::Period4WalkerDump, RMC::prestepsVMC, QMCDriver::Psi, CloneManager::psiClones, ParameterSet::put(), QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, QMCDriver::qmcNode, MCWalkerConfiguration::ReptileList, RMC::resetReptiles(), QMCDriver::Rng, QMCDriver::Tau, CloneManager::traceClones, QMCDriver::Traces, RMC::TransProb, QMCDriver::W, CloneManager::wClones, and CloneManager::wPerRank.
Referenced by RMC::run().
|
inlineprivate |
check the run-time environments
Definition at line 63 of file RMC.h.
References RMC::beads, RMC::beta, RMC::nReptiles, and RMC::prestepsVMC.
Referenced by RMC::run().
|
overridevirtual |
Implements QMCDriverInterface.
Definition at line 68 of file RMC.cpp.
References qmcplusplus::app_log(), Communicate::bcast(), WalkerConfigurations::begin(), QMCDriver::branchEngine, RandomNumberControl::Children, ParticleSet::Collectables, QMCDriver::CurrentStep, CloneManager::estimatorClones, QMCDriver::Estimators, QMCDriver::finalize(), Communicate::getName(), QMCDriver::MaxCPUSecs, CloneManager::Movers, MPIObjectBase::myComm, RMC::myPeriod4WalkerDump, QMCDriver::nBlocks, QMCDriver::nSteps, CloneManager::NumThreads, omp_get_thread_num(), QMCDriver::Period4CheckProperties, QMCDriver::Period4WalkerDump, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, Communicate::rank(), QMCDriver::recordBlock(), RMC::resetRun(), RMC::resetVars(), QMCDriver::Rng, qmcplusplus::run_time_manager, PooledData< T >::size(), LoopTimer< CLOCK >::start(), EstimatorManagerBase::start(), LoopTimer< CLOCK >::stop(), EstimatorManagerBase::stop(), EstimatorManagerBase::stopBlock(), CloneManager::traceClones, QMCDriver::Traces, QMCDriver::W, CloneManager::wClones, and CloneManager::wPerRank.
|
private |
Definition at line 59 of file RMC.h.
Referenced by RMC::resetRun(), and RMC::RMC().
|
private |
number of beads on the reptile, beta/tau
Definition at line 50 of file RMC.h.
Referenced by RMC::resetRun(), RMC::resetVars(), and RMC::RMC().
|
private |
projection time of reptile
Definition at line 46 of file RMC.h.
Referenced by RMC::resetRun(), RMC::resetVars(), and RMC::RMC().
|
private |
Definition at line 57 of file RMC.h.
Referenced by RMC::resetRun().
|
private |
period for walker dump
Definition at line 48 of file RMC.h.
Referenced by RMC::resetRun(), and RMC::run().
|
private |
Definition at line 52 of file RMC.h.
Referenced by RMC::resetRun(), and RMC::resetVars().
|
private |
Definition at line 42 of file RMC.h.
Referenced by RMC::resetRun(), RMC::resetVars(), and RMC::RMC().
|
private |
option to enable/disable drift equation for RMC
Definition at line 44 of file RMC.h.
Referenced by RMC::RMC().
|
private |
rescale for time step studies. some int>2 and new beads are inserted in between the old ones.
Definition at line 54 of file RMC.h.
Referenced by RMC::RMC().
|
private |
Definition at line 60 of file RMC.h.
Referenced by RMC::resetRun(), and RMC::RMC().
class qmcplusplus::RMCUpdateAllWithDrift |
Implements the RMC algorithm using all electron moves
Definition at line 23 of file RMCUpdateAll.h.
Additional Inherited Members | |
![]() | |
int | nSubSteps |
number of steps per measurement More... | |
DriverDebugChecks | debug_checks_ = DriverDebugChecks::ALL_OFF |
determine additional checks for debugging purpose More... | |
std::string | debug_checks_str_ |
IndexType | MaxAge |
MaxAge>0 indicates branch is done. More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves rejected More... | |
IndexType | nAllRejected |
Total number of the steps when all the particle moves are rejected. More... | |
IndexType | nNodeCrossing |
Total number of node crossings per block. More... | |
IndexType | NonLocalMoveAccepted |
Total numer of non-local moves accepted. More... | |
RealType | Tau |
timestep More... | |
RealType | spinMass |
spin mass More... | |
bool | UseDrift |
use Drift More... | |
RealType | csoffset |
normalization offset for cs type runs. More... | |
TraceManager * | Traces |
traces More... | |
WalkerLogCollector * | wlog_collector |
![]() | |
RealType | getNodeCorrection (const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled) |
evaluate the ratio of scaled velocity and velocity More... | |
QMCUpdateBase (const QMCUpdateBase &)=delete | |
copy constructor (disabled) More... | |
![]() | |
static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
![]() | |
bool | UpdatePbyP |
update particle-by-particle More... | |
IndexType | NumPtcl |
number of particles More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
RealType | m_tauovermass |
tau/mass More... | |
RealType | m_r2max |
maximum displacement^2 More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
TrialWaveFunction & | Guide |
guide function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
RandomBase< FullPrecRealType > & | RandomGen |
random number generator More... | |
const BranchEngineType * | branchEngine |
branch engine, stateless reference to the one in QMCDriver More... | |
const DriftModifierBase * | DriftModifier |
drift modifer, stateless reference to the one in QMCDriver More... | |
EstimatorManagerBase * | Estimators |
estimator More... | |
ParameterSet | myParams |
parameters More... | |
std::vector< RealType > | MassInvS |
1/Mass per species More... | |
std::vector< RealType > | MassInvP |
1/Mass per particle More... | |
std::vector< RealType > | SqrtTauOverMass |
sqrt(tau/Mass) per particle More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
ParticleSet::ParticleScalar | deltaS |
temporart storage for spin displacement More... | |
ParticleSet::ParticleGradient | G |
storage for differential gradients for PbyP update More... | |
ParticleSet::ParticleGradient | dG |
ParticleSet::ParticleLaplacian | L |
storage for differential laplacians for PbyP update More... | |
ParticleSet::ParticleLaplacian | dL |
anonymous enum |
RMCUpdateAllWithDrift | ( | MCWalkerConfiguration & | w, |
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
RandomBase< FullPrecRealType > & | rg, | ||
std::vector< int > | act, | ||
std::vector< int > | tp | ||
) |
Constructor.
Definition at line 40 of file RMCUpdateAll.cpp.
References RMCUpdateAllWithDrift::actionType, RMCUpdateAllWithDrift::equilSteps, RMCUpdateAllWithDrift::equilToDoSteps, RMCUpdateAllWithDrift::scaleDrift, RMCUpdateAllWithDrift::SYM_ACTION, RMCUpdateAllWithDrift::vmcSteps, and RMCUpdateAllWithDrift::vmcToDoSteps.
|
override |
Definition at line 56 of file RMCUpdateAll.cpp.
|
privatedelete |
Copy Constructor (disabled)
void accumulate | ( | WalkerIter_t | it, |
WalkerIter_t | it_end | ||
) |
Definition at line 533 of file RMCUpdateAll.cpp.
References EstimatorManagerBase::accumulate(), RMCUpdateAllWithDrift::equilToDoSteps, QMCUpdateBase::Estimators, RMCUpdateAllWithDrift::vmcToDoSteps, and QMCUpdateBase::W.
|
overridevirtual |
|
overridevirtual |
advance walkers executed at each step
Derived classes implement how to move walkers and accept/reject moves.
Reimplemented from QMCUpdateBase.
Definition at line 294 of file RMCUpdateAll.cpp.
References RMCUpdateAllWithDrift::advanceWalkersRMC(), RMCUpdateAllWithDrift::advanceWalkersVMC(), RMCUpdateAllWithDrift::equilToDoSteps, and RMCUpdateAllWithDrift::vmcToDoSteps.
void advanceWalkersRMC | ( | ) |
Like DMC, this filters the local energy to ignore divergences near pathological points in phase space.
RealType eest = W.reptile->eest; RealType fbet = std::max(eest - curhead.Properties(LOCALENERGY), eest - eloc);
RealType rawcutoff=100*stdsqrt(W.reptile->evar); RealType cutoffmax = 1.5*rawcutoff; RealType cutoff=1; if (fbet > rawcutoff) cutoff = 1-(fbet - rawcutoff)/(rawcutoff*0.5); if( fbet > cutoffmax ) cutoff=0;
RealType tauscale = W.reptile->tauscale; W.Properties(W.reptile->Action[2])= 0.5*Tau*eloc*cutoff*tauscale;
RealType dS_old = +(curhead.Properties(LOGPSI) + lastbead.Properties(LOGPSI) - logpsi - nextlastbead.Properties(LOGPSI))
Definition at line 312 of file RMCUpdateAll.cpp.
References Reptile::Action, RMCUpdateAllWithDrift::actionType, Walker< t_traits, p_traits >::Age, qmcplusplus::app_log(), qmcplusplus::assignDrift(), QMCHamiltonian::auxHevaluate(), QMCUpdateBase::branchEngine, QMCUpdateBase::deltaR, Reptile::direction, SimpleFixedNodeBranch::DMCLinkAction(), qmcplusplus::Dot(), QMCUpdateBase::drift, RMCUpdateAllWithDrift::equilSteps, RMCUpdateAllWithDrift::equilToDoSteps, QMCHamiltonian::evaluate(), TrialWaveFunction::evaluateLog(), qmcplusplus::exp(), Reptile::flip(), ParticleSet::G, Reptile::getCenter(), Reptile::getHead(), Reptile::getNewHead(), Reptile::getNext(), TrialWaveFunction::getPhase(), TrialWaveFunction::getPhaseDiff(), ParticleSet::getPropertyBase(), Reptile::getTail(), Reptile::getTransProb(), QMCUpdateBase::H, ParticleSet::loadWalker(), QMCUpdateBase::m_oneover2tau, QMCUpdateBase::m_sqrttau, QMCUpdateBase::m_tauovermass, qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAllParticlesWithDrift(), QMCUpdateBase::MaxAge, omptarget::min(), QMCUpdateBase::nAccept, QMCUpdateBase::nReject, SimpleFixedNodeBranch::phaseChanged(), ParticleSet::Properties, Walker< t_traits, p_traits >::Properties, QMCUpdateBase::Psi, ParticleSet::R, Walker< t_traits, p_traits >::R, QMCUpdateBase::RandomGen, QMCHamiltonian::rejectedMove(), MCWalkerConfiguration::reptile, QMCHamiltonian::saveProperty(), Reptile::saveTransProb(), ParticleSet::saveWalker(), RMCUpdateAllWithDrift::scaleDrift, qmcplusplus::setScaledDrift(), RMCUpdateAllWithDrift::SYM_ACTION, SimpleFixedNodeBranch::symLinkAction(), Reptile::TransProb, ParticleSet::update(), and QMCUpdateBase::W.
Referenced by RMCUpdateAllWithDrift::advanceWalkers().
void advanceWalkersVMC | ( | ) |
Like DMC, this filters the local energy to ignore divergences near pathological points in phase space.
Definition at line 104 of file RMCUpdateAll.cpp.
References Reptile::Action, RMCUpdateAllWithDrift::Action, RMCUpdateAllWithDrift::actionType, qmcplusplus::assignDrift(), QMCHamiltonian::auxHevaluate(), QMCUpdateBase::branchEngine, QMCUpdateBase::deltaR, Reptile::direction, SimpleFixedNodeBranch::DMCLinkAction(), qmcplusplus::Dot(), QMCUpdateBase::drift, QMCHamiltonian::evaluate(), TrialWaveFunction::evaluateLog(), qmcplusplus::exp(), ParticleSet::G, Reptile::getHead(), Reptile::getNewHead(), Reptile::getNext(), TrialWaveFunction::getPhase(), TrialWaveFunction::getPhaseDiff(), ParticleSet::getPropertyBase(), Reptile::getTail(), Reptile::getTransProb(), QMCUpdateBase::H, ParticleSet::loadWalker(), QMCUpdateBase::m_oneover2tau, QMCUpdateBase::m_sqrttau, QMCUpdateBase::m_tauovermass, qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAllParticlesWithDrift(), QMCUpdateBase::nAccept, QMCUpdateBase::nReject, SimpleFixedNodeBranch::phaseChanged(), ParticleSet::Properties, Walker< t_traits, p_traits >::Properties, QMCUpdateBase::Psi, ParticleSet::R, Walker< t_traits, p_traits >::R, QMCUpdateBase::RandomGen, QMCHamiltonian::rejectedMove(), MCWalkerConfiguration::reptile, Reptile::saveAction(), QMCHamiltonian::saveProperty(), Reptile::saveTransProb(), ParticleSet::saveWalker(), RMCUpdateAllWithDrift::scaleDrift, qmcplusplus::setScaledDrift(), qmcplusplus::setScaledDriftPbyPandNodeCorr(), RMCUpdateAllWithDrift::SYM_ACTION, SimpleFixedNodeBranch::symLinkAction(), QMCUpdateBase::Tau, Reptile::TransProb, and QMCUpdateBase::W.
Referenced by RMCUpdateAllWithDrift::advanceWalkers(), and RMCUpdateAllWithDrift::initWalkers().
void checkReptile | ( | WalkerIter_t | it, |
WalkerIter_t | it_end | ||
) |
|
overridevirtual |
initialize Walker for walker update
Reimplemented from QMCUpdateBase.
Definition at line 267 of file RMCUpdateAll.cpp.
References RMCUpdateAllWithDrift::advanceWalkersVMC(), QMCHamiltonian::auxHevaluate(), QMCUpdateBase::drift, QMCHamiltonian::evaluate(), TrialWaveFunction::evaluateLog(), ParticleSet::G, TrialWaveFunction::getPhase(), QMCUpdateBase::H, ParticleSet::L, QMCUpdateBase::MassInvP, qmcplusplus::n, Reptile::nbeads, QMCUpdateBase::Psi, ParticleSet::R, MCWalkerConfiguration::reptile, QMCHamiltonian::saveProperty(), qmcplusplus::setScaledDriftPbyPandNodeCorr(), QMCUpdateBase::Tau, ParticleSet::update(), RMCUpdateAllWithDrift::vmcSteps, and QMCUpdateBase::W.
|
privatedelete |
Copy operator (disabled).
|
overridevirtual |
process options
Reimplemented from QMCUpdateBase.
Definition at line 58 of file RMCUpdateAll.cpp.
References RMCUpdateAllWithDrift::actionType, ParameterSet::add(), qmcplusplus::app_log(), RMCUpdateAllWithDrift::DMC_ACTION, RMCUpdateAllWithDrift::equilSteps, omp_get_thread_num(), ParameterSet::put(), QMCUpdateBase::put(), and RMCUpdateAllWithDrift::scaleDrift.
|
private |
Definition at line 58 of file RMCUpdateAll.h.
Referenced by RMCUpdateAllWithDrift::advanceWalkersVMC().
|
private |
Definition at line 61 of file RMCUpdateAll.h.
Referenced by RMCUpdateAllWithDrift::advanceWalkersRMC(), RMCUpdateAllWithDrift::advanceWalkersVMC(), RMCUpdateAllWithDrift::put(), and RMCUpdateAllWithDrift::RMCUpdateAllWithDrift().
|
private |
Definition at line 64 of file RMCUpdateAll.h.
Referenced by RMCUpdateAllWithDrift::advanceWalkersRMC(), RMCUpdateAllWithDrift::put(), and RMCUpdateAllWithDrift::RMCUpdateAllWithDrift().
|
private |
Definition at line 66 of file RMCUpdateAll.h.
Referenced by RMCUpdateAllWithDrift::accumulate(), RMCUpdateAllWithDrift::advanceWalkers(), RMCUpdateAllWithDrift::advanceWalkersRMC(), and RMCUpdateAllWithDrift::RMCUpdateAllWithDrift().
|
private |
Definition at line 60 of file RMCUpdateAll.h.
Referenced by RMCUpdateAllWithDrift::advanceWalkersRMC(), RMCUpdateAllWithDrift::advanceWalkersVMC(), RMCUpdateAllWithDrift::put(), and RMCUpdateAllWithDrift::RMCUpdateAllWithDrift().
|
private |
Definition at line 58 of file RMCUpdateAll.h.
|
private |
Definition at line 63 of file RMCUpdateAll.h.
Referenced by RMCUpdateAllWithDrift::initWalkers(), and RMCUpdateAllWithDrift::RMCUpdateAllWithDrift().
|
private |
Definition at line 65 of file RMCUpdateAll.h.
Referenced by RMCUpdateAllWithDrift::accumulate(), RMCUpdateAllWithDrift::advanceWalkers(), and RMCUpdateAllWithDrift::RMCUpdateAllWithDrift().
class qmcplusplus::RMCUpdatePbyPWithDrift |
Implements the RMC algorithm using all electron moves
Definition at line 24 of file RMCUpdatePbyP.h.
Additional Inherited Members | |
![]() | |
int | nSubSteps |
number of steps per measurement More... | |
DriverDebugChecks | debug_checks_ = DriverDebugChecks::ALL_OFF |
determine additional checks for debugging purpose More... | |
std::string | debug_checks_str_ |
IndexType | MaxAge |
MaxAge>0 indicates branch is done. More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves rejected More... | |
IndexType | nAllRejected |
Total number of the steps when all the particle moves are rejected. More... | |
IndexType | nNodeCrossing |
Total number of node crossings per block. More... | |
IndexType | NonLocalMoveAccepted |
Total numer of non-local moves accepted. More... | |
RealType | Tau |
timestep More... | |
RealType | spinMass |
spin mass More... | |
bool | UseDrift |
use Drift More... | |
RealType | csoffset |
normalization offset for cs type runs. More... | |
TraceManager * | Traces |
traces More... | |
WalkerLogCollector * | wlog_collector |
![]() | |
RealType | getNodeCorrection (const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled) |
evaluate the ratio of scaled velocity and velocity More... | |
QMCUpdateBase (const QMCUpdateBase &)=delete | |
copy constructor (disabled) More... | |
![]() | |
static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
![]() | |
bool | UpdatePbyP |
update particle-by-particle More... | |
IndexType | NumPtcl |
number of particles More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
RealType | m_tauovermass |
tau/mass More... | |
RealType | m_r2max |
maximum displacement^2 More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
TrialWaveFunction & | Guide |
guide function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
RandomBase< FullPrecRealType > & | RandomGen |
random number generator More... | |
const BranchEngineType * | branchEngine |
branch engine, stateless reference to the one in QMCDriver More... | |
const DriftModifierBase * | DriftModifier |
drift modifer, stateless reference to the one in QMCDriver More... | |
EstimatorManagerBase * | Estimators |
estimator More... | |
ParameterSet | myParams |
parameters More... | |
std::vector< RealType > | MassInvS |
1/Mass per species More... | |
std::vector< RealType > | MassInvP |
1/Mass per particle More... | |
std::vector< RealType > | SqrtTauOverMass |
sqrt(tau/Mass) per particle More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
ParticleSet::ParticleScalar | deltaS |
temporart storage for spin displacement More... | |
ParticleSet::ParticleGradient | G |
storage for differential gradients for PbyP update More... | |
ParticleSet::ParticleGradient | dG |
ParticleSet::ParticleLaplacian | L |
storage for differential laplacians for PbyP update More... | |
ParticleSet::ParticleLaplacian | dL |
anonymous enum |
RMCUpdatePbyPWithDrift | ( | MCWalkerConfiguration & | w, |
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
RandomBase< FullPrecRealType > & | rg, | ||
std::vector< int > | act, | ||
std::vector< int > | tp | ||
) |
Constructor.
Definition at line 40 of file RMCUpdatePbyP.cpp.
References RMCUpdatePbyPWithDrift::actionType, RMCUpdatePbyPWithDrift::scaleDrift, and RMCUpdatePbyPWithDrift::SYM_ACTION.
|
override |
Definition at line 58 of file RMCUpdatePbyP.cpp.
|
privatedelete |
Copy Constructor (disabled)
void accumulate | ( | WalkerIter_t | it, |
WalkerIter_t | it_end | ||
) |
Definition at line 382 of file RMCUpdatePbyP.cpp.
References EstimatorManagerBase::accumulate(), QMCUpdateBase::Estimators, and QMCUpdateBase::W.
|
overridevirtual |
|
overridevirtual |
advance walkers executed at each step
Derived classes implement how to move walkers and accept/reject moves.
Reimplemented from QMCUpdateBase.
Definition at line 374 of file RMCUpdatePbyP.cpp.
References RMCUpdatePbyPWithDrift::advanceWalkersRMC(), and RMCUpdatePbyPWithDrift::advanceWalkersVMC().
void advanceWalkersRMC | ( | ) |
Definition at line 250 of file RMCUpdatePbyP.cpp.
References ParticleSet::accept_rejectMove(), TrialWaveFunction::acceptMove(), Walker< t_traits, p_traits >::Age, qmcplusplus::app_log(), QMCHamiltonian::auxHevaluate(), QMCUpdateBase::branchEngine, TrialWaveFunction::calcRatioGrad(), TrialWaveFunction::completeUpdates(), TrialWaveFunction::copyFromBuffer(), Walker< t_traits, p_traits >::DataSet, QMCUpdateBase::deltaR, SimpleFixedNodeBranch::DMCLinkAction(), ParticleSet::donePbyP(), qmcplusplus::dot(), QMCUpdateBase::DriftModifier, TrialWaveFunction::evalGrad(), QMCHamiltonian::evaluate(), qmcplusplus::exp(), ParticleSet::first(), Reptile::flip(), ParticleSet::getActivePos(), Reptile::getCenter(), DriftModifierBase::getDrift(), Reptile::getHead(), Reptile::getNewHead(), Reptile::getNext(), TrialWaveFunction::getPhaseDiff(), Walker< t_traits, p_traits >::getPropertyBase(), Reptile::getTail(), ParticleSet::groups(), QMCUpdateBase::H, ParticleSet::last(), ParticleSet::loadWalker(), QMCUpdateBase::m_r2max, qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAndCheck(), QMCUpdateBase::MassInvS, QMCUpdateBase::MaxAge, omptarget::min(), RMCUpdatePbyPWithDrift::movepbyp_timer_, QMCUpdateBase::nAccept, QMCUpdateBase::nNodeCrossing, norm(), QMCUpdateBase::nReject, SimpleFixedNodeBranch::phaseChanged(), Walker< t_traits, p_traits >::Properties, QMCUpdateBase::Psi, ParticleSet::R, Walker< t_traits, p_traits >::R, QMCUpdateBase::RandomGen, QMCHamiltonian::rejectedMove(), TrialWaveFunction::rejectMove(), MCWalkerConfiguration::reptile, QMCHamiltonian::saveProperty(), ParticleSet::saveWalker(), qmcplusplus::sqrt(), TimerType< CLOCK >::start(), TimerType< CLOCK >::stop(), QMCUpdateBase::Tau, ParticleSet::update(), TrialWaveFunction::updateBuffer(), and QMCUpdateBase::W.
Referenced by RMCUpdatePbyPWithDrift::advanceWalkers().
void advanceWalkersVMC | ( | ) |
Definition at line 124 of file RMCUpdatePbyP.cpp.
References ParticleSet::accept_rejectMove(), TrialWaveFunction::acceptMove(), RMCUpdatePbyPWithDrift::advance_timer_, Walker< t_traits, p_traits >::Age, QMCHamiltonian::auxHevaluate(), QMCUpdateBase::branchEngine, TrialWaveFunction::calcRatioGrad(), TrialWaveFunction::completeUpdates(), TrialWaveFunction::copyFromBuffer(), Walker< t_traits, p_traits >::DataSet, QMCUpdateBase::deltaR, ParticleSet::donePbyP(), qmcplusplus::dot(), QMCUpdateBase::DriftModifier, RMCUpdatePbyPWithDrift::energy_timer_, TrialWaveFunction::evalGrad(), QMCHamiltonian::evaluate(), qmcplusplus::exp(), ParticleSet::first(), ParticleSet::getActivePos(), Reptile::getCenter(), DriftModifierBase::getDrift(), Reptile::getHead(), Reptile::getNewHead(), TrialWaveFunction::getPhase(), TrialWaveFunction::getPhaseDiff(), Walker< t_traits, p_traits >::getPropertyBase(), ParticleSet::groups(), QMCUpdateBase::H, ParticleSet::last(), ParticleSet::loadWalker(), QMCUpdateBase::m_r2max, qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAndCheck(), QMCUpdateBase::MassInvS, RMCUpdatePbyPWithDrift::movepbyp_timer_, QMCUpdateBase::nAccept, QMCUpdateBase::nAllRejected, QMCUpdateBase::nNodeCrossing, norm(), QMCUpdateBase::nReject, SimpleFixedNodeBranch::phaseChanged(), Walker< t_traits, p_traits >::Properties, QMCUpdateBase::Psi, ParticleSet::R, Walker< t_traits, p_traits >::R, QMCUpdateBase::RandomGen, QMCHamiltonian::rejectedMove(), TrialWaveFunction::rejectMove(), MCWalkerConfiguration::reptile, Walker< t_traits, p_traits >::resetProperty(), QMCHamiltonian::saveProperty(), ParticleSet::saveWalker(), qmcplusplus::sqrt(), TimerType< CLOCK >::start(), TimerType< CLOCK >::stop(), QMCUpdateBase::Tau, ParticleSet::update(), RMCUpdatePbyPWithDrift::update_mbo_timer_, TrialWaveFunction::updateBuffer(), QMCUpdateBase::W, and Walker< t_traits, p_traits >::Weight.
Referenced by RMCUpdatePbyPWithDrift::advanceWalkers(), and RMCUpdatePbyPWithDrift::initWalkers().
|
overridevirtual |
initialize Walker for walker update
Reimplemented from QMCUpdateBase.
Definition at line 240 of file RMCUpdatePbyP.cpp.
References RMCUpdatePbyPWithDrift::advanceWalkersVMC(), qmcplusplus::n, Reptile::nbeads, MCWalkerConfiguration::reptile, RMCUpdatePbyPWithDrift::vmcSteps, and QMCUpdateBase::W.
|
overridevirtual |
initialize Walker buffers for PbyP update
Reimplemented from QMCUpdateBase.
Definition at line 61 of file RMCUpdatePbyP.cpp.
References PooledMemory< T_scalar, Alloc >::allocate(), PooledMemory< T_scalar, Alloc >::clear(), TrialWaveFunction::copyFromBuffer(), Walker< t_traits, p_traits >::DataSet, ParticleSet::donePbyP(), QMCHamiltonian::evaluate(), TrialWaveFunction::evaluateLog(), ParticleSet::G, TrialWaveFunction::getPhase(), QMCUpdateBase::H, ParticleSet::L, Walker< t_traits, p_traits >::L, QMCUpdateBase::Psi, ParticleSet::R, Walker< t_traits, p_traits >::R, TrialWaveFunction::registerData(), Walker< t_traits, p_traits >::resetProperty(), PooledMemory< T_scalar, Alloc >::rewind(), PooledMemory< T_scalar, Alloc >::size(), ParticleSet::update(), TrialWaveFunction::updateBuffer(), QMCUpdateBase::UpdatePbyP, and QMCUpdateBase::W.
|
privatedelete |
Copy operator (disabled).
|
overridevirtual |
process options
Reimplemented from QMCUpdateBase.
Definition at line 86 of file RMCUpdatePbyP.cpp.
References RMCUpdatePbyPWithDrift::actionType, ParameterSet::add(), qmcplusplus::app_log(), RMCUpdatePbyPWithDrift::DMC_ACTION, RMCUpdatePbyPWithDrift::equilSteps, omp_get_thread_num(), ParameterSet::put(), and QMCUpdateBase::put().
|
private |
Definition at line 58 of file RMCUpdatePbyP.h.
|
private |
Definition at line 60 of file RMCUpdatePbyP.h.
Referenced by RMCUpdatePbyPWithDrift::put(), and RMCUpdatePbyPWithDrift::RMCUpdatePbyPWithDrift().
|
private |
Definition at line 62 of file RMCUpdatePbyP.h.
Referenced by RMCUpdatePbyPWithDrift::advanceWalkersVMC().
|
private |
Definition at line 65 of file RMCUpdatePbyP.h.
Referenced by RMCUpdatePbyPWithDrift::advanceWalkersVMC().
|
private |
Definition at line 68 of file RMCUpdatePbyP.h.
Referenced by RMCUpdatePbyPWithDrift::put().
|
private |
Definition at line 70 of file RMCUpdatePbyP.h.
|
private |
Definition at line 63 of file RMCUpdatePbyP.h.
Referenced by RMCUpdatePbyPWithDrift::advanceWalkersRMC(), and RMCUpdatePbyPWithDrift::advanceWalkersVMC().
|
private |
Definition at line 59 of file RMCUpdatePbyP.h.
Referenced by RMCUpdatePbyPWithDrift::RMCUpdatePbyPWithDrift().
|
private |
Definition at line 58 of file RMCUpdatePbyP.h.
|
private |
Definition at line 64 of file RMCUpdatePbyP.h.
Referenced by RMCUpdatePbyPWithDrift::advanceWalkersVMC().
|
private |
Definition at line 67 of file RMCUpdatePbyP.h.
Referenced by RMCUpdatePbyPWithDrift::initWalkers().
|
private |
Definition at line 69 of file RMCUpdatePbyP.h.
class qmcplusplus::SOVMCUpdateAll |
Implements the Spin VMC algorithm using particle-by-particle move.
Definition at line 19 of file SOVMCUpdateAll.h.
Public Member Functions | |
SOVMCUpdateAll (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
~SOVMCUpdateAll () override | |
void | advanceWalker (Walker_t &thisWalker, bool recompute) override |
move a walker More... | |
![]() | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, TrialWaveFunction &guide, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Alt Constructor. More... | |
virtual | ~QMCUpdateBase () |
destructor More... | |
RealType | acceptRatio () const |
void | resetRun (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, const DriftModifierBase *driftmodifer) |
reset the QMCUpdateBase parameters More... | |
void | resetRun2 (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, WalkerLogCollector *wlog_collector_, const DriftModifierBase *driftmodifer) |
RealType | getTau () |
void | setTau (RealType t) |
RealType | getSpinMass () |
void | setSpinMass (RealType m) |
void | getLogs (std::vector< RealType > &logs) |
void | set_step (int step) |
void | startRun (int blocks, bool record) |
start a run More... | |
void | stopRun () |
stop a run More... | |
void | stopRun2 () |
void | startBlock (int steps) |
prepare to start a block More... | |
void | stopBlock (bool collectall=true) |
stop a block More... | |
void | setMultiplicity (WalkerIter_t it, WalkerIter_t it_end) |
set the multiplicity of the walkers to branch More... | |
void | setMultiplicity (Walker_t &awalker) const |
virtual void | initWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker buffers for PbyP update More... | |
virtual void | initWalkers (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker for walker update More... | |
virtual bool | put (xmlNodePtr cur) |
process options More... | |
void | accumulate (WalkerIter_t it, WalkerIter_t it_end) |
virtual void | advanceWalkers (WalkerIter_t it, WalkerIter_t it_end, bool recompute) |
advance walkers executed at each step More... | |
virtual RealType | advanceWalkerForEE (Walker_t &w1, std::vector< PosType > &dR, std::vector< int > &iats, std::vector< int > &rs, std::vector< RealType > &ratios) |
int | RMC_checkIndex (int N, int NMax) |
void | RMC_checkWalkerBounds (WalkerIter_t &it, WalkerIter_t first, WalkerIter_t last) |
RealType | logBackwardGF (const ParticleSet::ParticlePos &displ) |
Private Member Functions | |
SOVMCUpdateAll (const SOVMCUpdateAll &)=delete | |
Copy Constructor (disabled) More... | |
SOVMCUpdateAll & | operator= (const SOVMCUpdateAll &)=delete |
Copy operator (disabled). More... | |
Additional Inherited Members | |
![]() | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | WalkerIter_t = MCWalkerConfiguration::iterator |
using | BranchEngineType = SimpleFixedNodeBranch |
using | mPosType = PosType |
using | mTensorType = TensorType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
int | nSubSteps |
number of steps per measurement More... | |
DriverDebugChecks | debug_checks_ = DriverDebugChecks::ALL_OFF |
determine additional checks for debugging purpose More... | |
std::string | debug_checks_str_ |
IndexType | MaxAge |
MaxAge>0 indicates branch is done. More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves rejected More... | |
IndexType | nAllRejected |
Total number of the steps when all the particle moves are rejected. More... | |
IndexType | nNodeCrossing |
Total number of node crossings per block. More... | |
IndexType | NonLocalMoveAccepted |
Total numer of non-local moves accepted. More... | |
RealType | Tau |
timestep More... | |
RealType | spinMass |
spin mass More... | |
bool | UseDrift |
use Drift More... | |
RealType | csoffset |
normalization offset for cs type runs. More... | |
TraceManager * | Traces |
traces More... | |
WalkerLogCollector * | wlog_collector |
![]() | |
RealType | getNodeCorrection (const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled) |
evaluate the ratio of scaled velocity and velocity More... | |
QMCUpdateBase (const QMCUpdateBase &)=delete | |
copy constructor (disabled) More... | |
![]() | |
static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
![]() | |
bool | UpdatePbyP |
update particle-by-particle More... | |
IndexType | NumPtcl |
number of particles More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
RealType | m_tauovermass |
tau/mass More... | |
RealType | m_r2max |
maximum displacement^2 More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
TrialWaveFunction & | Guide |
guide function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
RandomBase< FullPrecRealType > & | RandomGen |
random number generator More... | |
const BranchEngineType * | branchEngine |
branch engine, stateless reference to the one in QMCDriver More... | |
const DriftModifierBase * | DriftModifier |
drift modifer, stateless reference to the one in QMCDriver More... | |
EstimatorManagerBase * | Estimators |
estimator More... | |
ParameterSet | myParams |
parameters More... | |
std::vector< RealType > | MassInvS |
1/Mass per species More... | |
std::vector< RealType > | MassInvP |
1/Mass per particle More... | |
std::vector< RealType > | SqrtTauOverMass |
sqrt(tau/Mass) per particle More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
ParticleSet::ParticleScalar | deltaS |
temporart storage for spin displacement More... | |
ParticleSet::ParticleGradient | G |
storage for differential gradients for PbyP update More... | |
ParticleSet::ParticleGradient | dG |
ParticleSet::ParticleLaplacian | L |
storage for differential laplacians for PbyP update More... | |
ParticleSet::ParticleLaplacian | dL |
SOVMCUpdateAll | ( | MCWalkerConfiguration & | w, |
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
RandomBase< FullPrecRealType > & | rg | ||
) |
Constructor.
Definition at line 24 of file SOVMCUpdateAll.cpp.
References QMCUpdateBase::UpdatePbyP.
|
override |
Definition at line 33 of file SOVMCUpdateAll.cpp.
|
privatedelete |
Copy Constructor (disabled)
|
overridevirtual |
move a walker
Implements QMCUpdateBase.
Definition at line 35 of file SOVMCUpdateAll.cpp.
References Walker< t_traits, p_traits >::Age, APP_ABORT, QMCHamiltonian::auxHevaluate(), QMCUpdateBase::deltaR, QMCUpdateBase::deltaS, QMCHamiltonian::evaluate(), TrialWaveFunction::evaluateLog(), qmcplusplus::exp(), TrialWaveFunction::getPhase(), Walker< t_traits, p_traits >::getPropertyBase(), QMCUpdateBase::H, ParticleSet::loadWalker(), qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAllParticles(), QMCUpdateBase::nAccept, QMCUpdateBase::nReject, QMCUpdateBase::nSubSteps, Walker< t_traits, p_traits >::Properties, QMCUpdateBase::Psi, ParticleSet::R, Walker< t_traits, p_traits >::R, QMCUpdateBase::RandomGen, Walker< t_traits, p_traits >::resetProperty(), QMCHamiltonian::saveProperty(), ParticleSet::saveWalker(), QMCUpdateBase::spinMass, ParticleSet::spins, Walker< t_traits, p_traits >::spins, qmcplusplus::sqrt(), QMCUpdateBase::SqrtTauOverMass, ParticleSet::update(), QMCUpdateBase::UseDrift, and QMCUpdateBase::W.
|
privatedelete |
Copy operator (disabled).
class qmcplusplus::SOVMCUpdatePbyP |
Implements the VMC algorithm using particle-by-particle move, including spin-moves
Definition at line 22 of file SOVMCUpdatePbyP.h.
Public Member Functions | |
SOVMCUpdatePbyP (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
~SOVMCUpdatePbyP () override | |
void | advanceWalker (Walker_t &thisWalker, bool recompute) override |
move a walker More... | |
![]() | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, TrialWaveFunction &guide, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Alt Constructor. More... | |
virtual | ~QMCUpdateBase () |
destructor More... | |
RealType | acceptRatio () const |
void | resetRun (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, const DriftModifierBase *driftmodifer) |
reset the QMCUpdateBase parameters More... | |
void | resetRun2 (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, WalkerLogCollector *wlog_collector_, const DriftModifierBase *driftmodifer) |
RealType | getTau () |
void | setTau (RealType t) |
RealType | getSpinMass () |
void | setSpinMass (RealType m) |
void | getLogs (std::vector< RealType > &logs) |
void | set_step (int step) |
void | startRun (int blocks, bool record) |
start a run More... | |
void | stopRun () |
stop a run More... | |
void | stopRun2 () |
void | startBlock (int steps) |
prepare to start a block More... | |
void | stopBlock (bool collectall=true) |
stop a block More... | |
void | setMultiplicity (WalkerIter_t it, WalkerIter_t it_end) |
set the multiplicity of the walkers to branch More... | |
void | setMultiplicity (Walker_t &awalker) const |
virtual void | initWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker buffers for PbyP update More... | |
virtual void | initWalkers (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker for walker update More... | |
virtual bool | put (xmlNodePtr cur) |
process options More... | |
void | accumulate (WalkerIter_t it, WalkerIter_t it_end) |
virtual void | advanceWalkers (WalkerIter_t it, WalkerIter_t it_end, bool recompute) |
advance walkers executed at each step More... | |
virtual RealType | advanceWalkerForEE (Walker_t &w1, std::vector< PosType > &dR, std::vector< int > &iats, std::vector< int > &rs, std::vector< RealType > &ratios) |
int | RMC_checkIndex (int N, int NMax) |
void | RMC_checkWalkerBounds (WalkerIter_t &it, WalkerIter_t first, WalkerIter_t last) |
RealType | logBackwardGF (const ParticleSet::ParticlePos &displ) |
Private Attributes | |
NewTimer & | buffer_timer_ |
NewTimer & | movepbyp_timer_ |
NewTimer & | hamiltonian_timer_ |
NewTimer & | collectables_timer_ |
Additional Inherited Members | |
![]() | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | WalkerIter_t = MCWalkerConfiguration::iterator |
using | BranchEngineType = SimpleFixedNodeBranch |
using | mPosType = PosType |
using | mTensorType = TensorType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
int | nSubSteps |
number of steps per measurement More... | |
DriverDebugChecks | debug_checks_ = DriverDebugChecks::ALL_OFF |
determine additional checks for debugging purpose More... | |
std::string | debug_checks_str_ |
IndexType | MaxAge |
MaxAge>0 indicates branch is done. More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves rejected More... | |
IndexType | nAllRejected |
Total number of the steps when all the particle moves are rejected. More... | |
IndexType | nNodeCrossing |
Total number of node crossings per block. More... | |
IndexType | NonLocalMoveAccepted |
Total numer of non-local moves accepted. More... | |
RealType | Tau |
timestep More... | |
RealType | spinMass |
spin mass More... | |
bool | UseDrift |
use Drift More... | |
RealType | csoffset |
normalization offset for cs type runs. More... | |
TraceManager * | Traces |
traces More... | |
WalkerLogCollector * | wlog_collector |
![]() | |
RealType | getNodeCorrection (const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled) |
evaluate the ratio of scaled velocity and velocity More... | |
QMCUpdateBase (const QMCUpdateBase &)=delete | |
copy constructor (disabled) More... | |
![]() | |
static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
![]() | |
bool | UpdatePbyP |
update particle-by-particle More... | |
IndexType | NumPtcl |
number of particles More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
RealType | m_tauovermass |
tau/mass More... | |
RealType | m_r2max |
maximum displacement^2 More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
TrialWaveFunction & | Guide |
guide function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
RandomBase< FullPrecRealType > & | RandomGen |
random number generator More... | |
const BranchEngineType * | branchEngine |
branch engine, stateless reference to the one in QMCDriver More... | |
const DriftModifierBase * | DriftModifier |
drift modifer, stateless reference to the one in QMCDriver More... | |
EstimatorManagerBase * | Estimators |
estimator More... | |
ParameterSet | myParams |
parameters More... | |
std::vector< RealType > | MassInvS |
1/Mass per species More... | |
std::vector< RealType > | MassInvP |
1/Mass per particle More... | |
std::vector< RealType > | SqrtTauOverMass |
sqrt(tau/Mass) per particle More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
ParticleSet::ParticleScalar | deltaS |
temporart storage for spin displacement More... | |
ParticleSet::ParticleGradient | G |
storage for differential gradients for PbyP update More... | |
ParticleSet::ParticleGradient | dG |
ParticleSet::ParticleLaplacian | L |
storage for differential laplacians for PbyP update More... | |
ParticleSet::ParticleLaplacian | dL |
SOVMCUpdatePbyP | ( | MCWalkerConfiguration & | w, |
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
RandomBase< FullPrecRealType > & | rg | ||
) |
Constructor.
Definition at line 26 of file SOVMCUpdatePbyP.cpp.
|
override |
Definition at line 37 of file SOVMCUpdatePbyP.cpp.
|
overridevirtual |
move a walker
Implements QMCUpdateBase.
Definition at line 39 of file SOVMCUpdatePbyP.cpp.
References ParticleSet::accept_rejectMove(), TrialWaveFunction::acceptMove(), QMCHamiltonian::auxHevaluate(), TraceManager::buffer_sample(), SOVMCUpdatePbyP::buffer_timer_, TrialWaveFunction::calcRatio(), TrialWaveFunction::calcRatioGradWithSpin(), qmcplusplus::CHECKGL_AFTER_MOVES, QMCUpdateBase::checkLogAndGL(), SOVMCUpdatePbyP::collectables_timer_, TrialWaveFunction::completeUpdates(), TrialWaveFunction::copyFromBuffer(), ParticleSet::current_step, Walker< t_traits, p_traits >::DataSet, QMCUpdateBase::debug_checks_, QMCUpdateBase::deltaR, QMCUpdateBase::deltaS, ParticleSet::donePbyP(), qmcplusplus::dot(), QMCUpdateBase::DriftModifier, TrialWaveFunction::evalGradWithSpin(), QMCHamiltonian::evaluate(), qmcplusplus::exp(), ParticleSet::first(), ParticleSet::getActivePos(), ParticleSet::getActiveSpinVal(), DriftModifierBase::getDrift(), TrialWaveFunction::getPhase(), Walker< t_traits, p_traits >::getPropertyBase(), ParticleSet::groups(), QMCUpdateBase::H, SOVMCUpdatePbyP::hamiltonian_timer_, ParticleSet::last(), ParticleSet::loadWalker(), qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAndCheckWithSpin(), QMCUpdateBase::MassInvS, SOVMCUpdatePbyP::movepbyp_timer_, QMCUpdateBase::nAccept, QMCUpdateBase::nAllRejected, norm(), QMCUpdateBase::nReject, QMCUpdateBase::nSubSteps, TrialWaveFunction::prepareGroup(), QMCUpdateBase::Psi, ParticleSet::R, QMCUpdateBase::RandomGen, TrialWaveFunction::rejectMove(), Walker< t_traits, p_traits >::resetProperty(), QMCHamiltonian::saveProperty(), ParticleSet::saveWalker(), QMCUpdateBase::spinMass, ParticleSet::spins, qmcplusplus::sqrt(), TimerType< CLOCK >::start(), TimerType< CLOCK >::stop(), QMCUpdateBase::Tau, QMCUpdateBase::Traces, TrialWaveFunction::updateBuffer(), QMCUpdateBase::UseDrift, and QMCUpdateBase::W.
|
private |
Definition at line 36 of file SOVMCUpdatePbyP.h.
Referenced by SOVMCUpdatePbyP::advanceWalker().
|
private |
Definition at line 39 of file SOVMCUpdatePbyP.h.
Referenced by SOVMCUpdatePbyP::advanceWalker().
|
private |
Definition at line 38 of file SOVMCUpdatePbyP.h.
Referenced by SOVMCUpdatePbyP::advanceWalker().
|
private |
Definition at line 37 of file SOVMCUpdatePbyP.h.
Referenced by SOVMCUpdatePbyP::advanceWalker().
class qmcplusplus::VMC |
Implements a VMC using particle-by-particle move.
Threaded execution.
Public Member Functions | |
VMC (const ProjectData &project_data_, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, UPtrVector< RandomBase< QMCTraits::FullPrecRealType >> &rngs, Communicate *comm, bool enable_profiling) | |
Constructor. More... | |
bool | run () override |
bool | put (xmlNodePtr cur) override |
QMCRunType | getRunType () override |
![]() | |
QMCDriver (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm, const std::string &QMC_driver_type, bool enable_profiling=false) | |
Constructor. More... | |
~QMCDriver () override | |
int | current () const |
return current step More... | |
void | setUpdateMode (bool pbyp) override |
set the update mode More... | |
void | setStatus (const std::string &aname, const std::string &h5name, bool append) override |
Set the status of the QMCDriver. More... | |
void | add_H_and_Psi (QMCHamiltonian *h, TrialWaveFunction *psi) override |
add QMCHamiltonian/TrialWaveFunction pair for multiple More... | |
void | process (xmlNodePtr cur) override |
initialize with xmlNode More... | |
xmlNodePtr | getQMCNode () |
return a xmlnode with update More... | |
void | putWalkers (std::vector< xmlNodePtr > &wset) override |
Read walker configurations from *.config.h5 files. More... | |
void | putTraces (xmlNodePtr txml) override |
void | requestTraces (bool traces) override |
void | putWalkerLogs (xmlNodePtr wlxml) override |
void | requestWalkerLogs (bool allow_walker_logs_) override |
std::string | getEngineName () override |
template<class PDT > | |
void | setValue (const std::string &aname, PDT x) |
void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) override |
set the BranchEngineType More... | |
std::unique_ptr< BranchEngineType > | getBranchEngine () override |
return BranchEngineType* More... | |
int | addObservable (const std::string &aname) |
RealType | getObservable (int i) |
void | setTau (RealType i) |
void | setWalkerOffsets () |
set global offsets of the walkers More... | |
RefVector< RandomBase< FullPrecRealType > > | getRngRefs () const |
return the random generators More... | |
RandomBase< FullPrecRealType > & | getRng (int i) override |
return the i-th random generator More... | |
unsigned long | getDriverMode () override |
![]() | |
virtual | ~QMCDriverInterface () |
virtual void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
![]() | |
CloneManager () | |
Constructor. More... | |
virtual | ~CloneManager () |
virtual destructor More... | |
void | makeClones (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &ham) |
void | makeClones (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &ham) |
void | makeClones (MCWalkerConfiguration &wg, TrialWaveFunction &guide) |
void | makeClones (TrialWaveFunction &guide) |
RealType | acceptRatio () const |
Private Member Functions | |
void | resetRun () |
check the run-time environments More... | |
VMC (const VMC &)=delete | |
copy constructor More... | |
VMC & | operator= (const VMC &)=delete |
Copy operator (disabled). More... | |
Private Attributes | |
int | prevSteps |
int | prevStepsBetweenSamples |
std::string | UseDrift |
option to enable/disable drift equation or RN for VMC More... | |
UPtrVector< RandomBase< QMCTraits::FullPrecRealType > > & | rngs_ |
Additional Inherited Members | |
![]() | |
enum | { QMC_UPDATE_MODE, QMC_MULTIPLE, QMC_OPTIMIZE, QMC_WARMUP } |
enumeration coupled with QMCMode More... | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | Buffer_t = Walker_t::Buffer_t |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | BranchEngineType = SimpleFixedNodeBranch |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
![]() | |
static void | clearClones () |
![]() | |
std::bitset< QMC_MODE_MAX > | qmc_driver_mode |
bits to classify QMCDriver More... | |
bool | allow_traces |
whether to allow traces More... | |
xmlNodePtr | traces_xml |
traces xml More... | |
bool | allow_walker_logs |
whether to allow traces More... | |
xmlNodePtr | walker_logs_xml |
traces xml More... | |
EstimatorManagerBase * | Estimators |
Observables manager. More... | |
std::unique_ptr< TraceManager > | Traces |
Traces manager. More... | |
std::unique_ptr< WalkerLogManager > | wlog_manager_ |
Traces manager. More... | |
![]() | |
bool | putQMCInfo (xmlNodePtr cur) |
Parses the xml input file for parameter definitions for a single qmc simulation. More... | |
void | addWalkers (int nwalkers) |
Add walkers to the end of the ensemble of walkers. More... | |
void | recordBlock (int block) override |
record the state of the block More... | |
bool | finalize (int block, bool dumpwalkers=true) |
finalize a qmc section More... | |
std::string | getRotationName (std::string RootName) |
std::string | getLastRotationName (std::string RootName) |
const std::string & | get_root_name () const override |
![]() | |
RefVector< WalkerLogCollector > | getWalkerLogCollectorRefs () |
![]() | |
const ProjectData & | project_data_ |
top-level project data information More... | |
std::unique_ptr< BranchEngineType > | branchEngine |
branch engine More... | |
DriftModifierBase * | DriftModifier |
drift modifer More... | |
bool | ResetRandom |
randomize it More... | |
bool | AppendRun |
flag to append or restart the run More... | |
bool | DumpConfig |
flag to turn off dumping configurations More... | |
bool | IsQMCDriver |
true, if it is a real QMC engine More... | |
int | MyCounter |
the number of times this QMCDriver is executed More... | |
int | kDelay |
the number to delay updates by More... | |
int | Period4CheckPoint |
period of dumping walker configurations and everything else for restart More... | |
int | Period4CheckProperties |
period of dumping walker positions and IDs for Forward Walking More... | |
int | Period4WalkerDump |
period of recording walker configurations More... | |
int | Period4ConfigDump |
period of recording walker positions and IDs for forward walking afterwards More... | |
IndexType | CurrentStep |
current step More... | |
IndexType | nBlocks |
maximum number of blocks More... | |
IndexType | nSteps |
maximum number of steps More... | |
IndexType | nSubSteps |
number of steps between a step: VMCs do not evaluate energies More... | |
IndexType | nWarmupSteps |
number of warmup steps More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves /rejected More... | |
IndexType | nBlocksBetweenRecompute |
the number of blocks between recomptePsi More... | |
IndexType | nTargetWalkers |
the number of walkers More... | |
IndexType | nTargetSamples |
the number of saved samples More... | |
IndexType | nStepsBetweenSamples |
alternate method of setting QMC run parameters More... | |
RealType | nSamplesPerThread |
samples per thread More... | |
RealType | nTargetPopulation |
target population More... | |
RealType | Tau |
timestep More... | |
int | MaxCPUSecs |
maximum cpu in secs More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
xmlNodePtr | qmcNode |
pointer to qmc node in xml file More... | |
const std::string | QMCType |
type of QMC driver More... | |
std::string | h5FileRoot |
the root of h5File More... | |
std::string | RootName |
root of all the output files More... | |
ParameterSet | m_param |
store any parameter that has to be read from a file More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
std::unique_ptr< HDFWalkerOutput > | wOut |
record engine for walkers More... | |
std::vector< TrialWaveFunction * > | Psi1 |
a list of TrialWaveFunctions for multiple method More... | |
std::vector< QMCHamiltonian * > | H1 |
a list of QMCHamiltonians for multiple method More... | |
UPtrVector< RandomBase< FullPrecRealType > > | Rng |
Random number generators. More... | |
std::vector< xmlNodePtr > | mcwalkerNodePtr |
a list of mcwalkerset element More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
RealType | SpinMass |
spin mass for spinor calcs More... | |
int | rotation |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
![]() | |
const IndexType | NumThreads |
number of threads More... | |
std::vector< QMCUpdateBase * > | Movers |
update engines More... | |
std::vector< EstimatorManagerBase * > | estimatorClones |
estimator managers More... | |
std::vector< TraceManager * > | traceClones |
trace managers More... | |
UPtrVector< WalkerLogCollector > | wlog_collectors |
trace collectors More... | |
UPtrVector< CSUpdateBase > | CSMovers |
std::vector< int > | wPerRank |
Walkers per MPI rank. More... | |
![]() | |
static UPtrVector< MCWalkerConfiguration > | wClones_uptr |
walkers More... | |
static std::vector< MCWalkerConfiguration * > | wClones |
static UPtrVector< MCWalkerConfiguration > | wgClones |
static UPtrVector< TrialWaveFunction > | psiClones_uptr |
trial wavefunctions More... | |
static std::vector< TrialWaveFunction * > | psiClones |
static UPtrVector< TrialWaveFunction > | guideClones_uptr |
guide wavefunctions More... | |
static std::vector< TrialWaveFunction * > | guideClones |
static UPtrVector< QMCHamiltonian > | hClones_uptr |
Hamiltonians. More... | |
static std::vector< QMCHamiltonian * > | hClones |
static std::vector< UPtrVector< MCWalkerConfiguration > > | WPoolClones_uptr |
static std::vector< std::vector< MCWalkerConfiguration * > > | WPoolClones |
static std::vector< UPtrVector< TrialWaveFunction > > | PsiPoolClones_uptr |
static std::vector< std::vector< TrialWaveFunction * > > | PsiPoolClones |
static std::vector< UPtrVector< QMCHamiltonian > > | HPoolClones_uptr |
static std::vector< std::vector< QMCHamiltonian * > > | HPoolClones |
VMC | ( | const ProjectData & | project_data_, |
MCWalkerConfiguration & | w, | ||
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
UPtrVector< RandomBase< QMCTraits::FullPrecRealType >> & | rngs, | ||
Communicate * | comm, | ||
bool | enable_profiling | ||
) |
Constructor.
Definition at line 40 of file VMC.cpp.
References ParameterSet::add(), QMCDriver::m_param, QMCDriver::nSteps, QMCDriver::nStepsBetweenSamples, VMC::prevSteps, VMC::prevStepsBetweenSamples, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, QMCDriver::QMC_WARMUP, QMCDriver::RootName, and VMC::UseDrift.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 37 of file VMC.h.
References qmcplusplus::VMC.
|
overridevirtual |
Implements QMCDriverInterface.
Definition at line 298 of file VMC.cpp.
References ParameterSet::add(), qmcplusplus::app_log(), qmcplusplus::ceil(), QMCDriver::CurrentStep, QMCDriver::DumpConfig, ParameterSet::get(), WalkerConfigurations::getActiveWalkers(), QMCDriver::m_param, MPIObjectBase::myComm, QMCDriver::MyCounter, QMCDriver::nBlocks, QMCDriver::nSamplesPerThread, QMCDriver::nSteps, QMCDriver::nStepsBetweenSamples, QMCDriver::nSubSteps, QMCDriver::nTargetPopulation, QMCDriver::nTargetSamples, omp_get_max_threads(), QMCDriver::Period4CheckPoint, QMCDriver::Period4WalkerDump, VMC::prevSteps, VMC::prevStepsBetweenSamples, ParameterSet::put(), qmcplusplus::qmc_common, QMCState::qmc_counter, Communicate::size(), QMCDriver::Tau, and QMCDriver::W.
|
private |
check the run-time environments
Definition at line 153 of file VMC.cpp.
References qmcplusplus::app_log(), SimpleFixedNodeBranch::B_TARGETWALKERS, WalkerConfigurations::begin(), QMCDriver::branchEngine, qmcplusplus::ceil(), copy(), QMCDriver::DriftModifier, CloneManager::estimatorClones, QMCDriver::Estimators, FairDivideLow(), WalkerConfigurations::getActiveWalkers(), QMCDriver::H, CloneManager::hClones, ParticleSet::isSpinor(), CloneManager::makeClones(), QMCState::memory_allocated, CloneManager::Movers, QMCDriver::nSamplesPerThread, QMCDriver::nSubSteps, QMCDriver::nTargetPopulation, QMCDriver::nTargetSamples, CloneManager::NumThreads, QMCDriver::nWarmupSteps, QMCState::print_memory_change(), QMCDriver::Psi, CloneManager::psiClones, qmcplusplus::qmc_common, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, QMCDriver::qmcNode, QMCDriver::Rng, VMC::rngs_, QMCDriver::SpinMass, CloneManager::traceClones, QMCDriver::Traces, VMC::UseDrift, QMCDriver::W, CloneManager::wClones, CloneManager::wlog_collectors, QMCDriver::wlog_manager_, and CloneManager::wPerRank.
Referenced by VMC::run().
|
overridevirtual |
write samples to a file
Implements QMCDriverInterface.
Definition at line 60 of file VMC.cpp.
References qmcplusplus::app_log(), Communicate::bcast(), WalkerConfigurations::begin(), ParticleSet::Collectables, QMCDriver::CurrentStep, QMCDriver::DumpConfig, MCWalkerConfiguration::dumpEnsemble(), CloneManager::estimatorClones, QMCDriver::Estimators, QMCDriver::finalize(), Communicate::getName(), CloneManager::getWalkerLogCollectorRefs(), QMCDriver::MaxCPUSecs, CloneManager::Movers, MPIObjectBase::myComm, QMCDriver::nBlocks, QMCDriver::nBlocksBetweenRecompute, QMCDriver::nSteps, CloneManager::NumThreads, omp_get_thread_num(), QMCDriver::Period4CheckProperties, QMCDriver::Period4WalkerDump, QMCDriver::qmc_driver_mode, QMCDriver::QMC_UPDATE_MODE, Communicate::rank(), QMCDriver::recordBlock(), VMC::resetRun(), QMCDriver::Rng, VMC::rngs_, qmcplusplus::run_time_manager, PooledData< T >::size(), Communicate::size(), LoopTimer< CLOCK >::start(), EstimatorManagerBase::start(), LoopTimer< CLOCK >::stop(), EstimatorManagerBase::stop(), EstimatorManagerBase::stopBlock(), CloneManager::traceClones, QMCDriver::Traces, QMCDriver::W, CloneManager::wClones, QMCDriver::wlog_manager_, QMCDriver::wOut, and CloneManager::wPerRank.
Referenced by qmcplusplus::TEST_CASE().
|
private |
Definition at line 40 of file VMC.h.
Referenced by VMC::put(), and VMC::VMC().
|
private |
Definition at line 41 of file VMC.h.
Referenced by VMC::put(), and VMC::VMC().
|
private |
Definition at line 46 of file VMC.h.
Referenced by VMC::resetRun(), and VMC::run().
|
private |
option to enable/disable drift equation or RN for VMC
Definition at line 44 of file VMC.h.
Referenced by VMC::resetRun(), and VMC::VMC().
class qmcplusplus::VMCBatched |
Implements a VMC using particle-by-particle move.
Threaded execution.
Definition at line 34 of file VMCBatched.h.
Public Types | |
using | Base = QMCDriverNew |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
using | PosType = QMCTraits::PosType |
using | ParticlePositions = PtclOnLatticeTraits::ParticlePos |
![]() | |
enum | { QMC_UPDATE_MODE, QMC_MULTIPLE, QMC_OPTIMIZE, QMC_WARMUP } |
separate but similar to QMCModeEnum More... | |
using | RealType = QMCTraits::RealType |
using | IndexType = QMCTraits::IndexType |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
using | MCPWalker = MCPopulation::MCPWalker |
using | WFBuffer = MCPopulation::WFBuffer |
using | SetNonLocalMoveHandler = std::function< void(QMCHamiltonian &)> |
![]() | |
using | BranchEngineType = SimpleFixedNodeBranch |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
Public Member Functions | |
VMCBatched (const ProjectData &project_data, QMCDriverInput &&qmcdriver_input, const std::optional< EstimatorManagerInput > &global_emi, VMCDriverInput &&input, WalkerConfigurations &wc, MCPopulation &&pop, SampleStack &samples_, Communicate *comm) | |
Constructor. More... | |
void | process (xmlNodePtr node) override |
QMCDriverNew driver second (3rd, 4th...) stage of constructing a valid driver. More... | |
bool | run () override |
Runs the actual VMC section. More... | |
auto | getCDLW () |
transitional interface on the way to better walker count adjustment handling. More... | |
void | enable_sample_collection () |
Enable collecting samples during the VMC run. More... | |
![]() | |
QMCDriverNew (const ProjectData &project_data, QMCDriverInput &&input, const std::optional< EstimatorManagerInput > &global_emi, WalkerConfigurations &wc, MCPopulation &&population, const std::string timer_prefix, Communicate *comm, const std::string &QMC_driver_type) | |
Constructor. More... | |
QMCDriverNew (QMCDriverNew &&)=default | |
Move Constructor. More... | |
QMCDriverNew (const QMCDriverNew &)=delete | |
Copy Constructor (disabled). More... | |
QMCDriverNew & | operator= (const QMCDriverNew &)=delete |
Copy operator (disabled). More... | |
~QMCDriverNew () override | |
bool | putQMCInfo (xmlNodePtr cur) |
void | makeLocalWalkers (int nwalkers, RealType reserve) |
Adjust populations local walkers to this number. More... | |
DriftModifierBase & | get_drift_modifier () const |
void | recordBlock (int block) override |
record the state of the block More... | |
bool | finalize (int block, bool dumpwalkers=true) |
finalize a qmc section More... | |
IndexType | current () const |
return current step More... | |
void | setStatus (const std::string &aname, const std::string &h5name, bool append) override |
Set the status of the QMCDriver. More... | |
void | add_H_and_Psi (QMCHamiltonian *h, TrialWaveFunction *psi) override |
void | createRngsStepContexts (int num_crowds) |
Creates Random Number generators for crowds and step contexts. More... | |
void | putWalkers (std::vector< xmlNodePtr > &wset) override |
Read walker configurations from *.config.h5 files. More... | |
RefVector< RandomBase< FullPrecRealType > > | getRngRefs () const |
RandomBase< FullPrecRealType > & | getRng (int i) override |
return the i-th random generator More... | |
std::string | getEngineName () override |
intended for logging output and debugging you should base behavior on type preferably at compile time or if necessary at runtime using and protected by dynamic cast. More... | |
unsigned long | getDriverMode () override |
IndexType | get_num_living_walkers () const |
IndexType | get_num_dead_walkers () const |
const QMCDriverInput & | getQMCDriverInput () const |
bool | put (xmlNodePtr cur) override |
More... | |
void | setUpdateMode (bool pbyp) override |
should be set in input don't see a reason to set individually More... | |
void | putTraces (xmlNodePtr txml) override |
void | requestTraces (bool allow_traces) override |
void | putWalkerLogs (xmlNodePtr wlxml) override |
void | requestWalkerLogs (bool allow_walker_logs_) override |
![]() | |
virtual | ~QMCDriverInterface () |
virtual void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) |
virtual std::unique_ptr< BranchEngineType > | getBranchEngine () |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
Static Public Member Functions | |
template<CoordsType CT> | |
static void | advanceWalkers (const StateForThread &sft, Crowd &crowd, DriverTimers &timers, ContextForSteps &move_context, bool recompute, bool accumulate_this_step) |
Refactor of VMCUpdatePbyP in crowd context. More... | |
static void | runVMCStep (int crowd_id, const StateForThread &sft, DriverTimers &timers, UPtrVector< ContextForSteps > &context_for_steps, UPtrVector< Crowd > &crowds) |
Thread body for VMC step. More... | |
![]() | |
static void | initialLogEvaluation (int crowd_id, UPtrVector< Crowd > &crowds, UPtrVector< ContextForSteps > &step_context) |
template<typename RT , CoordsType CT> | |
static void | scaleBySqrtTau (const TauParams< RT, CT > &taus, MCCoords< CT > &coords) |
template<typename RT , CoordsType CT> | |
static void | computeLogGreensFunction (const MCCoords< CT > &coords, const TauParams< RT, CT > &taus, std::vector< QMCTraits::RealType > &log_gb) |
calculates Green Function from displacements stored in MCCoords [param, out] log_g More... | |
Private Member Functions | |
QMCRunType | getRunType () override |
VMCBatched (const VMCBatched &)=delete | |
Copy constructor. More... | |
VMCBatched & | operator= (const VMCBatched &)=delete |
Copy operator (disabled). More... | |
Static Private Member Functions | |
static size_t | compute_samples_per_rank (const size_t num_blocks, const size_t samples_per_block, const size_t local_walkers) |
function to calculate samples per MPI rank More... | |
Private Attributes | |
int | prevSteps |
int | prevStepsBetweenSamples |
VMCDriverInput | vmcdriver_input_ |
SampleStack & | samples_ |
Storage for samples (later used in optimizer) More... | |
bool | collect_samples_ |
Sample collection flag. More... | |
Friends | |
class | qmcplusplus::testing::VMCBatchedTest |
Additional Inherited Members | |
![]() | |
std::bitset< QMC_MODE_MAX > | qmc_driver_mode_ |
bits to classify QMCDriver More... | |
bool | allow_walker_logs |
whether to allow walker logs More... | |
WalkerLogInput | walker_logs_input |
walker logs input More... | |
![]() | |
void | initializeQMC (const AdjustedWalkerCounts &awc) |
Do common section starting tasks for VMC and DMC. More... | |
void | measureImbalance (const std::string &tag) const |
inject additional barrier and measure load imbalance. More... | |
void | endBlock () |
end of a block operations. Aggregates statistics across all MPI ranks and write to disk. More... | |
const std::string & | get_root_name () const override |
![]() | |
static QMCDriverNew::AdjustedWalkerCounts | adjustGlobalWalkerCount (Communicate &comm, const IndexType current_configs, const IndexType requested_total_walkers, const IndexType requested_walkers_per_rank, const RealType reserve_walkers, int num_crowds) |
}@ More... | |
static size_t | determineStepsPerBlock (IndexType global_walkers, IndexType requested_samples, IndexType requested_steps, IndexType blocks) |
pure function calculating the actual number of steps per block More... | |
static void | checkNumCrowdsLTNumThreads (const int num_crowds) |
static void | checkLogAndGL (Crowd &crowd, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
static void | setWalkerOffsets (WalkerConfigurations &, Communicate *comm) |
update the global offsets of walker configurations after active walkers being touched. More... | |
![]() | |
QMCDriverInput | qmcdriver_input_ |
RealType | max_disp_sq_ |
they should be limited to values that can be changed from input or are live state. More... | |
IndexType | target_samples_ |
the number of saved samples More... | |
IndexType | nBlocksBetweenRecompute |
the number of blocks between recomptePsi More... | |
UPtrVector< Crowd > | crowds_ |
}@ More... | |
std::string | h5_file_root_ |
std::unique_ptr< DriftModifierBase > | drift_modifier_ |
drift modifer More... | |
int | k_delay |
the number to delay updates by More... | |
int | walker_dump_period |
period of recording walker configurations More... | |
IndexType | current_step_ |
size_t | steps_per_block_ = 0 |
actual number of steps per block More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves /rejected More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
const std::string | QMCType |
type of qmc: assigned by subclasses More... | |
MCPopulation | population_ |
the entire (on node) walker population it serves VMCBatch and DMCBatch right now but will be polymorphic More... | |
struct DriverWalkerResourceCollection | golden_resource_ |
the golden multi walker shared resource serves ParticleSet TrialWaveFunction right now but actually should be based on MCPopulation. More... | |
const MultiWalkerDispatchers | dispatchers_ |
multi walker dispatchers More... | |
std::unique_ptr< EstimatorManagerNew > | estimator_manager_ |
Observables manager Has very problematic owner ship and life cycle. More... | |
std::unique_ptr< HDFWalkerOutput > | wOut |
record engine for walkers More... | |
UPtrVector< ContextForSteps > | step_contexts_ |
Per crowd move contexts, this is where the DistanceTables etc. More... | |
UPtrVector< RandomBase< FullPrecRealType > > | Rng |
Random number generators. More... | |
std::vector< xmlNodePtr > | mcwalkerNodePtr |
a list of mcwalkerset element More... | |
DriverTimers | timers_ |
period of dumping walker configurations and everything else for restart More... | |
ScopedProfiler | driver_scope_profiler_ |
profile the driver lifetime More... | |
const ProjectData & | project_data_ |
project info for accessing global fileroot and series id More... | |
WalkerConfigurations & | walker_configs_ref_ |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
using Base = QMCDriverNew |
Definition at line 37 of file VMCBatched.h.
Definition at line 38 of file VMCBatched.h.
Definition at line 40 of file VMCBatched.h.
using PosType = QMCTraits::PosType |
Definition at line 39 of file VMCBatched.h.
VMCBatched | ( | const ProjectData & | project_data, |
QMCDriverInput && | qmcdriver_input, | ||
const std::optional< EstimatorManagerInput > & | global_emi, | ||
VMCDriverInput && | input, | ||
WalkerConfigurations & | wc, | ||
MCPopulation && | pop, | ||
SampleStack & | samples_, | ||
Communicate * | comm | ||
) |
Constructor.
Constructor maintains proper ownership of input parameters.
Definition at line 30 of file VMCBatched.cpp.
|
privatedelete |
Copy constructor.
|
static |
Refactor of VMCUpdatePbyP in crowd context.
MCWalkerConfiguration layer removed. Obfuscation of state changes via buffer and MCWalkerconfiguration require this be tested well
Definition at line 52 of file VMCBatched.cpp.
References QMCHamiltonian::auxHevaluate(), QMCDriverNew::DriverTimers::buffer_timer, qmcplusplus::CHECKGL_AFTER_LOAD, qmcplusplus::CHECKGL_AFTER_MOVES, QMCDriverNew::checkLogAndGL(), QMCDriverNew::DriverTimers::collectables_timer, QMCDriverNew::computeLogGreensFunction(), qmcplusplus::crowd, VMCBatched::StateForThread::drift_modifier, QMCDriverNew::DriverTimers::estimators_timer, qmcplusplus::exp(), QMCDriverInput::get_debug_checks(), MCPopulation::get_ptclgrp_inv_mass(), ContextForSteps::get_random_gen(), QMCDriverInput::get_spin_mass(), QMCDriverInput::get_sub_steps(), QMCDriverInput::get_tau(), VMCDriverInput::get_use_drift(), DriftModifierBase::getDrifts(), VMCBatched::StateForThread::global_step, qmcplusplus::ham, QMCDriverNew::DriverTimers::hamiltonian_timer, qmcplusplus::makeGaussRandomWithEngine(), QMCDriverNew::DriverTimers::movepbyp_timer, norm(), qmcplusplus::hdf::num_walkers, VMCBatched::StateForThread::population, qmcplusplus::pset, VMCBatched::StateForThread::qmcdrv_input, QMCDriverNew::DriverTimers::resource_timer, QMCHamiltonian::saveProperty(), QMCDriverNew::scaleBySqrtTau(), TimerType< CLOCK >::start(), TimerType< CLOCK >::stop(), qmcplusplus::twf, VMCBatched::StateForThread::vmcdrv_input, qmcplusplus::walker, and qmcplusplus::hdf::walkers.
|
staticprivate |
function to calculate samples per MPI rank
Definition at line 287 of file VMCBatched.cpp.
References qmcplusplus::hdf::num_blocks.
Referenced by VMCBatched::enable_sample_collection().
void enable_sample_collection | ( | ) |
Enable collecting samples during the VMC run.
strong assumption that VMCBatched driver has passed through process phase of initialization. A side effect of VMCBatched::process is that MCPopulation has created local walkers.
Definition at line 463 of file VMCBatched.cpp.
References qmcplusplus::app_log(), VMCBatched::collect_samples_, VMCBatched::compute_samples_per_rank(), QMCDriverInput::get_max_blocks(), MCPopulation::get_num_local_walkers(), MCPopulation::get_num_ranks(), QMCDriverNew::population_, QMCDriverNew::qmcdriver_input_, VMCBatched::samples_, SampleStack::setMaxSamples(), and QMCDriverNew::steps_per_block_.
auto getCDLW | ( | ) |
transitional interface on the way to better walker count adjustment handling.
returns a closure taking walkers per rank and accomplishing what calc_default_local_walkers does.
|
inlineoverrideprivatevirtual |
Implements QMCDriverInterface.
Definition at line 125 of file VMCBatched.h.
References qmcplusplus::VMC_BATCH.
|
privatedelete |
Copy operator (disabled).
|
overridevirtual |
QMCDriverNew driver second (3rd, 4th...) stage of constructing a valid driver.
This is the shared entry point with legacy, from QMCMain so the API cannot be updated yet
Implements QMCDriverNew.
Definition at line 265 of file VMCBatched.cpp.
References QMCDriverNew::adjustGlobalWalkerCount(), qmcplusplus::app_log(), Communicate::barrier_and_abort(), QMCDriverNew::determineStepsPerBlock(), QMCDriverInput::get_max_blocks(), QMCDriverInput::get_num_crowds(), QMCDriverInput::get_requested_samples(), QMCDriverInput::get_requested_steps(), QMCDriverInput::get_total_walkers(), QMCDriverInput::get_walkers_per_rank(), WalkerConfigurations::getActiveWalkers(), QMCDriverNew::AdjustedWalkerCounts::global_walkers, QMCDriverNew::initializeQMC(), MPIObjectBase::myComm, qmcplusplus::print_mem(), QMCDriverNew::qmcdriver_input_, QMCDriverNew::steps_per_block_, and QMCDriverNew::walker_configs_ref_.
|
overridevirtual |
Runs the actual VMC section.
Dependent on base class state machine Assumes state already updated from the following calls:
At the moment I don't care about 1st touch, prove it matters If does consider giving more to the thread by value that should end up thread local. (I think)
Implements QMCDriverInterface.
Definition at line 307 of file VMCBatched.cpp.
References QMCDriverNew::allow_walker_logs, qmcplusplus::app_debug_stream(), qmcplusplus::app_log(), qmcplusplus::app_summary(), SampleStack::appendSample(), Communicate::barrier(), Communicate::bcast(), VMCBatched::collect_samples_, qmcplusplus::crowd, QMCDriverNew::crowds_, QMCDriverNew::drift_modifier_, Timer::elapsed(), QMCDriverNew::endBlock(), QMCDriverNew::estimator_manager_, QMCDriverNew::finalize(), QMCDriverInput::get_blocks_between_recompute(), MCPopulation::get_elec_particle_sets(), QMCDriverInput::get_max_blocks(), QMCDriverInput::get_measure_imbalance(), QMCDriverInput::get_recalculate_properties_period(), QMCDriverNew::get_root_name(), QMCDriverInput::get_tau(), QMCDriverInput::get_warmup_steps(), ProjectData::getMaxCPUSeconds(), ProjectData::getSeriesIndex(), ProjectData::getTitle(), Crowd::getWalkerLogCollectorRefs(), VMCBatched::StateForThread::global_step, QMCDriverNew::DriverTimers::init_walkers_timer, QMCDriverNew::initialLogEvaluation(), VMCBatched::StateForThread::is_recomputing_block, WalkerLogManager::makeCollector(), QMCDriverNew::measureImbalance(), MPIObjectBase::myComm, qmcplusplus::hdf::num_blocks, QMCDriverNew::population_, qmcplusplus::print_mem(), QMCDriverNew::DriverTimers::production_timer, QMCDriverNew::project_data_, QMCDriverNew::qmc_driver_mode_, QMCDriverNew::QMC_UPDATE_MODE, QMCDriverNew::qmcdriver_input_, Communicate::rank(), VMCBatched::StateForThread::recalculate_properties_period, QMCDriverNew::recordBlock(), QMCDriverNew::DriverTimers::run_steps_timer, qmcplusplus::run_time_manager, VMCBatched::runVMCStep(), VMCBatched::samples_, WalkerLogManager::startRun(), VMCBatched::StateForThread::step, QMCDriverNew::step_contexts_, QMCDriverNew::steps_per_block_, WalkerLogManager::stopRun(), QMCDriverNew::timers_, VMCBatched::vmcdriver_input_, qmcplusplus::walker, QMCDriverNew::walker_logs_input, and WalkerLogManager::writeBuffers().
|
static |
Thread body for VMC step.
Definition at line 243 of file VMCBatched.cpp.
References qmcplusplus::crowd, MCPopulation::get_golden_electrons(), VMCBatched::StateForThread::is_recomputing_block, ParticleSet::isSpinor(), VMCBatched::StateForThread::population, VMCBatched::StateForThread::step, and VMCBatched::StateForThread::steps_per_block.
Referenced by VMCBatched::run().
|
friend |
Definition at line 142 of file VMCBatched.h.
|
private |
Sample collection flag.
Definition at line 135 of file VMCBatched.h.
Referenced by VMCBatched::enable_sample_collection(), and VMCBatched::run().
|
private |
Definition at line 122 of file VMCBatched.h.
|
private |
Definition at line 123 of file VMCBatched.h.
|
private |
Storage for samples (later used in optimizer)
Definition at line 133 of file VMCBatched.h.
Referenced by VMCBatched::enable_sample_collection(), and VMCBatched::run().
|
private |
Definition at line 124 of file VMCBatched.h.
Referenced by VMCBatched::run().
class qmcplusplus::VMCUpdateAll |
Implements the VMC algorithm using particle-by-particle move.
Definition at line 24 of file VMCUpdateAll.h.
Public Member Functions | |
VMCUpdateAll (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
~VMCUpdateAll () override | |
void | advanceWalker (Walker_t &thisWalker, bool recompute) override |
move a walker More... | |
![]() | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, TrialWaveFunction &guide, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Alt Constructor. More... | |
virtual | ~QMCUpdateBase () |
destructor More... | |
RealType | acceptRatio () const |
void | resetRun (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, const DriftModifierBase *driftmodifer) |
reset the QMCUpdateBase parameters More... | |
void | resetRun2 (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, WalkerLogCollector *wlog_collector_, const DriftModifierBase *driftmodifer) |
RealType | getTau () |
void | setTau (RealType t) |
RealType | getSpinMass () |
void | setSpinMass (RealType m) |
void | getLogs (std::vector< RealType > &logs) |
void | set_step (int step) |
void | startRun (int blocks, bool record) |
start a run More... | |
void | stopRun () |
stop a run More... | |
void | stopRun2 () |
void | startBlock (int steps) |
prepare to start a block More... | |
void | stopBlock (bool collectall=true) |
stop a block More... | |
void | setMultiplicity (WalkerIter_t it, WalkerIter_t it_end) |
set the multiplicity of the walkers to branch More... | |
void | setMultiplicity (Walker_t &awalker) const |
virtual void | initWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker buffers for PbyP update More... | |
virtual void | initWalkers (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker for walker update More... | |
virtual bool | put (xmlNodePtr cur) |
process options More... | |
void | accumulate (WalkerIter_t it, WalkerIter_t it_end) |
virtual void | advanceWalkers (WalkerIter_t it, WalkerIter_t it_end, bool recompute) |
advance walkers executed at each step More... | |
virtual RealType | advanceWalkerForEE (Walker_t &w1, std::vector< PosType > &dR, std::vector< int > &iats, std::vector< int > &rs, std::vector< RealType > &ratios) |
int | RMC_checkIndex (int N, int NMax) |
void | RMC_checkWalkerBounds (WalkerIter_t &it, WalkerIter_t first, WalkerIter_t last) |
RealType | logBackwardGF (const ParticleSet::ParticlePos &displ) |
Private Member Functions | |
VMCUpdateAll (const VMCUpdateAll &)=delete | |
Copy Constructor (disabled) More... | |
VMCUpdateAll & | operator= (const VMCUpdateAll &)=delete |
Copy operator (disabled). More... | |
Additional Inherited Members | |
![]() | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | WalkerIter_t = MCWalkerConfiguration::iterator |
using | BranchEngineType = SimpleFixedNodeBranch |
using | mPosType = PosType |
using | mTensorType = TensorType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
int | nSubSteps |
number of steps per measurement More... | |
DriverDebugChecks | debug_checks_ = DriverDebugChecks::ALL_OFF |
determine additional checks for debugging purpose More... | |
std::string | debug_checks_str_ |
IndexType | MaxAge |
MaxAge>0 indicates branch is done. More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves rejected More... | |
IndexType | nAllRejected |
Total number of the steps when all the particle moves are rejected. More... | |
IndexType | nNodeCrossing |
Total number of node crossings per block. More... | |
IndexType | NonLocalMoveAccepted |
Total numer of non-local moves accepted. More... | |
RealType | Tau |
timestep More... | |
RealType | spinMass |
spin mass More... | |
bool | UseDrift |
use Drift More... | |
RealType | csoffset |
normalization offset for cs type runs. More... | |
TraceManager * | Traces |
traces More... | |
WalkerLogCollector * | wlog_collector |
![]() | |
RealType | getNodeCorrection (const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled) |
evaluate the ratio of scaled velocity and velocity More... | |
QMCUpdateBase (const QMCUpdateBase &)=delete | |
copy constructor (disabled) More... | |
![]() | |
static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
![]() | |
bool | UpdatePbyP |
update particle-by-particle More... | |
IndexType | NumPtcl |
number of particles More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
RealType | m_tauovermass |
tau/mass More... | |
RealType | m_r2max |
maximum displacement^2 More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
TrialWaveFunction & | Guide |
guide function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
RandomBase< FullPrecRealType > & | RandomGen |
random number generator More... | |
const BranchEngineType * | branchEngine |
branch engine, stateless reference to the one in QMCDriver More... | |
const DriftModifierBase * | DriftModifier |
drift modifer, stateless reference to the one in QMCDriver More... | |
EstimatorManagerBase * | Estimators |
estimator More... | |
ParameterSet | myParams |
parameters More... | |
std::vector< RealType > | MassInvS |
1/Mass per species More... | |
std::vector< RealType > | MassInvP |
1/Mass per particle More... | |
std::vector< RealType > | SqrtTauOverMass |
sqrt(tau/Mass) per particle More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
ParticleSet::ParticleScalar | deltaS |
temporart storage for spin displacement More... | |
ParticleSet::ParticleGradient | G |
storage for differential gradients for PbyP update More... | |
ParticleSet::ParticleGradient | dG |
ParticleSet::ParticleLaplacian | L |
storage for differential laplacians for PbyP update More... | |
ParticleSet::ParticleLaplacian | dL |
VMCUpdateAll | ( | MCWalkerConfiguration & | w, |
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
RandomBase< FullPrecRealType > & | rg | ||
) |
Constructor.
Definition at line 24 of file VMCUpdateAll.cpp.
References QMCUpdateBase::UpdatePbyP.
|
override |
Definition at line 33 of file VMCUpdateAll.cpp.
|
privatedelete |
Copy Constructor (disabled)
|
overridevirtual |
move a walker
Implements QMCUpdateBase.
Definition at line 35 of file VMCUpdateAll.cpp.
References Walker< t_traits, p_traits >::Age, qmcplusplus::assignDrift(), QMCHamiltonian::auxHevaluate(), QMCUpdateBase::deltaR, qmcplusplus::Dot(), QMCUpdateBase::drift, QMCHamiltonian::evaluate(), TrialWaveFunction::evaluateLog(), qmcplusplus::exp(), ParticleSet::G, TrialWaveFunction::getPhase(), Walker< t_traits, p_traits >::getPropertyBase(), QMCUpdateBase::H, ParticleSet::loadWalker(), QMCUpdateBase::logBackwardGF(), qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAllParticles(), ParticleSet::makeMoveAllParticlesWithDrift(), QMCUpdateBase::MassInvP, QMCUpdateBase::nAccept, QMCUpdateBase::nReject, QMCUpdateBase::nSubSteps, Walker< t_traits, p_traits >::Properties, QMCUpdateBase::Psi, ParticleSet::R, Walker< t_traits, p_traits >::R, QMCUpdateBase::RandomGen, Walker< t_traits, p_traits >::resetProperty(), QMCHamiltonian::saveProperty(), ParticleSet::saveWalker(), QMCUpdateBase::SqrtTauOverMass, QMCUpdateBase::Tau, ParticleSet::update(), QMCUpdateBase::UseDrift, and QMCUpdateBase::W.
|
privatedelete |
Copy operator (disabled).
class qmcplusplus::VMCUpdatePbyP |
Implements the VMC algorithm using particle-by-particle move.
Definition at line 25 of file VMCUpdatePbyP.h.
Public Member Functions | |
VMCUpdatePbyP (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
~VMCUpdatePbyP () override | |
void | advanceWalker (Walker_t &thisWalker, bool recompute) override |
move a walker More... | |
![]() | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Constructor. More... | |
QMCUpdateBase (MCWalkerConfiguration &w, TrialWaveFunction &psi, TrialWaveFunction &guide, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg) | |
Alt Constructor. More... | |
virtual | ~QMCUpdateBase () |
destructor More... | |
RealType | acceptRatio () const |
void | resetRun (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, const DriftModifierBase *driftmodifer) |
reset the QMCUpdateBase parameters More... | |
void | resetRun2 (BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, WalkerLogCollector *wlog_collector_, const DriftModifierBase *driftmodifer) |
RealType | getTau () |
void | setTau (RealType t) |
RealType | getSpinMass () |
void | setSpinMass (RealType m) |
void | getLogs (std::vector< RealType > &logs) |
void | set_step (int step) |
void | startRun (int blocks, bool record) |
start a run More... | |
void | stopRun () |
stop a run More... | |
void | stopRun2 () |
void | startBlock (int steps) |
prepare to start a block More... | |
void | stopBlock (bool collectall=true) |
stop a block More... | |
void | setMultiplicity (WalkerIter_t it, WalkerIter_t it_end) |
set the multiplicity of the walkers to branch More... | |
void | setMultiplicity (Walker_t &awalker) const |
virtual void | initWalkersForPbyP (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker buffers for PbyP update More... | |
virtual void | initWalkers (WalkerIter_t it, WalkerIter_t it_end) |
initialize Walker for walker update More... | |
virtual bool | put (xmlNodePtr cur) |
process options More... | |
void | accumulate (WalkerIter_t it, WalkerIter_t it_end) |
virtual void | advanceWalkers (WalkerIter_t it, WalkerIter_t it_end, bool recompute) |
advance walkers executed at each step More... | |
virtual RealType | advanceWalkerForEE (Walker_t &w1, std::vector< PosType > &dR, std::vector< int > &iats, std::vector< int > &rs, std::vector< RealType > &ratios) |
int | RMC_checkIndex (int N, int NMax) |
void | RMC_checkWalkerBounds (WalkerIter_t &it, WalkerIter_t first, WalkerIter_t last) |
RealType | logBackwardGF (const ParticleSet::ParticlePos &displ) |
Private Attributes | |
NewTimer & | buffer_timer_ |
NewTimer & | movepbyp_timer_ |
NewTimer & | hamiltonian_timer_ |
NewTimer & | collectables_timer_ |
Additional Inherited Members | |
![]() | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | WalkerIter_t = MCWalkerConfiguration::iterator |
using | BranchEngineType = SimpleFixedNodeBranch |
using | mPosType = PosType |
using | mTensorType = TensorType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
int | nSubSteps |
number of steps per measurement More... | |
DriverDebugChecks | debug_checks_ = DriverDebugChecks::ALL_OFF |
determine additional checks for debugging purpose More... | |
std::string | debug_checks_str_ |
IndexType | MaxAge |
MaxAge>0 indicates branch is done. More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves rejected More... | |
IndexType | nAllRejected |
Total number of the steps when all the particle moves are rejected. More... | |
IndexType | nNodeCrossing |
Total number of node crossings per block. More... | |
IndexType | NonLocalMoveAccepted |
Total numer of non-local moves accepted. More... | |
RealType | Tau |
timestep More... | |
RealType | spinMass |
spin mass More... | |
bool | UseDrift |
use Drift More... | |
RealType | csoffset |
normalization offset for cs type runs. More... | |
TraceManager * | Traces |
traces More... | |
WalkerLogCollector * | wlog_collector |
![]() | |
RealType | getNodeCorrection (const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled) |
evaluate the ratio of scaled velocity and velocity More... | |
QMCUpdateBase (const QMCUpdateBase &)=delete | |
copy constructor (disabled) More... | |
![]() | |
static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
check logpsi and grad and lap against values computed from scratch More... | |
![]() | |
bool | UpdatePbyP |
update particle-by-particle More... | |
IndexType | NumPtcl |
number of particles More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
RealType | m_tauovermass |
tau/mass More... | |
RealType | m_r2max |
maximum displacement^2 More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
TrialWaveFunction & | Guide |
guide function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
RandomBase< FullPrecRealType > & | RandomGen |
random number generator More... | |
const BranchEngineType * | branchEngine |
branch engine, stateless reference to the one in QMCDriver More... | |
const DriftModifierBase * | DriftModifier |
drift modifer, stateless reference to the one in QMCDriver More... | |
EstimatorManagerBase * | Estimators |
estimator More... | |
ParameterSet | myParams |
parameters More... | |
std::vector< RealType > | MassInvS |
1/Mass per species More... | |
std::vector< RealType > | MassInvP |
1/Mass per particle More... | |
std::vector< RealType > | SqrtTauOverMass |
sqrt(tau/Mass) per particle More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
ParticleSet::ParticleScalar | deltaS |
temporart storage for spin displacement More... | |
ParticleSet::ParticleGradient | G |
storage for differential gradients for PbyP update More... | |
ParticleSet::ParticleGradient | dG |
ParticleSet::ParticleLaplacian | L |
storage for differential laplacians for PbyP update More... | |
ParticleSet::ParticleLaplacian | dL |
VMCUpdatePbyP | ( | MCWalkerConfiguration & | w, |
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
RandomBase< FullPrecRealType > & | rg | ||
) |
Constructor.
Definition at line 30 of file VMCUpdatePbyP.cpp.
|
override |
Definition at line 41 of file VMCUpdatePbyP.cpp.
|
overridevirtual |
move a walker
Implements QMCUpdateBase.
Definition at line 43 of file VMCUpdatePbyP.cpp.
References ParticleSet::accept_rejectMove(), TrialWaveFunction::acceptMove(), QMCHamiltonian::auxHevaluate(), TraceManager::buffer_sample(), VMCUpdatePbyP::buffer_timer_, TrialWaveFunction::calcRatio(), TrialWaveFunction::calcRatioGrad(), qmcplusplus::CHECKGL_AFTER_MOVES, QMCUpdateBase::checkLogAndGL(), WalkerLogCollector::collect(), VMCUpdatePbyP::collectables_timer_, TrialWaveFunction::completeUpdates(), TrialWaveFunction::copyFromBuffer(), ParticleSet::current_step, Walker< t_traits, p_traits >::DataSet, QMCUpdateBase::debug_checks_, QMCUpdateBase::deltaR, ParticleSet::donePbyP(), qmcplusplus::dot(), QMCUpdateBase::DriftModifier, TrialWaveFunction::evalGrad(), QMCHamiltonian::evaluate(), qmcplusplus::exp(), ParticleSet::first(), ParticleSet::getActivePos(), DriftModifierBase::getDrift(), TrialWaveFunction::getPhase(), Walker< t_traits, p_traits >::getPropertyBase(), ParticleSet::groups(), QMCUpdateBase::H, VMCUpdatePbyP::hamiltonian_timer_, ParticleSet::last(), ParticleSet::loadWalker(), qmcplusplus::makeGaussRandomWithEngine(), ParticleSet::makeMoveAndCheck(), QMCUpdateBase::MassInvS, VMCUpdatePbyP::movepbyp_timer_, QMCUpdateBase::nAccept, QMCUpdateBase::nAllRejected, norm(), QMCUpdateBase::nReject, QMCUpdateBase::nSubSteps, TrialWaveFunction::prepareGroup(), QMCUpdateBase::Psi, ParticleSet::R, QMCUpdateBase::RandomGen, TrialWaveFunction::rejectMove(), Walker< t_traits, p_traits >::resetProperty(), QMCHamiltonian::saveProperty(), ParticleSet::saveWalker(), qmcplusplus::sqrt(), TimerType< CLOCK >::start(), TimerType< CLOCK >::stop(), QMCUpdateBase::Tau, QMCUpdateBase::Traces, TrialWaveFunction::updateBuffer(), QMCUpdateBase::UseDrift, QMCUpdateBase::W, and QMCUpdateBase::wlog_collector.
|
private |
Definition at line 36 of file VMCUpdatePbyP.h.
Referenced by VMCUpdatePbyP::advanceWalker().
|
private |
Definition at line 39 of file VMCUpdatePbyP.h.
Referenced by VMCUpdatePbyP::advanceWalker().
|
private |
Definition at line 38 of file VMCUpdatePbyP.h.
Referenced by VMCUpdatePbyP::advanceWalker().
|
private |
Definition at line 37 of file VMCUpdatePbyP.h.
Referenced by VMCUpdatePbyP::advanceWalker().
class qmcplusplus::CostFunctionCrowdData |
Implements wave-function optimization.
Class to hold temporary data and object copies for crowd-local evaluation
Definition at line 28 of file CostFunctionCrowdData.h.
Definition at line 32 of file CostFunctionCrowdData.h.
Definition at line 31 of file CostFunctionCrowdData.h.
CostFunctionCrowdData | ( | int | crowd_size, |
ParticleSet & | P, | ||
TrialWaveFunction & | Psi, | ||
QMCHamiltonian & | H, | ||
RandomBase< FullPrecRealType > & | Rng | ||
) |
Create the arrays of crowd_size and create object copies.
Definition at line 18 of file CostFunctionCrowdData.cpp.
References QMCHamiltonian::addOperator(), QMCHamiltonian::createResource(), TrialWaveFunction::createResource(), ParticleSet::createResource(), CostFunctionCrowdData::driverwalker_resource_collection_, QMCHamiltonian::getTWFDependentComponents(), CostFunctionCrowdData::h0_ptr_list_, CostFunctionCrowdData::h0_res_, CostFunctionCrowdData::h_ptr_list_, DriverWalkerResourceCollection::ham_res, CostFunctionCrowdData::log_psi_fixed_, CostFunctionCrowdData::log_psi_opt_, RandomBase< T >::makeClone(), QMCHamiltonian::makeClone(), TrialWaveFunction::makeClone(), CostFunctionCrowdData::p_ptr_list_, DriverWalkerResourceCollection::pset_res, CostFunctionCrowdData::rng_ptr_list_, CostFunctionCrowdData::rng_save_ptr_, DriverWalkerResourceCollection::twf_res, and CostFunctionCrowdData::wf_ptr_list_.
|
inline |
Definition at line 56 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::e0_.
Referenced by QMCCostFunctionBatched::checkConfigurations().
|
inline |
Definition at line 57 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::e2_.
Referenced by QMCCostFunctionBatched::checkConfigurations().
RefVector< QMCHamiltonian > get_h0_list | ( | int | len | ) |
Definition at line 80 of file CostFunctionCrowdData.cpp.
References qmcplusplus::convertUPtrToRefVectorSubset(), and CostFunctionCrowdData::h0_ptr_list_.
Referenced by QMCCostFunctionBatched::correlatedSampling().
|
inline |
Definition at line 63 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::h0_res_.
Referenced by QMCCostFunctionBatched::correlatedSampling().
RefVector< QMCHamiltonian > get_h_list | ( | int | len | ) |
Definition at line 75 of file CostFunctionCrowdData.cpp.
References qmcplusplus::convertUPtrToRefVectorSubset(), and CostFunctionCrowdData::h_ptr_list_.
Referenced by QMCCostFunctionBatched::checkConfigurations().
|
inline |
Definition at line 48 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::log_psi_fixed_.
Referenced by QMCCostFunctionBatched::checkConfigurations().
|
inline |
Definition at line 49 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::log_psi_opt_.
Referenced by QMCCostFunctionBatched::checkConfigurations(), and QMCCostFunctionBatched::correlatedSampling().
RefVector< ParticleSet > get_p_list | ( | int | len | ) |
Definition at line 65 of file CostFunctionCrowdData.cpp.
References qmcplusplus::convertUPtrToRefVectorSubset(), and CostFunctionCrowdData::p_ptr_list_.
Referenced by QMCCostFunctionBatched::checkConfigurations(), and QMCCostFunctionBatched::correlatedSampling().
|
inline |
Definition at line 51 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::rng_ptr_list_.
Referenced by QMCCostFunctionBatched::checkConfigurations(), and QMCCostFunctionBatched::correlatedSampling().
|
inline |
Definition at line 52 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::rng_save_ptr_.
Referenced by QMCCostFunctionBatched::checkConfigurations(), and QMCCostFunctionBatched::correlatedSampling().
RefVector< TrialWaveFunction > get_wf_list | ( | int | len | ) |
Definition at line 70 of file CostFunctionCrowdData.cpp.
References qmcplusplus::convertUPtrToRefVectorSubset(), and CostFunctionCrowdData::wf_ptr_list_.
Referenced by QMCCostFunctionBatched::checkConfigurations(), and QMCCostFunctionBatched::correlatedSampling().
|
inline |
Definition at line 54 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::wf_ptr_list_.
|
inline |
Definition at line 59 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::wgt_.
Referenced by QMCCostFunctionBatched::correlatedSampling().
|
inline |
Definition at line 60 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::wgt2_.
Referenced by QMCCostFunctionBatched::correlatedSampling().
|
inline |
Definition at line 62 of file CostFunctionCrowdData.h.
References CostFunctionCrowdData::driverwalker_resource_collection_.
Referenced by QMCCostFunctionBatched::checkConfigurations(), and QMCCostFunctionBatched::correlatedSampling().
void zero_log_psi | ( | ) |
Set the log_psi_* arrays to zero.
Definition at line 85 of file CostFunctionCrowdData.cpp.
References CostFunctionCrowdData::log_psi_fixed_, and CostFunctionCrowdData::log_psi_opt_.
Referenced by QMCCostFunctionBatched::checkConfigurations(), and QMCCostFunctionBatched::correlatedSampling().
|
private |
Definition at line 78 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), and CostFunctionCrowdData::getSharedResource().
|
private |
Definition at line 87 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::get_e0().
|
private |
Definition at line 88 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::get_e2().
|
private |
Definition at line 74 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), and CostFunctionCrowdData::get_h0_list().
|
private |
resource collection corresponding to h0
Definition at line 81 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), and CostFunctionCrowdData::get_h0_res().
|
private |
Definition at line 73 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), and CostFunctionCrowdData::get_h_list().
|
private |
Definition at line 67 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), CostFunctionCrowdData::get_log_psi_fixed(), and CostFunctionCrowdData::zero_log_psi().
|
private |
Definition at line 68 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), CostFunctionCrowdData::get_log_psi_opt(), and CostFunctionCrowdData::zero_log_psi().
|
private |
Definition at line 72 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), and CostFunctionCrowdData::get_p_list().
|
private |
Definition at line 75 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), and CostFunctionCrowdData::get_rng_ptr_list().
|
private |
Definition at line 84 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), and CostFunctionCrowdData::get_rng_save().
|
private |
Definition at line 71 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::CostFunctionCrowdData(), CostFunctionCrowdData::get_wf_list(), and CostFunctionCrowdData::get_wf_ptr_list().
|
private |
Definition at line 91 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::get_wgt2().
|
private |
Definition at line 90 of file CostFunctionCrowdData.h.
Referenced by CostFunctionCrowdData::get_wgt().
class qmcplusplus::QMCCostFunction |
Implements wave-function optimization.
Optimization by correlated sampling method with configurations generated from VMC running on a single thread.
Definition at line 31 of file QMCCostFunction.h.
Public Member Functions | |
QMCCostFunction (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm) | |
Constructor. More... | |
~QMCCostFunction () override | |
Destructor. More... | |
void | getConfigurations (const std::string &aroot) override |
void | checkConfigurations (EngineHandle &handle) override |
evaluate everything before optimization More... | |
void | resetPsi (bool final_reset=false) override |
reset the wavefunction More... | |
void | GradCost (std::vector< Return_rt > &PGradient, const std::vector< Return_rt > &PM, Return_rt FiniteDiff=0) override |
Return_rt | fillOverlapHamiltonianMatrices (Matrix< Return_rt > &Left, Matrix< Return_rt > &Right) override |
![]() | |
QMCCostFunctionBase (ParticleSet &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm) | |
Constructor. More... | |
~QMCCostFunctionBase () override | |
Destructor. More... | |
bool | put (xmlNodePtr cur) |
process xml node More... | |
void | resetCostFunction (std::vector< xmlNodePtr > &cset) |
Return_rt & | Params (int i) override |
assign optimization parameter i More... | |
Return_t | Params (int i) const override |
return optimization parameter i More... | |
int | getType (int i) const |
Return_rt | Cost (bool needGrad=true) override |
return the cost value for CGMinimization More... | |
Return_rt | computedCost () |
return the cost value for CGMinimization More... | |
void | printEstimates () |
void | GradCost (std::vector< Return_rt > &PGradient, const std::vector< Return_rt > &PM, Return_rt FiniteDiff=0) override |
return the gradient of cost value for CGMinimization More... | |
int | getNumParams () const override |
return the number of optimizable parameters More... | |
int | getNumSamples () const |
return the global number of samples More... | |
void | setNumSamples (int newNumSamples) |
void | getParameterTypes (std::vector< int > &types) const |
void | Report () override |
dump the current parameters and other report More... | |
void | reportParameters () |
report parameters at the end More... | |
void | reportParametersH5 () |
report parameters in HDF5 at the end More... | |
int | getReportCounter () const |
return the counter which keeps track of optimization steps More... | |
void | setWaveFunctionNode (xmlNodePtr cur) |
void | setTargetEnergy (Return_rt et) |
void | setRootName (const std::string &aroot) |
void | setStream (std::ostream *os) |
void | addCoefficients (xmlXPathContextPtr acontext, const char *cname) |
add coefficient or coefficients More... | |
void | printCJParams (xmlNodePtr cur, std::string &rname) |
void | addCJParams (xmlXPathContextPtr acontext, const char *cname) |
void | setRng (RefVector< RandomBase< FullPrecRealType >> r) |
bool | getneedGrads () const |
void | setneedGrads (bool tf) |
void | setDMC () |
std::string | getParamName (int i) const override |
const opt_variables_type & | getOptVariables () const |
Return_rt | getVariance () const |
return variance after checkConfigurations More... | |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
![]() | |
CloneManager () | |
Constructor. More... | |
virtual | ~CloneManager () |
virtual destructor More... | |
void | makeClones (MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &ham) |
void | makeClones (MCWalkerConfiguration &w, std::vector< TrialWaveFunction *> &psi, std::vector< QMCHamiltonian *> &ham) |
void | makeClones (MCWalkerConfiguration &wg, TrialWaveFunction &guide) |
void | makeClones (TrialWaveFunction &guide) |
RealType | acceptRatio () const |
Protected Member Functions | |
EffectiveWeight | correlatedSampling (bool needGrad=true) override |
run correlated sampling return effective walkers ( w_i)^2/(Nw * w^2_i) More... | |
![]() | |
bool | checkParameters () |
Apply constraints on the optimizables. More... | |
void | updateXmlNodes () |
bool | isEffectiveWeightValid (EffectiveWeight effective_weight) const |
check the validity of the effective weight calculated by correlatedSampling More... | |
UniqueOptObjRefs | extractOptimizableObjects (TrialWaveFunction &psi) const |
survey all the optimizable objects More... | |
void | resetOptimizableObjects (TrialWaveFunction &psi, const opt_variables_type &opt_variables) const |
![]() | |
RefVector< WalkerLogCollector > | getWalkerLogCollectorRefs () |
Protected Attributes | |
std::vector< std::unique_ptr< HamiltonianRef > > | H_KE_Node |
std::vector< Matrix< Return_rt > * > | RecordsOnNode |
std::vector< Matrix< Return_t > * > | DerivRecords |
Temp derivative properties and Hderivative properties of all the walkers. More... | |
std::vector< Matrix< Return_rt > * > | HDerivRecords |
Return_rt | CSWeight |
NewTimer & | fill_timer_ |
![]() | |
ParticleSet & | W |
Particle set. More... | |
TrialWaveFunction & | Psi |
Trial function. More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
bool | Write2OneXml |
if true, do not write the *.opt.#.xml More... | |
int | PowerE |
|E-E_T|^PowerE is used for the cost function More... | |
int | NumCostCalls |
number of times cost function evaluated More... | |
int | NumSamples |
global number of samples to use in correlated sampling More... | |
int | NumOptimizables |
total number of optimizable variables More... | |
int | ReportCounter |
counter for output More... | |
Return_rt | w_en |
weights for energy and variance in the cost function More... | |
Return_rt | w_var |
Return_rt | w_abs |
Return_rt | w_w |
Return_rt | CostValue |
value of the cost function More... | |
Return_rt | Etarget |
target energy More... | |
Return_rt | EtargetEff |
real target energy with the Correlation Factor More... | |
Return_rt | MinNumWalkers |
fraction of the number of walkers below which the costfunction becomes invalid More... | |
Return_rt | MaxWeight |
maximum weight beyond which the weight is set to 1 More... | |
Return_rt | curAvg |
current Average More... | |
Return_rt | curVar |
current Variance More... | |
Return_rt | curAvg_w |
current weighted average (correlated sampling) More... | |
Return_rt | curVar_w |
current weighted variance (correlated sampling) More... | |
Return_rt | curVar_abs |
current variance of SUM_ABSE_WGT/SUM_WGT More... | |
Return_rt | w_beta |
Return_rt | vmc_or_dmc |
bool | needGrads |
std::string | targetExcitedStr |
whether we are targeting an excited state More... | |
bool | targetExcited |
whether we are targeting an excited state More... | |
double | omega_shift |
the shift to use when targeting an excited state More... | |
opt_variables_type | OptVariables |
list of optimizables More... | |
opt_variables_type | OptVariablesForPsi |
full list of optimizables More... | |
opt_variables_type | InitVariables |
std::vector< TinyVector< int, 2 > > | equalVarMap |
index mapping for <equal> constraints More... | |
std::vector< TinyVector< int, 2 > > | negateVarMap |
index mapping for <negate> constraints More... | |
std::ostream * | msg_stream |
stream to which progress is sent More... | |
xmlNodePtr | m_wfPtr |
xml node to be dumped More... | |
xmlDocPtr | m_doc_out |
document node to be dumped More... | |
std::map< std::string, xmlNodePtr > | paramNodes |
parameters to be updated` More... | |
std::map< std::string, xmlNodePtr > | coeffNodes |
coefficients to be updated More... | |
std::map< std::string, std::pair< xmlNodePtr, std::string > > | attribNodes |
attributes to be updated More... | |
std::string | RootName |
string for the file root More... | |
UPtrVector< RandomBase< FullPrecRealType > > | RngSaved |
Random number generators. More... | |
std::vector< RandomBase< FullPrecRealType > * > | MoverRng |
std::vector< std::string > | variational_subset_names |
optimized parameter names More... | |
std::vector< Return_rt > | SumValue |
Sum of energies and weights for averages. More... | |
Matrix< Return_rt > | Records |
Saved properties of all the walkers. More... | |
std::vector< ParticleGradient * > | dLogPsi |
Fixed Gradients , ![]() | |
std::vector< ParticleLaplacian * > | d2LogPsi |
Fixed Laplacian , ![]() | |
std::unique_ptr< std::ostream > | debug_stream |
stream for debug More... | |
bool | do_override_output |
Flag on whether the variational parameter override is output to the new wavefunction. More... | |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
![]() | |
const IndexType | NumThreads |
number of threads More... | |
std::vector< QMCUpdateBase * > | Movers |
update engines More... | |
std::vector< EstimatorManagerBase * > | estimatorClones |
estimator managers More... | |
std::vector< TraceManager * > | traceClones |
trace managers More... | |
UPtrVector< WalkerLogCollector > | wlog_collectors |
trace collectors More... | |
UPtrVector< CSUpdateBase > | CSMovers |
std::vector< int > | wPerRank |
Walkers per MPI rank. More... | |
QMCCostFunction | ( | MCWalkerConfiguration & | w, |
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
Communicate * | comm | ||
) |
Constructor.
Definition at line 28 of file QMCCostFunction.cpp.
References qmcplusplus::app_log(), and QMCCostFunction::CSWeight.
|
override |
Destructor.
Clean up the vector.
Definition at line 38 of file QMCCostFunction.cpp.
References qmcplusplus::delete_iter(), QMCCostFunction::DerivRecords, QMCCostFunction::HDerivRecords, and QMCCostFunction::RecordsOnNode.
|
overridevirtual |
evaluate everything before optimization
Implements QMCCostFunctionBase.
Definition at line 226 of file QMCCostFunction.cpp.
References Communicate::allreduce(), qmcplusplus::app_log(), Vector< T, Alloc >::begin(), copy(), QMCCostFunctionBase::d2LogPsi, QMCCostFunction::DerivRecords, QMCCostFunctionBase::dLogPsi, Vector< T, Alloc >::end(), QMCCostFunctionBase::ENERGY_FIXED, QMCCostFunctionBase::ENERGY_NEW, QMCCostFunctionBase::ENERGY_TOT, QMCCostFunctionBase::Etarget, CloneManager::hClones, QMCCostFunction::HDerivRecords, MCWalkerConfiguration::loadSample(), QMCCostFunctionBase::LOGPSI_FIXED, QMCCostFunctionBase::LOGPSI_FREE, QMCCostFunctionBase::MoverRng, MPIObjectBase::myComm, QMCCostFunctionBase::needGrads, QMCCostFunctionBase::NumOptimizables, MCWalkerConfiguration::numSamples(), QMCCostFunctionBase::NumSamples, CloneManager::NumThreads, omp_get_thread_num(), QMCCostFunctionBase::OptVariablesForPsi, CloneManager::psiClones, QMCCostFunction::RecordsOnNode, QMCCostFunctionBase::ReportCounter, QMCCostFunctionBase::REWEIGHT, QMCCostFunctionBase::RngSaved, VariableSet::setComputed(), QMCCostFunctionBase::setTargetEnergy(), QMCCostFunctionBase::SUM_ABSE_BARE, QMCCostFunctionBase::SUM_E_BARE, QMCCostFunctionBase::SUM_E_WGT, QMCCostFunctionBase::SUM_ESQ_BARE, QMCCostFunctionBase::SUM_ESQ_WGT, QMCCostFunctionBase::SUM_INDEX_SIZE, QMCCostFunctionBase::SUM_WGT, QMCCostFunctionBase::SUM_WGTSQ, QMCCostFunctionBase::SumValue, ParticleSet::update(), CloneManager::wClones, and CloneManager::wPerRank.
|
overrideprotectedvirtual |
run correlated sampling return effective walkers ( w_i)^2/(Nw * w^2_i)
Implements QMCCostFunctionBase.
Definition at line 515 of file QMCCostFunction.cpp.
References qmcplusplus::abs(), Communicate::allreduce(), Communicate::barrier(), OHMMS::Controller, QMCCostFunction::CSWeight, QMCCostFunctionBase::d2LogPsi, QMCCostFunction::DerivRecords, QMCCostFunctionBase::dLogPsi, QMCCostFunctionBase::ENERGY_FIXED, QMCCostFunctionBase::ENERGY_NEW, QMCCostFunctionBase::EtargetEff, qmcplusplus::exp(), ParticleSet::G, QMCCostFunction::H_KE_Node, CloneManager::hClones, QMCCostFunction::HDerivRecords, ParticleSet::L, MCWalkerConfiguration::loadSample(), QMCCostFunctionBase::LOGPSI_FREE, QMCCostFunctionBase::MaxWeight, omptarget::min(), QMCCostFunctionBase::MoverRng, MPIObjectBase::myComm, QMCCostFunctionBase::NumOptimizables, MCWalkerConfiguration::numSamples(), QMCCostFunctionBase::NumSamples, CloneManager::NumThreads, omp_get_thread_num(), QMCCostFunctionBase::OptVariablesForPsi, qmcplusplus::pow(), QMCCostFunctionBase::PowerE, CloneManager::psiClones, VariableSet::recompute(), QMCCostFunction::RecordsOnNode, QMCCostFunctionBase::REWEIGHT, QMCCostFunctionBase::RngSaved, QMCCostFunctionBase::SUM_ABSE_BARE, QMCCostFunctionBase::SUM_ABSE_WGT, QMCCostFunctionBase::SUM_E_BARE, QMCCostFunctionBase::SUM_E_WGT, QMCCostFunctionBase::SUM_ESQ_BARE, QMCCostFunctionBase::SUM_ESQ_WGT, QMCCostFunctionBase::SUM_WGT, QMCCostFunctionBase::SUM_WGTSQ, QMCCostFunctionBase::SumValue, ParticleSet::update(), QMCCostFunctionBase::vmc_or_dmc, CloneManager::wClones, and CloneManager::wPerRank.
Referenced by QMCCostFunction::GradCost().
|
overridevirtual |
Implements QMCCostFunctionBase.
Definition at line 641 of file QMCCostFunction.cpp.
References Communicate::allreduce(), qmcplusplus::conj(), QMCCostFunctionBase::curAvg_w, QMCCostFunction::DerivRecords, QMCCostFunctionBase::ENERGY_NEW, QMCCostFunction::fill_timer_, QMCCostFunctionBase::getNumParams(), QMCCostFunction::HDerivRecords, MPIObjectBase::myComm, CloneManager::NumThreads, qmcplusplus::Units::distance::pm, QMCCostFunction::RecordsOnNode, QMCCostFunctionBase::REWEIGHT, QMCCostFunctionBase::SUM_E_WGT, QMCCostFunctionBase::SUM_ESQ_WGT, QMCCostFunctionBase::SUM_WGT, QMCCostFunctionBase::SumValue, QMCCostFunctionBase::w_beta, and CloneManager::wClones.
|
overridevirtual |
Implements QMCCostFunctionBase.
Definition at line 170 of file QMCCostFunction.cpp.
References qmcplusplus::app_log(), QMCCostFunctionBase::d2LogPsi, qmcplusplus::delete_iter(), QMCCostFunction::DerivRecords, QMCCostFunctionBase::dLogPsi, ParticleSet::getTotalNum(), QMCCostFunction::H_KE_Node, CloneManager::hClones, QMCCostFunction::HDerivRecords, CloneManager::NumThreads, QMCCostFunction::RecordsOnNode, QMCCostFunctionBase::W, CloneManager::wClones, and CloneManager::wPerRank.
|
override |
Definition at line 45 of file QMCCostFunction.cpp.
References qmcplusplus::abs(), Communicate::allreduce(), QMCCostFunction::correlatedSampling(), QMCCostFunctionBase::Cost(), QMCCostFunctionBase::curAvg, QMCCostFunctionBase::curAvg_w, QMCCostFunctionBase::curVar_w, QMCCostFunction::DerivRecords, qmcplusplus::Units::charge::e, QMCCostFunctionBase::ENERGY_NEW, QMCCostFunctionBase::EtargetEff, QMCCostFunction::HDerivRecords, QMCCostFunctionBase::isEffectiveWeightValid(), MPIObjectBase::myComm, QMCCostFunctionBase::NumOptimizables, QMCCostFunctionBase::NumSamples, CloneManager::NumThreads, QMCCostFunctionBase::OptVariables, qmcplusplus::Units::distance::pm, qmcplusplus::pow(), QMCCostFunctionBase::PowerE, QMCCostFunction::RecordsOnNode, QMCCostFunction::resetPsi(), QMCCostFunctionBase::REWEIGHT, QMCCostFunctionBase::SUM_E_WGT, QMCCostFunctionBase::SUM_ESQ_WGT, QMCCostFunctionBase::SUM_WGT, QMCCostFunctionBase::SumValue, QMCCostFunctionBase::w_abs, QMCCostFunctionBase::w_en, QMCCostFunctionBase::w_var, QMCCostFunctionBase::w_w, and CloneManager::wClones.
|
overridevirtual |
reset the wavefunction
Implements QMCCostFunctionBase.
Definition at line 498 of file QMCCostFunction.cpp.
References QMCCostFunctionBase::equalVarMap, QMCCostFunctionBase::OptVariables, QMCCostFunctionBase::OptVariablesForPsi, QMCCostFunctionBase::Psi, CloneManager::psiClones, QMCCostFunctionBase::resetOptimizableObjects(), and VariableSet::size().
Referenced by QMCCostFunction::GradCost().
|
protected |
Definition at line 61 of file QMCCostFunction.h.
Referenced by QMCCostFunction::correlatedSampling(), and QMCCostFunction::QMCCostFunction().
Temp derivative properties and Hderivative properties of all the walkers.
Definition at line 59 of file QMCCostFunction.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunction::correlatedSampling(), QMCCostFunction::fillOverlapHamiltonianMatrices(), QMCCostFunction::getConfigurations(), QMCCostFunction::GradCost(), and QMCCostFunction::~QMCCostFunction().
|
protected |
Definition at line 70 of file QMCCostFunction.h.
Referenced by QMCCostFunction::fillOverlapHamiltonianMatrices().
|
protected |
Definition at line 54 of file QMCCostFunction.h.
Referenced by QMCCostFunction::correlatedSampling(), and QMCCostFunction::getConfigurations().
|
protected |
Definition at line 60 of file QMCCostFunction.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunction::correlatedSampling(), QMCCostFunction::fillOverlapHamiltonianMatrices(), QMCCostFunction::getConfigurations(), QMCCostFunction::GradCost(), and QMCCostFunction::~QMCCostFunction().
|
protected |
Definition at line 55 of file QMCCostFunction.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunction::correlatedSampling(), QMCCostFunction::fillOverlapHamiltonianMatrices(), QMCCostFunction::getConfigurations(), QMCCostFunction::GradCost(), and QMCCostFunction::~QMCCostFunction().
class qmcplusplus::QMCCostFunctionBase |
Implements wave-function optimization.
Optimization by correlated sampling method with configurations generated from VMC.
Definition at line 46 of file QMCCostFunctionBase.h.
Public Types | |
enum | FieldIndex_OPT { LOGPSI_FIXED = 0, LOGPSI_FREE = 1, ENERGY_TOT = 2, ENERGY_FIXED = 3, ENERGY_NEW = 4, REWEIGHT = 5 } |
enum | SumIndex_OPT { SUM_E_BARE = 0, SUM_ESQ_BARE, SUM_ABSE_BARE, SUM_E_WGT, SUM_ESQ_WGT, SUM_ABSE_WGT, SUM_WGT, SUM_WGTSQ, SUM_INDEX_SIZE } |
using | EffectiveWeight = QMCTraits::QTFull::RealType |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
Public Member Functions | |
QMCCostFunctionBase (ParticleSet &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm) | |
Constructor. More... | |
~QMCCostFunctionBase () override | |
Destructor. More... | |
bool | put (xmlNodePtr cur) |
process xml node More... | |
void | resetCostFunction (std::vector< xmlNodePtr > &cset) |
Return_rt & | Params (int i) override |
assign optimization parameter i More... | |
Return_t | Params (int i) const override |
return optimization parameter i More... | |
int | getType (int i) const |
Return_rt | Cost (bool needGrad=true) override |
return the cost value for CGMinimization More... | |
Return_rt | computedCost () |
return the cost value for CGMinimization More... | |
void | printEstimates () |
void | GradCost (std::vector< Return_rt > &PGradient, const std::vector< Return_rt > &PM, Return_rt FiniteDiff=0) override |
return the gradient of cost value for CGMinimization More... | |
int | getNumParams () const override |
return the number of optimizable parameters More... | |
int | getNumSamples () const |
return the global number of samples More... | |
void | setNumSamples (int newNumSamples) |
virtual void | resetPsi (bool final_reset=false)=0 |
reset the wavefunction More... | |
void | getParameterTypes (std::vector< int > &types) const |
void | Report () override |
dump the current parameters and other report More... | |
void | reportParameters () |
report parameters at the end More... | |
void | reportParametersH5 () |
report parameters in HDF5 at the end More... | |
int | getReportCounter () const |
return the counter which keeps track of optimization steps More... | |
void | setWaveFunctionNode (xmlNodePtr cur) |
void | setTargetEnergy (Return_rt et) |
void | setRootName (const std::string &aroot) |
void | setStream (std::ostream *os) |
void | addCoefficients (xmlXPathContextPtr acontext, const char *cname) |
add coefficient or coefficients More... | |
void | printCJParams (xmlNodePtr cur, std::string &rname) |
void | addCJParams (xmlXPathContextPtr acontext, const char *cname) |
virtual Return_rt | fillOverlapHamiltonianMatrices (Matrix< Return_rt > &Left, Matrix< Return_rt > &Right)=0 |
virtual void | getConfigurations (const std::string &aroot)=0 |
virtual void | checkConfigurations (EngineHandle &handle)=0 |
void | setRng (RefVector< RandomBase< FullPrecRealType >> r) |
bool | getneedGrads () const |
void | setneedGrads (bool tf) |
void | setDMC () |
std::string | getParamName (int i) const override |
const opt_variables_type & | getOptVariables () const |
Return_rt | getVariance () const |
return variance after checkConfigurations More... | |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
Public Attributes | |
bool | reportH5 |
Save opt parameters to HDF5. More... | |
bool | CI_Opt |
std::string | newh5 |
Path and name of the HDF5 prefix where CI coeffs are saved. More... | |
Protected Types | |
using | ParticleGradient = ParticleSet::ParticleGradient |
Saved derivative properties and Hderivative properties of all the walkers. More... | |
using | ParticleLaplacian = ParticleSet::ParticleLaplacian |
Protected Member Functions | |
bool | checkParameters () |
Apply constraints on the optimizables. More... | |
void | updateXmlNodes () |
virtual EffectiveWeight | correlatedSampling (bool needGrad=true)=0 |
run correlated sampling return effective walkers ( w_i)^2/(Nw * w^2_i) More... | |
bool | isEffectiveWeightValid (EffectiveWeight effective_weight) const |
check the validity of the effective weight calculated by correlatedSampling More... | |
UniqueOptObjRefs | extractOptimizableObjects (TrialWaveFunction &psi) const |
survey all the optimizable objects More... | |
void | resetOptimizableObjects (TrialWaveFunction &psi, const opt_variables_type &opt_variables) const |
Protected Attributes | |
ParticleSet & | W |
Particle set. More... | |
TrialWaveFunction & | Psi |
Trial function. More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
bool | Write2OneXml |
if true, do not write the *.opt.#.xml More... | |
int | PowerE |
|E-E_T|^PowerE is used for the cost function More... | |
int | NumCostCalls |
number of times cost function evaluated More... | |
int | NumSamples |
global number of samples to use in correlated sampling More... | |
int | NumOptimizables |
total number of optimizable variables More... | |
int | ReportCounter |
counter for output More... | |
Return_rt | w_en |
weights for energy and variance in the cost function More... | |
Return_rt | w_var |
Return_rt | w_abs |
Return_rt | w_w |
Return_rt | CostValue |
value of the cost function More... | |
Return_rt | Etarget |
target energy More... | |
Return_rt | EtargetEff |
real target energy with the Correlation Factor More... | |
Return_rt | MinNumWalkers |
fraction of the number of walkers below which the costfunction becomes invalid More... | |
Return_rt | MaxWeight |
maximum weight beyond which the weight is set to 1 More... | |
Return_rt | curAvg |
current Average More... | |
Return_rt | curVar |
current Variance More... | |
Return_rt | curAvg_w |
current weighted average (correlated sampling) More... | |
Return_rt | curVar_w |
current weighted variance (correlated sampling) More... | |
Return_rt | curVar_abs |
current variance of SUM_ABSE_WGT/SUM_WGT More... | |
Return_rt | w_beta |
Return_rt | vmc_or_dmc |
bool | needGrads |
std::string | targetExcitedStr |
whether we are targeting an excited state More... | |
bool | targetExcited |
whether we are targeting an excited state More... | |
double | omega_shift |
the shift to use when targeting an excited state More... | |
opt_variables_type | OptVariables |
list of optimizables More... | |
opt_variables_type | OptVariablesForPsi |
full list of optimizables More... | |
opt_variables_type | InitVariables |
std::vector< TinyVector< int, 2 > > | equalVarMap |
index mapping for <equal> constraints More... | |
std::vector< TinyVector< int, 2 > > | negateVarMap |
index mapping for <negate> constraints More... | |
std::ostream * | msg_stream |
stream to which progress is sent More... | |
xmlNodePtr | m_wfPtr |
xml node to be dumped More... | |
xmlDocPtr | m_doc_out |
document node to be dumped More... | |
std::map< std::string, xmlNodePtr > | paramNodes |
parameters to be updated` More... | |
std::map< std::string, xmlNodePtr > | coeffNodes |
coefficients to be updated More... | |
std::map< std::string, std::pair< xmlNodePtr, std::string > > | attribNodes |
attributes to be updated More... | |
std::string | RootName |
string for the file root More... | |
UPtrVector< RandomBase< FullPrecRealType > > | RngSaved |
Random number generators. More... | |
std::vector< RandomBase< FullPrecRealType > * > | MoverRng |
std::vector< std::string > | variational_subset_names |
optimized parameter names More... | |
std::vector< Return_rt > | SumValue |
Sum of energies and weights for averages. More... | |
Matrix< Return_rt > | Records |
Saved properties of all the walkers. More... | |
std::vector< ParticleGradient * > | dLogPsi |
Fixed Gradients , ![]() | |
std::vector< ParticleLaplacian * > | d2LogPsi |
Fixed Laplacian , ![]() | |
std::unique_ptr< std::ostream > | debug_stream |
stream for debug More... | |
bool | do_override_output |
Flag on whether the variational parameter override is output to the new wavefunction. More... | |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
Definition at line 71 of file QMCCostFunctionBase.h.
Definition at line 72 of file QMCCostFunctionBase.h.
|
protected |
Saved derivative properties and Hderivative properties of all the walkers.
Definition at line 296 of file QMCCostFunctionBase.h.
|
protected |
Definition at line 297 of file QMCCostFunctionBase.h.
enum FieldIndex_OPT |
Enumerator | |
---|---|
LOGPSI_FIXED | |
LOGPSI_FREE | |
ENERGY_TOT | |
ENERGY_FIXED | |
ENERGY_NEW | |
REWEIGHT |
Definition at line 49 of file QMCCostFunctionBase.h.
enum SumIndex_OPT |
Enumerator | |
---|---|
SUM_E_BARE | |
SUM_ESQ_BARE | |
SUM_ABSE_BARE | |
SUM_E_WGT | |
SUM_ESQ_WGT | |
SUM_ABSE_WGT | |
SUM_WGT | |
SUM_WGTSQ | |
SUM_INDEX_SIZE |
Definition at line 58 of file QMCCostFunctionBase.h.
QMCCostFunctionBase | ( | ParticleSet & | w, |
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
Communicate * | comm | ||
) |
Constructor.
Definition at line 33 of file QMCCostFunctionBase.cpp.
References OHMMS::Controller, QMCCostFunctionBase::debug_stream, QMCCostFunctionBase::MinNumWalkers, Communicate::rank(), QMCCostFunctionBase::SUM_INDEX_SIZE, and QMCCostFunctionBase::SumValue.
|
override |
Destructor.
Clean up the vector.
Definition at line 76 of file QMCCostFunctionBase.cpp.
References QMCCostFunctionBase::d2LogPsi, QMCCostFunctionBase::debug_stream, qmcplusplus::delete_iter(), QMCCostFunctionBase::dLogPsi, and QMCCostFunctionBase::m_doc_out.
void addCJParams | ( | xmlXPathContextPtr | acontext, |
const char * | cname | ||
) |
Definition at line 770 of file QMCCostFunctionBase.cpp.
References OhmmsAttributeSet::add(), VariableSet::begin(), QMCCostFunctionBase::coeffNodes, VariableSet::end(), VariableSet::find(), QMCCostFunctionBase::InitVariables, QMCCostFunctionBase::OptVariables, OhmmsAttributeSet::put(), and qmcplusplus::sqrt().
Referenced by QMCCostFunctionBase::updateXmlNodes().
void addCoefficients | ( | xmlXPathContextPtr | acontext, |
const char * | cname | ||
) |
add coefficient or coefficients
acontext | context from which xpath cname is searched |
cname | xpath |
Definition at line 728 of file QMCCostFunctionBase.cpp.
References OhmmsAttributeSet::add(), VariableSet::begin(), QMCCostFunctionBase::coeffNodes, VariableSet::end(), QMCCostFunctionBase::OptVariablesForPsi, and OhmmsAttributeSet::put().
Referenced by QMCCostFunctionBase::updateXmlNodes().
|
pure virtual |
Implemented in QMCCostFunctionBatched, QMCCostFunction, and QMCCostFunctionTest.
|
protected |
Apply constraints on the optimizables.
Here is where constraints should go
Definition at line 288 of file QMCCostFunctionBase.cpp.
QMCCostFunctionBase::Return_rt computedCost | ( | ) |
return the cost value for CGMinimization
Definition at line 141 of file QMCCostFunctionBase.cpp.
References qmcplusplus::abs(), QMCCostFunctionBase::CostValue, QMCCostFunctionBase::curAvg, QMCCostFunctionBase::curAvg_w, QMCCostFunctionBase::curVar, QMCCostFunctionBase::curVar_abs, QMCCostFunctionBase::curVar_w, QMCCostFunctionBase::NumSamples, QMCCostFunctionBase::SUM_ABSE_WGT, QMCCostFunctionBase::SUM_E_BARE, QMCCostFunctionBase::SUM_E_WGT, QMCCostFunctionBase::SUM_ESQ_BARE, QMCCostFunctionBase::SUM_ESQ_WGT, QMCCostFunctionBase::SUM_WGT, QMCCostFunctionBase::SumValue, QMCCostFunctionBase::w_abs, QMCCostFunctionBase::w_en, QMCCostFunctionBase::w_var, and QMCCostFunctionBase::w_w.
Referenced by QMCCostFunctionBase::Cost().
|
protectedpure virtual |
run correlated sampling return effective walkers ( w_i)^2/(Nw * w^2_i)
Implemented in QMCCostFunctionBatched, QMCCostFunction, and QMCCostFunctionTest.
Referenced by QMCCostFunctionBase::Cost().
|
override |
return the cost value for CGMinimization
Definition at line 122 of file QMCCostFunctionBase.cpp.
References QMCCostFunctionBase::computedCost(), QMCCostFunctionBase::correlatedSampling(), QMCCostFunctionBase::isEffectiveWeightValid(), QMCCostFunctionBase::NumCostCalls, and QMCCostFunctionBase::resetPsi().
Referenced by QMCCostFunction::GradCost(), and QMCCostFunctionBatched::GradCost().
|
protected |
survey all the optimizable objects
Definition at line 1074 of file QMCCostFunctionBase.cpp.
References TrialWaveFunction::extractOptimizableObjectRefs(), and QMCCostFunctionBase::variational_subset_names.
Referenced by QMCCostFunctionBase::put(), and QMCCostFunctionBase::resetOptimizableObjects().
|
pure virtual |
Implemented in QMCCostFunctionBatched, QMCCostFunction, and QMCCostFunctionTest.
|
pure virtual |
Implemented in QMCCostFunctionBatched, QMCCostFunction, and QMCCostFunctionTest.
|
inline |
|
inlineoverride |
return the number of optimizable parameters
Definition at line 103 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::OptVariables, and VariableSet::size().
Referenced by QMCCostFunction::fillOverlapHamiltonianMatrices(), QMCCostFunctionBatched::fillOverlapHamiltonianMatrices(), and GradientTest::run().
|
inline |
return the global number of samples
Definition at line 105 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::NumSamples.
|
inline |
Definition at line 166 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::OptVariables.
|
inline |
Definition at line 110 of file QMCCostFunctionBase.h.
References VariableSet::getParameterTypeList(), and QMCCostFunctionBase::OptVariablesForPsi.
Referenced by LinearMethod::getNonLinearRange().
|
inlineoverride |
Definition at line 164 of file QMCCostFunctionBase.h.
References VariableSet::name(), and QMCCostFunctionBase::OptVariables.
Referenced by GradientTest::run().
|
inline |
return the counter which keeps track of optimization steps
Definition at line 123 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::ReportCounter.
|
inline |
Definition at line 91 of file QMCCostFunctionBase.h.
References VariableSet::getType(), and QMCCostFunctionBase::OptVariables.
|
inline |
return variance after checkConfigurations
Definition at line 169 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::SUM_E_WGT, QMCCostFunctionBase::SUM_ESQ_WGT, QMCCostFunctionBase::SUM_WGT, and QMCCostFunctionBase::SumValue.
|
inlineoverride |
return the gradient of cost value for CGMinimization
Definition at line 99 of file QMCCostFunctionBase.h.
Referenced by GradientTest::run().
|
protected |
check the validity of the effective weight calculated by correlatedSampling
Definition at line 1058 of file QMCCostFunctionBase.cpp.
References qmcplusplus::app_log(), QMCCostFunctionBase::MinNumWalkers, and WARNMSG.
Referenced by QMCCostFunctionBase::Cost(), QMCCostFunction::GradCost(), and QMCCostFunctionBatched::GradCost().
|
inlineoverride |
assign optimization parameter i
Definition at line 88 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::OptVariables.
Referenced by GradientTest::run().
|
inlineoverride |
return optimization parameter i
Definition at line 90 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::OptVariables.
void printCJParams | ( | xmlNodePtr | cur, |
std::string & | rname | ||
) |
Definition at line 983 of file QMCCostFunctionBase.cpp.
References VariableSet::begin(), VariableSet::end(), QMCCostFunctionBase::OptVariables, QMCCostFunctionBase::OptVariablesForPsi, and qmcplusplus::sqrt().
Referenced by QMCCostFunctionBase::updateXmlNodes().
void printEstimates | ( | ) |
Definition at line 133 of file QMCCostFunctionBase.cpp.
References qmcplusplus::app_log(), QMCCostFunctionBase::curAvg, QMCCostFunctionBase::curAvg_w, QMCCostFunctionBase::curVar, and QMCCostFunctionBase::curVar_w.
bool put | ( | xmlNodePtr | q | ) |
process xml node
Parses the xml input file for parameter definitions for the wavefunction optimization.
q | current xmlNode |
Must provide a list of the id's of the variables to be optimized. Other available elements
Definition at line 315 of file QMCCostFunctionBase.cpp.
References VariableSet::activate(), OhmmsAttributeSet::add(), ParameterSet::add(), APP_ABORT, qmcplusplus::app_log(), qmcplusplus::app_warning(), TrialWaveFunction::checkOutVariables(), VariableSet::clear(), DEPRECATED, VariableSet::disable(), QMCCostFunctionBase::do_override_output, QMCCostFunctionBase::equalVarMap, QMCCostFunctionBase::Etarget, QMCCostFunctionBase::EtargetEff, QMCCostFunctionBase::extractOptimizableObjects(), VariableSet::getIndex(), TrialWaveFunction::getName(), QMCCostFunctionBase::InitVariables, qmcplusplus::lowerCase(), QMCCostFunctionBase::MaxWeight, QMCCostFunctionBase::MinNumWalkers, QMCCostFunctionBase::msg_stream, MPIObjectBase::myComm, VariableSet::name(), QMCCostFunctionBase::NumOptimizables, QMCCostFunctionBase::omega_shift, QMCCostFunctionBase::OptVariables, QMCCostFunctionBase::OptVariablesForPsi, QMCCostFunctionBase::Psi, ParameterSet::put(), OhmmsAttributeSet::put(), putContent(), Communicate::rank(), QMCCostFunctionBase::resetCostFunction(), VariableSet::resetIndex(), QMCCostFunctionBase::resetPsi(), qmcplusplus::Units::time::s, astring::s, VariableSet::size(), QMCCostFunctionBase::targetExcited, QMCCostFunctionBase::targetExcitedStr, QMCCostFunctionBase::variational_subset_names, QMCCostFunctionBase::w_beta, and QMCCostFunctionBase::Write2OneXml.
|
override |
dump the current parameters and other report
Definition at line 173 of file QMCCostFunctionBase.cpp.
References QMCCostFunctionBase::CostValue, QMCCostFunctionBase::curAvg, QMCCostFunctionBase::curAvg_w, QMCCostFunctionBase::curVar, QMCCostFunctionBase::curVar_abs, QMCCostFunctionBase::curVar_w, QMCCostFunctionBase::debug_stream, QMCCostFunctionBase::m_doc_out, QMCCostFunctionBase::msg_stream, MPIObjectBase::myComm, QMCCostFunctionBase::OptVariables, VariableSet::print(), Communicate::rank(), QMCCostFunctionBase::ReportCounter, QMCCostFunctionBase::resetPsi(), QMCCostFunctionBase::RootName, VariableSet::size(), QMCCostFunctionBase::updateXmlNodes(), and QMCCostFunctionBase::Write2OneXml.
void reportParameters | ( | ) |
report parameters at the end
Definition at line 212 of file QMCCostFunctionBase.cpp.
References TrialWaveFunction::extractOptimizableObjectRefs(), QMCCostFunctionBase::m_doc_out, QMCCostFunctionBase::msg_stream, MPIObjectBase::myComm, QMCCostFunctionBase::OptVariables, VariableSet::print(), QMCCostFunctionBase::Psi, Communicate::rank(), QMCCostFunctionBase::resetPsi(), QMCCostFunctionBase::RootName, QMCCostFunctionBase::updateXmlNodes(), and VariableSet::writeToHDF().
void reportParametersH5 | ( | ) |
report parameters in HDF5 at the end
This function stores optimized CI coefficients in HDF5 Other parameters (Jastors, orbitals), can also be stored to H5 from this function This function should be called before reportParameters() Since it is needed to call updateXmlNodes() and xmlSaveFormatFile() While it is possible to call updateXmlNodes() from QMCLinearOptimize.cpp It is not clean to call xmlSaveFormatFile() from QMCLinearOptimize.cpp.
OptVariables.size() | OptVariables.name(i) OptVariables[i] |
OptVariables.size(): contains the total number of Optimized variables (not Only CI coeff) OptVariables.name(i): the tag of the optimized variable. To store we use the name of the variable OptVariables[i]: The new value of the optimized variable
Definition at line 248 of file QMCCostFunctionBase.cpp.
References QMCCostFunctionBase::CI_Opt, hdf_archive::close(), hdf_archive::create(), QMCCostFunctionBase::msg_stream, MPIObjectBase::myComm, VariableSet::name(), QMCCostFunctionBase::newh5, QMCCostFunctionBase::OptVariables, hdf_archive::push(), Communicate::rank(), QMCCostFunctionBase::RootName, VariableSet::size(), and hdf_archive::write().
void resetCostFunction | ( | std::vector< xmlNodePtr > & | cset | ) |
Definition at line 510 of file QMCCostFunctionBase.cpp.
References OhmmsAttributeSet::add(), OhmmsAttributeSet::put(), putContent(), QMCCostFunctionBase::w_abs, QMCCostFunctionBase::w_en, QMCCostFunctionBase::w_var, and QMCCostFunctionBase::w_w.
Referenced by QMCCostFunctionBase::put().
|
protected |
Definition at line 1099 of file QMCCostFunctionBase.cpp.
References QMCCostFunctionBase::extractOptimizableObjects().
Referenced by QMCCostFunction::resetPsi(), and QMCCostFunctionBatched::resetPsi().
|
pure virtual |
reset the wavefunction
Implemented in QMCCostFunctionBatched, QMCCostFunction, and QMCCostFunctionTest.
Referenced by QMCCostFunctionBase::Cost(), QMCCostFunctionBase::put(), QMCCostFunctionBase::Report(), and QMCCostFunctionBase::reportParameters().
|
inline |
Definition at line 162 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::vmc_or_dmc.
|
inline |
|
inline |
Definition at line 106 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::NumSamples.
void setRng | ( | RefVector< RandomBase< FullPrecRealType >> | r | ) |
Definition at line 85 of file QMCCostFunctionBase.cpp.
References QMCCostFunctionBase::MoverRng, and QMCCostFunctionBase::RngSaved.
|
inline |
Definition at line 129 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::RootName.
Referenced by qmcplusplus::TEST_CASE().
|
inline |
Definition at line 131 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::msg_stream.
void setTargetEnergy | ( | Return_rt | et | ) |
Definition at line 98 of file QMCCostFunctionBase.cpp.
References QMCCostFunctionBase::Etarget, and QMCCostFunctionBase::EtargetEff.
Referenced by QMCCostFunction::checkConfigurations(), and QMCCostFunctionBatched::checkConfigurations().
|
inline |
Definition at line 125 of file QMCCostFunctionBase.h.
References QMCCostFunctionBase::m_wfPtr.
Referenced by qmcplusplus::TEST_CASE().
|
protected |
Definition at line 530 of file QMCCostFunctionBase.cpp.
References OhmmsAttributeSet::add(), QMCCostFunctionBase::addCJParams(), QMCCostFunctionBase::addCoefficients(), QMCCostFunctionBase::attribNodes, QMCCostFunctionBase::CI_Opt, QMCCostFunctionBase::coeffNodes, QMCCostFunctionBase::do_override_output, OhmmsXPathObject::empty(), VariableSet::end(), VariableSet::find(), getContent(), getXMLAttributeValue(), QMCCostFunctionBase::m_doc_out, QMCCostFunctionBase::m_wfPtr, QMCCostFunctionBase::newh5, QMCCostFunctionBase::OptVariablesForPsi, QMCCostFunctionBase::paramNodes, QMCCostFunctionBase::printCJParams(), OhmmsAttributeSet::put(), QMCCostFunctionBase::RootName, and OhmmsXPathObject::size().
Referenced by QMCCostFunctionTest::callUpdateXmlNodes(), QMCCostFunctionBase::Report(), and QMCCostFunctionBase::reportParameters().
|
protected |
attributes to be updated
Definition at line 269 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::updateXmlNodes().
bool CI_Opt |
Definition at line 84 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::reportParametersH5(), and QMCCostFunctionBase::updateXmlNodes().
|
protected |
coefficients to be updated
Definition at line 267 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::addCJParams(), QMCCostFunctionBase::addCoefficients(), and QMCCostFunctionBase::updateXmlNodes().
|
protected |
value of the cost function
Definition at line 203 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), and QMCCostFunctionBase::Report().
|
protected |
current Average
Definition at line 213 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), QMCCostFunctionBase::printEstimates(), and QMCCostFunctionBase::Report().
|
protected |
current weighted average (correlated sampling)
Definition at line 217 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), QMCCostFunction::fillOverlapHamiltonianMatrices(), QMCCostFunctionBatched::fillOverlapHamiltonianMatrices(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), QMCCostFunctionBase::printEstimates(), and QMCCostFunctionBase::Report().
|
protected |
current Variance
Definition at line 215 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), QMCCostFunctionBase::printEstimates(), and QMCCostFunctionBase::Report().
|
protected |
current variance of SUM_ABSE_WGT/SUM_WGT
Definition at line 221 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), and QMCCostFunctionBase::Report().
|
protected |
current weighted variance (correlated sampling)
Definition at line 219 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), QMCCostFunctionBase::printEstimates(), and QMCCostFunctionBase::Report().
|
protected |
Fixed Laplacian , , components.
Definition at line 301 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), QMCCostFunction::getConfigurations(), QMCCostFunctionBatched::getConfigurations(), and QMCCostFunctionBase::~QMCCostFunctionBase().
|
protected |
stream for debug
Definition at line 303 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::QMCCostFunctionBase(), QMCCostFunctionBase::Report(), and QMCCostFunctionBase::~QMCCostFunctionBase().
|
protected |
Fixed Gradients , , components.
Definition at line 299 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), QMCCostFunction::getConfigurations(), QMCCostFunctionBatched::getConfigurations(), and QMCCostFunctionBase::~QMCCostFunctionBase().
|
protected |
Flag on whether the variational parameter override is output to the new wavefunction.
Definition at line 309 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionTest::callUpdateXmlNodes(), QMCCostFunctionBase::put(), and QMCCostFunctionBase::updateXmlNodes().
|
protected |
index mapping for <equal> constraints
Definition at line 250 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::put(), QMCCostFunction::resetPsi(), and QMCCostFunctionBatched::resetPsi().
|
protected |
target energy
Definition at line 205 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunctionBase::put(), and QMCCostFunctionBase::setTargetEnergy().
|
protected |
real target energy with the Correlation Factor
Definition at line 207 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), QMCCostFunctionBase::put(), and QMCCostFunctionBase::setTargetEnergy().
|
protected |
Hamiltonian.
Definition at line 183 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBatched::checkConfigurations(), QMCCostFunctionBatched::correlatedSampling(), and QMCCostFunctionBatched::getConfigurations().
|
protected |
Definition at line 244 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::addCJParams(), and QMCCostFunctionBase::put().
|
protected |
document node to be dumped
Definition at line 263 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionTest::getDoc(), QMCCostFunctionTest::printXml(), QMCCostFunctionBase::Report(), QMCCostFunctionBase::reportParameters(), QMCCostFunctionBase::updateXmlNodes(), and QMCCostFunctionBase::~QMCCostFunctionBase().
|
protected |
xml node to be dumped
Definition at line 261 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::setWaveFunctionNode(), and QMCCostFunctionBase::updateXmlNodes().
|
protected |
maximum weight beyond which the weight is set to 1
Definition at line 211 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), and QMCCostFunctionBase::put().
|
protected |
fraction of the number of walkers below which the costfunction becomes invalid
Definition at line 209 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::isEffectiveWeightValid(), QMCCostFunctionBase::put(), and QMCCostFunctionBase::QMCCostFunctionBase().
|
protected |
Definition at line 275 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), and QMCCostFunctionBase::setRng().
|
protected |
stream to which progress is sent
Definition at line 259 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::put(), QMCCostFunctionBase::Report(), QMCCostFunctionBase::reportParameters(), QMCCostFunctionBase::reportParametersH5(), and QMCCostFunctionBase::setStream().
|
protected |
Definition at line 225 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunctionBase::getneedGrads(), and QMCCostFunctionBase::setneedGrads().
|
protected |
index mapping for <negate> constraints
Definition at line 257 of file QMCCostFunctionBase.h.
std::string newh5 |
Path and name of the HDF5 prefix where CI coeffs are saved.
Definition at line 86 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::reportParametersH5(), and QMCCostFunctionBase::updateXmlNodes().
|
protected |
number of times cost function evaluated
Definition at line 193 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::Cost().
|
protected |
total number of optimizable variables
Definition at line 197 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunction::correlatedSampling(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), QMCCostFunctionBase::put(), and LinearMethodTestSupport::set_samples_and_param().
|
protected |
global number of samples to use in correlated sampling
Definition at line 195 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunctionBase::computedCost(), QMCCostFunction::correlatedSampling(), QMCCostFunctionBase::getNumSamples(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), and QMCCostFunctionBase::setNumSamples().
|
protected |
the shift to use when targeting an excited state
Definition at line 231 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::put().
|
protected |
list of optimizables
Definition at line 234 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::addCJParams(), QMCCostFunctionBase::getNumParams(), QMCCostFunctionBase::getOptVariables(), QMCCostFunctionBase::getParamName(), QMCCostFunctionBase::getType(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), QMCCostFunctionBase::Params(), QMCCostFunctionBase::printCJParams(), QMCCostFunctionBase::put(), QMCCostFunctionBase::Report(), QMCCostFunctionBase::reportParameters(), QMCCostFunctionBase::reportParametersH5(), QMCCostFunction::resetPsi(), QMCCostFunctionBatched::resetPsi(), and LinearMethodTestSupport::set_samples_and_param().
|
protected |
full list of optimizables
The size of OptVariablesForPsi is equal to or larger than that of OptVariables due to the dependent variables. This is used for TrialWaveFunction::resetParameters and is normally the same as OptVariables.
Definition at line 242 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::addCoefficients(), QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), QMCCostFunctionBase::getParameterTypes(), QMCCostFunctionBase::printCJParams(), QMCCostFunctionBase::put(), QMCCostFunction::resetPsi(), QMCCostFunctionBatched::resetPsi(), and QMCCostFunctionBase::updateXmlNodes().
|
protected |
parameters to be updated`
Definition at line 265 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::updateXmlNodes().
|
protected |
|E-E_T|^PowerE is used for the cost function
default PowerE=1
Definition at line 191 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), QMCCostFunction::GradCost(), and QMCCostFunctionBatched::GradCost().
|
protected |
Trial function.
Definition at line 180 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBatched::checkConfigurations(), QMCCostFunctionBatched::correlatedSampling(), QMCCostFunctionBase::put(), QMCCostFunctionBase::reportParameters(), QMCCostFunction::resetPsi(), and QMCCostFunctionBatched::resetPsi().
|
protected |
Saved properties of all the walkers.
Records(iw,field_id) returns the field_id value of the iw-th walker field_id is one of FieldIndex_opt
Definition at line 290 of file QMCCostFunctionBase.h.
|
protected |
counter for output
Definition at line 199 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunctionBase::getReportCounter(), and QMCCostFunctionBase::Report().
bool reportH5 |
Save opt parameters to HDF5.
Definition at line 83 of file QMCCostFunctionBase.h.
|
protected |
Random number generators.
Definition at line 274 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), and QMCCostFunctionBase::setRng().
|
protected |
string for the file root
Definition at line 271 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::Report(), QMCCostFunctionBase::reportParameters(), QMCCostFunctionBase::reportParametersH5(), QMCCostFunctionBase::setRootName(), and QMCCostFunctionBase::updateXmlNodes().
|
protected |
Sum of energies and weights for averages.
SumValues[k] where k is one of SumIndex_opt
Definition at line 284 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::checkConfigurations(), QMCCostFunctionBatched::checkConfigurations(), QMCCostFunctionBase::computedCost(), QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), QMCCostFunction::fillOverlapHamiltonianMatrices(), QMCCostFunctionBatched::fillOverlapHamiltonianMatrices(), LinearMethodTestSupport::getSumValue(), QMCCostFunctionBase::getVariance(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), and QMCCostFunctionBase::QMCCostFunctionBase().
|
protected |
whether we are targeting an excited state
Definition at line 229 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::put().
|
protected |
whether we are targeting an excited state
Definition at line 227 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::put().
|
protected |
optimized parameter names
Definition at line 278 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::extractOptimizableObjects(), and QMCCostFunctionBase::put().
|
protected |
Definition at line 224 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::correlatedSampling(), QMCCostFunctionBatched::correlatedSampling(), and QMCCostFunctionBase::setDMC().
|
protected |
Particle set.
Definition at line 177 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBatched::checkConfigurations(), QMCCostFunctionBatched::correlatedSampling(), QMCCostFunction::getConfigurations(), and QMCCostFunctionBatched::getConfigurations().
|
protected |
Definition at line 201 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), and QMCCostFunctionBase::resetCostFunction().
|
protected |
Definition at line 223 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunction::fillOverlapHamiltonianMatrices(), QMCCostFunctionBatched::fillOverlapHamiltonianMatrices(), and QMCCostFunctionBase::put().
|
protected |
weights for energy and variance in the cost function
Definition at line 201 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), and QMCCostFunctionBase::resetCostFunction().
|
protected |
Definition at line 201 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), and QMCCostFunctionBase::resetCostFunction().
|
protected |
Definition at line 201 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::computedCost(), QMCCostFunction::GradCost(), QMCCostFunctionBatched::GradCost(), and QMCCostFunctionBase::resetCostFunction().
|
protected |
if true, do not write the *.opt.#.xml
Definition at line 186 of file QMCCostFunctionBase.h.
Referenced by QMCCostFunctionBase::put(), and QMCCostFunctionBase::Report().
class qmcplusplus::QMCFixedSampleLinearOptimize |
Implements wave-function optimization.
Optimization by correlated sampling method with configurations generated from VMC.
Definition at line 43 of file QMCFixedSampleLinearOptimize.h.
Public Member Functions | |
QMCFixedSampleLinearOptimize (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *) | |
Constructor. More... | |
~QMCFixedSampleLinearOptimize () override | |
Destructor. More... | |
bool | run () override |
Run the Optimization algorithm. More... | |
bool | put (xmlNodePtr cur) override |
preprocess xml node More... | |
bool | processOptXML (xmlNodePtr cur, const std::string &vmcMove, bool reportH5) |
process xml node value (parameters for both VMC and OPT) for the actual optimization More... | |
RealType | Func (RealType dl) override |
void | setWaveFunctionNode (xmlNodePtr cur) |
QMCRunType | getRunType () override |
![]() | |
QMCDriver (const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm, const std::string &QMC_driver_type, bool enable_profiling=false) | |
Constructor. More... | |
~QMCDriver () override | |
int | current () const |
return current step More... | |
void | setUpdateMode (bool pbyp) override |
set the update mode More... | |
void | setStatus (const std::string &aname, const std::string &h5name, bool append) override |
Set the status of the QMCDriver. More... | |
void | add_H_and_Psi (QMCHamiltonian *h, TrialWaveFunction *psi) override |
add QMCHamiltonian/TrialWaveFunction pair for multiple More... | |
void | process (xmlNodePtr cur) override |
initialize with xmlNode More... | |
xmlNodePtr | getQMCNode () |
return a xmlnode with update More... | |
void | putWalkers (std::vector< xmlNodePtr > &wset) override |
Read walker configurations from *.config.h5 files. More... | |
void | putTraces (xmlNodePtr txml) override |
void | requestTraces (bool traces) override |
void | putWalkerLogs (xmlNodePtr wlxml) override |
void | requestWalkerLogs (bool allow_walker_logs_) override |
std::string | getEngineName () override |
template<class PDT > | |
void | setValue (const std::string &aname, PDT x) |
void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) override |
set the BranchEngineType More... | |
std::unique_ptr< BranchEngineType > | getBranchEngine () override |
return BranchEngineType* More... | |
int | addObservable (const std::string &aname) |
RealType | getObservable (int i) |
void | setTau (RealType i) |
void | setWalkerOffsets () |
set global offsets of the walkers More... | |
RefVector< RandomBase< FullPrecRealType > > | getRngRefs () const |
return the random generators More... | |
RandomBase< FullPrecRealType > & | getRng (int i) override |
return the i-th random generator More... | |
unsigned long | getDriverMode () override |
![]() | |
virtual | ~QMCDriverInterface () |
virtual void | setBranchEngine (std::unique_ptr< BranchEngineType > &&be) |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
![]() | |
Real | getLowestEigenvector (Matrix< Real > &A, std::vector< Real > &ev) const |
Real | getNonLinearRescale (std::vector< Real > &dP, Matrix< Real > &S, const QMCCostFunctionBase &optTarget) const |
Private Member Functions | |
bool | ValidCostFunction (bool valid) |
bool | is_best_cost (const int ii, const std::vector< RealType > &cv, const std::vector< double > &sh, const RealType ic) const |
bool | adaptive_three_shift_run () |
bool | one_shift_run () |
bool | descent_run () |
bool | test_run () |
void | solveShiftsWithoutLMYEngine (const std::vector< double > &shifts_i, const std::vector< double > &shiffts_s, std::vector< std::vector< RealType >> ¶meterDirections) |
std::vector< double > | prepare_shifts (const double central_shift) const |
void | print_cost_summary_header () |
void | print_cost_summary (const double si, const double ss, const RealType mc, const RealType cv, const int ind, const int bi, const bool gu) |
void | start () |
common operation to start optimization, used by the derived classes More... | |
void | finish () |
common operation to finish optimization, used by the derived classes More... | |
void | generateSamples () |
Private Attributes | |
std::unique_ptr< GradientTest > | testEngineObj |
std::unique_ptr< DescentEngine > | descentEngineObj |
std::unique_ptr< HybridEngine > | hybridEngineObj |
int | nstabilizers |
RealType | stabilizerScale |
RealType | bigChange |
RealType | exp0 |
RealType | exp1 |
RealType | stepsize |
RealType | savedQuadstep |
std::string | StabilizerMethod |
RealType | w_beta |
int | eigCG |
number of previous steps to orthogonalize to. More... | |
int | TotalCGSteps |
total number of cg steps per iterations More... | |
RealType | bestShift_i |
the previous best identity shift More... | |
RealType | bestShift_s |
the previous best overlap shift More... | |
RealType | shift_i_input |
current shift_i, shift_s input values More... | |
RealType | shift_s_input |
std::bitset< 2 > | accept_history |
accept history, remember the last 2 iterations, value 00, 01, 10, 11 More... | |
RealType | shift_s_base |
Shift_s adjustment base. More... | |
int | num_shifts |
number of shifts we will try More... | |
RealType | max_relative_cost_change |
the maximum relative change in the cost function for the adaptive three-shift scheme More... | |
RealType | max_param_change |
max amount a parameter may change relative to current wave function weight More... | |
RealType | cost_increase_tol |
the tolerance to cost function increases when choosing the best shift in the adaptive shift method More... | |
RealType | target_shift_i |
the shift_i value that the adaptive shift method should aim for More... | |
std::string | targetExcitedStr |
whether we are targeting an excited state More... | |
bool | targetExcited |
whether we are targeting an excited state More... | |
std::string | block_lmStr |
whether we are doing block algorithm More... | |
bool | block_lm |
whether we are doing block algorithm More... | |
int | nblocks |
number of blocks used in block algorithm More... | |
int | nolds |
number of old updates kept More... | |
int | nkept |
number of directions kept More... | |
int | nsamp_comp |
number of samples to do in correlated sampling part More... | |
RealType | omega_shift |
the shift to use when targeting an excited state More... | |
bool | block_first |
whether to do the first part of block lm More... | |
bool | block_second |
whether to do the second part of block lm More... | |
bool | block_third |
whether to do the third part of block lm More... | |
std::string | MinMethod |
OptimizerType | previous_optimizer_type_ |
OptimizerType | current_optimizer_type_ |
bool | doHybrid |
bool | doGradientTest |
bool | do_output_matrices_ |
bool | output_matrices_initialized_ |
OutputMatrix | output_hamiltonian_ |
OutputMatrix | output_overlap_ |
bool | freeze_parameters_ |
std::vector< RealType > | optdir |
std::vector< RealType > | optparam |
int | NumOfVMCWalkers |
total number of VMC walkers More... | |
int | Max_iterations |
Number of iterations maximum before generating new configurations. More... | |
std::unique_ptr< QMCCostFunctionBase > | optTarget |
target cost function to optimize More... | |
std::unique_ptr< QMCDriver > | vmcEngine |
vmc engine More... | |
xmlNodePtr | wfNode |
xml node to be dumped More... | |
RealType | param_tol |
NewTimer & | generate_samples_timer_ |
NewTimer & | initialize_timer_ |
NewTimer & | eigenvalue_timer_ |
NewTimer & | involvmat_timer_ |
NewTimer & | line_min_timer_ |
NewTimer & | cost_function_timer_ |
Timer | t1 |
Additional Inherited Members | |
![]() | |
enum | { QMC_UPDATE_MODE, QMC_MULTIPLE, QMC_OPTIMIZE, QMC_WARMUP } |
enumeration coupled with QMCMode More... | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
using | Buffer_t = Walker_t::Buffer_t |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
using | BranchEngineType = SimpleFixedNodeBranch |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
![]() | |
enum | { DIM = OHMMS_DIM, DIM_VGL = OHMMS_DIM + 2 } |
using | QTBase = QMCTypes< OHMMS_PRECISION, DIM > |
using | QTFull = QMCTypes< OHMMS_PRECISION_FULL, DIM > |
using | RealType = QTBase::RealType |
using | ComplexType = QTBase::ComplexType |
using | ValueType = QTBase::ValueType |
using | PosType = QTBase::PosType |
using | GradType = QTBase::GradType |
using | TensorType = QTBase::TensorType |
using | IndexType = OHMMS_INDEXTYPE |
define other types More... | |
using | FullPrecRealType = QTFull::RealType |
using | FullPrecValueType = QTFull::ValueType |
using | PropertySetType = RecordNamedProperty< FullPrecRealType > |
define PropertyList_t More... | |
using | PtclGrpIndexes = std::vector< std::pair< int, int > > |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
![]() | |
static Real | selectEigenvalue (std::vector< Real > &eigenvals, Matrix< Real > &eigenvectors, Real zerozero, std::vector< Real > &ev) |
Select eigenvalue and return corresponding scaled eigenvector. More... | |
static Real | getLowestEigenvector_Inv (Matrix< Real > &A, Matrix< Real > &B, std::vector< Real > &ev) |
Solve the generalized eigenvalue problem and return a scaled eigenvector corresponding to the selected eigenvalue. More... | |
static Real | getLowestEigenvector_Gen (Matrix< Real > &A, Matrix< Real > &B, std::vector< Real > &ev) |
Solve the generalized eigenvalue problem and return a scaled eigenvector corresponding to the selected eigenvalue. More... | |
![]() | |
std::bitset< QMC_MODE_MAX > | qmc_driver_mode |
bits to classify QMCDriver More... | |
bool | allow_traces |
whether to allow traces More... | |
xmlNodePtr | traces_xml |
traces xml More... | |
bool | allow_walker_logs |
whether to allow traces More... | |
xmlNodePtr | walker_logs_xml |
traces xml More... | |
EstimatorManagerBase * | Estimators |
Observables manager. More... | |
std::unique_ptr< TraceManager > | Traces |
Traces manager. More... | |
std::unique_ptr< WalkerLogManager > | wlog_manager_ |
Traces manager. More... | |
![]() | |
bool | putQMCInfo (xmlNodePtr cur) |
Parses the xml input file for parameter definitions for a single qmc simulation. More... | |
void | addWalkers (int nwalkers) |
Add walkers to the end of the ensemble of walkers. More... | |
void | recordBlock (int block) override |
record the state of the block More... | |
bool | finalize (int block, bool dumpwalkers=true) |
finalize a qmc section More... | |
std::string | getRotationName (std::string RootName) |
std::string | getLastRotationName (std::string RootName) |
const std::string & | get_root_name () const override |
![]() | |
const ProjectData & | project_data_ |
top-level project data information More... | |
std::unique_ptr< BranchEngineType > | branchEngine |
branch engine More... | |
DriftModifierBase * | DriftModifier |
drift modifer More... | |
bool | ResetRandom |
randomize it More... | |
bool | AppendRun |
flag to append or restart the run More... | |
bool | DumpConfig |
flag to turn off dumping configurations More... | |
bool | IsQMCDriver |
true, if it is a real QMC engine More... | |
int | MyCounter |
the number of times this QMCDriver is executed More... | |
int | kDelay |
the number to delay updates by More... | |
int | Period4CheckPoint |
period of dumping walker configurations and everything else for restart More... | |
int | Period4CheckProperties |
period of dumping walker positions and IDs for Forward Walking More... | |
int | Period4WalkerDump |
period of recording walker configurations More... | |
int | Period4ConfigDump |
period of recording walker positions and IDs for forward walking afterwards More... | |
IndexType | CurrentStep |
current step More... | |
IndexType | nBlocks |
maximum number of blocks More... | |
IndexType | nSteps |
maximum number of steps More... | |
IndexType | nSubSteps |
number of steps between a step: VMCs do not evaluate energies More... | |
IndexType | nWarmupSteps |
number of warmup steps More... | |
IndexType | nAccept |
counter for number of moves accepted More... | |
IndexType | nReject |
counter for number of moves /rejected More... | |
IndexType | nBlocksBetweenRecompute |
the number of blocks between recomptePsi More... | |
IndexType | nTargetWalkers |
the number of walkers More... | |
IndexType | nTargetSamples |
the number of saved samples More... | |
IndexType | nStepsBetweenSamples |
alternate method of setting QMC run parameters More... | |
RealType | nSamplesPerThread |
samples per thread More... | |
RealType | nTargetPopulation |
target population More... | |
RealType | Tau |
timestep More... | |
int | MaxCPUSecs |
maximum cpu in secs More... | |
RealType | m_oneover2tau |
Time-step factor ![]() | |
RealType | m_sqrttau |
Time-step factor ![]() | |
xmlNodePtr | qmcNode |
pointer to qmc node in xml file More... | |
const std::string | QMCType |
type of QMC driver More... | |
std::string | h5FileRoot |
the root of h5File More... | |
std::string | RootName |
root of all the output files More... | |
ParameterSet | m_param |
store any parameter that has to be read from a file More... | |
MCWalkerConfiguration & | W |
walker ensemble More... | |
TrialWaveFunction & | Psi |
trial function More... | |
QMCHamiltonian & | H |
Hamiltonian. More... | |
std::unique_ptr< HDFWalkerOutput > | wOut |
record engine for walkers More... | |
std::vector< TrialWaveFunction * > | Psi1 |
a list of TrialWaveFunctions for multiple method More... | |
std::vector< QMCHamiltonian * > | H1 |
a list of QMCHamiltonians for multiple method More... | |
UPtrVector< RandomBase< FullPrecRealType > > | Rng |
Random number generators. More... | |
std::vector< xmlNodePtr > | mcwalkerNodePtr |
a list of mcwalkerset element More... | |
ParticleSet::ParticlePos | drift |
temporary storage for drift More... | |
ParticleSet::ParticlePos | deltaR |
temporary storage for random displacement More... | |
RealType | SpinMass |
spin mass for spinor calcs More... | |
int | rotation |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
QMCFixedSampleLinearOptimize | ( | const ProjectData & | project_data, |
MCWalkerConfiguration & | w, | ||
TrialWaveFunction & | psi, | ||
QMCHamiltonian & | h, | ||
Communicate * | comm | ||
) |
Constructor.
Definition at line 48 of file QMCFixedSampleLinearOptimize.cpp.
References ParameterSet::add(), qmcplusplus::app_log(), QMCFixedSampleLinearOptimize::bigChange, QMCFixedSampleLinearOptimize::block_lmStr, QMCFixedSampleLinearOptimize::cost_increase_tol, QMCFixedSampleLinearOptimize::exp0, QMCDriver::IsQMCDriver, QMCDriver::m_param, QMCFixedSampleLinearOptimize::Max_iterations, QMCFixedSampleLinearOptimize::max_param_change, QMCFixedSampleLinearOptimize::max_relative_cost_change, QMCFixedSampleLinearOptimize::MinMethod, QMCFixedSampleLinearOptimize::nblocks, QMCFixedSampleLinearOptimize::nkept, QMCFixedSampleLinearOptimize::nolds, NONE, QMCFixedSampleLinearOptimize::nsamp_comp, QMCFixedSampleLinearOptimize::nstabilizers, QMCFixedSampleLinearOptimize::num_shifts, QMCFixedSampleLinearOptimize::omega_shift, QMCFixedSampleLinearOptimize::param_tol, QMCDriver::qmc_driver_mode, QMCDriver::QMC_OPTIMIZE, QMCDriver::RootName, QMCFixedSampleLinearOptimize::shift_i_input, QMCFixedSampleLinearOptimize::shift_s_input, QMCFixedSampleLinearOptimize::stabilizerScale, QMCFixedSampleLinearOptimize::target_shift_i, and QMCFixedSampleLinearOptimize::targetExcitedStr.
|
override |
|
private |
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
common operation to finish optimization, used by the derived classes
Definition at line 1582 of file QMCFixedSampleLinearOptimize.cpp.
References qmcplusplus::app_log(), MCWalkerConfiguration::createWalkers(), WalkerConfigurations::destroyWalkers(), Timer::elapsed(), WalkerConfigurations::getActiveWalkers(), QMCDriver::MyCounter, QMCFixedSampleLinearOptimize::NumOfVMCWalkers, QMCFixedSampleLinearOptimize::optTarget, QMCFixedSampleLinearOptimize::t1, and QMCDriver::W.
Referenced by QMCFixedSampleLinearOptimize::run(), and QMCFixedSampleLinearOptimize::test_run().
|
override |
Definition at line 190 of file QMCFixedSampleLinearOptimize.cpp.
References QMCFixedSampleLinearOptimize::optdir, QMCFixedSampleLinearOptimize::optparam, and QMCFixedSampleLinearOptimize::optTarget.
|
private |
Definition at line 1604 of file QMCFixedSampleLinearOptimize.cpp.
References qmcplusplus::app_log(), QMCDriver::branchEngine, Timer::elapsed(), QMCDriver::h5FileRoot, QMCDriver::nBlocks, QMCDriver::QMC_OPTIMIZE, QMCDriver::QMC_WARMUP, Timer::restart(), QMCDriver::RootName, QMCFixedSampleLinearOptimize::t1, and QMCFixedSampleLinearOptimize::vmcEngine.
|
inlineoverridevirtual |
Implements QMCDriverInterface.
Definition at line 67 of file QMCFixedSampleLinearOptimize.h.
References qmcplusplus::LINEAR_OPTIMIZE.
|
private |
|
private |
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
|
private |
|
private |
bool processOptXML | ( | xmlNodePtr | cur, |
const std::string & | vmcMove, | ||
bool | reportH5 | ||
) |
process xml node value (parameters for both VMC and OPT) for the actual optimization
Definition at line 560 of file QMCFixedSampleLinearOptimize.cpp.
References qmcplusplus::ADAPTIVE, QMCDriver::addWalkers(), qmcplusplus::app_log(), QMCDriver::AppendRun, Communicate::barrier_and_abort(), QMCFixedSampleLinearOptimize::bestShift_i, QMCFixedSampleLinearOptimize::bestShift_s, QMCFixedSampleLinearOptimize::block_lm, QMCFixedSampleLinearOptimize::block_lmStr, RandomNumberControl::Children, OHMMS::Controller, QMCFixedSampleLinearOptimize::cost_increase_tol, QMCFixedSampleLinearOptimize::current_optimizer_type_, qmcplusplus::DESCENT, QMCFixedSampleLinearOptimize::descentEngineObj, QMCFixedSampleLinearOptimize::doHybrid, WalkerConfigurations::getActiveWalkers(), QMCDriver::H, QMCDriver::h5FileRoot, qmcplusplus::lowerCase(), QMCDriver::m_param, QMCFixedSampleLinearOptimize::max_param_change, QMCFixedSampleLinearOptimize::max_relative_cost_change, QMCDriver::mcwalkerNodePtr, QMCFixedSampleLinearOptimize::MinMethod, MPIObjectBase::myComm, QMCFixedSampleLinearOptimize::NumOfVMCWalkers, omp_get_max_threads(), qmcplusplus::ONESHIFTONLY, qmcplusplus::OptimizerNames, QMCFixedSampleLinearOptimize::optTarget, QMCFixedSampleLinearOptimize::previous_optimizer_type_, QMCDriver::project_data_, QMCDriver::Psi, ParameterSet::put(), Communicate::rank(), QMCDriver::RootName, QMCFixedSampleLinearOptimize::shift_i_input, QMCFixedSampleLinearOptimize::shift_s_input, QMCFixedSampleLinearOptimize::targetExcited, QMCFixedSampleLinearOptimize::targetExcitedStr, QMCFixedSampleLinearOptimize::vmcEngine, and QMCDriver::W.
Referenced by QMCFixedSampleLinearOptimize::put().
|
overridevirtual |
preprocess xml node
Parses the xml input file for parameter definitions for the wavefunction optimization.
q | current xmlNode |
Implements QMCDriverInterface.
Definition at line 489 of file QMCFixedSampleLinearOptimize.cpp.
References OhmmsAttributeSet::add(), ParameterSet::add(), qmcplusplus::app_log(), qmcplusplus::app_warning(), QMCFixedSampleLinearOptimize::do_output_matrices_, QMCFixedSampleLinearOptimize::doGradientTest, QMCFixedSampleLinearOptimize::doHybrid, QMCFixedSampleLinearOptimize::freeze_parameters_, getXMLAttributeValue(), QMCFixedSampleLinearOptimize::hybridEngineObj, QMCDriver::m_param, QMCFixedSampleLinearOptimize::MinMethod, MPIObjectBase::myComm, processChildren(), QMCFixedSampleLinearOptimize::processOptXML(), ParameterSet::put(), OhmmsAttributeSet::put(), GradientTestInput::readXML(), and QMCFixedSampleLinearOptimize::testEngineObj.
|
overridevirtual |
Run the Optimization algorithm.
Implements QMCDriverInterface.
Definition at line 213 of file QMCFixedSampleLinearOptimize.cpp.
References qmcplusplus::abs(), qmcplusplus::ADAPTIVE, QMCFixedSampleLinearOptimize::adaptive_three_shift_run(), qmcplusplus::app_log(), Communicate::barrier_and_abort(), QMCFixedSampleLinearOptimize::bigChange, Matrix< T, Alloc >::copy(), QMCFixedSampleLinearOptimize::cost_function_timer_, QMCFixedSampleLinearOptimize::current_optimizer_type_, qmcplusplus::DESCENT, QMCFixedSampleLinearOptimize::descent_run(), QMCFixedSampleLinearOptimize::do_output_matrices_, QMCFixedSampleLinearOptimize::doGradientTest, QMCFixedSampleLinearOptimize::doHybrid, qmcplusplus::Units::charge::e, QMCFixedSampleLinearOptimize::eigenvalue_timer_, qmcplusplus::exp(), QMCFixedSampleLinearOptimize::exp0, QMCFixedSampleLinearOptimize::finish(), QMCDriver::get_root_name(), LinearMethod::getLowestEigenvector(), LinearMethod::getNonLinearRescale(), OutputMatrix::init_file(), qmcplusplus::invert_matrix(), QMCFixedSampleLinearOptimize::involvmat_timer_, QMCFixedSampleLinearOptimize::line_min_timer_, QMCFixedSampleLinearOptimize::Max_iterations, QMCFixedSampleLinearOptimize::MinMethod, MPIObjectBase::myComm, qmcplusplus::Units::force::N, QMCFixedSampleLinearOptimize::nstabilizers, QMCFixedSampleLinearOptimize::one_shift_run(), qmcplusplus::ONESHIFTONLY, QMCFixedSampleLinearOptimize::optdir, QMCFixedSampleLinearOptimize::optparam, QMCFixedSampleLinearOptimize::optTarget, QMCFixedSampleLinearOptimize::output_hamiltonian_, QMCFixedSampleLinearOptimize::output_matrices_initialized_, QMCFixedSampleLinearOptimize::output_overlap_, QMCFixedSampleLinearOptimize::param_tol, qmcplusplus::MatrixOperators::product(), QMCFixedSampleLinearOptimize::stabilizerScale, TimerType< CLOCK >::start(), QMCFixedSampleLinearOptimize::start(), QMCFixedSampleLinearOptimize::stepsize, TimerType< CLOCK >::stop(), QMCFixedSampleLinearOptimize::test_run(), and QMCFixedSampleLinearOptimize::ValidCostFunction().
|
inline |
Definition at line 65 of file QMCFixedSampleLinearOptimize.h.
References QMCFixedSampleLinearOptimize::wfNode.
Referenced by QMCDriverFactory::createQMCDriver().
|
private |
|
private |
common operation to start optimization, used by the derived classes
Referenced by QMCFixedSampleLinearOptimize::run(), and QMCFixedSampleLinearOptimize::test_run().
|
private |
Definition at line 201 of file QMCFixedSampleLinearOptimize.cpp.
References QMCFixedSampleLinearOptimize::finish(), QMCDriver::get_root_name(), QMCFixedSampleLinearOptimize::optTarget, QMCFixedSampleLinearOptimize::start(), and QMCFixedSampleLinearOptimize::testEngineObj.
Referenced by QMCFixedSampleLinearOptimize::run().
|
inlineprivate |
Definition at line 70 of file QMCFixedSampleLinearOptimize.h.
References qmcplusplus::app_log().
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
accept history, remember the last 2 iterations, value 00, 01, 10, 11
Definition at line 152 of file QMCFixedSampleLinearOptimize.h.
|
private |
the previous best identity shift
Definition at line 146 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML().
|
private |
the previous best overlap shift
Definition at line 148 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML().
|
private |
Definition at line 138 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), and QMCFixedSampleLinearOptimize::run().
|
private |
whether to do the first part of block lm
Definition at line 184 of file QMCFixedSampleLinearOptimize.h.
|
private |
whether we are doing block algorithm
Definition at line 172 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML().
|
private |
whether we are doing block algorithm
Definition at line 170 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), and QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
whether to do the second part of block lm
Definition at line 186 of file QMCFixedSampleLinearOptimize.h.
|
private |
whether to do the third part of block lm
Definition at line 188 of file QMCFixedSampleLinearOptimize.h.
|
private |
Definition at line 248 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
the tolerance to cost function increases when choosing the best shift in the adaptive shift method
Definition at line 162 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), and QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
Definition at line 199 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), and QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 115 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML().
|
private |
Definition at line 207 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::put(), and QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 204 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::put(), and QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 202 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), QMCFixedSampleLinearOptimize::put(), and QMCFixedSampleLinearOptimize::run().
|
private |
number of previous steps to orthogonalize to.
Definition at line 142 of file QMCFixedSampleLinearOptimize.h.
|
private |
Definition at line 245 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 138 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), and QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 138 of file QMCFixedSampleLinearOptimize.h.
|
private |
Definition at line 216 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::put().
|
private |
Definition at line 243 of file QMCFixedSampleLinearOptimize.h.
|
private |
Definition at line 118 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::put().
|
private |
Definition at line 244 of file QMCFixedSampleLinearOptimize.h.
|
private |
Definition at line 246 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 247 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
Number of iterations maximum before generating new configurations.
Definition at line 222 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), and QMCFixedSampleLinearOptimize::run().
|
private |
max amount a parameter may change relative to current wave function weight
Definition at line 160 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), and QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
the maximum relative change in the cost function for the adaptive three-shift scheme
Definition at line 158 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), and QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
Definition at line 193 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), QMCFixedSampleLinearOptimize::put(), QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), and QMCFixedSampleLinearOptimize::run().
|
private |
number of blocks used in block algorithm
Definition at line 174 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
number of directions kept
Definition at line 178 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
number of old updates kept
Definition at line 176 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
number of samples to do in correlated sampling part
Definition at line 180 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
Definition at line 137 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), and QMCFixedSampleLinearOptimize::run().
|
private |
number of shifts we will try
Definition at line 156 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
total number of VMC walkers
Definition at line 220 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::finish(), and QMCFixedSampleLinearOptimize::processOptXML().
|
private |
the shift to use when targeting an excited state
Definition at line 182 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
Definition at line 218 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::Func(), and QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 218 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::Func(), and QMCFixedSampleLinearOptimize::run().
|
private |
target cost function to optimize
Definition at line 224 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::finish(), QMCFixedSampleLinearOptimize::Func(), QMCFixedSampleLinearOptimize::processOptXML(), QMCFixedSampleLinearOptimize::run(), and QMCFixedSampleLinearOptimize::test_run().
|
private |
Definition at line 212 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 210 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 213 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 230 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), and QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 196 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML().
|
private |
Definition at line 138 of file QMCFixedSampleLinearOptimize.h.
|
private |
current shift_i, shift_s input values
Definition at line 150 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), and QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
Shift_s adjustment base.
Definition at line 154 of file QMCFixedSampleLinearOptimize.h.
|
private |
Definition at line 150 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), and QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
Definition at line 139 of file QMCFixedSampleLinearOptimize.h.
|
private |
Definition at line 138 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize(), and QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 138 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::run().
|
private |
Definition at line 249 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::finish(), and QMCFixedSampleLinearOptimize::generateSamples().
|
private |
the shift_i value that the adaptive shift method should aim for
Definition at line 164 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
whether we are targeting an excited state
Definition at line 168 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML().
|
private |
whether we are targeting an excited state
Definition at line 166 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::processOptXML(), and QMCFixedSampleLinearOptimize::QMCFixedSampleLinearOptimize().
|
private |
Definition at line 102 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::put(), and QMCFixedSampleLinearOptimize::test_run().
|
private |
total number of cg steps per iterations
Definition at line 144 of file QMCFixedSampleLinearOptimize.h.
|
private |
vmc engine
Definition at line 226 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::generateSamples(), and QMCFixedSampleLinearOptimize::processOptXML().
|
private |
Definition at line 140 of file QMCFixedSampleLinearOptimize.h.
|
private |
xml node to be dumped
Definition at line 228 of file QMCFixedSampleLinearOptimize.h.
Referenced by QMCFixedSampleLinearOptimize::setWaveFunctionNode().