CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <Configuration.hh>
Configuration, a periodic perturbation of the infinite crystal within the DoF space of the prim
A Configuration represents a particular periodic perturbation of the infinite crystal within the space of allowed perturbations defined by the BasicStructure. Configuration has:
Definition at line 74 of file Configuration.hh.
Public Types | |
typedef Base::MostDerived | MostDerived |
Public Member Functions | |
Configuration (std::shared_ptr< Supercell const > const &_supercell_ptr) | |
Configuration (std::shared_ptr< Supercell const > const &_supercell_ptr, ConfigDoF const &_dof) | |
Configuration (Supercell const &_supercell) | |
Construct a default Configuration. More... | |
Configuration (const Supercell &_supercell, const ConfigDoF &_dof) | |
Construct a default Configuration. More... | |
const Supercell & | supercell () const |
Get the Supercell for this Configuration. More... | |
const Lattice & | ideal_lattice () const |
Index | size () const |
Returns number of sites, NOT the number of primitives that fit in here. More... | |
UnitCellCoord | uccoord (Index site_l) const |
Get the UnitCellCoord for a given linear site index. More... | |
Index | linear_index (const UnitCellCoord &bijk) const |
Return the linear index corresponding to integral coordinates. More... | |
int | sublat (Index site_l) const |
Get the basis site index for a given linear linear site index. More... | |
const ConfigDoF & | configdof () const |
const Access the DoF More... | |
ConfigDoF & | configdof () |
Access the DoF. More... | |
void | clear () |
Clear all DoF. More... | |
void | init_occupation () |
Set occupant variables to background structure. More... | |
void | set_occupation (Eigen::Ref< const Eigen::VectorXi > const &_occupation) |
Set occupant variables. More... | |
Eigen::VectorXi const & | occupation () const |
Occupant variables. More... | |
void | set_occ (Index site_l, int val) |
Set occupant variable on site l. More... | |
const int & | occ (Index site_l) const |
Occupant variable on site l. More... | |
const Molecule & | mol (Index site_l) const |
Molecule on site l. More... | |
bool | has_occupation () const |
True if Configuration has occupation DoF. More... | |
bool | operator< (const Configuration &B) const |
Clear occupation. More... | |
ConfigCompare | less () const |
ConfigIsEquivalent | equal_to () const |
bool | is_primitive () const |
Check if this is a primitive Configuration. More... | |
PermuteIterator | find_translation () const |
Returns a PermuteIterator corresponding to the first non-zero pure translation that maps the Configuration onto itself. More... | |
Configuration | primitive () const |
Return the primitive Configuration. More... | |
Configuration | in_canonical_supercell () const |
Returns the canonical form Configuration in the canonical Supercell. More... | |
std::vector< PermuteIterator > | factor_group () const |
Returns the subgroup of the Supercell factor group that leaves the Configuration unchanged. More... | |
std::vector< PermuteIterator > | invariant_subgroup () const |
Returns the subgroup of the Supercell factor group that leaves the Configuration unchanged. More... | |
bool | is_canonical () const |
int | multiplicity () const |
Get symmetric multiplicity, excluding translations. More... | |
std::vector< PermuteIterator > | point_group () const |
Returns the point group that leaves the Configuration unchanged. More... | |
std::string | point_group_name () const |
Returns the point group that leaves the Configuration unchanged. More... | |
Configuration & | apply_sym (const PermuteIterator &it) |
Transform Configuration from PermuteIterator via *this = permute_iterator * *this. More... | |
std::vector< Eigen::VectorXd > | sublattice_composition () const |
std::vector< Eigen::VectorXi > | sublat_num_each_molecule () const |
Eigen::VectorXd | composition () const |
Eigen::VectorXd | true_composition () const |
Eigen::VectorXi | num_each_molecule () const |
Eigen::VectorXd | param_composition () const |
Returns parametric composition, as calculated using PrimClex::param_comp. More... | |
Eigen::VectorXd | num_each_component () const |
ConfigInsertResult | insert (bool primitive_only=false) const |
Insert this configuration (in primitive & canonical form) in the database. More... | |
std::vector< PermuteIterator > | invariant_subgroup () const |
Gives the subgroup of the supercell that leaves this configuration unchanged. More... | |
template<typename PermuteIteratorIt > | |
std::vector< PermuteIterator > | invariant_subgroup (PermuteIteratorIt begin, PermuteIteratorIt end) const |
Gives the subgroup of the supercell that leaves this configuration unchanged. More... | |
bool | is_canonical () const |
Determines if this Configuration is in canonical form. More... | |
template<typename PermuteIteratorIt > | |
bool | is_canonical (PermuteIteratorIt begin, PermuteIteratorIt end) const |
Determines if this Configuration is in canonical form. More... | |
bool | is_sym_equivalent (const MostDerived &B) const |
True if this and B have same canonical form. More... | |
template<typename PermuteIteratorIt > | |
bool | is_sym_equivalent (const MostDerived &B, PermuteIteratorIt begin, PermuteIteratorIt end) const |
True if this and B have same canonical form. More... | |
template<typename ConfigIterator > | |
ConfigIterator | find_sym_equivalent (const MostDerived &B, ConfigIterator obj_begin, ConfigIterator obj_end) const |
Find Config that has same canonical form. More... | |
template<typename ConfigIterator , typename PermuteIteratorIt > | |
ConfigIterator | find_sym_equivalent (ConfigIterator obj_begin, ConfigIterator obj_end, PermuteIteratorIt begin, PermuteIteratorIt end) const |
True if this and B have same canonical form. More... | |
template<typename PermuteIteratorIt > | |
bool | is_canonical (PermuteIteratorIt begin, PermuteIteratorIt end) const |
MostDerived | canonical_form () const |
template<typename PermuteIteratorIt > | |
MostDerived | canonical_form (PermuteIteratorIt begin, PermuteIteratorIt end) const |
PermuteIterator | to_canonical () const |
template<typename PermuteIteratorIt > | |
PermuteIterator | to_canonical (PermuteIteratorIt begin, PermuteIteratorIt end) const |
PermuteIterator | from_canonical () const |
template<typename PermuteIteratorIt > | |
PermuteIterator | from_canonical (PermuteIteratorIt begin, PermuteIteratorIt end) const |
template<typename PermuteIteratorIt > | |
std::vector< PermuteIterator > | invariant_subgroup (PermuteIteratorIt begin, PermuteIteratorIt end) const |
Static Public Member Functions | |
static Configuration | zeros (const std::shared_ptr< Supercell const > &_supercell_ptr) |
static Configuration | zeros (const std::shared_ptr< Supercell const > &_supercell_ptr, double _tol) |
static Configuration | zeros (Supercell const &_scel) |
static Configuration | zeros (Supercell const &_scel, double _tol) |
static std::pair< std::string, std::string > | split_name (std::string configname) |
Split configuration name string into scelname and config id. More... | |
Private Member Functions | |
std::string | generate_name_impl () const |
Returns a Configuration name. More... | |
bool | eq_impl (const Configuration &B) const |
operator== comparison of Configuration, via ConfigEqual More... | |
Private Attributes | |
Supercell const * | m_supercell |
Pointer to the Supercell for this Configuration. More... | |
std::shared_ptr< Supercell const > | m_supercell_ptr |
Used when constructing temporary Configuration in non-canonical Supercell. More... | |
ConfigDoF | m_configdof |
Degrees of Freedom. More... | |
Friends | |
struct | Comparisons< Calculable< CRTPBase< Configuration > > > |
class | DB::Named< CRTPBase< Configuration > > |
|
inherited |
Definition at line 138 of file HasCanonicalForm.hh.
|
explicit |
Construct a default Configuration, with a shared Supercell
Note:
Definition at line 53 of file Configuration.cc.
|
explicit |
Construct a default Configuration, with a shared Supercell
Note:
Definition at line 59 of file Configuration.cc.
|
explicit |
Construct a default Configuration.
Construct a default Configuration, with a pointer to a Supercell and
Note:
Definition at line 79 of file Configuration.cc.
|
explicit |
Construct a default Configuration.
Construct a default Configuration
Note:
Definition at line 84 of file Configuration.cc.
Configuration & CASM::Configuration::apply_sym | ( | const PermuteIterator & | it | ) |
Transform Configuration from PermuteIterator via *this = permute_iterator * *this.
Definition at line 433 of file Configuration.cc.
|
inherited |
Definition at line 217 of file HasCanonicalForm_impl.hh.
|
inherited |
Definition at line 272 of file HasCanonicalForm_impl.hh.
void CASM::Configuration::clear | ( | ) |
Clear all DoF.
Eigen::VectorXd CASM::Configuration::composition | ( | ) | const |
Returns composition, not counting vacancies composition[ molecule_type ]: molecule_type ordered as prim structure's xtal::struc_molecule_name(), with [Va]=0.0
get the total number of non-vacancy atoms
Definition at line 491 of file Configuration.cc.
|
inline |
Access the DoF.
Definition at line 185 of file Configuration.hh.
|
inline |
const Access the DoF
Definition at line 180 of file Configuration.hh.
|
private |
operator== comparison of Configuration, via ConfigEqual
Definition at line 592 of file Configuration.cc.
ConfigIsEquivalent CASM::Configuration::equal_to | ( | ) | const |
Definition at line 571 of file Configuration.cc.
std::vector< PermuteIterator > CASM::Configuration::factor_group | ( | ) | const |
Returns the subgroup of the Supercell factor group that leaves the Configuration unchanged.
Definition at line 212 of file Configuration.cc.
|
inherited |
True if this and B have same canonical form.
Definition at line 259 of file HasCanonicalForm_impl.hh.
|
inherited |
Find Config that has same canonical form.
Definition at line 199 of file HasCanonicalForm_impl.hh.
PermuteIterator CASM::Configuration::find_translation | ( | ) | const |
Returns a PermuteIterator corresponding to the first non-zero pure translation that maps the Configuration onto itself.
Definition at line 126 of file Configuration.cc.
|
inherited |
Definition at line 229 of file HasCanonicalForm_impl.hh.
|
inherited |
Definition at line 286 of file HasCanonicalForm_impl.hh.
|
private |
Returns a Configuration name.
For configurations in supercells equivalent to the canonical supercell: For canonical configurations:
$CANON_SCELNAME/$CONFIG_INDEX
$CANON_CONFIG_NAME.equiv.$FG_PERM.$TRANS_PERM
$SCEL_NAME/super.$PRIM_FG_OP2.
$NONCANON_CONFIG_NAME`CANON_SCEL_NAME.$PRIM_FG_OP1
if 'id' is known
Definition at line 338 of file Configuration.cc.
|
inline |
True if Configuration has occupation DoF.
Definition at line 274 of file Configuration.hh.
const Lattice & CASM::Configuration::ideal_lattice | ( | ) | const |
Definition at line 266 of file Configuration.cc.
Configuration CASM::Configuration::in_canonical_supercell | ( | ) | const |
Returns the canonical form Configuration in the canonical Supercell.
in_canonical_supercell
directly Definition at line 179 of file Configuration.cc.
void CASM::Configuration::init_occupation | ( | ) |
Set occupant variables to background structure.
Definition at line 101 of file Configuration.cc.
ConfigInsertResult CASM::Configuration::insert | ( | bool | primitive_only = false | ) | const |
Insert this configuration (in primitive & canonical form) in the database.
primitive_only | If true, only the primitive Configuration is inserted. |
DB::make_canonical_and_insert
directly Definition at line 197 of file Configuration.cc.
std::vector< PermuteIterator > CASM::ConfigCanonicalForm< Base >::invariant_subgroup |
Gives the subgroup of the supercell that leaves this configuration unchanged.
Definition at line 158 of file HasCanonicalForm_impl.hh.
std::vector< PermuteIterator > CASM::Configuration::invariant_subgroup | ( | ) | const |
Returns the subgroup of the Supercell factor group that leaves the Configuration unchanged.
Definition at line 218 of file Configuration.cc.
std::vector< PermuteIterator > CASM::ConfigCanonicalForm< Base >::invariant_subgroup | ( | typename PermuteIteratorIt | ) |
Gives the subgroup of the supercell that leaves this configuration unchanged.
Definition at line 188 of file HasCanonicalForm_impl.hh.
|
inherited |
Definition at line 315 of file HasCanonicalForm_impl.hh.
bool CASM::ConfigCanonicalForm< Base >::is_canonical |
Determines if this Configuration is in canonical form.
Definition at line 150 of file HasCanonicalForm_impl.hh.
bool CASM::Configuration::is_canonical | ( | ) | const |
Definition at line 230 of file Configuration.cc.
bool CASM::ConfigCanonicalForm< Base >::is_canonical | ( | typename PermuteIteratorIt | ) |
Determines if this Configuration is in canonical form.
Definition at line 173 of file HasCanonicalForm_impl.hh.
|
inherited |
Definition at line 243 of file HasCanonicalForm_impl.hh.
bool CASM::Configuration::is_primitive | ( | ) | const |
Check if this is a primitive Configuration.
Definition at line 112 of file Configuration.cc.
|
inherited |
True if this and B have same canonical form.
Definition at line 193 of file HasCanonicalForm_impl.hh.
|
inherited |
True if this and B have same canonical form.
Definition at line 251 of file HasCanonicalForm_impl.hh.
ConfigCompare CASM::Configuration::less | ( | ) | const |
Definition at line 569 of file Configuration.cc.
Index CASM::Configuration::linear_index | ( | const UnitCellCoord & | bijk | ) | const |
Return the linear index corresponding to integral coordinates.
Definition at line 408 of file Configuration.cc.
Molecule on site l.
Equivalent to:
Definition at line 416 of file Configuration.cc.
int CASM::Configuration::multiplicity | ( | ) | const |
Get symmetric multiplicity, excluding translations.
Definition at line 423 of file Configuration.cc.
Eigen::VectorXd CASM::Configuration::num_each_component | ( | ) | const |
Returns num_each_component[ component_type] per prim cell, where 'component_type' is ordered as ParamComposition::components
Definition at line 541 of file Configuration.cc.
Eigen::VectorXi CASM::Configuration::num_each_molecule | ( | ) | const |
Returns num_each_molecule[ molecule_type], where 'molecule_type' is ordered as Structure::get_struc_molecule()
Returns num_each_molecule[ molecule_type], where 'molecule_type' is ordered as Structure::xtal::struc_molecule_name()
Definition at line 524 of file Configuration.cc.
|
inline |
Occupant variable on site l.
The occupant on site l can be obtained from the occupation variable using:
Definition at line 262 of file Configuration.hh.
|
inline |
Occupant variables.
With one value for each site in the Configuration, this std::vector describes which occupant is at each of the 'N' sites of the configuration. The occupant on site l can be obtained from the occupation variable using:
Definition at line 236 of file Configuration.hh.
bool CASM::Configuration::operator< | ( | const Configuration & | B | ) | const |
Clear occupation.
Compare Configuration, via ConfigCompare
Definition at line 565 of file Configuration.cc.
Eigen::VectorXd CASM::Configuration::param_composition | ( | ) | const |
Returns parametric composition, as calculated using PrimClex::param_comp.
Definition at line 529 of file Configuration.cc.
std::vector< PermuteIterator > CASM::Configuration::point_group | ( | ) | const |
Returns the point group that leaves the Configuration unchanged.
Definition at line 240 of file Configuration.cc.
std::string CASM::Configuration::point_group_name | ( | ) | const |
Returns the point group that leaves the Configuration unchanged.
Definition at line 253 of file Configuration.cc.
Configuration CASM::Configuration::primitive | ( | ) | const |
Return the primitive Configuration.
Return a primitive Configuration.
Definition at line 141 of file Configuration.cc.
void CASM::Configuration::set_occ | ( | Index | site_l, |
int | val | ||
) |
Set occupant variable on site l.
The occupant on site l can be obtained from the occupation variable using:
Definition at line 106 of file Configuration.cc.
|
inline |
Set occupant variables.
With one value for each site in the Configuration, this std::vector describes which occupant is at each of the 'N' sites of the configuration. The occupant on site l can be obtained from the occupation variable using:
If |
Definition at line 220 of file Configuration.hh.
Index CASM::Configuration::size | ( | ) | const |
Returns number of sites, NOT the number of primitives that fit in here.
Definition at line 400 of file Configuration.cc.
|
static |
Split configuration name string into scelname and config id.
Definition at line 575 of file Configuration.cc.
int CASM::Configuration::sublat | ( | Index | site_l | ) | const |
Get the basis site index for a given linear linear site index.
Definition at line 412 of file Configuration.cc.
std::vector< Eigen::VectorXi > CASM::Configuration::sublat_num_each_molecule | ( | ) | const |
Returns number of each molecule by sublattice: sublat_num_each_molecule[ prim basis site / sublattice ][ molecule_type] molucule_type is ordered as in the Prim structure's site_occupant list for that basis site
Definition at line 470 of file Configuration.cc.
std::vector< Eigen::VectorXd > CASM::Configuration::sublattice_composition | ( | ) | const |
Returns composition on each sublattice: sublat_comp[ prim basis site / sublattice][ molecule_type] molucule_type is ordered as in the Prim structure's site_occupant list for that basis site (includes vacancies)
Definition at line 447 of file Configuration.cc.
const Supercell & CASM::Configuration::supercell | ( | ) | const |
Get the Supercell for this Configuration.
Definition at line 402 of file Configuration.cc.
|
inherited |
Definition at line 223 of file HasCanonicalForm_impl.hh.
|
inherited |
Definition at line 279 of file HasCanonicalForm_impl.hh.
Eigen::VectorXd CASM::Configuration::true_composition | ( | ) | const |
Returns composition, including vacancies composition[ molecule_type ]: molecule_type ordered as prim structure's xtal::struc_molecule_name()
Definition at line 518 of file Configuration.cc.
UnitCellCoord CASM::Configuration::uccoord | ( | Index | site_l | ) | const |
Get the UnitCellCoord for a given linear site index.
Definition at line 404 of file Configuration.cc.
|
static |
Build a Configuration sized to _supercell with all fields initialized and set to zero
Definition at line 66 of file Configuration.cc.
|
static |
Build a Configuration sized to _supercell with all fields initialized and set to zero
Definition at line 71 of file Configuration.cc.
|
static |
Build a Configuration sized to _scel with all fields initialized and set to zero
Note:
Definition at line 88 of file Configuration.cc.
|
static |
Build a Configuration sized to _scel with all fields initialized and set to zero
Note:
Definition at line 92 of file Configuration.cc.
|
friend |
Definition at line 384 of file Configuration.hh.
|
friend |
Definition at line 384 of file Configuration.hh.
|
private |
Degrees of Freedom.
Definition at line 405 of file Configuration.hh.
|
private |
Pointer to the Supercell for this Configuration.
Definition at line 399 of file Configuration.hh.
|
private |
Used when constructing temporary Configuration in non-canonical Supercell.
Definition at line 402 of file Configuration.hh.