1 #ifndef CASM_ProjectSettings
2 #define CASM_ProjectSettings
22 template <
bool IsConst>
60 std::string _property,
61 std::string _calctype,
67 void print(std::ostream &sout,
bool is_default,
int indent = 0)
const;
114 std::string
name()
const;
121 const std::vector<std::string> &
properties()
const;
126 bool has_clex(std::string name)
const;
148 std::pair<std::string, std::string>
cxx()
const;
151 std::pair<std::string, std::string>
cxxflags()
const;
154 std::pair<std::string, std::string>
soflags()
const;
160 std::pair<fs::path, std::string>
casm_libdir()
const;
199 template<
typename DataObject>
213 template<
typename DataObject>
269 template<
typename SublatIterator>
352 std::map<std::string, ClexDescription>
m_clex;
365 std::pair<std::string, std::string>
m_cxx;
394 template<
typename SublatIterator>
Specifies a particular cluster expansion.
void commit() const
Save settings to project settings file.
Eigen::Matrix3l m_nlist_weight_matrix
std::pair< std::string, std::string > cxxflags() const
Get c++ compiler options.
double m_crystallography_tol
void from_json(ClexDescription &desc, const jsonParser &json)
bool new_supercell_calc_settings_dir(std::string scelname, std::string calctype) const
Add calculation settings directory path, for supercell specific settings.
Eigen::Matrix3l nlist_weight_matrix() const
Get neighbor list weight matrix.
bool set_casm_prefix(fs::path dir)
Set casm prefix (empty string to use default)
std::pair< fs::path, std::string > boost_includedir() const
Get boost includedir.
Specification of CASM project directory structure.
void print_compiler_settings_summary(Log &log) const
Print summary of compiler settings, as for 'casm settings -l'.
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
std::string m_depr_compile_options
std::pair< std::string, std::string > m_cxx
void _reset_clexulators()
Changing the neighbor list properties requires updating Clexulator source code.
ClexDescription(std::string _name, std::string _property, std::string _calctype, std::string _ref, std::string _bset, std::string _eci)
bool operator<(const ClexDescription &A, const ClexDescription &B)
Compare using name strings: A.name < B.name.
std::string so_options() const
Get current shared library options string.
bool set_default_clex(const std::string &clex_name)
const std::set< int > & nlist_sublat_indices() const
Get set of sublattice indices to include in neighbor lists.
bool new_eci_dir(std::string clex, std::string calctype, std::string ref, std::string bset, std::string eci) const
Add an eci directory.
std::pair< fs::path, std::string > m_boost_includedir
void print_summary(Log &log) const
Print summary of ProjectSettings, as for 'casm settings -l'.
bool new_casm_dir() const
Create new project data directory.
bool new_ref_dir(std::string calctype, std::string ref) const
Add a ref directory.
bool set_view_command(std::string opt)
Set command used by 'casm view'.
std::vector< std::string > m_properties
bool set_cxx(std::string opt)
Set c++ compiler (empty string to use default)
bool clex_exists(const DirectoryStructure &dir, const ClexDescription &desc)
std::map< std::string, ClexDescription > m_clex
std::string name() const
Get project name.
bool set_crystallography_tol(double _tol)
Set crystallography tolerance.
EnumeratorHandler & enumerator_handler()
const std::vector< std::string > & properties() const
Get current properties.
const ClexDescription & clex(std::string name) const
Logging(Log &log=default_log(), Log &debug_log=default_log(), Log &err_log=default_err_log())
notstd::cloneable_ptr< EnumeratorHandler > m_enumerator_handler
std::pair< fs::path, std::string > m_casm_includedir
Read/modify settings of an already existing CASM project.
std::string m_view_command
bool set_compile_options(std::string opt)
(deprecated) Set compile options to 'opt' (empty string to use default)
std::pair< fs::path, std::string > m_casm_libdir
QueryHandler< DataObject > & query_handler()
std::pair< fs::path, std::string > casm_libdir() const
Get casm libdir.
std::set< int > m_nlist_sublat_indices
std::pair< fs::path, std::string > casm_includedir() const
Get casm includedir.
bool set_boost_prefix(fs::path dir)
Set boost prefix (empty string to use default)
std::map< std::string, notstd::cloneable_ptr< notstd::Cloneable > > m_query_handler
bool set_boost_libdir(fs::path dir)
Set boost libdir (empty string to use default)
bool new_symmetry_dir() const
Create new symmetry directory.
bool has_clex(std::string name) const
bool new_configuration_calc_settings_dir(std::string configname, std::string calctype) const
Add calculation settings directory path, for configuration specific settings.
std::string compile_options() const
Get current compilation options string.
bool set_so_options(std::string opt)
(deprecated) Set shared library options to 'opt' (empty string to use default)
bool new_bset_dir(std::string bset) const
Add a basis set directory.
ProjectSettings()
Default constructor.
bool set_casm_libdir(fs::path dir)
Set casm libdir (empty string to use default)
bool new_clex_dir(std::string clex) const
Add a cluster expansion directory.
std::pair< std::string, std::string > m_cxxflags
bool set_soflags(std::string opt)
Set shared object options (empty string to use default)
std::string clexulator() const
jsonParser & to_json(jsonParser &json) const
Output as JSON.
const std::map< std::string, ClexDescription > & cluster_expansions() const
ConfigIO::GenericConfigFormatter< std::string > configname()
Constructs DataFormmaterDictionary containing all Configuration DatumFormatters.
bool set_lin_alg_tol(double _tol)
Set linear algebra tolerance.
bool set_casm_includedir(fs::path dir)
Set casm includedir (empty string to use default)
double crystallography_tol() const
Get current project crystallography tolerance.
bool new_calc_settings_dir(std::string calctype) const
Add calculation settings directory path.
bool erase_clex(const ClexDescription &desc)
ConfigSelection< true > ConstConfigSelection
bool set_nlist_sublat_indices(SublatIterator begin, SublatIterator end)
Set range of sublattice indices to include in neighbor lists (will delete existing Clexulator source ...
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
std::pair< fs::path, std::string > boost_libdir() const
Get boost libdir.
std::pair< std::string, std::string > m_soflags
Matrix< long int, 3, 3 > Matrix3l
void _load_default_options()
initialize default compiler options
std::string m_default_clex
std::pair< fs::path, std::string > m_boost_libdir
bool new_clex(const ClexDescription &desc)
std::string view_command() const
Get current command used by 'casm view'.
ConfigIO::GenericConfigFormatter< std::string > scelname()
void print(std::ostream &sout, bool is_default, int indent=0) const
std::string m_depr_so_options
std::pair< std::string, std::string > soflags() const
Get shared object options.
std::pair< std::string, std::string > cxx() const
Get c++ compiler.
const ClexDescription & default_clex() const
const DirectoryStructure & dir() const
bool set_boost_includedir(fs::path dir)
Set boost includedir (empty string to use default)
const EnumeratorHandler & enumerator_handler() const
bool set_cxxflags(std::string opt)
Set c++ compiler options (empty string to use default)
bool set_nlist_weight_matrix(Eigen::Matrix3l M)
Set neighbor list weight matrix (will delete existing Clexulator source and compiled code) ...
Returns true if configuration is specified in given selection (default: MASTER)
const QueryHandler< DataObject > & query_handler() const
double lin_alg_tol() const
Get current project linear algebra tolerance.