56 template <
typename IterType>
74 assert(size() && at(0).has_valid_master());
75 return at(0).master_group();
107 double tol =
TOL)
const;
153 Eigen::Vector3i min_trans,
154 Eigen::Vector3i max_trans)
const;
178 const std::vector<SymOp> &subgroup,
double tol =
TOL)
const;
180 template <
typename IterType>
181 std::vector<std::vector<Index>>
left_cosets(IterType
const &begin,
182 IterType
const &end)
const;
188 const std::string &
get_name()
const;
195 const std::vector<std::set<std::set<Index>>> &
subgroups()
const;
278 std::map<
int, std::vector<Eigen::Vector3d>> coord_map);
331 Index op_index)
const;
345 const std::vector<SymGroupRepID> &rep_IDs)
const;
397 template <
typename IterType>
401 m_group_periodicity(init_type),
410 template <
typename IterType>
412 IterType
const &begin, IterType
const &end)
const {
413 Index N = std::distance(begin, end);
415 assert((size() % N) == 0 &&
416 "In SymGroup::left_cosets(), left cosets must be generated by a "
417 "subgroup of *this SymGroup.");
420 throw std::runtime_error(
421 "Error in SymGroup::left_cosets(): could not find subgroup within "
424 Index csize = size() / N;
426 std::vector<std::vector<Index>> tcosets;
427 tcosets.reserve(csize);
429 std::vector<bool>
check(size(),
false);
431 for (
Index i = 0; i < size() && tcosets.size() < csize; i++) {
432 if (
check[i])
continue;
433 tcosets.push_back(std::vector<Index>());
434 for (IterType it = begin; it != end; ++it) {
436 tcosets.back().push_back(prod);
445 template <
typename ToType,
typename FromType>
450 template <
typename FromType>
452 template <
typename FromTypeIt>
454 const Lattice &group_home_lattice) {
455 std::vector<SymOp> casted_group_vector;
457 for (
auto it = begin; it != end; ++it) {
458 casted_group_vector.emplace_back(to_symop_type(*it));
460 return SymGroup(casted_group_vector, &group_home_lattice);
464 const Lattice &group_home_lattice) {
465 return this->operator()(adaptable.begin(), adaptable.end(),
SymGroup m_point_group
Copy of *this with translations removed.
SymGroupRepID allocate_representation() const
Add a new empty representation.
SymGroupRepID add_kronecker_rep(SymGroupRepID ID1, SymGroupRepID ID2) const
SymGroupRep * _representation_ptr(SymGroupRepID _id) const
void sort()
Sort SymOp in the SymGroup.
void set_rep(SymGroupRepID _rep_ID, SymOpRepresentation const &_op_rep, Index op_index) const
SymGroupRepID reg_rep_ID() const
void is_temporary_of(MasterSymGroup const &RHS)
SymGroupRepID _add_representation(SymGroupRep *_rep_ptr) const
const SymGroup & point_group() const
void push_back(const SymOp &op)
MasterSymGroup(PERIODICITY_TYPE init_type=PERIODIC)
MasterSymGroup & operator=(const MasterSymGroup &RHS)
SymGroupRep const & representation(SymGroupRepID i) const
Const access of alternate Representations of a SymGroup.
SymGroupRepID identity_rep_ID(Index dim) const
std::vector< SymGroupRepID > m_identity_rep_IDs
SymGroupRepID coord_rep_ID() const
SymGroupRepID add_representation(const SymGroupRep &new_rep) const
SymGroupRepID add_rotation_rep() const
std::vector< SymGroupRep * > m_rep_array
SymGroupRep const & coord_rep() const
SymGroupRepID add_direct_sum_rep(const std::vector< SymGroupRepID > &rep_IDs) const
SymGroupRepID m_coord_rep_ID
ID of Cartesian representation.
SymGroupRepID m_reg_rep_ID
SymGroupRepID add_transformed_rep(SymGroupRepID orig_ID, const Eigen::MatrixXd &trans_mat) const
SymGroupRepID _add_coord_rep() const
Index group_index() const
SymGroupRep const & reg_rep() const
SymGroupRepID _add_reg_rep() const
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
Lattice const * m_lat_ptr
Pointer to a lattice for doing periodic comparisons.
std::vector< SymGroup > unique_subgroups() const
bool is_irreducible() const
const std::string & get_latex_name() const
std::vector< Index > op_indices() const
SymGroup & apply_sym(const SymOp &op)
Calls 'apply_sym' on all SymOps in the group.
std::vector< std::set< std::set< Index > > > _small_subgroups() const
const std::vector< std::set< std::set< Index > > > & subgroups() const
PERIODICITY_TYPE periodicity() const
double max_error()
This returns the group's max_error.
SymGroup & operator-=(const Eigen::Ref< const SymOp::vector_type > &shift)
SymGroupRepID coord_rep_ID() const
const std::string & get_name() const
virtual void clear_tables()
void _generate_subgroups() const
bool contains_periodic(const SymOp &test_op, double tol=TOL) const
Check to see if a SymOp is contained in in SymGroup.
multivector< Index >::X< 2 > alt_multi_table
Index ind_inverse(Index i) const
Get index of operation that is inverse of operation at(i)
void print(std::ostream &out, COORD_TYPE mode) const
Print the SymGroup to a stream.
std::vector< std::vector< Index > > conjugacy_classes
std::vector< SymGroupRepID > irrep_IDs
bool _generate_multi_table() const
SymGroup get_union(const SymGroup &other_group) const
Adds SymOps from 'other_group' and enforces the group property.
void _generate_elem_order_table() const
SymGroup(PERIODICITY_TYPE init_type=PERIODIC)
Initialize by setting periodicity mode (default mode is PERIODIC)
multivector< Index >::X< 2 > elem_order_table
const std::vector< std::vector< Index > > & get_alt_multi_table() const
const std::vector< std::vector< Index > > & get_multi_table() const
virtual void sort()
Sort SymOp in the SymGroup.
std::vector< std::set< std::set< Index > > > small_subgroups() const
PERIODICITY_TYPE m_group_periodicity
Specifies whether to use lattice periodicity when testing for equivalence.
bool is_group(double tol=TOL) const
Check to see if SymGroup satisfies the group property.
Index ind_prod(Index i, Index j) const
Get index of operation that is result of multiplication of at(i)*at(j)
std::vector< std::string > class_names
std::vector< Index > master_group_indices() const
Return the MasterSymGroup indices of the operations in this SymGroup.
virtual void push_back(const SymOp &new_op)
Index class_of_op(Index i) const
Get conjugacy class index of operation at(i)
void calc_space_group_in_range(SymGroup &space_group, const Lattice &_cell, Eigen::Vector3i min_trans, Eigen::Vector3i max_trans) const
SymGroup copy_no_trans(bool keep_repeated=false) const
Fill up a SymGroup with *this minus the shifts.
void _generate_class_names() const
Index find_periodic(const SymOp &test_op, double tol=TOL) const
const std::vector< std::vector< Index > > & get_conjugacy_classes() const
void set_lattice(const Lattice &new_lat)
Lattice used for periodic comparisons (for instance, to generate multiplcation table)
std::string possible_space_groups() const
std::vector< Index > find_all_periodic(const std::vector< SymOp > &subgroup, double tol=TOL) const
void enforce_group(double tol=TOL, Index max_size=200)
Enforce group property by adding products of operations to the group.
void _generate_centralizers() const
SymInfo info(Index i) const
void set_irrep_ID(Index i, SymGroupRepID ID) const
set symrep ID of a particular irrep
void calc_space_group_in_cell(SymGroup &space_group, const Lattice &_cell) const
const MasterSymGroup & master_group() const
void print_locations(std::ostream &stream) const
print locations of the symmetry-generating element of each SymOp
void _generate_alt_multi_table() const
SymGroupRepID allocate_representation() const
Add a new empty representation.
Index find_no_trans(const SymOp &test_op) const
Check to see if a SymOp is contained in in SymGroup and return its index.
const Lattice & lattice() const
Lattice used for periodic comparisons (for instance, to generate multiplcation table)
std::vector< std::vector< Index > > left_cosets(const std::vector< SymOp > &subgroup, double tol=TOL) const
multivector< Index >::X< 2 > multi_table
multi_table[i][j] gives index of operation that is result of at(i)*at(j)
SymOp::matrix_type matrix_type
multivector< Index >::X< 2 > centralizer_table
std::vector< Index > index2conjugacy_class
SymOp::vector_type vector_type
static SymGroup lattice_point_group(Lattice const &_lat)
SymGroupRepID get_irrep_ID(Index i) const
Get symrep ID of a particular irrep.
std::vector< std::set< std::set< Index > > > m_subgroups
SymGroup & operator+=(const Eigen::Ref< const SymOp::vector_type > &shift)
Cartesian translation of SymGroup origin by vector 'shift'.
void invalidate_multi_tables() const
void _generate_conjugacy_classes() const
SymGroupRep const & get_irrep(Index i) const
Get symrep for a particular irrep.
void write(std::string filename, COORD_TYPE mode) const
Write the SymGroup to a file.
SymGroupRep is an alternative representation of a SymGroup for something other than real space....
Type-safe ID object for communicating and accessing Symmetry representation info.
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
Eigen::Matrix3d matrix_type
Eigen::Vector3d vector_type
SymOpRepresentation is the base class for anything describes a symmetry operation.
bool compare_periodic(const SymOp &a, const SymOp &b, const Lattice &lat, PERIODICITY_TYPE periodicity, double _tol)
MasterSymGroup make_master_sym_group(SymGroup const &_group, Lattice const &_lattice)
SymOp within_cell(const SymOp &a, const Lattice &lat, PERIODICITY_TYPE periodicity)
std::map< std::string, std::string > point_group_info(SymGroup const &group)
return dictionary of point group info: result["centricity"] : "Centric" or "Acentric" result["crystal...
SymGroup molecular_point_group(std::map< int, std::vector< Eigen::Vector3d >> coord_map)
bool check(const Lattice &lat)
const PERIODICITY_TYPE PERIODIC
INDEX_TYPE Index
For long integer indexing:
Simple struct to be used as return type for SymOp::info().
SymGroup operator()(FromTypeIt begin, FromTypeIt end, const Lattice &group_home_lattice)
SymGroup operator()(const FromType &adaptable, const Lattice &group_home_lattice)
Shortcut for multidimensional vector (std::vector< std::vector< ...)