11 #include "casm/external/Eigen/Dense"
44 return SymOp(mat, SymOpTranslationType::Zero(),
false);
88 template <
typename SymOpCompareType>
90 const SymOpCompareType &symop_binary_comp) {
93 bool is_closed =
false;
96 int current_size = partial_group->size();
97 if (current_size > max_size) {
98 throw std::runtime_error(
"Group closure resulted in over " +
102 for (
int i = 0; i < current_size; ++i) {
103 for (
int j = 0; j < current_size; ++j) {
104 const SymOp &l_op = partial_group->at(i);
105 const SymOp &r_op = partial_group->at(j);
106 SymOp candidate = l_op * r_op;
107 auto equals_candidate = [symop_binary_comp,
108 candidate](
const SymOp &group_operation) {
109 return symop_binary_comp(candidate, group_operation);
115 if (std::find_if(partial_group->begin(), partial_group->end(),
116 equals_candidate) == partial_group->end()) {
117 partial_group->push_back(candidate);
127 template <
typename SymOpCompareType,
typename... CompareArgs>
129 SymOpCompareType symop_binary_comp(args...);
130 return close_group(partial_group, symop_binary_comp);
Coordinate operator*(const SymOp &LHS, const Coordinate &RHS)
std::string to_string(ENUM val)
Return string representation of enum class.
IdentitySymRepBuilder Identity()
Eigen::Vector3d const & get_translation(MappingNode const &_node)
External accessor for translation, to provide xtal::SymOp adaptability.
bool SymOpTimeReversalType
bool get_time_reversal(MappingNode const &_node)
External accessor for time_reversal, to provide xtal::SymOp adaptability.
Eigen::Matrix3d const & get_matrix(MappingNode const &_node)
External accessor for isometry, to provide xtal::SymOp adaptability.
Eigen::Matrix3d SymOpMatrixType
Eigen::Vector3d SymOpTranslationType
void close_group(SymOpVector *partial_group, const SymOpCompareType &symop_binary_comp)
std::vector< SymOp > SymOpVector
static SymOp translation_operation(const SymOpTranslationType &translation)
SymOp(const SymOpMatrixType &mat, const SymOpTranslationType &translation, SymOpTimeReversalType time_reversal)
SymOpTranslationType translation
SymOpTimeReversalType is_time_reversal_active
static SymOp point_operation(const SymOpMatrixType &mat)
static SymOp time_reversal()