CASM  1.1.0
A Clusters Approach to Statistical Mechanics
Conversions.hh
Go to the documentation of this file.
1 #ifndef CASM_Monte_Conversions_HH
2 #define CASM_Monte_Conversions_HH
3 
4 #include <set>
5 #include <string>
6 #include <vector>
7 
9 
10 namespace CASM {
11 namespace xtal {
12 class UnitCell;
13 class UnitCellCoord;
14 class Molecule;
15 } // namespace xtal
16 using xtal::Molecule;
17 using xtal::UnitCell;
18 using xtal::UnitCellCoord;
19 
20 class PrimClex;
21 class Supercell;
22 class Configuration;
23 
24 namespace Monte {
25 
32 class Conversions {
33  public:
35 
36  Conversions(const Configuration &unit_config, const Supercell &mc_scel);
37 
38  Index l_to_b(Index l) const;
39  UnitCell l_to_ijk(Index l) const;
40  UnitCellCoord l_to_bijk(Index l) const;
41  Index l_to_unitl(Index l) const;
42  Index l_to_asym(Index l) const;
43 
44  Index bijk_to_l(const UnitCellCoord &bijk) const;
45  Index bijk_to_unitl(const UnitCellCoord &bijk) const;
46  Index bijk_to_asym(const UnitCellCoord &bijk) const;
47 
48  Index unitl_to_b(Index unitl) const;
49  UnitCellCoord unitl_to_bijk(Index unitl) const;
50  Index unitl_to_asym(Index unitl) const;
51 
52  Index asym_size() const;
53  const std::set<Index> &asym_to_b(Index asym) const;
54  const std::set<Index> &asym_to_unitl(Index asym) const;
55 
56  const Supercell &unit_scel() const;
57  const Supercell &mc_scel() const;
58 
59  Index occ_size(Index asym) const;
62  bool species_allowed(Index asym, Index species_index) const;
63 
64  Index species_size() const;
65  Index species_index(std::string species_name) const;
67  const std::string &species_name(Index species_index) const;
69 
70  private:
73  std::vector<Molecule> m_struc_mol;
74  std::vector<std::string> m_struc_molname;
75 
77  std::vector<Index> m_unitl_to_asym;
78  std::vector<std::set<Index> > m_asym_to_unitl;
79  std::vector<std::set<Index> > m_asym_to_b;
80 
82  std::vector<std::vector<Index> > m_occ_to_species;
83 
85  std::vector<std::vector<Index> > m_species_to_occ;
86 };
87 
88 } // namespace Monte
89 } // namespace CASM
90 
91 #endif
const Supercell & unit_scel() const
Definition: Conversions.cc:120
Index bijk_to_unitl(const UnitCellCoord &bijk) const
Definition: Conversions.cc:95
const std::set< Index > & asym_to_b(Index asym) const
Definition: Conversions.cc:113
UnitCell l_to_ijk(Index l) const
Definition: Conversions.cc:79
std::vector< std::set< Index > > m_asym_to_unitl
Definition: Conversions.hh:78
std::vector< std::set< Index > > m_asym_to_b
Definition: Conversions.hh:79
Conversions(const Supercell &mc_scel)
Definition: Conversions.cc:25
std::vector< std::vector< Index > > m_species_to_occ
m_species_to_occ[asym][species_index] -> occ_index
Definition: Conversions.hh:85
Index species_index(Index asym, Index occ_index) const
Definition: Conversions.cc:126
const Supercell * m_mc_scel
Definition: Conversions.hh:72
const std::set< Index > & asym_to_unitl(Index asym) const
Definition: Conversions.cc:116
Index l_to_b(Index l) const
Definition: Conversions.cc:78
Index unitl_to_asym(Index unitl) const
Definition: Conversions.cc:108
Index occ_size(Index asym) const
Definition: Conversions.cc:123
const Molecule & species_to_mol(Index species_index) const
Definition: Conversions.cc:141
std::vector< Molecule > m_struc_mol
Definition: Conversions.hh:73
const Supercell & mc_scel() const
Definition: Conversions.cc:121
Index occ_index(Index asym, Index species_index) const
Definition: Conversions.cc:129
std::vector< std::string > m_struc_molname
Definition: Conversions.hh:74
Index l_to_asym(Index l) const
Definition: Conversions.cc:88
UnitCellCoord l_to_bijk(Index l) const
Definition: Conversions.cc:82
const Supercell * m_unit_scel
Definition: Conversions.hh:71
Index bijk_to_l(const UnitCellCoord &bijk) const
Definition: Conversions.cc:92
Index unitl_to_b(Index unitl) const
Definition: Conversions.cc:102
std::vector< std::vector< Index > > m_occ_to_species
m_occ_to_species[asym][occ_index] -> species_index
Definition: Conversions.hh:82
UnitCellCoord unitl_to_bijk(Index unitl) const
Definition: Conversions.cc:105
bool species_allowed(Index asym, Index species_index) const
Definition: Conversions.cc:133
Index l_to_unitl(Index l) const
Definition: Conversions.cc:85
const std::string & species_name(Index species_index) const
Definition: Conversions.cc:144
Index bijk_to_asym(const UnitCellCoord &bijk) const
Definition: Conversions.cc:98
std::vector< Index > m_unitl_to_asym
Definition: Conversions.hh:77
Index components_size(Index species_index) const
Definition: Conversions.cc:147
Index species_size() const
Definition: Conversions.cc:137
Represents a supercell of the primitive parent crystal structure.
Definition: Supercell.hh:51
Class representing a Molecule.
Definition: Molecule.hh:93
Unit Cell Coordinates.
Unit Cell Indices.
Main CASM namespace.
Definition: APICommand.hh:8
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39