CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::Monte::MonteCarloEnum Class Reference

#include <MonteCarloEnum.hh>

Detailed Description

Definition at line 43 of file MonteCarloEnum.hh.

Public Types

typedef HallOfFame< Configuration, MonteCarloEnumMetricHallOfFameType
 

Public Member Functions

template<typename MonteTypeSettings , typename MonteCarloType >
 MonteCarloEnum (const PrimClex &primclex, const MonteTypeSettings &settings, Log &log, MonteCarloType &mc)
 
const PrimClexprimclex () const
 const Access the PrimClex that *this is based on More...
 
bool on_accept () const
 Check if enumeration is requested after every acceptance. More...
 
bool on_sample () const
 Check if enumeration is requested after every sample. More...
 
HallOfFameType::InsertResult insert (const Configuration &config)
 Attempt to insert (canonical) Configuration into enumeration hall of fame. More...
 
void clear ()
 Clear hall of fame. More...
 
const HallOfFameTypehalloffame () const
 const Access the enumeration hall of fame More...
 
void save_configs ()
 Save configurations in the hall of fame to the config list. More...
 
std::string check_args () const
 
std::string metric_args () const
 
void print_info () const
 
bool debug () const
 return true if running in debug mode More...
 
bool check_existence () const
 If true, insert configurations in canonical form. More...
 
bool insert_canonical () const
 Map for faster? access of PrimClex's supercells. More...
 
void reset ()
 Clear hall of fame and reset excluded. More...
 

Private Member Functions

MonteCarloEnum::HallOfFameType::InsertResult _insert (const Configuration &config)
 Insert in hall of fame if 'check' passes. More...
 
HallOfFameType_halloffame ()
 
Log_log () const
 

Private Attributes

const PrimClexm_primclex
 PrimClex for this system. More...
 
Logm_log
 Target for messages. More...
 
ENUM_SAMPLE_MODE m_sample_mode
 when to attempt to insert configurations in the hall of fame More...
 
bool m_debug
 
std::string m_check_args
 
std::string m_metric_args
 
notstd::cloneable_ptr< HallOfFameTypem_halloffame
 Use for enumerating configurations via Monte Carlo. More...
 
notstd::cloneable_ptr< MonteCarloEnumCheckm_enum_check
 Use for enumerating configurations via Monte Carlo. More...
 
bool m_check_existence
 If true, only keep configurations that are not enumerated already. More...
 
bool m_insert_canonical
 If true, insert configurations in canonical form. More...
 
std::map< std::string, Supercell * > m_canon_scel
 Map for faster? access of PrimClex's supercells. More...
 
DataFormatterDictionary< Configurationm_dict
 Used for various purposes. More...
 
std::map< std::string, std::pair< bool, double > > m_data
 holds 'is_new, score' data More...
 

Member Typedef Documentation

◆ HallOfFameType

Constructor & Destructor Documentation

◆ MonteCarloEnum()

template<typename MonteTypeSettings , typename MonteCarloType >
template CASM::Monte::MonteCarloEnum::MonteCarloEnum ( const PrimClex primclex,
const MonteTypeSettings &  settings,
Log log,
MonteCarloType &  mc 
)

Definition at line 14 of file MonteCarloEnum_impl.hh.

Member Function Documentation

◆ _halloffame()

MonteCarloEnum::HallOfFameType & CASM::Monte::MonteCarloEnum::_halloffame ( )
private

Definition at line 171 of file MonteCarloEnum.cc.

◆ _insert()

MonteCarloEnum::HallOfFameType::InsertResult CASM::Monte::MonteCarloEnum::_insert ( const Configuration config)
private

Insert in hall of fame if 'check' passes.

Definition at line 10 of file MonteCarloEnum.cc.

◆ _log()

Log& CASM::Monte::MonteCarloEnum::_log ( ) const
inlineprivate

Definition at line 108 of file MonteCarloEnum.hh.

◆ check_args()

std::string CASM::Monte::MonteCarloEnum::check_args ( ) const
inline

Definition at line 81 of file MonteCarloEnum.hh.

◆ check_existence()

bool CASM::Monte::MonteCarloEnum::check_existence ( ) const
inline

If true, insert configurations in canonical form.

If m_check_existence == true, this must be true

Definition at line 93 of file MonteCarloEnum.hh.

◆ clear()

void CASM::Monte::MonteCarloEnum::clear ( )
inline

Clear hall of fame.

Definition at line 69 of file MonteCarloEnum.hh.

◆ debug()

bool CASM::Monte::MonteCarloEnum::debug ( ) const
inline

return true if running in debug mode

Definition at line 88 of file MonteCarloEnum.hh.

◆ halloffame()

const MonteCarloEnum::HallOfFameType & CASM::Monte::MonteCarloEnum::halloffame ( ) const

const Access the enumeration hall of fame

Definition at line 73 of file MonteCarloEnum.cc.

◆ insert()

MonteCarloEnum::HallOfFameType::InsertResult CASM::Monte::MonteCarloEnum::insert ( const Configuration config)

Attempt to insert (canonical) Configuration into enumeration hall of fame.

Attempt to insert Configuration into enumeration hall of fame.

Returns
Pair of iterator pointing to inserted Configuration (or end), and bool indicating if insert was successful

Configurations are only inserted into hall of fame if:

  • 'enum_check' returns true
  • the Configuration is not already in the config list

Definition at line 28 of file MonteCarloEnum.cc.

◆ insert_canonical()

bool CASM::Monte::MonteCarloEnum::insert_canonical ( ) const
inline

Map for faster? access of PrimClex's supercells.

Definition at line 96 of file MonteCarloEnum.hh.

◆ metric_args()

std::string CASM::Monte::MonteCarloEnum::metric_args ( ) const
inline

Definition at line 83 of file MonteCarloEnum.hh.

◆ on_accept()

bool CASM::Monte::MonteCarloEnum::on_accept ( ) const
inline

Check if enumeration is requested after every acceptance.

Definition at line 55 of file MonteCarloEnum.hh.

◆ on_sample()

bool CASM::Monte::MonteCarloEnum::on_sample ( ) const
inline

Check if enumeration is requested after every sample.

Definition at line 60 of file MonteCarloEnum.hh.

◆ primclex()

const PrimClex& CASM::Monte::MonteCarloEnum::primclex ( ) const
inline

const Access the PrimClex that *this is based on

Definition at line 52 of file MonteCarloEnum.hh.

◆ print_info()

void CASM::Monte::MonteCarloEnum::print_info ( ) const

Definition at line 143 of file MonteCarloEnum.cc.

◆ reset()

void CASM::Monte::MonteCarloEnum::reset ( )

Clear hall of fame and reset excluded.

Definition at line 161 of file MonteCarloEnum.cc.

◆ save_configs()

void CASM::Monte::MonteCarloEnum::save_configs ( )

Save configurations in the hall of fame to the config list.

Definition at line 83 of file MonteCarloEnum.cc.

Member Data Documentation

◆ m_canon_scel

std::map<std::string, Supercell *> CASM::Monte::MonteCarloEnum::m_canon_scel
mutableprivate

Map for faster? access of PrimClex's supercells.

Definition at line 140 of file MonteCarloEnum.hh.

◆ m_check_args

std::string CASM::Monte::MonteCarloEnum::m_check_args
private

Definition at line 122 of file MonteCarloEnum.hh.

◆ m_check_existence

bool CASM::Monte::MonteCarloEnum::m_check_existence
private

If true, only keep configurations that are not enumerated already.

Definition at line 132 of file MonteCarloEnum.hh.

◆ m_data

std::map<std::string, std::pair<bool, double> > CASM::Monte::MonteCarloEnum::m_data
private

holds 'is_new, score' data

Definition at line 146 of file MonteCarloEnum.hh.

◆ m_debug

bool CASM::Monte::MonteCarloEnum::m_debug
private

Definition at line 120 of file MonteCarloEnum.hh.

◆ m_dict

DataFormatterDictionary<Configuration> CASM::Monte::MonteCarloEnum::m_dict
private

Used for various purposes.

Definition at line 143 of file MonteCarloEnum.hh.

◆ m_enum_check

notstd::cloneable_ptr<MonteCarloEnumCheck> CASM::Monte::MonteCarloEnum::m_enum_check
private

Use for enumerating configurations via Monte Carlo.

Definition at line 129 of file MonteCarloEnum.hh.

◆ m_halloffame

notstd::cloneable_ptr<HallOfFameType> CASM::Monte::MonteCarloEnum::m_halloffame
mutableprivate

Use for enumerating configurations via Monte Carlo.

Definition at line 126 of file MonteCarloEnum.hh.

◆ m_insert_canonical

bool CASM::Monte::MonteCarloEnum::m_insert_canonical
private

If true, insert configurations in canonical form.

If m_check_existence == true, this must be true

Definition at line 137 of file MonteCarloEnum.hh.

◆ m_log

Log& CASM::Monte::MonteCarloEnum::m_log
private

Target for messages.

Definition at line 114 of file MonteCarloEnum.hh.

◆ m_metric_args

std::string CASM::Monte::MonteCarloEnum::m_metric_args
private

Definition at line 123 of file MonteCarloEnum.hh.

◆ m_primclex

const PrimClex& CASM::Monte::MonteCarloEnum::m_primclex
private

PrimClex for this system.

Definition at line 111 of file MonteCarloEnum.hh.

◆ m_sample_mode

ENUM_SAMPLE_MODE CASM::Monte::MonteCarloEnum::m_sample_mode
private

when to attempt to insert configurations in the hall of fame

Definition at line 117 of file MonteCarloEnum.hh.


The documentation for this class was generated from the following files: