1 #ifndef CASM_ConfigIsEquivalent
2 #define CASM_ConfigIsEquivalent
28 std::set<std::string>
const &_which_dofs = {
"all"})
30 bool all_dofs =
false;
31 if (_which_dofs.count(
"all")) {
35 for (
auto const &dof :
config().configdof().global_dofs()) {
36 if (all_dofs || _which_dofs.count(dof.first)) {
38 notstd::make_cloneable<ConfigDoFIsEquivalent::Global>(
39 _config, dof.first, _tol));
43 if (all_dofs || _which_dofs.count(
"occ")) {
44 if (
config().supercell().sym_info().has_aniso_occs())
46 notstd::make_cloneable<ConfigDoFIsEquivalent::AnisoOccupation>(
48 else if (
config().supercell().sym_info().has_occupation_dofs())
50 notstd::make_cloneable<ConfigDoFIsEquivalent::Occupation>(
54 for (
auto const &dof :
config().configdof().local_dofs()) {
55 if (all_dofs || _which_dofs.count(dof.first)) {
57 notstd::make_cloneable<ConfigDoFIsEquivalent::Local>(
58 _config, dof.first, _tol));
64 std::set<std::string>
const &_which_dofs = {
"all"})
Class for comparison of Configurations (with the same Supercell)
bool operator()(const PermuteIterator &A) const
Check if config == A*config, store config < A*config.
std::vector< EquivPtr > m_local_equivs
bool is_less() const
Returns less than comparison.
const Configuration * m_config
bool operator()(const PermuteIterator &A, const PermuteIterator &B) const
Check if A*config == B*config, store A*config < B*config.
bool operator()(const PermuteIterator &A, const Configuration &other) const
Check if config == A*other, store config < A*other.
ConfigIsEquivalent(const Configuration &_config, std::set< std::string > const &_which_dofs={"all"})
bool operator()(const PermuteIterator &A, const PermuteIterator &B, const Configuration &other) const
Check if A*config == B*other, store A*config < B*other.
std::vector< EquivPtr > const & global_equivs() const
std::vector< EquivPtr > const & local_equivs() const
const Configuration & config() const
bool operator()(const Configuration &other) const
Check if config == other, store config < other.
std::vector< EquivPtr > m_global_equivs
ConfigIsEquivalent(const Configuration &_config, double _tol, std::set< std::string > const &_which_dofs={"all"})
const ConfigDoF & configdof() const
const Access the DoF
const Supercell & supercell() const
Get the Supercell for this Configuration.
Index factor_group_index() const
Return the supercell factor group index.
A 'cloneable_ptr' can be used in place of 'unique_ptr'.