QMCPACK
SPOSetBuilderFactory.h
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) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
8 // Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
9 // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
10 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
11 //
12 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
13 //////////////////////////////////////////////////////////////////////////////////////
14 
15 
16 #ifndef QMCPLUSPLUS_BASISSETFACTORY_H
17 #define QMCPLUSPLUS_BASISSETFACTORY_H
18 
22 
23 namespace qmcplusplus
24 {
26 {
27 public:
29  using PSetMap = std::map<std::string, const std::unique_ptr<ParticleSet>>;
30 
31  /** constructor
32  * \param comm communicator
33  * \param els reference to the electrons
34  * \param ions reference to the ions
35  */
37 
39 
40  std::unique_ptr<SPOSetBuilder> createSPOSetBuilder(xmlNodePtr rootNode);
41 
42  /** returns a named sposet from the pool
43  * only use in serial portion of execution
44  * ie during initialization prior to threaded code
45  */
46  const SPOSet* getSPOSet(const std::string& name) const;
47 
48  void buildSPOSetCollection(xmlNodePtr cur);
49 
50  bool empty() const { return sposets.empty(); }
51 
52  /** add an SPOSet to sposets map.
53  * This is only used to handle legacy SPOSet input styles without using sposet_collection
54  */
55  void addSPOSet(std::unique_ptr<SPOSet>);
56 
57  SPOMap&& exportSPOSets() { return std::move(sposets); }
58 
59 private:
60  ///reference to the target particle
62 
63  ///reference to the particle pool
64  const PSetMap& ptclPool;
65 
66  /// list of all sposets created by the builders of this factory
68 
69  static std::string basisset_tag;
70 };
71 } // namespace qmcplusplus
72 #endif
base class for Single-particle orbital sets
Definition: SPOSet.h:46
const PSetMap & ptclPool
reference to the particle pool
Base class for any object which needs to know about a MPI communicator.
Definition: MPIObjectBase.h:26
std::map< std::string, const std::unique_ptr< ParticleSet > > PSetMap
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
const SPOSet * getSPOSet(const std::string &name) const
returns a named sposet from the pool only use in serial portion of execution ie during initialization...
SPOSetBuilderFactory(Communicate *comm, ParticleSet &els, const PSetMap &psets)
constructor
Wrapping information on parallelism.
Definition: Communicate.h:68
void addSPOSet(std::unique_ptr< SPOSet >)
add an SPOSet to sposets map.
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
Declaration of a base class of SPOSet Builders.
ParticleSet & targetPtcl
reference to the target particle
std::map< std::string, const std::unique_ptr< const SPOSet > > SPOMap
Definition: SPOSet.h:57
SPOMap sposets
list of all sposets created by the builders of this factory
std::unique_ptr< SPOSetBuilder > createSPOSetBuilder(xmlNodePtr rootNode)
declaration of the base class for many-body wavefunction.