27 app_log() <<
"Constructing SHOSetBuilder" << std::endl;
47 APP_ABORT(
"SHOSetBuilder::createSPOSetFromXML SHOSetBuilder should not use legacy interface");
49 app_log() <<
"SHOSetBuilder::createSHOSet(xml) " << std::endl;
59 app_log() <<
"SHOSetBuilder::createSHOSet(indices) " << std::endl;
67 std::string spo_name =
"sho";
69 attrib.
add(spo_name,
"name");
70 attrib.
add(spo_name,
"id");
90 if (
input.has_index_info)
91 smax = std::max(smax,
input.max_index());
92 if (
input.has_energy_info)
97 APP_ABORT(
"SHOSetBuilder::Initialize\n invalid basis size");
102 std::vector<SHOState*> sho_states;
103 for (
int i = 0; i < indices.size(); ++i)
107 auto sho = std::make_unique<SHOSet>(spo_name,
length,
center, sho_states);
127 if (states_required > 0)
140 APP_ABORT(
"SHOSetBuilder::update_basis_states dimensions other than 1, 2, or 3 are not supported");
143 for (
int d =
DIM - 2; d > -1; --d)
146 int ntot =
pow(ndim,
DIM);
148 for (
int m = 0;
m < ntot; ++
m)
152 for (
int d = 0; d <
DIM; ++d)
183 for (
int d = 0; d <
DIM; ++d)
193 APP_ABORT(
"SHOSetBuilder::update_basis_states failed to make enough states");
199 app_log() << pad <<
"SHOSetBuilder report" << std::endl;
200 app_log() << pad <<
" dimension = " <<
DIM << std::endl;
201 app_log() << pad <<
" mass = " <<
mass << std::endl;
207 app_log() << pad <<
" nmax = " <<
nmax << std::endl;
210 app_log() << pad <<
" basis_states" << std::endl;
213 app_log() << pad <<
"end SHOSetBuilder report" << std::endl;
std::vector< int > indices_t
helper functions for EinsplineSetBuilder
class to read state range information from sposet input
QTBase::RealType RealType
bool put(xmlNodePtr cur)
assign attributes to the set
TinyVector< int, DIM > ind_dims
std::string int2string(const int &i)
void update_basis_states(int smax)
void set(TinyVector< int, DIM > qn, RealType e)
SPOSetInfoSimple< SHOState > basis_states
std::vector< std::unique_ptr< SPOSetInfo > > states
state info of all possible states available in the basis
TinyVector< int, DIM > quantum_number
void report(const std::string &pad="")
RealType energy
energy of the orbital (in Hartree units)
Wrapping information on parallelism.
std::unique_ptr< SPOSet > createSPOSet(xmlNodePtr cur, SPOSetInputInfo &input) override
create an sposet from a general xml request
MakeReturn< BinaryNode< FnPow, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t, typename CreateLeaf< Vector< T2, C2 > >::Leaf_t > >::Expression_t pow(const Vector< T1, C1 > &l, const Vector< T2, C2 > &r)
Specialized paritlce class for atomistic simulations.
base class for the real SPOSet builder
~SHOSetBuilder() override
MakeReturn< UnaryNode< FnCeil, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t ceil(const Vector< T1, C1 > &l)
void clear_states(int index=0)
clear state information
class to handle a set of attributes of an xmlNode
std::string ClassName
class Name
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
MakeReturn< UnaryNode< FnLog, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t log(const Vector< T1, C1 > &l)
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
SHOSetBuilder(ParticleSet &P, Communicate *comm)
std::unique_ptr< SPOSet > createSPOSetFromXML(xmlNodePtr cur) override
create an sposet from xml (legacy)
testing::ValidSpinDensityInput input
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
bool legacy
whether implementation conforms only to legacy standard