QMCPACK
ForwardWalking Class Reference
+ Inheritance diagram for ForwardWalking:
+ Collaboration diagram for ForwardWalking:

Public Member Functions

 ForwardWalking ()
 constructor More...
 
 ~ForwardWalking () override
 destructor More...
 
std::string getClassName () const override
 return class name More...
 
void resetTargetParticleSet (ParticleSet &P) override
 Reset the data with the target ParticleSet. More...
 
Return_t rejectedMove (ParticleSet &P) override
 TODO: add docs. More...
 
Return_t calculate (ParticleSet &P)
 
Return_t evaluate (ParticleSet &P) override
 Evaluate the local energy contribution of this component. More...
 
bool put (xmlNodePtr cur) override
 Read the input parameter. More...
 
bool putSpecial (xmlNodePtr cur, QMCHamiltonian &h, ParticleSet &P)
 rename it to avoid conflicts with put More...
 
bool get (std::ostream &os) const override
 write about the class More...
 
std::unique_ptr< OperatorBasemakeClone (ParticleSet &qp, TrialWaveFunction &psi) final
 
void addObservables (PropertySetType &plist)
 
void addObservables (PropertySetType &plist, BufferType &collectables) override
 named values to the property list Default implementaton uses addValue(plist_) More...
 
void setObservables (PropertySetType &plist) override
 Set the values evaluated by this object to plist Default implementation is to assign Value which is updated by evaluate function using my_index_. More...
 
void setParticlePropertyList (PropertySetType &plist, int offset) override
 
- Public Member Functions inherited from OperatorBase
 OperatorBase ()
 Construct a new Operator Base object Default and unique empty constructor. More...
 
virtual ~OperatorBase ()=default
 
virtual bool dependsOnWaveFunction () const
 return true if this operator depends on a wavefunction More...
 
std::bitset< 8 > & getUpdateMode () noexcept
 get update_mode_ reference More...
 
Return_t getValue () const noexcept
 get a copy of value_ More...
 
std::string getName () const noexcept
 getter a copy of my_name_, rvalue small string optimization More...
 
void setName (const std::string name) noexcept
 Set my_name member, uses small string optimization (pass by value) More...
 
TraceRequestgetRequest () noexcept
 Get request_ member. More...
 
virtual void registerObservables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const
 add to observable descriptor for hdf5 The default implementation is to register a scalar for this->value_ More...
 
virtual void registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const
 
virtual void setHistories (Walker_t &ThisWalker)
 
virtual Return_t evaluateDeterministic (ParticleSet &P)
 Evaluate the local energy contribution of this component, deterministically based on current state. More...
 
virtual void mw_evaluate (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const
 Evaluate the contribution of this component of multiple walkers. More...
 
virtual void mw_evaluatePerParticle (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< RealType >> &listeners, const std::vector< ListenerVector< RealType >> &listeners_ions) const
 Evaluate the contribution of this component of multiple walkers per particle and report to registerd listeners from objects in Estimators. More...
 
virtual void mw_evaluateWithParameterDerivatives (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< ParticleSet > &p_list, const opt_variables_type &optvars, const RecordArray< ValueType > &dlogpsi, RecordArray< ValueType > &dhpsioverpsi) const
 TODO: add docs. More...
 
virtual Return_t evaluateWithToperator (ParticleSet &P)
 Evaluate the local energy contribution of this component with Toperators updated if requested. More...
 
virtual void mw_evaluateWithToperator (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const
 Evaluate the contribution of this component of multiple walkers. More...
 
virtual void mw_evaluatePerParticleWithToperator (const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< RealType >> &listeners, const std::vector< ListenerVector< RealType >> &listeners_ions) const
 Evaluate the contribution of this component of multiple walkers per particle and report to registerd listeners from objects in Estimators. More...
 
virtual Return_t evaluateValueAndDerivatives (ParticleSet &P, const opt_variables_type &optvars, const Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi)
 Evaluate value and derivatives wrt the optimizables. More...
 
virtual Return_t evaluateWithIonDerivs (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_term, ParticleSet::ParticlePos &pulay_term)
 Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More...
 
virtual Return_t evaluateWithIonDerivsDeterministic (ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_term, ParticleSet::ParticlePos &pulay_term)
 Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase. More...
 
virtual void evaluateOneBodyOpMatrix (ParticleSet &P, const TWFFastDerivWrapper &psi, std::vector< ValueMatrix > &B)
 Evaluate "B" matrix for observable. More...
 
virtual void evaluateOneBodyOpMatrixForceDeriv (ParticleSet &P, ParticleSet &source, const TWFFastDerivWrapper &psi, const int iat, std::vector< std::vector< ValueMatrix >> &Bforce)
 Evaluate "dB/dR" matrices for observable. More...
 
virtual void updateSource (ParticleSet &s)
 Update data associated with a particleset. More...
 
virtual Return_t getEnsembleAverage ()
 Return an average value by collective operation. More...
 
virtual void createResource (ResourceCollection &collection) const
 Initialize a shared resource and hand it to a collection. More...
 
virtual void acquireResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const
 Acquire a shared resource from a collection. More...
 
virtual void releaseResource (ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const
 Return a shared resource to a collection. More...
 
virtual void setRandomGenerator (RandomBase< FullPrecRealType > *rng)
 Set the Random Generator object TODO: add docs. More...
 
virtual void add2Hamiltonian (ParticleSet &qp, TrialWaveFunction &psi, QMCHamiltonian &targetH)
 TODO: add docs. More...
 
virtual void getRequiredTraces (TraceManager &tm)
 TODO: add docs. More...
 
virtual void informOfPerParticleListener ()
 
bool isClassical () const noexcept
 
bool isQuantum () const noexcept
 
bool isClassicalClassical () const noexcept
 
bool isQuantumClassical () const noexcept
 
bool isQuantumQuantum () const noexcept
 
bool getMode (const int i) const noexcept
 Return the mode i. More...
 
bool isNonLocal () const noexcept
 TODO: add docs. More...
 
bool hasListener () const noexcept
 
void contributeTraceQuantities ()
 Make trace quantities available. More...
 
void checkoutTraceQuantities (TraceManager &tm)
 Checkout trace arrays Derived classes must guard individual checkouts using request info. More...
 
void collectScalarTraces ()
 Collect scalar trace data. More...
 
void deleteTraceQuantities ()
 delete trace arrays More...
 

Private Attributes

std::vector< int > h_ids_
 
std::vector< int > p_ids_
 
std::vector< std::vector< int > > walker_lengths_
 
std::vector< RealTypevalues_
 
std::vector< std::string > names_
 
int nobservables_
 
int nvalues_
 
int first_hamiltonian_
 

Additional Inherited Members

- Public Types inherited from OperatorBase
enum  EnergyDomains { KINETIC = 0, POTENTIAL, NO_ENERGY_DOMAIN }
 enum to denote energy domain of operators More...
 
enum  QuantumDomains {
  NO_QUANTUM_DOMAIN = 0, CLASSICAL, QUANTUM, CLASSICAL_CLASSICAL,
  QUANTUM_CLASSICAL, QUANTUM_QUANTUM
}
 
enum  {
  PRIMARY = 0, OPTIMIZABLE = 1, RATIOUPDATE = 2, PHYSICAL = 3,
  COLLECTABLE = 4, NONLOCAL = 5
}
 enum for update_mode More...
 
using Return_t = FullPrecRealType
 type of return value of evaluate More...
 
using ValueMatrix = SPOSet::ValueMatrix
 For fast derivative evaluation. More...
 
using GradMatrix = SPOSet::GradMatrix
 
using BufferType = ParticleSet::Buffer_t
 typedef for the serialized buffer More...
 
using Walker_t = ParticleSet::Walker_t
 typedef for the walker More...
 
using ParticleScalar = ParticleSet::Scalar_t
 typedef for the ParticleScalar More...
 
using SPOMap = SPOSet::SPOMap
 typedef for SPOMap More...
 
- 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 OperatorBase
virtual void contributeScalarQuantities ()
 
virtual void checkoutScalarQuantities (TraceManager &tm)
 
virtual void collectScalarQuantities ()
 
virtual void deleteScalarQuantities ()
 
virtual void contributeParticleQuantities ()
 
virtual void checkoutParticleQuantities (TraceManager &tm)
 
virtual void deleteParticleQuantities ()
 
virtual void setComputeForces (bool compute)
 
void setEnergyDomain (EnergyDomains edomain)
 Set the Energy Domain. More...
 
void setQuantumDomain (QuantumDomains qdomain)
 set quantum domain More...
 
void oneBodyQuantumDomain (const ParticleSet &P)
 set quantum domain for one-body operator More...
 
void twoBodyQuantumDomain (const ParticleSet &P)
 set quantum domain for two-body operator More...
 
void twoBodyQuantumDomain (const ParticleSet &P1, const ParticleSet &P2)
 set quantum domain for two-body operator More...
 
void addValue (PropertySetType &plist)
 named values to the property list More...
 
- Protected Attributes inherited from OperatorBase
std::bitset< 8 > update_mode_
 set the current update mode More...
 
Return_t value_
 current value More...
 
std::string name_
 name of this object More...
 
TraceRequest request_
 whether traces are being collected More...
 
int my_index_
 starting index of this object More...
 
Return_t new_value_
 a new value for a proposed move More...
 
Walker_tt_walker_
 reference to the current walker More...
 
bool streaming_particles_
 
bool have_required_traces_
 

Detailed Description

Definition at line 26 of file ForwardWalking.h.

Constructor & Destructor Documentation

◆ ForwardWalking()

constructor

Definition at line 27 of file ForwardWalking.cpp.

References OperatorBase::OPTIMIZABLE, and OperatorBase::update_mode_.

27 { update_mode_.set(OPTIMIZABLE, 1); }
std::bitset< 8 > update_mode_
set the current update mode
Definition: OperatorBase.h:521

◆ ~ForwardWalking()

~ForwardWalking ( )
overridedefault

destructor

Member Function Documentation

◆ addObservables() [1/2]

void addObservables ( PropertySetType plist)

Definition at line 202 of file ForwardWalking.cpp.

203 {
204  //not used
205 }

◆ addObservables() [2/2]

void addObservables ( PropertySetType plist,
BufferType collectables 
)
overridevirtual

named values to the property list Default implementaton uses addValue(plist_)

Parameters
plistRecordNameProperty
collectablesObservables that are accumulated by evaluate

Reimplemented from OperatorBase.

Definition at line 207 of file ForwardWalking.cpp.

References RecordNamedProperty< T >::add(), qmcplusplus::app_log(), OperatorBase::my_index_, ForwardWalking::names_, ForwardWalking::nobservables_, RecordNamedProperty< T >::size(), and ForwardWalking::walker_lengths_.

208 {
209  my_index_ = plist.size();
210  int nc = 0;
211  for (int i = 0; i < nobservables_; ++i)
212  for (int j = 0; j < walker_lengths_[i][1]; ++j, ++nc)
213  {
214  std::stringstream sstr;
215  sstr << "FWE_" << names_[i] << "_" << j * walker_lengths_[i][0];
216  int id = plist.add(sstr.str());
217  }
218  app_log() << "ForwardWalking::Observables [" << my_index_ << ", " << my_index_ + nc << ")" << std::endl;
219 }
int my_index_
starting index of this object
Definition: OperatorBase.h:535
std::ostream & app_log()
Definition: OutputManager.h:65
std::vector< std::string > names_
std::vector< std::vector< int > > walker_lengths_

◆ calculate()

Definition at line 44 of file ForwardWalking.cpp.

References copy(), ForwardWalking::first_hamiltonian_, Walker< t_traits, p_traits >::getPropertyBase(), OperatorBase::my_index_, ForwardWalking::nobservables_, ForwardWalking::p_ids_, Walker< t_traits, p_traits >::PHindex, Walker< t_traits, p_traits >::PropertyHistory, OperatorBase::t_walker_, ForwardWalking::values_, and ForwardWalking::walker_lengths_.

Referenced by ForwardWalking::evaluate(), and ForwardWalking::rejectedMove().

45 {
46  std::vector<RealType>::iterator Vit = values_.begin();
47  for (int i = 0; i < nobservables_; i++)
48  {
49  int j = 0;
50  int FWindex = t_walker_->PHindex[p_ids_[i]] - 1;
51  while (j < walker_lengths_[i][1])
52  {
53  FWindex -= walker_lengths_[i][0];
54  if (FWindex < 0)
55  FWindex += walker_lengths_[i][2];
56  (*Vit) = t_walker_->PropertyHistory[p_ids_[i]][FWindex];
57  j++;
58  Vit++;
59  }
60  }
62  return 0.0;
63 }
std::vector< int > p_ids_
std::vector< int > PHindex
Definition: Walker.h:132
std::vector< RealType > values_
std::vector< std::vector< FullPrecRealType > > PropertyHistory
Property history vector.
Definition: Walker.h:131
int my_index_
starting index of this object
Definition: OperatorBase.h:535
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
Definition: Blitz.h:639
Walker_t * t_walker_
reference to the current walker
Definition: OperatorBase.h:541
FullPrecRealType * getPropertyBase()
Definition: Walker.h:277
std::vector< std::vector< int > > walker_lengths_

◆ evaluate()

ForwardWalking::Return_t evaluate ( ParticleSet P)
overridevirtual

Evaluate the local energy contribution of this component.

Parameters
Pinput configuration containing N particles
Returns
the value of the Hamiltonian component

Implements OperatorBase.

Definition at line 65 of file ForwardWalking.cpp.

References Walker< t_traits, p_traits >::addPropertyHistoryPoint(), ForwardWalking::calculate(), ForwardWalking::h_ids_, ForwardWalking::nobservables_, ForwardWalking::p_ids_, ParticleSet::PropertyList, and OperatorBase::t_walker_.

66 {
67  for (int i = 0; i < nobservables_; i++)
68  t_walker_->addPropertyHistoryPoint(p_ids_[i], P.PropertyList[h_ids_[i]]);
69  calculate(P);
70  return 0.0;
71 }
std::vector< int > p_ids_
std::vector< int > h_ids_
Return_t calculate(ParticleSet &P)
Walker_t * t_walker_
reference to the current walker
Definition: OperatorBase.h:541
void addPropertyHistoryPoint(int index, FullPrecRealType data)
Definition: Walker.h:203

◆ get()

bool get ( std::ostream &  os) const
overridevirtual

write about the class

Implements OperatorBase.

Definition at line 190 of file ForwardWalking.cpp.

191 {
192  os << "ForwardWalking";
193  return true;
194 }

◆ getClassName()

std::string getClassName ( ) const
inlineoverridevirtual

return class name

Implements OperatorBase.

Definition at line 36 of file ForwardWalking.h.

36 { return "ForwardWalking"; }

◆ makeClone()

std::unique_ptr< OperatorBase > makeClone ( ParticleSet qp,
TrialWaveFunction psi 
)
finalvirtual

Implements OperatorBase.

Definition at line 196 of file ForwardWalking.cpp.

197 {
198  //nothing to worry, default copy constructor will do
199  return std::make_unique<ForwardWalking>(*this);
200 }

◆ put()

bool put ( xmlNodePtr  cur)
overridevirtual

Read the input parameter.

Parameters
curxml node for a OperatorBase object

Implements OperatorBase.

Definition at line 73 of file ForwardWalking.cpp.

73 { return true; }

◆ putSpecial()

bool putSpecial ( xmlNodePtr  cur,
QMCHamiltonian h,
ParticleSet P 
)

rename it to avoid conflicts with put

Definition at line 75 of file ForwardWalking.cpp.

References OhmmsAttributeSet::add(), ParticleSet::addPropertyHistory(), APP_ABORT, qmcplusplus::app_log(), ForwardWalking::first_hamiltonian_, QMCHamiltonian::getObservable(), QMCHamiltonian::getObservableName(), ForwardWalking::h_ids_, RecordNamedProperty< T >::Names, ForwardWalking::names_, ForwardWalking::nobservables_, ForwardWalking::nvalues_, ForwardWalking::p_ids_, ParticleSet::PropertyList, OhmmsAttributeSet::put(), QMCHamiltonian::sizeOfObservables(), QMCHamiltonian::startIndex(), ForwardWalking::values_, and ForwardWalking::walker_lengths_.

76 {
78 
79  first_hamiltonian_ = h.startIndex();
80  nobservables_ = 0;
81  nvalues_ = 0;
82  xmlNodePtr tcur = cur->children;
83  while (tcur != NULL)
84  {
85  std::string cname((const char*)tcur->name);
86  if (cname == "Observable")
87  {
88  std::string tagName("none");
89  int Hindex(-100);
90  int blockSeries(0);
91  int blockFreq(0);
92  OhmmsAttributeSet Tattrib;
93  Tattrib.add(tagName, "name");
94  Tattrib.add(blockSeries, "max");
95  Tattrib.add(blockFreq, "frequency");
96  Tattrib.put(tcur);
97  if (tagName.find("*") == std::string::npos)
98  {
99  //Single Observable case
100  int numProps = P.PropertyList.Names.size();
101  Hindex = h.getObservable(tagName) + WP::NUMPROPERTIES;
102  if (tagName == "LocalPotential")
103  {
104  Hindex = WP::LOCALPOTENTIAL;
105  tagName = "LocPot";
106  }
107  else if (tagName == "LocalEnergy")
108  {
109  Hindex = WP::LOCALENERGY;
110  tagName = "LocEn";
111  }
112  else if (Hindex == (WP::NUMPROPERTIES - 1))
113  {
114  app_log() << "Not a valid H element(" << Hindex << ") Valid names are:";
115  for (int jk = 0; jk < h.sizeOfObservables(); jk++)
116  app_log() << " " << h.getObservableName(jk);
117  app_log() << std::endl;
118  exit(-1);
119  }
120  names_.push_back(tagName);
121  h_ids_.push_back(Hindex);
122  app_log() << " Hamiltonian Element " << tagName << " was found at " << Hindex << std::endl;
123  int numT = blockSeries / blockFreq;
124  nobservables_ += 1;
125  nvalues_ += numT;
126  app_log() << " " << numT << " values will be calculated every " << blockFreq << "*tau H^-1" << std::endl;
127  std::vector<int> pms(3);
128  pms[0] = blockFreq;
129  pms[1] = numT;
130  pms[2] = blockSeries + 2;
131  walker_lengths_.push_back(pms);
132  int maxWsize = blockSeries + 2;
133  int pindx = P.addPropertyHistory(maxWsize);
134  p_ids_.push_back(pindx);
135  }
136  else
137  {
138  bool FOUNDH(false);
139  // Multiple observables for this tag
140  int found = tagName.rfind("*");
141  tagName.replace(found, 1, "");
142  int numProps = P.PropertyList.Names.size();
143  for (int j = 0; j < h.sizeOfObservables(); j++)
144  {
145  std::string Hname = h.getObservableName(j);
146  if (Hname.find(tagName) != std::string::npos)
147  {
148  FOUNDH = true;
149  app_log() << " Hamiltonian Element " << Hname << " was found at " << j << std::endl;
150  names_.push_back(Hname);
151  Hindex = j + WP::NUMPROPERTIES;
152  h_ids_.push_back(Hindex);
153  int numT = blockSeries / blockFreq;
154  nobservables_ += 1;
155  nvalues_ += numT;
156  app_log() << " " << numT << " values will be calculated every " << blockFreq << "*tau H^-1" << std::endl;
157  std::vector<int> pms(3);
158  pms[0] = blockFreq;
159  pms[1] = numT;
160  pms[2] = blockSeries + 2;
161  walker_lengths_.push_back(pms);
162  int maxWsize = blockSeries + 2;
163  int pindx = P.addPropertyHistory(maxWsize);
164  p_ids_.push_back(pindx);
165  }
166  }
167  //handle FOUNDH
168  if (FOUNDH)
169  {
170  nobservables_ += 1;
171  }
172  else
173  {
174  app_log() << "Not a valid H element(" << Hindex << ") Valid names are:";
175  for (int jk = 0; jk < h.sizeOfObservables(); jk++)
176  app_log() << " " << h.getObservableName(jk);
177  app_log() << std::endl;
178  APP_ABORT("ForwardWalking::put");
179  }
180  }
181  }
182  tcur = tcur->next;
183  }
184  app_log() << "Total number of observables calculated:" << nobservables_ << std::endl;
185  app_log() << "Total number of values calculated:" << nvalues_ << std::endl;
186  values_.resize(nvalues_);
187  return true;
188 }
std::vector< int > p_ids_
std::vector< RealType > values_
std::ostream & app_log()
Definition: OutputManager.h:65
bool put(xmlNodePtr cur)
assign attributes to the set
Definition: AttributeSet.h:55
std::vector< int > h_ids_
WalkerProperties::Indexes WP
Definition: ParticleSet.cpp:34
class to handle a set of attributes of an xmlNode
Definition: AttributeSet.h:24
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
Definition: AppAbort.h:27
std::vector< std::string > names_
Indexes
an enum denoting index of physical properties
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
Definition: AttributeSet.h:42
std::vector< std::vector< int > > walker_lengths_

◆ rejectedMove()

ForwardWalking::Return_t rejectedMove ( ParticleSet P)
overridevirtual

TODO: add docs.

Parameters
P
Returns
Return_t

Reimplemented from OperatorBase.

Definition at line 31 of file ForwardWalking.cpp.

References Walker< t_traits, p_traits >::addPropertyHistoryPoint(), ForwardWalking::calculate(), ForwardWalking::nobservables_, ForwardWalking::p_ids_, Walker< t_traits, p_traits >::PHindex, Walker< t_traits, p_traits >::PropertyHistory, OperatorBase::t_walker_, and ForwardWalking::walker_lengths_.

32 {
33  for (int i = 0; i < nobservables_; i++)
34  {
35  int lastindex = t_walker_->PHindex[p_ids_[i]] - 1;
36  if (lastindex < 0)
37  lastindex += walker_lengths_[i][2];
39  }
40  calculate(P);
41  return 0.0;
42 }
std::vector< int > p_ids_
std::vector< int > PHindex
Definition: Walker.h:132
std::vector< std::vector< FullPrecRealType > > PropertyHistory
Property history vector.
Definition: Walker.h:131
Return_t calculate(ParticleSet &P)
Walker_t * t_walker_
reference to the current walker
Definition: OperatorBase.h:541
void addPropertyHistoryPoint(int index, FullPrecRealType data)
Definition: Walker.h:203
std::vector< std::vector< int > > walker_lengths_

◆ resetTargetParticleSet()

void resetTargetParticleSet ( ParticleSet P)
inlineoverridevirtual

Reset the data with the target ParticleSet.

Parameters
Pnew target ParticleSet

Implements OperatorBase.

Definition at line 38 of file ForwardWalking.h.

38 {}

◆ setObservables()

void setObservables ( PropertySetType plist)
overridevirtual

Set the values evaluated by this object to plist Default implementation is to assign Value which is updated by evaluate function using my_index_.

Parameters
plistRecordNameProperty

Reimplemented from OperatorBase.

Definition at line 221 of file ForwardWalking.cpp.

References RecordNamedProperty< T >::begin(), copy(), OperatorBase::my_index_, and ForwardWalking::values_.

222 {
223  copy(values_.begin(), values_.end(), plist.begin() + my_index_);
224 }
std::vector< RealType > values_
int my_index_
starting index of this object
Definition: OperatorBase.h:535
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
Definition: Blitz.h:639

◆ setParticlePropertyList()

void setParticlePropertyList ( PropertySetType plist,
int  offset 
)
overridevirtual

Reimplemented from OperatorBase.

Definition at line 226 of file ForwardWalking.cpp.

References RecordNamedProperty< T >::begin(), copy(), OperatorBase::my_index_, and ForwardWalking::values_.

227 {
228  copy(values_.begin(), values_.end(), plist.begin() + my_index_ + offset);
229 }
std::vector< RealType > values_
int my_index_
starting index of this object
Definition: OperatorBase.h:535
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
Definition: Blitz.h:639

Member Data Documentation

◆ first_hamiltonian_

int first_hamiltonian_
private

Definition at line 71 of file ForwardWalking.h.

Referenced by ForwardWalking::calculate(), and ForwardWalking::putSpecial().

◆ h_ids_

std::vector<int> h_ids_
private

Definition at line 64 of file ForwardWalking.h.

Referenced by ForwardWalking::evaluate(), and ForwardWalking::putSpecial().

◆ names_

std::vector<std::string> names_
private

Definition at line 68 of file ForwardWalking.h.

Referenced by ForwardWalking::addObservables(), and ForwardWalking::putSpecial().

◆ nobservables_

◆ nvalues_

int nvalues_
private

Definition at line 70 of file ForwardWalking.h.

Referenced by ForwardWalking::putSpecial().

◆ p_ids_

std::vector<int> p_ids_
private

◆ values_

◆ walker_lengths_

std::vector<std::vector<int> > walker_lengths_
private

The documentation for this class was generated from the following files: