27 #if OHMMS_DIM == 3 && !defined(QMC_COMPLEX) 52 std::string psiName(
"psi0"), tasking;
54 pAttrib.
add(psiName,
"id");
55 pAttrib.
add(psiName,
"name");
56 pAttrib.
add(tasking,
"tasking", {
"no",
"yes"});
60 app_summary() <<
" Many-body wavefunction" << std::endl;
61 app_summary() <<
" -------------------" << std::endl;
62 app_summary() <<
" Name: " << psiName <<
" Tasking: " << (tasking ==
"yes" ?
"yes" :
"no") << std::endl;
65 auto targetPsi = std::make_unique<TrialWaveFunction>(runtime_options, psiName, tasking ==
"yes");
67 targetPsi->storeXMLNode(cur);
71 std::string vp_file_to_load;
75 std::string cname((
const char*)(cur->name));
76 if (cname ==
"sposet_builder" || cname ==
"sposet_collection")
81 bool foundtwist(
false);
82 xmlNodePtr kcur = cur->children;
85 std::string kname((
const char*)(kcur->name));
90 attribs.
add(hdfName,
"name");
91 if (hdfName ==
"twistAngle")
93 std::vector<ParticleSet::RealType> twists(3, 0);
95 targetPsi->setTwist(std::move(twists));
104 targetPsi->setTwist(std::vector<ParticleSet::RealType>(3, 0));
110 targetPsi->addComponent(jbuilder->buildComponent(cur));
112 else if (cname ==
"fdlrwfn")
114 APP_ABORT(
"FDLR wave functions are not currently supported.");
119 targetPsi->addComponent(builder->buildComponent(cur));
121 else if ((cname ==
"Molecular") || (cname ==
"molecular"))
123 APP_ABORT(
" Removed Helium Molecular terms from qmcpack ");
125 else if (cname ==
"example_he")
128 targetPsi->addComponent(exampleHe_builder->buildComponent(cur));
130 #if !defined(QMC_COMPLEX) && OHMMS_DIM == 3 131 else if (cname ==
"agp")
134 targetPsi->addComponent(agpbuilder->buildComponent(cur));
137 else if (cname ==
"override_variational_parameters")
140 attribs.
add(vp_file_to_load,
"href");
152 targetPsi->checkInVariables(dummy);
154 targetPsi->checkOutVariables(dummy);
156 if (!vp_file_to_load.empty())
158 app_log() <<
" Reading variational parameters from " << vp_file_to_load << std::endl;
163 for (
auto opt_obj : opt_obj_refs)
164 opt_obj.get().readVariationalParameters(hin);
167 targetPsi->resetParameters(dummy);
168 targetPsi->storeSPOMap(sposet_builder_factory.
exportSPOSets());
175 std::string orbtype(
"MolecularOrbital");
176 std::string nuclei(
"i");
178 oAttrib.
add(orbtype,
"type");
179 oAttrib.
add(nuclei,
"source");
181 std::unique_ptr<WaveFunctionComponentBuilder> detbuilder;
182 if (orbtype ==
"electron-gas")
184 std::ostringstream msg;
185 msg <<
"electron-gas in determinantset is deprecated";
186 msg <<
" please use \"free\" orbitals in sposet_builder" << std::endl;
187 throw std::runtime_error(msg.str());
191 psi.addComponent(detbuilder->buildComponent(cur));
declaration of a builder class for AGPDeterminant
Base class for any object which needs to know about a MPI communicator.
helper functions for EinsplineSetBuilder
void buildSPOSetCollection(xmlNodePtr cur)
std::ostream & app_summary()
bool put(xmlNodePtr cur)
assign attributes to the set
void readFromHDF(const std::string &filename, qmcplusplus::hdf_archive &hin)
Read variational parameters from an HDF file.
ParticleSet & targetPtcl
many-body wavefunction object target ParticleSet
void resetIndex()
reset Index
Wrapping information on parallelism.
const PSetMap & ptclPool
reference to the PSetMap
Specialized paritlce class for atomistic simulations.
std::unique_ptr< TrialWaveFunction > buildTWF(xmlNodePtr cur, const RuntimeOptions &runtime_options)
read from xmlNode
static std::string detset_tag
the element name for a set of Slater determinants, contains 1..* Slater determinants ...
Final class and should not be derived.
Communicate * myComm
pointer to Communicate
class to handle a set of attributes of an xmlNode
declaration of ProgressReportEngine
class to handle a set of variables that can be modified during optimizations
~WaveFunctionFactory()
destructor
std::string ClassName
class Name
bool addFermionTerm(TrialWaveFunction &psi, SPOSetBuilderFactory &spo_factory, xmlNodePtr cur)
add Fermion wavefunction term
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
WaveFunctionFactory(ParticleSet &qp, const PSetMap &pset, Communicate *c)
constructor
bool putContent(T &a, xmlNodePtr cur)
replaces a's value with the first "element" in the "string" returned by XMLNodeString{cur}.
std::map< std::string, const std::unique_ptr< ParticleSet > > PSetMap
Class to represent a many-body trial wave function.
static std::string ionorb_tag
the element name for an ion wavefunction
Declaration of a WaveFunctionFactory.
static std::string jastrow_tag
the element name for jatrow
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
Example builder for simple He wavefunction.
SPOMap && exportSPOSets()