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

A class for representing space groups, inheriting from Group. More...

#include <SpaceGroup.h>

Inheritance diagram for Mantid::Geometry::SpaceGroup:
Mantid::Geometry::Group

Public Member Functions

template<typename T >
std::vector< T > getEquivalentPositions (const T &position) const
 
PointGroup_sptr getPointGroup () const
 Returns the point group of the space group. More...
 
Group_const_sptr getSiteSymmetryGroup (const Kernel::V3D &position) const
 Returns the site symmetry group. More...
 
std::string hmSymbol () const
 Returns the stored Hermann-Mauguin symbol. More...
 
bool isAllowedReflection (const Kernel::V3D &hkl) const
 Returns whether the given reflection is allowed or not in this space group. More...
 
bool isAllowedUnitCell (const UnitCell &cell) const
 Convenience function for checking compatibility of a cell metric with the space group, see Group::isInvariant. More...
 
size_t number () const
 Returns the stored space group number. More...
 
 SpaceGroup (size_t itNumber, std::string hmSymbol, const Group &group)
 Constructor. More...
 
- Public Member Functions inherited from Mantid::Geometry::Group
bool containsOperation (const SymmetryOperation &operation) const
 Returns true if the group contains the supplied operation. More...
 
bool fulfillsAxiom (GroupAxiom axiom) const
 Checks whether a certain group axiom is fulfilled, can be used as a more fine-grained alternative to isGroup(). More...
 
CoordinateSystem getCoordinateSystem () const
 Returns the axis system of the group (either orthogonal or hexagonal). More...
 
std::vector< SymmetryOperationgetSymmetryOperations () const
 Returns a vector with all symmetry operations. More...
 
 Group ()
 Default constructor. Creates a group with one symmetry operation (identity). More...
 
 Group (const std::string &symmetryOperationString)
 Uses SymmetryOperationFactory to create a vector of symmetry operations from the string. More...
 
 Group (const std::vector< SymmetryOperation > &symmetryOperations)
 Constructs a group from the symmetry operations in the vector, duplicates are removed. More...
 
bool isGroup () const
 Returns whether the group fulfills the four group axioms. More...
 
bool isInvariant (const Kernel::DblMatrix &tensor, double tolerance=1e-8) const
 Returns true if the tensor is invariant under the group operations. More...
 
bool operator!= (const Group &other) const
 Returns true if groups are different from eachother. More...
 
Group operator* (const Group &other) const
 Multiplication operator of two groups. More...
 
std::vector< Kernel::V3Doperator* (const Kernel::V3D &vector) const
 Returns a unique set of Kernel::V3D resulting from applying all symmetry operations, vectors are wrapped to [0, 1). More...
 
bool operator== (const Group &other) const
 Returns true if both groups contain the same set of symmetry operations. More...
 
size_t order () const
 Returns the order of the group, which is the number of symmetry operations. More...
 
virtual ~Group ()=default
 

Protected Attributes

std::string m_hmSymbol
 
size_t m_number
 
- Protected Attributes inherited from Mantid::Geometry::Group
std::vector< SymmetryOperationm_allOperations
 
CoordinateSystem m_axisSystem
 
std::set< SymmetryOperationm_operationSet
 

Additional Inherited Members

- Public Types inherited from Mantid::Geometry::Group
enum  CoordinateSystem { Orthogonal , Hexagonal }
 
enum  GroupAxiom { Closure , Identity , Inversion , Associativity }
 
- Protected Member Functions inherited from Mantid::Geometry::Group
bool associativityHolds () const
 Checks that associativity holds, i.e. More...
 
bool eachElementHasInverse () const
 Returns true if the inverse of each element is in the group. More...
 
CoordinateSystem getCoordinateSystemFromOperations (const std::vector< SymmetryOperation > &symmetryOperations) const
 Returns the axis system based on the given symmetry operations. More...
 
bool hasIdentity () const
 Returns true if the group has the identity element. More...
 
bool isClosed () const
 Returns true if the group is closed, i.e. all elements of G * G are in G. More...
 
void setSymmetryOperations (const std::vector< SymmetryOperation > &symmetryOperations)
 Assigns symmetry operations, throws std::invalid_argument if vector is empty. More...
 

Detailed Description

A class for representing space groups, inheriting from Group.

SpaceGroup-objects represent a space group, which is a set of symmetry operations. Along with storing the operations themselves, which is realized through inheriting from Group, SpaceGroup also stores a number (space group number according to the International Tables for Crystallography A) and a Hermann-Mauguin-symbol.

SpaceGroup may for example be used to generate all equivalent positions within the unit cell:

SpaceGroup_const_sptr group;

V3D position(0.13, 0.54, 0.38);
std::vector<V3D> equivalents = group->getEquivalentPositions(position);

The class should not be instantiated directly, see SpaceGroupFactoryImpl instead.

Author
Michael Wedel, Paul Scherrer Institut - SINQ
Date
03/10/2014

Definition at line 46 of file SpaceGroup.h.

Constructor & Destructor Documentation

◆ SpaceGroup()

Mantid::Geometry::SpaceGroup::SpaceGroup ( size_t  itNumber,
std::string  hmSymbol,
const Group group 
)

Constructor.

This constructor creates a space group with the symmetry operations contained in the Group-parameter and assigns the given number and symbol.

Parameters
itNumber:: Space group number (ITA)
hmSymbol:: Herman-Mauguin symbol for the space group
group:: Group that contains all symmetry operations (including centering).

Definition at line 27 of file SpaceGroup.cpp.

Member Function Documentation

◆ getEquivalentPositions()

template<typename T >
std::vector< T > Mantid::Geometry::SpaceGroup::getEquivalentPositions ( const T &  position) const
inline

Definition at line 53 of file SpaceGroup.h.

References position.

◆ getPointGroup()

PointGroup_sptr Mantid::Geometry::SpaceGroup::getPointGroup ( ) const

Returns the point group of the space group.

This method uses PointGroupFactory to create the point group of the space- group. Becausethe factory is used for construction, a new object is returned each time this method is called.

Returns
:: PointGroup-object.

Definition at line 84 of file SpaceGroup.cpp.

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

Referenced by export_SpaceGroup().

◆ getSiteSymmetryGroup()

Group_const_sptr Mantid::Geometry::SpaceGroup::getSiteSymmetryGroup ( const Kernel::V3D position) const

Returns the site symmetry group.

The site symmetry group contains all symmetry operations of a space group that leave a point unchanged. This method probes the symmetry operations of the space group and constructs a Group-object using them.

Parameters
position:: Coordinates of the site.
Returns
:: Site symmetry group.

Definition at line 98 of file SpaceGroup.cpp.

References Mantid::Geometry::getWrappedVector(), Mantid::Geometry::Group::m_allOperations, and position.

◆ hmSymbol()

std::string Mantid::Geometry::SpaceGroup::hmSymbol ( ) const

Returns the stored Hermann-Mauguin symbol.

Definition at line 34 of file SpaceGroup.cpp.

References m_hmSymbol.

Referenced by Mantid::Geometry::PointGroupFactoryImpl::createPointGroupFromSpaceGroup(), export_SpaceGroup(), and Mantid::Geometry::operator<<().

◆ isAllowedReflection()

bool Mantid::Geometry::SpaceGroup::isAllowedReflection ( const Kernel::V3D hkl) const

Returns whether the given reflection is allowed or not in this space group.

Space groups that contain translational symmetry cause certain reflections to be absent due to the contributions of symmetry equivalent atoms to the structure factor cancelling out. This method implements the procedure described in ITA [1] to check whether a reflection is allowed or not according to the symmetry operations in the space group. Please note that certain arrangements of atoms can lead to additional conditions that can not be determined using a space group's symmetry operations alone. For these situations, Geometry::CrystalStructure can help.

[1] International Tables for Crystallography (2006). Vol. A, ch. 12.3, p. 832

Parameters
hkl:: HKL to be checked.
Returns
:: true if the reflection is allowed, false otherwise.

Definition at line 53 of file SpaceGroup.cpp.

References fabs, Mantid::Geometry::Group::m_allOperations, and Mantid::Kernel::V3D::scalar_prod().

◆ isAllowedUnitCell()

bool Mantid::Geometry::SpaceGroup::isAllowedUnitCell ( const UnitCell cell) const

Convenience function for checking compatibility of a cell metric with the space group, see Group::isInvariant.

Definition at line 73 of file SpaceGroup.cpp.

References Mantid::Geometry::UnitCell::getG(), and Mantid::Geometry::Group::isInvariant().

Referenced by export_SpaceGroup().

◆ number()

size_t Mantid::Geometry::SpaceGroup::number ( ) const

Returns the stored space group number.

Definition at line 31 of file SpaceGroup.cpp.

References m_number.

Referenced by export_SpaceGroup().

Member Data Documentation

◆ m_hmSymbol

std::string Mantid::Geometry::SpaceGroup::m_hmSymbol
protected

Definition at line 76 of file SpaceGroup.h.

Referenced by hmSymbol().

◆ m_number

size_t Mantid::Geometry::SpaceGroup::m_number
protected

Definition at line 75 of file SpaceGroup.h.

Referenced by number().


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