![]() |
QMCPACK
|
Move particle by particle. More...
Classes | |
class | CSVMCUpdatePbyP |
Implements the VMC algorithm More... | |
class | CSVMCUpdatePbyPWithDriftFast |
Implements the VMC algorithm with drift. More... | |
class | DMCBatched |
Implements a DMC using particle-by-particle threaded and batched moves. 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... | |
Move particle by particle.
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::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::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().