CASM  1.1.0
A Clusters Approach to Statistical Mechanics
MappedPropertiesTools.cc
Go to the documentation of this file.
2 
6 
7 namespace CASM {
9  MappedProperties const &props) {
10  SymOp symop = op.sym_op();
11 
12  MappedProperties result;
13  for (auto it = props.global.begin(); it != props.global.end(); ++it) {
15  result.global[it->first] =
16  traits.symop_to_matrix(symop.matrix(), symop.tau(),
17  symop.time_reversal()) *
18  it->second;
19  }
20 
21  Permutation tperm(op.combined_permute());
22  for (auto it = props.site.begin(); it != props.site.end(); ++it) {
24  Eigen::MatrixXd new_matrix =
25  traits.symop_to_matrix(symop.matrix(), symop.tau(),
26  symop.time_reversal()) *
27  it->second;
28  auto it2 = result.site
29  .emplace(std::make_pair(
30  it->first,
31  Eigen::MatrixXd(new_matrix.rows(), new_matrix.cols())))
32  .first;
33  for (Index i = 0; i < (it->second).cols(); i++) {
34  (it2->second).col(i) = new_matrix.col(tperm[i]);
35  }
36  }
37  return result;
38 }
39 } // namespace CASM
Specifies traits of (possibly) anisotropic crystal properties.
static std::string name_suffix(std::string const &_name, char delim='_')
Permutation combined_permute() const
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
Definition: SymOp.hh:28
const matrix_type & matrix() const
Const access of entire cartesian symmetry matrix.
Definition: SymOp.hh:60
bool time_reversal() const
Const access of the time-reversal flag (true if operation reverses time)
Definition: SymOp.hh:66
const vector_type & tau() const
Const access of the cartesian translation vector, 'tau'.
Definition: SymOp.hh:63
Traits const & traits(std::string const &dof_key)
Lookup DoFType::Traits in the global dictionary.
Definition: DoFTraits.cc:46
Main CASM namespace.
Definition: APICommand.hh:8
Eigen::MatrixXd MatrixXd
MappingNode copy_apply(PermuteIterator const &_it, MappingNode const &_node, bool transform_cost_mat=true)
Reorders the permutation and compounds the spatial isometry (rotation.
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39
std::map< std::string, Eigen::MatrixXd > site
std::map< std::string, Eigen::MatrixXd > global