10 screw_glide_shift(lat),
12 time_reversal(op.time_reversal()) {
24 _axis = vector_type::Zero();
25 _location = vector_type::Zero();
26 _set(_axis, _screw_glide_shift, _location, lat);
34 _axis = vector_type::Zero();
36 _set(_axis, _screw_glide_shift, _location, lat);
41 int det =
round(matrix.determinant());
45 Eigen::EigenSolver<matrix_type> t_eig(det * matrix);
48 for (
Index i = 0; i < 3; i++) {
49 if (
almost_equal(t_eig.eigenvalues()(i), std::complex<double>(1, 0))) {
50 _axis = t_eig.eigenvectors().col(i).real();
56 for (
Index i = 0; i < 3; i++) {
71 (180. / M_PI) * atan2(_axis.dot(ortho.cross(rot)), ortho.dot(rot)) + 360.,
85 _screw_glide_shift = coord.
cart();
89 _location = tau.dot(_axis) * _axis / 2.;
95 _screw_glide_shift = tau.dot(_axis) * _axis;
106 _screw_glide_shift = coord.
cart();
110 tmat << ortho, ortho.cross(_axis);
119 tmat.transpose() * tau;
124 _set(_axis, _screw_glide_shift, _location, lat);
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
const matrix_type & matrix() const
Const access of entire cartesian symmetry matrix.
const vector_type & tau() const
Const access of the cartesian translation vector, 'tau'.
Represents cartesian and fractional coordinates.
Coordinate_impl::CartCoordinate cart()
Set Cartesian coordinate vector and update fractional coordinate vector.
bool is_lattice_shift(double tol=TOL) const
Eigen::CwiseUnaryOp< decltype(Local::round_l< typename Derived::Scalar >), const Derived > round(const Eigen::MatrixBase< Derived > &val)
Round Eigen::MatrixXd.
Eigen::Matrix< typename Derived::Scalar, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > inverse(const Eigen::MatrixBase< Derived > &M)
Return the integer inverse matrix of an invertible integer matrix.
IdentitySymRepBuilder Identity()
bool almost_equal(ClusterInvariants const &A, ClusterInvariants const &B, double tol)
Check if ClusterInvariants are equal.
bool almost_zero(const T &val, double tol=TOL)
If T is not integral, use std::abs(val) < tol;.
int float_sgn(T val, double compare_tol=TOL)
INDEX_TYPE Index
For long integer indexing:
xtal::Coordinate screw_glide_shift
xtal::Coordinate location
A Cartesian coordinate that is invariant to the operation (if one exists)
SymOp::vector_type vector_type
SymInfo(const SymOp &op, const xtal::Lattice &lat)
void _set(const vector_type &_axis, const vector_type &_screw_glide_shift, const vector_type &_location, const xtal::Lattice &lat)