Symmetry Operations

AbstractSpaceSymmetryOperation{S} represent spatial symmetry, including translation, and point operation, and the combination of the two. Here S is the type for the coordinates.

Translation Operation

The type TranslationOperation{S} represents translation operation on the space of coordinates of type S.

A translation operation can be of integer type or non-integer type.

julia> TranslationOperation([1, 2])
TranslationOperation{Int64}([1, 2])

julia> TranslationOperation([0.5, 0.0, 0.5])
TranslationOperation{Float64}([0.5, 0.0, 0.5])

julia> TranslationOperation([1//2, 3//4])
TranslationOperation{Rational{Int64}}(Rational{Int64}[1//2, 3//4])

On a lattice system with discrete translation symmetry, it is convenient to use integer translations of type TranslationOperation{Int}, which represent lattice translations.

A translation operation can be applied to coordinates

julia> t = TranslationOperation([1, 2])
TranslationOperation{Int64}([1, 2])

julia> t([3, 4])
2-element Array{Int64,1}:
 4
 6

julia> apply_operation(t, [5, 6])
2-element Array{Int64,1}:
 6
 8

Point Operation

Point operation is represented by the type PointOperation{S}, which includes rotation, inversion, and mirror operations. A lattice system where lattice vectors are not orthogonal, the matrix of the point operation need not be an orthogonal matrix. For example, a sixfold rotation on a triangular Bravais lattice may be written as the following

Sixfold rotation

julia> p = PointOperation([1 -1; 1 0])
PointOperation{Int64}([1 -1; 1 0])

julia> p([1, 0])
2-element Array{Int64,1}:
 1
 1

julia> p([0, 1])
2-element Array{Int64,1}:
 -1
  0
julia> p = PointOperation([0 1; 1 0])
PointOperation{Int64}([0 1; 1 0])

julia> p([2, 5])
2-element Array{Int64,1}:
 5
 2

Space Operation

julia> s = SpaceOperation([1 -1; 1 0], [1, 0])
SpaceOperation{Int64,Int64}([1 -1; 1 0], [1, 0])

julia> s([1, 0])
2-element Array{Int64,1}:
 2
 2