Symmetry

Types and functions related to defining crystal symmetry.


Lattice Systems

Note

All concrete lattice system types are (1) subtypes of the LatticeSystem abstract type and (2) singleton types. For convenience, a singleton instance is defined for each lattice system type.

Xtallography.lattice_systemFunction
lattice_system(unit_cell::UnitCell) -> LatticeSystem

lattice_system(unit_cell::UnitCellDelta) -> LatticeSystem

Return the lattice system for unit_cell or Δunit_cell.

Return values

lattice system

Examples

julia> lattice_system(HexagonalUnitCell(2, 4))
Hexagonal()

julia> lattice_system(CubicUnitCell(2))
Cubic()

julia> lattice_system(OrthorhombicUnitCell(2, 3, 4; centering=F_centering))
Orthorhombic()

julia> lattice_system(TetragonalUnitCellDelta(0.1, .05))
Tetragonal()
source

Concrete Types


Centerings

Note

All concrete centering types are (1) subtypes of the Centering abstract type and (2) singleton types. For convenience, a singleton instance is defined for each centering type.

Concrete Types

Xtallography.BaseCenteringType
BaseCentering

Type representing base centering that is the type of base_centering

Note

By convention, base-centering is

  • on the C-face of the unit cell for orthorhombic lattice systems

and

  • on the B-face of the unit cell for monoclinic lattice systems.

Supertype: Centering

source

Symmetry Elements

Note

All concrete symmetry element types are subtypes of the SymmetryElement abstract type.

Concrete Types

Xtallography.GlidePlaneMethod
GlidePlane(
    glide::Tuple{<:Real,<:Real,<:Real},
    normal::Tuple{<:Real,<:Real,<:Real};
    location::Tuple{<:Real,<:Real,<:Real}=(0, 0, 0)
)

Construct a GlidePlane object with the specified glide translation and mirror plane with orientation defined by normal.

Keyword Arguments

  • location: a point on the rotation axis in unit cell fractional coordinates
source
Xtallography.MirrorPlaneMethod
MirrorPlane(
    normal::Tuple{<:Real,<:Real,<:Real};
    location::Tuple{<:Real,<:Real,<:Real}=(0, 0, 0)
)

Construct a MirrorPlane object with orientation defined by normal.

Keyword Arguments

  • location: a point on the rotation axis in unit cell fractional coordinates
source
Xtallography.RotationAxisMethod
RotationAxis(
    n::Int,
    direction::Tuple{<:Real,<:Real,<:Real};
    location::Tuple{<:Real,<:Real,<:Real}=(0, 0, 0)
)

Construct a RotationAxis object with order n about the axis specified by direction.

Keyword Arguments

  • location: a point on the rotation axis in unit cell fractional coordinates
source
Xtallography.RotoinversionAxisMethod
RotoinversionAxis(
    n::Int,
    direction::Tuple{<:Real,<:Real,<:Real};
    center::Tuple{<:Real,<:Real,<:Real}=(0, 0, 0)
)

Construct a RotoinversionAxis object with order n about the axis specified by direction.

Keyword Arguments

  • center: location of inversion center in unit cell fractional coordinates
source
Xtallography.ScrewAxisMethod
ScrewAxis(
    n::Int,
    m::Int,
    direction::Tuple{<:Real,<:Real,<:Real};
    location::Tuple{<:Real,<:Real,<:Real}=(0, 0, 0)
)

Construct a ScrewAxis object that

  • has an axis by direction and location

and

  • couples a rotation by 2π/n and a translation along the rotation axis by m/n (in unit cell fractional coordinates).

Keyword Arguments

  • location: a point on the rotation axis in unit cell fractional coordinates
source

Bravais Lattices

Xtallography.is_bravais_latticeFunction
is_bravais_lattice(lattice_system::LatticeSystem, centering::Centering) -> Bool

Determine if lattice_system and centering define a valid Bravais lattice type.

Return values

true if lattice_system and centering define a valid Bravais lattice type; false otherwise

Examples

julia> is_bravais_lattice(cubic, body_centering)
true

julia> is_bravais_lattice(cubic, base_centering)
false
source
is_bravais_lattice(unit_cell::UnitCell) -> Bool

Determine if the unit cell defined by unit_cell is a valid Bravais lattice type.

Return values

true if the lattice system and centering of unit_cell define a valid Bravais lattice type; false otherwise

Examples

julia> is_bravais_lattice(TetragonalUnitCell(2, 3; centering=primitive_centering))
true

julia> is_bravais_lattice(TetragonalUnitCell(2, 3; centering=face_centering))
false
source