1 #ifndef CASM_MonteCarloEnum
2 #define CASM_MonteCarloEnum
27 return m_formatter.evaluate_as_scalar<
double>(config);
44 return m_formatter.evaluate_as_scalar<
bool>(config);
59 template<
typename MonteTypeSettings,
typename MonteCarloType>
176 std::map<std::string, std::pair<bool, double> >
m_data;
bool on_sample() const
Check if enumeration is requested after every sample.
MonteCarloEnum(PrimClex &primclex, const MonteTypeSettings &settings, Log &log, MonteCarloType &mc)
HallOfFame< Configuration, MonteCarloEnumMetric > HallOfFameType
void clear()
Clear hall of fame.
Monte::ENUM_SAMPLE_MODE m_sample_mode
when to attempt to insert configurations in the hall of fame
const HallOfFameType & halloffame() const
const Access the enumeration hall of fame
void reset()
Clear hall of fame and reset excluded.
notstd::cloneable_ptr< HallOfFameType > m_halloffame
Use for enumerating configurations via Monte Carlo.
std::string metric_args() const
bool debug() const
return true if running in debug mode
std::map< std::string, std::pair< bool, double > > m_data
holds 'is_new, score' data
const PrimClex & primclex() const
const Access the PrimClex that *this is based on
MonteCarloEnum::HallOfFameType::InsertResult _insert(const Configuration &config)
Insert in hall of fame if 'check' passes.
bool on_accept() const
Check if enumeration is requested after every acceptance.
Results data structure for HallOfFame::insert.
Log & m_log
Target for messages.
A container for storing best scoring objects.
PrimClex & m_primclex
PrimClex for this system.
bool m_check_existence
If true, only keep configurations that are not enumerated already.
DataFormatter< Configuration > m_formatter
MonteCarloEnumCheck(const DataFormatter< Configuration > &_formatter)
MonteCarloEnumMetric(const DataFormatter< Configuration > &_formatter)
std::string check_args() const
void save_configs()
Save configurations in the hall of fame to the config list.
bool insert_canonical() const
Map for faster? access of PrimClex's supercells.
HallOfFameType::InsertResult insert(const Configuration &config)
Attempt to insert (canonical) Configuration into enumeration hall of fame.
bool operator()(const Configuration &config)
PrimClex is the top-level data structure for a CASM project.
HallOfFameType & _halloffame()
ENUM_SAMPLE_MODE
How often to sample runs.
bool check_existence() const
If true, insert configurations in canonical form.
notstd::cloneable_ptr< MonteCarloEnumCheck > m_enum_check
Use for enumerating configurations via Monte Carlo.
PrimClex & _primclex() const
Access the PrimClex that *this is based on.
std::map< std::string, Supercell * > m_canon_scel
Map for faster? access of PrimClex's supercells.
DataFormatterDictionary< Configuration > m_dict
Used for various purposes.
double operator()(const Configuration &config)
std::string m_metric_args
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
DataFormatter< Configuration > m_formatter
bool m_insert_canonical
If true, insert configurations in canonical form.
A Configuration represents the values of all degrees of freedom in a Supercell.