QMCPACK
MinimalParticlePool Class Reference

This should be the minimal ParticleSetPool for integration tests. More...

+ Collaboration diagram for MinimalParticlePool:

Static Public Member Functions

static void parseParticleSetXML (const char *xml_string, ParticleSetPool &pp)
 
static ParticleSetPool make_diamondC_1x1x1 (Communicate *c)
 
static ParticleSetPool make_O2_spinor (Communicate *c)
 
static ParticleSetPool make_NiO_a4 (Communicate *c)
 
static ParticleSetPool make_H2 (Communicate *c)
 

Static Private Attributes

static constexpr const char *const particles_xml
 
static constexpr const char *const particles_xml_spinor
 
static constexpr const char *const particles_xml_NiO_a4
 
static constexpr const char *const particles_xml_H2
 

Detailed Description

This should be the minimal ParticleSetPool for integration tests.

Definition at line 24 of file MinimalParticlePool.h.

Member Function Documentation

◆ make_diamondC_1x1x1()

static ParticleSetPool make_diamondC_1x1x1 ( Communicate c)
inlinestatic

Definition at line 190 of file MinimalParticlePool.h.

References MinimalParticlePool::parseParticleSetXML(), and MinimalParticlePool::particles_xml.

Referenced by qmcplusplus::makePsets(), SetupPools::SetupPools(), qmcplusplus::TEST_CASE(), and VMCBatchedTest::testCalcDefaultLocalWalkers().

191  {
192  ParticleSetPool pp(c);
194  return pp;
195  }
static constexpr const char *const particles_xml
static void parseParticleSetXML(const char *xml_string, ParticleSetPool &pp)

◆ make_H2()

static ParticleSetPool make_H2 ( Communicate c)
inlinestatic

Definition at line 211 of file MinimalParticlePool.h.

References qmcplusplus::doc, Libxml2Document::getRoot(), Libxml2Document::parseFromString(), MinimalParticlePool::particles_xml_H2, ParticleSetPool::put(), and ParticleSetPool::randomize().

212  {
214 
216 
217  xmlNodePtr root = doc.getRoot();
218  xmlNodePtr part_ion = xmlFirstElementChild(root);
219 
220  ParticleSetPool pp(c);
221  // Don't set up simulation cell lattice before reading particle sets
222  // convention is to leave out when doing open boundary cond.
223 
224  pp.put(part_ion);
225  xmlNodePtr part_elec = xmlNextElementSibling(part_ion);
226  pp.put(part_elec);
227  pp.randomize();
228 
229  return pp;
230  }
class that handles xmlDoc
Definition: Libxml2Doc.h:76
static constexpr const char *const particles_xml_H2
xmlNodePtr getRoot()
Definition: Libxml2Doc.h:88
bool parseFromString(const std::string_view data)
Definition: Libxml2Doc.cpp:204

◆ make_NiO_a4()

static ParticleSetPool make_NiO_a4 ( Communicate c)
inlinestatic

Definition at line 204 of file MinimalParticlePool.h.

References MinimalParticlePool::parseParticleSetXML(), and MinimalParticlePool::particles_xml_NiO_a4.

Referenced by qmcplusplus::TEST_CASE().

205  {
206  ParticleSetPool pp(c);
208  return pp;
209  }
static constexpr const char *const particles_xml_NiO_a4
static void parseParticleSetXML(const char *xml_string, ParticleSetPool &pp)

◆ make_O2_spinor()

static ParticleSetPool make_O2_spinor ( Communicate c)
inlinestatic

Definition at line 197 of file MinimalParticlePool.h.

References MinimalParticlePool::parseParticleSetXML(), and MinimalParticlePool::particles_xml_spinor.

Referenced by qmcplusplus::TEST_CASE().

198  {
199  ParticleSetPool pp(c);
201  return pp;
202  }
static constexpr const char *const particles_xml_spinor
static void parseParticleSetXML(const char *xml_string, ParticleSetPool &pp)

◆ parseParticleSetXML()

static void parseParticleSetXML ( const char *  xml_string,
ParticleSetPool pp 
)
inlinestatic

Definition at line 171 of file MinimalParticlePool.h.

References qmcplusplus::doc, Libxml2Document::getRoot(), Libxml2Document::parseFromString(), ParticleSetPool::put(), ParticleSetPool::randomize(), and ParticleSetPool::readSimulationCellXML().

Referenced by MinimalParticlePool::make_diamondC_1x1x1(), MinimalParticlePool::make_NiO_a4(), and MinimalParticlePool::make_O2_spinor().

172  {
174 
175  doc.parseFromString(xml_string);
176 
177  xmlNodePtr root = doc.getRoot();
178  xmlNodePtr sim_cell = xmlFirstElementChild(root);
179 
180  // Need to set up simulation cell lattice before reading particle sets
181  pp.readSimulationCellXML(sim_cell);
182 
183  xmlNodePtr part_ion = xmlNextElementSibling(sim_cell);
184  pp.put(part_ion);
185  xmlNodePtr part_elec = xmlNextElementSibling(part_ion);
186  pp.put(part_elec);
187  pp.randomize();
188  }
class that handles xmlDoc
Definition: Libxml2Doc.h:76
xmlNodePtr getRoot()
Definition: Libxml2Doc.h:88
bool parseFromString(const std::string_view data)
Definition: Libxml2Doc.cpp:204

Member Data Documentation

◆ particles_xml

constexpr const char* const particles_xml
staticprivate

Definition at line 27 of file MinimalParticlePool.h.

Referenced by MinimalParticlePool::make_diamondC_1x1x1().

◆ particles_xml_H2

constexpr const char* const particles_xml_H2
staticprivate

Definition at line 137 of file MinimalParticlePool.h.

Referenced by MinimalParticlePool::make_H2().

◆ particles_xml_NiO_a4

constexpr const char* const particles_xml_NiO_a4
staticprivate

Definition at line 94 of file MinimalParticlePool.h.

Referenced by MinimalParticlePool::make_NiO_a4().

◆ particles_xml_spinor

constexpr const char* const particles_xml_spinor
staticprivate

Definition at line 60 of file MinimalParticlePool.h.

Referenced by MinimalParticlePool::make_O2_spinor().


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