CASM  1.1.0
A Clusters Approach to Statistical Mechanics
LatticeEnumEquivalents.cc
Go to the documentation of this file.
2 
6 
7 namespace CASM {
8 using sym::copy_apply; // TODO: Template base classes still expecting
9  // CASM::copy_apply
10 
11 namespace {
12 
13 struct MakeInvariantSubgroup {
14  MakeInvariantSubgroup() {}
15 
16  template <typename SymOpIterator, typename SymOpOutputIterator>
17  SymOpOutputIterator operator()(const Lattice &lat, SymOpIterator begin,
18  SymOpIterator end,
19  SymOpOutputIterator result) {
20  return sym::invariant_subgroup(std::vector<CASM::SymOp>(begin, end), lat,
21  result);
22  }
23 };
24 } // namespace
25 
27  "LatticeEnumEquivalents";
28 
38  const SymGroup &super_g)
39  : EnumEquivalents<Lattice, std::vector<CASM::SymOp>::const_iterator,
41  xtal::canonical::equivalent(lat, super_g), super_g.begin(),
42  super_g.end(), MakeInvariantSubgroup()) {
43  if (!super_g.begin()->has_valid_master()) {
44  throw std::runtime_error(
45  "Error constructing LatticeEnumEquivalents: SymGroup has no "
46  "MasterSymGroup");
47  }
48 }
49 
50 } // namespace CASM
Enumerate over all equivalents.
LatticeEnumEquivalents(const xtal::Lattice &lat, const SymGroup &super_g)
Constructor.
static const std::string enumerator_name
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
Definition: SymGroup.hh:42
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
Definition: SymOp.hh:28
xtal::Coordinate copy_apply(const xtal::SymOp &op, xtal::Coordinate coord)
Copy and apply SymOp to a Coordinate.
Definition: Coordinate.cc:354
SymGroup invariant_subgroup(const SymGroup &super_group, const xtal::Lattice &lat)
Returns the subgroup of the given group that keeps the lattice invariant.
Definition: SymTools.cc:34
Lattice equivalent(Lattice const &in_lat, SymOpVector const &point_grp, double compare_tol)
Main CASM namespace.
Definition: APICommand.hh:8
Definition: stream_io.hh:24