CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <jsonDatabase.hh>
ValueType must have:
Derived classes must implement public methods:
Derived ConfigDatabase must implement public methods:
This JSON Database has the following structure json["version"] contains the version (format) of this database. json["supercells"] is a JSON object that corresponds to a map in which the supercell name is the key and the value is the object that contains all Each configuration is indexed within this object. json["config_id"] is a map of supercell name (key) to the next index (value)to be assigned to the newly enumerated configuration within the given supercell
Definition at line 120 of file jsonDatabase.hh.
Public Types | |
typedef DatabaseIterator< Configuration > | iterator |
typedef Configuration | value_type |
typedef Index | size_type |
typedef Base::MostDerived | MostDerived |
Public Member Functions | |
jsonDatabase (const PrimClex &_primclex) | |
jsonDatabase< Configuration > & | open () override |
void | commit () override |
void | close () override |
iterator | begin () const override |
iterator | end () const override |
size_type | size () const override |
std::pair< iterator, bool > | insert (const Configuration &config) override |
std::pair< iterator, bool > | insert (const Configuration &&config) override |
iterator | update (const Configuration &config) override |
Update record. More... | |
iterator | erase (iterator pos) override |
iterator | find (const std::string &name_or_alias) const override |
boost::iterator_range< iterator > | scel_range (const std::string &scelname) const override |
Range of Configuration in a particular supecell. More... | |
iterator | search (const Configuration &config) const override |
Find canonical Configuration in database by comparing DoF. More... | |
Index | scel_range_size (const std::string &scelname) const |
Number of Configuration in a particular supercell. More... | |
bool | empty () const |
std::pair< iterator, bool > | set_alias (const std::string &name_or_alias, const std::string &alias) |
For setting an alias. More... | |
std::string | name (const std::string &name_or_alias) const |
std::string | alias (const std::string &name_or_alias) const |
Get alias from name_or_alias. More... | |
void | insert (InputIt first, InputIt last) |
virtual iterator | erase (iterator pos)=0 |
size_type | erase (const std::string &name_or_alias) |
size_type | erase (const Configuration &obj) |
virtual size_type | count (const std::string &name_or_alias) const |
Selection< Configuration > & | master_selection () |
const Selection< Configuration > & | master_selection () const |
const PrimClex & | primclex () const |
const Structure & | prim () const |
double | crystallography_tol () const |
Protected Member Functions | |
void | read_aliases () |
void | write_aliases () |
void | clear_name (const _ValueType &obj) const |
Only ValDatabase<ValueType> is allowed to do clear_name. More... | |
void | set_id (const _ValueType &obj, Index id) const |
Only ValDatabase<ValueType> is allowed to do a const id change. More... | |
void | set_id (const _ValueType &obj, std::string id) const |
Only ValDatabase<ValueType> is allowed to do a const id change. More... | |
MostDerived & | derived () |
const MostDerived & | derived () const |
Private Types | |
typedef std::set< Configuration >::iterator | base_iterator |
typedef DatabaseSetIterator< Configuration, jsonDatabase< Configuration > > | db_set_iterator |
Private Member Functions | |
std::pair< iterator, bool > | _on_insert_or_emplace (std::pair< base_iterator, bool > &result, bool is_new) |
iterator | _iterator (base_iterator name_it) const |
Private Attributes | |
bool | m_is_open |
std::map< std::string, base_iterator > | m_name_to_config |
std::set< Configuration > | m_config_list |
std::map< std::string, std::pair< base_iterator, base_iterator > > | m_scel_range |
std::map< std::string, Index > | m_config_id |
std::map< std::string, std::string > | m_name_to_alias |
std::map< std::string, std::string > | m_alias_to_name |
Selection< Configuration > | m_master_selection |
const PrimClex * | m_primclex |
|
private |
Definition at line 159 of file jsonDatabase.hh.
|
private |
Definition at line 161 of file jsonDatabase.hh.
|
inherited |
Definition at line 223 of file Database.hh.
|
inherited |
Definition at line 16 of file HasPrimClex.hh.
|
inherited |
Definition at line 225 of file Database.hh.
|
inherited |
Definition at line 224 of file Database.hh.
CASM::DB::jsonDatabase< Configuration >::jsonDatabase | ( | const PrimClex & | _primclex | ) |
Definition at line 220 of file jsonDatabase.cc.
|
inlineprivate |
Definition at line 168 of file jsonDatabase.hh.
|
private |
Update m_name_and_alias and m_scel_range after performing an insert or emplace
Update m_name_to_config and m_scel_range after performing an insert or emplace
Definition at line 469 of file jsonDatabase.cc.
|
inherited |
Get alias from name_or_alias.
Get alias from name_or_alias
Definition at line 250 of file Database_impl.hh.
|
overridevirtual |
Implements CASM::DB::ValDatabase< Configuration >.
Definition at line 373 of file jsonDatabase.cc.
|
inlineprotectedinherited |
Only ValDatabase<ValueType> is allowed to do clear_name.
Definition at line 298 of file Database.hh.
|
overridevirtual |
Implements CASM::DB::DatabaseBase.
Definition at line 365 of file jsonDatabase.cc.
|
overridevirtual |
Implements CASM::DB::ValDatabase< Configuration >.
Definition at line 304 of file jsonDatabase.cc.
|
inlinevirtualinherited |
Definition at line 268 of file Database.hh.
|
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.
|
inlineinherited |
Definition at line 236 of file Database.hh.
|
overridevirtual |
Implements CASM::DB::ValDatabase< Configuration >.
Definition at line 378 of file jsonDatabase.cc.
|
inlineinherited |
Definition at line 266 of file Database.hh.
|
inlineinherited |
Definition at line 262 of file Database.hh.
|
override |
Definition at line 407 of file jsonDatabase.cc.
|
pure virtualinherited |
|
overridevirtual |
Implements CASM::DB::ValDatabase< Configuration >.
Definition at line 429 of file jsonDatabase.cc.
|
overridevirtual |
Implements CASM::DB::ValDatabase< Configuration >.
Definition at line 395 of file jsonDatabase.cc.
|
overridevirtual |
Implements CASM::DB::ValDatabase< Configuration >.
Definition at line 388 of file jsonDatabase.cc.
|
inlineinherited |
Definition at line 256 of file Database.hh.
|
inlineinherited |
Definition at line 285 of file Database.hh.
|
inlineinherited |
Definition at line 287 of file Database.hh.
|
inherited |
Get name from name_or_alias
Definition at line 247 of file Database_impl.hh.
|
overridevirtual |
Implements CASM::DB::DatabaseBase.
Definition at line 223 of file jsonDatabase.cc.
|
inherited |
Definition at line 19 of file HasPrimClex_impl.hh.
|
inlineinherited |
Definition at line 35 of file Database.hh.
|
protectedinherited |
Definition at line 292 of file Database_impl.hh.
|
overridevirtual |
Range of Configuration in a particular supecell.
Range of Configuration in a particular supecell
Implements CASM::DB::Database< Configuration >.
Definition at line 440 of file jsonDatabase.cc.
|
inherited |
Number of Configuration in a particular supercell.
Number of Configuration in a particular supecell.
Definition at line 11 of file ConfigDatabase.cc.
|
overridevirtual |
Find canonical Configuration in database by comparing DoF.
Find canonical Configuration in database by comparing DoF
config | A Configuration in canonical form |
Reimplemented from CASM::DB::Database< Configuration >.
Definition at line 457 of file jsonDatabase.cc.
|
inherited |
For setting an alias.
Definition at line 239 of file Database_impl.hh.
|
inlineprotectedinherited |
Only ValDatabase<ValueType> is allowed to do a const id change.
Definition at line 304 of file Database.hh.
|
inlineprotectedinherited |
Only ValDatabase<ValueType> is allowed to do a const id change.
Definition at line 310 of file Database.hh.
|
overridevirtual |
Implements CASM::DB::ValDatabase< Configuration >.
Definition at line 382 of file jsonDatabase.cc.
|
overridevirtual |
Update record.
Implements CASM::DB::Database< Configuration >.
Definition at line 401 of file jsonDatabase.cc.
|
protectedinherited |
Definition at line 294 of file Database_impl.hh.
|
privateinherited |
Definition at line 319 of file Database.hh.
|
private |
Definition at line 184 of file jsonDatabase.hh.
|
private |
Definition at line 178 of file jsonDatabase.hh.
|
private |
Definition at line 172 of file jsonDatabase.hh.
|
privateinherited |
Definition at line 322 of file Database.hh.
|
privateinherited |
Definition at line 316 of file Database.hh.
|
private |
Definition at line 175 of file jsonDatabase.hh.
|
privateinherited |
Definition at line 38 of file Database.hh.
|
private |
Definition at line 181 of file jsonDatabase.hh.