CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::ScelPeriodicSymCompare< Element > Class Template Reference

#include <ClusterSymCompare.hh>

+ Inheritance diagram for CASM::ScelPeriodicSymCompare< Element >:

Detailed Description

template<typename Element>
class CASM::ScelPeriodicSymCompare< Element >

Comparisons of clusters using supercell periodic symmetry, but without periodic images.

Before doing a comparison, ScelPeriodicSymCompare translates the cluster so that the first site is within the supercell.

ScelPeriodicSymCompare uses the direct distance between sites for orbit invariants without accounting for periodic images.

Beyond ClusterSymCompare requirements, requires:

Definition at line 279 of file ClusterSymCompare.hh.

Public Types

typedef Structure PrimType
 
typedef std::shared_ptr< PrimType const > PrimType_ptr
 
typedef Eigen::Matrix3l transf_mat_type
 
typedef Base::MostDerived MostDerived
 
typedef Element ClusterType
 
using Element = typename traits< MostDerived >::Element
 
using InvariantsType = typename traits< MostDerived >::InvariantsType
 type InvariantsType is used to screen elements for equivalence and sort orbits More...
 

Public Member Functions

 ScelPeriodicSymCompare (PrimType_ptr prim_ptr, transf_mat_type transf_mat, double tol)
 Constructor. More...
 
const PrimTypeprim () const
 
transf_mat_type const & transf_mat () const
 Prim to supercell transformation matrix. More...
 
double tol () const
 Return tolerance. More...
 
ClusterType copy_apply (PermuteIterator const &permute_it, ClusterType obj) const
 Get SymOp from PermuteIterator and apply to cluster. More...
 
Element copy_apply (SymOp const &op, Element obj) const
 Applies SymOp to Element. More...
 
Element spatial_prepare (Element obj) const
 Prepare an element for comparison via an isometric affine transformation. More...
 
Element representation_prepare (Element obj) const
 Prepare an element for comparison via transformation of its internal representation. More...
 
Element prepare (Element obj) const
 Prepare an element for comparison via representation_prepare(), followed by spatial_prepare() More...
 
bool compare (const Element &A, const Element &B) const
 Orders 'prepared' elements. More...
 
bool equal (const Element &A, const Element &B) const
 Check equivalence of 'prepared' elements. More...
 
InvariantsType make_invariants (const Element &element) const
 Make orbit invariants from one element in the orbit. More...
 
bool invariants_compare (const InvariantsType &A, const InvariantsType &B) const
 Defines an order for orbits that have different invariants. More...
 
bool invariants_equal (const InvariantsType &A, const InvariantsType &B) const
 Check equivalence of invariants. More...
 
bool inter_orbit_compare (const Element &A, const InvariantsType &A_invariants, const Element &B, const InvariantsType &B_invariants) const
 Orders orbit prototypes, breaking invariants_compare ties. More...
 
bool inter_orbit_equal (const Element &A, const InvariantsType &A_invariants, const Element &B, const InvariantsType &B_invariants) const
 Check equivalence of prototypes in different orbit. More...
 
std::unique_ptr< SymOpRepresentationcanonical_transform (Element const &obj) const
 Access transform that took cluster from unprepared to prepared state. More...
 
SymOp const & spatial_transform () const
 Access spatial transform that was used during most recent spatial preparation of an element. More...
 

Protected Member Functions

InvariantsType make_invariants_impl (const ClusterType &obj) const
 Make orbit invariants from one element in the orbit. More...
 
bool invariants_compare_impl (const InvariantsType &A, const InvariantsType &B) const
 Orders 'prepared' elements in the same orbit. More...
 
bool compare_impl (const ClusterType &A, const ClusterType &B) const
 Compares 'prepared' clusters. More...
 
ClusterType copy_apply_impl (SymOp const &op, ClusterType obj) const
 Applies SymOp to cluster. More...
 
std::unique_ptr< SymOpRepresentationcanonical_transform_impl (ClusterType const &obj) const
 Returns transformation that takes 'obj' to its prepared (canonical) form. More...
 
bool inter_orbit_compare_impl (const Element &A, const InvariantsType &A_invariants, const Element &B, const InvariantsType &B_invariants) const
 Orders orbit prototypes, breaking invariants_compare ties. More...
 

Private Types

typedef ClusterSymCompare< SymCompare< CRTPBase< ScelPeriodicSymCompare< Element > > > > Base
 

Private Member Functions

Element spatial_prepare_impl (Element obj) const
 Prepare an element for comparison via an isometric affine transformation. More...
 
SymOp const & spatial_transform_impl () const
 Access spatial transform that was used during most recent spatial preparation of an element. More...
 
Element representation_prepare_impl (Element obj) const
 Prepare an element for comparison via transformation of its internal representation. More...
 

Private Attributes

friend traits< ScelPeriodicSymCompare< Element > >
 
friend Base
 
friend SymCompare< CRTPBase< ScelPeriodicSymCompare< Element > > >
 
PrimType_ptr m_prim
 
transf_mat_type m_transf_mat
 Prim to supercell transformation matrix. More...
 
xtal::IntegralCoordinateWithin_f m_bring_within_f
 Bring UnitCellCoord within the supercell. More...
 
double m_tol
 
SymOp m_spatial_transform
 Spatial transform that reproduces most recent application of SymCompare::spatial_prepare() More...
 

Member Typedef Documentation

◆ Base

Definition at line 307 of file ClusterSymCompare.hh.

◆ ClusterType

Element (of orbit) refers to Cluster, not element of Cluster

Definition at line 81 of file ClusterSymCompare.hh.

◆ Element

template<typename Base >
using CASM::SymCompare< Base >::Element = typename traits<MostDerived>::Element
inherited

Definition at line 57 of file SymCompare.hh.

◆ InvariantsType

template<typename Base >
using CASM::SymCompare< Base >::InvariantsType = typename traits<MostDerived>::InvariantsType
inherited

type InvariantsType is used to screen elements for equivalence and sort orbits

Definition at line 82 of file SymCompare.hh.

◆ MostDerived

◆ PrimType

template<typename Element >
typedef Structure CASM::ScelPeriodicSymCompare< Element >::PrimType

Definition at line 283 of file ClusterSymCompare.hh.

◆ PrimType_ptr

template<typename Element >
typedef std::shared_ptr<PrimType const> CASM::ScelPeriodicSymCompare< Element >::PrimType_ptr

Definition at line 284 of file ClusterSymCompare.hh.

◆ transf_mat_type

template<typename Element >
typedef Eigen::Matrix3l CASM::ScelPeriodicSymCompare< Element >::transf_mat_type

Definition at line 285 of file ClusterSymCompare.hh.

Constructor & Destructor Documentation

◆ ScelPeriodicSymCompare()

template<typename Element >
CASM::ScelPeriodicSymCompare< Element >::ScelPeriodicSymCompare ( PrimType_ptr  prim_ptr,
transf_mat_type  transf_mat,
double  tol 
)

Constructor.

Parameters
prim_ptrPrim structure
transf_matPrim to supercell transformation matrix
tolTolerance for invariants_compare of site-to-site distances
tolTolerance for invariants_compare of site-to-site distances

Definition at line 165 of file ClusterSymCompare_impl.hh.

Member Function Documentation

◆ canonical_transform()

template<typename Base >
std::unique_ptr< SymOpRepresentation > CASM::SymCompare< Base >::canonical_transform ( Element const &  obj) const
inherited

Access transform that took cluster from unprepared to prepared state.

Definition at line 244 of file SymCompare.hh.

◆ canonical_transform_impl()

std::unique_ptr< SymOpRepresentation > CASM::ClusterSymCompare< SymCompare< CRTPBase< ScelPeriodicSymCompare< Element > > > >::canonical_transform_impl ( ClusterType const &  obj) const
protectedinherited

Returns transformation that takes 'obj' to its prepared (canonical) form.

  • For now returns pointer to SymPermutation object that encodes permutation due to sorting elements

Definition at line 108 of file ClusterSymCompare_impl.hh.

◆ compare()

template<typename Base >
bool CASM::SymCompare< Base >::compare ( const Element A,
const Element B 
) const
inherited

Orders 'prepared' elements.

  • Returns 'true' to indicate A < B
  • Assumes elements are 'prepared' before being compared

Definition at line 173 of file SymCompare.hh.

◆ compare_impl()

bool CASM::ClusterSymCompare< SymCompare< CRTPBase< ScelPeriodicSymCompare< Element > > > >::compare_impl ( const ClusterType A,
const ClusterType B 
) const
protectedinherited

Compares 'prepared' clusters.

  • Returns 'true' to indicate A < B
  • Equivalence is indicated by
    !compare(A,B) && !compare(B,A)
    bool compare(const Element &A, const Element &B) const
    Orders 'prepared' elements.
    Definition: SymCompare.hh:173
  • Assumes elements are 'prepared' before being compared

Definition at line 100 of file ClusterSymCompare_impl.hh.

◆ copy_apply() [1/2]

Get SymOp from PermuteIterator and apply to cluster.

Definition at line 88 of file ClusterSymCompare_impl.hh.

◆ copy_apply() [2/2]

template<typename Base >
SymCompare< Base >::Element CASM::SymCompare< Base >::copy_apply ( SymOp const &  op,
Element  obj 
) const
inherited

Applies SymOp to Element.

Applies SymOp to Element. Default performs standalone copy_apply.

Definition at line 123 of file SymCompare.hh.

◆ copy_apply_impl()

Applies SymOp to cluster.

Definition at line 103 of file ClusterSymCompare_impl.hh.

◆ equal()

template<typename Base >
bool CASM::SymCompare< Base >::equal ( const Element A,
const Element B 
) const
inherited

Check equivalence of 'prepared' elements.

Returns
!compare(A,B) && !compare(B,A)
  • Assumes elements are 'prepared' before being compared

Definition at line 183 of file SymCompare.hh.

◆ inter_orbit_compare()

template<typename Base >
bool CASM::SymCompare< Base >::inter_orbit_compare ( const Element A,
const InvariantsType A_invariants,
const Element B,
const InvariantsType B_invariants 
) const
inherited

Orders orbit prototypes, breaking invariants_compare ties.

Definition at line 222 of file SymCompare.hh.

◆ inter_orbit_compare_impl()

template<typename Base >
bool CASM::SymCompare< Base >::inter_orbit_compare_impl ( const Element A,
const InvariantsType A_invariants,
const Element B,
const InvariantsType B_invariants 
) const
protectedinherited

Orders orbit prototypes, breaking invariants_compare ties.

  • Returns 'true' to indicate A < B
  • Equivalence is indicated by
    !compare(A,B) && !compare(B,A)

Implementation:

  • First, check invariants_compare
  • Break ties with, compare(A, B)

Definition at line 265 of file SymCompare.hh.

◆ inter_orbit_equal()

template<typename Base >
bool CASM::SymCompare< Base >::inter_orbit_equal ( const Element A,
const InvariantsType A_invariants,
const Element B,
const InvariantsType B_invariants 
) const
inherited

Check equivalence of prototypes in different orbit.

Returns
  • Assumes elements are in canonical form

Definition at line 235 of file SymCompare.hh.

◆ invariants_compare()

template<typename Base >
bool CASM::SymCompare< Base >::invariants_compare ( const InvariantsType A,
const InvariantsType B 
) const
inherited

Defines an order for orbits that have different invariants.

Defines an order for elements that have different invariants.

Definition at line 201 of file SymCompare.hh.

◆ invariants_compare_impl()

bool CASM::ClusterSymCompare< SymCompare< CRTPBase< ScelPeriodicSymCompare< Element > > > >::invariants_compare_impl ( const InvariantsType A,
const InvariantsType B 
) const
protectedinherited

Orders 'prepared' elements in the same orbit.

  • Returns 'true' to indicate A < B
  • Equivalence is indicated by
    !compare(A,B) && !compare(B,A)
  • Assumes elements are 'prepared' before being compared Implementation:
  • First compares by number of sites in cluster
  • Then compare all displacements, from longest to shortest

Definition at line 96 of file ClusterSymCompare_impl.hh.

◆ invariants_equal()

template<typename Base >
bool CASM::SymCompare< Base >::invariants_equal ( const InvariantsType A,
const InvariantsType B 
) const
inherited

Check equivalence of invariants.

Returns

Definition at line 210 of file SymCompare.hh.

◆ make_invariants()

template<typename Base >
SymCompare< Base >::InvariantsType CASM::SymCompare< Base >::make_invariants ( const Element element) const
inherited

Make orbit invariants from one element in the orbit.

Get orbit invariants from one element in the orbit.

Definition at line 189 of file SymCompare.hh.

◆ make_invariants_impl()

Make orbit invariants from one element in the orbit.

Definition at line 93 of file ClusterSymCompare_impl.hh.

◆ prepare()

template<typename Base >
SymCompare< Base >::Element CASM::SymCompare< Base >::prepare ( Element  obj) const
inherited

Prepare an element for comparison via representation_prepare(), followed by spatial_prepare()

Definition at line 163 of file SymCompare.hh.

◆ prim()

template<typename Element >
const PrimType& CASM::ScelPeriodicSymCompare< Element >::prim ( ) const
inline

Definition at line 296 of file ClusterSymCompare.hh.

◆ representation_prepare()

template<typename Base >
SymCompare< Base >::Element CASM::SymCompare< Base >::representation_prepare ( Element  obj) const
inherited

Prepare an element for comparison via transformation of its internal representation.

  • For instance, sort sites of a cluster so comparison may be performed more efficiently

Definition at line 154 of file SymCompare.hh.

◆ representation_prepare_impl()

template<typename Element >
Element CASM::ScelPeriodicSymCompare< Element >::representation_prepare_impl ( Element  obj) const
private

Prepare an element for comparison via transformation of its internal representation.

Prepare an element for comparison.

  • Returns sorted
  • Sorts UnitCellCoord

Definition at line 201 of file ClusterSymCompare_impl.hh.

◆ spatial_prepare()

template<typename Base >
SymCompare< Base >::Element CASM::SymCompare< Base >::spatial_prepare ( Element  obj) const
inherited

Prepare an element for comparison via an isometric affine transformation.

  • For instance, translate a cluster so comparison may be performed more efficiently.
  • The transformation that is applied is stored and available as spatial_transform
  • The spatial_transform is also included in the symmetry operations stored in the Orbit equivalence_map (i.e. equivalence_map_element = spatial_transform * generating_group_op)
  • Returns pair such that pair.first = apply_sym(pair.second, obj)

Definition at line 142 of file SymCompare.hh.

◆ spatial_prepare_impl()

template<typename Element >
Element CASM::ScelPeriodicSymCompare< Element >::spatial_prepare_impl ( Element  obj) const
private

Prepare an element for comparison via an isometric affine transformation.

Prepare an element for comparison.

  • Applies superlattice translation such that first site of cluster is within supercell
  • translates so that obj[0] is within the supercell

Definition at line 176 of file ClusterSymCompare_impl.hh.

◆ spatial_transform()

template<typename Base >
SymOp const & CASM::SymCompare< Base >::spatial_transform
inherited

Access spatial transform that was used during most recent spatial preparation of an element.

Definition at line 252 of file SymCompare.hh.

◆ spatial_transform_impl()

template<typename Element >
SymOp const & CASM::ScelPeriodicSymCompare< Element >::spatial_transform_impl
private

Access spatial transform that was used during most recent spatial preparation of an element.

Definition at line 193 of file ClusterSymCompare_impl.hh.

◆ tol()

template<typename Element >
double CASM::ScelPeriodicSymCompare< Element >::tol ( ) const
inline

Return tolerance.

Definition at line 302 of file ClusterSymCompare.hh.

◆ transf_mat()

template<typename Element >
transf_mat_type const& CASM::ScelPeriodicSymCompare< Element >::transf_mat ( ) const
inline

Prim to supercell transformation matrix.

Definition at line 299 of file ClusterSymCompare.hh.

Member Data Documentation

◆ Base

template<typename Element >
friend CASM::ScelPeriodicSymCompare< Element >::Base
private

Definition at line 309 of file ClusterSymCompare.hh.

◆ m_bring_within_f

template<typename Element >
xtal::IntegralCoordinateWithin_f CASM::ScelPeriodicSymCompare< Element >::m_bring_within_f
private

Bring UnitCellCoord within the supercell.

Definition at line 337 of file ClusterSymCompare.hh.

◆ m_prim

template<typename Element >
PrimType_ptr CASM::ScelPeriodicSymCompare< Element >::m_prim
private

Pointer to the primitive structure, necessary to apply symmetry to the Element

Definition at line 331 of file ClusterSymCompare.hh.

◆ m_spatial_transform

template<typename Element >
SymOp CASM::ScelPeriodicSymCompare< Element >::m_spatial_transform
mutableprivate

Spatial transform that reproduces most recent application of SymCompare::spatial_prepare()

  • Default SymOp constructor initializes to identity

Definition at line 344 of file ClusterSymCompare.hh.

◆ m_tol

template<typename Element >
double CASM::ScelPeriodicSymCompare< Element >::m_tol
private

Definition at line 339 of file ClusterSymCompare.hh.

◆ m_transf_mat

template<typename Element >
transf_mat_type CASM::ScelPeriodicSymCompare< Element >::m_transf_mat
private

Prim to supercell transformation matrix.

Definition at line 334 of file ClusterSymCompare.hh.

◆ SymCompare< CRTPBase< ScelPeriodicSymCompare< Element > > >

template<typename Element >
friend CASM::ScelPeriodicSymCompare< Element >::SymCompare< CRTPBase< ScelPeriodicSymCompare< Element > > >
private

Definition at line 310 of file ClusterSymCompare.hh.

◆ traits< ScelPeriodicSymCompare< Element > >

template<typename Element >
friend CASM::ScelPeriodicSymCompare< Element >::traits< ScelPeriodicSymCompare< Element > >
private

Definition at line 308 of file ClusterSymCompare.hh.


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