CASM  1.1.0
A Clusters Approach to Statistical Mechanics
SimpleStrucMapCalculator.hh
Go to the documentation of this file.
1 #ifndef CASM_SimpleStrucMapCalculator
2 #define CASM_SimpleStrucMapCalculator
3 
6 
7 namespace CASM {
8 namespace xtal {
9 class SimpleStructure;
10 struct SymOp;
11 typedef std::vector<SymOp> SymOpVector;
12 
13 // In this file:
14 struct MappingNode;
15 class StrucMapCalculatorInterface;
16 class SimpleStrucMapCalculator;
17 
19  public:
21  SimpleStructure _parent,
22  SymOpVector const &_factor_group = {SymOp::identity()},
23  SimpleStructure::SpeciesMode species_mode =
24  SimpleStructure::SpeciesMode::ATOM,
25  StrucMapping::AllowedSpecies allowed_species = {})
26  : StrucMapCalculatorInterface(std::move(_parent), _factor_group,
27  species_mode, std::move(allowed_species)) {}
28 
29  template <typename ExternSymOpVector>
31  SimpleStructure _parent,
32  ExternSymOpVector const &_factor_group = {SymOp::identity()},
33  SimpleStructure::SpeciesMode species_mode =
34  SimpleStructure::SpeciesMode::ATOM,
35  StrucMapping::AllowedSpecies allowed_species = {})
37  _parent,
39  species_mode, allowed_species) {}
40 
42 
43  std::vector<Eigen::Vector3d> translations(
44  MappingNode const &_node,
45  SimpleStructure const &child_struc) const override;
46 
53  MappingNode const &_node,
54  SimpleStructure const &_child_struc) const override;
55 
56  void finalize(MappingNode &_node, SimpleStructure const &child_struc,
57  bool const &symmetrize_atomic_cost = false) const override;
58 
59  bool populate_cost_mat(MappingNode &_node,
60  SimpleStructure const &child_struc) const override;
61 
63  SimpleStructure const &child_struc) const;
64 
65  private:
68  virtual StrucMapCalculatorInterface *_clone() const override {
69  return new SimpleStrucMapCalculator(*this);
70  }
71 
75  SimpleStructure _parent,
76  SymOpVector const &_factor_group = {SymOp::identity()},
77  SimpleStructure::SpeciesMode _species_mode =
78  SimpleStructure::SpeciesMode::ATOM,
79  StrucMapping::AllowedSpecies _allowed_species = {}) const override {
80  return new SimpleStrucMapCalculator(std::move(_parent), _factor_group,
81  _species_mode,
82  std::move(_allowed_species));
83  }
84 
87  virtual bool _assign_molecules(MappingNode &_node,
88  SimpleStructure const &child_struc) const;
89 };
90 } // namespace xtal
91 } // namespace CASM
92 #endif
bool populate_cost_mat(MappingNode &_node, SimpleStructure const &child_struc) const override
virtual StrucMapCalculatorInterface * _quasi_clone(SimpleStructure _parent, SymOpVector const &_factor_group={SymOp::identity()}, SimpleStructure::SpeciesMode _species_mode=SimpleStructure::SpeciesMode::ATOM, StrucMapping::AllowedSpecies _allowed_species={}) const override
Make an exact copy of the calculator (including any initialized members)
virtual bool _assign_molecules(MappingNode &_node, SimpleStructure const &child_struc) const
Initializes child_struc.mol_info based on child_struc.atom_info and _node. Default behavior simply co...
virtual StrucMapCalculatorInterface * _clone() const override
Make an exact copy of the calculator (including any initialized members)
void populate_displacement(MappingNode &_node, SimpleStructure const &child_struc) const
void finalize(MappingNode &_node, SimpleStructure const &child_struc, bool const &symmetrize_atomic_cost=false) const override
Calculates final mapping score and sets _node.is_valid.
SimpleStrucMapCalculator(SimpleStructure _parent, ExternSymOpVector const &_factor_group={SymOp::identity()}, SimpleStructure::SpeciesMode species_mode=SimpleStructure::SpeciesMode::ATOM, StrucMapping::AllowedSpecies allowed_species={})
std::vector< Eigen::Vector3d > translations(MappingNode const &_node, SimpleStructure const &child_struc) const override
construct list of prospective mapping translations
virtual SimpleStructure resolve_setting(MappingNode const &_node, SimpleStructure const &_child_struc) const override
Creates copy of _child_struc by applying isometry, lattice transformation, translation,...
SimpleStrucMapCalculator(SimpleStructure _parent, SymOpVector const &_factor_group={SymOp::identity()}, SimpleStructure::SpeciesMode species_mode=SimpleStructure::SpeciesMode::ATOM, StrucMapping::AllowedSpecies allowed_species={})
Representation of a crystal of molecular and/or atomic occupants, and any additional properties....
StrucMapCalculatorInterface(SimpleStructure _parent, SymOpVector const &_factor_group={SymOp::identity()}, SimpleStructure::SpeciesMode _species_mode=SimpleStructure::SpeciesMode::ATOM, StrucMapping::AllowedSpecies allowed_species={})
StrucMapping::AllowedSpecies const & _allowed_species() const
SpeciesMode
enum to refer to a particular representation of the occupants (atomic or molecular)
std::vector< std::vector< std::string > > AllowedSpecies
std::vector< SymOp > SymOpVector
Main CASM namespace.
Definition: APICommand.hh:8
static SymOp identity()
Definition: SymType.hh:29