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

Class representing a 3D symmetry operation. More...

#include <symmetryoperation.h>

Public Member Functions

 SymmetryOperation (const Mat4 &seitz)
 Constructor from an aribtrary 4x4 matrix.
 
 SymmetryOperation (const std::string &symop)
 Constructor from string representation.
 
 SymmetryOperation (int symop)
 Constructor from an integer representation.
 
int to_int () const
 The integer representation of this symop.
 
std::string to_string (const SymmetryOperationFormat &={}) const
 String representation of this symop.
 
SymmetryOperation inverted () const
 Returns an inverted copy of this symmetry operation e.g.
 
SymmetryOperation translated (const Vec3 &t, bool canonicalize=false) const
 Returns a translated copy of this symmetry operation e.g.
 
bool is_identity () const
 Is this the identity symop?
 
Mat3N apply (const Mat3N &frac) const
 Apply the transformation represented by this symop to a set of coordinates.
 
const auto & seitz () const
 The 4x4 Seitz matrix representation of this symop.
 
Mat3 rotation () const
 The 3x3 rotation component of the matrix representation of this symop.
 
Mat3 cartesian_rotation (const UnitCell &cell) const
 Convert the rotation matrix to Cartesian coordinates.
 
Vec6 rotate_adp (Eigen::Ref< const Vec6 > adp) const
 Rotate ADP parameters in the order (u11, u22, u33, u12, u13, u23)
 
Vec3 translation () const
 The translation component of the matrix representation of this symop.
 
bool has_translation () const
 
auto operator() (const Mat3N &frac) const
 Shorthand for SymmetryOperation::apply
 
bool operator== (const SymmetryOperation &other) const
 Check if two symops are identical.
 
bool operator< (const SymmetryOperation &other) const
 Ordering is based on integer representation.
 
bool operator> (const SymmetryOperation &other) const
 Ordering is based on integer representation.
 
bool operator<= (const SymmetryOperation &other) const
 Ordering is based on integer representation.
 
bool operator>= (const SymmetryOperation &other) const
 Ordering is based on integer representation.
 
const SymmetryOperation operator* (const SymmetryOperation &other) const
 Compose this symmetry operation with another.
 

Detailed Description

Class representing a 3D symmetry operation.

A symmetry operation describes the combined rotation and translation operations, as a member of a SpaceGroup.

Constructor & Destructor Documentation

◆ SymmetryOperation() [1/3]

occ::crystal::SymmetryOperation::SymmetryOperation ( const Mat4 &  seitz)

Constructor from an aribtrary 4x4 matrix.

Parameters
seitzMat4 matrix encompassing the rotation and translation components of this symmetry operation.
Note
The matrix is not checked to ensure it's a sensible symmetry operation, or even affine.

◆ SymmetryOperation() [2/3]

occ::crystal::SymmetryOperation::SymmetryOperation ( const std::string &  symop)

Constructor from string representation.

Parameters
symopstd::string describing the symmetry operation, e.g. "x,y,z" for the identity symop
Note
The string is not checked to ensure it's a sensible symmetry operation, or even affine, it is algorithmically constructed from the string.

◆ SymmetryOperation() [3/3]

occ::crystal::SymmetryOperation::SymmetryOperation ( int  symop)

Constructor from an integer representation.

Parameters
symopint describing the symmetry operation, e.g. 16484

Since there are only 3 possible entries in the rotation matrix \((-1, 0, 1)\) and 8 in the translation component \((0, \frac{1}{6}, \frac{1}{4}, \frac{1}{3}, \frac{1}{2}, \frac{2}{3}, \frac{3}{4}, \frac{5}{6})\), all of which are divisible by 12, the symop can be serialized as an integer

Member Function Documentation

◆ apply()

Mat3N occ::crystal::SymmetryOperation::apply ( const Mat3N &  frac) const

Apply the transformation represented by this symop to a set of coordinates.

Parameters
fracMat3N containing fractional coordinates.
Returns
Mat3N containing the transformed coordinates.
Note
Coords are assumed to be in fractional.

◆ cartesian_rotation()

Mat3 occ::crystal::SymmetryOperation::cartesian_rotation ( const UnitCell &  cell) const

Convert the rotation matrix to Cartesian coordinates.

Parameters
cellThe UnitCell object representing the crystal structure
Returns
Mat3 The rotation matrix in Cartesian coordinates

◆ has_translation()

bool occ::crystal::SymmetryOperation::has_translation ( ) const
inline

◆ inverted()

SymmetryOperation occ::crystal::SymmetryOperation::inverted ( ) const

Returns an inverted copy of this symmetry operation e.g.

(x,y,z) -> (-x,-y,-z)

Returns
SymmetryOperation equivalent to this under inversion

◆ is_identity()

bool occ::crystal::SymmetryOperation::is_identity ( ) const
inline

Is this the identity symop?

Returns
true if this is the identity symop, false otherwise

◆ operator()()

auto occ::crystal::SymmetryOperation::operator() ( const Mat3N &  frac) const
inline

Shorthand for SymmetryOperation::apply

◆ operator*()

const SymmetryOperation occ::crystal::SymmetryOperation::operator* ( const SymmetryOperation &  other) const
inline

Compose this symmetry operation with another.

Returns
SymmetryOperation representing the matrix product of this on the left of another symop i.e. this * other

◆ operator<()

bool occ::crystal::SymmetryOperation::operator< ( const SymmetryOperation &  other) const
inline

Ordering is based on integer representation.

◆ operator<=()

bool occ::crystal::SymmetryOperation::operator<= ( const SymmetryOperation &  other) const
inline

Ordering is based on integer representation.

◆ operator==()

bool occ::crystal::SymmetryOperation::operator== ( const SymmetryOperation &  other) const
inline

Check if two symops are identical.

◆ operator>()

bool occ::crystal::SymmetryOperation::operator> ( const SymmetryOperation &  other) const
inline

Ordering is based on integer representation.

◆ operator>=()

bool occ::crystal::SymmetryOperation::operator>= ( const SymmetryOperation &  other) const
inline

Ordering is based on integer representation.

◆ rotate_adp()

Vec6 occ::crystal::SymmetryOperation::rotate_adp ( Eigen::Ref< const Vec6 >  adp) const

Rotate ADP parameters in the order (u11, u22, u33, u12, u13, u23)

Parameters
adpThe ADP to rotate
Returns
Vec6 the rotated ADP

◆ rotation()

Mat3 occ::crystal::SymmetryOperation::rotation ( ) const
inline

The 3x3 rotation component of the matrix representation of this symop.

Returns
Mat3 containing describing the rotation.

◆ seitz()

const auto & occ::crystal::SymmetryOperation::seitz ( ) const
inline

The 4x4 Seitz matrix representation of this symop.

Returns
const reference to a Mat4 containing describing this symop.

◆ to_int()

int occ::crystal::SymmetryOperation::to_int ( ) const

The integer representation of this symop.

Returns
integer representing the symop e.g. 16484 for the identity

◆ to_string()

std::string occ::crystal::SymmetryOperation::to_string ( const SymmetryOperationFormat &  = {}) const

String representation of this symop.

Returns
std::string representing the symop e.g. "+x,+y,+z" for the identity

◆ translated()

SymmetryOperation occ::crystal::SymmetryOperation::translated ( const Vec3 &  t,
bool  canonicalize = false 
) const

Returns a translated copy of this symmetry operation e.g.

(x,y,z) -> (x+1/2,y+1/3,z-1/3) etc.

Parameters
tThe translation vector to add
canonicalizeIf true, translation components are reduced to [0, 1) range
Returns
SymmetryOperation equivalent to this after the translation
Note
If canonicalize is true, translation is in the range [0, 1] i.e. 4/3 will be expressed as 1/3

◆ translation()

Vec3 occ::crystal::SymmetryOperation::translation ( ) const
inline

The translation component of the matrix representation of this symop.

Returns
Vec3 containing describing the translation.

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