CASM
AClustersApproachtoStatisticalMechanics
|
#include <SiteCluster.hh>
Definition at line 20 of file SiteCluster.hh.
Public Types | |
typedef Site | WhichCoordType |
typedef Array< Site > | X1 |
typedef Array< X1 > | X2 |
typedef Array< X2 > | X3 |
typedef Array< X3 > | X4 |
typedef Array< X4 > | X5 |
typedef Array< X5 > | X6 |
typedef Array< X6 > | X7 |
typedef Array< X7 > | X8 |
typedef Array< X8 > | X9 |
typedef Site | value_type |
typedef Index | size_type |
typedef Site * | iterator |
typedef const Site * | const_iterator |
Public Member Functions | |
SiteCluster (const Lattice &init_home) | |
SiteCluster & | permute (const Array< Index > &iperm) |
SiteCluster & | permute (const Permutation &perm) |
SiteCluster & | apply_sym (const SymOp &op) |
SiteCluster & | apply_sym_no_trans (const SymOp &op) |
void | push_back (const Site &new_site) |
void | set_nlist_inds (const Array< Index > &new_indices) |
ReturnArray< Index > | nlist_inds () const |
Easily collect the current nlist_inds of the cluster's sites. More... | |
const Array< Array< Index > > & | trans_nlists () const |
Access and assign trans_nlists. More... | |
const Array< Index > & | trans_nlist (Index i) const |
void | add_trans_nlist (const Array< Index > &new_nlist) |
void | generate_clust_basis (multivector< BasisSet const * >::X< 2 > const &local_args, std::vector< BasisSet const * > const &global_args, Index max_poly_order=-1) |
void | decorate (const Array< int > decor) |
ReturnArray< Array< int > > | get_decor_map () const |
ReturnArray< Array< int > > | get_full_decor_map () const |
ReturnArray< SiteCluster > | get_decorations (const Array< Array< int > > &dmap) const |
ReturnArray< int > | get_occ_array (const Array< int > &bitstring) const |
Extracts bits in bitstring corresponding to the cluster and returns them as an array. More... | |
void | print_clust_basis (std::ostream &stream, Index begin_ind=0, int space=18, char delim=0, COORD_TYPE mode=COORD_DEFAULT) const |
jsonParser & | to_json (jsonParser &json) const |
void | from_json (const jsonParser &json) |
const Lattice & | home () const |
const SymGroup & | clust_group () const |
const SymGroupRep::RemoteHandle & | permute_rep () const |
void | set_clust_group (const Array< SymOp > &new_group) |
void | set_permute_rep (SymGroupRepID perm_rep_ID) |
void | set_lattice (const Lattice &new_home, COORD_TYPE mode) |
void | within (Index pivot_ind=0) |
Translate entire cluster so that point at(pivot_ind) is inside unit cell. More... | |
void | within (Index pivot_ind, Coordinate &trans) |
Translate entire cluster so that point at(pivot_ind) is inside unit cell. More... | |
void | all_within () |
Map every point of cluster inside unit cell. More... | |
void | update_data_members (const BasicStructure< Site > &ref_struc) |
*bool | image_check (const Lattice &cell, int nV=0) const |
Checks to see if cluster is "compact" relative to (Lattice cell) in other words, period images of the cluster points are farther away than the points themselves. Returns true if cluster is not "compact". More... | |
void | generate_clust_group (const SymGroup &super_group, std::vector< Permutation > *perm_array_ptr=nullptr, double tol=TOL) |
Finds the sub_group of super_group that is the point group of the cluster. More... | |
std::vector< Permutation > | clust_group_permutations (double tol) const |
Finds the Permutation corresponding to each element of clust_group. More... | |
void | calc_properties () |
gets max_length and min_length More... | |
void | calc_properties (GenericCluster< Site > phenom_clust) |
calculate min/max lengths relative the phenom_clust & this cluster More... | |
double | max_length () const |
double | min_length () const |
Coordinate | geometric_center () const |
Returns the geometric center of "mass" of a cluster (treats all sites as having equal mass) More... | |
void | prepare_prototype () |
Performs preparatory steps on prototype before doing Orbit::get_equivalent() More... | |
bool | contains (const GenericCluster &test_cluster) const |
is test_cluster a subcluster of (*this) More... | |
bool | contains (const Site &test_elem) const |
bool | contains_periodic (const Site &test_coord, double tol) const |
Like Array<CoordType>::contains(), but takes periodicity mode into account. More... | |
Index | find (const Site &test_elem, double tol) const |
is test_cluster a subcluster of (*this), and how do the indices map points of test_cluster More... | |
bool | find (const GenericCluster &test_cluster, Array< Index > &index, double tol) const |
is test_cluster a subcluster of (*this), and how do the indices map 'index' is populated with the indices of (*this) that correspond to the points of test_cluster More... | |
Index | find (const Site &test_elem) const |
bool | map_onto_subcluster (const GenericCluster &pivot, double tol=TOL) |
bool | map_onto_subcluster (const GenericCluster &pivot, int num_maps, double tol=TOL) |
void | collect_basis_info (const Array< Site > &basis) |
Figure out which basis atoms in basis correspond to the points in cluster (*this) More... | |
void | collect_basis_info (const Array< Site > &basis, const Coordinate &shift) |
void | read (std::istream &stream, int num_sites, COORD_TYPE mode, bool SD_is_on) |
void | read (std::istream &stream, COORD_TYPE mode) |
Reads the cluster. More... | |
void | print (std::ostream &stream, char delim= '\n', COORD_TYPE mode=COORD_DEFAULT) const |
void | print_shifted (std::ostream &stream, const Coordinate &shift, char delim= '\n', COORD_TYPE mode=COORD_DEFAULT) const |
void | print_sites (std::ostream &stream, int space, char delim= '\n', COORD_TYPE mode=COORD_DEFAULT) const |
void | print_basis_info (std::ostream &stream, int space, char delim= '\n', COORD_TYPE mode=COORD_DEFAULT) const |
void | print_decorated_sites (std::ostream &stream, int space, char delim= '\n', COORD_TYPE mode=COORD_DEFAULT) const |
void | merge (const GenericCluster &RHS) |
adds unique points of 'RHS' to (*this) More... | |
void | merge (const Site &RHS) |
Adds new point to cluster, but only if it is unique. More... | |
GenericCluster & | operator+= (const Coordinate &RHS) |
in=place translation of a cluster More... | |
GenericCluster & | operator-= (const Coordinate &RHS) |
GenericCluster | operator+ (const GenericCluster &RHS) |
create translated cluster More... | |
bool | operator== (const GenericCluster &RHS) const |
are two clusters identical, to within a permutation More... | |
bool | operator== (const Array< Site > &RHS) const |
bool | is_equivalent (const GenericCluster &test_clust) const |
are two clusters identical, to within permutation and translation More... | |
bool | is_equivalent (const GenericCluster &test_clust, Coordinate &trans) const |
are two clusters identical, to within permutation and translation translation that maps clusters is stored in 'trans' More... | |
bool | map_onto (const GenericCluster &test_clust, double tol) |
if is_equivalent(test_clust) is true, return true and map (*this) onto test_clust More... | |
bool | map_onto (const GenericCluster &test_clust, Coordinate &trans, double tol) |
Index | size () const |
void | swap (Array< Site > &RHS) |
Site & | at (Index ind) |
const Site & | at (Index ind) const |
const Site & | operator[] (Index ind) const |
Site & | operator[] (Index ind) |
Site & | back () |
const Site & | back () const |
Siteconst * | begin () const |
Site * | begin () |
Siteconst * | cbegin () const |
Siteconst * | end () const |
Site * | end () |
Siteconst * | cend () const |
void | pop_back () |
void | remove (Index ind) |
void | clear () |
void | resize (Index new_N) |
void | resize (Index new_N, const Site &fill_val) |
void | reserve (Index new_max) |
void | sort (const CompareType &comp) |
void | sort (Array< Index > &ind_order) |
void | sort () |
Array & | append (const Array &new_tail) |
Array & | append_unique (const Array &new_tail) |
void | swap_elem (Index i, Index j) |
Array & | ipermute (const Array< Index > &perm_array) |
bool | next_permute () |
ReturnArray< Index > | as_perm_inverse () const |
ReturnArray< Index > | as_perm_transform_by (const Array< Index > &trans_perm) const |
const Site & | max () const |
const Site & | min () const |
ReturnArray< Site > | sub_array (Index ind_begin, Index ind_end) const |
Site | 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< Site > &RHS) const |
bool | operator< (const Array< Site > &RHS) const |
bool | operator> (const Array< Site > &RHS) const |
bool | operator<= (const Array< Site > &RHS) const |
bool | operator>= (const Array< Site > &RHS) const |
bool | all_in (const Array &superset) const |
Index | coincidence (const Array &superset) const |
Index | incidences (const Site &test_elem) const |
Index | reverse_find (const Site &test_elem) const |
Same as find, but starts from the last element of the Array. More... | |
Index | almost_find (const Site &test_elem, double tol_val=TOL) const |
Index | almost_reverse_find (const Site &test_elem, double tol_val=TOL) const |
Same as almost_find, but start from the last element of the Array. More... | |
bool | almost_contains (const Site &test_elem, double tol_val=TOL) const |
void | print_column (std::ostream &stream, const std::string &indent="") const |
Static Public Member Functions | |
static ReturnArray< Site > | sequence (const Site &initial, const Site &final) |
Returns an array with the sequence (initial, ++initial, ..., final), inclusive. More... | |
static ReturnArray< Site > | sequence (const Site &initial, const Site &increment, const Site &final) |
Public Attributes | |
BasisSet | clust_basis |
Protected Member Functions | |
SymGroup & | _clust_group () |
SymGroupRep::RemoteHandle & | _permute_rep () |
Private Attributes | |
Array< Array< Index > > | m_trans_nlist_inds |
|
inherited |
|
inherited |
|
inherited |
Definition at line 37 of file Cluster.hh.
CASM::SiteCluster::SiteCluster | ( | const Lattice & | init_home | ) |
Definition at line 6 of file SiteCluster.cc.
|
inlineprotectedinherited |
Definition at line 193 of file Cluster.hh.
|
inlineprotectedinherited |
Definition at line 197 of file Cluster.hh.
Definition at line 55 of file SiteCluster.cc.
|
inherited |
|
inherited |
Map every point of cluster inside unit cell.
|
inlineinherited |
|
inherited |
|
inherited |
Same as almost_find, but start from the last element of the Array.
|
inherited |
|
inherited |
SiteCluster & CASM::SiteCluster::apply_sym | ( | const SymOp & | op | ) |
Definition at line 318 of file SiteCluster.cc.
SiteCluster & CASM::SiteCluster::apply_sym_no_trans | ( | const SymOp & | op | ) |
Definition at line 289 of file SiteCluster.cc.
|
inherited |
Construct permutation that undoes the permutation performed by 'this' Inverse operation is calculated the same, regardless of permutation convention
|
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
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
gets max_length and min_length
|
inherited |
calculate min/max lengths relative the phenom_clust & this cluster
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 46 of file Cluster.hh.
|
inherited |
Finds the Permutation corresponding to each element of clust_group.
|
inherited |
|
inherited |
Figure out which basis atoms in basis correspond to the points in cluster (*this)
|
inherited |
Figure out which basis atoms in basis correspond to the points in cluster (*this) when cluster is translated by 'shift'
|
inherited |
is test_cluster a subcluster of (*this)
|
inlineinherited |
|
inherited |
Like Array<CoordType>::contains(), but takes periodicity mode into account.
|
inline |
Definition at line 75 of file SiteCluster.hh.
|
inlineinherited |
|
inlineinherited |
|
inherited |
is test_cluster a subcluster of (*this), and how do the indices map points of test_cluster
|
inherited |
is test_cluster a subcluster of (*this), and how do the indices map 'index' is populated with the indices of (*this) that correspond to the points of test_cluster
|
inherited |
void CASM::SiteCluster::from_json | ( | const jsonParser & | json | ) |
re-throw exceptions
Definition at line 381 of file SiteCluster.cc.
void CASM::SiteCluster::generate_clust_basis | ( | multivector< BasisSet const * >::X< 2 > const & | local_args, |
std::vector< BasisSet const * > const & | global_args, | ||
Index | max_poly_order = -1 |
||
) |
Definition at line 95 of file SiteCluster.cc.
|
inherited |
Finds the sub_group of super_group that is the point group of the cluster.
|
inherited |
Returns the geometric center of "mass" of a cluster (treats all sites as having equal mass)
ReturnArray< Array< int > > CASM::SiteCluster::get_decor_map | ( | ) | const |
Definition at line 154 of file SiteCluster.cc.
ReturnArray< SiteCluster > CASM::SiteCluster::get_decorations | ( | const Array< Array< int > > & | dmap | ) | const |
Definition at line 256 of file SiteCluster.cc.
ReturnArray< Array< int > > CASM::SiteCluster::get_full_decor_map | ( | ) | const |
Definition at line 205 of file SiteCluster.cc.
ReturnArray< int > CASM::SiteCluster::get_occ_array | ( | const Array< int > & | bitstring | ) | const |
Extracts bits in bitstring corresponding to the cluster and returns them as an array.
Definition at line 304 of file SiteCluster.cc.
|
inherited |
Checks whether any values are equal to their index – only valid for Array<Index>
|
inlineinherited |
Definition at line 42 of file Cluster.hh.
|
inherited |
Checks to see if cluster is "compact" relative to (Lattice cell) in other words, period images of the cluster points are farther away than the points themselves. Returns true if cluster is not "compact".
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
are two clusters identical, to within permutation and translation
|
inherited |
are two clusters identical, to within permutation and translation translation that maps clusters is stored in 'trans'
|
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
|
inherited |
if is_equivalent(test_clust) is true, return true and map (*this) onto test_clust
|
inherited |
if is_equivalent(test_clust) is true, return true and map (*this) onto test_clust translation that maps clusters is stored in 'trans'
|
inherited |
if pivot is a sub_cluster, return true and translate (*this) by a lattice translation so that the points of 'pivot' are coincident with subcluster points in (*this)
|
inherited |
|
inherited |
|
inlineinherited |
Definition at line 108 of file Cluster.hh.
|
inherited |
adds unique points of 'RHS' to (*this)
Merge adds the unique points of RHS onto the current cluster.
|
inherited |
Adds new point to cluster, but only if it is unique.
|
inherited |
|
inlineinherited |
Definition at line 112 of file Cluster.hh.
|
inherited |
ReturnArray< Index > CASM::SiteCluster::nlist_inds | ( | ) | const |
Easily collect the current nlist_inds of the cluster's sites.
Definition at line 18 of file SiteCluster.cc.
|
inlineinherited |
|
inherited |
create translated cluster
|
inherited |
in=place translation of a cluster
|
inherited |
|
inherited |
|
inlineinherited |
|
inherited |
are two clusters identical, to within a permutation
|
inherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
SiteCluster & CASM::SiteCluster::permute | ( | const Array< Index > & | iperm | ) |
Definition at line 276 of file SiteCluster.cc.
SiteCluster & CASM::SiteCluster::permute | ( | const Permutation & | perm | ) |
Definition at line 284 of file SiteCluster.cc.
|
inlineinherited |
Definition at line 50 of file Cluster.hh.
|
inlineinherited |
|
inlineinherited |
Performs preparatory steps on prototype before doing Orbit::get_equivalent()
Definition at line 120 of file Cluster.hh.
|
inherited |
|
inherited |
void CASM::SiteCluster::print_clust_basis | ( | std::ostream & | stream, |
Index | begin_ind = 0 , |
||
int | space = 18 , |
||
char | delim = 0 , |
||
COORD_TYPE | mode = COORD_DEFAULT |
||
) | const |
Print cluster with basis_index and nlist_index (from 0 to size()-1), followed by cluster basis functions Functions are labeled {i}, starting from i =
begin_ind |
Definition at line 325 of file SiteCluster.cc.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
void CASM::SiteCluster::push_back | ( | const Site & | new_site | ) |
Definition at line 11 of file SiteCluster.cc.
|
inherited |
|
inherited |
Reads the cluster.
Reads the cluster in the specified mode
stream | Input file stream |
mode | Cartesian or fractional mode |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Same as find, but starts from the last element of the Array.
|
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
|
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
|
inlineinherited |
Definition at line 54 of file Cluster.hh.
|
inherited |
Use this method (and only this method) to set the nlist ind of each site it automatically reassigns DoF IDs for the associated basis functions.
Definition at line 27 of file SiteCluster.cc.
|
inlineinherited |
Definition at line 58 of file Cluster.hh.
|
inlineinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
jsonParser & CASM::SiteCluster::to_json | ( | jsonParser & | json | ) | const |
Definition at line 357 of file SiteCluster.cc.
Definition at line 49 of file SiteCluster.cc.
Access and assign trans_nlists.
Definition at line 43 of file SiteCluster.cc.
|
inherited |
|
inherited |
Translate entire cluster so that point at(pivot_ind) is inside unit cell.
|
inherited |
Translate entire cluster so that point at(pivot_ind) is inside unit cell.
Coordinate | trans contains translation used to map within |
BasisSet CASM::SiteCluster::clust_basis |
Definition at line 22 of file SiteCluster.hh.
Definition at line 64 of file SiteCluster.hh.