38 if (
Zeta.size() != nw)
47 for (
int iw = 0; iw < nw; iw++)
49 const auto &
walker = W[iw];
50 r2_accepted +=
walker->Properties(WP::R2ACCEPTED);
51 r2_proposed +=
walker->Properties(WP::R2PROPOSED);
57 wtot +=
wConf[iw] = wgt;
69 for (
int iw = 0; iw < nw; iw++)
73 Zeta[nw] = wtot + 1.0;
83 std::vector<int> ipip(nw, 0);
84 for (
int iw = 0; iw < nw; iw++)
88 while (
Zeta[ind] < tryp &&
Zeta[ind] >= wCur)
103 std::vector<int> plus, minus;
104 for (
int iw = 0; iw < nw; iw++)
108 plus.insert(plus.end(),
m - 1, iw);
114 for (
int i = 0; i < plus.size(); i++)
116 int im = minus[i], ip = plus[i];
117 W[im]->makeCopy(*(W[ip]));
118 W[im]->setParentID(W[ip]->getWalkerID());
136 std::vector<int> ipip(nw, 0);
137 for (
int iw = 0; iw < nw; iw++)
139 std::vector<int> indz;
140 for (
int iw = 0; iw < nw; iw++)
148 for (
int iw = 0; iw < nw; iw++)
153 for (
int i = 1; i < ipip[iw]; i++)
180 walker->Multiplicity = 1.0;
HamiltonianRef::FullPrecRealType FullPrecRealType
A set of walkers that are to be advanced by Metropolis Monte Carlo.
helper functions for EinsplineSetBuilder
size_t getActiveWalkers() const
return the number of active walkers
MakeReturn< UnaryNode< FnFabs, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t abs(const Vector< T1, C1 > &l)
std::vector< FullPrecRealType > Zeta
IndexType MyContext
context id
int branch(int iter, MCWalkerConfiguration &W, FullPrecRealType trigger) override
perform branch and swap walkers as required
Wrapping information on parallelism.
A collection of functions for dividing fairly.
WalkerReconfiguration(Communicate *c)
default constructor
WalkerProperties::Indexes WP
std::vector< FullPrecRealType > wConf
void measureProperties(int iter)
take averages and writes to a file
std::vector< FullPrecRealType > curData
any temporary data includes many ridiculous conversions of integral types to and from fp ...
IndexType NumWalkersCreated
Number of walkers created by this rank.
int getIndexPermutation(MCWalkerConfiguration &W)
return the surviving Walkers
IndexType num_contexts_
number of contexts
FullPrecRealType UnitZeta
Indexes
an enum denoting index of physical properties
Base class to control the walkers for DMC simulations.
std::vector< int > IndexCopy
MCDataType< FullPrecRealType > EnsembleProperty
MCDataType< FullPrecRealType > ensemble_property_
ensemble properties
Declare a global Random Number Generator.
IndexType SwapMode
0 is default