![]() |
QMCPACK
|
Inheritance diagram for CSUpdateBase:
Collaboration diagram for CSUpdateBase:Public Member Functions | |
| 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) |
Public Member Functions inherited from QMCUpdateBase | |
| 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 void | advanceWalker (Walker_t &thisWalker, bool recompute)=0 |
| move a walker 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) |
Public Attributes | |
| 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 |
Public Attributes inherited from QMCUpdateBase | |
| 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 |
Additional Inherited Members | |
Public Types inherited from QMCUpdateBase | |
| using | Walker_t = MCWalkerConfiguration::Walker_t |
| using | WalkerIter_t = MCWalkerConfiguration::iterator |
| using | BranchEngineType = SimpleFixedNodeBranch |
| using | mPosType = PosType |
| using | mTensorType = TensorType |
Public Types inherited from QMCTraits | |
| 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 > > |
Protected Member Functions inherited from QMCUpdateBase | |
| 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 Protected Member Functions inherited from QMCUpdateBase | |
| static void | checkLogAndGL (ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location) |
| check logpsi and grad and lap against values computed from scratch More... | |
Protected Attributes inherited from QMCUpdateBase | |
| bool | UpdatePbyP |
| update particle-by-particle More... | |
| IndexType | NumPtcl |
| number of particles More... | |
| RealType | m_oneover2tau |
Time-step factor . More... | |
| RealType | m_sqrttau |
Time-step factor . More... | |
| 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 |
Definition at line 27 of file CSUpdateBase.h.
| CSUpdateBase | ( | MCWalkerConfiguration & | w, |
| std::vector< TrialWaveFunction *> & | psi, | ||
| std::vector< QMCHamiltonian *> & | h, | ||
| RandomBase< FullPrecRealType > & | rg | ||
| ) |
Definition at line 29 of file CSUpdateBase.cpp.
References ParameterSet::add(), QMCUpdateBase::myParams, and CSUpdateBase::useDriftOption.
|
override |
Definition at line 38 of file CSUpdateBase.cpp.
References qmcplusplus::delete_iter(), CSUpdateBase::G1, and CSUpdateBase::L1.
| void computeSumRatio | ( | const std::vector< RealType > & | logpsi, |
| const std::vector< RealType > & | avgNorm, | ||
| std::vector< RealType > & | sumratio | ||
| ) |
Definition at line 103 of file CSUpdateBase.cpp.
References qmcplusplus::exp(), and CSUpdateBase::nPsi.
Referenced by CSVMCUpdatePbyP::advanceWalker().
| void computeSumRatio | ( | const std::vector< RealType > & | logpsi, |
| const std::vector< RealType > & | avgNorm, | ||
| Matrix< RealType > & | ratioij, | ||
| std::vector< RealType > & | sumratio | ||
| ) |
Definition at line 123 of file CSUpdateBase.cpp.
References qmcplusplus::exp(), and CSUpdateBase::nPsi.
| void initCSWalkers | ( | WalkerIter_t | it, |
| WalkerIter_t | it_end, | ||
| bool | resetNorms | ||
| ) |
thisWalker.Drift=0.0; if(useDrift) { for(int ipsi=0; ipsi< nPsi; ipsi++) PAOps<RealType,DIM>::axpy(invsumratio[ipsi],Psi1[ipsi]->G,thisWalker.Drift); setScaledDrift(Tau,thisWalker.Drift); }
Definition at line 180 of file CSUpdateBase.cpp.
References qmcplusplus::app_error(), CSUpdateBase::avgNorm, CSUpdateBase::cumNorm, qmcplusplus::Units::charge::e, qmcplusplus::exp(), ParticleSet::G, Walker< t_traits, p_traits >::getPropertyBase(), ParticleSet::getTotalNum(), CSUpdateBase::H1, CSUpdateBase::invsumratio, CSUpdateBase::logNorm, CSUpdateBase::logpsi, Walker< t_traits, p_traits >::Multiplicity, CSUpdateBase::nPsi, Walker< t_traits, p_traits >::Properties, CSUpdateBase::Psi1, ParticleSet::R, Walker< t_traits, p_traits >::R, CSUpdateBase::ratioIJ, CSUpdateBase::resizeWorkSpace(), CSUpdateBase::sumratio, ParticleSet::update(), CSUpdateBase::useDrift, CSUpdateBase::useDriftOption, and QMCUpdateBase::W.
| void initCSWalkersForPbyP | ( | WalkerIter_t | it, |
| WalkerIter_t | it_end, | ||
| bool | resetNorms | ||
| ) |
Definition at line 246 of file CSUpdateBase.cpp.
References PooledMemory< T_scalar, Alloc >::allocate(), qmcplusplus::app_log(), CSUpdateBase::avgNorm, PooledMemory< T_scalar, Alloc >::clear(), CSUpdateBase::cumNorm, Walker< t_traits, p_traits >::DataSet, qmcplusplus::exp(), ParticleSet::G, CSUpdateBase::G1, Walker< t_traits, p_traits >::getPropertyBase(), ParticleSet::getTotalNum(), CSUpdateBase::H1, CSUpdateBase::invsumratio, ParticleSet::L, Walker< t_traits, p_traits >::L, CSUpdateBase::L1, CSUpdateBase::logNorm, CSUpdateBase::logpsi, Walker< t_traits, p_traits >::Multiplicity, CSUpdateBase::nPsi, qmcplusplus::print_mem(), Walker< t_traits, p_traits >::Properties, CSUpdateBase::Psi1, ParticleSet::R, Walker< t_traits, p_traits >::R, CSUpdateBase::ratio, CSUpdateBase::ratioIJ, Walker< t_traits, p_traits >::registerData(), CSUpdateBase::resizeWorkSpace(), PooledMemory< T_scalar, Alloc >::rewind(), CSUpdateBase::sumratio, ParticleSet::update(), QMCUpdateBase::UpdatePbyP, and QMCUpdateBase::W.
| void resizeWorkSpace | ( | int | nw, |
| int | nptcls | ||
| ) |
Definition at line 44 of file CSUpdateBase.cpp.
References CSUpdateBase::avgNorm, CSUpdateBase::avgWeight, CSUpdateBase::cumNorm, QMCUpdateBase::dG, CSUpdateBase::G1, CSUpdateBase::g1_new, CSUpdateBase::g1_old, CSUpdateBase::instRij, CSUpdateBase::invsumratio, CSUpdateBase::L1, CSUpdateBase::logNorm, CSUpdateBase::logpsi, CSUpdateBase::nPsi, CSUpdateBase::Psi1, CSUpdateBase::ratio, CSUpdateBase::ratioIJ, CSUpdateBase::RatioIJ, Matrix< T, Alloc >::resize(), and CSUpdateBase::sumratio.
Referenced by CSUpdateBase::initCSWalkers(), and CSUpdateBase::initCSWalkersForPbyP().
| void updateAvgWeights | ( | ) |
Definition at line 91 of file CSUpdateBase.cpp.
References CSUpdateBase::avgWeight, CSUpdateBase::cumNorm, and CSUpdateBase::nPsi.
| void updateCSWalkers | ( | WalkerIter_t | it, |
| WalkerIter_t | it_end | ||
| ) |
thisWalker.Drift=0.0; if(useDrift) { for(int ipsi=0; ipsi< nPsi; ipsi++) PAOps<RealType,DIM>::axpy(invsumratio[ipsi],Psi1[ipsi]->G,thisWalker.Drift); setScaledDrift(Tau,thisWalker.Drift); }
Definition at line 322 of file CSUpdateBase.cpp.
References CSUpdateBase::avgNorm, qmcplusplus::exp(), ParticleSet::G, Walker< t_traits, p_traits >::getPropertyBase(), CSUpdateBase::H1, CSUpdateBase::invsumratio, CSUpdateBase::logpsi, Walker< t_traits, p_traits >::Multiplicity, CSUpdateBase::nPsi, Walker< t_traits, p_traits >::Properties, CSUpdateBase::Psi1, CSUpdateBase::ratioIJ, CSUpdateBase::sumratio, and QMCUpdateBase::W.
| void updateNorms | ( | ) |
Definition at line 73 of file CSUpdateBase.cpp.
References CSUpdateBase::avgNorm, CSUpdateBase::cumNorm, qmcplusplus::log(), CSUpdateBase::logNorm, and CSUpdateBase::nPsi.
Definition at line 164 of file CSUpdateBase.cpp.
References CSUpdateBase::nPsi.
Referenced by CSVMCUpdatePbyP::advanceWalker().
| std::vector<RealType> avgNorm |
Definition at line 42 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), CSUpdateBase::updateCSWalkers(), and CSUpdateBase::updateNorms().
| std::vector<RealType> avgWeight |
Definition at line 43 of file CSUpdateBase.h.
Referenced by CSUpdateBase::resizeWorkSpace(), and CSUpdateBase::updateAvgWeights().
| std::vector<RealType> cumNorm |
Definition at line 45 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), CSUpdateBase::updateAvgWeights(), and CSUpdateBase::updateNorms().
| std::vector<ParticleSet::ParticleGradient*> G1 |
Definition at line 59 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), and CSUpdateBase::~CSUpdateBase().
| std::vector<GradType> g1_new |
Definition at line 64 of file CSUpdateBase.h.
Referenced by CSUpdateBase::resizeWorkSpace().
| std::vector<GradType> g1_old |
Definition at line 63 of file CSUpdateBase.h.
Referenced by CSUpdateBase::resizeWorkSpace().
| std::vector<QMCHamiltonian*> H1 |
a list of QMCHamiltonians for multiple method
Definition at line 55 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), and CSUpdateBase::updateCSWalkers().
| std::vector<RealType> instRij |
Definition at line 46 of file CSUpdateBase.h.
Referenced by CSUpdateBase::resizeWorkSpace().
| std::vector<RealType> invsumratio |
Definition at line 41 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), and CSUpdateBase::updateCSWalkers().
| std::vector<ParticleSet::ParticleLaplacian*> L1 |
Definition at line 60 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), and CSUpdateBase::~CSUpdateBase().
| std::vector<RealType> logNorm |
Definition at line 44 of file CSUpdateBase.h.
Referenced by CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), and CSUpdateBase::updateNorms().
| std::vector<RealType> logpsi |
Definition at line 39 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), and CSUpdateBase::updateCSWalkers().
| CSEnergyEstimator* multiEstimator |
multiple estimator
Definition at line 53 of file CSUpdateBase.h.
| int nPsi |
Definition at line 37 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::computeSumRatio(), CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), CSUpdateBase::updateAvgWeights(), CSUpdateBase::updateCSWalkers(), CSUpdateBase::updateNorms(), and CSUpdateBase::updateRatioMatrix().
| std::vector<TrialWaveFunction*> Psi1 |
a list of TrialWaveFunctions for multiple method
Definition at line 57 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), and CSUpdateBase::updateCSWalkers().
| std::vector<RealType> ratio |
Definition at line 47 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSUpdateBase::initCSWalkersForPbyP(), and CSUpdateBase::resizeWorkSpace().
Definition at line 48 of file CSUpdateBase.h.
Referenced by CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), and CSUpdateBase::updateCSWalkers().
Definition at line 51 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), and CSUpdateBase::resizeWorkSpace().
| std::vector<RealType> sumratio |
Definition at line 40 of file CSUpdateBase.h.
Referenced by CSVMCUpdatePbyP::advanceWalker(), CSVMCUpdateAll::advanceWalker(), CSVMCUpdateAllWithDrift::advanceWalker(), CSUpdateBase::initCSWalkers(), CSUpdateBase::initCSWalkersForPbyP(), CSUpdateBase::resizeWorkSpace(), and CSUpdateBase::updateCSWalkers().
| bool useDrift |
Definition at line 38 of file CSUpdateBase.h.
Referenced by CSUpdateBase::initCSWalkers().
| std::string useDriftOption |
Definition at line 49 of file CSUpdateBase.h.
Referenced by CSUpdateBase::CSUpdateBase(), and CSUpdateBase::initCSWalkers().