20 template bool InputSection::setIfInInput<qmcplusplus::MagnetizationDensityInput::Integrator>(
22 const std::string& tag);
51 for (
int d = 0; d <
DIM; ++d)
54 for (
int d = 0; d <
DIM; ++d)
58 for (
int d = 0; d <
DIM; ++d)
62 gdims[0] = npoints / grid[0];
63 for (
int d = 1; d <
DIM; ++d)
64 gdims[d] = gdims[d - 1] / grid[d];
66 return {corner, grid, gdims, npoints};
76 using namespace estimatorinput;
77 const std::string error_tag{
"MagnetizationDensity input: "};
80 if (
has(
"grid") &&
has(
"dr"))
85 PosType thisgrid = get<PosType>(
"grid");
86 for (
int d = 0; d <
DIM; ++d)
88 if (thisgrid[d] < 1.0)
97 PosType thisdr = get<PosType>(
"dr");
98 for (
int d = 0; d <
DIM; ++d)
100 if (thisdr[d] <= 0.0)
102 if (thisdr[d] >= 10.0)
103 app_log() << error_tag +
" dr larger than 10.0. Make sure that this grid spacing is intended.\n";
111 int samps = get<int>(
"samples");
a class that defines a supercell in D-dimensional Euclean space.
helper functions for EinsplineSetBuilder
CrystalLattice< OHMMS_PRECISION, OHMMS_DIM > lattice
MakeReturn< UnaryNode< FnCeil, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t ceil(const Vector< T1, C1 > &l)
#define LAMBDA_setIfInInput
If tag is present in input_secution set its variable.
This a subclass for runtime errors that will occur on all ranks.
void readXML(xmlNodePtr cur)
Read variable values (initialize) from XML input, call checkValid.
constexpr bool has(const R &this_one)
bool have_dr_
these are necessary for calculateDerivedParameters
static std::any lookupAnyEnum(const std::string &enum_name, const std::string &enum_value, const std::unordered_map< std::string, std::any > &enum_map)
Assign any enum helper for InputSection derived class assumes enum lookup table of this form: inline ...
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
DerivedParameters calculateDerivedParameters(const Lattice &lattice) const
Derived parameters of SpinDensity.
MagnetizationDensityInputSection input_section_
std::any assignAnyEnum(const std::string &name) const override
Derived class overrides this to get proper assignment of scoped enum values.
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
MagnetizationDensityInput(xmlNodePtr node)
void checkParticularValidity() override
Do validation for a particular subtype of InputSection Called by check_valid.
void checkCenterCorner(InputSection &input_section, const std::string &error_tag)
static const std::unordered_map< std::string, std::any > lookup_input_enum_value