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

#include <SpaceGroupFactory.h>

Public Member Functions

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 registered. More...
 
bool isSubscribed (const std::string &hmSymbol) const
 Returns true if space group with given symbol is subscribed. More...
 
bool isSubscribed (size_t number) const
 Returns true if space group with given number is subscribed. More...
 
std::vector< size_t > subscribedSpaceGroupNumbers () const
 Returns a vector with all subscribed space group numbers. More...
 
std::vector< std::string > subscribedSpaceGroupSymbols () const
 Returns a vector with all subscribed space group symbols. More...
 
std::vector< std::string > subscribedSpaceGroupSymbols (const PointGroup_sptr &pointGroup)
 
std::vector< std::string > subscribedSpaceGroupSymbols (size_t number) const
 Returns a vector with all symbols that correspond to a space group number. More...
 
void subscribeGeneratedSpaceGroup (size_t number, const std::string &hmSymbol, const std::string &generators)
 Subscribes a space group into the factory using generators. More...
 
template<typename T >
void subscribeOrthorhombicSpaceGroup (size_t number, const std::string &hmSymbol, const std::string &generatorString)
 Specialized method to subscribe an orthorhombic space group. More...
 
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 supplied, including centering. More...
 
template<typename T >
void subscribeUsingGenerator (size_t number, const std::string &hmSymbol, const std::string &generatorString)
 Templated method to subscribe other generators than the ones provided here. More...
 
void unsubscribeSpaceGroup (const std::string &hmSymbol)
 Unsubscribes the space group with the given Hermann-Mauguin symbol, but throws std::invalid_argument if symbol is not registered. More...
 
virtual ~SpaceGroupFactoryImpl ()=default
 

Protected Member Functions

SpaceGroup_const_sptr constructFromPrototype (const SpaceGroup_const_sptr &prototype) const
 Returns a copy-constructed instance of the supplied space group prototype object. More...
 
void fillPointGroupMap ()
 Fills the internal multimap that maintains the mapping between space and point groups. More...
 
SpaceGroup_const_sptr getPrototype (const std::string &hmSymbol)
 Returns a prototype object for the requested space group. More...
 
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. More...
 
 SpaceGroupFactoryImpl ()
 Constructor cannot be called, since SingletonHolder is used. More...
 
void subscribe (const AbstractSpaceGroupGenerator_sptr &generator)
 Puts the space group factory into the factory. More...
 

Protected Attributes

std::map< std::string, AbstractSpaceGroupGenerator_sptrm_generatorMap
 
std::multimap< size_t, std::string > m_numberMap
 
std::multimap< std::string, std::string > m_pointGroupMap
 

Friends

struct Mantid::Kernel::CreateUsingNew< SpaceGroupFactoryImpl >
 

Detailed Description

Definition at line 130 of file SpaceGroupFactory.h.

Constructor & Destructor Documentation

◆ ~SpaceGroupFactoryImpl()

virtual Mantid::Geometry::SpaceGroupFactoryImpl::~SpaceGroupFactoryImpl ( )
virtualdefault

◆ SpaceGroupFactoryImpl()

Mantid::Geometry::SpaceGroupFactoryImpl::SpaceGroupFactoryImpl ( )
protected

Constructor cannot be called, since SingletonHolder is used.

Definition at line 411 of file SpaceGroupFactory.cpp.

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

Member Function Documentation

◆ constructFromPrototype()

SpaceGroup_const_sptr Mantid::Geometry::SpaceGroupFactoryImpl::constructFromPrototype ( const SpaceGroup_const_sptr prototype) const
protected

Returns a copy-constructed instance of the supplied space group prototype object.

Definition at line 370 of file SpaceGroupFactory.cpp.

Referenced by createSpaceGroup().

◆ createSpaceGroup()

SpaceGroup_const_sptr Mantid::Geometry::SpaceGroupFactoryImpl::createSpaceGroup ( const std::string &  hmSymbol)

Creates a space group given the Hermann-Mauguin symbol, throws std::invalid_argument if symbol is not registered.

Definition at line 213 of file SpaceGroupFactory.cpp.

References constructFromPrototype(), getPrototype(), and isSubscribed().

◆ fillPointGroupMap()

void Mantid::Geometry::SpaceGroupFactoryImpl::fillPointGroupMap ( )
protected

Fills the internal multimap that maintains the mapping between space and point groups.

Definition at line 376 of file SpaceGroupFactory.cpp.

References getPrototype(), m_generatorMap, and m_pointGroupMap.

Referenced by subscribedSpaceGroupSymbols().

◆ getPrototype()

SpaceGroup_const_sptr Mantid::Geometry::SpaceGroupFactoryImpl::getPrototype ( const std::string &  hmSymbol)
protected

Returns a prototype object for the requested space group.

Definition at line 387 of file SpaceGroupFactory.cpp.

References m_generatorMap.

Referenced by createSpaceGroup(), and fillPointGroupMap().

◆ getTransformedSymbolOrthorhombic()

std::string Mantid::Geometry::SpaceGroupFactoryImpl::getTransformedSymbolOrthorhombic ( const std::string &  hmSymbol,
const std::string &  transformation 
) const
protected

Method to get the transformed symbol of an orthorhombic space group under the supplied transformation.

Definition at line 328 of file SpaceGroupFactory.cpp.

References Mantid::Geometry::SymmetryOperation::inverse().

◆ isSubscribed() [1/2]

bool Mantid::Geometry::SpaceGroupFactoryImpl::isSubscribed ( const std::string &  hmSymbol) const

Returns true if space group with given symbol is subscribed.

Definition at line 222 of file SpaceGroupFactory.cpp.

References m_generatorMap.

Referenced by createSpaceGroup(), and unsubscribeSpaceGroup().

◆ isSubscribed() [2/2]

bool Mantid::Geometry::SpaceGroupFactoryImpl::isSubscribed ( size_t  number) const

Returns true if space group with given number is subscribed.

Definition at line 227 of file SpaceGroupFactory.cpp.

References m_numberMap.

◆ subscribe()

void Mantid::Geometry::SpaceGroupFactoryImpl::subscribe ( const AbstractSpaceGroupGenerator_sptr generator)
protected

Puts the space group factory into the factory.

Definition at line 398 of file SpaceGroupFactory.cpp.

References m_generatorMap, m_numberMap, and m_pointGroupMap.

◆ subscribedSpaceGroupNumbers()

std::vector< size_t > Mantid::Geometry::SpaceGroupFactoryImpl::subscribedSpaceGroupNumbers ( ) const

Returns a vector with all subscribed space group numbers.

Definition at line 252 of file SpaceGroupFactory.cpp.

References m_numberMap.

Referenced by export_SpaceGroupFactory().

◆ subscribedSpaceGroupSymbols() [1/3]

std::vector< std::string > Mantid::Geometry::SpaceGroupFactoryImpl::subscribedSpaceGroupSymbols ( ) const

Returns a vector with all subscribed space group symbols.

Definition at line 230 of file SpaceGroupFactory.cpp.

References m_generatorMap.

◆ subscribedSpaceGroupSymbols() [2/3]

std::vector< std::string > Mantid::Geometry::SpaceGroupFactoryImpl::subscribedSpaceGroupSymbols ( const PointGroup_sptr pointGroup)

Definition at line 263 of file SpaceGroupFactory.cpp.

References fillPointGroupMap(), and m_pointGroupMap.

◆ subscribedSpaceGroupSymbols() [3/3]

std::vector< std::string > Mantid::Geometry::SpaceGroupFactoryImpl::subscribedSpaceGroupSymbols ( size_t  number) const

Returns a vector with all symbols that correspond to a space group number.

Definition at line 239 of file SpaceGroupFactory.cpp.

References m_numberMap.

◆ subscribeGeneratedSpaceGroup()

void Mantid::Geometry::SpaceGroupFactoryImpl::subscribeGeneratedSpaceGroup ( size_t  number,
const std::string &  hmSymbol,
const std::string &  generators 
)

Subscribes a space group into the factory using generators.

With this method one can register a space group that is generated by an algorithm based on the instructions in [1]. Currently it's important that the Herrman-Mauguin symbol starts with an upper case letter, because that is used to generate centering translations (it should be upper case anyway).

The method will throw an exception if the number or symbol is already registered.

[1] Shmueli, U. Acta Crystallogr. A 40, 559–567 (1984). http://dx.doi.org/10.1107/S0108767384001161

Parameters
number:: Space group number (ITA)
hmSymbol:: Herrman-Mauguin symbol with upper case first letter
generators:: Generating symmetry operations.

Definition at line 314 of file SpaceGroupFactory.cpp.

◆ subscribeOrthorhombicSpaceGroup()

template<typename T >
void Mantid::Geometry::SpaceGroupFactoryImpl::subscribeOrthorhombicSpaceGroup ( size_t  number,
const std::string &  hmSymbol,
const std::string &  generatorString 
)
inline

Specialized method to subscribe an orthorhombic space group.

For each orthorhombic space group there may be 6 different settings resulting from the permutation of axes. Instead of supplying all of them manually it's enough to supply generators for the standard setting and the other settings (if they exist, for space groups like P222 all 6 are the same) are then generated automatically using the transformation matrices given in table 5.1.3.1 in ITA (p. 80).

Parameters
number:: Space group number (ITA)
hmSymbol:: Herrman-Mauguin symbol (standard setting)
generatorString:: Generating symmetry operations (standard setting)

Definition at line 178 of file SpaceGroupFactory.h.

◆ subscribeTabulatedSpaceGroup()

void Mantid::Geometry::SpaceGroupFactoryImpl::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 supplied, including centering.

Definition at line 321 of file SpaceGroupFactory.cpp.

◆ subscribeUsingGenerator()

template<typename T >
void Mantid::Geometry::SpaceGroupFactoryImpl::subscribeUsingGenerator ( size_t  number,
const std::string &  hmSymbol,
const std::string &  generatorString 
)
inline

Templated method to subscribe other generators than the ones provided here.

Definition at line 153 of file SpaceGroupFactory.h.

◆ unsubscribeSpaceGroup()

void Mantid::Geometry::SpaceGroupFactoryImpl::unsubscribeSpaceGroup ( const std::string &  hmSymbol)

Unsubscribes the space group with the given Hermann-Mauguin symbol, but throws std::invalid_argument if symbol is not registered.

Definition at line 282 of file SpaceGroupFactory.cpp.

References isSubscribed(), m_generatorMap, and m_numberMap.

Friends And Related Function Documentation

◆ Mantid::Kernel::CreateUsingNew< SpaceGroupFactoryImpl >

Definition at line 220 of file SpaceGroupFactory.h.

Member Data Documentation

◆ m_generatorMap

std::map<std::string, AbstractSpaceGroupGenerator_sptr> Mantid::Geometry::SpaceGroupFactoryImpl::m_generatorMap
protected

◆ m_numberMap

std::multimap<size_t, std::string> Mantid::Geometry::SpaceGroupFactoryImpl::m_numberMap
protected

◆ m_pointGroupMap

std::multimap<std::string, std::string> Mantid::Geometry::SpaceGroupFactoryImpl::m_pointGroupMap
protected

Definition at line 218 of file SpaceGroupFactory.h.

Referenced by fillPointGroupMap(), subscribe(), and subscribedSpaceGroupSymbols().


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