15 #ifndef OHMMS_PARTICLE_INPUTOUTPUT_XML_UTILITY_H 16 #define OHMMS_PARTICLE_INPUTOUTPUT_XML_UTILITY_H 65 oid = (*it).second->id();
86 return dynamic_cast<attrib_type*
>(o);
89 throw std::runtime_error(
"AttribListType::getAttribute Unknown attribute " + oname +
"\n");
111 void getPtclAttrib(xmlNodePtr cur,
int in_offset,
int copy_size,
int out_offset);
113 void checkGrouping(
int nat,
const std::vector<int>& nat_group)
const;
125 bool reset(xmlNodePtr cur);
146 void reset(
const char* fileroot,
bool append =
false)
override;
148 void report(
int iter)
override;
152 bool put(xmlNodePtr cur)
override;
154 void get(std::ostream& os,
int olevel)
const;
bool reset(xmlNodePtr cur)
reset the properties of a particle set
void checkGrouping(int nat, const std::vector< int > &nat_group) const
xmlNodePtr createNode(bool addlattice)
create particleset node
helper functions for EinsplineSetBuilder
void reset(const char *fileroot, bool append=false) override
std::map< std::string, OhmmsObject * > AttribList
abstract base class to record any properties
static std::string indextype_tag
the datatype tag for the index-type attribute
void setID(int i)
overwrite ObjectID
static std::string postype_tag
the datatype tag for the pos-type attribute
~XMLSaveParticle() override
ParticleAttrib< Index_t > ParticleIndex
Attaches a unit to a Vector for IO.
int getAttribType(const std::string &tname)
return a type id: one of the enum values
std::vector< std::string > SpeciesName
ParticleAttrib< AT > * getAttribute(const std::string &tname, const std::string &oname)
generic get function attribute function
Declaration of OhmmsElementBase and define xml-related macros.
An OhmmsElementBase with extra members to keep track the object/type.
Specialized paritlce class for atomistic simulations.
ParticleAttrib< Tensor_t > ParticleTensor
AttribListType()
objects created by getXYZAttrib(aname)
AttribListType ref_AttribList
static std::string tensortype_tag
the datatype tag for the tensor-type attribute
Define the tags for the data types and attributes of particle classes.
bool put(xmlNodePtr cur) override
bool readXML(xmlNodePtr cur)
process xmlnode <particleset/> which contains everything about the particle set to initialize ...
void getPtclAttrib(xmlNodePtr cur, int in_offset, int copy_size, int out_offset)
read the data of a particle attribute
void report(int iter) override
const std::string & objName() const
return the object name
static std::string stringtype_tag
the datatype tag for the string-type attribute
XMLSaveParticle(Particle_t &pin)
ParticleAttrib< SingleParticlePos > ParticlePos
XMLParticleParser(Particle_t &aptcl)
constructor
std::map< std::string, int > AttribTypeMap
AttribListType ref_AttribList
ParticleAttrib< Scalar_t > ParticleScalar
static std::string scalartype_tag
the datatype tag for the scalar-type attribute
int add(ParticleAttrib< AT > &pa)
add ParticleAttrib<AT>