occ
Loading...
Searching...
No Matches
occ::crystal::SpaceGroup Class Reference

This class represents a space group. More...

#include <spacegroup.h>

Public Member Functions

 SpaceGroup ()
 Constructs a space group with only translational symmetry.
 
 SpaceGroup (int num)
 Constructs a space group with the given space group number.
 
 SpaceGroup (const std::string &symbol)
 Constructs a space group with the given space symbol.
 
 SpaceGroup (const std::vector< std::string > &symops)
 Constructs a space group with the list of symmetry operations in their string form, if the list of symops is not a known space group, it will still construct the object and may be used (even though it is not necessarily valid)
 
 SpaceGroup (const std::vector< SymmetryOperation > &symops)
 Constructs a space group with the list of symmetry operations.
 
int number () const
 Returns the space group number of this space group.
 
const std::string & symbol () const
 Returns the Hermann-Mauguin (international tables) symbol for this object.
 
const std::string & short_name () const
 Returns the Hermann-Mauguin (international tables) symbol for this object, shortened e.g P 1 2 1 -> P2.
 
const std::vector< SymmetryOperation > & symmetry_operations () const
 Returns the list of symmetry operations for this space group.
 
bool has_H_R_choice () const
 Determine whether this space group has the choice between hexagonal (H) and rhombohedral (R) settings.
 
bool is_standard_setting () const
 Apply all symmetry operations to a provided set of fractional coordinates, with the identity symop always first.
 
SpaceGroup standard_setting () const
 This space group in its standard (ITA reference) setting.
 
std::pair< Mat3, Vec3standard_setting_transform () const
 The change of basis taking this setting to the standard one.
 
std::pair< IVec, Mat3N > apply_all_symmetry_operations (const Mat3N &) const
 
std::pair< IVec, Mat3N > apply_rotations (const Mat3N &) const
 
auto reciprocal_asu () const
 

Detailed Description

This class represents a space group.

A space group describes the symmetries within a crystal structure of a crystal structure. Provides methods for accessing and manipulating space group data.

Constructor & Destructor Documentation

◆ SpaceGroup() [1/5]

occ::crystal::SpaceGroup::SpaceGroup ( )

Constructs a space group with only translational symmetry.

◆ SpaceGroup() [2/5]

occ::crystal::SpaceGroup::SpaceGroup ( int  num)

Constructs a space group with the given space group number.

Parameters
numThe space group number.
Exceptions
std::invalid_argumentif the given number is not a valid space group number.

◆ SpaceGroup() [3/5]

occ::crystal::SpaceGroup::SpaceGroup ( const std::string &  symbol)

Constructs a space group with the given space symbol.

Parameters
symbolThe space group symbol.
Exceptions
std::invalid_argumentif the given space group can't be found

◆ SpaceGroup() [4/5]

occ::crystal::SpaceGroup::SpaceGroup ( const std::vector< std::string > &  symops)

Constructs a space group with the list of symmetry operations in their string form, if the list of symops is not a known space group, it will still construct the object and may be used (even though it is not necessarily valid)

Parameters
symopsThe space group symmetry operations

◆ SpaceGroup() [5/5]

occ::crystal::SpaceGroup::SpaceGroup ( const std::vector< SymmetryOperation > &  symops)

Constructs a space group with the list of symmetry operations.

if the list of symops is not a known space group, it will still construct the object and may be used (even though it is not necessarily valid)

Parameters
symopsThe space group symmetry operations

Member Function Documentation

◆ apply_all_symmetry_operations()

std::pair< IVec, Mat3N > occ::crystal::SpaceGroup::apply_all_symmetry_operations ( const Mat3N &  ) const

◆ apply_rotations()

std::pair< IVec, Mat3N > occ::crystal::SpaceGroup::apply_rotations ( const Mat3N &  ) const

◆ has_H_R_choice()

bool occ::crystal::SpaceGroup::has_H_R_choice ( ) const

Determine whether this space group has the choice between hexagonal (H) and rhombohedral (R) settings.

Returns
true if there's a choice to be made, false otherwise

◆ is_standard_setting()

bool occ::crystal::SpaceGroup::is_standard_setting ( ) const

Apply all symmetry operations to a provided set of fractional coordinates, with the identity symop always first.

Returns
a pair of IVec, Mat3N corresponding to the integer representation SymmetryOperation::to_int of the symop applied to each point, and the points after that symop application. If N points were provided and this SpaceGroup has 8 symmetry operations, then the resulting IVec will have dimension (N*8,) and the Mat3N of coordinates will have dimension (3, N*8).

Whether this space group is in the standard (ITA reference) setting.

Space groups have many settings – P2_1/c, P2_1/a and P2_1/n are all space group 14 – and tabulated data (subgroup relations, Wyckoff positions) is given for the standard one. Structures in the wild often are not.

Note
For the 24 groups with two origin choices (Pnnn, Fddd, ...) the standard setting is origin choice 2, whereas SpaceGroup(number) gives origin choice 1. Use standard_setting() to get the former.

◆ number()

int occ::crystal::SpaceGroup::number ( ) const

Returns the space group number of this space group.

Returns
The space group number.

◆ reciprocal_asu()

auto occ::crystal::SpaceGroup::reciprocal_asu ( ) const
inline

◆ short_name()

const std::string & occ::crystal::SpaceGroup::short_name ( ) const

Returns the Hermann-Mauguin (international tables) symbol for this object, shortened e.g P 1 2 1 -> P2.

Returns
The space group name.

◆ standard_setting()

SpaceGroup occ::crystal::SpaceGroup::standard_setting ( ) const

This space group in its standard (ITA reference) setting.

◆ standard_setting_transform()

std::pair< Mat3, Vec3 > occ::crystal::SpaceGroup::standard_setting_transform ( ) const

The change of basis taking this setting to the standard one.

Returns \((P, p)\) such that \(x_{std} = P^{-1}(x - p)\), i.e. the same convention used for subgroup transformations. The identity when this space group is already in the standard setting.

◆ symbol()

const std::string & occ::crystal::SpaceGroup::symbol ( ) const

Returns the Hermann-Mauguin (international tables) symbol for this object.

Returns
The space group symbol.

◆ symmetry_operations()

const std::vector< SymmetryOperation > & occ::crystal::SpaceGroup::symmetry_operations ( ) const

Returns the list of symmetry operations for this space group.

Returns
The list of symmetry operations.

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