23 "ConfigEnumAllOccupations: \n\n"
25 " supercells: ScelEnum JSON settings (default='{\"existing_only\"=true}')\n"
26 " Indicate supercells to enumerate all occupational configurations in. May \n"
27 " be a JSON array of supercell names, or a JSON object specifying \n"
28 " supercells in terms of size and unit cell. By default, all existing \n"
29 " supercells are used. See 'ScelEnum' description for details. \n\n"
31 " filter: string (optional, default=None)\n"
32 " A query command to use to filter which Configurations are kept. \n"
35 " To enumerate all occupations in supercells up to and including size 4:\n"
36 " casm enum --method ConfigEnumAllOccupations -i '{\"supercells\": {\"max\": 4}}' \n"
38 " To enumerate all occupations in all existing supercells:\n"
39 " casm enum --method ConfigEnumAllOccupations\n"
41 " To enumerate all occupations in all particular supercells:\n"
42 " casm enum --method ConfigEnumAllOccupations -i \n"
44 " \"supercells\": { \n"
46 " \"SCEL1_1_1_1_0_0_0\",\n"
47 " \"SCEL2_1_2_1_0_0_0\",\n"
48 " \"SCEL4_1_4_1_0_0_0\"\n"
62 return notstd::make_unique<ConfigEnumAllOccupations>(scel);
80 Array<int>(_scel.num_sites(), 0),
81 _scel.max_allowed_occupation(),
82 Array<int>(_scel.num_sites(), 1)) {
103 bool is_valid_config {
false};
void reset_properties(ConfigDoF &_dof)
ConfigEnumAllOccupations(Supercell &_scel)
Construct with a Supercell, using all permutations.
std::vector< std::string > make_enumerator_filter_expr(const jsonParser &_kwargs, const Completer::EnumOption &enum_opt)
Standardizes parsing casm enum filter expressions.
void increment() override
Implements increment.
Base class for generic use of enumerators that may be accessed through the API.
virtual jsonParser source(step_type step) const
Represents a supercell of the primitive parent crystal structure.
Template class to be specialized for each enumerator that may be accessed via the API...
value_type & _current()
Access the current ObjectType by reference.
Counter< Array< int > > m_counter
static const std::string enumerator_name
void _invalidate()
Call if enumeration complete.
void set_occupation(const Array< int > &newoccupation)
Set occupant variables.
step_type step() const
Increments with each enumerated object.
CASM::EnumInterfaceBase * make_ConfigEnumAllOccupations_interface()
PrimClex is the top-level data structure for a CASM project.
static int run(PrimClex &primclex, const jsonParser &kwargs, const Completer::EnumOption &enum_opt)
bool valid() const
Returns false if enumeration is complete.
bool _check_current() const
Returns true if current() is primitive and canonical.
void _set_step(step_type val)
Set current step value.
void set_source(const jsonParser &source)
reference current() const
Access the current ObjectType by reference.
std::unique_ptr< ScelEnum > make_enumerator_scel_enum(PrimClex &primclex, const jsonParser &_kwargs, const Completer::EnumOption &enum_opt)
Standardizes parsing casm enum input options to make an ScelEnum.
int insert_unique_canon_configs(std::string method, PrimClex &primclex, ScelIterator begin, ScelIterator end, ConfigEnumConstructor f, std::vector< std::string > filter_expr)
Standardizes insertion from enumerators that construct unique primitive canonical configurations...
notstd::cloneable_ptr< Configuration > m_current
void _increment_step()
Increment current step value.
Basic std::vector like container (deprecated)
static const std::string interface_help