15 template <
typename CoordType >
18 template <
typename ClustType >
21 template <
typename CoordType >
27 template <
typename CoordType >
60 std::cerr <<
"CRITICAL ERROR: In GenericCluster<>::set_permute_rep(), Cluster::clust_group() has not yet been initialized!\n"
61 <<
" Groups must always be initialized before their representations. Exiting...\n";
70 void push_back(
const CoordType &new_coord);
130 Index find(
const CoordType &test_elem,
double tol)
const;
149 void read(std::istream &stream,
int num_sites,
COORD_TYPE mode,
bool SD_is_on);
162 void merge(
const CoordType &RHS);
209 template <
typename CoordType>
213 template <
typename CoordType>
217 template <
typename CoordType>
220 template <
typename CoordType>
226 template<
typename CoordType>
239 json[
"coordtype"] = coord_array_ref;
244 json[
"min_length"] = m_min_length;
245 json[
"max_length"] = m_max_length;
257 template<
typename CoordType>
268 for(
int i = 0; i < json[
"coordtype"].
size(); i++) {
269 CoordType coord(home());
271 (*this).push_back(coord);
void set_permute_rep(SymGroupRepID perm_rep_ID)
void print_basis_info(std::ostream &stream, int space, char delim= '\n', COORD_TYPE mode=COORD_DEFAULT) const
size_type size() const
Returns array size if *this is a JSON array, object size if *this is a JSON object, 1 otherwise.
void from_json(ClexDescription &desc, const jsonParser &json)
Type-safe ID object for communicating and accessing Symmetry representation info. ...
double min_length() const
jsonParser & to_json(jsonParser &json) const
Write GenericCluster to json. Does not write lattice.
void push_back(const CoordType &new_coord)
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
const SymGroupRep::RemoteHandle & permute_rep() const
BasicStructure specifies the lattice and atomic basis of a crystal.
*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...
bool contains_periodic(const CoordType &test_coord, double tol) const
Like Array::contains(), but takes periodicity mode into account.
void set_clust_group(const Array< SymOp > &new_group)
void collect_basis_info(const Array< CoordType > &basis)
Figure out which basis atoms in basis correspond to the points in cluster (*this) ...
const SymGroup & clust_group() const
void print_sites(std::ostream &stream, int space, char delim= '\n', COORD_TYPE mode=COORD_DEFAULT) const
void from_json(const jsonParser &json)
GenericCluster< CoordType > operator+(const GenericCluster< CoordType > &LHS, const Coordinate &RHS)
create translated cluster
GenericCluster & operator-=(const Coordinate &RHS)
GenericCluster< CoordType > operator-(const GenericCluster< CoordType > &LHS, const Coordinate &RHS)
create translated cluster
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
GenericCluster(const Lattice &init_home)
void set_lattice(const Lattice &new_home, COORD_TYPE mode)
GenericCluster & permute(const Array< Index > &perm)
permute sites of the cluster, and everything that depends on the site order
void print_shifted(std::ostream &stream, const Coordinate &shift, char delim= '\n', COORD_TYPE mode=COORD_DEFAULT) const
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
BasisSet operator*(const SymOp &LHS, const BasisSet &RHS)
void calc_properties()
gets max_length and min_length
Represents cartesian and fractional coordinates.
GenericCluster & apply_sym_no_trans(const SymOp &op)
apply symmetry to all points of the cluster without translation
EigenIndex Index
For long integer indexing:
GenericCluster operator+(const GenericCluster &RHS)
create translated cluster
std::vector< Permutation > clust_group_permutations(double tol) const
Finds the Permutation corresponding to each element of clust_group.
Coordinate geometric_center() const
Returns the geometric center of "mass" of a cluster (treats all sites as having equal mass) ...
GenericCluster & operator+=(const Coordinate &RHS)
in=place translation of a cluster
CoordType & at(Index ind)
SymGroup & _clust_group()
void update_data_members(const BasicStructure< CoordType > &ref_struc)
void all_within()
Map every point of cluster inside unit cell.
bool is_equivalent(const GenericCluster &test_clust) const
are two clusters identical, to within permutation and translation
const Lattice & home() const
jsonParser & put_obj()
Puts new empty JSON object.
void set_rep(const SymGroup &head_group, SymGroupRepID symrep_ID)
SymGroupRep::RemoteHandle & _permute_rep()
GenericCluster & apply_sym(const SymOp &op)
apply symmetry to all points of the cluster
Lattice const * m_lat_ptr
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.
void read(std::istream &stream, int num_sites, COORD_TYPE mode, bool SD_is_on)
bool map_onto_subcluster(const GenericCluster &pivot, double tol=TOL)
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)
void within(Index pivot_ind=0)
Translate entire cluster so that point at(pivot_ind) is inside unit cell.
Basic std::vector like container (deprecated)
Index find(const CoordType &test_elem, double tol) const
is test_cluster a subcluster of (*this), and how do the indices map points of test_cluster ...
SymGroupRep::RemoteHandle m_permute_rep
bool operator==(const GenericCluster &RHS) const
are two clusters identical, to within a permutation
bool almost_equal(const GenericCluster< CoordType > &LHS, const GenericCluster< CoordType > &RHS, double tol)
void prepare_prototype()
Performs preparatory steps on prototype before doing Orbit::get_equivalent()
bool map_onto(const GenericCluster &test_clust, double tol)
if is_equivalent(test_clust) is true, return true and map (*this) onto test_clust ...
void print(std::ostream &stream, char delim= '\n', COORD_TYPE mode=COORD_DEFAULT) const
double max_length() const
bool contains(const GenericCluster &test_cluster) const
is test_cluster a subcluster of (*this)