128 static std::map<std::string, AnisoValTraits> map;
137 if (it !=
traits_map().end() && !(it->second).is_default()) {
142 throw std::runtime_error(
143 "Name collision: Attempting to register new AnisoValTraits '" +
145 "' but an incompatible AnisoValTraits with that type already "
150 std::make_pair(new_traits.
name(), std::move(new_traits)));
182 throw std::runtime_error(
183 "Attempted to construct AnisoValTraits '" +
name +
184 "' but no AnisoValTraits with that name is known.");
230 std::string
const &_name, std::vector<std::string>
const &_std_var_names,
231 unsigned char _options,
233 std::set<std::string>
const &_incompatible ,
234 std::set<std::string>
const &_must_apply_before ,
235 std::set<std::string>
const &_must_apply_after ,
236 std::vector<std::string>
const &_variable_descriptions ,
238 : m_name(name_suffix(_name)),
240 m_standard_var_names(_std_var_names),
241 m_variable_descriptions(_variable_descriptions),
243 m_symrep_builder(_symrep_builder.
clone()),
244 m_incompatible(_incompatible),
245 m_apply_before(_must_apply_before),
246 m_apply_after(_must_apply_after) {
248 throw std::runtime_error(
249 "Attempting to initialize AnisoValTraits object that does not satisfy "
250 "naming constraints. Name '" +
251 _name +
"' was reduced to '" +
m_name +
"'." +
252 " Note: The underscore character '_' is not allowed.\n");
366 "latvec", {
"L1x",
"L1y",
"L1z",
"L2x",
"L2y",
"L2z",
"L3x",
"L3y",
"L3z"},
369 3>(
"Rank2AsymTensor"),
370 {}, {}, {
"atomize"}, {},
true);
404 {
"S11",
"S21",
"S31",
"S12",
"S22",
"S32",
"S13",
"S23",
"S33"},
GLOBAL,
406 3>(
"Rank2AsymTensor"),
407 {}, {
"atomize",
"disp"}, {}, {},
true);
430 _prefix +
"strain", {
"e_1",
"e_2",
"e_3",
"e_4",
"e_5",
"e_6"},
GLOBAL,
432 {
"Exx",
"Eyy",
"Ezz",
"sqrt(2)Exz",
"sqrt(2)Eyz",
"sqrt(2)Exy"},
true);
542 {
"v_1",
"v_2",
"v_3",
"v_4",
"v_5",
"v_6",
"v_7",
"v_8",
543 "v_9",
"v_10",
"v_11",
"v_12",
"v_13",
"v_14",
"v_15"},
562 "dorbitaloccupationspinpolarized",
563 {
"u_1",
"u_2",
"u_3",
"u_4",
"u_5",
"u_6",
"u_7",
"u_8",
564 "u_9",
"u_10",
"u_11",
"u_12",
"u_13",
"u_14",
"u_15",
"d_1",
565 "d_2",
"d_3",
"d_4",
"d_5",
"d_6",
"d_7",
"d_8",
"d_9",
566 "d_10",
"d_11",
"d_12",
"d_13",
"d_14",
"d_15"},
Builds symmetry representation that is the angular momentum symmetry representation of provided symop...
Specifies traits of (possibly) anisotropic crystal properties.
static AnisoValTraits strain(std::string const &_metric)
Named constructor for global strain AnisoValTraits.
static AnisoValTraits SOmagspin()
Non-collinear magnetic spin, with spin-orbit coupling.
static AnisoValTraits force()
Named constructor for site force AnisoValTraits.
static AnisoValTraits NCunitmagspin()
Non-collinear magnetic spin, without spin-orbit coupling, constrained to unit length.
static AnisoValTraits isometry()
Named constructor for global 'isometry' AnisoValTraits.
bool is_default() const
Return true if *this has 'default' designation, meaning it can be overridden.
static AnisoValTraits Cmagspin()
Collinear magnetic spin.
static AnisoValTraits disp()
Named constructor for site displacement AnisoValTraits.
static const unsigned char EXTENSIVE
static AnisoValTraits latvec()
Named constructor for lattice vector AnisoValTraits.
std::vector< std::string > m_standard_var_names
std::string const & name() const
Const access of name.
static AnisoValTraits selective_dynamics()
Named constructor for selective_dynamics AnisoValTraits.
static const unsigned char LOCAL
static const unsigned char UNIT_LENGTH
static AnisoValTraits NCmagspin()
Non-collinear magnetic spin, without spin-orbit coupling.
static AnisoValTraits d_orbital_occupation_spin_polarized()
Named constructor for spin-polarized d-orbital occupation AnisoValTraits.
static AnisoValTraits Cunitmagspin()
Collinear magnetic spin, constrained to unit length.
static AnisoValTraits SOunitmagspin()
Non-collinear magnetic spin, with spin-orbit coupling, constrained to unit length.
static AnisoValTraits null()
Named constructor for uninitialized AnisoValTraits.
static AnisoValTraits d_orbital_occupation()
Named constructor for d-orbital occupation AnisoValTraits.
static AnisoValTraits coordinate()
Named constructor for site coordinate AnisoValTraits.
static const unsigned char GLOBAL
static AnisoValTraits occ()
Named constructor for discrete site occupation AnisoValTraits.
AnisoValTraits(std::string const &_name, std::vector< std::string > const &_std_var_names, unsigned char _options, SymRepBuilderInterface const &_symrep_builder=NullSymRepBuilder(), std::set< std::string > const &_incompatible={}, std::set< std::string > const &_must_apply_before={}, std::set< std::string > const &_must_apply_after={}, std::vector< std::string > const &_variable_descriptions={}, bool _default=false)
Explicit constructor for AnisoValTraits.
static AnisoValTraits cost()
Named constructor for mapping cost AnisoValTraits.
static std::string name_suffix(std::string const &_name, char delim='_')
std::vector< std::string > m_variable_descriptions
static AnisoValTraits energy()
Named constructor for total energy AnisoValTraits.
Builds symmetry representation as the Cartesian matrix of povided SymOp.
Builds symmetry representation as the 'dim' x 'dim' identity matrix, regardless of symop.
Builds symmetry representation as the Kronecker product of two other representations.
Un-cloneable class for specifying absence of valid SymRepBuilder.
Parsing dictionary for obtaining the correct MoleculeAttribute given a name.
std::pair< iterator, bool > insert(const value_type &value)
Insert single value.
Build 6x6 symmetry representation for a rank 2 Cartesian tensor represented in Kelvin notation.
Abstract base class that provides interface for converting cartesian isometry to specialized transfor...
Builds symmetry representation that is 'dim'x'dim' +Identity (-Identity) matrix if time_reversal is f...
static AnisoValTraits const & traits(std::string const &name)
static void register_traits(AnisoValTraits new_traits)
static std::map< std::string, AnisoValTraits > & traits_map()
IdentitySymRepBuilder Identity()
ParsingDictionary< AnisoValTraits > make_parsing_dictionary< AnisoValTraits >()
GenericDatumFormatter< std::string, DataObject > name()
bool identical(AnisoValTraits const &A, AnisoValTraits const &B)
std::unique_ptr< T > clone(const T &obj)