CASM
AClustersApproachtoStatisticalMechanics
|
#include <ProjectSettings.hh>
Read/modify settings of an already existing CASM project.
Definition at line 92 of file ProjectSettings.hh.
Public Member Functions | |
ProjectSettings () | |
Default constructor. More... | |
ProjectSettings (fs::path root, std::string name, const Logging &logging=Logging()) | |
Construct CASM project settings for a new project. More... | |
ProjectSettings (fs::path root, const Logging &logging=Logging()) | |
Construct CASM project settings from existing project. More... | |
std::string | name () const |
Get project name. More... | |
const DirectoryStructure & | dir () const |
const std::vector< std::string > & | properties () const |
Get current properties. More... | |
const std::map< std::string, ClexDescription > & | cluster_expansions () const |
bool | has_clex (std::string name) const |
const ClexDescription & | clex (std::string name) const |
const ClexDescription & | default_clex () const |
bool | new_clex (const ClexDescription &desc) |
bool | erase_clex (const ClexDescription &desc) |
bool | set_default_clex (const std::string &clex_name) |
bool | set_default_clex (const ClexDescription &desc) |
Will overwrite existing ClexDescription with same name. More... | |
Eigen::Matrix3l | nlist_weight_matrix () const |
Get neighbor list weight matrix. More... | |
const std::set< int > & | nlist_sublat_indices () const |
Get set of sublattice indices to include in neighbor lists. More... | |
std::pair< std::string, std::string > | cxx () const |
Get c++ compiler. More... | |
std::pair< std::string, std::string > | cxxflags () const |
Get c++ compiler options. More... | |
std::pair< std::string, std::string > | soflags () const |
Get shared object options. More... | |
std::pair< fs::path, std::string > | casm_includedir () const |
Get casm includedir. More... | |
std::pair< fs::path, std::string > | casm_libdir () const |
Get casm libdir. More... | |
std::pair< fs::path, std::string > | boost_includedir () const |
Get boost includedir. More... | |
std::pair< fs::path, std::string > | boost_libdir () const |
Get boost libdir. More... | |
std::string | compile_options () const |
Get current compilation options string. More... | |
std::string | so_options () const |
Get current shared library options string. More... | |
std::string | view_command () const |
Get current command used by 'casm view'. More... | |
double | crystallography_tol () const |
Get current project crystallography tolerance. More... | |
double | lin_alg_tol () const |
Get current project linear algebra tolerance. More... | |
EnumeratorHandler & | enumerator_handler () |
const EnumeratorHandler & | enumerator_handler () const |
template<typename DataObject > | |
QueryHandler< DataObject > & | query_handler () |
template<typename DataObject > | |
const QueryHandler< DataObject > & | query_handler () const |
std::string | clexulator () const |
bool | new_casm_dir () const |
Create new project data directory. More... | |
bool | new_symmetry_dir () const |
Create new symmetry directory. More... | |
bool | new_bset_dir (std::string bset) const |
Add a basis set directory. More... | |
bool | new_clex_dir (std::string clex) const |
Add a cluster expansion directory. More... | |
bool | new_calc_settings_dir (std::string calctype) const |
Add calculation settings directory path. More... | |
bool | new_supercell_calc_settings_dir (std::string scelname, std::string calctype) const |
Add calculation settings directory path, for supercell specific settings. More... | |
bool | new_configuration_calc_settings_dir (std::string configname, std::string calctype) const |
Add calculation settings directory path, for configuration specific settings. More... | |
bool | new_ref_dir (std::string calctype, std::string ref) const |
Add a ref directory. More... | |
bool | new_eci_dir (std::string clex, std::string calctype, std::string ref, std::string bset, std::string eci) const |
Add an eci directory. More... | |
std::vector< std::string > & | properties () |
Access current properties. More... | |
bool | set_nlist_weight_matrix (Eigen::Matrix3l M) |
Set neighbor list weight matrix (will delete existing Clexulator source and compiled code) More... | |
template<typename SublatIterator > | |
bool | set_nlist_sublat_indices (SublatIterator begin, SublatIterator end) |
Set range of sublattice indices to include in neighbor lists (will delete existing Clexulator source and compiled code) More... | |
bool | set_cxx (std::string opt) |
Set c++ compiler (empty string to use default) More... | |
bool | set_cxxflags (std::string opt) |
Set c++ compiler options (empty string to use default) More... | |
bool | set_soflags (std::string opt) |
Set shared object options (empty string to use default) More... | |
bool | set_casm_prefix (fs::path dir) |
Set casm prefix (empty string to use default) More... | |
bool | set_casm_includedir (fs::path dir) |
Set casm includedir (empty string to use default) More... | |
bool | set_casm_libdir (fs::path dir) |
Set casm libdir (empty string to use default) More... | |
bool | set_boost_prefix (fs::path dir) |
Set boost prefix (empty string to use default) More... | |
bool | set_boost_includedir (fs::path dir) |
Set boost includedir (empty string to use default) More... | |
bool | set_boost_libdir (fs::path dir) |
Set boost libdir (empty string to use default) More... | |
bool | set_view_command (std::string opt) |
Set command used by 'casm view'. More... | |
bool | set_crystallography_tol (double _tol) |
Set crystallography tolerance. More... | |
bool | set_lin_alg_tol (double _tol) |
Set linear algebra tolerance. More... | |
void | commit () const |
Save settings to project settings file. More... | |
jsonParser & | to_json (jsonParser &json) const |
Output as JSON. More... | |
void | print_compiler_settings_summary (Log &log) const |
Print summary of compiler settings, as for 'casm settings -l'. More... | |
void | print_summary (Log &log) const |
Print summary of ProjectSettings, as for 'casm settings -l'. More... | |
bool | set_compile_options (std::string opt) |
(deprecated) Set compile options to 'opt' (empty string to use default) More... | |
bool | set_so_options (std::string opt) |
(deprecated) Set shared library options to 'opt' (empty string to use default) More... | |
Log & | log () const |
Log & | debug_log () const |
Log & | err_log () const |
Static Public Member Functions | |
static Logging | null () |
Private Member Functions | |
void | _reset_clexulators () |
Changing the neighbor list properties requires updating Clexulator source code. More... | |
void | _load_default_options () |
initialize default compiler options More... | |
Private Attributes | |
DirectoryStructure | m_dir |
std::string | m_name |
notstd::cloneable_ptr < EnumeratorHandler > | m_enumerator_handler |
std::map< std::string, notstd::cloneable_ptr < notstd::Cloneable > > | m_query_handler |
std::map< std::string, ClexDescription > | m_clex |
std::string | m_default_clex |
Eigen::Matrix3l | m_nlist_weight_matrix |
std::set< int > | m_nlist_sublat_indices |
std::vector< std::string > | m_properties |
std::pair< std::string, std::string > | m_cxx |
std::pair< std::string, std::string > | m_cxxflags |
std::pair< std::string, std::string > | m_soflags |
std::pair< fs::path, std::string > | m_casm_includedir |
std::pair< fs::path, std::string > | m_casm_libdir |
std::pair< fs::path, std::string > | m_boost_includedir |
std::pair< fs::path, std::string > | m_boost_libdir |
std::string | m_depr_compile_options |
std::string | m_depr_so_options |
std::string | m_view_command |
double | m_crystallography_tol |
double | m_lin_alg_tol |
|
inline |
Default constructor.
Definition at line 97 of file ProjectSettings.hh.
|
explicit |
Construct CASM project settings for a new project.
root | Path to new CASM project directory |
name | Name of new CASM project. Use a short title suitable for prepending to file names. |
Definition at line 88 of file ProjectSettings.cc.
|
explicit |
Construct CASM project settings from existing project.
root | Path to existing CASM project directory. Project settings will be read. |
Definition at line 116 of file ProjectSettings.cc.
|
private |
initialize default compiler options
Definition at line 611 of file ProjectSettings.cc.
|
private |
Changing the neighbor list properties requires updating Clexulator source code.
Changing the neighbor list properties requires updating Clexulator source code. This will remove existing source/compiled files.
Definition at line 602 of file ProjectSettings.cc.
std::pair< fs::path, std::string > CASM::ProjectSettings::boost_includedir | ( | ) | const |
Get boost includedir.
Definition at line 365 of file ProjectSettings.cc.
std::pair< fs::path, std::string > CASM::ProjectSettings::boost_libdir | ( | ) | const |
Get boost libdir.
Definition at line 370 of file ProjectSettings.cc.
std::pair< fs::path, std::string > CASM::ProjectSettings::casm_includedir | ( | ) | const |
Get casm includedir.
Definition at line 355 of file ProjectSettings.cc.
std::pair< fs::path, std::string > CASM::ProjectSettings::casm_libdir | ( | ) | const |
Get casm libdir.
Definition at line 360 of file ProjectSettings.cc.
const ClexDescription & CASM::ProjectSettings::clex | ( | std::string | name | ) | const |
Definition at line 280 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::clexulator | ( | ) | const |
Definition at line 419 of file ProjectSettings.cc.
const std::map< std::string, ClexDescription > & CASM::ProjectSettings::cluster_expansions | ( | ) | const |
Definition at line 272 of file ProjectSettings.cc.
void CASM::ProjectSettings::commit | ( | ) | const |
Save settings to project settings file.
Save settings to file.
re-throw exceptions
Definition at line 583 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::compile_options | ( | ) | const |
Get current compilation options string.
Definition at line 375 of file ProjectSettings.cc.
double CASM::ProjectSettings::crystallography_tol | ( | ) | const |
Get current project crystallography tolerance.
Definition at line 407 of file ProjectSettings.cc.
std::pair< std::string, std::string > CASM::ProjectSettings::cxx | ( | ) | const |
Get c++ compiler.
Definition at line 340 of file ProjectSettings.cc.
std::pair< std::string, std::string > CASM::ProjectSettings::cxxflags | ( | ) | const |
Get c++ compiler options.
Definition at line 345 of file ProjectSettings.cc.
const ClexDescription & CASM::ProjectSettings::default_clex | ( | ) | const |
Definition at line 309 of file ProjectSettings.cc.
|
inline |
Definition at line 116 of file ProjectSettings.hh.
|
inline |
Definition at line 186 of file ProjectSettings.hh.
|
inline |
Definition at line 193 of file ProjectSettings.hh.
bool CASM::ProjectSettings::erase_clex | ( | const ClexDescription & | desc | ) |
Definition at line 292 of file ProjectSettings.cc.
bool CASM::ProjectSettings::has_clex | ( | std::string | name | ) | const |
Definition at line 276 of file ProjectSettings.cc.
double CASM::ProjectSettings::lin_alg_tol | ( | ) | const |
Get current project linear algebra tolerance.
Definition at line 412 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::name | ( | ) | const |
Get project name.
Definition at line 262 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_bset_dir | ( | std::string | bset | ) | const |
Add a basis set directory.
Definition at line 437 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_calc_settings_dir | ( | std::string | calctype | ) | const |
Add calculation settings directory path.
Definition at line 448 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_casm_dir | ( | ) | const |
Create new project data directory.
Definition at line 427 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_clex | ( | const ClexDescription & | desc | ) |
Definition at line 284 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_clex_dir | ( | std::string | clex | ) | const |
Add a cluster expansion directory.
Definition at line 442 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_configuration_calc_settings_dir | ( | std::string | configname, |
std::string | calctype | ||
) | const |
Add calculation settings directory path, for configuration specific settings.
Definition at line 458 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_eci_dir | ( | std::string | clex, |
std::string | calctype, | ||
std::string | ref, | ||
std::string | bset, | ||
std::string | eci | ||
) | const |
Add an eci directory.
Definition at line 469 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_ref_dir | ( | std::string | calctype, |
std::string | ref | ||
) | const |
Add a ref directory.
Definition at line 464 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_supercell_calc_settings_dir | ( | std::string | scelname, |
std::string | calctype | ||
) | const |
Add calculation settings directory path, for supercell specific settings.
Definition at line 453 of file ProjectSettings.cc.
bool CASM::ProjectSettings::new_symmetry_dir | ( | ) | const |
Create new symmetry directory.
Definition at line 432 of file ProjectSettings.cc.
const std::set< int > & CASM::ProjectSettings::nlist_sublat_indices | ( | ) | const |
Get set of sublattice indices to include in neighbor lists.
Definition at line 335 of file ProjectSettings.cc.
Eigen::Matrix3l CASM::ProjectSettings::nlist_weight_matrix | ( | ) | const |
Get neighbor list weight matrix.
Definition at line 330 of file ProjectSettings.cc.
void CASM::ProjectSettings::print_compiler_settings_summary | ( | Log & | log | ) | const |
Print summary of compiler settings, as for 'casm settings -l'.
Definition at line 669 of file ProjectSettings.cc.
void CASM::ProjectSettings::print_summary | ( | Log & | log | ) | const |
Print summary of ProjectSettings, as for 'casm settings -l'.
Definition at line 698 of file ProjectSettings.cc.
const std::vector< std::string > & CASM::ProjectSettings::properties | ( | ) | const |
Get current properties.
const Access current properties
Definition at line 477 of file ProjectSettings.cc.
std::vector< std::string > & CASM::ProjectSettings::properties | ( | ) |
Access current properties.
Definition at line 267 of file ProjectSettings.cc.
|
inline |
Definition at line 200 of file ProjectSettings.hh.
|
inline |
Definition at line 214 of file ProjectSettings.hh.
bool CASM::ProjectSettings::set_boost_includedir | ( | fs::path | dir | ) |
Set boost includedir (empty string to use default)
Definition at line 540 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_boost_libdir | ( | fs::path | dir | ) |
Set boost libdir (empty string to use default)
Definition at line 546 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_boost_prefix | ( | fs::path | dir | ) |
Set boost prefix (empty string to use default)
Definition at line 533 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_casm_includedir | ( | fs::path | dir | ) |
Set casm includedir (empty string to use default)
Definition at line 521 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_casm_libdir | ( | fs::path | dir | ) |
Set casm libdir (empty string to use default)
Definition at line 527 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_casm_prefix | ( | fs::path | dir | ) |
Set casm prefix (empty string to use default)
Definition at line 514 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_compile_options | ( | std::string | opt | ) |
(deprecated) Set compile options to 'opt' (empty string to use default)
Definition at line 552 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_crystallography_tol | ( | double | _tol | ) |
Set crystallography tolerance.
Definition at line 571 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_cxx | ( | std::string | opt | ) |
Set c++ compiler (empty string to use default)
Definition at line 496 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_cxxflags | ( | std::string | opt | ) |
Set c++ compiler options (empty string to use default)
Definition at line 502 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_default_clex | ( | const std::string & | clex_name | ) |
Definition at line 313 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_default_clex | ( | const ClexDescription & | desc | ) |
Will overwrite existing ClexDescription with same name.
Definition at line 322 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_lin_alg_tol | ( | double | _tol | ) |
Set linear algebra tolerance.
Definition at line 577 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_nlist_weight_matrix | ( | Eigen::Matrix3l | M | ) |
Set neighbor list weight matrix (will delete existing Clexulator source and compiled code)
Definition at line 484 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_so_options | ( | std::string | opt | ) |
(deprecated) Set shared library options to 'opt' (empty string to use default)
Definition at line 558 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_soflags | ( | std::string | opt | ) |
Set shared object options (empty string to use default)
Definition at line 508 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_view_command | ( | std::string | opt | ) |
Set command used by 'casm view'.
Definition at line 565 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::so_options | ( | ) | const |
Get current shared library options string.
Definition at line 388 of file ProjectSettings.cc.
std::pair< std::string, std::string > CASM::ProjectSettings::soflags | ( | ) | const |
Get shared object options.
Definition at line 350 of file ProjectSettings.cc.
jsonParser & CASM::ProjectSettings::to_json | ( | jsonParser & | json | ) | const |
Output as JSON.
Definition at line 621 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::view_command | ( | ) | const |
Get current command used by 'casm view'.
Definition at line 402 of file ProjectSettings.cc.
|
private |
Definition at line 370 of file ProjectSettings.hh.
|
private |
Definition at line 371 of file ProjectSettings.hh.
|
private |
Definition at line 368 of file ProjectSettings.hh.
|
private |
Definition at line 369 of file ProjectSettings.hh.
|
private |
Definition at line 352 of file ProjectSettings.hh.
|
private |
Definition at line 382 of file ProjectSettings.hh.
|
private |
Definition at line 365 of file ProjectSettings.hh.
|
private |
Definition at line 366 of file ProjectSettings.hh.
|
private |
Definition at line 355 of file ProjectSettings.hh.
|
private |
Definition at line 374 of file ProjectSettings.hh.
|
private |
Definition at line 376 of file ProjectSettings.hh.
|
private |
Definition at line 342 of file ProjectSettings.hh.
|
private |
Definition at line 346 of file ProjectSettings.hh.
|
private |
Definition at line 385 of file ProjectSettings.hh.
|
private |
Definition at line 344 of file ProjectSettings.hh.
|
private |
Definition at line 359 of file ProjectSettings.hh.
|
private |
Definition at line 358 of file ProjectSettings.hh.
|
private |
Definition at line 362 of file ProjectSettings.hh.
|
private |
Definition at line 347 of file ProjectSettings.hh.
|
private |
Definition at line 367 of file ProjectSettings.hh.
|
private |
Definition at line 379 of file ProjectSettings.hh.