QMCPACK
ExampleHeBuilder.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2019 QMCPACK developers.
6 //
7 // File developed by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 /**@file ExampleHeBuilder.cpp
14  *@brief Example builder for simple He wavefunction
15  */
16 #include "ExampleHeBuilder.h"
18 #include "OhmmsData/AttributeSet.h"
19 
20 
21 namespace qmcplusplus
22 {
24  : WaveFunctionComponentBuilder(comm, p), ptclPool(psets), els(p)
25 {}
26 
27 std::unique_ptr<WaveFunctionComponent> ExampleHeBuilder::buildComponent(xmlNodePtr cur)
28 {
29  std::string ion_name = "ion0";
30  OhmmsAttributeSet oAttrib;
31  oAttrib.add(ion_name, "source");
32  oAttrib.put(cur);
33 
34  auto ion_it = ptclPool.find(ion_name);
35  if (ion_it == ptclPool.end())
36  {
37  app_error() << " Ion particle set not found = " << ion_name << std::endl;
38  APP_ABORT("Ion not found");
39  }
40  auto WF = std::make_unique<ExampleHeComponent>(*(ion_it->second), els);
41  WF->put(cur);
42  return WF;
43 }
44 
45 } // namespace qmcplusplus
ExampleHeBuilder(Communicate *comm, ParticleSet &p, const PSetMap &psets)
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
An abstract class for wave function builders.
An example wavefunction component for a simple wavefunction for a helium atom.
bool put(xmlNodePtr cur)
assign attributes to the set
Definition: AttributeSet.h:55
std::ostream & app_error()
Definition: OutputManager.h:67
std::map< std::string, const std::unique_ptr< ParticleSet > > PSetMap
Wrapping information on parallelism.
Definition: Communicate.h:68
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
class to handle a set of attributes of an xmlNode
Definition: AttributeSet.h:24
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
Definition: AppAbort.h:27
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
std::unique_ptr< WaveFunctionComponent > buildComponent(xmlNodePtr cur) override
process a xml node at cur
Example builder for simple He wavefunction.