Mantid
Loading...
Searching...
No Matches
SpaceGroupFactory.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
14
15#include <algorithm>
16#include <boost/algorithm/string.hpp>
17#include <locale>
18#include <memory>
19#include <utility>
20
21namespace Mantid::Geometry {
22
25bool isValidGeneratorString(const std::string &generatorString) {
26 std::vector<std::string> generatorStrings;
27 boost::split(generatorStrings, generatorString, boost::is_any_of(";"));
28
29 for (auto &identifier : generatorStrings) {
30 try {
32 } catch (const Kernel::Exception::ParseError &) {
33 return false;
34 }
35 }
36
37 return true;
38}
39
57std::vector<std::string> operator*(const SymmetryOperation &symOp, const std::vector<std::string> &strings) {
58 if (strings.size() < 3) {
59 throw std::invalid_argument("There must be at least three strings in the "
60 "vector for SymmetryOperation * "
61 "std::vector<std::string>.");
62 }
63
64 std::vector<int> transformedIndices = symOp.matrix() * std::vector<int>{0, 1, 2};
65
66 std::vector<std::string> transformedStrings;
67 std::transform(transformedIndices.cbegin(), transformedIndices.cend(), std::back_inserter(transformedStrings),
68 [=](int index) { return strings[abs(index)]; });
69
70 if (transformedStrings.size() < strings.size()) {
71 transformedStrings.insert(transformedStrings.end(), strings.cbegin() + transformedStrings.size(), strings.cend());
72 }
73
74 return transformedStrings;
75}
76
79 std::string generatorInformation)
80 : m_number(number), m_hmSymbol(std::move(hmSymbol)), m_generatorString(std::move(generatorInformation)),
81 m_prototype() {}
82
85 if (!hasValidPrototype()) {
87 }
88
89 return m_prototype;
90}
91
105 Group_const_sptr generatingGroup = generateGroup();
106
107 if (!generatingGroup) {
108 throw std::runtime_error("Could not create group from supplied symmetry operations.");
109 }
110
111 return std::make_shared<const SpaceGroup>(m_number, m_hmSymbol, *generatingGroup);
112}
113
117AlgorithmicSpaceGroupGenerator::AlgorithmicSpaceGroupGenerator(size_t number, const std::string &hmSymbol,
118 const std::string &generatorInformation)
119 : AbstractSpaceGroupGenerator(number, hmSymbol, generatorInformation) {
120 if (!isValidGeneratorString(generatorInformation)) {
121 throw std::runtime_error("Generator string could not be parsed: " + generatorInformation);
122 }
123}
124
128 Group_const_sptr baseGroup = GroupFactory::create<ProductOfCyclicGroups>(getGeneratorString());
129 Group_const_sptr centeringGroup = GroupFactory::create<CenteringGroup>(getCenteringSymbol());
130
131 return baseGroup * centeringGroup;
132}
133
136std::string AlgorithmicSpaceGroupGenerator::getCenteringSymbol() const { return getHMSymbol().substr(0, 1); }
137
142 const std::string &generatorInformation)
143 : AbstractSpaceGroupGenerator(number, hmSymbol, generatorInformation) {
144 setBaseAndTransformation(generatorInformation);
145}
146
151
153
154 return std::make_shared<Group>(transformation(*baseGroup));
155}
156
160 return SpaceGroupFactory::Instance().createSpaceGroup(m_baseGroupHMSymbol);
161}
162
181void TransformationSpaceGroupGenerator::setBaseAndTransformation(const std::string &generatorInformation) {
182 std::vector<std::string> parts;
183 boost::split(parts, generatorInformation, boost::is_any_of("|"));
184
185 if (parts.size() != 2) {
186 throw std::invalid_argument("Not a valid string for generation of "
187 "transformed space groups. Correct format is "
188 "'HM symbol | transformation'.");
189 }
190
191 m_baseGroupHMSymbol = boost::trim_copy(parts.front());
192 m_transformation = parts.back();
193}
194
198TabulatedSpaceGroupGenerator::TabulatedSpaceGroupGenerator(size_t number, const std::string &hmSymbol,
199 const std::string &generatorInformation)
200 : AbstractSpaceGroupGenerator(number, hmSymbol, generatorInformation) {
201 if (!isValidGeneratorString(generatorInformation)) {
202 throw std::runtime_error("Generator string could not be parsed: " + generatorInformation);
203 }
204}
205
208 return GroupFactory::create<Group>(getGeneratorString());
209}
210
214 if (!isSubscribed(hmSymbol)) {
215 throw std::invalid_argument("Space group with symbol '" + hmSymbol + "' is not registered.");
216 }
217
218 return constructFromPrototype(getPrototype(hmSymbol));
219}
220
222bool SpaceGroupFactoryImpl::isSubscribed(const std::string &hmSymbol) const {
223 return m_generatorMap.find(hmSymbol) != m_generatorMap.end();
224}
225
227bool SpaceGroupFactoryImpl::isSubscribed(size_t number) const { return m_numberMap.find(number) != m_numberMap.end(); }
228
231 std::vector<std::string> symbols;
232 symbols.reserve(m_generatorMap.size());
233 std::transform(m_generatorMap.cbegin(), m_generatorMap.cend(), std::back_inserter(symbols),
234 [](const auto &generator) { return generator.first; });
235 return symbols;
236}
237
239std::vector<std::string> SpaceGroupFactoryImpl::subscribedSpaceGroupSymbols(size_t number) const {
240 std::vector<std::string> symbols;
241
242 auto keyPair = m_numberMap.equal_range(number);
243
244 for (auto it = keyPair.first; it != keyPair.second; ++it) {
245 symbols.emplace_back(it->second);
246 }
247
248 return symbols;
249}
250
253 std::vector<size_t> numbers;
254 numbers.reserve(m_numberMap.size());
255
256 for (auto it = m_numberMap.begin(); it != m_numberMap.end(); it = m_numberMap.upper_bound(it->first)) {
257 numbers.emplace_back(it->first);
258 }
259
260 return numbers;
261}
262
263std::vector<std::string> SpaceGroupFactoryImpl::subscribedSpaceGroupSymbols(const PointGroup_sptr &pointGroup) {
264 if (m_pointGroupMap.empty()) {
266 }
267
268 std::string pointGroupSymbol = pointGroup->getSymbol();
269
270 std::vector<std::string> symbols;
271 auto keyPair = m_pointGroupMap.equal_range(pointGroupSymbol);
272
273 for (auto it = keyPair.first; it != keyPair.second; ++it) {
274 symbols.emplace_back(it->second);
275 }
276
277 return symbols;
278}
279
282void SpaceGroupFactoryImpl::unsubscribeSpaceGroup(const std::string &hmSymbol) {
283 if (!isSubscribed(hmSymbol)) {
284 throw std::invalid_argument("Cannot unsubscribe space group that is not registered.");
285 }
286
287 auto eraseGenerator = m_generatorMap.find(hmSymbol);
288 AbstractSpaceGroupGenerator_sptr generator = eraseGenerator->second;
289
290 auto eraseNumber = m_numberMap.find(generator->getNumber());
291
292 m_numberMap.erase(eraseNumber);
293 m_generatorMap.erase(eraseGenerator);
294}
295
314void SpaceGroupFactoryImpl::subscribeGeneratedSpaceGroup(size_t number, const std::string &hmSymbol,
315 const std::string &generators) {
316 subscribeUsingGenerator<AlgorithmicSpaceGroupGenerator>(number, hmSymbol, generators);
317}
318
321void SpaceGroupFactoryImpl::subscribeTabulatedSpaceGroup(size_t number, const std::string &hmSymbol,
322 const std::string &symmetryOperations) {
323 subscribeUsingGenerator<TabulatedSpaceGroupGenerator>(number, hmSymbol, symmetryOperations);
324}
325
328std::string SpaceGroupFactoryImpl::getTransformedSymbolOrthorhombic(const std::string &hmSymbol,
329 const std::string &transformation) const {
330 // Split the symbol up in its components
331 std::vector<std::string> symbolComponents;
332 boost::split(symbolComponents, hmSymbol, boost::is_any_of(" "));
333
334 // Get the centering, that needs to be transformed as well.
335 std::string centeringLowerCase = boost::to_lower_copy(symbolComponents.front());
336
337 // Remove the centering, use only the a, b, c-part of the symbol
338 symbolComponents.erase(symbolComponents.begin());
339
340 // Use inverse symmetry operation to permute symbol
341 SymmetryOperation op = SymmetryOperation(transformation).inverse();
342
343 // Symbols that need to be replaced in the permutations
344 std::vector<std::string> axes{"a", "b", "c"};
345 std::vector<std::string> permutedAxes = op * axes;
346
347 // Permutation of the symbol, re-append centering symbol, lower case.
348 std::vector<std::string> permuted = op * symbolComponents;
349 permuted.insert(permuted.begin(), centeringLowerCase);
350
351 // Transform those components for which it is necessary (a, b, c)
352 std::transform(permuted.begin(), permuted.end(), permuted.begin(), [&](const std::string &symbol) {
353 auto needsTransformation = std::find(permutedAxes.cbegin(), permutedAxes.cend(), symbol);
354
355 if (needsTransformation == permutedAxes.cend()) {
356 return symbol;
357 }
358
359 return axes[std::distance(permutedAxes.cbegin(), needsTransformation)];
360 });
361
362 // Transform centering string back to upper case.
363 boost::to_upper(*permuted.begin());
364
365 return boost::join(permuted, " ");
366}
367
371 return std::make_shared<const SpaceGroup>(*prototype);
372}
373
377 m_pointGroupMap.clear();
378
379 for (auto &generator : m_generatorMap) {
380 SpaceGroup_const_sptr spaceGroup = getPrototype(generator.first);
381
382 m_pointGroupMap.emplace(spaceGroup->getPointGroup()->getSymbol(), generator.first);
383 }
384}
385
388 AbstractSpaceGroupGenerator_sptr generator = m_generatorMap.find(hmSymbol)->second;
389
390 if (!generator) {
391 throw std::runtime_error("No generator for symbol '" + hmSymbol + "'");
392 }
393
394 return generator->getPrototype();
395}
396
399 if (!generator) {
400 throw std::runtime_error("Cannot register null-generator.");
401 }
402
403 m_numberMap.emplace(generator->getNumber(), generator->getHMSymbol());
404 m_generatorMap.emplace(generator->getHMSymbol(), generator);
405
406 // Clear the point group map
407 m_pointGroupMap.clear();
408}
409
411SpaceGroupFactoryImpl::SpaceGroupFactoryImpl() : m_numberMap(), m_generatorMap(), m_pointGroupMap() {
413}
414
415/* Space groups according to International Tables for Crystallography,
416 * using the generators specified there.
417 */
418// Triclinic
419DECLARE_TABULATED_SPACE_GROUP(1, "P 1", "x,y,z")
420DECLARE_GENERATED_SPACE_GROUP(2, "P -1", "-x,-y,-z")
421
422/* Monoclinic space groups.
423 *
424 * Unique axes b and c are given, as well as 3 cell choices where
425 * applicable. Since there are only so few monoclinic space group
426 * types, all the transformations are given explicitly. It would
427 * actually be shorter to provide all group definition explicitly
428 * with their generators, but this way the relationship between
429 * the groups is more pronounced.
430 */
431DECLARE_GENERATED_SPACE_GROUP(3, "P 1 2 1", "-x,y,-z")
432DECLARE_TRANSFORMED_SPACE_GROUP(3, "P 1 1 2", "P 1 2 1 | y,z,x")
433
434DECLARE_GENERATED_SPACE_GROUP(4, "P 1 21 1", "-x,y+1/2,-z")
435DECLARE_TRANSFORMED_SPACE_GROUP(4, "P 1 1 21", "P 1 21 1 | y,z,x")
436
437DECLARE_GENERATED_SPACE_GROUP(5, "C 1 2 1", "-x,y,-z")
438DECLARE_TRANSFORMED_SPACE_GROUP(5, "A 1 2 1", "C 1 2 1 | -x+z,y,-x")
439DECLARE_TRANSFORMED_SPACE_GROUP(5, "I 1 2 1", "C 1 2 1 | -z,y,x-z")
440DECLARE_TRANSFORMED_SPACE_GROUP(5, "A 1 1 2", "C 1 2 1 | y,z,x")
441DECLARE_TRANSFORMED_SPACE_GROUP(5, "B 1 1 2", "A 1 1 2 | -y,x-y,z")
442DECLARE_TRANSFORMED_SPACE_GROUP(5, "I 1 1 2", "A 1 1 2 | -x+y,-x,z")
443
444DECLARE_GENERATED_SPACE_GROUP(6, "P 1 m 1", "x,-y,z")
445DECLARE_TRANSFORMED_SPACE_GROUP(6, "P 1 1 m", "P 1 m 1 | y,z,x")
446
447DECLARE_GENERATED_SPACE_GROUP(7, "P 1 c 1", "x,-y,z+1/2")
448DECLARE_TRANSFORMED_SPACE_GROUP(7, "P 1 n 1", "P 1 c 1 | -x+z,y,-x")
449DECLARE_TRANSFORMED_SPACE_GROUP(7, "P 1 a 1", "P 1 c 1 | -z,y,x-z")
450DECLARE_TRANSFORMED_SPACE_GROUP(7, "P 1 1 a", "P 1 c 1 | y,z,x")
451DECLARE_TRANSFORMED_SPACE_GROUP(7, "P 1 1 n", "P 1 1 a | -y,x-y,z")
452DECLARE_TRANSFORMED_SPACE_GROUP(7, "P 1 1 b", "P 1 1 a | -x+y,-x,z")
453
454DECLARE_GENERATED_SPACE_GROUP(8, "C 1 m 1", "x,-y,z")
455DECLARE_TRANSFORMED_SPACE_GROUP(8, "A 1 m 1", "C 1 m 1 | -x+z,y,-x")
456DECLARE_TRANSFORMED_SPACE_GROUP(8, "I 1 m 1", "C 1 m 1 | -z,y,x-z")
457DECLARE_TRANSFORMED_SPACE_GROUP(8, "A 1 1 m", "C 1 m 1 | y,z,x")
458DECLARE_TRANSFORMED_SPACE_GROUP(8, "B 1 1 m", "A 1 1 m | -y,x-y,z")
459DECLARE_TRANSFORMED_SPACE_GROUP(8, "I 1 1 m", "A 1 1 m | -x+y,-x,z")
460
461DECLARE_GENERATED_SPACE_GROUP(9, "C 1 c 1", "x,-y,z+1/2")
462DECLARE_TRANSFORMED_SPACE_GROUP(9, "A 1 n 1", "C 1 c 1 | -x+z,y,-x")
463DECLARE_TRANSFORMED_SPACE_GROUP(9, "I 1 a 1", "C 1 c 1 | -z,y,x-z")
464DECLARE_TRANSFORMED_SPACE_GROUP(9, "A 1 1 a", "C 1 c 1 | y,z,x")
465DECLARE_TRANSFORMED_SPACE_GROUP(9, "B 1 1 n", "A 1 1 a | -y,x-y,z")
466DECLARE_TRANSFORMED_SPACE_GROUP(9, "I 1 1 b", "A 1 1 a | -x+y,-x,z")
467
468DECLARE_GENERATED_SPACE_GROUP(10, "P 1 2/m 1", "-x,y,-z; -x,-y,-z")
469DECLARE_TRANSFORMED_SPACE_GROUP(10, "P 1 1 2/m", "P 1 2/m 1 | y,z,x")
470
471DECLARE_GENERATED_SPACE_GROUP(11, "P 1 21/m 1", "-x,y+1/2,-z; -x,-y,-z")
472DECLARE_TRANSFORMED_SPACE_GROUP(11, "P 1 1 21/m", "P 1 21/m 1 | y,z,x")
473
474DECLARE_GENERATED_SPACE_GROUP(12, "C 1 2/m 1", "-x,y,-z; -x,-y,-z")
475DECLARE_TRANSFORMED_SPACE_GROUP(12, "A 1 2/m 1", "C 1 2/m 1 | -x+z,y,-x")
476DECLARE_TRANSFORMED_SPACE_GROUP(12, "I 1 2/m 1", "C 1 2/m 1 | -z,y,x-z")
477DECLARE_TRANSFORMED_SPACE_GROUP(12, "A 1 1 2/m", "C 1 2/m 1 | y,z,x")
478DECLARE_TRANSFORMED_SPACE_GROUP(12, "B 1 1 2/m", "A 1 1 2/m | -y,x-y,z")
479DECLARE_TRANSFORMED_SPACE_GROUP(12, "I 1 1 2/m", "A 1 1 2/m | -x+y,-x,z")
480
481DECLARE_GENERATED_SPACE_GROUP(13, "P 1 2/c 1", "-x,y,-z+1/2; -x,-y,-z")
482DECLARE_TRANSFORMED_SPACE_GROUP(13, "P 1 2/n 1", "P 1 2/c 1 | -x+z,y,-x")
483DECLARE_TRANSFORMED_SPACE_GROUP(13, "P 1 2/a 1", "P 1 2/c 1 | -z,y,x-z")
484DECLARE_TRANSFORMED_SPACE_GROUP(13, "P 1 1 2/a", "P 1 2/c 1 | y,z,x")
485DECLARE_TRANSFORMED_SPACE_GROUP(13, "P 1 1 2/n", "P 1 1 2/a | -y,x-y,z")
486DECLARE_TRANSFORMED_SPACE_GROUP(13, "P 1 1 2/b", "P 1 1 2/a | -x+y,-x,z")
487
488DECLARE_GENERATED_SPACE_GROUP(14, "P 1 21/c 1", "-x,y+1/2,-z+1/2; -x,-y,-z")
489DECLARE_TRANSFORMED_SPACE_GROUP(14, "P 1 21/n 1", "P 1 21/c 1 | -x+z,y,-x")
490DECLARE_TRANSFORMED_SPACE_GROUP(14, "P 1 21/a 1", "P 1 21/c 1 | -z,y,x-z")
491DECLARE_TRANSFORMED_SPACE_GROUP(14, "P 1 1 21/a", "P 1 21/c 1 | y,z,x")
492DECLARE_TRANSFORMED_SPACE_GROUP(14, "P 1 1 21/n", "P 1 1 21/a | -y,x-y,z")
493DECLARE_TRANSFORMED_SPACE_GROUP(14, "P 1 1 21/b", "P 1 1 21/a | -x+y,-x,z")
494
495DECLARE_GENERATED_SPACE_GROUP(15, "C 1 2/c 1", "-x,y,-z+1/2; -x,-y,-z")
496DECLARE_TRANSFORMED_SPACE_GROUP(15, "A 1 2/n 1", "C 1 2/c 1 | -x+z,y,-x")
497DECLARE_TRANSFORMED_SPACE_GROUP(15, "I 1 2/a 1", "C 1 2/c 1 | -z,y,x-z")
498DECLARE_TRANSFORMED_SPACE_GROUP(15, "A 1 1 2/a", "C 1 2/c 1 | y,z,x")
499DECLARE_TRANSFORMED_SPACE_GROUP(15, "B 1 1 2/n", "A 1 1 2/a | -y,x-y,z")
500DECLARE_TRANSFORMED_SPACE_GROUP(15, "I 1 1 2/b", "A 1 1 2/a | -x+y,-x,z")
501
502/* Orthorhombic space groups have a special subscribe-method in the
503 * factory, because each group has potentially 6 different settings.
504 * In addition some groups have more than one origin choice.
505 */
506DECLARE_ORTHORHOMBIC_SPACE_GROUP(16, "P 2 2 2", "-x,y,-z; x,-y,-z")
507DECLARE_ORTHORHOMBIC_SPACE_GROUP(17, "P 2 2 21", "-x,-y,z+1/2; -x,y,-z+1/2")
508DECLARE_ORTHORHOMBIC_SPACE_GROUP(18, "P 21 21 2", "-x,-y,z; -x+1/2,y+1/2,-z")
509DECLARE_ORTHORHOMBIC_SPACE_GROUP(19, "P 21 21 21", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2")
510DECLARE_ORTHORHOMBIC_SPACE_GROUP(20, "C 2 2 21", "-x,-y,z+1/2; -x,y,-z+1/2")
511DECLARE_ORTHORHOMBIC_SPACE_GROUP(21, "C 2 2 2", "-x,-y,z; -x,y,-z")
512DECLARE_ORTHORHOMBIC_SPACE_GROUP(22, "F 2 2 2", "-x,-y,z; -x,y,-z")
513DECLARE_ORTHORHOMBIC_SPACE_GROUP(23, "I 2 2 2", "-x,-y,z; -x,y,-z")
514DECLARE_ORTHORHOMBIC_SPACE_GROUP(24, "I 21 21 21", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2")
515DECLARE_ORTHORHOMBIC_SPACE_GROUP(25, "P m m 2", "-x,-y,z; x,-y,z")
516DECLARE_ORTHORHOMBIC_SPACE_GROUP(26, "P m c 21", "-x,-y,z+1/2; x,-y,z+1/2")
517DECLARE_ORTHORHOMBIC_SPACE_GROUP(27, "P c c 2", "-x,-y,z; x,-y,z+1/2")
518DECLARE_ORTHORHOMBIC_SPACE_GROUP(28, "P m a 2", "-x,-y,z; x+1/2,-y,z")
519DECLARE_ORTHORHOMBIC_SPACE_GROUP(29, "P c a 21", "-x,-y,z+1/2; x+1/2,-y,z")
520DECLARE_ORTHORHOMBIC_SPACE_GROUP(30, "P n c 2", "-x,-y,z; x,-y+1/2,z+1/2")
521DECLARE_ORTHORHOMBIC_SPACE_GROUP(31, "P m n 21", "-x+1/2,-y,z+1/2; x+1/2,-y,z+1/2")
522DECLARE_ORTHORHOMBIC_SPACE_GROUP(32, "P b a 2", "-x,-y,z; x+1/2,-y+1/2,z")
523DECLARE_ORTHORHOMBIC_SPACE_GROUP(33, "P n a 21", "-x,-y,z+1/2; x+1/2,-y+1/2,z")
524DECLARE_ORTHORHOMBIC_SPACE_GROUP(34, "P n n 2", "-x,-y,z; x+1/2,-y+1/2,z+1/2")
525DECLARE_ORTHORHOMBIC_SPACE_GROUP(35, "C m m 2", "-x,-y,z; x,-y,z")
526DECLARE_ORTHORHOMBIC_SPACE_GROUP(36, "C m c 21", "-x,-y,z+1/2; x,-y,z+1/2")
527DECLARE_ORTHORHOMBIC_SPACE_GROUP(37, "C c c 2", "-x,-y,z; x,-y,z+1/2")
528DECLARE_ORTHORHOMBIC_SPACE_GROUP(38, "A m m 2", "-x,-y,z; x,-y,z")
529DECLARE_ORTHORHOMBIC_SPACE_GROUP(39, "A e m 2", "-x,-y,z; x,-y,z+1/2")
530DECLARE_ORTHORHOMBIC_SPACE_GROUP(40, "A m a 2", "-x,-y,z; x+1/2,-y,z")
531DECLARE_ORTHORHOMBIC_SPACE_GROUP(41, "A e a 2", "-x,-y,z; x+1/2,-y+1/2,z")
532DECLARE_ORTHORHOMBIC_SPACE_GROUP(42, "F m m 2", "-x,-y,z; x,-y,z")
533DECLARE_ORTHORHOMBIC_SPACE_GROUP(43, "F d d 2", "-x,-y,z; x+1/4,-y+1/4,z+1/4")
534DECLARE_ORTHORHOMBIC_SPACE_GROUP(44, "I m m 2", "-x,-y,z; x,-y,z")
535DECLARE_ORTHORHOMBIC_SPACE_GROUP(45, "I b a 2", "-x,-y,z; x+1/2,-y+1/2,z")
536DECLARE_ORTHORHOMBIC_SPACE_GROUP(46, "I m a 2", "-x,-y,z; x+1/2,-y,z")
537DECLARE_ORTHORHOMBIC_SPACE_GROUP(47, "P m m m", "-x,-y,z; -x,y,-z; -x,-y,-z")
538
539DECLARE_ORTHORHOMBIC_SPACE_GROUP(48, "P n n n", "-x,-y,z; -x,y,-z; -x+1/2,-y+1/2,-z+1/2")
540DECLARE_TRANSFORMED_ORTHORHOMBIC_SPACE_GROUP(48, "P n n n :2", "P n n n | x-1/4,y-1/4,z-1/4")
541
542DECLARE_ORTHORHOMBIC_SPACE_GROUP(49, "P c c m", "-x,-y,z; -x,y,-z+1/2; -x,-y,-z")
543
544DECLARE_ORTHORHOMBIC_SPACE_GROUP(50, "P b a n", "-x,-y,z; -x,y,-z; -x+1/2,-y+1/2,-z")
545DECLARE_TRANSFORMED_ORTHORHOMBIC_SPACE_GROUP(50, "P b a n :2", "P b a n | x-1/4,y-1/4,z")
546
547DECLARE_ORTHORHOMBIC_SPACE_GROUP(51, "P m m a", "-x+1/2,-y,z; -x,y,-z; -x,-y,-z")
548DECLARE_ORTHORHOMBIC_SPACE_GROUP(52, "P n n a", "-x+1/2,-y,z; -x+1/2,y+1/2,-z+1/2; -x,-y,-z")
549DECLARE_ORTHORHOMBIC_SPACE_GROUP(53, "P m n a", "-x+1/2,-y,z+1/2; -x+1/2,y,-z+1/2; -x,-y,-z")
550DECLARE_ORTHORHOMBIC_SPACE_GROUP(54, "P c c a", "-x+1/2,-y,z; -x,y,-z+1/2; -x,-y,-z")
551DECLARE_ORTHORHOMBIC_SPACE_GROUP(55, "P b a m", "-x,-y,z; -x+1/2,y+1/2,-z; -x,-y,-z")
552DECLARE_ORTHORHOMBIC_SPACE_GROUP(56, "P c c n", "-x+1/2,-y+1/2,z; -x,y+1/2,-z+1/2; -x,-y,-z")
553DECLARE_ORTHORHOMBIC_SPACE_GROUP(57, "P b c m", "-x,-y,z+1/2; -x,y+1/2,-z+1/2; -x,-y,-z")
554DECLARE_ORTHORHOMBIC_SPACE_GROUP(58, "P n n m", "-x,-y,z; -x+1/2,y+1/2,-z+1/2; -x,-y,-z")
555
556DECLARE_ORTHORHOMBIC_SPACE_GROUP(59, "P m m n", "-x,-y,z; -x+1/2,y+1/2,-z; -x+1/2,-y+1/2,-z")
557DECLARE_TRANSFORMED_ORTHORHOMBIC_SPACE_GROUP(59, "P m m n :2", "P m m n | x-1/4,y-1/4,z")
558
559DECLARE_ORTHORHOMBIC_SPACE_GROUP(60, "P b c n", "-x+1/2,-y+1/2,z+1/2; -x,y,-z+1/2; -x,-y,-z")
560DECLARE_ORTHORHOMBIC_SPACE_GROUP(61, "P b c a", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; -x,-y,-z")
561DECLARE_ORTHORHOMBIC_SPACE_GROUP(62, "P n m a", "-x+1/2,-y,z+1/2; -x,y+1/2,-z; -x,-y,-z")
562DECLARE_ORTHORHOMBIC_SPACE_GROUP(63, "C m c m", "-x,-y,z+1/2; -x,y,-z+1/2; -x,-y,-z")
563DECLARE_ORTHORHOMBIC_SPACE_GROUP(64, "C m c e", "-x,-y+1/2,z+1/2; -x,y+1/2,-z+1/2; -x,-y,-z")
564DECLARE_ORTHORHOMBIC_SPACE_GROUP(65, "C m m m", "-x,-y,z; -x,y,-z; -x,-y,-z")
565DECLARE_ORTHORHOMBIC_SPACE_GROUP(66, "C c c m", "-x,-y,z; -x,y,-z+1/2; -x,-y,-z")
566DECLARE_ORTHORHOMBIC_SPACE_GROUP(67, "C m m e", "-x,-y+1/2,z; -x,y+1/2,-z; -x,-y,-z")
567DECLARE_ORTHORHOMBIC_SPACE_GROUP(68, "C c c e", "-x+1/2,-y+1/2,z; -x,y,-z; -x,-y+1/2,-z+1/2")
568DECLARE_ORTHORHOMBIC_SPACE_GROUP(69, "F m m m", "-x,-y,z; -x,y,-z; -x,-y,-z")
569
570DECLARE_ORTHORHOMBIC_SPACE_GROUP(70, "F d d d", "-x,-y,z; -x,y,-z; -x+1/4,-y+1/4,-z+1/4")
571DECLARE_TRANSFORMED_ORTHORHOMBIC_SPACE_GROUP(70, "F d d d :2", "F d d d | x+1/8,y+1/8,z+1/8")
572
573DECLARE_ORTHORHOMBIC_SPACE_GROUP(71, "I m m m", "-x,-y,z; -x,y,-z; -x,-y,-z")
574DECLARE_ORTHORHOMBIC_SPACE_GROUP(72, "I b a m", "-x,-y,z; -x+1/2,y+1/2,-z; -x,-y,-z")
575DECLARE_ORTHORHOMBIC_SPACE_GROUP(73, "I b c a", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; -x,-y,-z")
576DECLARE_ORTHORHOMBIC_SPACE_GROUP(74, "I m m a", "-x,-y+1/2,z; -x,y+1/2,-z; -x,-y,-z")
577
578// Tetragonal
579DECLARE_GENERATED_SPACE_GROUP(75, "P 4", "-x,-y,z; -y,x,z")
580DECLARE_GENERATED_SPACE_GROUP(76, "P 41", "-x,-y,z+1/2; -y,x,z+1/4")
581DECLARE_GENERATED_SPACE_GROUP(77, "P 42", "-x,-y,z; -y,x,z+1/2")
582DECLARE_GENERATED_SPACE_GROUP(78, "P 43", "-x,-y,z+1/2; -y,x,z+3/4")
583DECLARE_GENERATED_SPACE_GROUP(79, "I 4", "-x,-y,z; -y,x,z")
584DECLARE_GENERATED_SPACE_GROUP(80, "I 41", "-x+1/2,-y+1/2,z+1/2; -y,x+1/2,z+1/4")
585DECLARE_GENERATED_SPACE_GROUP(81, "P -4", "-x,-y,z; y,-x,-z")
586DECLARE_GENERATED_SPACE_GROUP(82, "I -4", "-x,-y,z; y,-x,-z")
587DECLARE_GENERATED_SPACE_GROUP(83, "P 4/m", "-x,-y,z; -y,x,z; -x,-y,-z")
588DECLARE_GENERATED_SPACE_GROUP(84, "P 42/m", "-x,-y,z; -y,x,z+1/2; -x,-y,-z")
589
590DECLARE_GENERATED_SPACE_GROUP(85, "P 4/n", "-x,-y,z; -y+1/2,x+1/2,z; -x+1/2,-y+1/2,-z")
591DECLARE_TRANSFORMED_SPACE_GROUP(85, "P 4/n :2", "P 4/n | x+1/4,y-1/4,z")
592
593DECLARE_GENERATED_SPACE_GROUP(86, "P 42/n", "-x,-y,z; -y+1/2,x+1/2,z+1/2; -x+1/2,-y+1/2,-z+1/2")
594DECLARE_TRANSFORMED_SPACE_GROUP(86, "P 42/n :2", "P 42/n | x+1/4,y+1/4,z+1/4")
595
596DECLARE_GENERATED_SPACE_GROUP(87, "I 4/m", "-x,-y,z; -y,x,z; -x,-y,-z")
597
598DECLARE_GENERATED_SPACE_GROUP(88, "I 41/a", "-x+1/2,-y+1/2,z+1/2; -y,x+1/2,z+1/4; -x,-y+1/2,-z+1/4")
599DECLARE_TRANSFORMED_SPACE_GROUP(88, "I 41/a :2", "I 41/a | x,y+1/4,z+1/8")
600
601DECLARE_GENERATED_SPACE_GROUP(89, "P 4 2 2", "-x,-y,z; -y,x,z; -x,y,-z")
602DECLARE_GENERATED_SPACE_GROUP(90, "P 4 21 2", "-x,-y,z; -y+1/2,x+1/2,z; -x+1/2,y+1/2,-z")
603DECLARE_GENERATED_SPACE_GROUP(91, "P 41 2 2", "-x,-y,z+1/2; -y,x,z+1/4; -x,y,-z")
604DECLARE_GENERATED_SPACE_GROUP(92, "P 41 21 2", "-x,-y,z+1/2; -y+1/2,x+1/2,z+1/4; -x+1/2,y+1/2,-z+1/4")
605DECLARE_GENERATED_SPACE_GROUP(93, "P 42 2 2", "-x,-y,z; -y,x,z+1/2; -x,y,-z")
606DECLARE_GENERATED_SPACE_GROUP(94, "P 42 21 2", "-x,-y,z; -y+1/2,x+1/2,z+1/2; -x+1/2,y+1/2,-z+1/2")
607DECLARE_GENERATED_SPACE_GROUP(95, "P 43 2 2", "-x,-y,z+1/2; -y,x,z+3/4; -x,y,-z")
608DECLARE_GENERATED_SPACE_GROUP(96, "P 43 21 2", "-x,-y,z+1/2; -y+1/2,x+1/2,z+3/4; -x+1/2,y+1/2,-z+3/4")
609DECLARE_GENERATED_SPACE_GROUP(97, "I 4 2 2", "-x,-y,z; -y,x,z; -x,y,-z")
610DECLARE_GENERATED_SPACE_GROUP(98, "I 41 2 2", "-x+1/2,-y+1/2,z+1/2; -y,x+1/2,z+1/4; -x+1/2,y,-z+3/4")
611DECLARE_GENERATED_SPACE_GROUP(99, "P 4 m m", "-x,-y,z; -y,x,z; x,-y,z")
612DECLARE_GENERATED_SPACE_GROUP(100, "P 4 b m", "-x,-y,z; -y,x,z; x+1/2,-y+1/2,z")
613DECLARE_GENERATED_SPACE_GROUP(101, "P 42 c m", "-x,-y,z; -y,x,z+1/2; x,-y,z+1/2")
614DECLARE_GENERATED_SPACE_GROUP(102, "P 42 n m", "-x,-y,z; -y+1/2,x+1/2,z+1/2; x+1/2,-y+1/2,z+1/2")
615DECLARE_GENERATED_SPACE_GROUP(103, "P 4 c c", "-x,-y,z; -y,x,z; x,-y,z+1/2")
616DECLARE_GENERATED_SPACE_GROUP(104, "P 4 n c", "-x,-y,z; -y,x,z; x+1/2,-y+1/2,z+1/2")
617DECLARE_GENERATED_SPACE_GROUP(105, "P 42 m c", "-x,-y,z; -y,x,z+1/2; x,-y,z")
618DECLARE_GENERATED_SPACE_GROUP(106, "P 42 b c", "-x,-y,z; -y,x,z+1/2; x+1/2,-y+1/2,z")
619DECLARE_GENERATED_SPACE_GROUP(107, "I 4 m m", "-x,-y,z; -y,x,z; x,-y,z")
620DECLARE_GENERATED_SPACE_GROUP(108, "I 4 c m", "-x,-y,z; -y,x,z; x,-y,z+1/2")
621DECLARE_GENERATED_SPACE_GROUP(109, "I 41 m d", "-x+1/2,-y+1/2,z+1/2; -y,x+1/2,z+1/4; x,-y,z")
622DECLARE_GENERATED_SPACE_GROUP(110, "I 41 c d", "-x+1/2,-y+1/2,z+1/2; -y,x+1/2,z+1/4; x,-y,z+1/2")
623DECLARE_GENERATED_SPACE_GROUP(111, "P -4 2 m", "-x,-y,z; y,-x,-z; -x,y,-z")
624DECLARE_GENERATED_SPACE_GROUP(112, "P -4 2 c", "-x,-y,z; y,-x,-z; -x,y,-z+1/2")
625DECLARE_GENERATED_SPACE_GROUP(113, "P -4 21 m", "-x,-y,z; y,-x,-z; -x+1/2,y+1/2,-z")
626DECLARE_GENERATED_SPACE_GROUP(114, "P -4 21 c", "-x,-y,z; y,-x,-z; -x+1/2,y+1/2,-z+1/2")
627DECLARE_GENERATED_SPACE_GROUP(115, "P -4 m 2", "-x,-y,z; y,-x,-z; x,-y,z")
628DECLARE_GENERATED_SPACE_GROUP(116, "P -4 c 2", "-x,-y,z; y,-x,-z; x,-y,z+1/2")
629DECLARE_GENERATED_SPACE_GROUP(117, "P -4 b 2", "-x,-y,z; y,-x,-z; x+1/2,-y+1/2,z")
630DECLARE_GENERATED_SPACE_GROUP(118, "P -4 n 2", "-x,-y,z; y,-x,-z; x+1/2,-y+1/2,z+1/2")
631DECLARE_GENERATED_SPACE_GROUP(119, "I -4 m 2", "-x,-y,z; y,-x,-z; x,-y,z")
632DECLARE_GENERATED_SPACE_GROUP(120, "I -4 c 2", "-x,-y,z; y,-x,-z; x,-y,z+1/2")
633DECLARE_GENERATED_SPACE_GROUP(121, "I -4 2 m", "-x,-y,z; y,-x,-z; -x,y,-z")
634DECLARE_GENERATED_SPACE_GROUP(122, "I -4 2 d", "-x,-y,z; y,-x,-z; -x+1/2,y,-z+3/4")
635DECLARE_GENERATED_SPACE_GROUP(123, "P 4/m m m", "-x,-y,z; -y,x,z; -x,y,-z; -x,-y,-z")
636DECLARE_GENERATED_SPACE_GROUP(124, "P 4/m c c", "-x,-y,z; -y,x,z; -x,y,-z+1/2; -x,-y,-z")
637
638DECLARE_GENERATED_SPACE_GROUP(125, "P 4/n b m", "-x,-y,z; -y,x,z; -x,y,-z; -x+1/2,-y+1/2,-z")
639DECLARE_TRANSFORMED_SPACE_GROUP(125, "P 4/n b m :2", "P 4/n b m | x+1/4,y+1/4,z")
640
641DECLARE_GENERATED_SPACE_GROUP(126, "P 4/n n c", "-x,-y,z; -y,x,z; -x,y,-z; -x+1/2,-y+1/2,-z+1/2")
642DECLARE_TRANSFORMED_SPACE_GROUP(126, "P 4/n n c :2", "P 4/n n c | x+1/4,y+1/4,z+1/4")
643
644DECLARE_GENERATED_SPACE_GROUP(127, "P 4/m b m", "-x,-y,z; -y,x,z; -x+1/2,y+1/2,-z; -x,-y,-z")
645DECLARE_GENERATED_SPACE_GROUP(128, "P 4/m n c", "-x,-y,z; -y,x,z; -x+1/2,y+1/2,-z+1/2; -x,-y,-z")
646
647DECLARE_GENERATED_SPACE_GROUP(129, "P 4/n m m", "-x,-y,z; -y+1/2,x+1/2,z; -x+1/2,y+1/2,-z; -x+1/2,-y+1/2,-z")
648DECLARE_TRANSFORMED_SPACE_GROUP(129, "P 4/n m m :2", "P 4/n m m | x+1/4,y-1/4,z")
649
650DECLARE_GENERATED_SPACE_GROUP(130, "P 4/n c c", "-x,-y,z; -y+1/2,x+1/2,z; -x+1/2,y+1/2,-z+1/2; -x+1/2,-y+1/2,-z")
651DECLARE_TRANSFORMED_SPACE_GROUP(130, "P 4/n c c :2", "P 4/n c c | x+1/4,y-1/4,z")
652
653DECLARE_GENERATED_SPACE_GROUP(131, "P 42/m m c", "-x,-y,z; -y,x,z+1/2; -x,y,-z; -x,-y,-z")
654DECLARE_GENERATED_SPACE_GROUP(132, "P 42/m c m", "-x,-y,z; -y,x,z+1/2; -x,y,-z+1/2; -x,-y,-z")
655
656DECLARE_GENERATED_SPACE_GROUP(133, "P 42/n b c", "-x,-y,z; -y+1/2,x+1/2,z+1/2; -x,y,-z+1/2; -x+1/2,-y+1/2,-z+1/2")
657DECLARE_TRANSFORMED_SPACE_GROUP(133, "P 42/n b c :2", "P 42/n b c | x+1/4,y-1/4,z+1/4")
658
659DECLARE_GENERATED_SPACE_GROUP(134, "P 42/n n m", "-x,-y,z; -y+1/2,x+1/2,z+1/2; -x,y,-z; -x+1/2,-y+1/2,-z+1/2")
660DECLARE_TRANSFORMED_SPACE_GROUP(134, "P 42/n n m :2", "P 42/n n m | x+1/4,y-1/4,z+1/4")
661
662DECLARE_GENERATED_SPACE_GROUP(135, "P 42/m b c", "-x,-y,z; -y,x,z+1/2; -x+1/2,y+1/2,-z; -x,-y,-z")
663DECLARE_GENERATED_SPACE_GROUP(136, "P 42/m n m", "-x,-y,z; -y+1/2,x+1/2,z+1/2; -x+1/2,y+1/2,-z+1/2; -x,-y,-z")
664
666 "-x,-y,z; -y+1/2,x+1/2,z+1/2; -x+1/2,y+1/2,-z+1/2; -x+1/2,-y+1/2,-z+1/2")
667DECLARE_TRANSFORMED_SPACE_GROUP(137, "P 42/n m c :2", "P 42/n m c | x+1/4,y-1/4,z+1/4")
668
669DECLARE_GENERATED_SPACE_GROUP(138, "P 42/n c m", "-x,-y,z; -y+1/2,x+1/2,z+1/2; -x+1/2,y+1/2,-z; -x+1/2,-y+1/2,-z+1/2")
670DECLARE_TRANSFORMED_SPACE_GROUP(138, "P 42/n c m :2", "P 42/n c m | x+1/4,y-1/4,z+1/4")
671
672DECLARE_GENERATED_SPACE_GROUP(139, "I 4/m m m", "-x,-y,z; -y,x,z; -x,y,-z; -x,-y,-z")
673DECLARE_GENERATED_SPACE_GROUP(140, "I 4/m c m", "-x,-y,z; -y,x,z; -x,y,-z+1/2; -x,-y,-z")
675 "-x+1/2,-y+1/2,z+1/2; -y,x+1/2,z+1/4; -x+1/2,y,-z+3/4; -x,-y+1/2,-z+1/4")
676DECLARE_TRANSFORMED_SPACE_GROUP(141, "I 41/a m d :2", "I 41/a m d | x,y-1/4,z+1/8")
677
679 "-x+1/2,-y+1/2,z+1/2; -y,x+1/2,z+1/4; -x+1/2,y,-z+1/4; -x,-y+1/2,-z+1/4")
680DECLARE_TRANSFORMED_SPACE_GROUP(142, "I 41/a c d :2", "I 41/a c d | x,y-1/4,z+1/8")
681
682// Trigonal
683DECLARE_GENERATED_SPACE_GROUP(143, "P 3", "-y,x-y,z")
684DECLARE_GENERATED_SPACE_GROUP(144, "P 31", "-y,x-y,z+1/3")
685DECLARE_GENERATED_SPACE_GROUP(145, "P 32", "-y,x-y,z+2/3")
686
687DECLARE_GENERATED_SPACE_GROUP(146, "R 3", "-y,x-y,z")
688DECLARE_TRANSFORMED_SPACE_GROUP(146, "R 3 :r", "R 3 | 2/3x-1/3y-1/3z, 1/3x+1/3y-2/3z, 1/3x+1/3y+1/3z")
689
690DECLARE_GENERATED_SPACE_GROUP(147, "P -3", "-y,x-y,z; -x,-y,-z")
691
692DECLARE_GENERATED_SPACE_GROUP(148, "R -3", "-y,x-y,z; -x,-y,-z")
693DECLARE_TRANSFORMED_SPACE_GROUP(148, "R -3 :r", "R -3 | 2/3x-1/3y-1/3z, 1/3x+1/3y-2/3z, 1/3x+1/3y+1/3z")
694
695DECLARE_GENERATED_SPACE_GROUP(149, "P 3 1 2", "-y,x-y,z; -y,-x,-z")
696DECLARE_GENERATED_SPACE_GROUP(150, "P 3 2 1", "-y,x-y,z; y,x,-z")
697DECLARE_GENERATED_SPACE_GROUP(151, "P 31 1 2", "-y,x-y,z+1/3; -y,-x,-z+2/3")
698DECLARE_GENERATED_SPACE_GROUP(152, "P 31 2 1", "-y,x-y,z+1/3; y,x,-z")
699DECLARE_GENERATED_SPACE_GROUP(153, "P 32 1 2", "-y,x-y,z+2/3; -y,-x,-z+1/3")
700DECLARE_GENERATED_SPACE_GROUP(154, "P 32 2 1", "-y,x-y,z+2/3; y,x,-z")
701
702DECLARE_GENERATED_SPACE_GROUP(155, "R 32", "-y,x-y,z; y,x,-z")
703DECLARE_TRANSFORMED_SPACE_GROUP(155, "R 32 :r", "R 32 | 2/3x-1/3y-1/3z, 1/3x+1/3y-2/3z, 1/3x+1/3y+1/3z")
704
705DECLARE_GENERATED_SPACE_GROUP(156, "P 3 m 1", "-y,x-y,z; -y,-x,z")
706DECLARE_GENERATED_SPACE_GROUP(157, "P 3 1 m", "-y,x-y,z; y,x,z")
707DECLARE_GENERATED_SPACE_GROUP(158, "P 3 c 1", "-y,x-y,z; -y,-x,z+1/2")
708DECLARE_GENERATED_SPACE_GROUP(159, "P 3 1 c", "-y,x-y,z; y,x,z+1/2")
709
710DECLARE_GENERATED_SPACE_GROUP(160, "R 3 m", "-y,x-y,z; -y,-x,z")
711DECLARE_TRANSFORMED_SPACE_GROUP(160, "R 3 m :r", "R 3 m | 2/3x-1/3y-1/3z, 1/3x+1/3y-2/3z, 1/3x+1/3y+1/3z")
712
713DECLARE_GENERATED_SPACE_GROUP(161, "R 3 c", "-y,x-y,z; -y,-x,z+1/2")
714DECLARE_TRANSFORMED_SPACE_GROUP(161, "R 3 c :r", "R 3 c | 2/3x-1/3y-1/3z, 1/3x+1/3y-2/3z, 1/3x+1/3y+1/3z")
715
716DECLARE_GENERATED_SPACE_GROUP(162, "P -3 1 m", "-y,x-y,z; -y,-x,-z; -x,-y,-z")
717DECLARE_GENERATED_SPACE_GROUP(163, "P -3 1 c", "-y,x-y,z; -y,-x,-z+1/2; -x,-y,-z")
718DECLARE_GENERATED_SPACE_GROUP(164, "P -3 m 1", "-y,x-y,z; y,x,-z; -x,-y,-z")
719DECLARE_GENERATED_SPACE_GROUP(165, "P -3 c 1", "-y,x-y,z; y,x,-z+1/2; -x,-y,-z")
720
721DECLARE_GENERATED_SPACE_GROUP(166, "R -3 m", "-y,x-y,z; y,x,-z; -x,-y,-z")
722DECLARE_TRANSFORMED_SPACE_GROUP(166, "R -3 m :r", "R -3 m | 2/3x-1/3y-1/3z, 1/3x+1/3y-2/3z, 1/3x+1/3y+1/3z")
723
724DECLARE_GENERATED_SPACE_GROUP(167, "R -3 c", "-y,x-y,z; y,x,-z+1/2; -x,-y,-z")
725DECLARE_TRANSFORMED_SPACE_GROUP(167, "R -3 c :r", "R -3 c | 2/3x-1/3y-1/3z, 1/3x+1/3y-2/3z, 1/3x+1/3y+1/3z")
726
727// Hexagonal
728DECLARE_GENERATED_SPACE_GROUP(168, "P 6", "-y,x-y,z; -x,-y,z")
729DECLARE_GENERATED_SPACE_GROUP(169, "P 61", "-y,x-y,z+1/3; -x,-y,z+1/2")
730DECLARE_GENERATED_SPACE_GROUP(170, "P 65", "-y,x-y,z+2/3; -x,-y,z+1/2")
731DECLARE_GENERATED_SPACE_GROUP(171, "P 62", "-y,x-y,z+2/3; -x,-y,z")
732DECLARE_GENERATED_SPACE_GROUP(172, "P 64", "-y,x-y,z+1/3; -x,-y,z")
733DECLARE_GENERATED_SPACE_GROUP(173, "P 63", "-y,x-y,z; -x,-y,z+1/2")
734DECLARE_GENERATED_SPACE_GROUP(174, "P -6", "-y,x-y,z; x,y,-z")
735DECLARE_GENERATED_SPACE_GROUP(175, "P 6/m", "-y,x-y,z; -x,-y,z; -x,-y,-z")
736DECLARE_GENERATED_SPACE_GROUP(176, "P 63/m", "-y,x-y,z; -x,-y,z+1/2; -x,-y,-z")
737DECLARE_GENERATED_SPACE_GROUP(177, "P 6 2 2", "-y,x-y,z; -x,-y,z; y,x,-z")
738DECLARE_GENERATED_SPACE_GROUP(178, "P 61 2 2", "-y,x-y,z+1/3; -x,-y,z+1/2; y,x,-z+1/3")
739DECLARE_GENERATED_SPACE_GROUP(179, "P 65 2 2", "-y,x-y,z+2/3; -x,-y,z+1/2; y,x,-z+2/3")
740DECLARE_GENERATED_SPACE_GROUP(180, "P 62 2 2", "-y,x-y,z+2/3; -x,-y,z; y,x,-z+2/3")
741DECLARE_GENERATED_SPACE_GROUP(181, "P 64 2 2", "-y,x-y,z+1/3; -x,-y,z; y,x,-z+1/3")
742DECLARE_GENERATED_SPACE_GROUP(182, "P 63 2 2", "-y,x-y,z; -x,-y,z+1/2; y,x,-z")
743DECLARE_GENERATED_SPACE_GROUP(183, "P 6 m m", "-y,x-y,z; -x,-y,z; -y,-x,z")
744DECLARE_GENERATED_SPACE_GROUP(184, "P 6 c c", "-y,x-y,z; -x,-y,z; -y,-x,z+1/2")
745DECLARE_GENERATED_SPACE_GROUP(185, "P 63 c m", "-y,x-y,z; -x,-y,z+1/2; -y,-x,z+1/2")
746DECLARE_GENERATED_SPACE_GROUP(186, "P 63 m c", "-y,x-y,z; -x,-y,z+1/2; -y,-x,z")
747DECLARE_GENERATED_SPACE_GROUP(187, "P -6 m 2", "-y,x-y,z; x,y,-z; -y,-x,z")
748DECLARE_GENERATED_SPACE_GROUP(188, "P -6 c 2", "-y,x-y,z; x,y,-z+1/2; -y,-x,z+1/2")
749DECLARE_GENERATED_SPACE_GROUP(189, "P -6 2 m", "-y,x-y,z; x,y,-z; y,x,-z")
750DECLARE_GENERATED_SPACE_GROUP(190, "P -6 2 c", "-y,x-y,z; x,y,-z+1/2; y,x,-z")
751DECLARE_GENERATED_SPACE_GROUP(191, "P 6/m m m", "-y,x-y,z; x,y,-z; y,x,-z; -x,-y,-z")
752DECLARE_GENERATED_SPACE_GROUP(192, "P 6/m c c", "-y,x-y,z; -x,-y,z; y,x,-z+1/2; -x,-y,-z")
753DECLARE_GENERATED_SPACE_GROUP(193, "P 63/m c m", "-y,x-y,z; -x,-y,z+1/2; y,x,-z+1/2; -x,-y,-z")
754DECLARE_GENERATED_SPACE_GROUP(194, "P 63/m m c", "-y,x-y,z; -x,-y,z+1/2; y,x,-z; -x,-y,-z")
755
756// Cubic
757DECLARE_GENERATED_SPACE_GROUP(195, "P 2 3", "-x,-y,z; -x,y,-z; z,x,y")
758DECLARE_GENERATED_SPACE_GROUP(196, "F 2 3", "-x,-y,z; -x,y,-z; z,x,y")
759DECLARE_GENERATED_SPACE_GROUP(197, "I 2 3", "-x,-y,z; -x,y,-z; z,x,y")
760DECLARE_GENERATED_SPACE_GROUP(198, "P 21 3", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; z,x,y")
761DECLARE_GENERATED_SPACE_GROUP(199, "I 21 3", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; z,x,y")
762DECLARE_GENERATED_SPACE_GROUP(200, "P m -3", "-x,-y,z; -x,y,-z; z,x,y; -x,-y,-z")
763
764DECLARE_GENERATED_SPACE_GROUP(201, "P n -3", "-x,-y,z; -x,y,-z; z,x,y; -x+1/2,-y+1/2,-z+1/2")
765DECLARE_TRANSFORMED_SPACE_GROUP(201, "P n -3 :2", "P n -3 | x+1/4,y+1/4,z+1/4")
766
767DECLARE_GENERATED_SPACE_GROUP(202, "F m -3", "-x,-y,z; -x,y,-z; z,x,y; -x,-y,-z")
768
769DECLARE_GENERATED_SPACE_GROUP(203, "F d -3", "-x,-y,z; -x,y,-z; z,x,y; -x+1/4,-y+1/4,-z+1/4")
770DECLARE_TRANSFORMED_SPACE_GROUP(203, "F d -3 :2", "F d -3 | x+1/8,y+1/8,z+1/8")
771
772DECLARE_GENERATED_SPACE_GROUP(204, "I m -3", "-x,-y,z; -x,y,-z; z,x,y; -x,-y,-z")
773DECLARE_GENERATED_SPACE_GROUP(205, "P a -3", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; z,x,y; -x,-y,-z")
774DECLARE_GENERATED_SPACE_GROUP(206, "I a -3", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; z,x,y; -x,-y,-z")
775DECLARE_GENERATED_SPACE_GROUP(207, "P 4 3 2", "-x,-y,z; -x,y,-z; z,x,y; y,x,-z")
776DECLARE_GENERATED_SPACE_GROUP(208, "P 42 3 2", "-x,-y,z; -x,y,-z; z,x,y; y+1/2,x+1/2,-z+1/2")
777DECLARE_GENERATED_SPACE_GROUP(209, "F 4 3 2", "-x,-y,z; -x,y,-z; z,x,y; y,x,-z")
778
779DECLARE_GENERATED_SPACE_GROUP(210, "F 41 3 2", "-x,-y+1/2,z+1/2; -x+1/2,y+1/2,-z; z,x,y; y+3/4,x+1/4,-z+3/4")
780DECLARE_GENERATED_SPACE_GROUP(211, "I 4 3 2", "-x,-y,z; -x,y,-z; z,x,y; y,x,-z")
781DECLARE_GENERATED_SPACE_GROUP(212, "P 43 3 2", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; z,x,y; y+1/4,x+3/4,-z+3/4")
782DECLARE_GENERATED_SPACE_GROUP(213, "P 41 3 2", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; z,x,y; y+3/4,x+1/4,-z+1/4")
783DECLARE_GENERATED_SPACE_GROUP(214, "I 41 3 2", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; z,x,y; y+3/4,x+1/4,-z+1/4")
784DECLARE_GENERATED_SPACE_GROUP(215, "P -4 3 m", "-x,-y,z; -x,y,-z; z,x,y; y,x,z")
785DECLARE_GENERATED_SPACE_GROUP(216, "F -4 3 m", "-x,-y,z; -x,y,-z; z,x,y; y,x,z")
786DECLARE_GENERATED_SPACE_GROUP(217, "I -4 3 m", "-x,-y,z; -x,y,-z; z,x,y; y,x,z")
787DECLARE_GENERATED_SPACE_GROUP(218, "P -4 3 n", "-x,-y,z; -x,y,-z; z,x,y; y+1/2,x+1/2,z+1/2")
788DECLARE_GENERATED_SPACE_GROUP(219, "F -4 3 c", "-x,-y,z; -x,y,-z; z,x,y; y+1/2,x+1/2,z+1/2")
789DECLARE_GENERATED_SPACE_GROUP(220, "I -4 3 d", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; z,x,y; y+1/4,x+1/4,z+1/4")
790DECLARE_GENERATED_SPACE_GROUP(221, "P m -3 m", "-x,-y,z; -x,y,-z; z,x,y; y,x,-z; -x,-y,-z")
791
792DECLARE_GENERATED_SPACE_GROUP(222, "P n -3 n", "-x,-y,z; -x,y,-z; z,x,y; y,x,-z; -x+1/2,-y+1/2,-z+1/2")
793DECLARE_TRANSFORMED_SPACE_GROUP(222, "P n -3 n :2", "P n -3 n | x+1/4,y+1/4,z+1/4")
794
795DECLARE_GENERATED_SPACE_GROUP(223, "P m -3 n", "-x,-y,z; -x,y,-z; z,x,y; y+1/2,x+1/2,-z+1/2; -x,-y,-z")
796
797DECLARE_GENERATED_SPACE_GROUP(224, "P n -3 m", "-x,-y,z; -x,y,-z; z,x,y; y+1/2,x+1/2,-z+1/2; -x+1/2,-y+1/2,-z+1/2")
798DECLARE_TRANSFORMED_SPACE_GROUP(224, "P n -3 m :2", "P n -3 m | x+1/4,y+1/4,z+1/4")
799
800DECLARE_GENERATED_SPACE_GROUP(225, "F m -3 m", "-x,-y,z; -x,y,-z; z,x,y; y,x,-z; -x,-y,-z")
801DECLARE_GENERATED_SPACE_GROUP(226, "F m -3 c", "-x,-y,z; -x,y,-z; z,x,y; y+1/2,x+1/2,-z+1/2; -x,-y,-z")
802
804 "-x,-y+1/2,z+1/2; -x+1/2,y+1/2,-z; z,x,y; "
805 "y+3/4,x+1/4,-z+3/4; -x+1/4,-y+1/4,-z+1/4")
806DECLARE_TRANSFORMED_SPACE_GROUP(227, "F d -3 m :2", "F d -3 m | x+1/8,y+1/8,z+1/8")
807
808DECLARE_GENERATED_SPACE_GROUP(228, "F d -3 c",
809 "-x,-y+1/2,z+1/2; -x+1/2,y+1/2,-z; z,x,y; "
810 "y+3/4,x+1/4,-z+3/4; -x+3/4,-y+3/4,-z+3/4")
811DECLARE_TRANSFORMED_SPACE_GROUP(228, "F d -3 c :2", "F d -3 c | x+3/8,y+3/8,z+3/8")
812
813DECLARE_GENERATED_SPACE_GROUP(229, "I m -3 m", "-x,-y,z; -x,y,-z; z,x,y; y,x,-z; -x,-y,-z")
814DECLARE_GENERATED_SPACE_GROUP(230, "I a -3 d", "-x+1/2,-y,z+1/2; -x,y+1/2,-z+1/2; z,x,y; y+3/4,x+1/4,-z+1/4; -x,-y,-z")
815
816} // namespace Mantid::Geometry
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
#define DECLARE_TABULATED_SPACE_GROUP(number, hmSymbol, symmetryOperations)
#define DECLARE_TRANSFORMED_SPACE_GROUP(number, hmSymbol, generators)
#define DECLARE_GENERATED_SPACE_GROUP(number, hmSymbol, generators)
#define DECLARE_TRANSFORMED_ORTHORHOMBIC_SPACE_GROUP(number, hmSymbol, generators)
#define DECLARE_ORTHORHOMBIC_SPACE_GROUP(number, hmSymbol, generators)
AbstractSpaceGroupGenerator is used by SpaceGroupFactory to delay (possibly costly) construction of s...
SpaceGroup_const_sptr getPrototype()
Returns the internally stored prototype, generates one if necessary.
AbstractSpaceGroupGenerator(size_t number, std::string hmSymbol, std::string generatorInformation)
Constructor for AbstractSpaceGroupGenerator.
virtual Group_const_sptr generateGroup() const =0
SpaceGroup_const_sptr generatePrototype()
Generates a prototype space group object.
Group_const_sptr generateGroup() const override
Uses an algorithm based on Shmueli, U.
AlgorithmicSpaceGroupGenerator(size_t number, const std::string &hmSymbol, const std::string &generatorInformation)
Constructor of AlgorithmicSpaceGroupGenerator which throws an std::runtime_error exception when the g...
std::string getCenteringSymbol() const
Returns the centering symbol, which is extracted from the Hermann-Mauguin-symbol.
std::multimap< std::string, std::string > m_pointGroupMap
std::vector< std::string > subscribedSpaceGroupSymbols() const
Returns a vector with all subscribed space group symbols.
void fillPointGroupMap()
Fills the internal multimap that maintains the mapping between space and point groups.
void subscribe(const AbstractSpaceGroupGenerator_sptr &generator)
Puts the space group factory into the factory.
void subscribeTabulatedSpaceGroup(size_t number, const std::string &hmSymbol, const std::string &symmetryOperations)
Subscribes a "tabulated space group" into the factory where all symmetry operations need to be suppli...
void unsubscribeSpaceGroup(const std::string &hmSymbol)
Unsubscribes the space group with the given Hermann-Mauguin symbol, but throws std::invalid_argument ...
SpaceGroup_const_sptr getPrototype(const std::string &hmSymbol)
Returns a prototype object for the requested space group.
SpaceGroup_const_sptr constructFromPrototype(const SpaceGroup_const_sptr &prototype) const
Returns a copy-constructed instance of the supplied space group prototype object.
void subscribeGeneratedSpaceGroup(size_t number, const std::string &hmSymbol, const std::string &generators)
Subscribes a space group into the factory using generators.
std::multimap< size_t, std::string > m_numberMap
std::map< std::string, AbstractSpaceGroupGenerator_sptr > m_generatorMap
std::vector< size_t > subscribedSpaceGroupNumbers() const
Returns a vector with all subscribed space group numbers.
SpaceGroup_const_sptr createSpaceGroup(const std::string &hmSymbol)
Creates a space group given the Hermann-Mauguin symbol, throws std::invalid_argument if symbol is not...
bool isSubscribed(const std::string &hmSymbol) const
Returns true if space group with given symbol is subscribed.
std::string getTransformedSymbolOrthorhombic(const std::string &hmSymbol, const std::string &transformation) const
Method to get the transformed symbol of an orthorhombic space group under the supplied transformation...
SpaceGroupFactoryImpl()
Constructor cannot be called, since SingletonHolder is used.
static MatrixVectorPair< int, V3R > parseIdentifier(const std::string &identifier)
Tries to parse the given symbol.
Crystallographic symmetry operations are composed of a rotational component, which is represented by ...
SymmetryOperation inverse() const
Returns the inverse of the symmetry operation.
const Kernel::IntMatrix & matrix() const
Returns a const reference to the internally stored matrix.
TabulatedSpaceGroupGenerator(size_t number, const std::string &hmSymbol, const std::string &generatorInformation)
Constructor of TabulatedSpaceGroupGenerator, throws an std::runtime_error exception if generatorInfor...
Group_const_sptr generateGroup() const override
Returns a group that contains the symmetry operations in.
TransformationSpaceGroupGenerator(size_t number, const std::string &hmSymbol, const std::string &generatorInformation)
Constructor of TransformationSpaceGroupGenerator that may throw an std::invalid_argument exception wh...
Group_const_sptr generateGroup() const override
Generates a group from the SymmetryOperations obtained by applying the stored transformation to the b...
virtual SpaceGroup_const_sptr getBaseSpaceGroup() const
This method is virtual for testing purposes so that using the actual SpaceGroupFactory can be circumv...
void setBaseAndTransformation(const std::string &generatorInformation)
Method to extract base space group symbol and transformation.
Records the filename, the description of failure and the line on which it happened.
Definition: Exception.h:115
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
MANTID_GEOMETRY_DLL Group_const_sptr operator*(const Group_const_sptr &lhs, const Group_const_sptr &rhs)
Convenience operator* for directly multiplying groups using shared pointers.
Definition: Group.cpp:248
std::shared_ptr< PointGroup > PointGroup_sptr
Shared pointer to a PointGroup.
Definition: PointGroup.h:67
bool MANTID_GEOMETRY_DLL isValidGeneratorString(const std::string &generatorString)
Free function that tries to parse the given list of symmetry operations and returns true if successfu...
std::shared_ptr< const SpaceGroup > SpaceGroup_const_sptr
Definition: SpaceGroup.h:82
std::shared_ptr< AbstractSpaceGroupGenerator > AbstractSpaceGroupGenerator_sptr
std::shared_ptr< const Group > Group_const_sptr
Definition: Group.h:179
STL namespace.