CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <ConfigData.hh>
Definition at line 131 of file ConfigData.hh.
Public Member Functions | |
template<typename ConfigType > | |
ConfigData (const PrimClex &_primclex, TypeTag< ConfigType >) | |
const PrimClex & | primclex () const |
Database< Supercell > & | db_supercell () const |
Path to default calctype training_data directory for config. More... | |
template<typename ConfigType > | |
Database< ConfigType > & | db_config () const |
PropertiesDatabase & | db_props () const |
Uses primclex().settings().default_clex().calctype. More... | |
std::string | calc_dir (const std::string configname) const |
Path to default calctype training_data directory for config. More... | |
bool | has_existing_files (const std::string &to_configname) const |
Return true if there are existing files in the traning_data directory for a particular configuration. More... | |
bool | has_existing_data (const std::string &to_configname) const |
Return true if there are existing files in the traning_data directory for a particular configuration. More... | |
bool | has_existing_data_or_files (const std::string &to_configname) const |
bool | no_change (const std::string &configname) const |
Check if 'properties.calc.json' file has not changed since last read. More... | |
void | rm_files (const std::string &configname, bool dry_run) const |
Remove existing files in the traning_data directory for a particular configuration. More... | |
void | cp_files (ConfigIO::Result &res, bool dry_run, bool copy_additional_files) const |
Copy files in the same directory as properties.calc.json into the traning_data directory for a particular configuration. More... | |
Static Public Member Functions | |
static std::string | resolve_struc_path (std::string pos_path, PrimClex const &_pclex) |
Checks if pos_path can be used to resolve a properties.calc.json, and return its path Return path to properties.calc.json or POSCAR-type file that will be imported checking a couple possible locations relative to pos_path. More... | |
Private Attributes | |
const PrimClex & | m_primclex |
std::function< PropertiesDatabase &()> | m_db_props_func |
CASM::DB::ConfigData::ConfigData | ( | const PrimClex & | _primclex, |
TypeTag< ConfigType > | |||
) |
Definition at line 13 of file ConfigData_impl.hh.
std::string CASM::DB::ConfigData::calc_dir | ( | const std::string | configname | ) | const |
Path to default calctype training_data directory for config.
Definition at line 237 of file ConfigData.cc.
void CASM::DB::ConfigData::cp_files | ( | ConfigIO::Result & | res, |
bool | dry_run, | ||
bool | copy_additional_files | ||
) | const |
Copy files in the same directory as properties.calc.json into the traning_data directory for a particular configuration.
Definition at line 307 of file ConfigData.cc.
Database< ConfigType > & CASM::DB::ConfigData::db_config |
Definition at line 22 of file ConfigData_impl.hh.
PropertiesDatabase & CASM::DB::ConfigData::db_props | ( | ) | const |
Uses primclex().settings().default_clex().calctype.
Definition at line 234 of file ConfigData.cc.
Path to default calctype training_data directory for config.
Definition at line 230 of file ConfigData.cc.
bool CASM::DB::ConfigData::has_existing_data | ( | const std::string & | to_configname | ) | const |
Return true if there are existing files in the traning_data directory for a particular configuration.
Return true if there is data already associated with a particular configuration.
Definition at line 257 of file ConfigData.cc.
bool CASM::DB::ConfigData::has_existing_data_or_files | ( | const std::string & | to_configname | ) | const |
Definition at line 261 of file ConfigData.cc.
bool CASM::DB::ConfigData::has_existing_files | ( | const std::string & | to_configname | ) | const |
Return true if there are existing files in the traning_data directory for a particular configuration.
Definition at line 247 of file ConfigData.cc.
bool CASM::DB::ConfigData::no_change | ( | const std::string & | configname | ) | const |
Check if 'properties.calc.json' file has not changed since last read.
Check if 'properties.calc.json' file has not changed since last read
Definition at line 269 of file ConfigData.cc.
|
inline |
Definition at line 152 of file ConfigData.hh.
|
static |
Checks if pos_path can be used to resolve a properties.calc.json, and return its path Return path to properties.calc.json or POSCAR-type file that will be imported checking a couple possible locations relative to pos_path.
checks: 1) is a JSON file? is pos_path ends in ".json" or ".JSON", return pos_path 2) assume pos_path is /path/to/POS, checks for /path/to/calctype.current/properties.calc.json 3) assume pos_path is /path/to/POS, checks for /path/to/properties.calc.json else returns pos_path
Definition at line 222 of file ConfigData.cc.
void CASM::DB::ConfigData::rm_files | ( | const std::string & | configname, |
bool | dry_run | ||
) | const |
Remove existing files in the traning_data directory for a particular configuration.
Definition at line 282 of file ConfigData.cc.
|
private |
Definition at line 192 of file ConfigData.hh.
|
private |
Definition at line 191 of file ConfigData.hh.