31 : mybuilder(
e), checkNorm(true), saveSplineCoefs(false), rotate(true)
44 std::ostringstream oo;
45 oo << root <<
".tile_" << tilematrix(0, 0) << tilematrix(0, 1) << tilematrix(0, 2) << tilematrix(1, 0)
46 << tilematrix(1, 1) << tilematrix(1, 2) << tilematrix(2, 0) << tilematrix(2, 1) << tilematrix(2, 2) <<
".spin_" 47 << spin <<
".tw_" << twist;
61 std::ostringstream oo;
62 oo << root <<
".tile_" << tilematrix(0, 0) << tilematrix(0, 1) << tilematrix(0, 2) << tilematrix(1, 0)
63 << tilematrix(1, 1) << tilematrix(1, 2) << tilematrix(2, 0) << tilematrix(2, 1) << tilematrix(2, 2) <<
".spin_" 64 << spin <<
".tw_" << twist <<
".l" << first <<
"u" << last;
71 std::string checkOrbNorm(
"yes");
72 std::string saveCoefs(
"no");
74 a.
add(checkOrbNorm,
"check_orb_norm");
75 a.
add(saveCoefs,
"save_coefs");
79 if (checkOrbNorm ==
"no")
81 app_log() <<
"WARNING: disable orbital normalization check!" << std::endl;
90 std::string spo_object_name;
93 a.
add(spo_object_name,
"name");
94 a.
add(spo_object_name,
"id");
107 spo2band[spin].reserve(fullband.size());
125 std::string spo_object_name;
127 a.
add(spo_object_name,
"name");
128 a.
add(spo_object_name,
"id");
138 spo2band[spin].reserve(fullband.size());
164 const std::vector<BandInfo>& bigspace,
166 std::vector<int>& spo2band)
170 for (
int i = 0; i < bigspace.size(); ++i)
176 if (bigspace[i].MakeTwoCopies)
192 aname +=
".bandinfo.dat";
194 std::ofstream o(aname.c_str());
195 std::array<char, 1024>
s;
198 o <<
"# Band State TwistIndex BandIndex Energy Kx Ky Kz K1 K2 K3 KmK " 200 for (
int i = 0; i < bigspace.size(); ++i)
202 int ti = bigspace[i].TwistIndex;
203 int bi = bigspace[i].BandIndex;
204 double e = bigspace[i].Energy;
205 int nd = (bigspace[i].MakeTwoCopies) ? 2 : 1;
207 int s_size = std::snprintf(
s.data(),
s.size(),
"%8d %8d %8d %8d %12.6f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %6d\n",
211 throw std::runtime_error(
"Error generating bandinfo");
Tensor< int, OHMMS_DIM > TileMatrix
helper functions for EinsplineSetBuilder
class to read state range information from sposet input
int rank() const
return the rank
Communicate * myComm
communicator
std::string make_bandinfo_filename(const std::string &root, int spin, int twist, const Tensor< int, 3 > &tilematrix, int gid)
bool put(xmlNodePtr cur)
assign attributes to the set
std::string myName
name of this band
Builder class for einspline-based SPOSet objects.
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.
Wrapping information on parallelism.
Communicate * getCommunicator() const
return myComm
SingleParticlePos k_cart(const SingleParticlePos &kin) const
conversion of a reciprocal-vector
int getGroupID() const
return the group id
int GroupID
index of the group
std::string make_bandgroup_name(const std::string &root, int spin, int twist, const Tensor< int, 3 > &tilematrix, int first, int last)
base class to describe a single orbital in an SPOSet
Tensor<T,D> class for D by D tensor.
std::vector< std::vector< int > > spo2band
map from spo index to band index
void clear_states(int index=0)
clear state information
base class to read data and manage spline tables
class to handle a set of attributes of an xmlNode
void selectBands(const std::vector< BandInfo > &bigspace, double emin, double emax)
select the bands within an energy range [emin,emax)
int TwistIndex
twist index set by the full band not by the subset
collection of orbital info for SPOSet instance or builder
void setCommon(xmlNodePtr cur)
setting common parameters
BsplineReader(EinsplineSetBuilder *e)
virtual std::unique_ptr< SPOSet > create_spline_set(const std::string &my_name, int spin, const BandInfoGroup &bandgroup)=0
create the actual spline sets
void initialize_spo2band(int spin, const std::vector< BandInfo > &bigspace, SPOSetInfo &sposet, std::vector< int > &band2spo)
build index tables to map a state to band with k-point folidng
const std::string & getName() const
return the name
std::vector< TinyVector< double, OHMMS_DIM > > primcell_kpoints
EinsplineSetBuilder * mybuilder
pointer to the EinsplineSetBuilder
#define APP_ABORT_TRACE(f, l, msg)
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
bool checkNorm
mesh size check the norm of orbitals
bool saveSplineCoefs
save spline coefficients to storage