Mantid
|
#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_sptr > | m_generatorMap |
std::multimap< size_t, std::string > | m_numberMap |
std::multimap< std::string, std::string > | m_pointGroupMap |
Friends | |
struct | Mantid::Kernel::CreateUsingNew< SpaceGroupFactoryImpl > |
Definition at line 130 of file SpaceGroupFactory.h.
|
virtualdefault |
|
protected |
Constructor cannot be called, since SingletonHolder is used.
Definition at line 411 of file SpaceGroupFactory.cpp.
References Mantid::Kernel::SingletonHolder< T >::Instance().
|
protected |
Returns a copy-constructed instance of the supplied space group prototype object.
Definition at line 370 of file SpaceGroupFactory.cpp.
Referenced by 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().
|
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().
|
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().
|
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().
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().
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.
|
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.
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().
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.
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.
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.
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
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.
|
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).
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.
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.
|
inline |
Templated method to subscribe other generators than the ones provided here.
Definition at line 153 of file SpaceGroupFactory.h.
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.
|
friend |
Definition at line 220 of file SpaceGroupFactory.h.
|
protected |
Definition at line 217 of file SpaceGroupFactory.h.
Referenced by fillPointGroupMap(), getPrototype(), isSubscribed(), subscribe(), subscribedSpaceGroupSymbols(), and unsubscribeSpaceGroup().
|
protected |
Definition at line 216 of file SpaceGroupFactory.h.
Referenced by isSubscribed(), subscribe(), subscribedSpaceGroupNumbers(), subscribedSpaceGroupSymbols(), and unsubscribeSpaceGroup().
|
protected |
Definition at line 218 of file SpaceGroupFactory.h.
Referenced by fillPointGroupMap(), subscribe(), and subscribedSpaceGroupSymbols().