1 #ifndef CASM_enum_enumerate_supercells_impl
2 #define CASM_enum_enumerate_supercells_impl
29 template <
typename EnumeratorType>
31 EnumeratorType &enumerator,
34 std::pair<DB::Database<Supercell>::iterator,
bool> insert_result;
40 for (
Supercell const &supercell : enumerator) {
42 if (!supercell.has_primclex()) {
55 if (insert_result.second) {
56 log <<
dry_run_msg <<
" Generated: " << insert_result.first->name()
59 log <<
dry_run_msg <<
" Generated: " << insert_result.first->name()
60 <<
" (already existed)\n";
66 log <<
"Committing database..." << std::flush;
68 log <<
" DONE" << std::endl;
void end_section()
End a section.
void set_verbosity(int _verbosity)
void begin(const std::string &what)
static const int standard
Represents a supercell of the primitive parent crystal structure.
ConfigInsertResult make_canonical_and_insert(Configuration const &configuration, Database< Supercell > &supercell_db, Database< Configuration > &configuration_db, bool primitive_only)
Insert this configuration (in primitive & canonical form) in the database.
void enumerate_supercells(EnumerateSupercellsOptions const &options, EnumeratorType &enumerator, DB::Database< Supercell > &supercell_db)
std::string dry_run_msg(bool dry_run)
Options for the enumerate_supercells function.
std::function< bool(Supercell const &)> filter
If filter(supercell)==true, keep supercell, else skip.
PrimClex const * primclex_ptr
Use while transitioning Supercell to no longer need a PrimClex const *
std::string method_name
Method name, for printing progress.
bool dry_run
If dry_run==true, do not save results, just print to screen.
int verbosity
Printing verbosity level.