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

#include <PointGroupFactory.h>

Public Member Functions

PointGroup_sptr createPointGroup (const std::string &hmSymbol)
 Creates a PointGroup object from its Hermann-Mauguin symbol. More...
 
PointGroup_sptr createPointGroupFromSpaceGroup (const SpaceGroup &spaceGroup)
 
PointGroup_sptr createPointGroupFromSpaceGroup (const SpaceGroup_const_sptr &spaceGroup)
 
std::vector< std::string > getAllPointGroupSymbols () const
 Returns the Hermann-Mauguin symbols of all registered point groups. More...
 
std::vector< std::string > getPointGroupSymbols (const PointGroup::CrystalSystem &crystalSystem)
 Returns the Hermann-Mauguin symbols of all point groups that belong to a certain crystal system. More...
 
bool isSubscribed (const std::string &hmSymbol) const
 
void subscribePointGroup (const std::string &hmSymbol, const std::string &generatorString, const std::string &description)
 
void unsubscribePointGroup (const std::string &hmSymbol)
 Unsubscribes a point group from the factory. More...
 

Private Member Functions

PointGroup_sptr constructFromPrototype (const PointGroup_sptr &prototype) const
 
PointGroup_sptr getPrototype (const std::string &hmSymbol)
 
 PointGroupFactoryImpl ()
 Private default constructor. More...
 
std::string pointGroupSymbolFromSpaceGroupSymbol (const std::string &spaceGroupSymbol) const
 Returns the point group symbol from a given space group symbol. More...
 
void subscribe (const PointGroupGenerator_sptr &generator)
 

Private Attributes

boost::regex m_centeringRegex
 
std::map< std::string, PointGroup::CrystalSystemm_crystalSystemMap
 
std::map< std::string, PointGroupGenerator_sptrm_generatorMap
 
boost::regex m_glidePlaneRegex
 
boost::regex m_originChoiceRegex
 
boost::regex m_screwAxisRegex
 

Friends

struct Mantid::Kernel::CreateUsingNew< PointGroupFactoryImpl >
 

Detailed Description

Definition at line 60 of file PointGroupFactory.h.

Constructor & Destructor Documentation

◆ PointGroupFactoryImpl()

Mantid::Geometry::PointGroupFactoryImpl::PointGroupFactoryImpl ( )
private

Private default constructor.

Definition at line 147 of file PointGroupFactory.cpp.

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

Member Function Documentation

◆ constructFromPrototype()

PointGroup_sptr Mantid::Geometry::PointGroupFactoryImpl::constructFromPrototype ( const PointGroup_sptr prototype) const
private

Definition at line 142 of file PointGroupFactory.cpp.

Referenced by createPointGroup().

◆ createPointGroup()

PointGroup_sptr Mantid::Geometry::PointGroupFactoryImpl::createPointGroup ( const std::string &  hmSymbol)

Creates a PointGroup object from its Hermann-Mauguin symbol.

Definition at line 19 of file PointGroupFactory.cpp.

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

Referenced by createPointGroupFromSpaceGroup(), and export_PointGroupFactory().

◆ createPointGroupFromSpaceGroup() [1/2]

PointGroup_sptr Mantid::Geometry::PointGroupFactoryImpl::createPointGroupFromSpaceGroup ( const SpaceGroup spaceGroup)

◆ createPointGroupFromSpaceGroup() [2/2]

PointGroup_sptr Mantid::Geometry::PointGroupFactoryImpl::createPointGroupFromSpaceGroup ( const SpaceGroup_const_sptr spaceGroup)

Definition at line 27 of file PointGroupFactory.cpp.

References createPointGroupFromSpaceGroup().

Referenced by createPointGroupFromSpaceGroup().

◆ getAllPointGroupSymbols()

std::vector< std::string > Mantid::Geometry::PointGroupFactoryImpl::getAllPointGroupSymbols ( ) const

Returns the Hermann-Mauguin symbols of all registered point groups.

Definition at line 57 of file PointGroupFactory.cpp.

References m_generatorMap.

Referenced by export_PointGroupFactory().

◆ getPointGroupSymbols()

std::vector< std::string > Mantid::Geometry::PointGroupFactoryImpl::getPointGroupSymbols ( const PointGroup::CrystalSystem crystalSystem)

Returns the Hermann-Mauguin symbols of all point groups that belong to a certain crystal system.

Definition at line 67 of file PointGroupFactory.cpp.

References getPrototype(), and m_generatorMap.

Referenced by export_PointGroupFactory().

◆ getPrototype()

PointGroup_sptr Mantid::Geometry::PointGroupFactoryImpl::getPrototype ( const std::string &  hmSymbol)
private

Definition at line 124 of file PointGroupFactory.cpp.

References m_generatorMap.

Referenced by createPointGroup(), and getPointGroupSymbols().

◆ isSubscribed()

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

Definition at line 52 of file PointGroupFactory.cpp.

References m_generatorMap.

Referenced by createPointGroup(), export_PointGroupFactory(), and subscribePointGroup().

◆ pointGroupSymbolFromSpaceGroupSymbol()

std::string Mantid::Geometry::PointGroupFactoryImpl::pointGroupSymbolFromSpaceGroupSymbol ( const std::string &  spaceGroupSymbol) const
private

Returns the point group symbol from a given space group symbol.

This method exploits the direct relationship between point and space groups. Point groups don't have translational symmetry, which is reflected in the symbol as well. To get the symbol of the point group a certain space group belongs to, some simple string replacements are enough:

  1. Replace screw axes ( (2|3|4|6)[1|2|3|4|5] ) with rotations (first number).
  2. Replace glide planes (a|b|c|d|e|g|n) with mirror planes (m)
  3. Remove centering symbol.
  4. Remove origin choice ( :(1|2) ) The two different possibilities in monoclinic are handled explicitly.
Parameters
spaceGroupSymbol:: Space group symbol
Returns

Definition at line 109 of file PointGroupFactory.cpp.

References m_centeringRegex, m_glidePlaneRegex, m_originChoiceRegex, and m_screwAxisRegex.

Referenced by createPointGroupFromSpaceGroup().

◆ subscribe()

void Mantid::Geometry::PointGroupFactoryImpl::subscribe ( const PointGroupGenerator_sptr generator)
private

Definition at line 134 of file PointGroupFactory.cpp.

References m_generatorMap.

Referenced by subscribePointGroup().

◆ subscribePointGroup()

void Mantid::Geometry::PointGroupFactoryImpl::subscribePointGroup ( const std::string &  hmSymbol,
const std::string &  generatorString,
const std::string &  description 
)

Definition at line 81 of file PointGroupFactory.cpp.

References isSubscribed(), and subscribe().

◆ unsubscribePointGroup()

void Mantid::Geometry::PointGroupFactoryImpl::unsubscribePointGroup ( const std::string &  hmSymbol)
inline

Unsubscribes a point group from the factory.

Definition at line 75 of file PointGroupFactory.h.

Friends And Related Function Documentation

◆ Mantid::Kernel::CreateUsingNew< PointGroupFactoryImpl >

Definition at line 75 of file PointGroupFactory.h.

Member Data Documentation

◆ m_centeringRegex

boost::regex Mantid::Geometry::PointGroupFactoryImpl::m_centeringRegex
private

Definition at line 93 of file PointGroupFactory.h.

Referenced by pointGroupSymbolFromSpaceGroupSymbol().

◆ m_crystalSystemMap

std::map<std::string, PointGroup::CrystalSystem> Mantid::Geometry::PointGroupFactoryImpl::m_crystalSystemMap
private

Definition at line 89 of file PointGroupFactory.h.

◆ m_generatorMap

std::map<std::string, PointGroupGenerator_sptr> Mantid::Geometry::PointGroupFactoryImpl::m_generatorMap
private

◆ m_glidePlaneRegex

boost::regex Mantid::Geometry::PointGroupFactoryImpl::m_glidePlaneRegex
private

Definition at line 92 of file PointGroupFactory.h.

Referenced by pointGroupSymbolFromSpaceGroupSymbol().

◆ m_originChoiceRegex

boost::regex Mantid::Geometry::PointGroupFactoryImpl::m_originChoiceRegex
private

Definition at line 94 of file PointGroupFactory.h.

Referenced by pointGroupSymbolFromSpaceGroupSymbol().

◆ m_screwAxisRegex

boost::regex Mantid::Geometry::PointGroupFactoryImpl::m_screwAxisRegex
private

Definition at line 91 of file PointGroupFactory.h.

Referenced by pointGroupSymbolFromSpaceGroupSymbol().


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