CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::SymOp Class Reference

#include <SymOp.hh>

+ Inheritance diagram for CASM::SymOp:

Detailed Description

SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian (CART) information about how a symetry operation transforms 3D spatial coordinates.

Definition at line 28 of file SymOp.hh.

Public Types

typedef Eigen::Matrix3d matrix_type
 
typedef Eigen::Vector3d vector_type
 

Public Member Functions

 SymOp (const Eigen::Ref< const matrix_type > &_mat=matrix_type::Identity(), const Eigen::Ref< const vector_type > &_tau=vector_type::Zero(), double _map_error=TOL)
 
 SymOp (const Eigen::Ref< const matrix_type > &_mat, double _map_error)
 
const matrix_typematrix () const
 Const access of entire cartesian symmetry matrix. More...
 
const vector_typetau () const
 Const access of the cartesian translation vector, 'tau'. More...
 
bool is_identity () const
 returns true if matrix part of operation is identity More...
 
void set_index (const MasterSymGroup &new_group, Index new_index)
 
const double & map_error () const
 Allows access to the map_error. More...
 
void set_map_error (const double &value)
 
SymOp operator* (const SymOp &RHS) const
 get a new SymOp that is equivalent to subsequent application of both SymOps More...
 
SymOpoperator+= (const Eigen::Ref< const vector_type > &RHS)
 Cartesian translation of the origin of the symmetry operation by Coordinate RHS. More...
 
SymOpoperator-= (const Eigen::Ref< const vector_type > &RHS)
 
SymOp inverse () const
 get the inverse of this SymOp More...
 
SymOp no_trans () const
 Get copy of the SymOp without translation. More...
 
bool operator== (const SymOp &RHS) const
 Check equality of SymOps, (matrix and translation). Does not necessarily return true for translational equivalents. More...
 
SymOpapply_sym (const SymOp &op)
 
double character () const override
 calculate and return character of this SymOp (neglecting tau) More...
 
void print (std::ostream &stream, const Eigen::Ref< const matrix_type > &c2fmat=matrix_type::Identity()) const
 
void print_short (std::ostream &stream, const Eigen::Ref< const matrix_type > &c2fmat=matrix_type::Identity()) const
 
SymOpRepresentationcopy () const override
 Return pointer to a new copy of this SymOp. More...
 
SymOp unregistered_copy () const
 
jsonParserto_json (jsonParser &json) const override
 
void from_json (const jsonParser &json) override
 
virtual Permutation const * get_permutation () const
 
virtual Eigen::MatrixXd const * get_MatrixXd () const
 
virtual SymBasisPermute const * get_ucc_permutation () const
 
Eigen::MatrixXd const * get_matrix_rep (SymGroupRepID _rep_ID) const
 get pointer to matrix representation corresponding to rep_ID More...
 
Permutation const * get_permutation_rep (SymGroupRepID _rep_ID) const
 get pointer to permutation representation corresponding to _rep_ID More...
 
SymBasisPermute const * get_basis_permute_rep (SymGroupRepID _rep_ID) const
 get pointer to BasisPermute representation corresponding to _rep_ID More...
 
Array< Eigen::MatrixXd const * > get_matrix_reps (Array< SymGroupRepID > _rep_IDs) const
 get array of pointers to matrix representations for representations corresponding to _rep_IDs More...
 
void set_rep (SymGroupRepID _rep_ID, const SymOpRepresentation &op_rep) const
 set representation for SymOp corresponding to _rep_ID More...
 
void set_identifiers (const MasterSymGroup &new_group, SymGroupRepID new_rep_ID)
 Change m_master_group and determine op_index. More...
 
void set_identifiers (const MasterSymGroup &new_group, SymGroupRepID new_rep_ID, Index new_op_index)
 Set m_master_group, _rep_ID, and op_index. More...
 
const MasterSymGroupmaster_group () const
 const access of head group More...
 
bool has_valid_master () const
 check if this representation is registered with a MasterSymGroup More...
 
void invalidate_index ()
 
Index index () const
 Index of this operation within the master_group. More...
 
SymGroupRepID rep_ID () const
 ID of representation that this operation belongs to within the master_group. More...
 
Index ind_inverse () const
 Get the operation index of the inverse of this operation, using the master_group's multiplication table. More...
 
Index ind_prod (const SymOpRepresentation &RHS) const
 

Static Public Member Functions

static SymOp translation (const Eigen::Ref< const vector_type > &_tau)
 static method to create operation that describes pure translation More...
 

Protected Attributes

MasterSymGroup const * m_master_group
 Pointer to the MasterSymGroup where prototype of this SymOp lives. More...
 
SymGroupRepID m_rep_ID
 ID of this representation within the master_group. Default is uninitialized. More...
 
Index m_op_index
 Index into MasterSymGroup that specifies the operation. More...
 

Private Member Functions

 SymOp (const Eigen::Ref< const matrix_type > &_mat, const Eigen::Ref< const vector_type > &_tau, double _map_error, Index _op_index, MasterSymGroup const *_master_ptr)
 

Private Attributes

matrix_type m_mat
 
vector_type m_tau
 
double m_map_error
 

Member Typedef Documentation

typedef Eigen::Matrix3d CASM::SymOp::matrix_type

Definition at line 31 of file SymOp.hh.

typedef Eigen::Vector3d CASM::SymOp::vector_type

Definition at line 32 of file SymOp.hh.

Constructor & Destructor Documentation

CASM::SymOp::SymOp ( const Eigen::Ref< const matrix_type > &  _mat = matrix_type::Identity(),
const Eigen::Ref< const vector_type > &  _tau = vector_type::Zero(),
double  _map_error = TOL 
)
inline

Create new SymOp from Matrix3 and tau translation by default, assume no translation

Definition at line 41 of file SymOp.hh.

CASM::SymOp::SymOp ( const Eigen::Ref< const matrix_type > &  _mat,
double  _map_error 
)
inline

Create new SymOp from Matrix3 and no translation, but include mapping error

Definition at line 49 of file SymOp.hh.

CASM::SymOp::SymOp ( const Eigen::Ref< const matrix_type > &  _mat,
const Eigen::Ref< const vector_type > &  _tau,
double  _map_error,
Index  _op_index,
MasterSymGroup const *  _master_ptr 
)
inlineprivate

Create new SymOp from Matrix3 and tau translation by default, assume no translation

Definition at line 133 of file SymOp.hh.

Member Function Documentation

SymOp & CASM::SymOp::apply_sym ( const SymOp op)

Performs conjugation of this SymOp with SymOp 'op' In other words, transforms coordinates of this SymOp by transformation specified by 'op': op.inverse()*(*this)*op

Definition at line 111 of file SymOp.cc.

double CASM::SymOp::character ( ) const
inlineoverridevirtual

calculate and return character of this SymOp (neglecting tau)

Reimplemented from CASM::SymOpRepresentation.

Definition at line 104 of file SymOp.hh.

SymOpRepresentation* CASM::SymOp::copy ( ) const
inlineoverridevirtual

Return pointer to a new copy of this SymOp.

Implements CASM::SymOpRepresentation.

Definition at line 118 of file SymOp.hh.

void CASM::SymOp::from_json ( const jsonParser json)
overridevirtual

re-throw exceptions

Implements CASM::SymOpRepresentation.

Definition at line 179 of file SymOp.cc.

SymBasisPermute const * CASM::SymOpRepresentation::get_basis_permute_rep ( SymGroupRepID  _rep_ID) const
inherited

get pointer to BasisPermute representation corresponding to _rep_ID

Definition at line 16 of file SymOpRepresentation.cc.

Eigen::MatrixXd const * CASM::SymOpRepresentation::get_matrix_rep ( SymGroupRepID  _rep_ID) const
inherited

get pointer to matrix representation corresponding to rep_ID

Definition at line 9 of file SymOpRepresentation.cc.

Array< Eigen::MatrixXd const * > CASM::SymOpRepresentation::get_matrix_reps ( Array< SymGroupRepID _rep_IDs) const
inherited

get array of pointers to matrix representations for representations corresponding to _rep_IDs

Definition at line 29 of file SymOpRepresentation.cc.

virtual Eigen::MatrixXd const* CASM::SymOpRepresentation::get_MatrixXd ( ) const
inlinevirtualinherited

Reimplemented in CASM::SymPermutation, and CASM::SymMatrixXd.

Definition at line 46 of file SymOpRepresentation.hh.

virtual Permutation const* CASM::SymOpRepresentation::get_permutation ( ) const
inlinevirtualinherited

Reimplemented in CASM::SymPermutation.

Definition at line 42 of file SymOpRepresentation.hh.

Permutation const * CASM::SymOpRepresentation::get_permutation_rep ( SymGroupRepID  _rep_ID) const
inherited

get pointer to permutation representation corresponding to _rep_ID

Definition at line 22 of file SymOpRepresentation.cc.

virtual SymBasisPermute const* CASM::SymOpRepresentation::get_ucc_permutation ( ) const
inlinevirtualinherited

Reimplemented in CASM::SymBasisPermute.

Definition at line 50 of file SymOpRepresentation.hh.

bool CASM::SymOpRepresentation::has_valid_master ( ) const
inlineinherited

check if this representation is registered with a MasterSymGroup

Definition at line 83 of file SymOpRepresentation.hh.

Index CASM::SymOpRepresentation::ind_inverse ( ) const
inherited

Get the operation index of the inverse of this operation, using the master_group's multiplication table.

Definition at line 76 of file SymOpRepresentation.cc.

Index CASM::SymOpRepresentation::ind_prod ( const SymOpRepresentation RHS) const
inherited

Get the operation index of operation that is the product of this operation and

Parameters
RHS,usingthe master_group's multiplication table

Definition at line 83 of file SymOpRepresentation.cc.

Index CASM::SymOpRepresentation::index ( ) const
inlineinherited

Index of this operation within the master_group.

Definition at line 92 of file SymOpRepresentation.hh.

void CASM::SymOpRepresentation::invalidate_index ( )
inlineinherited

Definition at line 87 of file SymOpRepresentation.hh.

SymOp CASM::SymOp::inverse ( ) const

get the inverse of this SymOp

Definition at line 82 of file SymOp.cc.

bool CASM::SymOp::is_identity ( ) const
inline

returns true if matrix part of operation is identity

Definition at line 69 of file SymOp.hh.

const double & CASM::SymOp::map_error ( ) const

Allows access to the map_error.

Definition at line 9 of file SymOp.cc.

const MasterSymGroup& CASM::SymOpRepresentation::master_group ( ) const
inlineinherited

const access of head group

Definition at line 77 of file SymOpRepresentation.hh.

const matrix_type& CASM::SymOp::matrix ( ) const
inline

Const access of entire cartesian symmetry matrix.

Definition at line 57 of file SymOp.hh.

SymOp CASM::SymOp::no_trans ( ) const

Get copy of the SymOp without translation.

Definition at line 97 of file SymOp.cc.

SymOp CASM::SymOp::operator* ( const SymOp RHS) const

get a new SymOp that is equivalent to subsequent application of both SymOps

Definition at line 39 of file SymOp.cc.

SymOp & CASM::SymOp::operator+= ( const Eigen::Ref< const vector_type > &  RHS)

Cartesian translation of the origin of the symmetry operation by Coordinate RHS.

Definition at line 66 of file SymOp.cc.

SymOp & CASM::SymOp::operator-= ( const Eigen::Ref< const vector_type > &  RHS)

Definition at line 73 of file SymOp.cc.

bool CASM::SymOp::operator== ( const SymOp RHS) const

Check equality of SymOps, (matrix and translation). Does not necessarily return true for translational equivalents.

Definition at line 103 of file SymOp.cc.

void CASM::SymOp::print ( std::ostream &  stream,
const Eigen::Ref< const matrix_type > &  c2fmat = matrix_type::Identity() 
) const

Print this SymOP as header, followed by symmetry_mat and tau_vec (aligned vertically)

Parameters
c2fmatis a transformation matrix that can be passed to convert from Cartesian to fractional coordinates

Definition at line 118 of file SymOp.cc.

void CASM::SymOp::print_short ( std::ostream &  stream,
const Eigen::Ref< const matrix_type > &  c2fmat = matrix_type::Identity() 
) const

Prints abridged description of SymOp, including its type, angle, and eigenvector does NOT print out the entire symmetry operation matrix

Parameters
c2fmatis a transformation matrix that can be passed to convert from Cartesian to fractional coordinates
SymGroupRepID CASM::SymOpRepresentation::rep_ID ( ) const
inlineinherited

ID of representation that this operation belongs to within the master_group.

Definition at line 97 of file SymOpRepresentation.hh.

void CASM::SymOpRepresentation::set_identifiers ( const MasterSymGroup new_group,
SymGroupRepID  new_rep_ID 
)
inherited

Change m_master_group and determine op_index.

Definition at line 46 of file SymOpRepresentation.cc.

void CASM::SymOpRepresentation::set_identifiers ( const MasterSymGroup new_group,
SymGroupRepID  new_rep_ID,
Index  new_op_index 
)
inherited

Set m_master_group, _rep_ID, and op_index.

Definition at line 66 of file SymOpRepresentation.cc.

void CASM::SymOp::set_index ( const MasterSymGroup new_group,
Index  new_index 
)

set master_group and op_index for the SymOp Performs simple checks to ensure that (*this) is compatible with new_group[new_index]

Definition at line 23 of file SymOp.cc.

void CASM::SymOp::set_map_error ( const double &  value)

Definition at line 15 of file SymOp.cc.

void CASM::SymOpRepresentation::set_rep ( SymGroupRepID  _rep_ID,
const SymOpRepresentation op_rep 
) const
inherited

set representation for SymOp corresponding to _rep_ID

Definition at line 39 of file SymOpRepresentation.cc.

const vector_type& CASM::SymOp::tau ( ) const
inline

Const access of the cartesian translation vector, 'tau'.

Definition at line 63 of file SymOp.hh.

jsonParser & CASM::SymOp::to_json ( jsonParser json) const
overridevirtual

Implements CASM::SymOpRepresentation.

Definition at line 148 of file SymOp.cc.

static SymOp CASM::SymOp::translation ( const Eigen::Ref< const vector_type > &  _tau)
inlinestatic

static method to create operation that describes pure translation

Definition at line 35 of file SymOp.hh.

SymOp CASM::SymOp::unregistered_copy ( ) const
inline

Definition at line 122 of file SymOp.hh.

Member Data Documentation

double CASM::SymOp::m_map_error
private

This stores the mapping error associated with this SymOp, which will depend on the tolerances you choose when you attempt to generate symmetry groups.

Definition at line 166 of file SymOp.hh.

MasterSymGroup const* CASM::SymOpRepresentation::m_master_group
protectedinherited

Pointer to the MasterSymGroup where prototype of this SymOp lives.

Definition at line 117 of file SymOpRepresentation.hh.

matrix_type CASM::SymOp::m_mat
private

matrix representation of symettry operation in Cartesian (symmetry_mat[CART]) Fractional (symmetry_mat[FRAC])

Definition at line 158 of file SymOp.hh.

Index CASM::SymOpRepresentation::m_op_index
protectedinherited

Index into MasterSymGroup that specifies the operation.

Definition at line 123 of file SymOpRepresentation.hh.

SymGroupRepID CASM::SymOpRepresentation::m_rep_ID
protectedinherited

ID of this representation within the master_group. Default is uninitialized.

Definition at line 120 of file SymOpRepresentation.hh.

vector_type CASM::SymOp::m_tau
private

translation vector that is applied to a point after matrix transformation

Definition at line 162 of file SymOp.hh.


The documentation for this class was generated from the following files: