CASM  1.1.0
A Clusters Approach to Statistical Mechanics
BasicStructureTools.hh
Go to the documentation of this file.
1 #ifndef BASICSTRUCTURETOOLS_HH
2 #define BASICSTRUCTURETOOLS_HH
3 
4 #include <set>
5 #include <vector>
6 
8 #include "casm/external/Eigen/Core"
10 #include "casm/global/eigen.hh"
11 
12 namespace CASM {
13 namespace xtal {
14 class Site;
15 class Coordinate;
16 class BasicStructure;
17 struct SymOp;
18 
22 Index find_index(const std::vector<Site> &basis, const Site &test_site,
23  double tol);
24 
28 bool is_primitive(const BasicStructure &struc, double tol = TOL);
29 
31 BasicStructure make_primitive(const BasicStructure &non_primitive_struc,
32  double tol = TOL);
33 
36 std::pair<double, Eigen::Vector3d> calc_rotation_angle_and_axis(
37  const SymOp &op, const Lattice &lat);
38 
41 void sort_factor_group(std::vector<SymOp> &factor_group, const Lattice &lat);
42 
46 std::vector<SymOp> make_factor_group(const BasicStructure &struc,
47  double tol = TOL);
48 
50 std::vector<Eigen::PermutationMatrix<Eigen::Dynamic, Eigen::Dynamic, Index>>
51 make_permutation_representation(const xtal::BasicStructure &struc,
52  const std::vector<SymOp> &factor_group);
53 
55 std::set<std::set<Index>> make_asymmetric_unit(
56  const xtal::BasicStructure &struc, const std::vector<SymOp> &factor_group);
57 
59 std::set<std::set<Index>> make_asymmetric_unit(
60  const xtal::BasicStructure &struc);
61 
62 // TODO: Rename to symmetrize_basis and have it take vector<Site> and Lattice?
63 // seems like a symmetrize routine that takes a structure should also symmetrize
64 // the lattice.
69 BasicStructure symmetrize(const BasicStructure &structure,
70  const std::vector<SymOp> &enforced_group);
71 
75 template <typename IntegralType, int Options = 0>
76 BasicStructure make_superstructure(
77  const BasicStructure &tiling_unit,
78  const Eigen::Matrix<IntegralType, 3, 3, Options> &transformation_matrix);
79 
80 } // namespace xtal
81 } // namespace CASM
82 
83 #endif
ConfigIO::GenericConfigFormatter< jsonParser > structure()
Definition: ConfigIO.cc:766
SharedPrimFormatter< jsonParser > factor_group()
std::set< std::set< Index > > make_asymmetric_unit(const xtal::BasicStructure &struc, const std::vector< SymOp > &factor_group)
Return indices of equivalent basis sites.
BasicStructure symmetrize(const BasicStructure &structure, const std::vector< SymOp > &enforced_group)
std::vector< SymOp > make_factor_group(const BasicStructure &struc, double tol=TOL)
std::vector< Eigen::PermutationMatrix< Eigen::Dynamic, Eigen::Dynamic, Index > > make_permutation_representation(const xtal::BasicStructure &struc, const std::vector< SymOp > &factor_group)
Create the permutation group of a structure.
void sort_factor_group(std::vector< SymOp > &factor_group, const Lattice &lat)
Sort SymOp in the SymGroup.
std::pair< double, Eigen::Vector3d > calc_rotation_angle_and_axis(const SymOp &op, const Lattice &lat)
Calculates the rotation angle and axis of a symmetry operation. This function is almost exactly ident...
BasicStructure make_primitive(const BasicStructure &non_primitive_struc, double tol=TOL)
Returns the smallest possible tiling unit of the given structure.
bool is_primitive(const BasicStructure &struc, double tol=TOL)
Index find_index(const std::vector< Site > &basis, const Site &test_site, double tol)
BasicStructure make_superstructure(const BasicStructure &tiling_unit, const Eigen::Matrix< IntegralType, 3, 3, Options > &transformation_matrix)
Main CASM namespace.
Definition: APICommand.hh:8
const double TOL
Definition: definitions.hh:30
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39