48 std::string sourceName;
49 std::string spo_prec(
"double");
50 std::string truncate(
"no");
51 std::string hybrid_rep(
"no");
52 std::string spo_object_name;
61 a.
add(sortBands,
"sort");
63 a.
add(twist_num_inp,
"twistnum");
64 a.
add(twist_inp,
"twist");
65 a.
add(sourceName,
"source");
67 a.
add(hybrid_rep,
"hybridrep");
68 a.
add(spo_prec,
"precision");
69 a.
add(truncate,
"truncate");
73 a.
add(numOrbs,
"size");
74 a.
add(numOrbs,
"norbs");
75 a.
add(spinSet,
"spindataset");
76 a.
add(spinSet,
"group");
80 myName =
"einspline.spinor";
92 const std::vector<int> last_occ(
Occ);
98 oAttrib.
add(spinSet,
"spindataset");
99 oAttrib.
add(spo_object_name,
"name");
100 oAttrib.
add(spo_object_name,
"id");
104 xmlNodePtr spo_cur = cur;
108 std::string cname((
const char*)(cur->name));
109 if (cname ==
"occupation")
111 std::string occ_mode(
"ground");
115 oAttrib.
add(occ_mode,
"mode");
116 oAttrib.
add(spinSet,
"spindataset");
120 if (occ_mode ==
"excited")
122 else if (occ_mode !=
"ground")
124 "supported in EinsplineSetBuilder.");
138 if ((iter !=
SPOSetMap.end()) && (!NewOcc))
139 app_warning() <<
"!!!!!!! Identical SPOSets are detected by EinsplineSpinorSetBuilder! " 140 "Implicit sharing one SPOSet for spin-up and spin-down electrons has been removed. " 141 "Each determinant creates its own SPOSet with dedicated memory for spline coefficients. " 142 "To avoid increasing the memory footprint of spline coefficients, " 143 "create a single SPOset outside the determinantset using 'sposet_collection' " 144 "and reference it by name on the determinant line." 148 FullBands[spinSet] = std::make_unique<std::vector<BandInfo>>();
151 FullBands[spinSet2] = std::make_unique<std::vector<BandInfo>>();
155 bool skipChecks =
true;
157 set_metadata(numOrbs, twist_num_inp, twist_inp, skipChecks);
164 OccupyBands(spinSet, sortBands, numOrbs, skipChecks);
168 bool use_single = (spo_prec ==
"single" || spo_prec ==
"float");
171 if (truncate ==
"yes")
173 "The 'truncate' feature of spline SPO has been removed. Please use hybrid orbital representation.");
175 std::string useGPU(
"no");
176 #if !defined(QMC_COMPLEX) 198 bspline_zd_u->finalizeConstruction();
201 OccupyBands(spinSet2, sortBands, numOrbs, skipChecks);
204 bspline_zd_d->finalizeConstruction();
207 auto spinor_set = std::make_unique<SpinorSet>(spo_object_name);
208 spinor_set->set_spos(std::move(bspline_zd_u), std::move(bspline_zd_d));
const PSetMap & ParticleSets
reference to the particleset pool
Tensor< int, OHMMS_DIM > TileMatrix
std::ostream & app_warning()
int rank() const
return the rank
std::map< H5OrbSet, SPOSet *, H5OrbSet > SPOSetMap
bool put(xmlNodePtr cur)
assign attributes to the set
std::string myName
name of the object
ScopeGuard< NewTimer > ScopedTimer
ParticleSet * SourcePtcl
ionic system
std::vector< std::unique_ptr< SPOSetInfo > > states
state info of all possible states available in the basis
std::vector< std::unique_ptr< std::vector< BandInfo > > > FullBands
Helper vector for sorting bands.
static constexpr double TWIST_NO_INPUT
twist_inp[i] <= -9999 to indicate no given input after parsing XML
void bcastSortBands(int splin, int N, bool root)
broadcast SortBands
Communicate * myComm
pointer to Communicate
std::unique_ptr< BsplineReader > createBsplineReal(EinsplineSetBuilder *e, bool use_single, bool hybrid_rep, const std::string &useGPU)
create a reader which handles real splines, R2R case spline storage and computation precision is doub...
class to handle a set of attributes of an xmlNode
NewTimer & createGlobalTimer(const std::string &myname, timer_levels mylevel)
std::unique_ptr< BsplineReader > createBsplineComplex(EinsplineSetBuilder *e, bool hybrid_rep, const std::string &useGPU)
create a reader which handles complex (double size real) splines, C2R or C2C case spline storage and ...
void OccupyBands(int spin, int sortBands, int numOrbs, bool skipChecks=false)
std::unique_ptr< BsplineReader > MixedSplineReader
reader to use BsplineReader
static constexpr int TWISTNUM_NO_INPUT
twistnum_inp == -9999 to indicate no given input after parsing XML
bool putContent(T &a, xmlNodePtr cur)
replaces a's value with the first "element" in the "string" returned by XMLNodeString{cur}.
void set_metadata(int numOrbs, int twist_num_inp, const TinyVector< double, OHMMS_DIM > &twist_inp, bool skipChecks=false)
a specific but clean code path in createSPOSetFromXML, for PBC, double, ESHDF
xmlNodePtr XMLRoot
root XML node with href, sort, tilematrix, twistnum, source, precision,truncate,version ...
std::filesystem::path H5FileName
void barrier_and_abort(const std::string &msg) const
bool get(std::ostream &os) const override
dummy. For satisfying OhmmsElementBase.
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
bool use_real_splines_
if false, splines are conceptually complex valued