1 #ifndef CASM_StrucMapCalculatorInterface
2 #define CASM_StrucMapCalculatorInterface
5 #include <unordered_set>
17 class SimpleStructure;
21 class StrucMapCalculatorInterface;
23 namespace StrucMapping {
40 SimpleStructure::SpeciesMode::ATOM,
45 if (allowed_species.empty()) {
47 allowed_species.resize(p_info.size());
48 for (
Index i = 0; i < p_info.size(); ++i) {
49 allowed_species[i].push_back(p_info.names[i]);
85 const std::vector<Eigen::MatrixXd> &_sym_invariant_displacement_modes) {
110 bool const &symmetrize_atomic_cost =
false)
const = 0;
117 std::unique_ptr<StrucMapCalculatorInterface>
clone()
const {
118 return std::unique_ptr<StrucMapCalculatorInterface>(this->
_clone());
127 SimpleStructure::SpeciesMode::ATOM,
129 return std::unique_ptr<StrucMapCalculatorInterface>(
130 this->
_quasi_clone(std::move(_parent), _factor_group, _species_mode,
134 template <
typename ExternSymOpVector>
139 SimpleStructure::SpeciesMode::ATOM,
154 if (sp ==
"Va" || sp == (
"VA") || sp ==
"va") {
166 else if ((it->second) > 0)
191 for (
SymOp const &op : _factor_group) {
254 SimpleStructure::SpeciesMode::ATOM,
Representation of a crystal of molecular and/or atomic occupants, and any additional properties....
Info & info(SpeciesMode _mode)
Info of specified context (atomic/molecular)
std::map< std::string, Index > const & _max_n_species() const
maximum allowed number of each species
virtual void finalize(MappingNode &_node, SimpleStructure const &child_struc, bool const &symmetrize_atomic_cost=false) const =0
Calculates final mapping score and sets _node.is_valid.
virtual StrucMapCalculatorInterface * _quasi_clone(SimpleStructure _parent, SymOpVector const &_factor_group={SymOp::identity()}, SimpleStructure::SpeciesMode _species_mode=SimpleStructure::SpeciesMode::ATOM, StrucMapping::AllowedSpecies _allowed_species={}) const =0
Make an exact copy of the calculator (including any initialized members)
void _set_sym_info(SymOpVector const &_factor_group)
Sets point_group and internal_translations by breaking factor group into pure translations and rotati...
StrucMapping::FixedSpecies const & _fixed_species() const
Index max_n_va() const
Return maximum possible number of vacancies in underlying primitive structure.
SymOpVector m_point_group
virtual std::vector< Eigen::Vector3d > translations(MappingNode const &_node, SimpleStructure const &child_struc) const =0
construct list of prospective mapping translations
std::unordered_set< Index > m_va_allowed
StrucMapCalculatorInterface(SimpleStructure _parent, SymOpVector const &_factor_group={SymOp::identity()}, SimpleStructure::SpeciesMode _species_mode=SimpleStructure::SpeciesMode::ATOM, StrucMapping::AllowedSpecies allowed_species={})
SimpleStructure::Info & struc_info(SimpleStructure &_struc) const
StrucMapping::FixedSpecies m_fixed_species
const std::vector< Eigen::MatrixXd > & sym_invariant_displacement_modes() const
SimpleStructure::SpeciesMode m_species_mode
virtual bool populate_cost_mat(MappingNode &_node, SimpleStructure const &child_struc) const =0
std::map< std::string, Index > m_max_n_species
maximum allowed number of each species
virtual StrucMapCalculatorInterface * _clone() const =0
Make an exact copy of the calculator (including any initialized members)
std::vector< Eigen::MatrixXd > m_sym_invariant_displacement_modes
vector of symmetry invariant displacement modes in the parent structure
void set_sym_invariant_displacement_modes(const std::vector< Eigen::MatrixXd > &_sym_invariant_displacement_modes)
Sets the sym_invariant_modes.
std::unique_ptr< StrucMapCalculatorInterface > clone() const
Make an exact copy of the calculator (including any initialized members)
SimpleStructure const & parent() const
std::vector< Eigen::Vector3d > m_internal_translations
bool _sublat_allows_va(Index b) const
StrucMapping::AllowedSpecies m_allowed_species
void _set_allowed_species(StrucMapping::AllowedSpecies allowed_species)
StrucMapping::AllowedSpecies const & _allowed_species() const
std::unique_ptr< StrucMapCalculatorInterface > quasi_clone(SimpleStructure _parent, ExternSymOpVector const &_factor_group={SymOp::identity()}, SimpleStructure::SpeciesMode _species_mode=SimpleStructure::SpeciesMode::ATOM, StrucMapping::AllowedSpecies _allowed_species={}) const
SimpleStructure::Info const & struc_info(SimpleStructure const &_struc) const
std::unique_ptr< StrucMapCalculatorInterface > quasi_clone(SimpleStructure _parent, SymOpVector const &_factor_group={SymOp::identity()}, SimpleStructure::SpeciesMode _species_mode=SimpleStructure::SpeciesMode::ATOM, StrucMapping::AllowedSpecies _allowed_species={}) const
Make an exact copy of the calculator (including any initialized members)
SymOpVector const & point_group() const
List of point group operations that map parent onto itself (neglecting internal translation)
std::vector< Eigen::Vector3d > const & internal_translations() const
List of internal translations that map parent onto itself.
StrucMapping::FixedSpecies const & fixed_species() const
virtual ~StrucMapCalculatorInterface()
double xtal_tol() const
Crystallographic tolerance, for now just return CASM::TOL.
virtual SimpleStructure resolve_setting(MappingNode const &_node, SimpleStructure const &_child_struc) const =0
Creates copy of _child_struc by applying isometry, lattice transformation, translation,...
std::unordered_set< Index > const & va_allowed() const
std::map< std::string, Index > FixedSpecies
std::vector< std::vector< std::string > > AllowedSpecies
Eigen::Vector3d const & get_translation(MappingNode const &_node)
External accessor for translation, to provide xtal::SymOp adaptability.
bool get_time_reversal(MappingNode const &_node)
External accessor for time_reversal, to provide xtal::SymOp adaptability.
Eigen::Matrix3d const & get_matrix(MappingNode const &_node)
External accessor for isometry, to provide xtal::SymOp adaptability.
std::vector< SymOp > SymOpVector
bool almost_equal(ClusterInvariants const &A, ClusterInvariants const &B, double tol)
Check if ClusterInvariants are equal.
INDEX_TYPE Index
For long integer indexing:
Struct to encode all information about the crystal basis Info may describe the basis in a atomic cont...