QMCPACK
SkEstimator Class Reference

SkEstimator evaluate the structure factor of the target particleset. More...

+ Inheritance diagram for SkEstimator:
+ Collaboration diagram for SkEstimator:

Public Member Functions

 SkEstimator (ParticleSet &elns)
 
std::string getClassName () const override
 return class name More...
 
void resetTargetParticleSet (ParticleSet &P) override
 Reset the data with the target ParticleSet. More...
 
Return_t evaluate (ParticleSet &P) override
 Evaluate the local energy contribution of this component. More...
 
void addObservables (PropertySetType &plist)
 
void addObservables (PropertySetType &plist, BufferType &collectables) override
 named values to the property list Default implementaton uses addValue(plist_) More...
 
void registerCollectables (std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
 
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
 
bool put (xmlNodePtr cur) override
 Read the input parameter. More...
 
bool get (std::ostream &os) const override
 write about the class More...
 
std::unique_ptr< OperatorBasemakeClone (ParticleSet &qp, TrialWaveFunction &psi) 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 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 rejectedMove (ParticleSet &P)
 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...
 

Protected Member Functions

void resize ()
 resize the internal data More...
 
- 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

ParticleSetsourcePtcl
 
int NumSpecies
 number of species More...
 
int NumK
 number of kpoints More...
 
int MaxKshell
 number of kshells More...
 
RealType OneOverN
 normalization factor More...
 
std::vector< int > Kshell
 kshell counters More...
 
std::vector< RealTypeKmag
 instantaneous structure factor More...
 
std::vector< RealTypeOneOverDnk
 1.0/degenracy for a ksell More...
 
Vector< RealTypeRhokTot_r
 $rho_k = \sum_{\alpha} \rho_k^{\alpha} $ for species index $\alpha$ More...
 
Vector< RealTypeRhokTot_i
 
Vector< RealTypevalues
 
bool hdf5_out
 
- 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_
 

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 > >
 

Detailed Description

SkEstimator evaluate the structure factor of the target particleset.

<estimator name="sk" type="sk" debug="no">

Definition at line 28 of file SkEstimator.h.

Constructor & Destructor Documentation

◆ SkEstimator()

SkEstimator ( ParticleSet elns)

Definition at line 23 of file SkEstimator.cpp.

References OperatorBase::COLLECTABLE, ParticleSet::getSimulationCell(), ParticleSet::getSpeciesSet(), SpeciesSet::getTotalNum(), ParticleSet::getTotalNum(), SkEstimator::hdf5_out, SkEstimator::Kmag, SkEstimator::Kshell, SkEstimator::MaxKshell, SkEstimator::NumK, SkEstimator::NumSpecies, SkEstimator::OneOverDnk, SkEstimator::OneOverN, Vector< T, Alloc >::resize(), SkEstimator::RhokTot_i, SkEstimator::RhokTot_r, SkEstimator::sourcePtcl, qmcplusplus::sqrt(), OperatorBase::update_mode_, and SkEstimator::values.

24 {
25  sourcePtcl = &source;
26  update_mode_.set(COLLECTABLE, 1);
27  NumSpecies = source.getSpeciesSet().getTotalNum();
28  NumK = source.getSimulationCell().getKLists().numk;
29  OneOverN = 1.0 / static_cast<RealType>(source.getTotalNum());
30  Kshell = source.getSimulationCell().getKLists().kshell;
31  MaxKshell = Kshell.size() - 1;
35  Kmag.resize(MaxKshell);
36  OneOverDnk.resize(MaxKshell);
37  for (int ks = 0; ks < MaxKshell; ks++)
38  {
39  Kmag[ks] = std::sqrt(source.getSimulationCell().getKLists().ksq[Kshell[ks]]);
40  OneOverDnk[ks] = 1.0 / static_cast<RealType>(Kshell[ks + 1] - Kshell[ks]);
41  }
42  hdf5_out = true;
43 }
void resize(size_type n, Type_t val=Type_t())
Resize the container.
Definition: OhmmsVector.h:166
int MaxKshell
number of kshells
Definition: SkEstimator.h:54
Vector< RealType > values
Definition: SkEstimator.h:65
std::vector< RealType > OneOverDnk
1.0/degenracy for a ksell
Definition: SkEstimator.h:62
RealType OneOverN
normalization factor
Definition: SkEstimator.h:56
int NumSpecies
number of species
Definition: SkEstimator.h:50
ParticleSet * sourcePtcl
Definition: SkEstimator.h:48
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
QMCTraits::RealType RealType
Vector< RealType > RhokTot_i
Definition: SkEstimator.h:64
std::vector< int > Kshell
kshell counters
Definition: SkEstimator.h:58
int NumK
number of kpoints
Definition: SkEstimator.h:52
std::vector< RealType > Kmag
instantaneous structure factor
Definition: SkEstimator.h:60
std::bitset< 8 > update_mode_
set the current update mode
Definition: OperatorBase.h:521
Vector< RealType > RhokTot_r
for species index
Definition: SkEstimator.h:64

Member Function Documentation

◆ addObservables() [1/2]

void addObservables ( PropertySetType plist)

Definition at line 93 of file SkEstimator.cpp.

References RecordNamedProperty< T >::add(), OperatorBase::my_index_, SkEstimator::NumK, and RecordNamedProperty< T >::size().

94 {
95  my_index_ = plist.size();
96  for (int i = 0; i < NumK; i++)
97  {
98  std::stringstream sstr;
99  sstr << "sk_" << i;
100  int id = plist.add(sstr.str());
101  }
102 }
int my_index_
starting index of this object
Definition: OperatorBase.h:535
int NumK
number of kpoints
Definition: SkEstimator.h:52

◆ 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 73 of file SkEstimator.cpp.

References PooledData< T >::add(), RecordNamedProperty< T >::add(), SkEstimator::hdf5_out, OperatorBase::my_index_, SkEstimator::NumK, PooledData< T >::size(), and RecordNamedProperty< T >::size().

74 {
75  if (hdf5_out)
76  {
77  my_index_ = collectables.size();
78  std::vector<RealType> tmp(NumK);
79  collectables.add(tmp.begin(), tmp.end());
80  }
81  else
82  {
83  my_index_ = plist.size();
84  for (int i = 0; i < NumK; i++)
85  {
86  std::stringstream sstr;
87  sstr << "sk_" << i;
88  int id = plist.add(sstr.str());
89  }
90  }
91 }
int my_index_
starting index of this object
Definition: OperatorBase.h:535
int NumK
number of kpoints
Definition: SkEstimator.h:52

◆ evaluate()

SkEstimator::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 47 of file SkEstimator.cpp.

References qmcplusplus::accumulate_elements(), Vector< T, Alloc >::begin(), ParticleSet::Collectables, copy(), Vector< T, Alloc >::end(), ParticleSet::getSK(), SkEstimator::hdf5_out, OperatorBase::my_index_, SkEstimator::NumK, SkEstimator::NumSpecies, SkEstimator::OneOverN, StructFact::rhok_i, StructFact::rhok_r, SkEstimator::RhokTot_i, SkEstimator::RhokTot_r, and SkEstimator::values.

48 {
49  //sum over species
50  std::copy(P.getSK().rhok_r[0], P.getSK().rhok_r[0] + NumK, RhokTot_r.begin());
51  std::copy(P.getSK().rhok_i[0], P.getSK().rhok_i[0] + NumK, RhokTot_i.begin());
52  for (int i = 1; i < NumSpecies; ++i)
53  accumulate_elements(P.getSK().rhok_r[i], P.getSK().rhok_r[i] + NumK, RhokTot_r.begin());
54  for (int i = 1; i < NumSpecies; ++i)
55  accumulate_elements(P.getSK().rhok_i[i], P.getSK().rhok_i[i] + NumK, RhokTot_i.begin());
56  if (hdf5_out)
57  {
60  for (int i = my_index_; iit_r != iit_r_end; ++iit_r, ++iit_i, ++i)
61  P.Collectables[i] += OneOverN * ((*iit_r) * (*iit_r) + (*iit_i) * (*iit_i));
62  }
63  else
64  {
67  for (int i = 0; iit_r != iit_r_end; ++iit_r, ++iit_i, ++i)
68  values[i] = OneOverN * ((*iit_r) * (*iit_r) + (*iit_i) * (*iit_i));
69  }
70  return 0.0;
71 }
Vector< RealType > values
Definition: SkEstimator.h:65
int my_index_
starting index of this object
Definition: OperatorBase.h:535
RealType OneOverN
normalization factor
Definition: SkEstimator.h:56
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
Definition: Blitz.h:639
int NumSpecies
number of species
Definition: SkEstimator.h:50
const RealType * const_iterator
Definition: OhmmsVector.h:39
Vector< RealType > RhokTot_i
Definition: SkEstimator.h:64
int NumK
number of kpoints
Definition: SkEstimator.h:52
void accumulate_elements(IT1 first, IT1 last, IT2 res)
Vector< RealType > RhokTot_r
for species index
Definition: SkEstimator.h:64

◆ get()

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

write about the class

Implements OperatorBase.

Definition at line 156 of file SkEstimator.cpp.

156 { return true; }

◆ getClassName()

std::string getClassName ( ) const
inlineoverridevirtual

return class name

Implements OperatorBase.

Definition at line 33 of file SkEstimator.h.

33 { return "SkEstimator"; }

◆ makeClone()

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

Implements OperatorBase.

Definition at line 158 of file SkEstimator.cpp.

References SkEstimator::hdf5_out, and OperatorBase::my_index_.

159 {
160  std::unique_ptr<SkEstimator> myclone = std::make_unique<SkEstimator>(*this);
161  myclone->hdf5_out = hdf5_out;
162  myclone->my_index_ = my_index_;
163  return myclone;
164 }
int my_index_
starting index of this object
Definition: OperatorBase.h:535

◆ put()

bool put ( xmlNodePtr  cur)
overridevirtual

Read the input parameter.

Parameters
curxml node for a OperatorBase object

Implements OperatorBase.

Definition at line 143 of file SkEstimator.cpp.

References OhmmsAttributeSet::add(), SkEstimator::hdf5_out, and OhmmsAttributeSet::put().

144 {
145  OhmmsAttributeSet pAttrib;
146  std::string hdf5_flag = "no";
147  pAttrib.add(hdf5_flag, "hdf5");
148  pAttrib.put(cur);
149  if (hdf5_flag == "yes")
150  hdf5_out = true;
151  else
152  hdf5_out = false;
153  return true;
154 }
bool put(xmlNodePtr cur)
assign attributes to the set
Definition: AttributeSet.h:55
class to handle a set of attributes of an xmlNode
Definition: AttributeSet.h:24
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

◆ registerCollectables()

void registerCollectables ( std::vector< ObservableHelper > &  h5desc,
hdf_archive file 
) const
overridevirtual

Reimplemented from OperatorBase.

Definition at line 117 of file SkEstimator.cpp.

References hdf_archive::flush(), hdf_archive::getFileID(), ParticleSet::getSimulationCell(), SkEstimator::hdf5_out, OperatorBase::my_index_, OperatorBase::name_, SkEstimator::NumK, OHMMS_DIM, and SkEstimator::sourcePtcl.

118 {
119  if (hdf5_out)
120  {
121  std::vector<int> ndim(1, NumK);
122  h5desc.emplace_back(hdf_path{name_});
123  auto& h5o = h5desc.back();
124  h5o.set_dimensions(ndim, my_index_);
125 
126  hsize_t kdims[2];
127  kdims[0] = NumK;
128  kdims[1] = OHMMS_DIM;
129  std::string kpath = name_ + "/kpoints";
130  hid_t k_space = H5Screate_simple(2, kdims, NULL);
131  hid_t k_set =
132  H5Dcreate(file.getFileID(), kpath.c_str(), H5T_NATIVE_DOUBLE, k_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
133  hid_t mem_space = H5Screate_simple(2, kdims, NULL);
134  auto* ptr = &(sourcePtcl->getSimulationCell().getKLists().kpts_cart[0][0]);
135  herr_t ret = H5Dwrite(k_set, H5T_NATIVE_DOUBLE, mem_space, k_space, H5P_DEFAULT, ptr);
136  H5Dclose(k_set);
137  H5Sclose(mem_space);
138  H5Sclose(k_space);
139  file.flush();
140  }
141 }
int my_index_
starting index of this object
Definition: OperatorBase.h:535
#define OHMMS_DIM
Definition: config.h:64
const auto & getSimulationCell() const
Definition: ParticleSet.h:250
std::string name_
name of this object
Definition: OperatorBase.h:527
ParticleSet * sourcePtcl
Definition: SkEstimator.h:48
int NumK
number of kpoints
Definition: SkEstimator.h:52

◆ resetTargetParticleSet()

void resetTargetParticleSet ( ParticleSet P)
overridevirtual

Reset the data with the target ParticleSet.

Parameters
Pnew target ParticleSet

Implements OperatorBase.

Definition at line 45 of file SkEstimator.cpp.

References SkEstimator::sourcePtcl.

45 { sourcePtcl = &P; }
ParticleSet * sourcePtcl
Definition: SkEstimator.h:48

◆ resize()

void resize ( )
protected

resize the internal data

The argument list is not completed

◆ 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 104 of file SkEstimator.cpp.

References RecordNamedProperty< T >::begin(), Vector< T, Alloc >::begin(), copy(), Vector< T, Alloc >::end(), SkEstimator::hdf5_out, OperatorBase::my_index_, and SkEstimator::values.

105 {
106  if (!hdf5_out)
107  std::copy(values.begin(), values.end(), plist.begin() + my_index_);
108 }
Vector< RealType > values
Definition: SkEstimator.h:65
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 110 of file SkEstimator.cpp.

References RecordNamedProperty< T >::begin(), Vector< T, Alloc >::begin(), copy(), Vector< T, Alloc >::end(), SkEstimator::hdf5_out, OperatorBase::my_index_, and SkEstimator::values.

111 {
112  if (!hdf5_out)
113  std::copy(values.begin(), values.end(), plist.begin() + my_index_ + offset);
114 }
Vector< RealType > values
Definition: SkEstimator.h:65
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

◆ hdf5_out

◆ Kmag

std::vector<RealType> Kmag
protected

instantaneous structure factor

Definition at line 60 of file SkEstimator.h.

Referenced by SkEstimator::SkEstimator().

◆ Kshell

std::vector<int> Kshell
protected

kshell counters

Definition at line 58 of file SkEstimator.h.

Referenced by SkEstimator::SkEstimator().

◆ MaxKshell

int MaxKshell
protected

number of kshells

Definition at line 54 of file SkEstimator.h.

Referenced by SkEstimator::SkEstimator().

◆ NumK

int NumK
protected

◆ NumSpecies

int NumSpecies
protected

number of species

Definition at line 50 of file SkEstimator.h.

Referenced by SkEstimator::evaluate(), and SkEstimator::SkEstimator().

◆ OneOverDnk

std::vector<RealType> OneOverDnk
protected

1.0/degenracy for a ksell

Definition at line 62 of file SkEstimator.h.

Referenced by SkEstimator::SkEstimator().

◆ OneOverN

RealType OneOverN
protected

normalization factor

Definition at line 56 of file SkEstimator.h.

Referenced by SkEstimator::evaluate(), and SkEstimator::SkEstimator().

◆ RhokTot_i

Vector<RealType> RhokTot_i
protected

Definition at line 64 of file SkEstimator.h.

Referenced by SkEstimator::evaluate(), and SkEstimator::SkEstimator().

◆ RhokTot_r

Vector<RealType> RhokTot_r
protected

$rho_k = \sum_{\alpha} \rho_k^{\alpha} $ for species index $\alpha$

Definition at line 64 of file SkEstimator.h.

Referenced by SkEstimator::evaluate(), and SkEstimator::SkEstimator().

◆ sourcePtcl

◆ values


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