symbol += boost::lexical_cast<std::string>(operation.order());

  int translation =
      static_cast<int>(static_cast<double>(operation.order()) *
                       Kernel::V3D(determineTranslation(operation)).norm());

  if (translation != 0) {
    symbol += boost::lexical_cast<std::string>(translation);
  }

  return symbol;
}

std::map<V3R, std::string> SymmetryElementMirrorGenerator::g_glideSymbolMap =
    boost::assign::map_list_of(V3R(0, 0, 0), "m")(V3R(1, 0, 0) / 2,
                                                  "a")(V3R(0, 1, 0) / 2, "b")(
        V3R(0, 0, 1) / 2, "c")(V3R(1, 1, 0) / 2, "n")(V3R(1, 0, 1) / 2, "n")(
        V3R(0, 1, 1) / 2, "n")(V3R(1, 1, 1) / 2, "n")(V3R(1, 1, 0) / 4, "d")(
        V3R(1, 0, 1) / 4, "d")(V3R(0, 1, 1) / 4, "d")(V3R(1, 1, 1) / 4, "d");

/// Generates an instance of SymmetryElementMirror with the corresponding
/// symbol, axis and translation vector.
SymmetryElement_sptr SymmetryElementMirrorGenerator::generateElement(
    const SymmetryOperation &operation) const {
  const Kernel::IntMatrix &matrix = operation.matrix();

  V3R axis = determineAxis(matrix);
  V3R translation = determineTranslation(operation);
  std::string symbol = determineSymbol(operation);
예제 #2
0
파일: V3R.cpp 프로젝트: DanNixon/mantid
/// Negates all components of the vector
V3R V3R::operator-() const { return V3R(-m_x, -m_y, -m_z); }
예제 #3
0
  symbol += std::to_string(operation.order());

  int translation =
      static_cast<int>(static_cast<double>(operation.order()) *
                       Kernel::V3D(determineTranslation(operation)).norm());

  if (translation != 0) {
    symbol += std::to_string(translation);
  }

  return symbol;
}

std::map<V3R, std::string> SymmetryElementMirrorGenerator::g_glideSymbolMap = {
    {V3R(0, 0, 0), "m"},
    {V3R(1, 0, 0) / 2, "a"},
    {V3R(0, 1, 0) / 2, "b"},
    {V3R(0, 0, 1) / 2, "c"},
    {V3R(1, 1, 0) / 2, "n"},
    {V3R(1, 0, 1) / 2, "n"},
    {V3R(0, 1, 1) / 2, "n"},
    {V3R(1, 1, 1) / 2, "n"},
    {V3R(1, 1, 0) / 4, "d"},
    {V3R(1, 0, 1) / 4, "d"},
    {V3R(0, 1, 1) / 4, "d"},
    {V3R(1, 1, 1) / 4, "d"}};

/// Generates an instance of SymmetryElementMirror with the corresponding
/// symbol, axis and translation vector.
SymmetryElement_sptr SymmetryElementMirrorGenerator::generateElement(
예제 #4
0
파일: V3R.cpp 프로젝트: DanNixon/mantid
/// Returns a V3R with absolute components.
V3R V3R::getPositiveVector() const {
  return V3R(boost::abs(m_x), boost::abs(m_y), boost::abs(m_z));
}