16 #ifndef QMCPLUSPLUS_LCORBITALSETBUILDER_H 17 #define QMCPLUSPLUS_LCORBITALSETBUILDER_H 26 class TrialWaveFunction;
27 class BackflowTransformation;
28 class DiracDeterminantBase;
29 class MultiSlaterDetTableMethod;
33 class SPOSetBuilderFactory;
34 struct ci_configuration;
58 std::unique_ptr<WaveFunctionComponent>
buildComponent(xmlNodePtr cur)
override;
77 const std::unique_ptr<SPOSetBuilder>& legacy_input_sposet_builder,
78 const std::unique_ptr<BackflowTransformation>& BFTrans);
80 std::unique_ptr<MultiSlaterDetTableMethod>
createMSDFast(xmlNodePtr cur,
82 std::vector<std::unique_ptr<SPOSet>>&& spo_clones,
84 const bool use_precompute)
const;
88 std::vector<std::vector<ci_configuration>>& uniqueConfgs,
89 std::vector<std::vector<size_t>>& C2nodes,
90 std::vector<std::string>& CItags,
91 std::vector<ValueType>& coeff,
93 std::vector<int>& nptcls,
94 std::unique_ptr<CSFData>& csf_data_ptr)
const;
97 std::vector<std::vector<ci_configuration>>& uniqueConfgs,
98 std::vector<std::vector<size_t>>& C2nodes,
99 std::vector<std::string>& CItags,
100 std::vector<ValueType>& coeff,
102 std::vector<int>& nptcls)
const;
104 template<
typename VT,
105 std::enable_if_t<(std::is_same<VT, ValueType>::value) && (std::is_floating_point<VT>::value),
int> = 0>
116 extVar =
"Coeff_" + std::to_string(ext_level);
118 hin.
read(ci_coeff, extVar);
121 template<
typename VT,
122 std::enable_if_t<(std::is_same<VT, ValueType>::value) &&
123 (
std::is_same<VT, std::complex<typename VT::value_type>>::value),
128 std::vector<double> CIcoeff_real;
129 std::vector<double> CIcoeff_imag;
130 CIcoeff_imag.resize(n_dets);
131 CIcoeff_real.resize(n_dets);
132 fill(CIcoeff_imag.begin(), CIcoeff_imag.end(), 0.0);
141 extVar =
"Coeff_" + std::to_string(ext_level);
144 hin.
read(CIcoeff_real, extVar);
146 extVar = extVar +
"_imag";
147 if (!hin.
readEntry(CIcoeff_imag, extVar))
148 app_log() <<
"Coeff_imag not found in h5. Set to zero." << std::endl;
150 for (
size_t i = 0; i < n_dets; i++)
151 ci_coeff[i] = VT(CIcoeff_real[i], CIcoeff_imag[i]);
std::unique_ptr< MultiSlaterDetTableMethod > createMSDFast(xmlNodePtr cur, ParticleSet &target_ptcl, std::vector< std::unique_ptr< SPOSet >> &&spo_clones, const bool spinor, const bool use_precompute) const
std::unique_ptr< WaveFunctionComponent > buildComponent(xmlNodePtr cur) override
initialize the Antisymmetric wave function for electrons
helper functions for EinsplineSetBuilder
An abstract class for wave function builders.
std::unique_ptr< DiracDeterminantBase > putDeterminant(xmlNodePtr cur, int spin_group, const std::unique_ptr< SPOSetBuilder > &legacy_input_sposet_builder, const std::unique_ptr< BackflowTransformation > &BFTrans)
process a determinant element
bool is_same(const xmlChar *a, const char *b)
std::map< std::string, const std::unique_ptr< ParticleSet > > PSetMap
Wrapping information on parallelism.
Specialized paritlce class for atomistic simulations.
SlaterDetBuilder(Communicate *comm, SPOSetBuilderFactory &factory, ParticleSet &els, TrialWaveFunction &psi, const PSetMap &psets)
constructor
void readCoeffs(hdf_archive &hin, std::vector< VT > &ci_coeff, size_t n_dets, int ext_level) const
Class to represent a many-body trial wave function.
void readCoeffs(hdf_archive &hin, std::vector< VT > &ci_coeff, size_t n_dets, int ext_level) const
void read(T &data, const std::string &aname)
read the data from the group aname and check status runtime error is issued on I/O error ...
bool readDetList(xmlNodePtr cur, std::vector< std::vector< ci_configuration >> &uniqueConfgs, std::vector< std::vector< size_t >> &C2nodes, std::vector< std::string > &CItags, std::vector< ValueType > &coeff, bool &optimizeCI, std::vector< int > &nptcls, std::unique_ptr< CSFData > &csf_data_ptr) const
bool readEntry(T &data, const std::string &aname)
read the data from the group aname and return status use read() for inbuilt error checking ...
SPOSetBuilderFactory & sposet_builder_factory_
reference to the sposet_builder_factory, should be const once the legacy input style is removed ...
bool readDetListH5(xmlNodePtr cur, std::vector< std::vector< ci_configuration >> &uniqueConfgs, std::vector< std::vector< size_t >> &C2nodes, std::vector< std::string > &CItags, std::vector< ValueType > &coeff, bool &optimizeCI, std::vector< int > &nptcls) const
const PSetMap & ptclPool
reference to a PSetMap
derived class from WaveFunctionComponentBuilder
declaration of the base class for many-body wavefunction.
TrialWaveFunction & targetPsi
reference to TrialWaveFunction, should go away as the CUDA code.