CASM  1.1.0
A Clusters Approach to Statistical Mechanics
ConfigEnumAllOccupations.hh
Go to the documentation of this file.
1 #ifndef CASM_ConfigEnumAllOccupations
2 #define CASM_ConfigEnumAllOccupations
3 
8 
9 namespace CASM {
10 
11 class ConfigEnumAllOccupations;
12 class ConfigEnumInput;
13 
23 template <>
25  ConfigEnumAllOccupations const &enumerator);
26 
30 class ConfigEnumAllOccupations : public InputEnumeratorBase<Configuration> {
31  // -- Required members -------------------
32 
33  public:
47  ConfigEnumAllOccupations(ConfigEnumInput const &config_enum_input);
48 
49  std::string name() const override;
50 
53  bool canonical_guarantee() const;
54 
55  static const std::string enumerator_name;
56 
57  private:
59  void increment() override;
60 
61  // -- Unique -------------------
62 
70  bool _current_is_valid_for_output() const;
71 
73  std::set<Index> m_site_index_selection;
74 
77 
80 
83 };
84 
86 } // namespace CASM
87 
88 #endif
void increment() override
Implements increment.
bool _current_is_valid_for_output() const
Returns true if current() is primitive and canonical.
static const std::string enumerator_name
bool m_enumerate_on_a_subset_of_supercell_sites
True if enumerating on a subset of supercell sites.
std::set< Index > m_site_index_selection
Site index to enumerate on.
notstd::cloneable_ptr< Configuration > m_current
The current configuration.
ConfigEnumAllOccupations(ConfigEnumInput const &config_enum_input)
Construct with a Supercell, using all permutations.
Counter< std::vector< int > > m_counter
Counter over allowed occupation indices on sites in m_site_index_selection.
std::string name() const override
Derived enumerators must implement name, via ENUM_MEMBERS.
A Counter allows looping over many incrementing variables in one loop.
Definition: Counter.hh:109
Base class for implementing specialized input enumerators.
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
bool is_guaranteed_for_database_insert(ConfigEnumAllOccupations const &enumerator)
Main CASM namespace.
Definition: APICommand.hh:8