1 #ifndef CASM_ProjectSettings
2 #define CASM_ProjectSettings
18 class EnumeratorHandler;
21 class HamiltonianModules;
178 std::map<CalcTypeName, std::vector<std::string>>>
211 std::vector<std::string>
const &_required_properties);
220 bool has_clex(std::string clex_name)
const;
250 std::pair<std::string, std::string>
cxx()
const;
253 std::pair<std::string, std::string>
cxxflags()
const;
256 std::pair<std::string, std::string>
soflags()
const;
262 std::pair<fs::path, std::string>
casm_libdir()
const;
312 typedef std::map<ObjectTypeName, std::map<QueryAliasName, QueryAliasValue>>
338 std::string alias_value);
340 template <
typename DataObject>
343 template <
typename DataObject>
438 std::map<std::string, notstd::cloneable_ptr<notstd::Cloneable>>
450 std::map<std::string, ClexDescription>
m_clex;
464 std::pair<std::string, std::string>
m_cxx;
503 template <
typename T>
523 fs::path project_settings_path);
Specification of CASM project directory structure.
void set_query_alias(query_alias_map_type const &_query_alias)
notstd::cloneable_ptr< Eigen::Matrix3l > m_nlist_weight_matrix
std::pair< fs::path, std::string > boost_includedir() const
Get boost includedir (pair of value and source for the value)
double lin_alg_tol() const
Get current project linear algebra tolerance.
ClexDescription const & clex(std::string clex_name) const
Get a ClexDescription by name.
notstd::cloneable_ptr< std::set< int > > m_nlist_sublat_indices
std::pair< std::string, std::string > m_soflags
std::string view_command() const
Get current command used by 'casm view'.
bool set_crystallography_tol(double _tol)
Set crystallography tolerance.
bool set_view_command(std::string opt)
Set command used by 'casm view'.
bool has_dir() const
Check if DirectoryStructure exists.
std::pair< fs::path, std::string > casm_libdir() const
Get casm libdir (pair of value and source for the value)
bool insert_clex(ClexDescription const &desc)
notstd::cloneable_ptr< notstd::Cloneable > m_hamiltonian_modules
Eigen::Matrix3l nlist_weight_matrix() const
Get neighbor list weight matrix.
bool set_nlist_sublat_indices(std::set< int > value)
std::map< std::string, ClexDescription > const & cluster_expansions() const
Const access map of all ClexDescription.
notstd::cloneable_ptr< DirectoryStructure > m_dir
bool set_cxxflags(std::string opt)
Set c++ compiler options (empty string to use default)
std::map< std::string, notstd::cloneable_ptr< notstd::Cloneable > > m_query_handler
std::string default_clex_name() const
Get default ClexDescription name.
bool set_boost_libdir(fs::path dir)
Set boost libdir (empty string to use default)
bool has_m_nlist_weight_matrix() const
Check if neighbor list weight matrix exists.
std::string global_clexulator_name() const
Name to use for clexulator printing.
required_properties_map_type m_required_properties
double m_crystallography_tol
DirectoryStructure const & dir() const
Access DirectoryStructure object. Throw if not set.
EnumeratorHandler & enumerator_handler()
std::pair< std::string, std::string > m_cxx
std::string compile_options() const
std::string QueryAliasName
bool set_boost_prefix(fs::path dir)
Set boost prefix (empty string to use default)
HamiltonianModules & hamiltonian_modules()
query_alias_map_type const & query_alias() const
bool set_nlist_weight_matrix(Eigen::Matrix3l M)
std::pair< fs::path, std::string > casm_includedir() const
Get casm includedir (pair of value and source for the value)
std::string m_view_command_video
notstd::cloneable_ptr< notstd::Cloneable > m_enumerator_handler
bool set_default_clex_name(std::string const &clex_name)
Set default ClexDescription by name.
std::string m_default_clex_name
std::pair< fs::path, std::string > boost_libdir() const
Get boost libdir (pair of value and source for the value)
query_alias_map_type m_query_alias
bool set_casm_includedir(fs::path dir)
Set casm includedir (empty string to use default)
std::string m_default_database_name
std::map< ObjectTypeName, std::map< QueryAliasName, QueryAliasValue > > query_alias_map_type
std::map< ObjectTypeName, std::map< CalcTypeName, std::vector< std::string > > > required_properties_map_type
std::pair< fs::path, std::string > m_boost_includedir
std::string m_view_command
std::string project_name() const
Get project name.
std::map< std::string, ClexDescription > m_clex
std::pair< fs::path, std::string > m_boost_libdir
std::string m_project_name
bool set_casm_prefix(fs::path dir)
Set casm prefix (empty string to use default)
std::string ObjectTypeName
bool has_clex(std::string clex_name) const
Check if a ClexDescription exists.
ClexDescription const & default_clex() const
Get default ClexDescription.
fs::path root_dir() const
Access dir().root_dir(). Throw if not set.
QueryHandler< DataObject > & query_handler()
std::pair< std::string, std::string > soflags() const
Get shared object options (pair of value and source for the value)
std::pair< std::string, std::string > m_cxxflags
required_properties_map_type const & required_properties() const
bool has_nlist_sublat_indices() const
Check if set of sublattice indices to include in neighbor lists exists.
bool set_view_command_video(std::string opt)
Set video viewing command used by 'casm view'.
std::string QueryAliasValue
std::pair< fs::path, std::string > m_casm_includedir
bool set_lin_alg_tol(double _tol)
Set linear algebra tolerance.
std::string so_options() const
std::set< int > const & nlist_sublat_indices() const
Get set of sublattice indices to include in neighbor lists.
std::pair< std::string, std::string > cxx() const
Get c++ compiler (pair of value and source for the value)
bool set_default_clex(ClexDescription const &desc)
double crystallography_tol() const
Get current project crystallography tolerance.
bool set_soflags(std::string opt)
Set shared object options (empty string to use default)
void set_default_database_name(std::string _default_database_name)
Set default database type name (for future)
std::pair< fs::path, std::string > m_casm_libdir
void set_required_properties(required_properties_map_type const &_required_properties)
bool erase_clex(ClexDescription const &desc)
bool set_casm_libdir(fs::path dir)
Set casm libdir (empty string to use default)
bool set_boost_includedir(fs::path dir)
Set boost includedir (empty string to use default)
bool set_cxx(std::string opt)
Set c++ compiler (empty string to use default)
bool set_root_dir(fs::path root)
Set DirectoryStructure.
std::pair< std::string, std::string > cxxflags() const
Get c++ compiler options (pair of value and source for the value)
ProjectSettings(std::string project_name)
std::string view_command_video() const
Get current video viewing command used by 'casm view'.
std::string default_database_name() const
Get default database type name.
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
void commit(ProjectSettings const &set)
ProjectSettings open_project_settings(fs::path path_in_project)
void print_summary(ProjectSettings const &set, Log &log)
Print summary of ProjectSettings, as for 'casm settings -l'.
bool is_valid_project_name(std::string project_name)
bool create_all_directories(ProjectSettings const &set)
void throw_if_project_name_is_not_valid(std::string project_name)
Throw if project name is invalid.
void print_compiler_settings_summary(ProjectSettings const &set, Log &log)
Print summary of compiler settings, as for 'casm settings -l'.
void write_project_settings(ProjectSettings const &set, fs::path project_settings_path)
ProjectSettings read_project_settings(fs::path project_settings_path)
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
Matrix< long int, 3, 3 > Matrix3l
Specifies a particular cluster expansion.
Helper struct for constructing objects that need additional data.
static ReturnType from_json(const jsonParser &json)
Default from_json is equivalent to.