1 #ifndef SYMBASISPERMUTE_HH
2 #define SYMBASISPERMUTE_HH
18 class SymBasisPermute:
public SymOpRepresentation {
44 template<
typename StrucType>
50 m_ucc_permute[value.
sublat()].unitcell();
67 return m_ucc_permute.size();
72 return m_ucc_permute[b];
77 return m_ucc_permute.at(b);
86 const std::vector<UnitCellCoord> &
data()
const {
103 template<
typename BasisPermutable>
104 UnitCellCoord &
apply(
const SymOp &op, UnitCellCoord &value,
const BasisPermutable &obj);
108 return op.apply(value);
115 template<
typename StrucType>
119 throw std::runtime_error(
120 std::string(
"Error in 'SymBasisPermute(const SymOp& op, const StrucType& struc, double tol)'\n") +
121 " Could not get integer point transformation matrix.");
127 for(
int b = 0; b < struc.basis.size(); b++) {
141 template<
typename BasisPermutable>
UnitCellCoord at(Index b) const
Return UnitCellCoord that (b,0,0,0) transforms to.
Object copy_apply(const Transform &f, Object obj, Args &&...args)
Eigen::Matrix3d cart2frac(const Eigen::Ref< const Eigen::Matrix3d > &cart_mat, const Lattice &lat)
Returns 'frac_mat' which is transformation of 'cart_mat' if cart_vec_after = cart_mat*cart_vec then f...
SymBasisPermute describes how a symmetry operation permutes atoms in a basis.
SymBasisPermute const * get_basis_permute_rep(SymGroupRepID _rep_ID) const
get pointer to BasisPermute representation corresponding to _rep_ID
Eigen::Matrix3l m_point_mat
Transform fractional coordinates, integer version of SymOp::matrix()
void from_json(const jsonParser &json) override
UnitCellCoord & apply(UnitCellCoord &value) const
Apply to a UnitCellCoord, in place.
size_type size() const
Return number of basis sites.
const matrix_type & matrix() const
Const access of entire cartesian symmetry matrix.
SymOpRepresentation * copy() const override
Return pointer to a copy of this SymBasisPermute.
SymBasisPermute const * get_ucc_permutation() const override
Get this from a SymOp.
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
const std::vector< UnitCellCoord > & data() const
Get underlying data (data()[b] is the result of transforming (b,0,0,0))
jsonParser & to_json(jsonParser &json) const override
EigenIndex Index
For long integer indexing:
Eigen::CwiseUnaryOp< decltype(std::ptr_fun(boost::math::lround< typename Derived::Scalar >)), const Derived > lround(const Eigen::MatrixBase< Derived > &val)
Round Eigen::MatrixXd to Eigen::MatrixXl.
SymOpRepresentation is the base class for anything describes a symmetry operation.
bool is_integer(const Eigen::MatrixBase< Derived > &M, double tol)
Check if Eigen::Matrix is integer.
SymBasisPermute(const SymOp &op, const StrucType &struc, double tol)
Construct SymBasisPermute.
UnitCellCoord copy_apply(UnitCellCoord value) const
Copy UnitCellCoord and apply.
Eigen::Matrix3d matrix_type
UnitCellCoord operator[](Index b) const
Return UnitCellCoord that (b,0,0,0) transforms to.
Matrix< long int, 3, 3 > Matrix3l
const Eigen::Matrix3l & matrix() const
Get underlying integer transformation amtrix.
std::vector< UnitCellCoord > m_ucc_permute
Object & apply(const Transform &f, Object &obj, Args &&...args)