CASM  1.1.0
A Clusters Approach to Statistical Mechanics
ConfigEnumByPermutation.cc
Go to the documentation of this file.
2 
3 #include <algorithm>
4 
5 #include "casm/casm_io/Log.hh"
9 #include "casm/clex/Supercell.hh"
10 
11 namespace CASM {
12 
13 namespace {
14 
15 struct MakeConfigInvariantSubgroup {
16  MakeConfigInvariantSubgroup() {}
17 
18  template <typename PermuteOutputIterator>
19  PermuteOutputIterator operator()(const Configuration &config,
20  PermuteIterator begin, PermuteIterator end,
21  PermuteOutputIterator result) {
22  ConfigIsEquivalent f(config, config.crystallography_tol());
23  return std::copy_if(begin, end, result, f);
24  }
25 };
26 } // namespace
27 
29  "ConfigEnumByPermutation";
30 
33  config.supercell().sym_info().permute_begin(),
34  config.supercell().sym_info().permute_end()) {}
35 
37  PermuteIterator begin,
38  PermuteIterator end)
40  config.canonical_form(), begin, end, MakeConfigInvariantSubgroup()) {}
41 
42 } // namespace CASM
Enumerate all equivalent Configurations obtained by permuations in a Supercell.
ConfigEnumByPermutation(const Configuration &config)
static const std::string enumerator_name
Enumerate over all equivalents.
ConfigIO::GenericConfigFormatter< jsonParser > config()
Definition: ConfigIO.cc:777
Main CASM namespace.
Definition: APICommand.hh:8