10 namespace SymRepTools_v2 {
13 : trans_mat(
std::move(_trans_mat)),
14 characters(
std::move(_characters)),
25 Eigen::VectorXcd tchar(1);
26 tchar(0) = std::complex<double>(
double(trans_mat.rows()), 0.);
36 Eigen::VectorXcd tchar(1);
37 tchar(0) = std::complex<double>(
double(trans_mat.rows()), 0.);
38 return IrrepInfo(trans_mat.template cast<std::complex<double>>(), tchar);
46 for (
auto const &irrep : irreps) {
47 col = irrep.vector_dim();
48 row += irrep.irrep_dim();
52 for (
auto const &irrep : irreps) {
53 trans_mat.block(row, 0, irrep.irrep_dim(), irrep.vector_dim()) =
54 irrep.trans_mat.real();
55 row += irrep.irrep_dim();
83 : fullspace_rep(_fullspace_rep),
84 head_group(_head_group),
85 cyclic_subgroups(_cyclic_subgroups),
86 all_subgroups(_all_subgroups) {
87 using namespace IrrepDecompositionImpl;
100 while (finished_subspace.cols() != dim) {
103 std::vector<IrrepInfo> subspace_irreps_i =
108 if (subspace_irreps_i.size() == 0) {
109 std::stringstream msg;
110 msg <<
"Error in IrrepDecomposition: failed to find all irreps";
111 throw std::runtime_error(msg.str());
115 std::vector<IrrepInfo> symmetrized_subspace_irreps_i =
119 std::vector<IrrepInfo> symmetrized_fullspace_irreps_i =
122 for (
auto const irrep : symmetrized_fullspace_irreps_i) {
129 finished_subspace =
extend(finished_subspace, finished_subspace_i);
154 for (
Index i = 0; i < rep.size(); ++i) {
155 matrix_rep.push_back(*rep[i]->
MatrixXd());
158 for (
SymOp const &op : head_group) {
159 head_group_indices.insert(op.index());
166 matrix_rep, head_group_indices, init_subspace,
167 cyclic_subgroups, all_subgroups, allow_complex};
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
const std::vector< std::set< std::set< Index > > > & subgroups() const
std::vector< std::set< std::set< Index > > > small_subgroups() const
SymGroupRep is an alternative representation of a SymGroup for something other than real space....
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
SymRepTools_v2::IrrepDecomposition make_irrep_decomposition(SymGroupRep const &rep, SymGroup const &head_group, Eigen::MatrixXd const &_init_subspace, bool allow_complex)
Make an IrrepDecompotion using CASM::SymGroupRep and CASM::SymGroup.
std::vector< SymRepTools::IrrepInfo > irrep_decomposition(SymGroupRep const &_rep, SymGroup const &head_group, bool allow_complex)
Finds irreducible subspaces that comprise an underlying subspace It does not rely on the character ta...
bool almost_zero(const T &val, double tol=TOL)
If T is not integral, use std::abs(val) < tol;.
INDEX_TYPE Index
For long integer indexing: