1 #ifndef CASM_ClusterSymCompare_impl
2 #define CASM_ClusterSymCompare_impl
12 template <
typename Base>
20 template <
typename Base>
34 template <
typename Base>
36 const InvariantsType &A,
const InvariantsType &B)
const {
45 template <
typename Base>
52 template <
typename Base>
64 template <
typename Base>
65 std::unique_ptr<SymOpRepresentation>
67 return std::unique_ptr<SymOpRepresentation>(
77 template <
typename Element>
80 : m_prim(prim_ptr), m_tol(tol) {}
85 template <
typename Element>
93 template <
typename Element>
95 return m_spatial_transform;
101 template <
typename Element>
114 template <
typename Element>
117 : m_prim(prim_ptr), m_tol(tol) {}
122 template <
typename Element>
130 this->m_spatial_transform =
132 pos.unitcell().template cast<double>());
133 return obj - pos.unitcell();
138 template <
typename Element>
140 return m_spatial_transform;
146 template <
typename Element>
164 template <
typename Element>
175 template <
typename Element>
183 this->m_spatial_transform =
185 (m_bring_within_f(pos).unitcell() - pos.unitcell())
186 .template cast<double>());
187 return obj + (m_bring_within_f(pos).unitcell() - pos.unitcell());
192 template <
typename Element>
194 return m_spatial_transform;
200 template <
typename Element>
std::shared_ptr< PrimType const > PrimType_ptr
Template class to be specialized for comparisons with aperiodic symmetry.
CRTP Base class for common cluster symmetry and comparison implementations.
ClusterType copy_apply(PermuteIterator const &permute_it, ClusterType obj) const
Get SymOp from PermuteIterator and apply to cluster.
std::unique_ptr< SymOpRepresentation > canonical_transform_impl(ClusterType const &obj) const
Returns transformation that takes 'obj' to its prepared (canonical) form.
bool invariants_compare_impl(const InvariantsType &A, const InvariantsType &B) const
Orders 'prepared' elements in the same orbit.
bool compare_impl(const ClusterType &A, const ClusterType &B) const
Compares 'prepared' clusters.
ClusterType copy_apply_impl(SymOp const &op, ClusterType obj) const
Applies SymOp to cluster.
InvariantsType make_invariants_impl(const ClusterType &obj) const
Make orbit invariants from one element in the orbit.
std::shared_ptr< PrimType const > PrimType_ptr
Template class to be specialized for comparisons with periodic symmetry of the primitive lattice.
std::shared_ptr< PrimType const > PrimType_ptr
Eigen::Matrix3l transf_mat_type
Template class to be specialized for comparisons with periodic symmetry of the supercell lattice.
typename traits< MostDerived >::Element Element
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
static SymOp translation(const Eigen::Ref< const vector_type > &_tau)
static method to create operation that describes pure translation
SymPermutation describes how a symmetry operation permutes a list of 'things' For example,...
Eigen::Matrix3l transf_mat(const Lattice &prim_lat, const Lattice &super_lat)
GenericVectorXdScelFormatter lattice()
bool compare(ClusterInvariants const &A, ClusterInvariants const &B, double tol)
Compare ClusterInvariants.
MappingNode copy_apply(PermuteIterator const &_it, MappingNode const &_node, bool transform_cost_mat=true)
Reorders the permutation and compounds the spatial isometry (rotation.
Derived::PlainObject representation_prepare_impl(Eigen::MatrixBase< Derived > const &obj, double _tol)
Prepare an element for comparison.