PSCF v1.1
|
A SpaceSymmetry represents a crystallographic space group symmetry. More...
#include <SpaceSymmetry.h>
Public Types | |
typedef FMatrix< int, D, D > | Rotation |
Typedef for matrix used to represent point group operation. More... | |
typedef FArray< Rational, D > | Translation |
Typedef for vector used to represent fractional translation. More... | |
Public Member Functions | |
SpaceSymmetry () | |
Default constructor. More... | |
SpaceSymmetry (const SpaceSymmetry< D > &other) | |
Copy constructor. More... | |
SpaceSymmetry< D > & | operator= (const SpaceSymmetry< D > &other) |
Assignment operator. More... | |
void | normalize () |
Shift components of translation to [0,1). More... | |
void | shiftOrigin (Translation const &origin) |
Shift the origin of space used in the coordinate system. More... | |
SpaceSymmetry< D > | inverse () const |
Compute and return the inverse of this symmetry element. More... | |
SpaceSymmetry< D >::Rotation | inverseRotation () const |
Compute and return the inverse of the rotation matrix. More... | |
int | determinant () const |
Compute and return the determinant of the rotation matrix. More... | |
int & | R (int i, int j) |
Return an element of the matrix by reference. More... | |
int | R (int i, int j) const |
Return an element of the matrix by value. More... | |
Rational & | t (int i) |
Return a component of the translation by reference. More... | |
Rational | t (int i) const |
Return an element of the translation by value. More... | |
Static Public Member Functions | |
static const SpaceSymmetry< D > & | identity () |
Return the identity element. More... | |
Friends | |
bool | operator== (const SpaceSymmetry< D > &A, const SpaceSymmetry< D > &B) |
Are two SpaceSymmetry objects equivalent? More... | |
bool | operator!= (const SpaceSymmetry< D > &A, const SpaceSymmetry< D > &B) |
Are two SpaceSymmetry objects not equivalent? More... | |
SpaceSymmetry< D > | operator* (const SpaceSymmetry< D > &A, const SpaceSymmetry< D > &B) |
Return the product A*B of two symmetry objects. More... | |
IntVec< D > | operator* (const IntVec< D > &V, const SpaceSymmetry< D > &S) |
Return the IntVec<D> product V*S of an IntVec<D> and a rotation matrix. More... | |
IntVec< D > | operator* (const SpaceSymmetry< D > &S, const IntVec< D > &V) |
Return the IntVec<D> product S*V of a rotation matrix and an IntVec<D>. More... | |
std::ostream & | operator<< (std::ostream &out, const SpaceSymmetry< D > &A) |
Output stream inserter for a SpaceSymmetry<D> More... | |
std::istream & | operator>> (std::istream &in, SpaceSymmetry< D > &A) |
Input stream extractor for a SpaceSymmetry<D> More... | |
A SpaceSymmetry represents a crystallographic space group symmetry.
Crystallographic space group symmetry operation combines a point group operation (e.g., 2, 3, and 4 fold rotations about axes, reflections, or inversion) with possible translations by a fraction of a unit cell.
Both the rotation matrix R and the translation t are represented using a basis of Bravais lattice basis vectors. Because Bravais basis vectors must map onto other lattice vectors, this implies that elements of all elements of the rotation matrix must be integers. To guarantee that the inverse of the rotation matrix is also a matrix of integers, we require that the determinant of the rotation matrix must be +1 or -1. The translation vector is represented by a vector of D rational numbers (i.e., fractions) of the form n/m with m = 2, 3, or 4 and n < m.
The basis used to describe a crytallographic group may be either a primitive or non-primitive unit cell. Thus, for example, the space group of a bcc crystal may be expressed either using a basis of 3 three orthogonal simple cubic unit vectors, with a translation t = (1/2, 1/2, 1/2), or as a point group using a set of three non-orthogonal basis vectors for the primitive unit cell.
Definition at line 137 of file SpaceSymmetry.h.
typedef FMatrix<int, D, D> Pscf::SpaceSymmetry< D >::Rotation |
Typedef for matrix used to represent point group operation.
Definition at line 143 of file SpaceSymmetry.h.
typedef FArray<Rational, D> Pscf::SpaceSymmetry< D >::Translation |
Typedef for vector used to represent fractional translation.
Definition at line 146 of file SpaceSymmetry.h.
Pscf::SpaceSymmetry< D >::SpaceSymmetry |
Default constructor.
All elements of the rotation matrix are initialized to zero.
Definition at line 22 of file SpaceSymmetry.tpp.
Pscf::SpaceSymmetry< D >::SpaceSymmetry | ( | const SpaceSymmetry< D > & | other | ) |
Copy constructor.
Definition at line 43 of file SpaceSymmetry.tpp.
SpaceSymmetry< D > & Pscf::SpaceSymmetry< D >::operator= | ( | const SpaceSymmetry< D > & | other | ) |
Assignment operator.
Definition at line 60 of file SpaceSymmetry.tpp.
void Pscf::SpaceSymmetry< D >::normalize |
Shift components of translation to [0,1).
Definition at line 79 of file SpaceSymmetry.tpp.
References UTIL_ASSERT.
Referenced by Pscf::SpaceSymmetry< D >::inverse().
void Pscf::SpaceSymmetry< D >::shiftOrigin | ( | Translation const & | origin | ) |
Shift the origin of space used in the coordinate system.
This function modifies the translation vector so as to refer to an equivalent symmetry defined using a new coordinate system with a shifted origin. The argument gives the coordinates of the origin of the new coordinate system as defined in the old coordinate system.
origin | location of origin of the new coordinate system |
Definition at line 150 of file SpaceSymmetry.tpp.
SpaceSymmetry< D > Pscf::SpaceSymmetry< D >::inverse |
Compute and return the inverse of this symmetry element.
Definition at line 124 of file SpaceSymmetry.tpp.
References Pscf::SpaceSymmetry< D >::normalize().
SpaceSymmetry< D >::Rotation Pscf::SpaceSymmetry< D >::inverseRotation | ( | ) | const |
Compute and return the inverse of the rotation matrix.
int Pscf::SpaceSymmetry< D >::determinant | ( | ) | const |
Compute and return the determinant of the rotation matrix.
|
inline |
Return an element of the matrix by reference.
i | 1st (row) index |
j | 2nd (column) index |
Definition at line 326 of file SpaceSymmetry.h.
|
inline |
Return an element of the matrix by value.
i | 1st (row) index |
j | 2nd (column) index |
Definition at line 334 of file SpaceSymmetry.h.
|
inline |
Return a component of the translation by reference.
i | component index |
Definition at line 342 of file SpaceSymmetry.h.
|
inline |
Return an element of the translation by value.
i | component index |
Definition at line 350 of file SpaceSymmetry.h.
|
inlinestatic |
Return the identity element.
Definition at line 358 of file SpaceSymmetry.h.
|
friend |
Are two SpaceSymmetry objects equivalent?
A | first symmetry |
B | second symmetry |
Definition at line 370 of file SpaceSymmetry.h.
|
friend |
Are two SpaceSymmetry objects not equivalent?
A | first symmetry |
B | second symmetry |
Definition at line 318 of file SpaceSymmetry.h.
|
friend |
Return the product A*B of two symmetry objects.
A | first symmetry |
B | second symmetry |
Definition at line 391 of file SpaceSymmetry.h.
|
friend |
Return the IntVec<D> product V*S of an IntVec<D> and a rotation matrix.
The product is defined to be the matrix product of the integer vector and the space group rotation matrix S.R * V.
V | integer vector |
S | symmetry operation |
Definition at line 441 of file SpaceSymmetry.h.
|
friend |
Return the IntVec<D> product S*V of a rotation matrix and an IntVec<D>.
The product is defined to be the matrix product of the rotation matrix and the integer vector S.R * V.
S | symmetry operation |
V | integer vector |
Definition at line 424 of file SpaceSymmetry.h.
|
friend |
Output stream inserter for a SpaceSymmetry<D>
out | output stream |
A | SpaceSymmetry<D> object to be output |
Definition at line 458 of file SpaceSymmetry.h.
|
friend |
Input stream extractor for a SpaceSymmetry<D>
in | input stream |
A | SpaceSymmetry<D> object to be input |
Definition at line 478 of file SpaceSymmetry.h.