19 const std::string& tgroup_in,
20 const std::string& sgroup_in)
21 : tspecies(P.getSpeciesSet()),
22 sspecies(sP.getSpeciesSet()),
29 myTableID_(P.addTable(sP))
38 app_log() <<
"number of target particles = " << num_tars << std::endl;
40 APP_ABORT(
"nsource != ntargets in LatticeDeviationEstimator");
47 std::string hdf5_flag =
"no";
48 std::string xyz_flag =
"no";
50 attrib.
add(hdf5_flag,
"hdf5");
51 attrib.
add(xyz_flag,
"per_xyz");
54 if (hdf5_flag ==
"yes")
58 else if (hdf5_flag ==
"no")
64 APP_ABORT(
"LatticeDeviationEstimator::put() - Please choose \"yes\" or \"no\" for hdf5 flag");
73 if (xyz_flag ==
"yes")
78 else if (xyz_flag ==
"no")
84 APP_ABORT(
"LatticeDeviationEstimator::put() - Please choose \"yes\" or \"no\" for per_xyz flag");
99 std::fill(
xyz2.begin(),
xyz2.end(), 0.0);
119 r = d_table.getDistRow(jat)[iat];
130 dr = d_table.getDisplRow(jat)[iat];
131 for (
int idir = 0; idir <
OHMMS_DIM; idir++)
133 RealType dir2 = dr[idir] * dr[idir];
152 app_log() <<
"num_sites = " <<
num_sites <<
" nsites = " << nsite << std::endl;
153 APP_ABORT(
"Mismatch in LatticeDeivationEstimator.");
160 for (
int idir = 0; idir <
OHMMS_DIM; idir++)
175 for (
int idir = 0; idir <
OHMMS_DIM; idir++)
177 std::stringstream ss;
179 plist.
add(
name_ +
"_dir" + ss.str());
191 std::vector<RealType> tmp;
200 collectables.
add(tmp.begin(), tmp.end());
222 std::unique_ptr<LatticeDeviationEstimator> myclone =
243 auto& h5o = h5desc.back();
LatticeDeviationEstimator(ParticleSet &P, ParticleSet &sP, const std::string &tgroup, const std::string &sgroup)
size_type size() const
return the size of the data
const std::string & getName() const
return the name
helper functions for EinsplineSetBuilder
size_t getTotalNum() const
int my_index_
starting index of this object
bool get(std::ostream &os) const override
write about the class
bool put(xmlNodePtr cur)
assign attributes to the set
std::vector< T >::iterator begin()
iterators to use std algorithms
int first(int igroup) const
return the first index of a group i
Vectorized record engine for scalar properties.
ParticleIndex GroupID
Species ID.
void copy(const Array< T1, 3 > &src, Array< T2, 3 > &dest)
const DistanceTableAB & getDistTableAB(int table_ID) const
get a distance table by table_ID and dyanmic_cast to DistanceTableAB
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::vector< RealType > xyz2
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
int last(int igroup) const
return the last index of a group i
Walker_t * t_walker_
reference to the current walker
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
Buffer_t Collectables
observables in addition to those registered in Properties/PropertyList
std::vector< std::string > speciesName
Species name list.
FullPrecRealType Return_t
type of return value of evaluate
void registerCollectables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
bool put(xmlNodePtr cur) override
Read the input parameter.
Class to represent a many-body trial wave function.
Return_t value_
current value
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
FullPrecRealType Weight
Weight of the walker.
int findSpecies(const std::string &name) const
if the input species is not found, add a new species
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
std::bitset< 8 > update_mode_
set the current update mode
void addObservables(PropertySetType &plist, BufferType &collectables) override
named values to the property list Default implementaton uses addValue(plist_)
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.