QMCPACK
WaveFunctionFactory.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: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
8 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
9 // Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
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 /**@file WaveFunctionFactory.h
17  *@brief Declaration of a WaveFunctionFactory
18  */
19 #ifndef QMCPLUSPLUS_TRIALWAVEFUNCTION_FACTORY_H
20 #define QMCPLUSPLUS_TRIALWAVEFUNCTION_FACTORY_H
21 
25 #include "Message/MPIObjectBase.h"
27 namespace qmcplusplus
28 {
29 /** Factory class to build a many-body wavefunction
30  */
32 {
33 public:
34  using PSetMap = std::map<std::string, const std::unique_ptr<ParticleSet>>;
35 
36  /** constructor
37  * @param psiName name for both the factory and psi
38  * @param qp quantum particleset (aka target)
39  * @param pset pool of particlesets
40  * @param c communicator
41  * @param c using tasking inside TWF
42  */
44 
45  ///destructor
47 
48  ///read from xmlNode
49  std::unique_ptr<TrialWaveFunction> buildTWF(xmlNodePtr cur, const RuntimeOptions& runtime_options);
50 
51  /// create an empty TrialWaveFunction for testing use.
52  std::unique_ptr<TrialWaveFunction> static buildEmptyTWFForTesting(const RuntimeOptions& runtime_options,
53  const std::string_view name)
54  {
55  return std::make_unique<TrialWaveFunction>(runtime_options, name);
56  }
57 
58 private:
59  /** add Fermion wavefunction term */
60  bool addFermionTerm(TrialWaveFunction& psi, SPOSetBuilderFactory& spo_factory, xmlNodePtr cur);
61 
62  ///many-body wavefunction object
63  ///target ParticleSet
65  ///reference to the PSetMap
66  const PSetMap& ptclPool;
67 };
68 
69 } // namespace qmcplusplus
70 #endif
Base class for any object which needs to know about a MPI communicator.
Definition: MPIObjectBase.h:26
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
ParticleSet & targetPtcl
many-body wavefunction object target ParticleSet
declaration of MPIObjectBase
Wrapping information on parallelism.
Definition: Communicate.h:68
const PSetMap & ptclPool
reference to the PSetMap
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
std::unique_ptr< TrialWaveFunction > buildTWF(xmlNodePtr cur, const RuntimeOptions &runtime_options)
read from xmlNode
Factory class to build a many-body wavefunction.
bool addFermionTerm(TrialWaveFunction &psi, SPOSetBuilderFactory &spo_factory, xmlNodePtr cur)
add Fermion wavefunction term
WaveFunctionFactory(ParticleSet &qp, const PSetMap &pset, Communicate *c)
constructor
static std::unique_ptr< TrialWaveFunction > buildEmptyTWFForTesting(const RuntimeOptions &runtime_options, const std::string_view name)
create an empty TrialWaveFunction for testing use.
Declaration of a TrialWaveFunction.
std::map< std::string, const std::unique_ptr< ParticleSet > > PSetMap
Class to represent a many-body trial wave function.
declaration of the base class for many-body wavefunction.