QMCPACK
ExampleHeBuilder Class Reference
+ Inheritance diagram for ExampleHeBuilder:
+ Collaboration diagram for ExampleHeBuilder:

Public Member Functions

 ExampleHeBuilder (Communicate *comm, ParticleSet &p, const PSetMap &psets)
 
std::unique_ptr< WaveFunctionComponentbuildComponent (xmlNodePtr cur) override
 process a xml node at cur More...
 
- Public Member Functions inherited from WaveFunctionComponentBuilder
 WaveFunctionComponentBuilder (Communicate *comm, ParticleSet &p)
 constructor More...
 
virtual ~WaveFunctionComponentBuilder ()=default
 
- Public Member Functions inherited from MPIObjectBase
 MPIObjectBase (Communicate *c)
 constructor with communicator More...
 
int rank () const
 return the rank of the communicator More...
 
int getGroupID () const
 return the group id of the communicator More...
 
CommunicategetCommunicator () const
 return myComm More...
 
CommunicategetCommRef () const
 return a TEMPORARY reference to Communicate More...
 
mpi_comm_type getMPI () const
 return MPI communicator if one wants to use MPI directly More...
 
bool is_manager () const
 return true if the rank == 0 More...
 
const std::string & getName () const
 return the name More...
 
void setName (const std::string &aname)
 

Private Attributes

const PSetMapptclPool
 
ParticleSetels
 

Additional Inherited Members

- Public Types inherited from WaveFunctionComponentBuilder
using RealType = WaveFunctionComponent::RealType
 
using ValueType = WaveFunctionComponent::ValueType
 
using PosType = WaveFunctionComponent::PosType
 
using GradType = WaveFunctionComponent::GradType
 
using PSetMap = std::map< std::string, const std::unique_ptr< ParticleSet > >
 
- Public Types inherited from MPIObjectBase
using mpi_comm_type = Communicate::mpi_comm_type
 
- Static Public Attributes inherited from WaveFunctionComponentBuilder
static std::string wfs_tag = "wavefunction"
 reserved tags for the elements associated with the many-body wavefunctions More...
 
static std::string param_tag = "parameter"
 the element name for a parameter More...
 
static std::string dtable_tag = "distancetable"
 the element name for a distancetable More...
 
static std::string jastrow_tag = "jastrow"
 the element name for jatrow More...
 
static std::string detset_tag = "determinantset"
 the element name for a set of Slater determinants, contains 1..* Slater determinants More...
 
static std::string sd_tag = "slaterdeterminant"
 the element name for a Slater determinant, contains 1..* determinants More...
 
static std::string det_tag = "determinant"
 the element name for a determinant, may contain (0..*) orbital or parameter element More...
 
static std::string rn_tag = "determinant_rn"
 the element name for a released node determinant, may contain (0..*) orbital or parameter element More...
 
static std::string spo_tag = "psi"
 the element name for single-particle orbital More...
 
static std::string sposet_tag = "sposet"
 the element name for single-particle orbital set More...
 
static std::string ionorb_tag = "ionwf"
 the element name for an ion wavefunction More...
 
static std::string backflow_tag = "backflow"
 the element name for a backflow transformation More...
 
static std::string multisd_tag = "multideterminant"
 the element name for a multi slater determinant wavefunction More...
 
- Protected Attributes inherited from WaveFunctionComponentBuilder
ParticleSettargetPtcl
 reference to the particle set on which targetPsi is defined More...
 
xmlNodePtr myNode
 xmlNode operated by this object More...
 
- Protected Attributes inherited from MPIObjectBase
CommunicatemyComm
 pointer to Communicate More...
 
std::string ClassName
 class Name More...
 
std::string myName
 name of the object More...
 

Detailed Description

Definition at line 27 of file ExampleHeBuilder.h.

Constructor & Destructor Documentation

◆ ExampleHeBuilder()

ExampleHeBuilder ( Communicate comm,
ParticleSet p,
const PSetMap psets 
)

Definition at line 23 of file ExampleHeBuilder.cpp.

25 {}
WaveFunctionComponentBuilder(Communicate *comm, ParticleSet &p)
constructor

Member Function Documentation

◆ buildComponent()

std::unique_ptr< WaveFunctionComponent > buildComponent ( xmlNodePtr  cur)
overridevirtual

process a xml node at cur

Implements WaveFunctionComponentBuilder.

Definition at line 27 of file ExampleHeBuilder.cpp.

References OhmmsAttributeSet::add(), APP_ABORT, qmcplusplus::app_error(), ExampleHeBuilder::els, ExampleHeBuilder::ptclPool, and OhmmsAttributeSet::put().

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 }
bool put(xmlNodePtr cur)
assign attributes to the set
Definition: AttributeSet.h:55
std::ostream & app_error()
Definition: OutputManager.h:67
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

Member Data Documentation

◆ els

ParticleSet& els
private

Definition at line 36 of file ExampleHeBuilder.h.

Referenced by ExampleHeBuilder::buildComponent().

◆ ptclPool

const PSetMap& ptclPool
private

Definition at line 35 of file ExampleHeBuilder.h.

Referenced by ExampleHeBuilder::buildComponent().


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