CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::GenericOrbit< ClustType > Class Template Reference

#include <ClusterFunctions.hh>

+ Inheritance diagram for CASM::GenericOrbit< ClustType >:

Detailed Description

template<typename ClustType>
class CASM::GenericOrbit< ClustType >

GenericOrbit is the set of all clusters that are equivalent with respect to a SymGroup and have at least one point in the unit cell. If two clusters can be mapped onto each other by translation only one of them will be included in orbit (typically)

Definition at line 10 of file ClusterFunctions.hh.

Public Types

typedef Array< ClustType > X1
 
typedef Array< X1X2
 
typedef Array< X2X3
 
typedef Array< X3X4
 
typedef Array< X4X5
 
typedef Array< X5X6
 
typedef Array< X6X7
 
typedef Array< X7X8
 
typedef Array< X8X9
 
typedef ClustType value_type
 
typedef Index size_type
 
typedef ClustType * iterator
 
typedef const ClustType * const_iterator
 

Public Member Functions

 GenericOrbit (const ClustType &init_prototype)
 
void set_lattice (const Lattice &new_home, COORD_TYPE mode)
 calls set_lattice on prototype, and all equivalent clusters More...
 
void get_equivalent (const SymGroup &sym_group, double tol)
 
GenericOrbitapply_sym (const SymOp &op)
 Apply symmetry to prototype and all the clusters in the orbit. More...
 
bool contains (const ClustType &test_clust, double tol) const
 
bool contains (const typename ClustType::WhichCoordType &test_site, double tol) const
 
Index find (const ClustType &test_clust, double tol) const
 Same as contains, but returns index of equivalent cluster that maps onto test_clust. More...
 
Index find (const ClustType &test_clust, Coordinate &trans, double tol) const
 
void collect_basis_info (const Array< typename ClustType::WhichCoordType > &basis, const Coordinate &shift)
 calls collect_basis_info on all clusters in orbit More...
 
void collect_basis_info (const Array< typename ClustType::WhichCoordType > &basis)
 calls collect_basis_info on all clusters in orbit, with respect to a translation More...
 
SymGroupRep const * get_full_permutation_representation ()
 get permutation representation of every operation in equivalence_map to describe how operations permute site order More...
 
SymGroupRep const * get_full_coord_representation ()
 
double max_length () const
 return max_length of clusters in Orbit More...
 
double min_length () const
 return min_length of clusters in Orbit More...
 
void read (std::istream &stream, int num_sites, COORD_TYPE mode)
 
void read (std::istream &stream, COORD_TYPE mode, const SymGroup &sym_group)
 reads in an Orbit More...
 
ReturnArray< std::string > orbit_function_cpp_strings (const Array< FunctionVisitor * > &labelers)
 returns Array of std::string, each of which is More...
 
ReturnArray< std::string > flower_function_cpp_strings (const Array< FunctionVisitor * > &labelers, Index nlist_index)
 nlist_index is the index into the nlist for the site the flower centers on More...
 
ReturnArray< std::string > delta_occfunc_flower_function_cpp_strings (BasisSet site_basis, const Array< FunctionVisitor * > &labelers, Index nlist_index, Index b_index, Index f_index)
 
Index get_index () const
 
void set_index (Index ind) const
 
jsonParserto_json (jsonParser &json) const
 
void from_json (const jsonParser &json)
 Assumes the prototype lattice is already set. More...
 
Index size () const
 
void swap (Array< ClustType > &RHS)
 
ClustType & at (Index ind)
 
const ClustType & at (Index ind) const
 
const ClustType & operator[] (Index ind) const
 
ClustType & operator[] (Index ind)
 
ClustType & back ()
 
const ClustType & back () const
 
ClustTypeconst * begin () const
 
ClustType * begin ()
 
ClustTypeconst * cbegin () const
 
ClustTypeconst * end () const
 
ClustType * end ()
 
ClustTypeconst * cend () const
 
void push_back (const ClustType &toPush)
 
void pop_back ()
 
void remove (Index ind)
 
void clear ()
 
void resize (Index new_N)
 
void resize (Index new_N, const ClustType &fill_val)
 
void reserve (Index new_max)
 
void sort (const CompareType &comp)
 
void sort (Array< Index > &ind_order)
 
void sort ()
 
Arrayappend (const Array &new_tail)
 
Arrayappend_unique (const Array &new_tail)
 
void swap_elem (Index i, Index j)
 
Arraypermute (const Array< Index > &perm_array)
 
Arrayipermute (const Array< Index > &perm_array)
 
bool next_permute ()
 
ReturnArray< Indexas_perm_inverse () const
 
ReturnArray< Indexas_perm_transform_by (const Array< Index > &trans_perm) const
 
const ClustType & max () const
 
const ClustType & min () const
 
ReturnArray< ClustType > sub_array (Index ind_begin, Index ind_end) const
 
ClustType sum () const
 
bool is_ascending () const
 
bool is_descending () const
 
bool is_constant () const
 
bool is_permute () const
 
bool has_fixed_points () const
 Checks whether any values are equal to their index – only valid for Array<Index> More...
 
bool operator== (const Array< ClustType > &RHS) const
 
bool operator!= (const Array< ClustType > &RHS) const
 
bool operator< (const Array< ClustType > &RHS) const
 
bool operator> (const Array< ClustType > &RHS) const
 
bool operator<= (const Array< ClustType > &RHS) const
 
bool operator>= (const Array< ClustType > &RHS) const
 
bool all_in (const Array &superset) const
 
Index coincidence (const Array &superset) const
 
Index incidences (const ClustType &test_elem) const
 
Index find (const ClustType &test_elem) const
 
Index reverse_find (const ClustType &test_elem) const
 Same as find, but starts from the last element of the Array. More...
 
Index almost_find (const ClustType &test_elem, double tol_val=TOL) const
 
Index almost_reverse_find (const ClustType &test_elem, double tol_val=TOL) const
 Same as almost_find, but start from the last element of the Array. More...
 
bool contains (const ClustType &test_elem) const
 
bool almost_contains (const ClustType &test_elem, double tol_val=TOL) const
 
void print_column (std::ostream &stream, const std::string &indent="") const
 

Static Public Member Functions

static ReturnArray< ClustType > sequence (const ClustType &initial, const ClustType &final)
 Returns an array with the sequence (initial, ++initial, ..., final), inclusive. More...
 
static ReturnArray< ClustType > sequence (const ClustType &initial, const ClustType &increment, const ClustType &final)
 

Public Attributes

ClustType prototype
 
Array< Array< SymOp > > equivalence_map
 

Private Attributes

Index index
 Linear index of this orbit, when many orbits are stored in a complicated structure (e.g., Orbitree) More...
 
Index permute_rep_ID
 
Index coord_rep_ID
 
Array< GenericOrbit * > sub_cluster
 Pointers to all orbits whose clusters are subclusters of clusters in this orbit. More...
 

Member Typedef Documentation

typedef const ClustType * CASM::Array< ClustType >::const_iterator
inherited

Definition at line 76 of file Array.hh.

typedef ClustType * CASM::Array< ClustType >::iterator
inherited

Definition at line 75 of file Array.hh.

typedef Index CASM::Array< ClustType >::size_type
inherited

Definition at line 74 of file Array.hh.

typedef ClustType CASM::Array< ClustType >::value_type
inherited

Definition at line 73 of file Array.hh.

typedef Array<ClustType > CASM::Array< ClustType >::X1
inherited

Definition at line 63 of file Array.hh.

typedef Array<X1> CASM::Array< ClustType >::X2
inherited

Definition at line 64 of file Array.hh.

typedef Array<X2> CASM::Array< ClustType >::X3
inherited

Definition at line 65 of file Array.hh.

typedef Array<X3> CASM::Array< ClustType >::X4
inherited

Definition at line 66 of file Array.hh.

typedef Array<X4> CASM::Array< ClustType >::X5
inherited

Definition at line 67 of file Array.hh.

typedef Array<X5> CASM::Array< ClustType >::X6
inherited

Definition at line 68 of file Array.hh.

typedef Array<X6> CASM::Array< ClustType >::X7
inherited

Definition at line 69 of file Array.hh.

typedef Array<X7> CASM::Array< ClustType >::X8
inherited

Definition at line 70 of file Array.hh.

typedef Array<X8> CASM::Array< ClustType >::X9
inherited

Definition at line 71 of file Array.hh.

Constructor & Destructor Documentation

template<typename ClustType>
CASM::GenericOrbit< ClustType >::GenericOrbit ( const ClustType &  init_prototype)
inline

Definition at line 53 of file Orbit.hh.

Member Function Documentation

bool CASM::Array< ClustType >::all_in ( const Array< ClustType > &  superset) const
inherited
bool CASM::Array< ClustType >::almost_contains ( const ClustType &  test_elem,
double  tol_val = TOL 
) const
inlineinherited

Definition at line 284 of file Array.hh.

Index CASM::Array< ClustType >::almost_find ( const ClustType &  test_elem,
double  tol_val = TOL 
) const
inherited
Index CASM::Array< ClustType >::almost_reverse_find ( const ClustType &  test_elem,
double  tol_val = TOL 
) const
inherited

Same as almost_find, but start from the last element of the Array.

Array& CASM::Array< ClustType >::append ( const Array< ClustType > &  new_tail)
inherited
Array& CASM::Array< ClustType >::append_unique ( const Array< ClustType > &  new_tail)
inherited
template<typename ClustType >
GenericOrbit< ClustType > & CASM::GenericOrbit< ClustType >::apply_sym ( const SymOp op)

Apply symmetry to prototype and all the clusters in the orbit.

Definition at line 106 of file Orbit_impl.hh.

ReturnArray<Index> CASM::Array< ClustType >::as_perm_inverse ( ) const
inherited

Construct permutation that undoes the permutation performed by 'this' Inverse operation is calculated the same, regardless of permutation convention

ReturnArray<Index> CASM::Array< ClustType >::as_perm_transform_by ( const Array< Index > &  trans_perm) const
inherited

Given N distinct objects labeled from 0 to N-1, a permutation 'P_permute' that physically permutes the objects (with labels) in terms of their labels, and a permutation 'L_permute' that permutes their labels only, rewrite 'P_permute' in terms of the relabeling induced by 'L_permute' Rearrange 'this' permutation to form an equivalent permutation for any list that has already been permuted by trans_perm. Does not (nearly certain of this) depend on permutation convention

ClustType & CASM::Array< ClustType >::at ( Index  ind)
inlineinherited

Definition at line 157 of file Array.hh.

const ClustType & CASM::Array< ClustType >::at ( Index  ind) const
inlineinherited

Definition at line 162 of file Array.hh.

ClustType & CASM::Array< ClustType >::back ( )
inlineinherited

Definition at line 177 of file Array.hh.

const ClustType & CASM::Array< ClustType >::back ( ) const
inlineinherited

Definition at line 180 of file Array.hh.

ClustType const* CASM::Array< ClustType >::begin ( ) const
inlineinherited

Definition at line 185 of file Array.hh.

ClustType * CASM::Array< ClustType >::begin ( )
inlineinherited

Definition at line 192 of file Array.hh.

ClustType const* CASM::Array< ClustType >::cbegin ( ) const
inlineinherited

Definition at line 189 of file Array.hh.

ClustType const* CASM::Array< ClustType >::cend ( ) const
inlineinherited

Definition at line 201 of file Array.hh.

void CASM::Array< ClustType >::clear ( )
inlineinherited

Definition at line 216 of file Array.hh.

Index CASM::Array< ClustType >::coincidence ( const Array< ClustType > &  superset) const
inherited
template<typename ClustType >
void CASM::GenericOrbit< ClustType >::collect_basis_info ( const Array< typename ClustType::WhichCoordType > &  basis,
const Coordinate shift 
)

calls collect_basis_info on all clusters in orbit

Definition at line 188 of file Orbit_impl.hh.

template<typename ClustType >
void CASM::GenericOrbit< ClustType >::collect_basis_info ( const Array< typename ClustType::WhichCoordType > &  basis)

calls collect_basis_info on all clusters in orbit, with respect to a translation

Definition at line 197 of file Orbit_impl.hh.

template<typename ClustType >
bool CASM::GenericOrbit< ClustType >::contains ( const ClustType &  test_clust,
double  tol 
) const

go through all cluster in orbit array and see if test_clust is among them, to within a lattice translation only translates if the periodicity flag is on

Definition at line 124 of file Orbit_impl.hh.

template<typename ClustType >
bool CASM::GenericOrbit< ClustType >::contains ( const typename ClustType::WhichCoordType &  test_site,
double  tol 
) const

check if test_site is contained in any of the equivalent clusters, to within a lattice translation only translates if the periodicity flag is on

Definition at line 140 of file Orbit_impl.hh.

bool CASM::Array< ClustType >::contains ( const ClustType &  test_elem) const
inlineinherited

Definition at line 281 of file Array.hh.

template<typename ClustType >
ReturnArray< std::string > CASM::GenericOrbit< ClustType >::delta_occfunc_flower_function_cpp_strings ( BasisSet  site_basis,
const Array< FunctionVisitor * > &  labelers,
Index  nlist_index,
Index  b_index,
Index  f_index 
)

b_index is the basis site index, f_index is the index of the configurational site basis function in Site::occupant_basis nlist_index is the index into the nlist for the site the flower centers on

b_index is the basis site index, f_index is the index of the configurational site basis function in Site::occupant_basis nlist_index is the index of the basis site in the neighbor list

Definition at line 364 of file Orbit_impl.hh.

ClustType const* CASM::Array< ClustType >::end ( ) const
inlineinherited

Definition at line 197 of file Array.hh.

ClustType * CASM::Array< ClustType >::end ( )
inlineinherited

Definition at line 204 of file Array.hh.

template<typename ClustType >
Index CASM::GenericOrbit< ClustType >::find ( const ClustType &  test_clust,
double  tol 
) const

Same as contains, but returns index of equivalent cluster that maps onto test_clust.

Definition at line 156 of file Orbit_impl.hh.

template<typename ClustType >
Index CASM::GenericOrbit< ClustType >::find ( const ClustType &  test_clust,
Coordinate trans,
double  tol 
) const

Same as contains, but returns index of equivalent cluster that maps onto test_clust translation that maps equivalent cluster onto test_clust is stored in 'trans'

Definition at line 172 of file Orbit_impl.hh.

Index CASM::Array< ClustType >::find ( const ClustType &  test_elem) const
inherited
template<typename ClustType >
ReturnArray< std::string > CASM::GenericOrbit< ClustType >::flower_function_cpp_strings ( const Array< FunctionVisitor * > &  labelers,
Index  nlist_index 
)

nlist_index is the index into the nlist for the site the flower centers on

nlist_index is the index of the basis site in the neighbor list

Definition at line 312 of file Orbit_impl.hh.

template<typename ClustType >
void CASM::GenericOrbit< ClustType >::from_json ( const jsonParser json)

Assumes the prototype lattice is already set.

re-throw exceptions

Definition at line 458 of file Orbit_impl.hh.

template<typename ClustType >
void CASM::GenericOrbit< ClustType >::get_equivalent ( const SymGroup sym_group,
double  tol 
)

Take prototype cluster, find all of the equivalent clusters (fills orbit array) only translates if the periodicity flag is on Also, fill equivalence_map example: GenericOrbit<SiteCluster> my_orbit(my_cluster); //specifies prototype my_orbit.get_equivalent(my_point_group); //maps protype onto all its equivalents

Definition at line 34 of file Orbit_impl.hh.

template<typename ClustType>
SymGroupRep const* CASM::GenericOrbit< ClustType >::get_full_coord_representation ( )

get symmetry representation of every operation in equivalence_map to describe how operations map coordinates at site 'i' of prototype onto coordinates of site 'j' of equivalent cluster

template<typename ClustType>
SymGroupRep const* CASM::GenericOrbit< ClustType >::get_full_permutation_representation ( )

get permutation representation of every operation in equivalence_map to describe how operations permute site order

template<typename ClustType>
Index CASM::GenericOrbit< ClustType >::get_index ( ) const
inline

Definition at line 121 of file Orbit.hh.

bool CASM::Array< ClustType >::has_fixed_points ( ) const
inherited

Checks whether any values are equal to their index – only valid for Array<Index>

Index CASM::Array< ClustType >::incidences ( const ClustType &  test_elem) const
inherited
Array& CASM::Array< ClustType >::ipermute ( const Array< Index > &  perm_array)
inherited
bool CASM::Array< ClustType >::is_ascending ( ) const
inherited
bool CASM::Array< ClustType >::is_constant ( ) const
inherited
bool CASM::Array< ClustType >::is_descending ( ) const
inherited
bool CASM::Array< ClustType >::is_permute ( ) const
inherited

Checks that Array contains values from 0 to perm_array.size()-1 and that no value is repeated does not depend on definition of permutation convention

const ClustType & CASM::Array< ClustType >::max ( ) const
inherited
template<typename ClustType>
double CASM::GenericOrbit< ClustType >::max_length ( ) const
inline

return max_length of clusters in Orbit

Definition at line 96 of file Orbit.hh.

const ClustType & CASM::Array< ClustType >::min ( ) const
inherited
template<typename ClustType>
double CASM::GenericOrbit< ClustType >::min_length ( ) const
inline

return min_length of clusters in Orbit

Definition at line 100 of file Orbit.hh.

bool CASM::Array< ClustType >::next_permute ( )
inherited
bool CASM::Array< ClustType >::operator!= ( const Array< ClustType > &  RHS) const
inlineinherited

Definition at line 260 of file Array.hh.

bool CASM::Array< ClustType >::operator< ( const Array< ClustType > &  RHS) const
inherited
bool CASM::Array< ClustType >::operator<= ( const Array< ClustType > &  RHS) const
inlineinherited

Definition at line 265 of file Array.hh.

bool CASM::Array< ClustType >::operator== ( const Array< ClustType > &  RHS) const
inherited
bool CASM::Array< ClustType >::operator> ( const Array< ClustType > &  RHS) const
inherited
bool CASM::Array< ClustType >::operator>= ( const Array< ClustType > &  RHS) const
inlineinherited

Definition at line 268 of file Array.hh.

const ClustType & CASM::Array< ClustType >::operator[] ( Index  ind) const
inlineinherited

Definition at line 167 of file Array.hh.

ClustType & CASM::Array< ClustType >::operator[] ( Index  ind)
inlineinherited

Definition at line 172 of file Array.hh.

template<typename ClustType >
ReturnArray< std::string > CASM::GenericOrbit< ClustType >::orbit_function_cpp_strings ( const Array< FunctionVisitor * > &  labelers)

returns Array of std::string, each of which is

Definition at line 278 of file Orbit_impl.hh.

Array& CASM::Array< ClustType >::permute ( const Array< Index > &  perm_array)
inherited
void CASM::Array< ClustType >::pop_back ( )
inlineinherited

Definition at line 212 of file Array.hh.

void CASM::Array< ClustType >::print_column ( std::ostream &  stream,
const std::string &  indent = "" 
) const
inherited
void CASM::Array< ClustType >::push_back ( const ClustType &  toPush)
inherited
template<typename ClustType>
void CASM::GenericOrbit< ClustType >::read ( std::istream &  stream,
int  num_sites,
COORD_TYPE  mode 
)
template<typename ClustType >
void CASM::GenericOrbit< ClustType >::read ( std::istream &  stream,
COORD_TYPE  mode,
const SymGroup sym_group 
)

reads in an Orbit

Reads the orbit in the specified mode.

Parameters
streamInput file stream
modeCartesian or fractional mode

Definition at line 213 of file Orbit_impl.hh.

void CASM::Array< ClustType >::remove ( Index  ind)
inherited
void CASM::Array< ClustType >::reserve ( Index  new_max)
inherited
void CASM::Array< ClustType >::resize ( Index  new_N)
inherited
void CASM::Array< ClustType >::resize ( Index  new_N,
const ClustType &  fill_val 
)
inherited
Index CASM::Array< ClustType >::reverse_find ( const ClustType &  test_elem) const
inherited

Same as find, but starts from the last element of the Array.

static ReturnArray<ClustType > CASM::Array< ClustType >::sequence ( const ClustType &  initial,
const ClustType &  final 
)
staticinherited

Returns an array with the sequence (initial, ++initial, ..., final), inclusive.

Returns an array with the sequence (initial, ++initial, ..., final), inclusive requires that operator<() and operator++() are defined on type T

static ReturnArray<ClustType > CASM::Array< ClustType >::sequence ( const ClustType &  initial,
const ClustType &  increment,
const ClustType &  final 
)
staticinherited

Returns an array with the sequence (initial, initial+increment, ..., final?), inclusive if final is in the sequence requires that operator<() and operator+=() are defined on type T

Returns an array with the sequence (initial, initial+increment, ..., final?), inclusive if final is in the sequence

template<typename ClustType>
void CASM::GenericOrbit< ClustType >::set_index ( Index  ind) const
inline

Definition at line 126 of file Orbit.hh.

template<typename ClustType >
void CASM::GenericOrbit< ClustType >::set_lattice ( const Lattice new_home,
COORD_TYPE  mode 
)

calls set_lattice on prototype, and all equivalent clusters

Definition at line 12 of file Orbit_impl.hh.

Index CASM::Array< ClustType >::size ( ) const
inlineinherited

Definition at line 145 of file Array.hh.

void CASM::Array< ClustType >::sort ( const CompareType &  comp)
inherited
void CASM::Array< ClustType >::sort ( Array< Index > &  ind_order)
inherited
void CASM::Array< ClustType >::sort ( )
inherited
ReturnArray<ClustType > CASM::Array< ClustType >::sub_array ( Index  ind_begin,
Index  ind_end 
) const
inherited
ClustType CASM::Array< ClustType >::sum ( ) const
inherited
void CASM::Array< ClustType >::swap ( Array< ClustType > &  RHS)
inherited
void CASM::Array< ClustType >::swap_elem ( Index  i,
Index  j 
)
inlineinherited

Definition at line 231 of file Array.hh.

template<typename ClustType >
jsonParser & CASM::GenericOrbit< ClustType >::to_json ( jsonParser json) const

Definition at line 424 of file Orbit_impl.hh.

Member Data Documentation

template<typename ClustType>
Index CASM::GenericOrbit< ClustType >::coord_rep_ID
private

Definition at line 36 of file Orbit.hh.

template<typename ClustType>
Array< Array<SymOp> > CASM::GenericOrbit< ClustType >::equivalence_map

equivalence_map[i][j] is a symmetry operation that maps 'prototype' onto cluster 'i' 'j' indexes ALL the symmetry operations that perform this map

Definition at line 51 of file Orbit.hh.

template<typename ClustType>
Index CASM::GenericOrbit< ClustType >::index
mutableprivate

Linear index of this orbit, when many orbits are stored in a complicated structure (e.g., Orbitree)

Definition at line 35 of file Orbit.hh.

template<typename ClustType>
Index CASM::GenericOrbit< ClustType >::permute_rep_ID
private

Definition at line 36 of file Orbit.hh.

template<typename ClustType>
ClustType CASM::GenericOrbit< ClustType >::prototype

One example of the clusters contained in this orbit All clusters in the Orbit are equivalent to 'prototype' by symmetry

Definition at line 47 of file Orbit.hh.

template<typename ClustType>
Array<GenericOrbit *> CASM::GenericOrbit< ClustType >::sub_cluster
private

Pointers to all orbits whose clusters are subclusters of clusters in this orbit.

Definition at line 38 of file Orbit.hh.


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