CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::SymRepTools_v2::IrrepDecompositionImpl Namespace Reference

Classes

struct  CommuterParamsCounter
 
struct  PossibleIrrep
 Data structure used for storing and checking possible irreps. More...
 

Functions

Eigen::MatrixXcd prettyc (const Eigen::MatrixXcd &M)
 Round entries that are within tol of being integer to that integer value. More...
 
Eigen::MatrixXd pretty (const Eigen::MatrixXd &M)
 Round entries that are within tol of being integer to that integer value. More...
 
Eigen::MatrixXd real_I (Index rows, Index cols)
 
Eigen::MatrixXd real_Zero (Index rows, Index cols)
 
Eigen::MatrixXcd complex_I (Index rows, Index cols)
 
Eigen::MatrixXcd complex_Zero (Index rows, Index cols)
 
Eigen::MatrixXcd make_commuter (CommuterParamsCounter const &params, MatrixRep const &rep, GroupIndices const &head_group, Eigen::MatrixXcd const &kernel)
 
Eigen::MatrixXcd make_kernel (Eigen::MatrixXcd const &subspace)
 
Eigen::MatrixXd make_kernel (Eigen::MatrixXd const &subspace)
 
Index find_end_of_equal_eigenvalues (Index begin, Eigen::VectorXd const &eigenvalues)
 
Eigen::MatrixXcd make_irrep_subspace (Eigen::MatrixXcd const &KV_matrix, Index begin, Index end, bool allow_complex)
 Make an irreducible subspace. More...
 
Eigen::VectorXcd make_characters (std::vector< Eigen::MatrixXcd > const &rep)
 Calculate character for all matrices in rep. More...
 
Eigen::VectorXd make_characters (std::vector< Eigen::MatrixXd > const &rep)
 Calculate character for all matrices in rep. More...
 
bool make_is_block_diagonal (std::vector< Eigen::MatrixXcd > const &rep, Index begin, Index end, double tol)
 Check if approximately zero outside block along diagonal. More...
 
Eigen::VectorXcd make_irrep_characters (std::vector< Eigen::MatrixXcd > const &rep, Index begin, Index end)
 Find characters for block in range [begin, end) More...
 
double make_squared_norm (Eigen::VectorXcd const &characters)
 
double make_squared_norm (Eigen::VectorXd const &characters)
 
std::complex< double > frobenius_product (Eigen::MatrixXcd const &matrix)
 
Eigen::MatrixXcd normalize_commuter (Eigen::MatrixXcd const &commuter)
 
bool is_extended_by (Eigen::MatrixXcd const &space_A, Eigen::MatrixXcd const &space_B)
 Return true if space_A is extended by space_B. More...
 
Eigen::MatrixXcd extend (Eigen::MatrixXcd const &space_A, Eigen::MatrixXcd const &space_B)
 Return matrix combining columns of space_A and space_B. More...
 
Eigen::MatrixXd extend (Eigen::MatrixXd const &space_A, Eigen::MatrixXd const &space_B)
 Return matrix combining columns of space_A and space_B. More...
 
std::vector< PossibleIrrepmake_possible_irreps (Eigen::MatrixXcd const &commuter, Eigen::MatrixXcd const &kernel, MatrixRep const &rep, GroupIndices const &head_group, bool allow_complex)
 
std::vector< IrrepInfomake_irrep_info (std::set< PossibleIrrep > const &irreps)
 Make a vector of IrrepInfo from PossibleIrreps. More...
 
IrrepInfo subspace_to_full_space (IrrepInfo const &subspace_irrep, Eigen::MatrixXd const &subspace)
 Transforms IrrepInfo constructed for a subspace to be IrrepInfo appropriate for the full space (full space dimension == subspace.rows()) More...
 
IrrepInfo make_dummy_irrep_info (Eigen::MatrixXcd const &trans_mat)
 
bool is_irrep (MatrixRep const &rep, GroupIndices const &head_group)
 
std::vector< IrrepInfoirrep_decomposition (MatrixRep const &rep, GroupIndices const &head_group, bool allow_complex)
 Finds irreducible subspaces that comprise an underlying subspace. More...
 
std::vector< IrrepInfomake_fullspace_irreps (std::vector< IrrepInfo > const &subspace_irreps, Eigen::MatrixXd const &subspace)
 Convert irreps generated for a subspace to full space dimension. More...
 
Eigen::MatrixXd make_invariant_space (MatrixRep const &rep, GroupIndices const &head_group, Eigen::MatrixXd const &subspace)
 Expand subspace by application of group, and orthogonalize. More...
 
MatrixRep make_subspace_rep (MatrixRep const &fullspace_rep, Eigen::MatrixXd const &subspace)
 
std::vector< IrrepInfosymmetrize_irreps (MatrixRep const &subspace_rep, GroupIndices const &head_group, std::vector< IrrepInfo > const &irreps, GroupIndicesOrbitVector const &cyclic_subgroups, GroupIndicesOrbitVector const &all_subgroups)
 Symmetrize IrrepInfo, by finding high symmetry directions and aligning the irrep subspace basis with those directions. More...
 
Index get_total_dim (std::set< PossibleIrrep > const &irreps)
 
std::vector< PossibleIrrepmake_possible_irreps (Eigen::MatrixXcd const &commuter, Eigen::MatrixXcd const &kernel, MatrixRep const &rep, GroupIndices const &head_group, double is_irrep_tol, bool allow_complex)
 

Function Documentation

◆ complex_I()

Eigen::MatrixXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::complex_I ( Index  rows,
Index  cols 
)

Definition at line 61 of file IrrepDecompositionImpl.cc.

◆ complex_Zero()

Eigen::MatrixXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::complex_Zero ( Index  rows,
Index  cols 
)

Definition at line 65 of file IrrepDecompositionImpl.cc.

◆ extend() [1/2]

Eigen::MatrixXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::extend ( Eigen::MatrixXcd const &  space_A,
Eigen::MatrixXcd const &  space_B 
)

Return matrix combining columns of space_A and space_B.

Definition at line 323 of file IrrepDecompositionImpl.cc.

◆ extend() [2/2]

Eigen::MatrixXd CASM::SymRepTools_v2::IrrepDecompositionImpl::extend ( Eigen::MatrixXd const &  space_A,
Eigen::MatrixXd const &  space_B 
)

Return matrix combining columns of space_A and space_B.

Definition at line 332 of file IrrepDecompositionImpl.cc.

◆ find_end_of_equal_eigenvalues()

Index CASM::SymRepTools_v2::IrrepDecompositionImpl::find_end_of_equal_eigenvalues ( Index  begin,
Eigen::VectorXd const &  eigenvalues 
)

Definition at line 156 of file IrrepDecompositionImpl.cc.

◆ frobenius_product()

std::complex< double > CASM::SymRepTools_v2::IrrepDecompositionImpl::frobenius_product ( Eigen::MatrixXcd const &  matrix)

Definition at line 308 of file IrrepDecompositionImpl.cc.

◆ get_total_dim()

Index CASM::SymRepTools_v2::IrrepDecompositionImpl::get_total_dim ( std::set< PossibleIrrep > const &  irreps)

Definition at line 340 of file IrrepDecompositionImpl.cc.

◆ irrep_decomposition()

std::vector< IrrepInfo > CASM::SymRepTools_v2::IrrepDecompositionImpl::irrep_decomposition ( MatrixRep const &  rep,
GroupIndices const &  head_group,
bool  allow_complex 
)

Finds irreducible subspaces that comprise an underlying subspace.

IrrepDecomposition proceeds by constructing "commuters", M_k, which commute (M_k * R(r) = R(r) * M_k) with all of the matrix representations, R(r), of the group. The commuters are constructed to reveal irreducible vector spaces (via application of a Reynolds operator), and be orthonormal to existing commuters (via Gram-Shmidt). The commuters are found via a process which constructs a candidate commuter which is either the Zero matrix, and then skipped, or else it is a useful non-zero commuter which will block diagonalize :

M_candidate(i,j,phase) = sum_r R(r) * M_init * R(r).transpose()
M_init = phase * K.col(i) * K.col(j).adjoint() +
         std::conj(phase) * K.col(j) * K.col(i).adjoint()

where:

  • K: kernel matrix, the null space of the already found irreducible vector spaces. The kernel matrix is initialized as a full rank matrix and over the course of the IrrepDecomposition the kernel shrinks as the irreducible vector spaces are found.
  • candidate commuting matrices, M_candidate, are built from the outer product of two columns, i, and j, of the kernel matrix, and a complex phase parameter (1 or i)
  • R(r): is the matrix representation for element r of the head_group
  • M_k: previously found commuting matrices

Once a new non-zero commuter is found, possible irreducible subspaces are found and checked. A possible irreducible subspace is each K*V_equal_eigenvalue_set[i], where V_equal_eigenvalue_set[i] is the vector space corresponding to eigenvectors of (K.adjoint() * M_new * K) with equal eigenvalues.

Eigenvalue decomposition:

K.adjoint() * M_new * K = V * D * V.inverse()
  • D: diagonal matrix of sorted eigenvalues (size K.cols() x K.cols())
  • V: eigenvector column matrix (size K.cols() x K.cols())

For each set of equal eigenvalues, a PossibleIrrep is constructed that stores:

  • begin: the column of the first of the set of equal eigenvalues
  • irrep_dim: the subspace dimension / the number of equal eigenvalues
  • subspace: irreducible subspace, (dim x irrep_dim (?) matrix):

    First step, find vector space:

    • If allow_complex: subspace = X
    • If !allow_complex: subspace = [sqrt(2.0) * X.real(), sqrt(2.0) * X.imag()], where X = (K * V).block(0, begin, K.rows(), irrep_dim) Second step, orthogonalize via QR decomposition
  • characters: Vector of complex characters. The character of a matrix representation is the trace of the representation.
  • characters_squared_norm: For an irreducible representation, the squared norm of the characters vector is equal the size of the group.
  • symmetrizer: A pair with, symmetrizer.first being a MatrixXcd, which defines a rotation of the irreducible subspace that aligns its components along high-symmetry directions, and symmetrizer.second being a vector of orbits of high-symmetry directions

For each PossibleIrrep, check if it extends adapted_subspace. If it does, then symmetrize and save the irrep. For all new irreps, extend adapted_subspace to include the irrep's subspace. Then once all the new irreps are added, recalculate the kernel matrix and begin the loop again, until the adapted_subspace is full rank. Finds irreducible subspaces that comprise an underlying subspace

This method does not rely on the character table, but instead utilizes a brute-force approach. It is not guaranteed to find all irreps, so the resulting irreps should be checked if they span the entire space represented by rep. This can be done by checking if full_trans_mat(result).adjoint().rows() == rep[i].rows()). This method does not align the irrep subspace axes along high symmetry directions.

Parameters
repMatrix representation of head_group, this defines group action on the underlying vector space
head_groupGroup for which the irreps are to be found
allow_complexIf true, irreducible space basis vectors may be complex-valued. If false, complex irreps are combined to form real representations
Returns
vector of IrrepInfo objects. Irreps are ordered by dimension, with identity first (if present). Repeated irreps (with equal character vectors) are sequential, and are distinguished by IrrepInfo::index.

Definition at line 663 of file IrrepDecompositionImpl.cc.

◆ is_extended_by()

bool CASM::SymRepTools_v2::IrrepDecompositionImpl::is_extended_by ( Eigen::MatrixXcd const &  space_A,
Eigen::MatrixXcd const &  space_B 
)

Return true if space_A is extended by space_B.

Definition at line 317 of file IrrepDecompositionImpl.cc.

◆ is_irrep()

bool CASM::SymRepTools_v2::IrrepDecompositionImpl::is_irrep ( MatrixRep const &  rep,
GroupIndices const &  head_group 
)

Check if a representation is irreducible

A representation is irreducible if the squared norm of the characters equals the group size

Definition at line 567 of file IrrepDecompositionImpl.cc.

◆ make_characters() [1/2]

Eigen::VectorXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::make_characters ( std::vector< Eigen::MatrixXcd > const &  rep)

Calculate character for all matrices in rep.

Definition at line 214 of file IrrepDecompositionImpl.cc.

◆ make_characters() [2/2]

Eigen::VectorXd CASM::SymRepTools_v2::IrrepDecompositionImpl::make_characters ( std::vector< Eigen::MatrixXd > const &  rep)

Calculate character for all matrices in rep.

Definition at line 226 of file IrrepDecompositionImpl.cc.

◆ make_commuter()

Eigen::MatrixXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::make_commuter ( CommuterParamsCounter const &  params,
MatrixRep const &  rep,
GroupIndices const &  head_group,
Eigen::MatrixXcd const &  kernel 
)

Definition at line 120 of file IrrepDecompositionImpl.cc.

◆ make_dummy_irrep_info()

IrrepInfo CASM::SymRepTools_v2::IrrepDecompositionImpl::make_dummy_irrep_info ( Eigen::MatrixXcd const &  trans_mat)

Construct a "dummy" IrrepInfo with user specified transformtion matrix

The "dummy" IrrepInfo is constructed with specified transformtion matrix and character vector of [(dim,0)] where 'dim' is the dimension of irrep (number of rows of trans_mat)

◆ make_fullspace_irreps()

std::vector< IrrepInfo > CASM::SymRepTools_v2::IrrepDecompositionImpl::make_fullspace_irreps ( std::vector< IrrepInfo > const &  subspace_irreps,
Eigen::MatrixXd const &  subspace 
)

Convert irreps generated for a subspace to full space dimension.

Convert irreps generated for a subspace to full space dimension

Parameters
subspace_irrepsIrreducible spaces in the subspace (subspace_irreps[i].trans_mat.rows() == subspace dimension, subspace_irreps[i].trans_mat.cols() == fullspace dimensino)
subspaceBasis for a subspace (subspace.rows() == fullspace dimension, subspace.cols() == subspace dimension)

Definition at line 765 of file IrrepDecompositionImpl.cc.

◆ make_invariant_space()

Eigen::MatrixXd CASM::SymRepTools_v2::IrrepDecompositionImpl::make_invariant_space ( MatrixRep const &  rep,
GroupIndices const &  head_group,
Eigen::MatrixXd const &  subspace 
)

Expand subspace by application of group, and orthogonalize.

Definition at line 777 of file IrrepDecompositionImpl.cc.

◆ make_irrep_characters()

Eigen::VectorXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::make_irrep_characters ( std::vector< Eigen::MatrixXcd > const &  rep,
Index  begin,
Index  end 
)

Find characters for block in range [begin, end)

Definition at line 279 of file IrrepDecompositionImpl.cc.

◆ make_irrep_info()

std::vector< IrrepInfo > CASM::SymRepTools_v2::IrrepDecompositionImpl::make_irrep_info ( std::set< PossibleIrrep > const &  irreps)

Make a vector of IrrepInfo from PossibleIrreps.

Definition at line 507 of file IrrepDecompositionImpl.cc.

◆ make_irrep_subspace()

Eigen::MatrixXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::make_irrep_subspace ( Eigen::MatrixXcd const &  KV_matrix,
Index  begin,
Index  end,
bool  allow_complex 
)

Make an irreducible subspace.

Make an irreducible subspace

Makes an orthogonalized irreducible subspace, from (K * V), where

  • K is the kernel matrix,
  • V is the eigenvector matrix of ( K.adjoint() * M_new * K )
  • M_new is the new non-zero commuter matrix
Parameters
KV_matrixMatrix (K * V)
begin,endRange of equal eigenvalues
allow_complexIf true, allow subspace with complex basis vectors. If false, will make a pseudo irrep subspace that combines two complex irreps. In this case the irrep is reducible, but this is the most- reduced representation that has real basis vectors.

Definition at line 180 of file IrrepDecompositionImpl.cc.

◆ make_is_block_diagonal()

bool CASM::SymRepTools_v2::IrrepDecompositionImpl::make_is_block_diagonal ( std::vector< Eigen::MatrixXcd > const &  rep,
Index  begin,
Index  end,
double  tol 
)

Check if approximately zero outside block along diagonal.

Check if approximately zero outside block along diagonal

Only checks columns and rows in range [begin, end)

Definition at line 240 of file IrrepDecompositionImpl.cc.

◆ make_kernel() [1/2]

Eigen::MatrixXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::make_kernel ( Eigen::MatrixXcd const &  subspace)

Definition at line 143 of file IrrepDecompositionImpl.cc.

◆ make_kernel() [2/2]

Eigen::MatrixXd CASM::SymRepTools_v2::IrrepDecompositionImpl::make_kernel ( Eigen::MatrixXd const &  subspace)

Definition at line 149 of file IrrepDecompositionImpl.cc.

◆ make_possible_irreps() [1/2]

std::vector<PossibleIrrep> CASM::SymRepTools_v2::IrrepDecompositionImpl::make_possible_irreps ( Eigen::MatrixXcd const &  commuter,
Eigen::MatrixXcd const &  kernel,
MatrixRep const &  rep,
GroupIndices const &  head_group,
bool  allow_complex 
)

Given a new commuter matrix, perform eigenvalue decomposition, and construct possible irreps

◆ make_possible_irreps() [2/2]

std::vector<PossibleIrrep> CASM::SymRepTools_v2::IrrepDecompositionImpl::make_possible_irreps ( Eigen::MatrixXcd const &  commuter,
Eigen::MatrixXcd const &  kernel,
MatrixRep const &  rep,
GroupIndices const &  head_group,
double  is_irrep_tol,
bool  allow_complex 
)

Given kernel, K, and commuter matrix, M, perform eigenvalue decomposition K.adjoint() * M * K = V * D * V.inverse() and construct matrix representation that acts on vectors in the K*V basis, which will be block diagonalized and sorted by eigenvalue. Each block corresponds to a possible irrep, which can be checked by characters value.

Definition at line 456 of file IrrepDecompositionImpl.cc.

◆ make_squared_norm() [1/2]

double CASM::SymRepTools_v2::IrrepDecompositionImpl::make_squared_norm ( Eigen::VectorXcd const &  characters)

Definition at line 292 of file IrrepDecompositionImpl.cc.

◆ make_squared_norm() [2/2]

double CASM::SymRepTools_v2::IrrepDecompositionImpl::make_squared_norm ( Eigen::VectorXd const &  characters)

Definition at line 300 of file IrrepDecompositionImpl.cc.

◆ make_subspace_rep()

MatrixRep CASM::SymRepTools_v2::IrrepDecompositionImpl::make_subspace_rep ( MatrixRep const &  fullspace_rep,
Eigen::MatrixXd const &  subspace 
)

Definition at line 801 of file IrrepDecompositionImpl.cc.

◆ normalize_commuter()

Eigen::MatrixXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::normalize_commuter ( Eigen::MatrixXcd const &  commuter)

Definition at line 312 of file IrrepDecompositionImpl.cc.

◆ pretty()

Eigen::MatrixXd CASM::SymRepTools_v2::IrrepDecompositionImpl::pretty ( const Eigen::MatrixXd &  M)

Round entries that are within tol of being integer to that integer value.

Definition at line 36 of file IrrepDecompositionImpl.cc.

◆ prettyc()

Eigen::MatrixXcd CASM::SymRepTools_v2::IrrepDecompositionImpl::prettyc ( const Eigen::MatrixXcd &  M)

Round entries that are within tol of being integer to that integer value.

Definition at line 18 of file IrrepDecompositionImpl.cc.

◆ real_I()

Eigen::MatrixXd CASM::SymRepTools_v2::IrrepDecompositionImpl::real_I ( Index  rows,
Index  cols 
)

Definition at line 53 of file IrrepDecompositionImpl.cc.

◆ real_Zero()

Eigen::MatrixXd CASM::SymRepTools_v2::IrrepDecompositionImpl::real_Zero ( Index  rows,
Index  cols 
)

Definition at line 57 of file IrrepDecompositionImpl.cc.

◆ subspace_to_full_space()

IrrepInfo CASM::SymRepTools_v2::IrrepDecompositionImpl::subspace_to_full_space ( IrrepInfo const &  subspace_irrep,
Eigen::MatrixXd const &  subspace 
)

Transforms IrrepInfo constructed for a subspace to be IrrepInfo appropriate for the full space (full space dimension == subspace.rows())

Parameters
irrepIrrepInfo constructed for a subspace (irrep.trans_mat shape is (subspace.cols() x subspace.rows())
subspaceThe subspace that subspace_irrep was constructed for
Returns
IrrepInfo constructed for the full space (result.trans_mat shape is (subspace.cols() x subspace.cols())

Definition at line 544 of file IrrepDecompositionImpl.cc.

◆ symmetrize_irreps()

std::vector< IrrepInfo > CASM::SymRepTools_v2::IrrepDecompositionImpl::symmetrize_irreps ( MatrixRep const &  subspace_rep,
GroupIndices const &  head_group,
std::vector< IrrepInfo > const &  irreps,
GroupIndicesOrbitVector const &  cyclic_subgroups,
GroupIndicesOrbitVector const &  all_subgroups 
)

Symmetrize IrrepInfo, by finding high symmetry directions and aligning the irrep subspace basis with those directions.

Definition at line 817 of file IrrepDecompositionImpl.cc.