CASM  1.1.0
A Clusters Approach to Statistical Mechanics
IntegralCluster.cc
Go to the documentation of this file.
2 
5 
6 namespace CASM {
7 
8 IntegralCluster::IntegralCluster(PrimType const &prim) : m_prim_ptr(&prim) {}
9 
11  return *m_prim_ptr;
12 }
13 
15 std::vector<xtal::UnitCellCoord> &IntegralCluster::elements() {
16  return m_element;
17 }
18 
20 const std::vector<xtal::UnitCellCoord> &IntegralCluster::elements() const {
21  return m_element;
22 }
23 
26  return this->element(i).coordinate(prim());
27 }
28 
31  for (auto it = this->begin(); it != this->end(); ++it) {
32  *it += trans;
33  }
34  return *this;
35 }
36 } // namespace CASM
37 
39 namespace CASM {
40 
41 namespace sym {
48 template <>
50  Structure const &prim) {
51  for (auto &e : clust) {
52  sym::apply(op, e, prim);
53  }
54  return clust;
55 }
56 } // namespace sym
57 } // namespace CASM
value_type & element(size_type index)
Access an element in the cluster by index.
iterator end()
Iterator to the past-the-last element in the cluster.
iterator begin()
Iterator to first element in the cluster.
IntegralCluster & operator+=(xtal::UnitCell trans)
Translate the cluster by a UnitCell translation.
std::vector< xtal::UnitCellCoord > m_element
const PrimType * m_prim_ptr
std::vector< Element > & elements()
Access vector of elements.
const PrimType & prim() const
IntegralCluster(PrimType const &prim)
xtal::Coordinate coordinate(size_type i) const
Return the coordinate corresponding to element(i)
Structure specifies the lattice and atomic basis of a crystal.
Definition: Structure.hh:30
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
Definition: SymOp.hh:28
Represents cartesian and fractional coordinates.
Definition: Coordinate.hh:34
Unit Cell Indices.
xtal::Coordinate & apply(const xtal::SymOp &op, xtal::Coordinate &coord)
apply SymOp to a Coordinate
Definition: Coordinate.cc:347
Main CASM namespace.
Definition: APICommand.hh:8