25 && (
this == &(new_group[new_index]) ||
112 (*this) = op * (*this) * (op.
inverse());
118 void SymOp::print(std::ostream &stream,
const Eigen::Ref<const SymOp::matrix_type> &c2f_mat)
const {
120 int tprec = stream.precision();
121 std::ios::fmtflags tflags = stream.flags();
125 stream.flags(std::ios::left);
126 stream << std::setw(53) <<
"Symmetry Operation Matrix" <<
"Shift \n";
128 stream.flags(std::ios::showpoint | std::ios::fixed | std::ios::right);
132 for(
int i = 0; i < 3; i++) {
134 for(
int j = 0; j < 3; j++) {
135 stream << std::setw(14) << tmat(i, j);
138 stream << std::setw(22) << ttau(i) <<
"\n";
141 stream.precision(tprec);
142 stream.flags(tflags);
160 json[
"SymOpRep_type"] =
"SymOp";
166 json[
"symmetry_mat"] =
matrix();
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 operator*(const SymOp &RHS) const
get a new SymOp that is equivalent to subsequent application of both SymOps
void from_json(ClexDescription &desc, const jsonParser &json)
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
void set_index(const MasterSymGroup &new_group, Index new_index)
bool operator==(const SymOp &RHS) const
Check equality of SymOps, (matrix and translation). Does not necessarily return true for translationa...
MasterSymGroup const * m_master_group
Pointer to the MasterSymGroup where prototype of this SymOp lives.
Index index() const
Index of this operation within the master_group.
SymOp & operator-=(const Eigen::Ref< const vector_type > &RHS)
SymGroupRepID m_rep_ID
ID of this representation within the master_group. Default is uninitialized.
Index m_op_index
Index into MasterSymGroup that specifies the operation.
bool is_identity() const
returns true if matrix part of operation is identity
void set_map_error(const double &value)
jsonParser & to_json(jsonParser &json) const override
const matrix_type & matrix() const
Const access of entire cartesian symmetry matrix.
Eigen::Vector3d vector_type
void from_json(const jsonParser &json) override
const double & map_error() const
Allows access to the map_error.
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
EigenIndex Index
For long integer indexing:
const MasterSymGroup & master_group() const
const access of head group
Index ind_inverse() const
Get the operation index of the inverse of this operation, using the master_group's multiplication tab...
SymOp inverse() const
get the inverse of this SymOp
CASM::jsonParser & to_json_array(const Eigen::MatrixBase< Derived > &value, CASM::jsonParser &json)
Write Eigen Matrix with 1 row or 1 column to JSON array.
Eigen::Matrix3d matrix_type
jsonParser & put_obj()
Puts new empty JSON object.
bool contains(const std::string &name) const
Return true if JSON object contains 'name'.
void print(std::ostream &stream, const Eigen::Ref< const matrix_type > &c2fmat=matrix_type::Identity()) const
SymOp no_trans() const
Get copy of the SymOp without translation.
SymOp & apply_sym(const SymOp &op)
const vector_type & tau() const
Const access of the cartesian translation vector, 'tau'.
Index ind_prod(const SymOpRepresentation &RHS) const
SymOp & operator+=(const Eigen::Ref< const vector_type > &RHS)
Cartesian translation of the origin of the symmetry operation by Coordinate RHS.
bool almost_equal(const GenericCluster< CoordType > &LHS, const GenericCluster< CoordType > &RHS, double tol)
bool valid_index(Index i)