28 template<
typename T,
typename U>
class ConfigIterator;
43 class PrimClex :
public Logging {
98 void refresh(
bool read_settings =
false,
99 bool read_composition =
false,
100 bool read_chem_ref =
false,
101 bool read_configs =
false,
102 bool clear_clex =
false);
107 std::string
name()
const;
264 void print_supercells(std::ostream &stream, std::set<std::string> scel_to_delete = {})
const;
346 mutable std::map<ClexDescription, ECIContainer>
m_eci;
358 std::string class_name,
359 std::ostream &stream,
CompositionConverter m_comp_converter
Clexulator clexulator(const ClexDescription &key) const
bool has_orbitree(const ClexDescription &key) const
const Access to global orbitree
boost::container::stable_vector< Supercell > & get_supercell_list()
Access entire supercell_list.
void set_global_dof_state(const Configuration &config)
int amount_selected() const
Count over the number of configurations that are selected in all supercells.
void set_local_dof_state(const Configuration &curr_config, Index l) const
Specifies a particular cluster expansion.
void write_config_list(std::set< std::string > scel_to_delete={})
fs::path get_config_list_path() const
Return config_list.json file path.
ProjectSettings m_settings
void print_clex_configurations()
void set_local_dof_state(const Configuration &config, Index l)
const ProjectSettings & settings() const
bool has_clexulator(const ClexDescription &key) const
Eigen::MatrixXd shift_vectors() const
private:
Specification of CASM project directory structure.
const DirectoryStructure & dir() const
ConfigIterator< Configuration, PrimClex > config_iterator
fs::path get_path() const
Return casm project directory path.
Structure specifies the lattice and atomic basis of a crystal.
bool has_composition_axes() const
check if CompositionConverter object initialized
void refresh(bool read_settings=false, bool read_composition=false, bool read_chem_ref=false, bool read_configs=false, bool clear_clex=false)
Reload PrimClex data from settings.
void set_composition_axes(const CompositionConverter &_converter)
Sets the composition axes.
std::map< ClexDescription, ECIContainer > m_eci
Represents a supercell of the primitive parent crystal structure.
std::string name() const
Return project name.
config_iterator selected_config_end()
Configuration iterator: end.
config_iterator config_begin()
Configuration iterator: begin.
void generate_supercells(const ScelEnumProps &enum_props)
Use the given CSPECS.
config_iterator config_end()
Configuration iterator: end.
boost::container::stable_vector< Supercell > supercell_list
Contains all the supercells that were involved in the enumeration.
bool has_chemical_reference() const
check if ChemicalReference object initialized
void print_enum_info(std::ostream &stream)
ConfigIterator< const Configuration, const PrimClex > config_const_iterator
bool vacancy_allowed() const
returns true if vacancy are an allowed species
config_const_iterator selected_config_cend() const
const Configuration iterator: end
double crystallography_tol() const
Logging(Log &log=default_log(), Log &debug_log=default_log(), Log &err_log=default_err_log())
Read/modify settings of an already existing CASM project.
config_const_iterator selected_config_cbegin() const
const Configuration iterator: begin
std::map< ClexDescription, SiteOrbitree > m_orbitree
void read_all_scel_props(const std::string &JSON_output)
Call read_config_props on every Supercell.
EigenIndex Index
For long integer indexing:
void read_supercells(std::istream &stream)
config_const_iterator config_cend() const
const Configuration iterator: end
ProjectSettings & settings()
config_iterator selected_config_begin()
Configuration iterator: begin.
const CompositionConverter & composition_axes() const
const Access CompositionConverter object
Index add_canonical_supercell(const Lattice &superlat)
const ChemicalReference & chemical_reference() const
const Access ChemicalReference object
double lin_alg_tol() const
config_const_iterator config_cbegin() const
const Configuration iterator: begin
PrimNeighborList & nlist() const
Access to the primitive neighbor list.
const Configuration & configuration(const std::string &configname) const
access configuration by name (of the form "scellname/[NUMBER]", e.g., ("SCEL1_1_1_1_0_0_0/0") ...
bool has_eci(const ClexDescription &key) const
void print_supercells(std::set< std::string > scel_to_delete={}) const
bool m_has_composition_axes
notstd::cloneable_ptr< ChemicalReference > m_chem_ref
Index add_supercell(const Lattice &superlat)
ConfigIO::GenericConfigFormatter< std::string > configname()
Constructs DataFormmaterDictionary containing all Configuration DatumFormatters.
notstd::cloneable_ptr< PrimNeighborList > m_nlist
Index vacancy_index() const
returns the index of vacancies in composition vectors
Convert between number of species per unit cell and parametric composition.
The PrimNeighborList gives the coordinates of UnitCell that are neighbors of the origin UnitCell...
double crystallography_tol() const
Get current project crystallography tolerance.
const Supercell & get_supercell(Index i) const
const Access supercell by index
void print_clexulator(const Structure &prim, SiteOrbitree &tree, const PrimNeighborList &nlist, std::string class_name, std::ostream &stream, double xtal_tol)
Print clexulator.
PrimClex(const Structure &_prim, const Logging &logging=Logging())
Initial construction of a PrimClex, from a primitive Structure.
A 'cloneable_ptr' can be used in place of 'unique_ptr'.
void read_scel_props(int scel_index, const std::string &JSON_output)
Fill up props of every configuration for a partucluar supercell. This will be deprecated when props d...
DoFManager holds multiple DoFEnvironments, and provides a simple interface for adding and managing Do...
void set_global_dof_state(const Configuration &curr_config) const
Set internal values of each DoFEnvironment.
bool contains_supercell(std::string scellname, Index &index) const
std::map< ClexDescription, Clexulator > m_clexulator
SiteOrbitree make_orbitree(Structure &prim, const jsonParser &json, double _tol)
Make orbitree. For now specifically global.
const SiteOrbitree & orbitree(const ClexDescription &key) const
void _init()
Initialization routines.
Eigen::Matrix3i calc_transf_mat(const Lattice &superlat) const
A Configuration represents the values of all degrees of freedom in a Supercell.
const Structure & get_prim() const
const Access to primitive Structure
const ECIContainer & eci(const ClexDescription &key) const
double lin_alg_tol() const
Get current project linear algebra tolerance.
A sparse container of ECI values and their corresponding orbit indices.