CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <PropertiesDatabase.hh>
Database containing MappedProperties of Configuration
In brief, MappedProperties holds:
properties.calc.json
type file where SimpleStructure properties were read from. All MappedProperties in the PropertiesDatabase have unique "origin".Note:
The PropertiesDatabase contains:
When there are multiple MappedProperties with different "origin" and the same "to" Configuration (i.e. multiple unstable ideal Configuration that relax to the same stable Configuragion), a "ScoreMappedProperties" object is used to sort the set. The PropertiesDatabase records a default ScoreMappedProperties object, as well as a list of 'bespoke' ScoreMappedProperties, which may be assigned to individual 'to' keys on an as-needed basis.
Definition at line 190 of file PropertiesDatabase.hh.
Classes | |
class | Compare |
Compare type for std::set<std::string, Compare>, which sorts to determine the 'origin' configname for the best scoring MappedProperties to a particular config. More... | |
Public Types | |
typedef MappedProperties | value_type |
typedef PropertiesDatabaseIterator | iterator |
typedef Index | size_type |
typedef Base::MostDerived | MostDerived |
Public Member Functions | |
PropertiesDatabase (const PrimClex &_primclex) | |
virtual iterator | begin () const =0 |
Begin iterator over data entries. More... | |
virtual iterator | end () const =0 |
End iterator over data entries. More... | |
virtual size_type | size () const =0 |
bool | empty () const |
virtual iterator | find_via_to (std::string to_configname) const =0 |
Return iterator to data entry that is the best mapping to specified config. More... | |
virtual iterator | find_via_origin (std::string origin) const =0 |
Return iterator to data entry that is from the specified origin. More... | |
virtual std::set< std::string, Compare > | all_origins (std::string to_configname) const =0 |
Names of all configurations that relaxed 'origin'->'to'. More... | |
virtual void | set_score_method (std::string to_configname, const ScoreMappedProperties &score)=0 |
Change the score method for a single configuration. More... | |
ScoreMappedProperties | score_method (std::string to_configname) const |
Name of ScoreMappedProperties method. More... | |
double | best_score (std::string to_configname) const |
Best score of configurations that relaxed 'origin'->'to'. More... | |
double | score (std::string origin) const |
Score mapping 'origin'->'to'. More... | |
double | score (const MappedProperties &value) const |
Score mapping 'from'->'to'. More... | |
std::pair< iterator, bool > | insert (const MappedProperties &value) |
Insert data. More... | |
iterator | erase (iterator pos) |
Erase data. More... | |
size_type | erase_via_origin (std::string origin) |
Erase data. More... | |
virtual DatabaseBase & | open ()=0 |
virtual void | commit ()=0 |
virtual void | close ()=0 |
const PrimClex & | primclex () const |
const Structure & | prim () const |
double | crystallography_tol () const |
Protected Member Functions | |
MostDerived & | derived () |
const MostDerived & | derived () const |
Private Member Functions | |
virtual std::pair< iterator, bool > | _insert (const MappedProperties &value)=0 |
Private _insert MappedProperties, without modifying 'relaxed_from'. More... | |
virtual iterator | _erase (iterator pos)=0 |
Private _erase MappedProperties, without modifying 'relaxed_from'. More... | |
virtual void | _set_all_origins (std::string to_configname, const std::set< std::string, Compare > &_set)=0 |
Set sorted container of names of all configurations that relaxed 'from'->'to'. More... | |
Private Attributes | |
const PrimClex * | m_primclex |
Definition at line 215 of file PropertiesDatabase.hh.
|
inherited |
Definition at line 16 of file HasPrimClex.hh.
Definition at line 216 of file PropertiesDatabase.hh.
Definition at line 214 of file PropertiesDatabase.hh.
|
inline |
Definition at line 218 of file PropertiesDatabase.hh.
Private _erase MappedProperties, without modifying 'relaxed_from'.
Implemented in CASM::DB::jsonPropertiesDatabase.
|
privatepure virtual |
Private _insert MappedProperties, without modifying 'relaxed_from'.
Implemented in CASM::DB::jsonPropertiesDatabase.
|
privatepure virtual |
Set sorted container of names of all configurations that relaxed 'from'->'to'.
Implemented in CASM::DB::jsonPropertiesDatabase.
|
pure virtual |
Names of all configurations that relaxed 'origin'->'to'.
Implemented in CASM::DB::jsonPropertiesDatabase.
|
pure virtual |
Begin iterator over data entries.
Implemented in CASM::DB::jsonPropertiesDatabase.
|
inline |
Best score of configurations that relaxed 'origin'->'to'.
Definition at line 254 of file PropertiesDatabase.hh.
|
pure virtualinherited |
|
pure virtualinherited |
|
inherited |
Definition at line 21 of file HasPrimClex_impl.hh.
|
inlineprotectedinherited |
Definition at line 13 of file CRTPBase.hh.
|
inlineprotectedinherited |
Definition at line 15 of file CRTPBase.hh.
|
inline |
Definition at line 227 of file PropertiesDatabase.hh.
|
pure virtual |
End iterator over data entries.
Implemented in CASM::DB::jsonPropertiesDatabase.
PropertiesDatabase::iterator CASM::DB::PropertiesDatabase::erase | ( | iterator | pos | ) |
Erase data.
Erase the 'origin' data element at provided iterator.
Definition at line 35 of file PropertiesDatabase.cc.
|
inline |
Erase data.
Definition at line 275 of file PropertiesDatabase.hh.
|
pure virtual |
Return iterator to data entry that is from the specified origin.
Implemented in CASM::DB::jsonPropertiesDatabase.
|
pure virtual |
Return iterator to data entry that is the best mapping to specified config.
Implemented in CASM::DB::jsonPropertiesDatabase.
std::pair< PropertiesDatabase::iterator, bool > CASM::DB::PropertiesDatabase::insert | ( | const MappedProperties & | value | ) |
Insert data.
Definition at line 18 of file PropertiesDatabase.cc.
|
pure virtualinherited |
|
inherited |
Definition at line 19 of file HasPrimClex_impl.hh.
|
inlineinherited |
Definition at line 35 of file Database.hh.
|
inline |
Score mapping 'from'->'to'.
Definition at line 264 of file PropertiesDatabase.hh.
|
inline |
Score mapping 'origin'->'to'.
Definition at line 259 of file PropertiesDatabase.hh.
|
inline |
Name of ScoreMappedProperties method.
Definition at line 249 of file PropertiesDatabase.hh.
|
pure virtual |
Change the score method for a single configuration.
Implemented in CASM::DB::jsonPropertiesDatabase.
|
pure virtual |
Implemented in CASM::DB::jsonPropertiesDatabase.
|
privateinherited |
Definition at line 38 of file Database.hh.