1 #ifndef CASM_AnisoValTraits
2 #define CASM_AnisoValTraits
27 static const unsigned char LOCAL = 0;
28 static const unsigned char GLOBAL = (1u << 0);
98 static std::string
name_suffix(std::string
const &_name,
char delim =
'_') {
100 for (
char c : _name) {
111 std::string
const &_name, std::vector<std::string>
const &_std_var_names,
112 unsigned char _options,
114 std::set<std::string>
const &_incompatible = {},
115 std::set<std::string>
const &_must_apply_before = {},
116 std::set<std::string>
const &_must_apply_after = {},
117 std::vector<std::string>
const &_variable_descriptions = {},
118 bool _default =
false);
128 Eigen::Ref<const Eigen::Matrix3d>
const &_matrix,
129 Eigen::Ref<const Eigen::Vector3d>
const &_tau,
bool time_reversal)
const {
179 return name() == other_name;
184 return name() < other_name;
188 operator std::string
const &()
const {
return name(); }
217 std::unique_ptr<AnisoValTraits>
clone()
const {
218 return notstd::make_unique<AnisoValTraits>(*
this);
Specifies traits of (possibly) anisotropic crystal properties.
static AnisoValTraits strain(std::string const &_metric)
Named constructor for global strain AnisoValTraits.
std::unique_ptr< AnisoValTraits > clone() const
Clone this object.
static AnisoValTraits SOmagspin()
Non-collinear magnetic spin, with spin-orbit coupling.
std::vector< std::string > const & standard_var_names() const
Return standard coordinate axes for continuous variable space.
std::set< std::string > const & must_apply_after() const
When used as a DoF, this is a set of DoFs that must be applied after this DoF is applied.
std::set< std::string > const & must_apply_before() const
When used as a DoF, this is a set of DoFs that must be applied before this DoF is applied.
bool extensive() const
Returns true if type is extensive.
static AnisoValTraits force()
Named constructor for site force AnisoValTraits.
unsigned char options() const
Return 'options' bitflag.
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.
bool operator<(std::string const &other_name) const
Lexicographic comparison of name.
static AnisoValTraits Cmagspin()
Collinear magnetic spin.
std::set< std::string > m_apply_before
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
static std::string class_desc()
Returns "AnisoValTraits".
bool time_reversal_active() const
Returns true if time-reversal changes the value.
std::string const & name() const
Const access of name.
Eigen::MatrixXd symop_to_matrix(Eigen::Ref< const Eigen::Matrix3d > const &_matrix, Eigen::Ref< const Eigen::Vector3d > const &_tau, bool time_reversal) const
Generate a symmetry representation for the supporting vector space.
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.
std::vector< std::string > const & variable_descriptions() const
Returns expanded description of each standard_var_name.
static AnisoValTraits SOunitmagspin()
Non-collinear magnetic spin, with spin-orbit coupling, constrained to unit length.
std::string symrep_builder_name() const
Return name of the SymRepBuilderInterface.
std::set< std::string > m_incompatible
Index dim() const
Conventional dimensionality of this type, returns -1 if always variable.
std::set< std::string > const & incompatible() const
When used as a DoF, this is a set of DoFs that are incompatible with this type of DoF.
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
notstd::cloneable_ptr< const SymRepBuilderInterface > m_symrep_builder
static AnisoValTraits occ()
Named constructor for discrete site occupation AnisoValTraits.
bool operator==(std::string const &other_name) const
Equality comparison of name.
static const unsigned char DESCRIBES_ORIENTATION
bool global() const
Returns true if type is global.
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.
bool describes_occupant_orientation() const
bool unit_length() const
Returns true if type must always have unit length.
static std::string name_suffix(std::string const &_name, char delim='_')
std::set< std::string > m_apply_after
std::vector< std::string > m_variable_descriptions
static AnisoValTraits energy()
Named constructor for total energy AnisoValTraits.
Un-cloneable class for specifying absence of valid SymRepBuilder.
Abstract base class that provides interface for converting cartesian isometry to specialized transfor...
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
IdentitySymRepBuilder Identity()
ParsingDictionary< AnisoValTraits > make_parsing_dictionary< AnisoValTraits >()
bool identical(AnisoValTraits const &A, AnisoValTraits const &B)
INDEX_TYPE Index
For long integer indexing: