Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mantid::Geometry::TransformationSpaceGroupGenerator Class Reference

Concrete generator that generates a space group from another space group using a transformation. More...

#include <SpaceGroupFactory.h>

Inheritance diagram for Mantid::Geometry::TransformationSpaceGroupGenerator:
Mantid::Geometry::AbstractSpaceGroupGenerator

Public Member Functions

 TransformationSpaceGroupGenerator (size_t number, const std::string &hmSymbol, const std::string &generatorInformation)
 Constructor of TransformationSpaceGroupGenerator that may throw an std::invalid_argument exception when the generatorInformation- argument can not be interpreted as (base group symbol | transformation). More...
 
- Public Member Functions inherited from Mantid::Geometry::AbstractSpaceGroupGenerator
 AbstractSpaceGroupGenerator (size_t number, std::string hmSymbol, std::string generatorInformation)
 Constructor for AbstractSpaceGroupGenerator. More...
 
std::string getGeneratorString () const
 
std::string getHMSymbol () const
 
size_t getNumber () const
 
SpaceGroup_const_sptr getPrototype ()
 Returns the internally stored prototype, generates one if necessary. More...
 
virtual ~AbstractSpaceGroupGenerator ()=default
 

Protected Member Functions

Group_const_sptr generateGroup () const override
 Generates a group from the SymmetryOperations obtained by applying the stored transformation to the base group. More...
 
virtual SpaceGroup_const_sptr getBaseSpaceGroup () const
 This method is virtual for testing purposes so that using the actual SpaceGroupFactory can be circumvented in the unit tests. More...
 
void setBaseAndTransformation (const std::string &generatorInformation)
 Method to extract base space group symbol and transformation. More...
 
virtual Group_const_sptr generateGroup () const =0
 

Protected Attributes

std::string m_baseGroupHMSymbol
 
std::string m_transformation
 

Detailed Description

Concrete generator that generates a space group from another space group using a transformation.

Definition at line 79 of file SpaceGroupFactory.h.

Constructor & Destructor Documentation

◆ TransformationSpaceGroupGenerator()

Mantid::Geometry::TransformationSpaceGroupGenerator::TransformationSpaceGroupGenerator ( size_t  number,
const std::string &  hmSymbol,
const std::string &  generatorInformation 
)

Constructor of TransformationSpaceGroupGenerator that may throw an std::invalid_argument exception when the generatorInformation- argument can not be interpreted as (base group symbol | transformation).

Definition at line 141 of file SpaceGroupFactory.cpp.

References setBaseAndTransformation().

Member Function Documentation

◆ generateGroup()

Group_const_sptr Mantid::Geometry::TransformationSpaceGroupGenerator::generateGroup ( ) const
overrideprotectedvirtual

Generates a group from the SymmetryOperations obtained by applying the stored transformation to the base group.

Implements Mantid::Geometry::AbstractSpaceGroupGenerator.

Definition at line 149 of file SpaceGroupFactory.cpp.

References getBaseSpaceGroup(), and m_transformation.

◆ getBaseSpaceGroup()

SpaceGroup_const_sptr Mantid::Geometry::TransformationSpaceGroupGenerator::getBaseSpaceGroup ( ) const
protectedvirtual

This method is virtual for testing purposes so that using the actual SpaceGroupFactory can be circumvented in the unit tests.

Definition at line 159 of file SpaceGroupFactory.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance(), and m_baseGroupHMSymbol.

Referenced by generateGroup().

◆ setBaseAndTransformation()

void Mantid::Geometry::TransformationSpaceGroupGenerator::setBaseAndTransformation ( const std::string &  generatorInformation)
protected

Method to extract base space group symbol and transformation.

This method tries to extract the symbol of the base space group and the transformation matrix/vector pair from the supplied generator string. The expected format of the string is:

 Symbol of base space group | Specification of transformation

An example could be, to generate space group P 1 n 1 from P 1 c 1:

 P 1 c 1 | -x+z,y,-x

This works similarly for origin shifts and so on.

Parameters
generatorInformation:: Generator string in the format (base group | transformation).

Definition at line 181 of file SpaceGroupFactory.cpp.

References m_baseGroupHMSymbol, and m_transformation.

Referenced by TransformationSpaceGroupGenerator().

Member Data Documentation

◆ m_baseGroupHMSymbol

std::string Mantid::Geometry::TransformationSpaceGroupGenerator::m_baseGroupHMSymbol
protected

Definition at line 90 of file SpaceGroupFactory.h.

Referenced by getBaseSpaceGroup(), and setBaseAndTransformation().

◆ m_transformation

std::string Mantid::Geometry::TransformationSpaceGroupGenerator::m_transformation
protected

Definition at line 91 of file SpaceGroupFactory.h.

Referenced by generateGroup(), and setBaseAndTransformation().


The documentation for this class was generated from the following files: