Crystalline.jl
Tools for crystalline symmetry implemented in the Julia language.
This package provides access e.g. to the symmetry operations of crystalline point groups, space groups, Wyckoff positions, their irreducible representations and band representations, as well as tools for their associated manipulation.
Installation
The package is registered in the General registry and can be installed from the pkg>
prompt (accessed by typing ]
at the Julia REPL) by executing:
pkg> add Crystalline
whereafter Crystalline.jl can be loaded via
julia> using Crystalline
Functionality
Crystalline.jl currently provides several functionalities for line groups, plane groups, and space groups, as well as crystallographic point groups.
Example usage includes:
# construct a 3D `SymOperation` from its triplet form
julia> S"x,-y,-z"
2₁₀₀ ─────────────────────────── (x,-y,-z)
┌ 1 0 0 ╷ 0 ┐
│ 0 -1 0 ┆ 0 │
└ 0 0 -1 ╵ 0 ┘
# load the `SymOperation`s of the 3D space group #16 in a conventional setting
julia> sg = spacegroup(16, Val(3))
SpaceGroup{3} #16 (P222) with 4 operations:
1 ──────────────────────────────── (x,y,z)
2₀₀₁ ─────────────────────────── (-x,-y,z)
2₀₁₀ ─────────────────────────── (-x,y,-z)
2₁₀₀ ─────────────────────────── (x,-y,-z)
# load a dictionary of small irreps and their little groups for space group #16, indexed by their k-point labels; then inspect the small irreps at the A point
julia> lgirs = get_lgirreps(16, Val(3));
julia> lgirs["A"]
LGIrrep{3}: #16 (P222) at A = [α, 0.0, 0.5]
A₁ ─┬─────────────────────────────────────────────
├─ 1: ──────────────────────────────── (x,y,z)
│ 1.0
│
├─ 2₁₀₀: ─────────────────────────── (x,-y,-z)
│ 1.0
└─────────────────────────────────────────────
A₂ ─┬─────────────────────────────────────────────
├─ 1: ──────────────────────────────── (x,y,z)
│ 1.0
│
├─ 2₁₀₀: ─────────────────────────── (x,-y,-z)
│ -1.0
└─────────────────────────────────────────────
# compute the character table for the small irreps at the Γ point
julia> CharacterTable(lgirs["Γ"])
CharacterTable{3}: #16 (P222 at Γ = [0.0, 0.0, 0.0])
──────┬────────────────
│ Γ₁ Γ₂ Γ₃ Γ₄
──────┼────────────────
1 │ 1 1 1 1
2₁₀₀ │ 1 -1 1 -1
2₀₁₀ │ 1 -1 -1 1
2₀₀₁ │ 1 1 -1 -1
──────┴────────────────
Additional functionality includes e.g. point group operations (pointgroup
) and irreps (get_pgirreps
), elementary band representations (bandreps
), Wyckoff positions (get_wycks
), physically real irreps (realify
), transformation between conventional and primitive settings (primitivize
and conventionalize
), and Bravais lattice utilities and conventions.
For a full description of the public API, see the documentation.
Limitations
At present, the package's emphasis is on spinless systems (i.e., double groups and spinful irreps are not implemented).
API stability
Crystalline.jl is a research package in active development: breaking changes are likely (but we will strive to follow semantic versioning).