1 #ifndef CASM_XTAL_DOFSET
2 #define CASM_XTAL_DOFSET
5 #include <unordered_set>
9 #include "casm/external/Eigen/Core"
34 const std::vector<std::string> &init_component_names,
40 assert(
m_basis.cols() == this->dim());
42 this->traits().dim());
47 init_traits, init_traits.standard_var_names(),
98 const std::unordered_set<std::string> &init_exclude_occs)
104 const std::vector<std::string> &init_component_names,
106 const std::unordered_set<std::string> &init_exclude_occs)
108 init_exclude_occs) {}
111 const std::unordered_set<std::string> &init_exclude_occs = {})
129 template <
typename DoFSetType>
131 std::vector<DoFSetType>
const &dofset_vec) {
132 std::map<std::string, DoFSetType> dofset_map;
133 for (
auto const &dofset : dofset_vec) {
134 dofset_map.emplace(dofset.type_name(), dofset);
218 xtal::DoFSet
copy_apply(
const xtal::SymOp &op,
const xtal::DoFSet &_dof);
Specifies traits of (possibly) anisotropic crystal properties.
std::string const & name() const
Const access of name.
const std::string & type_name() const
Returns type_name of DoFSet, which should be a standardized DoF type (e.g., "disp",...
DoFSet(const BasicTraits &init_traits)
Eigen::MatrixXd const & basis() const
Matrix that relates DoFSet variables to a conventional coordiante system.
std::vector< std::string > m_component_names
BasicTraits const & traits() const
Returns traits object for the DoF type of this DoFSet.
DoFSet(const BasicTraits &init_traits, const std::vector< std::string > &init_component_names, const Eigen::MatrixXd &init_basis)
const std::vector< std::string > & component_names() const
Returns the names of each of the component axes.
bool is_excluded_occ(std::string const &_occ_name) const
Returns true if DoFSet is inactive (e.g., takes zero values) when specified occupant is present.
const std::unordered_set< std::string > & excluded_occupants() const
Return all occupants that the DoFSet should not be applied to.
std::unordered_set< std::string > m_excluded_occs
SiteDoFSet(const BasicTraits &init_traits, const std::vector< std::string > &init_component_names, const Eigen::MatrixXd &init_basis, const std::unordered_set< std::string > &init_exclude_occs)
SiteDoFSet(const DoFSet &init_dofset)
SiteDoFSet(const DoFSet &init_dofset, const std::unordered_set< std::string > &init_exclude_occs)
SiteDoFSet(const BasicTraits &init_traits, const std::unordered_set< std::string > &init_exclude_occs={})
IdentitySymRepBuilder Identity()
xtal::Coordinate copy_apply(const xtal::SymOp &op, xtal::Coordinate coord)
Copy and apply SymOp to a Coordinate.
std::vector< std::string > component_descriptions(DoFSet const &dofset)
Eigen::MatrixXd dofset_transformation_matrix(const Eigen::MatrixXd &from_basis, const Eigen::MatrixXd &to_basis, double tol)
Create the symmtery representation for going from one basis to another.
std::map< std::string, DoFSetType > make_dofset_map(std::vector< DoFSetType > const &dofset_vec)
INDEX_TYPE Index
For long integer indexing:
double m_tol
Tolerance value for making comparisons.
bool _traits_match(const DoFSet &other_value) const
Returns true if the traits match. Only compares the names.
bool operator()(const DoFSet &other_value) const
bool _basis_spans_same_space(const DoFSet &other_value) const
DoFSetIsEquivalent_f(const DoFSet &reference_value, double tol)
DoFSet m_reference_dofset
Values passed to operator() will be compared against this.
SiteDoFSetIsEquivalent_f(const SiteDoFSet &reference_value, double tol)
bool _excluded_occupants_match(const SiteDoFSet &other_value) const
std::unordered_set< std::string > m_reference_excluded_occs
bool operator()(const SiteDoFSet &other_value) const