60 for (
int i =
my_index_; iit_r != iit_r_end; ++iit_r, ++iit_i, ++i)
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));
78 std::vector<RealType> tmp(
NumK);
79 collectables.
add(tmp.begin(), tmp.end());
84 for (
int i = 0; i <
NumK; i++)
86 std::stringstream sstr;
88 int id = plist.
add(sstr.str());
96 for (
int i = 0; i <
NumK; i++)
98 std::stringstream sstr;
100 int id = plist.
add(sstr.str());
121 std::vector<int> ndim(1,
NumK);
123 auto& h5o = h5desc.back();
129 std::string kpath =
name_ +
"/kpoints";
130 hid_t k_space = H5Screate_simple(2, kdims, NULL);
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);
135 herr_t ret = H5Dwrite(k_set, H5T_NATIVE_DOUBLE, mem_space, k_space, H5P_DEFAULT, ptr);
146 std::string hdf5_flag =
"no";
147 pAttrib.
add(hdf5_flag,
"hdf5");
149 if (hdf5_flag ==
"yes")
160 std::unique_ptr<SkEstimator> myclone = std::make_unique<SkEstimator>(*this);
void resize(size_type n, Type_t val=Type_t())
Resize the container.
size_type size() const
return the size of the data
void addObservables(PropertySetType &plist)
Matrix< RealType > rhok_r
2-D container for the phase
helper functions for EinsplineSetBuilder
void setParticlePropertyList(PropertySetType &plist, int offset) override
int MaxKshell
number of kshells
hid_t getFileID() const
return file_id. should be only be used for connecting to old codes when porting
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
Vector< RealType > values
std::vector< RealType > OneOverDnk
1.0/degenracy for a ksell
size_t getTotalNum() const
Matrix< RealType > rhok_i
int my_index_
starting index of this object
bool put(xmlNodePtr cur)
assign attributes to the set
bool put(xmlNodePtr cur) override
Read the input parameter.
std::vector< T >::iterator begin()
iterators to use std algorithms
Vectorized record engine for scalar properties.
RealType OneOverN
normalization factor
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
int getTotalNum() const
return the number of species
const auto & getSimulationCell() const
int NumSpecies
number of species
std::string name_
name of this object
Specialized paritlce class for atomistic simulations.
int add(const std::string &aname)
class to handle a set of attributes of an xmlNode
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) override
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
const StructFact & getSK() const
return Structure Factor
Buffer_t Collectables
observables in addition to those registered in Properties/PropertyList
SpeciesSet & getSpeciesSet()
retrun the SpeciesSet of this particle set
FullPrecRealType Return_t
type of return value of evaluate
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
Vector< RealType > RhokTot_i
std::vector< int > Kshell
kshell counters
Class to represent a many-body trial wave function.
void registerCollectables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
int NumK
number of kpoints
SkEstimator(ParticleSet &elns)
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
std::vector< RealType > Kmag
instantaneous structure factor
void accumulate_elements(IT1 first, IT1 last, IT2 res)
std::bitset< 8 > update_mode_
set the current update mode
Vector< RealType > RhokTot_r
for species index
bool get(std::ostream &os) const override
write about the class