![]() |
QMCPACK
|
Class to handle walker controls with simple global sum. More...
Public Member Functions | |
WalkerReconfiguration (Communicate *c) | |
default constructor More... | |
int | branch (int iter, MCWalkerConfiguration &W, FullPrecRealType trigger) override |
perform branch and swap walkers as required More... | |
int | getIndexPermutation (MCWalkerConfiguration &W) |
return the surviving Walkers More... | |
int | shuffleIndex (int nw) |
![]() | |
WalkerControlBase (Communicate *c) | |
default constructor More... | |
virtual | ~WalkerControlBase () |
empty destructor to clean up the derived classes More... | |
void | start () |
start a block More... | |
void | setWalkerID (MCWalkerConfiguration &walkers) |
start controller and initialize the IDs of walkers More... | |
void | measureProperties (int iter) |
take averages and writes to a file More... | |
void | setTrialEnergy (FullPrecRealType et) |
set the trial energy More... | |
FullPrecRealType | getValue (int i) |
return a value accumulated during a block More... | |
FullPrecRealType | getCurrentValue (int i) |
return a current value More... | |
int | doNotBranch (int iter, MCWalkerConfiguration &W) |
legacy: return global population update properties without branching More... | |
int | sortWalkers (MCWalkerConfiguration &W) |
legacy: sort Walkers between good and bad and prepare branching More... | |
int | applyNmaxNmin (int current_population) |
legacy: apply per rank limit Nmax and Nmin More... | |
int | copyWalkers (MCWalkerConfiguration &W) |
legacy: copy good walkers to W More... | |
virtual void | reset () |
reset to accumulate data More... | |
bool | put (xmlNodePtr cur) |
void | setMinMax (int nw_in, int nmax_in) |
int | get_n_max () const |
int | get_n_min () const |
FullPrecRealType | get_target_sigma () const |
MCDataType< FullPrecRealType > & | get_ensemble_property () |
void | set_ensemble_property (MCDataType< FullPrecRealType > &ensemble_property) |
IndexType | get_num_contexts () const |
IndexType | get_method () const |
void | set_method (IndexType method) |
![]() | |
MPIObjectBase (Communicate *c) | |
constructor with communicator More... | |
int | rank () const |
return the rank of the communicator More... | |
int | getGroupID () const |
return the group id of the communicator More... | |
Communicate * | getCommunicator () const |
return myComm More... | |
Communicate & | getCommRef () const |
return a TEMPORARY reference to Communicate More... | |
mpi_comm_type | getMPI () const |
return MPI communicator if one wants to use MPI directly More... | |
bool | is_manager () const |
return true if the rank == 0 More... | |
const std::string & | getName () const |
return the name More... | |
void | setName (const std::string &aname) |
Public Attributes | |
FullPrecRealType | UnitZeta |
std::vector< int > | IndexCopy |
std::vector< FullPrecRealType > | wConf |
std::vector< FullPrecRealType > | Zeta |
Additional Inherited Members | |
![]() | |
enum | { ENERGY_INDEX = 0, ENERGY_SQ_INDEX, WALKERSIZE_INDEX, WEIGHT_INDEX, EREF_INDEX, R2ACCEPTED_INDEX, R2PROPOSED_INDEX, FNSIZE_INDEX, RNONESIZE_INDEX, RNSIZE_INDEX, B_ENERGY_INDEX, B_WGT_INDEX, SENTWALKERS_INDEX, LE_MAX } |
An enum to access curData and accumData for reduction. More... | |
using | Walker_t = MCWalkerConfiguration::Walker_t |
typedef of Walker_t More... | |
using | FullPrecRealType = QMCTraits::FullPrecRealType |
typedef of FullPrecRealType More... | |
using | IndexType = QMCTraits::IndexType |
typedef of IndexType More... | |
![]() | |
using | mpi_comm_type = Communicate::mpi_comm_type |
![]() | |
static std::vector< IndexType > | syncFutureWalkersPerRank (Communicate *comm, IndexType n_walkers) |
![]() | |
IndexType | method_ |
id for the method More... | |
IndexType | n_min_ |
minimum number of walkers More... | |
IndexType | n_max_ |
maximum number of walkers More... | |
IndexType | MaxCopy |
maximum copy per walker More... | |
IndexType | NumWalkers |
current number of walkers per processor More... | |
FullPrecRealType | trialEnergy |
trial energy energy More... | |
FullPrecRealType | target_sigma_ |
target sigma to limit fluctuations of the trial energy More... | |
std::vector< int > | NumPerRank |
number of particle per rank More... | |
std::vector< int > | OffSet |
offset of the particle index More... | |
std::vector< int > | FairOffSet |
offset of the particle index for a fair distribution More... | |
std::filesystem::path | dmcFname |
filename for dmc.dat More... | |
std::unique_ptr< std::ofstream > | dmcStream |
file to save energy histogram More... | |
IndexType | NumWalkersCreated |
Number of walkers created by this rank. More... | |
IndexType | MyContext |
context id More... | |
IndexType | num_contexts_ |
number of contexts More... | |
IndexType | SwapMode |
0 is default More... | |
std::vector< FullPrecRealType > | accumData |
any accumulated data over a block More... | |
std::vector< FullPrecRealType > | curData |
any temporary data includes many ridiculous conversions of integral types to and from fp More... | |
std::vector< std::unique_ptr< Walker_t > > | good_w |
temporary storage for good and bad walkers More... | |
std::vector< std::unique_ptr< Walker_t > > | bad_w |
std::vector< int > | ncopy_w |
temporary storage for copy counters More... | |
bool | use_nonblocking |
Use non-blocking isend/irecv. More... | |
MCDataType< FullPrecRealType > | ensemble_property_ |
ensemble properties More... | |
![]() | |
Communicate * | myComm |
pointer to Communicate More... | |
std::string | ClassName |
class Name More... | |
std::string | myName |
name of the object More... | |
Class to handle walker controls with simple global sum.
Base class to handle serial mode with branching only
Definition at line 26 of file WalkerReconfiguration.h.
WalkerReconfiguration | ( | Communicate * | c | ) |
default constructor
Set the SwapMode to zero so that instantiation can be done
set SwapMode
Definition at line 29 of file WalkerReconfiguration.cpp.
References WalkerControlBase::SwapMode.
|
overridevirtual |
perform branch and swap walkers as required
Reimplemented from WalkerControlBase.
Definition at line 162 of file WalkerReconfiguration.cpp.
References WalkerControlBase::ensemble_property_, WalkerConfigurations::EnsembleProperty, WalkerReconfiguration::getIndexPermutation(), WalkerControlBase::measureProperties(), and qmcplusplus::walker.
int getIndexPermutation | ( | MCWalkerConfiguration & | W | ) |
return the surviving Walkers
Definition at line 35 of file WalkerReconfiguration.cpp.
References qmcplusplus::abs(), WalkerControlBase::curData, qmcplusplus::Units::charge::e, WalkerControlBase::ENERGY_INDEX, WalkerControlBase::ENERGY_SQ_INDEX, WalkerControlBase::EREF_INDEX, WalkerControlBase::FNSIZE_INDEX, WalkerConfigurations::getActiveWalkers(), WalkerReconfiguration::IndexCopy, qmcplusplus::Units::distance::m, WalkerControlBase::MyContext, WalkerControlBase::num_contexts_, WalkerControlBase::NumWalkersCreated, WalkerControlBase::R2ACCEPTED_INDEX, WalkerControlBase::R2PROPOSED_INDEX, Random, WalkerControlBase::RNONESIZE_INDEX, WalkerReconfiguration::UnitZeta, qmcplusplus::walker, WalkerControlBase::WALKERSIZE_INDEX, WalkerReconfiguration::wConf, WalkerControlBase::WEIGHT_INDEX, and WalkerReconfiguration::Zeta.
Referenced by WalkerReconfiguration::branch().
int shuffleIndex | ( | int | nw | ) |
Definition at line 134 of file WalkerReconfiguration.cpp.
References WalkerReconfiguration::IndexCopy.
std::vector<int> IndexCopy |
Definition at line 31 of file WalkerReconfiguration.h.
Referenced by WalkerReconfiguration::getIndexPermutation(), and WalkerReconfiguration::shuffleIndex().
FullPrecRealType UnitZeta |
Definition at line 29 of file WalkerReconfiguration.h.
Referenced by WalkerReconfiguration::getIndexPermutation().
std::vector<FullPrecRealType> wConf |
Definition at line 33 of file WalkerReconfiguration.h.
Referenced by WalkerReconfiguration::getIndexPermutation().
std::vector<FullPrecRealType> Zeta |
Definition at line 35 of file WalkerReconfiguration.h.
Referenced by WalkerReconfiguration::getIndexPermutation().