CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <ProjectSettings.hh>
CASM project settings
Contains:
Also contains:
Optionally contains:
Compiler and linker settings:
CASM_CXX
, CXX
CASM_CXXFLAGS
CASM_SOFLAGS
ccasm
executable),CASM_INCLUDEDIR
CASM_PREFIX
(to indicate CASM_PREFIX/include
)ccasm
executable),CASM_LIBDIR
CASM_PREFIX
(to indicate CASM_PREFIX/lib
)ccasm
executable),CASM_BOOST_INCLUDEDIR
CASM_BOOST_PREFIX
(to indicate CASM_BOOST_PREFIX/include
)ccasm
executable),CASM_BOOST_LIBDIR
CASM_BOOST_PREFIX
(to indicate CASM_BOOST_PREFIX/lib
)Notes on previous versions:
Definition at line 132 of file ProjectSettings.hh.
Public Types | |
typedef std::string | ObjectTypeName |
typedef std::string | CalcTypeName |
typedef std::map< ObjectTypeName, std::map< CalcTypeName, std::vector< std::string > > > | required_properties_map_type |
typedef std::string | QueryAliasName |
typedef std::string | QueryAliasValue |
typedef std::map< ObjectTypeName, std::map< QueryAliasName, QueryAliasValue > > | query_alias_map_type |
Public Member Functions | |
ProjectSettings (std::string project_name) | |
ProjectSettings (std::string project_name, fs::path root) | |
~ProjectSettings () | |
std::string | project_name () const |
Get project name. More... | |
bool | has_dir () const |
Check if DirectoryStructure exists. More... | |
DirectoryStructure const & | dir () const |
Access DirectoryStructure object. Throw if not set. More... | |
bool | set_root_dir (fs::path root) |
Set DirectoryStructure. More... | |
fs::path | root_dir () const |
Access dir().root_dir(). Throw if not set. More... | |
required_properties_map_type const & | required_properties () const |
void | set_required_properties (required_properties_map_type const &_required_properties) |
std::vector< std::string > const & | required_properties (std::string type_name, std::string calctype) const |
void | set_required_properties (std::string type_name, std::string calctype, std::vector< std::string > const &_required_properties) |
std::map< std::string, ClexDescription > const & | cluster_expansions () const |
Const access map of all ClexDescription. More... | |
bool | has_clex (std::string clex_name) const |
Check if a ClexDescription exists. More... | |
ClexDescription const & | clex (std::string clex_name) const |
Get a ClexDescription by name. More... | |
bool | insert_clex (ClexDescription const &desc) |
bool | erase_clex (ClexDescription const &desc) |
std::string | default_clex_name () const |
Get default ClexDescription name. More... | |
bool | set_default_clex_name (std::string const &clex_name) |
Set default ClexDescription by name. More... | |
ClexDescription const & | default_clex () const |
Get default ClexDescription. More... | |
bool | set_default_clex (ClexDescription const &desc) |
std::pair< std::string, std::string > | cxx () const |
Get c++ compiler (pair of value and source for the value) More... | |
std::pair< std::string, std::string > | cxxflags () const |
Get c++ compiler options (pair of value and source for the value) More... | |
std::pair< std::string, std::string > | soflags () const |
Get shared object options (pair of value and source for the value) More... | |
std::pair< fs::path, std::string > | casm_includedir () const |
Get casm includedir (pair of value and source for the value) More... | |
std::pair< fs::path, std::string > | casm_libdir () const |
Get casm libdir (pair of value and source for the value) More... | |
std::pair< fs::path, std::string > | boost_includedir () const |
Get boost includedir (pair of value and source for the value) More... | |
std::pair< fs::path, std::string > | boost_libdir () const |
Get boost libdir (pair of value and source for the value) More... | |
std::string | compile_options () const |
std::string | so_options () const |
std::string | view_command () const |
Get current command used by 'casm view'. More... | |
std::string | view_command_video () const |
Get current video viewing 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 () |
EnumeratorHandler const & | enumerator_handler () const |
void | set_default_database_name (std::string _default_database_name) |
Set default database type name (for future) More... | |
std::string | default_database_name () const |
Get default database type name. More... | |
query_alias_map_type const & | query_alias () const |
void | set_query_alias (query_alias_map_type const &_query_alias) |
void | set_query_alias (std::string type_name, std::string alias_name, std::string alias_value) |
template<typename DataObject > | |
QueryHandler< DataObject > & | query_handler () |
template<typename DataObject > | |
QueryHandler< DataObject > const & | query_handler () const |
HamiltonianModules & | hamiltonian_modules () |
HamiltonianModules const & | hamiltonian_modules () const |
std::string | global_clexulator_name () const |
Name to use for clexulator printing. More... | |
bool | has_m_nlist_weight_matrix () const |
Check if neighbor list weight matrix exists. More... | |
Eigen::Matrix3l | nlist_weight_matrix () const |
Get neighbor list weight matrix. More... | |
bool | set_nlist_weight_matrix (Eigen::Matrix3l M) |
bool | has_nlist_sublat_indices () const |
Check if set of sublattice indices to include in neighbor lists exists. More... | |
std::set< int > const & | nlist_sublat_indices () const |
Get set of sublattice indices to include in neighbor lists. More... | |
bool | set_nlist_sublat_indices (std::set< int > value) |
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_view_command_video (std::string opt) |
Set video viewing 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... | |
typedef std::string CASM::ProjectSettings::CalcTypeName |
Definition at line 172 of file ProjectSettings.hh.
typedef std::string CASM::ProjectSettings::ObjectTypeName |
Definition at line 171 of file ProjectSettings.hh.
typedef std::map<ObjectTypeName, std::map<QueryAliasName, QueryAliasValue> > CASM::ProjectSettings::query_alias_map_type |
query_alias is a map by object type name of query alias {name,value} pairs: traits<Configuration>::name -> {query alias name, query alias value}
Definition at line 313 of file ProjectSettings.hh.
typedef std::string CASM::ProjectSettings::QueryAliasName |
Definition at line 306 of file ProjectSettings.hh.
typedef std::string CASM::ProjectSettings::QueryAliasValue |
Definition at line 307 of file ProjectSettings.hh.
typedef std::map<ObjectTypeName, std::map<CalcTypeName, std::vector<std::string> > > CASM::ProjectSettings::required_properties_map_type |
required_properties is a map of properties names required for a calculation to be complete: traits<Configuration>::name -> calctype -> {propname1, propname2, ...}
Definition at line 179 of file ProjectSettings.hh.
|
explicit |
Construct CASM project settings for a new project (memory only)
project_name | Name of new CASM project. Use a short title suitable for prepending to file names. |
Definition at line 42 of file ProjectSettings.cc.
|
explicit |
Construct CASM project settings for a new project (to be persisted on disk)
project_name | Name of new CASM project. Use a short title suitable for prepending to file names. |
root | Path to new CASM project directory |
Definition at line 50 of file ProjectSettings.cc.
CASM::ProjectSettings::~ProjectSettings | ( | ) |
Definition at line 59 of file ProjectSettings.cc.
std::pair< fs::path, std::string > CASM::ProjectSettings::boost_includedir | ( | ) | const |
Get boost includedir (pair of value and source for the value)
Definition at line 177 of file ProjectSettings.cc.
std::pair< fs::path, std::string > CASM::ProjectSettings::boost_libdir | ( | ) | const |
Get boost libdir (pair of value and source for the value)
Definition at line 183 of file ProjectSettings.cc.
std::pair< fs::path, std::string > CASM::ProjectSettings::casm_includedir | ( | ) | const |
Get casm includedir (pair of value and source for the value)
Definition at line 166 of file ProjectSettings.cc.
std::pair< fs::path, std::string > CASM::ProjectSettings::casm_libdir | ( | ) | const |
Get casm libdir (pair of value and source for the value)
Definition at line 172 of file ProjectSettings.cc.
ClexDescription const & CASM::ProjectSettings::clex | ( | std::string | clex_name | ) | const |
Get a ClexDescription by name.
Definition at line 111 of file ProjectSettings.cc.
std::map< std::string, ClexDescription > const & CASM::ProjectSettings::cluster_expansions | ( | ) | const |
Const access map of all ClexDescription.
Definition at line 103 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::compile_options | ( | ) | const |
Combines cxx, cxxflags, casm_includedir, and boost_includedir to make compiler options string
Definition at line 188 of file ProjectSettings.cc.
double CASM::ProjectSettings::crystallography_tol | ( | ) | const |
Get current project crystallography tolerance.
Definition at line 207 of file ProjectSettings.cc.
std::pair< std::string, std::string > CASM::ProjectSettings::cxx | ( | ) | const |
Get c++ compiler (pair of value and source for the value)
Definition at line 152 of file ProjectSettings.cc.
std::pair< std::string, std::string > CASM::ProjectSettings::cxxflags | ( | ) | const |
Get c++ compiler options (pair of value and source for the value)
Definition at line 156 of file ProjectSettings.cc.
ClexDescription const & CASM::ProjectSettings::default_clex | ( | ) | const |
Get default ClexDescription.
Definition at line 142 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::default_clex_name | ( | ) | const |
Get default ClexDescription name.
Definition at line 130 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::default_database_name | ( | ) | const |
Get default database type name.
Definition at line 229 of file ProjectSettings.cc.
DirectoryStructure const & CASM::ProjectSettings::dir | ( | ) | const |
Access DirectoryStructure object. Throw if not set.
Definition at line 65 of file ProjectSettings.cc.
EnumeratorHandler & CASM::ProjectSettings::enumerator_handler | ( | ) |
Definition at line 213 of file ProjectSettings.cc.
EnumeratorHandler const & CASM::ProjectSettings::enumerator_handler | ( | ) | const |
Definition at line 220 of file ProjectSettings.cc.
bool CASM::ProjectSettings::erase_clex | ( | ClexDescription const & | desc | ) |
Erase existing ClexDescription from ProjectSettings
If desc
is the default clex, the default clex is cleared.
Definition at line 123 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::global_clexulator_name | ( | ) | const |
Name to use for clexulator printing.
Definition at line 296 of file ProjectSettings.cc.
HamiltonianModules & CASM::ProjectSettings::hamiltonian_modules | ( | ) |
Definition at line 282 of file ProjectSettings.cc.
HamiltonianModules const & CASM::ProjectSettings::hamiltonian_modules | ( | ) | const |
Definition at line 289 of file ProjectSettings.cc.
bool CASM::ProjectSettings::has_clex | ( | std::string | clex_name | ) | const |
Check if a ClexDescription exists.
Definition at line 107 of file ProjectSettings.cc.
bool CASM::ProjectSettings::has_dir | ( | ) | const |
Check if DirectoryStructure exists.
Definition at line 63 of file ProjectSettings.cc.
bool CASM::ProjectSettings::has_m_nlist_weight_matrix | ( | ) | const |
Check if neighbor list weight matrix exists.
Definition at line 300 of file ProjectSettings.cc.
bool CASM::ProjectSettings::has_nlist_sublat_indices | ( | ) | const |
Check if set of sublattice indices to include in neighbor lists exists.
Definition at line 313 of file ProjectSettings.cc.
bool CASM::ProjectSettings::insert_clex | ( | ClexDescription const & | desc | ) |
Insert a ClexDescription into ProjectSettings. Fails if existing ClexDescription with same name
Definition at line 115 of file ProjectSettings.cc.
double CASM::ProjectSettings::lin_alg_tol | ( | ) | const |
Get current project linear algebra tolerance.
Definition at line 211 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 317 of file ProjectSettings.cc.
Eigen::Matrix3l CASM::ProjectSettings::nlist_weight_matrix | ( | ) | const |
Get neighbor list weight matrix.
Definition at line 304 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::project_name | ( | ) | const |
Get project name.
Definition at line 61 of file ProjectSettings.cc.
ProjectSettings::query_alias_map_type const & CASM::ProjectSettings::query_alias | ( | ) | const |
Access query aliases stored in the project settings
Note:
Definition at line 233 of file ProjectSettings.cc.
QueryHandler< DataObject > & CASM::ProjectSettings::query_handler |
Definition at line 252 of file ProjectSettings.cc.
QueryHandler< DataObject > const & CASM::ProjectSettings::query_handler |
Definition at line 278 of file ProjectSettings.cc.
ProjectSettings::required_properties_map_type const & CASM::ProjectSettings::required_properties | ( | ) | const |
Access properties required for an object to be considered calculated
Note:
Definition at line 82 of file ProjectSettings.cc.
std::vector< std::string > const & CASM::ProjectSettings::required_properties | ( | std::string | type_name, |
std::string | calctype | ||
) | const |
const Access properties required for an object to be considered calculated
type_name | string, i.e. traits<Configuration>::name |
calctype | string |
Definition at line 91 of file ProjectSettings.cc.
fs::path CASM::ProjectSettings::root_dir | ( | ) | const |
Access dir().root_dir(). Throw if not set.
Definition at line 79 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_boost_includedir | ( | fs::path | dir | ) |
Set boost includedir (empty string to use default)
Definition at line 363 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_boost_libdir | ( | fs::path | dir | ) |
Set boost libdir (empty string to use default)
Definition at line 368 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_boost_prefix | ( | fs::path | dir | ) |
Set boost prefix (empty string to use default)
Definition at line 357 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_casm_includedir | ( | fs::path | dir | ) |
Set casm includedir (empty string to use default)
Definition at line 347 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_casm_libdir | ( | fs::path | dir | ) |
Set casm libdir (empty string to use default)
Definition at line 352 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_casm_prefix | ( | fs::path | dir | ) |
Set casm prefix (empty string to use default)
Definition at line 341 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_crystallography_tol | ( | double | _tol | ) |
Set crystallography tolerance.
Definition at line 383 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_cxx | ( | std::string | opt | ) |
Set c++ compiler (empty string to use default)
Definition at line 326 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_cxxflags | ( | std::string | opt | ) |
Set c++ compiler options (empty string to use default)
Definition at line 331 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_default_clex | ( | ClexDescription const & | desc | ) |
Set default ClexDescription. Will overwrite existing ClexDescription with same name
Definition at line 146 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_default_clex_name | ( | std::string const & | clex_name | ) |
Set default ClexDescription by name.
Definition at line 134 of file ProjectSettings.cc.
void CASM::ProjectSettings::set_default_database_name | ( | std::string | _default_database_name | ) |
Set default database type name (for future)
Definition at line 224 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_lin_alg_tol | ( | double | _tol | ) |
Set linear algebra tolerance.
Definition at line 388 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_nlist_sublat_indices | ( | std::set< int > | value | ) |
Set range of sublattice indices to include in neighbor lists
Note:
Definition at line 321 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)
Note:
Definition at line 308 of file ProjectSettings.cc.
void CASM::ProjectSettings::set_query_alias | ( | query_alias_map_type const & | _query_alias | ) |
Set query aliases to be stored in the project settings
Note:
Definition at line 238 of file ProjectSettings.cc.
void CASM::ProjectSettings::set_query_alias | ( | std::string | type_name, |
std::string | alias_name, | ||
std::string | alias_value | ||
) |
Set query alias. Invalidates query_handler references.
Note:
Definition at line 244 of file ProjectSettings.cc.
void CASM::ProjectSettings::set_required_properties | ( | required_properties_map_type const & | _required_properties | ) |
Access properties required for an object to be considered calculated
Note:
Definition at line 86 of file ProjectSettings.cc.
void CASM::ProjectSettings::set_required_properties | ( | std::string | type_name, |
std::string | calctype, | ||
std::vector< std::string > const & | _required_properties | ||
) |
Access properties required for an object to be considered calculated
type_name | string, i.e. traits<Configuration>::name |
calctype | string |
Definition at line 96 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_root_dir | ( | fs::path | root | ) |
Set DirectoryStructure.
Definition at line 74 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_soflags | ( | std::string | opt | ) |
Set shared object options (empty string to use default)
Definition at line 336 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_view_command | ( | std::string | opt | ) |
Set command used by 'casm view'.
Definition at line 373 of file ProjectSettings.cc.
bool CASM::ProjectSettings::set_view_command_video | ( | std::string | opt | ) |
Set video viewing command used by 'casm view'.
Definition at line 378 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::so_options | ( | ) | const |
Combines cxx, soflags, casm_libdir, and boost_libdir to make shared library options string
Definition at line 195 of file ProjectSettings.cc.
std::pair< std::string, std::string > CASM::ProjectSettings::soflags | ( | ) | const |
Get shared object options (pair of value and source for the value)
Definition at line 161 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::view_command | ( | ) | const |
Get current command used by 'casm view'.
Definition at line 201 of file ProjectSettings.cc.
std::string CASM::ProjectSettings::view_command_video | ( | ) | const |
Get current video viewing command used by 'casm view'.
Definition at line 203 of file ProjectSettings.cc.
|
private |
Definition at line 469 of file ProjectSettings.hh.
|
private |
Definition at line 470 of file ProjectSettings.hh.
|
private |
Definition at line 467 of file ProjectSettings.hh.
|
private |
Definition at line 468 of file ProjectSettings.hh.
|
private |
Definition at line 450 of file ProjectSettings.hh.
|
private |
Definition at line 479 of file ProjectSettings.hh.
|
private |
Definition at line 464 of file ProjectSettings.hh.
|
private |
Definition at line 465 of file ProjectSettings.hh.
|
private |
Definition at line 453 of file ProjectSettings.hh.
|
private |
Definition at line 485 of file ProjectSettings.hh.
|
private |
Definition at line 432 of file ProjectSettings.hh.
|
private |
Definition at line 435 of file ProjectSettings.hh.
|
mutableprivate |
Definition at line 445 of file ProjectSettings.hh.
|
private |
Definition at line 482 of file ProjectSettings.hh.
|
private |
Definition at line 457 of file ProjectSettings.hh.
|
private |
Definition at line 456 of file ProjectSettings.hh.
|
private |
Definition at line 429 of file ProjectSettings.hh.
|
private |
Definition at line 442 of file ProjectSettings.hh.
|
private |
Definition at line 439 of file ProjectSettings.hh.
|
private |
Definition at line 461 of file ProjectSettings.hh.
|
private |
Definition at line 466 of file ProjectSettings.hh.
|
private |
Definition at line 473 of file ProjectSettings.hh.
|
private |
Definition at line 476 of file ProjectSettings.hh.