licenses
sequencelengths
1
3
version
stringclasses
677 values
tree_hash
stringlengths
40
40
path
stringclasses
1 value
type
stringclasses
2 values
size
stringlengths
2
8
text
stringlengths
25
67.1M
package_name
stringlengths
2
41
repo
stringlengths
33
86
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2961
module SmithNormalForm using LinearAlgebra using SparseArrays using Base.CoreLogging import Base: show, summary import LinearAlgebra: diagm, diag export snf, smith, Smith include("bezout.jl") include("snf.jl") # ---------------------------------------------------------------------------------------- # struct Smith{P,Q<:AbstractMatrix{P},V<:AbstractVector{P}} <: Factorization{P} S::Q Sinv::Q T::Q Tinv::Q SNF::V Smith{P,Q,V}(S::AbstractMatrix{P}, Sinv::AbstractMatrix{P}, T::AbstractMatrix{P}, Tinv::AbstractMatrix{P}, D::AbstractVector{P}) where {P,Q,V} = new(S, Sinv, T, Tinv, D) end Smith(S::AbstractMatrix{P}, T::AbstractMatrix{P}, SNF::AbstractVector{P}) where {P} = Smith{P,typeof(S),typeof(SNF)}(S, similar(S, 0, 0), T, similar(T, 0, 0), SNF) # ---------------------------------------------------------------------------------------- # """ smith(X::AbstractMatrix{P}; inverse::Bool=true) --> Smith{P,Q,V} Return a Smith normal form of an integer matrix `X` as a `Smith` structure (of element type `P`, matrix type `Q`, and invariant factor type `V`). The Smith normal form is well-defined for any matrix ``m×n`` matrix `X` with elements in a principal domain (PID; e.g., integers) and provides a decomposition of `X` into ``m×m``, ``m×n``, and `S`, `Λ`, and `T` as `X = SΛT`, where `Λ` is a diagonal matrix with entries ("invariant factors") Λᵢ ≥ Λᵢ₊₁ ≥ 0 with nonzero entries divisible in the sense Λᵢ | Λᵢ₊₁. The invariant factors can be obtained from [`diag(::Smith)`](@ref). `S` and `T` are invertible matrices; if the keyword argument `inverse` is true (default), the inverse matrices are computed and returned as part of the `Smith` factorization. """ function smith(X::AbstractMatrix{P}; inverse::Bool=true) where {P} S, T, D, Sinv, Tinv = snf(X, inverse=inverse) SNF = diag(D) return Smith{P, typeof(X), typeof(SNF)}(S, Sinv, T, Tinv, SNF) end # ---------------------------------------------------------------------------------------- # """ diagm(F::Smith) --> AbstractMatrix Return the Smith normal form diagonal matrix `Λ` from a factorization `F`. """ function diagm(F::Smith{P}) where P rows = size(F.S, 1) cols = size(F.T, 1) D = issparse(F.SNF) ? spzeros(P, rows, cols) : zeros(P, rows, cols) for (i,Λᵢ) in enumerate(diag(F)) D[i,i] = Λᵢ end return D end """ diag(F::Smith) --> AbstractVector Return the invariant factors (or, equivalently, the elementary divisors) of a Smith normal form `F`. """ diag(F::Smith) = F.SNF summary(io::IO, F::Smith{P,Q,V}) where {P,Q,V} = print(io, "Smith{", P, ",", Q, ",", V, "}") function show(io::IO, ::MIME"text/plain", F::Smith) summary(io, F) println(io, " with:") Base.print_matrix(io, diagm(F), " Λ = "); println(io) Base.print_matrix(io, F.S, " S = "); println(io) Base.print_matrix(io, F.T, " T = ") return nothing end end # module
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
545
""" Calculates Bézout coefficients (see `gcdx`) """ function bezout(a::R, b::R) where {R} rev = a < b x, y = rev ? (a,b) : (b,a) s0, s1 = oneunit(R), zero(R) t0, t1 = zero(R), oneunit(R) while y != zero(R) q = div(x, y) x, y = y, x - y * q s0, s1 = s1, s0 - q * s1 t0, t1 = t1, t0 - q * t1 end s, t = rev ? (s0, t0) : (t0, s0) g = x if g == a s = one(R) t = zero(R) elseif g == -a s = -one(R) t = zero(R) end return s, t, g end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
6843
# Smith Normal Form function divisable(y::R, x::R) where {R} x == zero(R) && return y == zero(R) return div(y,x)*x == y end function divide(y::R, x::R) where {R} if x != -one(R) return div(y,x) else return y * x end end function rcountnz(X::AbstractMatrix{R}, i) where {R} c = 0 z = zero(R) @inbounds for row in eachrow(X) if row[i] != z c += 1 end end return c end function ccountnz(X::AbstractMatrix{R}, j) where {R} c = 0 z = zero(R) @inbounds for col in eachcol(X) if col[j] != z c += 1 end end return c end function rswap!(M::AbstractMatrix, r1::Int, r2::Int) r1 == r2 && return M @inbounds for col in eachcol(M) tmp = col[r1] col[r1] = col[r2] col[r2] = tmp end return M end function cswap!(M::AbstractMatrix, c1::Int, c2::Int) c1 == c2 && return M @inbounds for row in eachrow(M) tmp = row[c1] row[c1] = row[c2] row[c2] = tmp end return M end function rowelimination(D::AbstractMatrix{R}, a::R, b::R, c::R, d::R, i::Int, j::Int) where {R} @inbounds for col in eachcol(D) t = col[i] s = col[j] col[i] = a*t + b*s col[j] = c*t + d*s end return D end function colelimination(D::AbstractMatrix{R}, a::R, b::R, c::R, d::R, i::Int, j::Int) where {R} @inbounds for row in eachrow(D) t = row[i] s = row[j] row[i] = a*t + b*s row[j] = c*t + d*s end return D end function rowpivot(U::AbstractArray{R,2}, Uinv::AbstractArray{R,2}, D::AbstractArray{R,2}, i, j; inverse=true) where {R} for k in reverse!(findall(!iszero, view(D, :, j))) a = D[i,j] b = D[k,j] i == k && continue s, t, g = bezout(a, b) x = divide(a, g) y = divide(b, g) rowelimination(D, s, t, -y, x, i, k) inverse && rowelimination(Uinv, s, t, -y, x, i, k) colelimination(U, x, y, -t, s, i, k) end end function colpivot(V::AbstractArray{R,2}, Vinv::AbstractArray{R,2}, D::AbstractArray{R,2}, i, j; inverse=true) where {R} for k in reverse!(findall(!iszero, view(D, i, :))) a = D[i,j] b = D[i,k] j == k && continue s, t, g = bezout(a, b) x = divide(a, g) y = divide(b, g) colelimination(D, s, t, -y, x, j, k) inverse && colelimination(Vinv, s, t, -y, x, j, k) rowelimination(V, x, y, -t, s, j, k) end end function smithpivot(U::AbstractMatrix{R}, Uinv::AbstractMatrix{R}, V::AbstractMatrix{R}, Vinv::AbstractMatrix{R}, D::AbstractMatrix{R}, i, j; inverse=true) where {R} pivot = D[i,j] @assert pivot != zero(R) "Pivot cannot be zero" while ccountnz(D,i) > 1 || rcountnz(D,j) > 1 colpivot(V, Vinv, D, i, j, inverse=inverse) rowpivot(U, Uinv, D, i, j, inverse=inverse) end end function init(M::AbstractSparseMatrix{R,Ti}; inverse=true) where {R, Ti} D = copy(M) rows, cols = size(M) U = spzeros(R, rows, rows) for i in 1:rows U[i,i] = one(R) end Uinv = inverse ? copy(U) : spzeros(R, 0, 0) V = spzeros(R, cols, cols) for i in 1:cols V[i,i] = one(R) end Vinv = inverse ? copy(V) : spzeros(R, 0, 0) return U, V, D, Uinv, Vinv end function init(M::AbstractMatrix{R}; inverse=true) where {R} D = copy(M) rows, cols = size(M) U = zeros(R, rows, rows) for i in 1:rows U[i,i] = one(R) end Uinv = inverse ? copy(U) : zeros(R, 0, 0) V = zeros(R, cols, cols) for i in 1:cols V[i,i] = one(R) end Vinv = inverse ? copy(V) : zeros(R, 0, 0) return U, V, D, Uinv, Vinv end formatmtx(M) = size(M,1) == 0 ? "[]" : repr(collect(M); context=IOContext(stdout, :compact => true)) function snf(M::AbstractMatrix{R}; inverse=true) where {R} rows, cols = size(M) U, V, D, Uinv, Vinv = init(M, inverse=inverse) t = 1 for j in 1:cols @debug "Working on column $j out of $cols" D=formatmtx(D) rcountnz(D,j) == 0 && continue prow = 1 if D[t,t] != zero(R) prow = t else # Good pivot row for j-th column is the one # that have a smallest number of elements rsize = typemax(R) for i in 1:rows if D[i,j] != zero(R) c = count(!iszero, view(D, i, :)) if c < rsize rsize = c prow = i end end end end @debug "Pivot Row selected: t = $t, pivot = $prow" D=formatmtx(D) rswap!(D, t, prow) inverse && rswap!(Uinv, t, prow) cswap!(U, t, prow) @debug "Performing the pivot step at (t=$t, j=$j)" D=formatmtx(D) smithpivot(U, Uinv, V, Vinv, D, t, j, inverse=inverse) cswap!(D, t, j) inverse && cswap!(Vinv, t, j) rswap!(V, t, j) t += 1 @logmsg (Base.CoreLogging.Debug-1) "Factorization" D=formatmtx(D) U=formatmtx(U) V=formatmtx(V) U⁻¹=formatmtx(Uinv) V⁻¹=formatmtx(Vinv) end # Make sure that d_i is divisible be d_{i+1}. r = minimum(size(D)) pass = true while pass pass = false for i in 1:r-1 divisable(D[i+1,i+1], D[i,i]) && continue pass = true D[i+1,i] = D[i+1,i+1] colelimination(Vinv, one(R), one(R), zero(R), one(R), i, i+1) rowelimination(V, one(R), zero(R), -one(R), one(R), i, i+1) smithpivot(U, Uinv, V, Vinv, D, i, i, inverse=inverse) end end # To guarantee SNFⱼ = Λⱼ ≥ 0 we absorb the sign of Λ into T and T⁻¹, s.t. # Λ′ = Λ*sign(Λ), T′ = sign(Λ)*T, and T⁻¹′ = T⁻¹*sign(Λ), # with the convention that sign(0) = 1. Then we still have that X = SΛT = SΛ′T′ # and also that Λ = S⁻¹XT⁻¹ ⇒ Λ′ = S⁻¹XT⁻¹′. for j in 1:rows j > cols && break Λⱼ = D[j,j] if Λⱼ < 0 @views V[j,:] .*= -1 # T′ = sign(Λ)*T [rows] if inverse @views Vinv[:,j] .*= -1 # T⁻¹′ = T⁻¹*sign(Λ) [columns] end D[j,j] = abs(Λⱼ) # Λ′ = Λ*sign(Λ) end end @logmsg (Base.CoreLogging.Debug-1) "Factorization" D=formatmtx(D) U=formatmtx(U) V=formatmtx(V) U⁻¹=formatmtx(Uinv) V⁻¹=formatmtx(Vinv) if issparse(D) return dropzeros!(U), dropzeros!(V), dropzeros!(D), dropzeros!(Uinv), dropzeros!(Vinv) else return U, V, D, Uinv, Vinv end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2033
using LinearAlgebra using SparseArrays using Test using SmithNormalForm @testset "Bezout" begin a = 12 b = 42 s,t,g = SmithNormalForm.bezout(a,b) @test s*a + t*b == g g,s,t = gcdx(a,b) @test s*a + t*b == g s,t,g = SmithNormalForm.bezout(b,a) @test s*b + t*a == g g,s,t = gcdx(b,a) @test s*b + t*a == g end @testset "Smith Normal Form" begin M=[ 1 0 0 0 0 0 ; 0 0 0 0 0 0 ; -1 0 1 0 0 1 ; 0 -1 0 -1 0 0 ; 0 0 0 1 1 -1 ; 0 1 -1 0 -1 0 ] P, Q, A, Pinv, Qinv = snf(M) @test !issparse(A) @test P*A*Q == M @test inv(P) == Pinv @test inv(Q) == Qinv @testset "dense diag" for i in 1:4 @test A[i,i] == 1 end P, Q, A, Pinv, Qinv = snf(dropzeros(sparse(M))) @test issparse(A) @test P*A*Q == M @test inv(collect(P)) == Pinv @test inv(collect(Q)) == Qinv @testset "sparse diag" for i in 1:4 @test A[i,i] == 1 end P, Q, A, Pinv, Qinv = snf(sparse(M), inverse=false) @test issparse(A) @test iszero(Pinv) @test iszero(Qinv) @test P*A*Q == M @testset "sparse diag" for i in 1:4 @test A[i,i] == 1 end # Factorization M =[22 30 64 93 36; 45 42 22 11 67; 21 1 35 45 42] n, m = size(M) F = smith(M) @test !issparse(F.SNF) @test size(F.S) == (n,n) @test size(F.T) == (m,m) @test size(F.Sinv) == (n,n) @test size(F.Tinv) == (m,m) @test F.S*diagm(F)*F.T == M @test F.S*F.Sinv == Matrix{eltype(F)}(I, n, n) @test F.T*F.Tinv == Matrix{eltype(F)}(I, m, m) F = smith(sparse(M), inverse=false) @test issparse(F.SNF) @test size(F.S) == (n,n) @test size(F.T) == (m,m) @test F.S*diagm(F)*F.T == M @test iszero(F.Sinv) @test iszero(F.Tinv) # https://en.wikipedia.org/wiki/Smith_normal_form#Example M = [2 4 4; -6 6 12; 10 -4 -16] F = smith(M, inverse=true) @test F.SNF == [2, 6, 12] @test F.S*diagm(F)*F.T == M end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
1020
module Bravais using LinearAlgebra using StaticArrays # ---------------------------------------------------------------------------------------- # using Base: @propagate_inbounds, ImmutableDict import Base: parent, convert, getindex, size, IndexStyle # ---------------------------------------------------------------------------------------- # export crystal, crystalsystem, bravaistype, centering, primitivebasismatrix, centering_volume_fraction, directbasis, reciprocalbasis, AbstractBasis, volume, metricmatrix, DirectBasis, ReciprocalBasis, AbstractPoint, DirectPoint, ReciprocalPoint, transform, primitivize, conventionalize, cartesianize, latticize, nigglibasis # ---------------------------------------------------------------------------------------- # include("utils.jl") include("types.jl") include("show.jl") include("systems.jl") include("transform.jl") include("niggli.jl") end # module
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
13212
""" nigglibasis(Rs; rtol=1e-5, max_iterations=200) Given a set of primitive basis vectors `Rs`, return a basis `Rs′` for the corresponding Niggli-reduced unit cell, as well as a transformation matrix `P`, such that `Rs′ = transform(Rs, P)` (see [`transform`](@ref)). ## Definition A Niggli-reduced basis ``(\\mathbf{a}, \\mathbf{b}, \\mathbf{c})`` represents a unique choice of basis for any given lattice (or, more precisely, a unique choice of the basis vector lengths ``|\\mathbf{a}|, |\\mathbf{b}|, |\\mathbf{c}|``, and mutual angles between ``\\mathbf{a}, \\mathbf{b}, \\mathbf{c}``). This uniqueness is one of the main motivations for computing the Niggli reduction procedure, as it enables easy comparison of lattices. Additionally, the associated Niggli-reduced basis vectors ``(\\mathbf{a}, \\mathbf{b}, \\mathbf{c})``, fulfil several conditions [^3]: 1. **"Main" conditions:** - The basis vectors are sorted by increasing length: ``|\\mathbf{a}| ≤ |\\mathbf{b}| ≤ |\\mathbf{c}|``. - The angles between basis vectors are either all acute or all non-acute. 2. **"Special" conditions:** - Several special conditions, applied in "special" cases, such as ``|\\mathbf{a}| = |\\mathbf{b}|`` or `\\mathbf{b}\\cdot\\mathbf{c} = \\tfrac{1}{2}|\\mathbf{b}|^2`. See Ref. [^3] for details. Equivalently, the Niggli-reduced basis fulfils the following geometric conditions (Section 9.3.1 of Ref. [^3]): - The basis vectors are sorted by increasing length. - The basis vectors have least possible total length, i.e., ``|\\mathbf{a}| + |\\mathbf{b}| + |\\mathbf{c}|`` is minimum. I.e., the associated Niggli cell is a Buerger cell. - The associated Buerger cell has maximum deviation among all other Buerger cells, i.e., the basis vector angles ``α, β, γ`` maximize ``|90° - α| + |90° - β| + |90° - γ|``. ## Keyword arguments - `rtol :: Real`: relative tolerance used in the Grosse-Kunstleve approach for floating point comparisons (default: `1e-5`). - `max_iterations :: Int`: maximum number of iterations in which to cycle the Krivy-Gruber steps (default: `200`). ## Implementation Implementation follows the algorithm originally described by Krivy & Gruber [^1], with the stability modificiations proposed by Grosse-Kunstleve et al. [^2] (without which the algorithm proposed in [^1] simply does not work on floating point hardware). [^1] I. Krivy & B. Gruber. A unified algorithm for determinign the reduced (Niggli) cell, [Acta Crystallogr. A **32**, 297 (1976)](https://doi.org/10.1107/S0567739476000636). [^2] R.W. Grosse-Kunstleve, N.K. Sauter, & P.D. Adams, Numerically stable algorithms for the computation of reduced unit cells, [Acta Crystallogr. A **60**, 1 (2004)](https://doi.org/10.1107/S010876730302186X) [^3] Sections 9.2 & 9.3, International Tables of Crystallography, Volume A, 5th ed. (2005). """ function nigglibasis( Rs :: DirectBasis{3}; rtol :: Real = 1e-5, # default relative tolereance, following [2] max_iterations :: Int = 200 ) # check input if length(Rs) ≠ 3 error("the Niggli reduction implementation only supports 3D settings: at least 3 \ basis vectors must be given") end if any(R -> length(R) ≠ 3, Rs) error("the Niggli reduction implementation only supports 3D settings: a basis \ vector was supplied that does not have 3 components") end rtol < 0 && throw(DomainError(rtol, "relative tolerance `rtol` must be non-negative")) max_iterations ≤ 0 && throw(DomainError(max_iterations, "`max_iterations` must be positive")) # tolerance D = 3 # algorithm assumes 3D setting (TODO: extend to 2D?) ϵ = rtol * abs(volume(Rs))^(1/D) # initialization A, B, C, ξ, η, ζ = niggli_parameters(Rs) P = @SMatrix [1 0 0; 0 1 0; 0 0 1] # performing steps A1-A8 until no condition is met iteration = 0 while iteration < max_iterations iteration += 1 # At each step below, we update the transformation matrix `P` by post-multiplying it # with `P′` in the sense P ← P * P′. We also update the associated Niggli parameters # (A, B, C, ξ, η, ζ) by applying the transformation `P` to the original basis # vectors `Rs`. If we reach the end of the set of steps, without being returned to # step A1, we are done. Executing steps A2, A5, A6, A7, & A8 subsequently returns us # to step A1. # step A1 A > B || (A == B && abs(ξ) > abs(η)) if A > B + ϵ || (abs(A-B) < ϵ && abs(ξ) > abs(η) + ϵ) P′ = @SMatrix [0 -1 0; -1 0 0; 0 0 -1] # swap (A,ξ) ↔ (B,η) P *= P′ A, B, C, ξ, η, ζ = niggli_parameters(transform(Rs, P)) end # step A2 B > C || (B == C && abs(η) > abs(ζ)) if B > C + ϵ || (abs(B-C) < ϵ && abs(η) > abs(ζ) + ϵ) P′ = @SMatrix [-1 0 0; 0 0 -1; 0 -1 0] # swap (B,η) ↔ (C,ζ) P *= P′ A, B, C, ξ, η, ζ = niggli_parameters(transform(Rs, P)) continue # restart from step A1 end # step A3 ξ*η*ζ > 0 if tolsign(ξ, ϵ) * tolsign(η, ϵ) * tolsign(ζ, ϵ) == 1 i, j, k = ifelse(ξ < -ϵ, -1, 1), ifelse(η < -ϵ, -1, 1), ifelse(ζ < -ϵ, -1, 1) P′ = @SMatrix [i 0 0; 0 j 0; 0 0 k] # update (ξ,η,ζ) to (|ξ|,|η|,|ζ|) P *= P′ A, B, C, ξ, η, ζ = niggli_parameters(transform(Rs, P)) end # step A4 ξ*η*ζ ≤ 0 l, m, n = tolsign(ξ, ϵ), tolsign(η, ϵ), tolsign(ζ, ϵ) if !(l == m == n == -1) && (l*m*n == -1 || l*m*n == 0) i, j, k = _stepA4_ijk(l, m, n) P′ = @SMatrix [i 0 0; 0 j 0; 0 0 k] # update (ξ,η,ζ) to (-|ξ|,-|η|,-|ζ|) P *= P′ A, B, C, ξ, η, ζ = niggli_parameters(transform(Rs, P)) end # step A5 abs(ξ) > B || (ξ == B && 2η < ζ) || (ξ == -B, ζ < 0) if abs(ξ) > B + ϵ || (abs(B-ξ) < ϵ && 2η < ζ - ϵ) || (abs(ξ + B) < ϵ && ζ < -ϵ) P′ = @SMatrix [1 0 0; 0 1 ifelse(ξ > 0, -1, 1); 0 0 1] P *= P′ A, B, C, ξ, η, ζ = niggli_parameters(transform(Rs, P)) continue # restart from step A1 end # step A6 abs(η) > A || (η == A && 2ξ < ζ) || (η == -A && ζ < 0) if abs(η) > A + ϵ || (abs(η-A) < ϵ && 2ξ < ζ - ϵ) || (abs(η+A) < η && ζ < -ϵ) P′ = @SMatrix [1 0 ifelse(η > 0, -1, 1); 0 1 0; 0 0 1] P *= P′ A, B, C, ξ, η, ζ = niggli_parameters(transform(Rs, P)) continue # restart from step A1 end # step A7 abs(ζ) > A || (ζ == A && 2ξ < η) || (ζ == -A && η < 0) if abs(ζ) > A + ϵ || (abs(ζ-A) < ϵ && 2ξ < η - ϵ) || (abs(ζ+A) < ϵ && η < -ϵ) P′ = @SMatrix [1 ifelse(ζ > 0, -1, 1) 0; 0 1 0; 0 0 1] P *= P′ A, B, C, ξ, η, ζ = niggli_parameters(transform(Rs, P)) continue # restart from step A1 end # step A8 ξ + η + ζ + A + B < 0 || (ξ + η + ζ + A + B == 0 && 2(A + η) + ζ > 0) if ξ + η + ζ + A + B < -ϵ || (abs(ξ + η + ζ + A + B) < ϵ && 2(A + η) + ζ > ϵ) P′ = @SMatrix [1 0 1; 0 1 1; 0 0 1] P *= P′ A, B, C, ξ, η, ζ = niggli_parameters(transform(Rs, P)) continue # restart from step A1 end # end of steps, without being returned to step A1 → we are done Rs′ = transform(Rs, P) return Rs′, P end error("Niggli reduction did not converge after $max_iterations iterations") end function niggli_parameters(Rs) # The Gram matrix G (or metric tensor) is related to the Niggli parameters (A, B, C, ξ, # η, ζ) via # G = [A ζ/2 η/2; ζ/2 B ξ/2; η ξ/2 C/2] # and `G = stack(Rs)'*stack(Rs)` = VᵀV. a, b, c = Rs[1], Rs[2], Rs[3] A = dot(a, a) B = dot(b, b) C = dot(c, c) ξ = 2dot(b, c) η = 2dot(c, a) ζ = 2dot(a, b) return A, B, C, ξ, η, ζ end intsign(x::Real) = signbit(x) ? -1 : 1 tolsign(x::Real, ϵ::Real) = abs(x) > ϵ ? intsign(x) : 0 # -1 if x<-ϵ, +1 if x>ϵ, else 0 function _stepA4_ijk(l::Int, m::Int, n::Int) i = j = k = 1 r = 0 # reference to variables i, j, k: r = 0 → undef, r = 1 → i, r = 2 → j, r = 3 → k if l == 1 # ξ > ϵ i = -1 elseif l == 0 # ξ ≈ 0 r = 1 # → `i` end if m == 1 # η > ϵ j = -1 elseif m == 0 # η ≈ 0 r = 2 # → `j` end if n == 1 # ζ > ϵ k = -1 elseif n == 0 # ζ ≈ 0 r = 3 # → `k` end if i*j*k == -1 if r == 1 i = -1 elseif r == 2 j = -1 elseif r == 3 k = -1 else # r == 0 (unset, but needed) error("unhandled error in step A4 of Niggli reduction; \ failed to set reference `r` to variables `i, j, k`, but \ expected reference to be set") end end return i, j, k end # ---------------------------------------------------------------------------------------- # # Implementations in 1D & 2D niggle_reduce(Rs :: DirectBasis{1}; kws...) = Rs # 1D (trivial) function nigglibasis( # 2D by 3D-piggybacking Rs :: DirectBasis{2}; rtol :: Real = 1e-5, kws...) max_norm = maximum(norm, Rs) # create trivially 3D-extended basis by appending a basis vector along z (& make this # interim vector longer than any other basis vector, so it is necessarily last in the # Niggli basis so it can be readily removed) Rs³ᴰ = DirectBasis{3}(SVector(Rs[1]..., 0.0), SVector(Rs[2]..., 0.0), SVector(0.0, 0.0, 2max_norm)) Rs³ᴰ′, P³ᴰ = nigglibasis(Rs³ᴰ; rtol=rtol, kws...) # extract associated 2D basis and transformation Rs′ = DirectBasis{2}(Rs³ᴰ′[1][1:2], Rs³ᴰ′[2][1:2]) P = P³ᴰ[SOneTo(2), SOneTo(2)] # the 2D basis is now Niggli-reduced, but we want to maintain its original handedness: # even though P³ᴰ is guaranteed to have det(P³ᴰ) = 1, the same is not necessarily true # for P = P³ᴰ[1:2,1:2], if P³ᴰ[3,3] == -1; in that case, we have to fix it - doing so is # not trickier than one might naively think: one cannot simply rotate the basis (this # could correspond to rotating the lattice, which might not preserve the lattice), nor # simply swap the signs of `Rs′[1]` or `Rs′[2]`, since that change their mutual angles - # nor even generically swap `Rs[1]` to `Rs′[2]`; instead, the appropriate change depends # on the relative lengths and angles of `Rs′[1]` & `Rs′[2]` if P³ᴰ[3,3] == -1 ϵ = rtol * abs(volume(Rs′))^(1/2) local P_flip :: SMatrix{2,2,Int,4} if abs(dot(Rs′[1], Rs′[1]) - dot(Rs′[2], Rs′[2])) < ϵ # Rs′[1] ≈ Rs′[2] # then we can just swap 𝐚 and 𝐛 to get a right-handed basis, without worrying # about breaking the Niggli-rule |𝐚|≤|𝐛| P_flip = @SMatrix [0 1; 1 0] else # norm(Rs′[1]) > norm(Rs′[2]) # we either swap the sign of 𝐛 or check if 𝐛=𝐚-𝐛 gives a bigger ∠(𝐚, 𝐛) while # having the same length as |𝐛| (cf. Sec. 9.3.1 ITA5) candidate1 = -Rs′[2] candidate2 = Rs′[1] - Rs′[2] if abs(dot(candidate1, candidate1) - dot(candidate2, candidate2)) < ϵ # pick the candidate that maximizes the term |π/2 - ∠(𝐚,𝐛)| (Buerger # condition (iv)) γ1 = signed_angle²ᴰ(Rs′[1], candidate1) # ∠(𝐚, candidate1) γ2 = signed_angle²ᴰ(Rs′[1], candidate2) # ∠(𝐚, candidate2) if abs(π/2 - γ1) < abs(π/2 - γ2) # pick `candidate2` for 𝐛 P_flip = @SMatrix [1 0; 1 -1] else # pick `candidate1` for 𝐛 P_flip = @SMatrix [1 0; 0 -1] end else # use `candidate1` for 𝐛 P_flip = @SMatrix [1 0; 0 -1] end end P *= P_flip Rs′ = transform(Rs′, P_flip) end if det(P) < 0 # basis change did not preserve handedness, contrary to intent error("2D Niggli reduction failed to produce a preserve handedness") end if P³ᴰ[1,3] ≠ 0 || P³ᴰ[2,3] ≠ 0 || P³ᴰ[3,1] ≠ 0 || P³ᴰ[3,2] ≠ 0 error(lazy"interim 3D transformation has unexpected nonzero elements: P³ᴰ=$P³ᴰ") end return Rs′, P end # computes the angle between 2D vectors a & b in [-π,π) signed_angle²ᴰ(a::StaticVector{2}, b::StaticVector{2}) = atan(a[1]*b[2]-a[2]*b[1], dot(a,b)) # ---------------------------------------------------------------------------------------- # # Reciprocal lattice vector by Niggli reduction of the direct lattice first function nigglibasis(Gs :: ReciprocalBasis{D}; kws...) where D Rs = DirectBasis(reciprocalbasis(Gs).vs) # TODO: replace by `dualbasis` when implemented Rs′, P = nigglibasis(Rs; kws...) return reciprocalbasis(Rs′), P end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
297
# ---------------------------------------------------------------------------------------- # # DirectBasis function Base.show(io::IO, ::MIME"text/plain", Vs::AbstractBasis) print(io, typeof(Vs)) print(io, " ($(crystalsystem(Vs))):") for V in Vs print(io, "\n ", V) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
17855
""" crystal(a, b, c, α, β, γ) --> DirectBasis{3} Calculate basis vectors ``\\mathbf{R}_1``, ``\\mathbf{R}_2``, ``\\mathbf{R}_3`` in a 3D Cartesian basis for a right-handed coordinate system with specified basis vector lengths `a`, `b`, `c` (associated with ``\\mathbf{R}_1``, ``\\mathbf{R}_2``, & ``\\mathbf{R}_3``, respectively) and specified interaxial angles `α` ``= ∠(\\mathbf{R}_2,\\mathbf{R}_3)``, `β` ``= ∠(\\mathbf{R}_3,\\mathbf{R}_1)``, `γ` ``= ∠(\\mathbf{R}_1,\\mathbf{R}_2)``, with ``∠`` denoting the angle between two vectors. For definiteness, the ``\\mathbf{R}_1`` basis vector is oriented along the ``x``-axis of the Cartesian coordinate system, and the ``\\mathbf{R}_2`` axis is placed in the ``xy``-plane. """ function crystal(a::Real, b::Real, c::Real, α::Real, β::Real, γ::Real) # consistency checks on interaxial angles (equivalently, sides of the corresponding # unit-spherical triangle) if !isvalid_sphericaltriangle(α,β,γ) throw(DomainError((α,β,γ), "The provided angles α,β,γ cannot be mapped to a spherical triangle, and thus do not form a valid axis system")) end sinγ, cosγ = sincos(γ) # R₁ and R₂ are easy R₁ = SVector{3,Float64}(a, 0.0, 0.0) R₂ = SVector{3,Float64}(b*cosγ, b*sinγ, 0.0) # R3 is harder cosα = cos(α) cosβ = cos(β) ϕ = atan(cosα - cosγ*cosβ, sinγ*cosβ) θ = asin(sign(β)*sqrt(cosα^2 + cosβ^2 - 2*cosα*cosγ*cosβ)/abs(sin(γ))) # more stable than asin(cosβ/cosϕ) when β or γ ≈ π/2 sinθ, cosθ = sincos(θ) sinϕ, cosϕ = sincos(ϕ) R₃ = SVector{3,Float64}(c.*(sinθ*cosϕ, sinθ*sinϕ, cosθ)) Rs = DirectBasis(R₁, R₂, R₃) return Rs end """ crystal(a, b, γ) --> DirectBasis{2} Calculate basis vectors ``\\mathbf{R}_1``, ``\\mathbf{R}_2`` in a 2D Cartesian basis for a right-handed coordinate system with specified basis vector lengths `a`, `b` (associated with ``\\mathbf{R}_1`` & ``\\mathbf{R}_2``, respectively) and specified interaxial angle `γ` ``= ∠(\\mathbf{R}_1,\\mathbf{R}_2)``. For definiteness, the ``\\mathbf{R}_1`` basis vector is oriented along the ``x``-axis of the Cartesian coordinate system. """ function crystal(a::Real,b::Real,γ::Real) R₁ = SVector{2,Float64}(a, 0.0) R₂ = SVector{2,Float64}(b.*(cos(γ), sin(γ))) return DirectBasis(R₁,R₂) end """ crystal(a) --> DirectBasis{1} Return a one-dimensional crystal with lattice period `a`. """ crystal(a::Real) = DirectBasis(SVector{1,Float64}(float(a))) # For a three-axis system, α, β, and γ are subject to constraints: specifically, # since they correspond to sides of a (unit-radius) spherical triangle, they # are subject to identical constraints. These constraints are # 0 < α + β + γ < 2π, (1) # sin(s-α)*sin(s-β)*sin(s-γ)/sin(s) > 0, (2) # with s = (α + β + γ)/2. Constraint (2) can be identified from Eq. (38) of # http://mathworld.wolfram.com/SphericalTrigonometry.html; due to (1), it can # be simplified to sin(s-α)*sin(s-β)*sin(s-γ) > 0. This impacts generation # of triclinic and monoclinic crystals. function isvalid_sphericaltriangle(α::Real, β::Real, γ::Real) s = (α+β+γ)/2 check1 = zero(s) < s < π check2 = sin(s-α)*sin(s-β)*sin(s-γ) > zero(s) return check1 && check2 end °(φ::Real) = deg2rad(φ) """ crystalsystem(Rs::DirectBasis{D}) --> String crystalsystem(Gs::ReciprocalBasis{D}) --> String Determine the crystal system of a point lattice with `DirectBasis` `Rs`, assuming the conventional setting choice defined in the International Tables of Crystallography [^ITA6]. If a `ReciprocalBasis` `Gs` is provided for the associated reciprocal point lattice, the crystal system is determined by first transforming to the direct lattice. There are 4 crystal systems in 2D and 7 in 3D (see Section 2.1.2(iii) of [^ITA5]): | `D` | System | Conditions | Free parameters | |:-------|--------------|------------------------|----------------------| | **1D** | linear | none | a | | **2D** | square | a=b & γ=90° | a | | | rectangular | γ=90° | a,b | | | hexagonal | a=b & γ=120° | a | | | oblique | none | a,b,γ | | **3D** | cubic | a=b=c & α=β=γ=90° | a | | | hexagonal | a=b & α=β=90° & γ=120° | a,c | | | trigonal | a=b & α=β=90° & γ=120° | a,c (a,α for hR) | | | tetragonal | a=b & α=β=γ=90° | a,c | | | orthorhombic | α=β=γ=90° | a,b,c | | | monoclinic | α=γ=90° | a,b,c,β≥90° | | | triclinic | none | a,b,c,α,β,γ | The `Rs` must specify a set of conventional basis vectors, i.e., not generally primitive. For primitive basis vectors, the crystal system can be further reduced into 5 Bravais types in 2D and 14 in 3D (see [`bravaistype`](@ref)). [^ITA6]: M.I. Aroyo, International Tables of Crystallography, Vol. A, 6th ed. (2016): Tables 3.1.2.1 and 3.1.2.2 (or Tables 2.1.2.1, 9.1.7.1, and 9.1.7.2 of [^ITA5]). [^ITA5]: T. Hahn, International Tables of Crystallography, Vol. A, 5th ed. (2005). """ function crystalsystem(Rs::DirectBasis{D}) where D if D == 1 # doesn't seem to exist a well-established convention for 1D? this is ours... system = "linear" elseif D == 2 a,b = norm.(Rs) γ = angles(Rs) if a≈b && γ≈°(90) system = "square" elseif γ≈°(90) system = "rectangular" elseif a≈b && γ≈°(120) system = "hexagonal" else system = "oblique" end elseif D == 3 # TODO: Generalize this to work for non-standard orientations of the lattice/ # lattice-vector orderings a,b,c = norm.(Rs) α,β,γ = angles(Rs) if a≈b≈c && α≈β≈γ≈°(90) # cubic (cP, cI, cF) system = "cubic" elseif a≈b && γ≈°(120) && α≈β≈°(90) # hexagonal (hR, hP) system = "hexagonal" elseif a≈b≈c && α≈β≈γ # trigonal (? hP, hI ?) system = "trigonal" # rhombohedral axes (a = b = c, α=β=γ < 120° ≠ 90° ?) # hexagonal axes, triple obverse axes (a = b ≠ c, α=β=90°, γ=120° ?) elseif a≈b && α≈β≈γ≈°(90) # tetragonal (tP, tI) system = "tetragonal" elseif α≈β≈γ≈°(90) # orthorhombic (oP, oI, oF, oC) system = "orthorhombic" elseif α≈γ≈°(90) # monoclinic (mP, mC) system = "monoclinic" else # triclinic (aP) system = "triclinic" end else throw(DomainError(D, "dimension must be 1, 2, or 3")) end return system end function crystalsystem(Gs::ReciprocalBasis{D}) where D Rs = DirectBasis{D}(reciprocalbasis(Gs).vs) return crystalsystem(Rs) end function crystalsystem(sgnum::Integer, D::Integer=3) if D == 1 # doesn't seem to exist a well-established convention for 1D? this is ours... if sgnum ∈ 1:2; return "linear" # lp else _throw_invalid_sgnum(sgnum, D) end elseif D == 2 if sgnum ∈ 1:2; return "oblique" # mp elseif sgnum ∈ 3:9; return "rectangular" # op, oc elseif sgnum ∈ 10:12; return "square" # tp elseif sgnum ∈ 13:17; return "hexagonal" # hp else _throw_invalid_sgnum(sgnum, D) end elseif D == 3 if sgnum ∈ 1:2; return "triclinic" # aP elseif sgnum ∈ 3:15; return "monoclinic" # mP, mC elseif sgnum ∈ 16:74; return "orthorhombic" # oP, oI, oF, oC elseif sgnum ∈ 75:142; return "tetragonal" # tP, tI elseif sgnum ∈ 143:167; return "trigonal" # hR, hP elseif sgnum ∈ 168:194; return "hexagonal" # hR, hP elseif sgnum ∈ 195:230; return "cubic" # cP, cI, cF else _throw_invalid_sgnum(sgnum, D) end end end """ directbasis(sgnum, D=3; abclims, αβγlims) directbasis(sgnum, Val(D); abclims, αβγlims) --> DirectBasis{D} Return a random (conventional) `DirectBasis` for a crystal compatible with the space group number `sgnum` and dimensionality `D`. Free parameters in the lattice vectors are chosen randomly, with limits optionally supplied in `abclims` (lengths) and `αβγlims` (angles). By convention, the length of the first lattice vector (`a`) is set to unity, such that the second and third (`b` and `c`) lattice vectors' lengths are relative to the first. Limits on the relative uniform distribution of lengths `b` and `c` can be specified as 2-tuple kwarg `abclims`; similarly, limits on the angles `α`, `β`, `γ` can be set via αβγlims (only affects oblique, monoclinic, & triclinic lattices). """ function directbasis(sgnum::Integer, Dᵛ::Val{D}=Val(3); abclims::NTuple{2,Real}=(0.5,2.0), αβγlims::NTuple{2,Real}=(°(30),°(150))) where D system = crystalsystem(sgnum, D) if D == 1 a = 1.0 return crystal(a) elseif D == 2 if system == "square" # a=b & γ=90° (free: a) a = b = 1.0 γ = °(90) elseif system == "rectangular" # γ=90° (free: a,b) a = 1.0; b = relrand(abclims) γ = °(90) elseif system == "hexagonal" # a=b & γ=120° (free: a) a = b = 1.0; γ = °(120) elseif system == "oblique" # no conditions (free: a,b,γ) a = 1.0; b = relrand(abclims) γ = uniform_rand(αβγlims...) else throw(DomainError(system)) end return crystal(a,b,γ) elseif D == 3 if system == "cubic" # a=b=c & α=β=γ=90° (free: a) a = b = c = 1.0 α = β = γ = °(90) elseif system == "hexagonal" || # a=b & α=β=90° & γ=120° (free: a,c) system == "trigonal" a = b = 1.0; c = relrand(abclims) α = β = °(90); γ = °(120) # For the trigonal crystal system, a convention is adopted where # the crystal basis matches the a hexagonal one, even when the # Bravais type is rhombohedral (of course, the primitive basis # differs). The conventional cell is always chosen to have (triple # obverse) hexagonal axes (see ITA6 Sec. 3.1.1.4, Tables 2.1.1.1, # & 3.1.2.2). # For rhombohedral systems the primitive cell has a=b=c, α=β=γ<120°≠90°. # Note that the hexagonal and trigonal crystal systems also share # the same crystal system abbreviation 'h' (see CRYSTALSYSTEM_ABBREV), # which already suggests this choice. # TODO: in principle, this means it would be more meaningful to # branch on `CRYSTALSYSTEM_ABBREV[D][system]` than on `system`. elseif system == "tetragonal" # a=b & α=β=γ=90° (free: a,c) a = b = 1.0; c = relrand(abclims) α = β = γ = °(90) elseif system == "orthorhombic" # α=β=γ=90° (free: a,b,c) a = 1.0; b, c = relrand(abclims), relrand(abclims) α = β = γ = °(90) elseif system == "monoclinic" # α=γ=90° (free: a,b,c,β≥90°) a = 1.0; b, c = relrand(abclims), relrand(abclims) α = γ = °(90); β = uniform_rand(°(90), αβγlims[2]) while !isvalid_sphericaltriangle(α,β,γ) # arbitrary combinations of α,β,γ need not correspond to a valid # axis-system; reroll until they do β = uniform_rand(°(90), αβγlims[2]) end elseif system == "triclinic" # no conditions (free: a,b,c,α,β,γ) a = 1.0; b, c = relrand(abclims), relrand(abclims) low, high = αβγlims α, β, γ = uniform_rand(low, high), uniform_rand(low, high), uniform_rand(low, high) while !isvalid_sphericaltriangle(α,β,γ) # arbitrary combinations of α,β,γ need not correspond to a valid # axis-system; reroll until they do α, β, γ = uniform_rand(low, high), uniform_rand(low, high), uniform_rand(low, high) end else throw(DomainError(system)) end return crystal(a,b,c,α,β,γ) else _throw_invalid_dim(D) end end function directbasis(sgnum::Integer, D::Integer; abclims::NTuple{2,Real}=(0.5,2.0), αβγlims::NTuple{2,Real}=(°(30),°(150))) directbasis(sgnum, Val(D); abclims=abclims, αβγlims=αβγlims) end const CRYSTALSYSTEM_ABBREV = ( ImmutableDict("linear"=>'l'), # 1D ImmutableDict("oblique"=>'m', "rectangular"=>'o', "square"=>'t', "hexagonal"=>'h'), # 2D ImmutableDict("triclinic"=>'a', "monoclinic"=>'m', "orthorhombic"=>'o', # 3D "tetragonal"=>'t', "trigonal"=>'h', "hexagonal"=>'h', "cubic"=>'c') ) # cached results of combining `crystalsystem(sgnum, D)` w/ a centering calc from `iuc` const BRAVAISTYPE_2D = ( "mp", "mp", "op", "op", "oc", "op", "op", "op", "oc", "tp", "tp", "tp", "hp", "hp", "hp", "hp", "hp") const BRAVAISTYPE_3D = ( "aP", "aP", "mP", "mP", "mC", "mP", "mP", "mC", "mC", "mP", "mP", "mC", "mP", "mP", "mC", "oP", "oP", "oP", "oP", "oC", "oC", "oF", "oI", "oI", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oC", "oC", "oC", "oA", "oA", "oA", "oA", "oF", "oF", "oI", "oI", "oI", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oP", "oC", "oC", "oC", "oC", "oC", "oC", "oF", "oF", "oI", "oI", "oI", "oI", "tP", "tP", "tP", "tP", "tI", "tI", "tP", "tI", "tP", "tP", "tP", "tP", "tI", "tI", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tI", "tI", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tI", "tI", "tI", "tI", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tI", "tI", "tI", "tI", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tP", "tI", "tI", "tI", "tI", "hP", "hP", "hP", "hR", "hP", "hR", "hP", "hP", "hP", "hP", "hP", "hP", "hR", "hP", "hP", "hP", "hP", "hR", "hR", "hP", "hP", "hP", "hP", "hR", "hR", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "hP", "cP", "cF", "cI", "cP", "cI", "cP", "cP", "cF", "cF", "cI", "cP", "cI", "cP", "cP", "cF", "cF", "cI", "cP", "cP", "cI", "cP", "cF", "cI", "cP", "cF", "cI", "cP", "cP", "cP", "cP", "cF", "cF", "cF", "cF", "cI", "cI") """ bravaistype(sgnum::Integer, D::Integer=3; normalize::Bool=false) --> String Return the Bravais type of `sgnum` in dimension `D` as a string (as the concatenation of the single-character crystal abbreviation and the centering type). ## Keyword arguments - **`normalize`:** If the centering type associated with `sgnum` is `'A'`, we can choose (depending on the keyword argument `normalize`, defaulting to `false`) to "normalize" to the centering type `'C'`, since the difference between `'A'` and `'C'` centering only amounts to a basis change. With `normalize=true` we then have only the canonical 14 Bravais type, i.e. `unique(bravaistype.(1:230, 3), normalize=true)` returns only 14 distinct types, rather than 15. This only affects space groups 38-41 (normalizing their conventional Bravais types from `"oA"` to `"oC"`). """ function bravaistype(sgnum::Integer, D::Integer=3; normalize::Bool=false) @boundscheck boundscheck_sgnum(sgnum, D) if D == 3 # If the centering type is 'A', then we could in fact always pick the basis # differently such that the centering would be 'C'; in other words, base-centered # lattices at 'A' and 'C' in fact describe the same Bravais lattice; there is no # significance in trying to differentiate them - if we do, we end up with 15 # Bravais lattices in 3D rather than 14: so we manually fix that here: bt = @inbounds BRAVAISTYPE_3D[sgnum] if normalize return bt != "oA" ? bt : "oC" else return bt end elseif D == 2 return @inbounds BRAVAISTYPE_2D[sgnum] else return "lp" end end """ centering(sgnum::Integer, D::Integer=3) --> Char Return the conventional centering type `cntr` of the space group with number `sgnum` and dimension `D`. The centering type is equal to the first letter of the Hermann-Mauguin notation's label, i.e., `centering(sgnum, D) == first(Crystalline.iuc(sgnum, D))`. Equivalently, the centering type is the second and last letter of the Bravais type ([`bravaistype`](@ref)), i.e., `centering(sgnum, D) == bravaistype(sgnum, D)`. Possible values of `cntr`, depending on dimensionality `D`, are (see ITA Sec. 9.1.4): - `D = 1`: - `cntr = 'p'`: no centering (primitive) - `D = 2`: - `cntr = 'p'`: no centring (primitive) - `cntr = 'c'`: face centered - `D = 3`: - `cntr = 'P'`: no centring (primitive) - `cntr = 'I'`: body centred (innenzentriert) - `cntr = 'F'`: all-face centred - `cntr = 'A'` or `'C'`: one-face centred, (b,c) or (a,b) - `cntr = 'R'`: hexagonal cell rhombohedrally centred """ centering(sgnum::Integer, D::Integer=3) = last(bravaistype(sgnum, D))
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
21710
# Transformation matrices P that map bases and coordinate vectors in either direct or # reciprocal space from a conventional to a primitive setting: # # === Basis transformation === # --- Direct basis --- # Under P, a direct-space conventional basis (𝐚 𝐛 𝐜) is mapped to a primitive basis # (𝐚′ 𝐛′ 𝐜′) = (𝐚 𝐛 𝐜)𝐏 # --- Reciprocal basis --- # Under P, a reciprocal-space conventional basis (𝐚* 𝐛* 𝐜*) is mapped to a primitive basis # (𝐚*′ 𝐛*′ 𝐜*′) = (𝐚* 𝐛* 𝐜*)(𝐏⁻¹)ᵀ # since (𝐚 𝐛 𝐜)(𝐚* 𝐛* 𝐜*)ᵀ = 2πI must be conserved after the basis change. # # === Coordinate vector transformation === # The _coefficients_ of a vector transform differently than its _bases_. Specifically: # --- Direct coordinate vectors --- # An 𝐫-vector specified in a conventional reciprocal basis (𝐚 𝐛 𝐜) with an associated # coefficient vector (r₁ r₂ r₃)ᵀ, i.e. 𝐫 ≡ (𝐚 𝐛 𝐜)(r₁ r₂ r₃)ᵀ [w/ (r₁ r₂ r₃)ᵀ a column # vector], is mapped to a primitive coefficient vector under P: # (r₁′ r₂′ r₃′)ᵀ = P⁻¹(r₁ r₂ r₃)ᵀ # since # 𝐤 = (𝐚′ 𝐛′ 𝐜′)(r₁′ r₂′ r₃′)ᵀ (1) [... by definition] # = (𝐚 𝐛 𝐜)P(r₁′ r₂′ r₃′)ᵀ [... transformation of (𝐚 𝐛 𝐜) under P] # = (𝐚 𝐛 𝐜)(r₁ r₂ r₃)ᵀ (2) [... by definition] # then, combining (1) and (2) # P(r₁′ r₂′ r₃′)ᵀ = (r₁ r₂ r₃)ᵀ # ⇔ (r₁′ r₂′ r₃′)ᵀ = P⁻¹(r₁ r₂ r₃)ᵀ # --- Reciprocal coordinate vectors --- # A 𝐤-vector specified in a conventional reciprocal basis (𝐚* 𝐛* 𝐜*) with an associated # coefficient vector (k₁ k₂ k₃)ᵀ, i.e. 𝐤 ≡ (𝐚* 𝐛* 𝐜*)(k₁ k₂ k₃)ᵀ [w/ (k₁ k₂ k₃)ᵀ a column # vector], is mapped to a primitive coefficient vector under P # (k₁′ k₂′ k₃′)ᵀ = Pᵀ(k₁ k₂ k₃)ᵀ # since # 𝐤 = (𝐚*′ 𝐛*′ 𝐜*′)(k₁′ k₂′ k₃′)ᵀ (1) [... by definition] # = (𝐚* 𝐛* 𝐜*)(P⁻¹)ᵀ(k₁′ k₂′ k₃′)ᵀ [... transformation of (𝐚* 𝐛* 𝐜*) under P] # = (𝐚* 𝐛* 𝐜*)(k₁ k₂ k₃)ᵀ (2) [... by definition] # then, combining (1) and (2) # (P⁻¹)ᵀ(k₁′ k₂′ k₃′)ᵀ = (k₁ k₂ k₃)ᵀ # ⇔ (k₁′ k₂′ k₃′)ᵀ = Pᵀ(k₁ k₂ k₃)ᵀ # # The values of P depend on convention. We adopt those of Table 2 of the Aroyo's Bilbao # publication (https://doi.org/10.1107/S205327331303091X), which give the coefficients of # (Pᵀ)⁻¹. Equivalently, this is the "CDML" setting choices that can also be inferred by # combining Tables 1.5.4.1 and 1.5.4.2 of the International Tables of Crystallography, # Vol. B, Ed. 2, 2001 (ITB2). Of note, this is _not_ the standard ITA choice for the # primitive cell for 'R' or 'A'-centered cells (see Tables 3.1.2.2 of ITA6; the CDML # convention is more widespread, however, especially for k-vectors; hence our choice). # See also the 2016 HPKOT/Hinuma paper (https://doi.org/10.1016/j.commatsci.2016.10.015) # for additional details and context, though note that they use different matrices for 'A' # and complicate the 'C' scenario (Table 3). # Note that, by convention, the centering type 'B' never occurs among the space groups. const PRIMITIVE_BASIS_MATRICES = ( # 1D ImmutableDict('p'=>SMatrix{1,1,Float64}(1)), # primitive # 2D ImmutableDict('p'=>SMatrix{2,2,Float64}([1 0; 0 1]), # primitive/simple 'c'=>SMatrix{2,2,Float64}([1 1; -1 1]./2)), # centered # 3D ImmutableDict( 'P'=>SMatrix{3,3,Float64}([1 0 0; 0 1 0; 0 0 1]), # primitive/simple 'F'=>SMatrix{3,3,Float64}([0 1 1; 1 0 1; 1 1 0]./2), # face-centered 'I'=>SMatrix{3,3,Float64}([-1 1 1; 1 -1 1; 1 1 -1]./2), # body-centered 'R'=>SMatrix{3,3,Float64}([2 -1 -1; 1 1 -2; 1 1 1]./3), # rhombohedrally-centered 'A'=>SMatrix{3,3,Float64}([2 0 0; 0 1 -1; 0 1 1]./2), # base-centered (along x) 'C'=>SMatrix{3,3,Float64}([1 1 0; -1 1 0; 0 0 2]./2)) # base-centered (along z) ) function canonicalize_centering(cntr, ::Val{D}, ::Val{P}) where {D,P} if D == P # space/plane/line groups return cntr elseif D == 3 && P == 2 # layer groups return cntr == '𝑝' ? 'P' : cntr == '𝑐' ? 'C' : error(DomainError(cntr, "invalid layer group centering")) elseif D == 3 && P == 1 # rod groups return cntr == '𝓅' ? 'P' : error(DomainError(cntr, "invalid rod group centering")) elseif D == 2 && P == 1 # frieze groups return cntr == '𝓅' ? 'p' : error(DomainError(cntr, "invalid frieze group centering")) else throw(DomainError((D,P), "invalid combination of dimensionality D and periodicity P")) end end @doc raw""" primitivebasismatrix(cntr::Char, ::Val{D}=Val(3)) --> SMatrix{D,D,Float64} primitivebasismatrix(cntr::Char, ::Val{D}, ::Val{P}) --> SMatrix{D,D,Float64} Return the transformation matrix ``\mathbf{P}`` that transforms a conventional unit cell with centering `cntr` to the corresponding primitive unit cell (in dimension `D` and periodicity `P`) in CDML setting. If `P` is not provided, it default to `D` (as e.g., applicable to Crystalline.jl's `spacegroup`). If `D` and `P` differ, a subperiodic group setting is assumed (as e.g., applicable to Crystalline.jl's `subperiodicgroup`). ## Transformations in direct and reciprocal space ### Bases The returned transformation matrix ``\mathbf{P}`` transforms a direct-space conventional basis ``(\mathbf{a}\ \mathbf{b}\ \mathbf{c})`` to the direct-space primitive basis ```math (\mathbf{a}'\ \mathbf{b}'\ \mathbf{c}') = (\mathbf{a}\ \mathbf{b}\ \mathbf{c})\mathbf{P}. ``` Analogously, ``\mathbf{P}`` transforms a reciprocal-space conventional basis ``(\mathbf{a}^*\ \mathbf{b}^*\ \mathbf{c}^*)`` to ```math (\mathbf{a}^{*\prime}\ \mathbf{b}^{*\prime}\ \mathbf{c}^{*\prime}) = (\mathbf{a}^*\ \mathbf{b}^*\ \mathbf{c}^*)(\mathbf{P}^{-1})^{\text{T}}. ``` see also [`transform(::DirectBasis, ::AbstractMatrix{<:Real})`](@ref) and [`transform(::ReciprocalBasis, ::AbstractMatrix{<:Real})`](@ref)). ### Coordinates The coordinates of a point in either direct or reciprocal space, each referred to a basis, also transform under ``\mathbf{P}``. Concretely, direct- and reciprocal-space conventional points ``\mathbf{r} = (r_1, r_2, r_3)^{\text{T}}`` and ``\mathbf{k} = (k_1, k_2, k_3)^{\text{T}}``, respectively, transform to a primitive setting under ``\mathbf{P}`` according to: ```math \mathbf{r}' = \mathbf{P}^{-1}\mathbf{r},\\ \mathbf{k}' = \mathbf{P}^{\text{T}}\mathbf{k}. ``` See also [`transform(::DirectPoint, ::AbstractMatrix{<:Real})`](@ref) and [`transform(::ReciprocalPoint, ::AbstractMatrix{<:Real})`](@ref)). ## Setting conventions The setting choice for the primitive cell implied by the returned ``\mathbf{P}`` follows the widely adopted Cracknell-Davies-Miller-Love (CDML) convention.[^CDML] This convention is explicated e.g. in Table 2 of [^Aroyo] (or, alternatively, can be inferred from Tables 1.5.4.1 and 1.5.4.2 of [^ITB2]) and is followed e.g. on the Bilbao Crystallographic Server[^BCS], in the CDML reference work on space group irreps[^CDML], and in the C library `spglib`.[^spglib] Note that this setting choice is _not_ what is frequently referred to as the "ITA primitive setting", from which it differs for hP, hR, and oA Bravais types. The setting choice is usually referred to as the CDML primitive setting, or, less frequently and more ambiguously, as the crystallographic primitive setting. [^CDML]: Cracknell, Davies, Miller, & Love, Kroenecker Product Tables, Vol. 1 (1979). [^BCS]: Bilbao Crystallographic Server, [KVEC](https://www.cryst.ehu.es/cryst/get_kvec.html). [^Aroyo]: Aroyo *et al.*, [Acta Cryst. A70, 126 (2014)] (https://doi.org/10.1107/S205327331303091X): Table 2 gives ``(\mathbf{P}^{-1})^{\text{T}}``. [^ITB2]: Hahn, International Tables of Crystallography, Vol. B, 2nd edition (2001). [^spglib]: Spglib documentation: [Transformation to the primitive setting] (https://spglib.github.io/spglib/definition.html#transformation-to-the-primitive-cell). Thus, Bravais.jl and [Spglib.jl](https://github.com/singularitti/Spglib.jl) transform to identical primitive settings and are hence mutually compatible. """ @inline function primitivebasismatrix(cntr::Char, Dᵛ::Val{D}=Val(3), Pᵛ::Val{P}=Val(D)) where {D,P} D ∉ 1:3 && _throw_invalid_dim(D) P ∉ 1:D && throw(DomainError((D,P), "invalid combination of dimensionality D and periodicity P")) cntr = canonicalize_centering(cntr, Dᵛ, Pᵛ) return PRIMITIVE_BASIS_MATRICES[D][cntr] end @inline function centeringtranslation(cntr::Char, Dᵛ::Val{D}=Val(3), Pᵛ::Val{P}=Val(D)) where {D,P} D ∉ 1:3 && _throw_invalid_dim(D) P ∉ 1:D && throw(DomainError((D,P), "invalid combination of dimensionality D and periodicity P")) cntr = canonicalize_centering(cntr, Dᵛ, Pᵛ) if D == 3 if cntr == 'P'; return zeros(SVector{3}) elseif cntr == 'I'; return SVector((1,1,1)./2) elseif cntr == 'F'; return SVector((1,0,1)./2) elseif cntr == 'R'; return SVector((2,1,1)./3) elseif cntr == 'A'; return SVector((0,1,1)./2) elseif cntr == 'C'; return SVector((1,1,0)./2) else; _throw_invalid_cntr(cntr, 3) end elseif D == 2 if cntr == 'p'; return zeros(SVector{2}) elseif cntr == 'c'; return SVector((1,1)./2) else; _throw_invalid_cntr(cntr, 2) end elseif D == 1 if cntr == 'p'; return zeros(SVector{1}) else; _throw_invalid_cntr(cntr, 1) end end error("unreachable reached") end function all_centeringtranslations(cntr::Char, Dᵛ::Val{D}=Val(3), Pᵛ::Val{P}=Val(D)) where {D,P} D ∉ 1:3 && _throw_invalid_dim(D) P ∉ 1:D && _throw_invalid_dim(P) cntr = canonicalize_centering(cntr, Dᵛ, Pᵛ) if cntr == 'P' || cntr == 'p' # primitive cell is equal to conventional cell: 0 extra centers return SVector{D,Float64}[] elseif D == 3 && cntr == 'F' # primitive cell has 1/4th the volume of conventional cell: 3 extra centers return [SVector((0,1,1)./2), SVector((1,0,1)./2), SVector((1,1,0)./2)] elseif D == 3 && cntr == 'R' # primitive cell has 1/3rd the volume of conventional cell: 2 extra centers return [SVector((2,1,1)./3), SVector((1,2,2)./3)] else # 'I', 'C', 'c', 'A' # primitive cell has half the volume of conventional cell: 1 extra center return [centeringtranslation(cntr, Dᵛ)] end end """ centering_volume_fraction(cntr, Dᵛ, Pᵛ) --> Int Return the (integer-) ratio between the volumes of the conventional and primitive unit cells for a space or subperiodic group with centering `cntr`, embedding dimension `D`, and periodicity dimension `P`. """ @inline function centering_volume_fraction(cntr::Char, Dᵛ::Val{D}=Val(3), Pᵛ::Val{P}=Val(D)) where {D,P} D ∉ 1:3 && _throw_invalid_dim(D) P ∉ 1:D && _throw_invalid_dim(P) cntr = canonicalize_centering(cntr, Dᵛ, Pᵛ) if cntr == 'P' || cntr == 'p' return 1 elseif D == 3 && cntr == 'F' return 4 elseif D == 3 && cntr == 'R' return 3 else # 'I', 'C', 'c', 'A' return 2 end end # ---------------------------------------------------------------------------------------- # """ reciprocalbasis(Rs) --> ::ReciprocalBasis{D} Return the reciprocal basis of a direct basis `Rs` in `D` dimensions, provided as a `StaticVector` of `AbstractVector`s (e.g., a `DirectBasis{D}`) or a `D`-dimensional `NTuple` of `AbstractVector`s, or a (or, type-unstably, as any iterable of `AbstractVector`s). """ function reciprocalbasis(Rs::Union{NTuple{D, <:AbstractVector{<:Real}}, StaticVector{D, <:AbstractVector{<:Real}}}) where D if D == 3 G₁′ = Rs[2]×Rs[3] pref = 2π/dot(Rs[1], G₁′) vecs = pref .* (G₁′, Rs[3]×Rs[1], Rs[1]×Rs[2]) elseif D == 2 G₁′ = (@SVector [-Rs[2][2], Rs[2][1]]) pref = 2π/dot(Rs[1], G₁′) vecs = pref .* (G₁′, (@SVector [Rs[1][2], -Rs[1][1]])) elseif D == 1 vecs = (SVector{1,Float64}(2π/first(Rs[1])),) else # The general definition of the reciprocal basis is [G₁ ... Gₙ]ᵀ = 2π[R₁ ... Rₙ]⁻¹; # that form should generally be a bit slower than the above specific variants, cf. # the inversion operation, so we only use it as a high-dimensional fallback. Since # we use SVectors, however, either approach will probably have the same performance. Rm = stack(Rs) Gm = 2π.*inv(transpose(Rm)) vecs = ntuple(i->Gm[:,i], Val(D)) end return ReciprocalBasis{D}(vecs) end reciprocalbasis(Rs) = reciprocalbasis(Tuple(Rs)) # type-unstable convenience accesor # TODO: Provide a utility to go from ReciprocalBasis -> DirectBasis. Maybe deprecate # `reciprocalbasis` and have a more general function `dualbasis` instead? # ---------------------------------------------------------------------------------------- # @doc raw""" transform(Rs::DirectBasis, P::AbstractMatrix{<:Real}) Transform a direct basis `Rs` ``= (\mathbf{a}\ \mathbf{b}\ \mathbf{c})`` under the transformation matrix `P` ``= \mathbf{P}``, returning `Rs′` ``= (\mathbf{a}'\ \mathbf{b}'\ \mathbf{c}') = (\mathbf{a}\ \mathbf{b}\ \mathbf{c}) \mathbf{P}``. """ function transform(Rs::DirectBasis{D}, P::AbstractMatrix{<:Real}) where D # Rm′ = Rm*P (w/ Rm a matrix w/ columns of untransformed direct basis vecs Rᵢ) Rm′ = stack(Rs)*P return DirectBasis{D}(ntuple(i->Rm′[:,i], Val(D))) end @doc raw""" transform(Gs::ReciprocalBasis, P::AbstractMatrix{<:Real}) Transform a reciprocal basis `Gs` ``= (\mathbf{a}^* \mathbf{b}^* \mathbf{c}^*)`` under the transformation matrix `P` ``= \mathbf{P}``, returning `Gs′` ``= (\mathbf{a}^{*\prime}\ \mathbf{b}^{*\prime}\ \mathbf{c}^{*\prime}) = (\mathbf{a}^*\ \mathbf{b}^*\ \mathbf{c}^*)(\mathbf{P}^{-1})^{\text{T}}``. """ function transform(Gs::ReciprocalBasis{D}, P::AbstractMatrix{<:Real}) where D # Gm′ = Gm*(P⁻¹)ᵀ = Gm*(Pᵀ)⁻¹ (w/ Gm a matrix w/ columns of reciprocal vecs Gᵢ) Gm′ = stack(Gs)/P' return ReciprocalBasis{D}(ntuple(i->Gm′[:,i], Val(D))) end @doc raw""" transform(r::DirectPoint, P::AbstractMatrix{<:Real}) --> r′::typeof(r) Transform a point in direct space `r` ``= (r_1, r_2, r_3)^{\text{T}}`` under the transformation matrix `P` ``= \mathbf{P}``, returning `r′` ``= (r_1', r_2', r_3')^{\text{T}} = \mathbf{P}^{-1}(r_1', r_2', r_3')^{\text{T}}``. """ function transform(r::DirectPoint{D}, P::AbstractMatrix{<:Real}) where D return DirectPoint{D}(P\parent(r)) end @doc raw""" transform(k::ReciprocalPoint, P::AbstractMatrix{<:Real}) --> k′::typeof(k) Transform a point in reciprocal space `k` ``= (k_1, k_2, k_3)^{\text{T}}`` under the transformation matrix `P` ``= \mathbf{P}``, returning `k′` ``= (k_1', k_2', k_3')^{\text{T}} = \mathbf{P}^{\text{T}}(k_1', k_2', k_3')^{\text{T}}``. """ function transform(k::ReciprocalPoint{D}, P::AbstractMatrix{<:Real}) where D return ReciprocalPoint{D}(P'*parent(k)) end # ---------------------------------------------------------------------------------------- # function primitivize(V::Union{AbstractBasis{D}, AbstractPoint{D}}, cntr::Char) where D if cntr == 'P' || cntr == 'p' # the conventional and primitive bases coincide return V else P = primitivebasismatrix(cntr, Val(D)) return transform(V, P) end end function primitivize(V::Union{AbstractBasis{D}, AbstractPoint{D}}, sgnum::Integer) where D cntr = centering(sgnum, D) return primitivize(V, cntr) end @doc """ primitivize(V::Union{AbstractBasis, AbstractPoint}, cntr_or_sgnum::Union{Char, <:Integer}) --> V′::typeof(V) Return the primitive basis or point `V′` associated with the input conventional `AbstractBasis` or `AbstractPoint` `V`. The assumed centering type is specified by `cntr_or_sgnum`, given either as a centering character (`::Char`) or inferred from a space group number (`::Integer`) and the dimensionality of `V` (see also [`centering(::Integer, ::Integer)`](@ref)). """ primitivize(::Union{AbstractBasis, AbstractPoint}, ::Union{Char, <:Integer}) @doc """ primitivize(Rs::DirectBasis, cntr_or_sgnum::Union{Char, <:Integer}) --> Rs′::typeof(Rs) Return the primitive direct basis `Rs′` corresponding to the input conventional direct basis `Rs`. """ primitivize(::DirectBasis, ::Union{Char, <:Integer}) @doc """ primitivize(Gs::ReciprocalBasis, cntr_or_sgnum::Union{Char, <:Integer}) --> Gs′::typeof(Gs) Return the primitive reciprocal basis `Gs′` corresponding to the input conventional reciprocal basis `Gs`. """ primitivize(::ReciprocalBasis, ::Union{Char, <:Integer}) @doc """ primitivize(r::DirectPoint, cntr_or_sgnum::Union{Char, <:Integer}) --> r′::typeof(r) Return the direct point `r′` with coordinates in a primitive basis, corresponding to the input point `r` with coordinates in a conventional basis. """ primitivize(::DirectPoint, ::Union{Char, <:Integer}) @doc """ primitivize(k::ReciprocalPoint, cntr_or_sgnum::Union{Char, <:Integer}) --> k′::typeof(k) Return the reciprocal point `k′` with coordinates in a primitive basis, corresponding to the input point `k` with coordinates in a conventional basis. """ primitivize(::ReciprocalPoint, ::Union{Char, <:Integer}) # ---------------------------------------------------------------------------------------- # function conventionalize(V′::Union{AbstractBasis{D}, AbstractPoint{D}}, cntr::Char) where D if cntr == 'P' || cntr == 'p' # the conventional and primitive bases coincide return V′ else P = primitivebasismatrix(cntr, Val(D)) return transform(V′, inv(P)) end end function conventionalize(V′::Union{AbstractBasis{D}, AbstractPoint{D}}, sgnum::Integer) where D cntr = centering(sgnum, D) return conventionalize(V′, cntr) end @doc """ conventionalize(V′::Union{AbstractBasis, AbstractPoint}, cntr_or_sgnum::Union{Char, <:Integer}) --> V::typeof(V′) Return the conventional basis or point `V` associated with the input primitive `AbstractBasis` or `AbstractPoint` `V′`. The assumed centering type is specified by `cntr_or_sgnum`, given either as a centering character (`::Char`) or inferred from a space group number (`::Integer`) and the dimensionality of `V′` (see also [`centering(::Integer, ::Integer)`](@ref)). """ conventionalize(::Union{AbstractBasis, AbstractPoint}, ::Union{Char, <:Integer}) @doc """ conventionalize(Rs′::DirectBasis, cntr_or_sgnum::Union{Char, <:Integer}) --> Rs::typeof(Rs′) Return the conventional direct basis `Rs` corresponding to the input primitive direct basis `Rs′`. """ conventionalize(::DirectBasis, ::Union{Char, <:Integer}) @doc """ conventionalize(Gs′::ReciprocalBasis, cntr_or_sgnum::Union{Char, <:Integer}) --> Gs::typeof(Gs′) Return the conventional reciprocal basis `Gs` corresponding to the input primitive reciprocal basis `Gs′`. """ conventionalize(::ReciprocalBasis, ::Union{Char, <:Integer}) @doc """ conventionalize(r′::DirectPoint, cntr_or_sgnum::Union{Char, <:Integer}) --> r::typeof(r′) Return the direct point `r` with coordinates in a conventional basis, corresponding to the input point `r′` with coordinates in a primitive basis. """ conventionalize(::DirectPoint, ::Union{Char, <:Integer}) @doc """ conventionalize(k′::ReciprocalPoint, cntr_or_sgnum::Union{Char, <:Integer}) --> k::typeof(k′) Return the reciprocal point `k` with coordinates in a conventional basis, corresponding to the input point `k′` with coordinates in a primitive basis. """ conventionalize(::ReciprocalPoint, ::Union{Char, <:Integer}) # ---------------------------------------------------------------------------------------- # const _basis_explain_str = "Depending on the object, the basis may be inferrable " * "directly from the object; if not, it must be supplied explicitly." @doc """ cartesianize! In-place transform an object with coordinates in an lattice basis to an object with coordinates in a Cartesian basis. $_basis_explain_str """ function cartesianize! end @doc """ cartesianize Transform an object with coordinates in an lattice basis to an object with coordinates in a Cartesian basis. $_basis_explain_str @doc """ function cartesianize end @doc """ latticize! In-place transform object with coordinates in a Cartesian basis to an object with coordinates in a lattice basis. $_basis_explain_str """ function latticize! end @doc """ latticize Transform an object with coordinates in a Cartesian basis to an object with coordinates in a lattice basis. $_basis_explain_str """ function latticize end @doc """ cartesianize(v::AbstractVector{<:Real}, basis) Transform a vector `v` with coordinates referred to a lattice basis to a vector with coordinates referred to the Cartesian basis implied by the columns (or vectors) of `basis`. """ cartesianize(v::AbstractVector{<:Real}, basis::AbstractMatrix{<:Real}) = basis*v function cartesianize(v::AbstractVector{<:Real}, basis::AbstractVector{<:AbstractVector{<:Real}}) return v'basis end @doc """ latticize(v::AbstractVector{<:Real}, basis) Transform a vector `v` with coordinates referred to the Cartesian basis to a vector with coordinates referred to the lattice basis implied by the columns (or vectors) of `basis`. """ latticize(v::AbstractVector{<:Real}, basis::AbstractMatrix{<:Real}) = basis\v function latticize(v::AbstractVector{<:Real}, basis::AbstractVector{<:AbstractVector{<:Real}}) return latticize(v, reduce(hcat, basis)) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
6497
# --- DirectBasis and ReciprocalBasis for crystalline lattices --- """ AbstractBasis <: StaticVector{D, SVector{D,Float64}} Abstract supertype of a `D`-dimensional basis in `D`-dimensional space. """ abstract type AbstractBasis{D, T} <: StaticVector{D, SVector{D, T}} end for (T, space_type) in zip((:DirectBasis, :ReciprocalBasis), ("direct", "reciprocal")) @eval begin @doc """ $($T){D} <: AbstractBasis{D} A wrapper type over `D` distinct `D`-dimensional vectors (given as a `SVector{D, SVector{D,Float64}}`), defining a lattice basis in $($space_type) space. """ struct $T{D} <: AbstractBasis{D, Float64} vs::SVector{D, SVector{D, Float64}} # ambiguity-resolving methods relative to StaticArrays's methods $T{D}(vs::StaticVector{D}) where D = new{D}(convert(SVector{D, SVector{D, Float64}}, vs)) $T{D}(vs::NTuple{D}) where D = new{D}(convert(SVector{D, SVector{D, Float64}}, vs)) $T{D}(vs::AbstractVector) where D = new{D}(convert(SVector{D, SVector{D, Float64}}, vs)) # special-casing for D=1 (e.g., to make `$T([1.0])` work) $T{1}(vs::StaticVector{1,<:Real}) = new{1}(SVector((convert(SVector{1, Float64}, vs),))) $T{1}(vs::NTuple{1,Real}) = new{1}(SVector((convert(SVector{1, Float64}, vs),))) $T{1}(vs::AbstractVector{<:Real}) = new{D}(SVector((convert(SVector{1, Float64}, vs),))) end end @eval function convert(::Type{$T{D}}, vs::StaticVector{D, <:StaticVector{D, <:Real}}) where D $T{D}(convert(SVector{D, SVector{D, Float64}}, vs)) end @eval $T(vs::StaticVector{D}) where D = $T{D}(vs) # resolve more ambiguities, both @eval $T(vs::StaticVector{D}...) where D = $T{D}(vs) # internally and with StaticArrays, @eval $T(vs::NTuple{D}) where D = $T{D}(vs) # and make most reasonable accessor @eval $T(vs::NTuple{D}...) where D = $T{D}(vs) # patterns functional @eval $T(vs::AbstractVector) = $T{length(vs)}(vs) # [type-unstable] @eval $T(vs::AbstractVector...) = $T{length(vs)}(promote(vs...)) end parent(Vs::AbstractBasis) = Vs.vs # define the AbstractArray interface for AbstractBasis{D} @propagate_inbounds getindex(Vs::AbstractBasis, i::Int) = parent(Vs)[i] size(::AbstractBasis{D}) where D = (D,) IndexStyle(::Type{<:AbstractBasis}) = IndexLinear() _angle(rA, rB) = acos(dot(rA, rB) / (norm(rA) * norm(rB))) angles(Rs::AbstractBasis{2}) = _angle(Rs[1], Rs[2]) function angles(Rs::AbstractBasis{3}) α = _angle(Rs[2], Rs[3]) β = _angle(Rs[3], Rs[1]) γ = _angle(Rs[1], Rs[2]) return α, β, γ end angles(::AbstractBasis{D}) where D = _throw_invalid_dim(D) if VERSION > v"1.9.0-DEV.1163" # since https://github.com/JuliaLang/julia/pull/43334, Julia defines its own `stack`; # however, it is still much slower than a naive implementation based on `reduce` cf. # https://github.com/JuliaLang/julia/issues/52590. As such, we extend `Base.stack` even # on more recent versions; when the issue is fixed, it would be enough to only define # `stack` on earlier versions of Julia, falling back to `Base.stack` on later versions. import Base: stack end """ stack(Vs::AbstractBasis) Return a matrix `[Vs[1] Vs[2] .. Vs[D]]` from `Vs::AbstractBasis{D}`, i.e., the matrix whose columns are the basis vectors of `Vs`. """ stack(Vs::AbstractBasis) = reduce(hcat, parent(Vs)) """ volume(Vs::AbstractBasis) Return the volume ``V`` of the unit cell associated with the basis `Vs::AbstractBasis{D}`. The volume is computed as ``V = \\sqrt{\\mathrm{det}\\mathbf{G}}`` with with ``\\mathbf{G}`` denoting the metric matrix of `Vs` (cf. the International Tables of Crystallography, Volume A, Section 5.2.2.3). See also [`metricmatrix`](@ref). """ volume(Vs::AbstractBasis) = sqrt(det(metricmatrix(Vs))) """ metricmatrix(Vs::AbstractBasis) Return the (real, symmetric) metric matrix of a basis `Vs`, i.e., the matrix with elements ``G_{ij} =`` `dot(Vs[i], Vs[j])`, as defined in the International Tables of Crystallography, Volume A, Section 5.2.2.3. Equivalently, this is the Gram matrix of `Vs`, and so can also be expressed as `Vm' * Vm` with `Vm` denoting the columnwise concatenation of the basis vectors in `Vs`. See also [`volume`](@ref). """ function metricmatrix(Vs::AbstractBasis{D}) where D Vm = stack(Vs) return Vm' * Vm # equivalent to [dot(v, w) for v in Vs, w in Vs] end # ---------------------------------------------------------------------------------------- # """ AbstractPoint{D, T} <: StaticVector{D, T} Abstract supertype of a `D`-dimensional point with elements of type `T`. """ abstract type AbstractPoint{D, T} <: StaticVector{D, T} end parent(p::AbstractPoint) = p.v @propagate_inbounds getindex(v::AbstractPoint, i::Int) = parent(v)[i] size(::AbstractPoint{D}) where D = (D,) IndexStyle(::Type{<:AbstractPoint}) = IndexLinear() for (PT, BT, space_type) in zip((:DirectPoint, :ReciprocalPoint), (:DirectBasis, :ReciprocalBasis), ("direct", "reciprocal")) @eval begin @doc """ $($PT){D} <: AbstractPoint{D} A wrapper type over an `SVector{D, Float64}`, defining a single point in `D`-dimensional $($space_type) space. The coordinates of a $($PT) are generally assumed specified relative to an associated $($BT). To convert to Cartesian coordinates, see [`cartesianize`](@ref). """ struct $PT{D} <: AbstractPoint{D, Float64} v::SVector{D, Float64} # ambiguity-resolving methods relative to StaticArray's $PT{D}(v::StaticVector{D, <:Real}) where D = new{D}(convert(SVector{D, Float64}, v)) $PT{D}(v::NTuple{D, Real}) where D = new{D}(convert(SVector{D, Float64}, v)) $PT{D}(v::AbstractVector{<:Real}) where D = new{D}(convert(SVector{D, Float64}, v)) end @eval function convert(::Type{$PT{D}}, v::StaticVector{D, <:Real}) where D $PT{D}(convert(SVector{D, Float64}, v)) end @eval $PT(v::StaticVector{D}) where D = $PT{D}(v) # resolve internal/StaticArrays @eval $PT(v::NTuple{D, Real}) where D = $PT{D}(v) # ambiguities & add accessors @eval $PT(v::AbstractVector) = $PT{length(v)}(v) @eval $PT(v::Real...) = $PT{length(v)}(v) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2447
# Equivalent to (unchecked) `rand(Uniform(low, high))` from Distributions.jl, but copied # in here to avoid taking on that dependency (long load time; ~7 s) uniform_rand(low::Real, high::Real) = low + (high - low) * rand() #= relrand(lims::NTuple{2,Real}) --> Float64 Computes a random number in the range specified by the two-element tuple `lims`. The random numbers are sampled from two uniform distributions, namely [`lims[1]`, 1] and [1, `lims[2]`], in such a way as to ensure that the sampling is uniform over the joint interval [-1/`lims[1]`, -1] ∪ [1, `lims[2]`]. This is useful for ensuring an even sampling of numbers that are either smaller or larger than unity. E.g. for `x = relrand((0.2,5.0))`, `x` is equally probable to fall in inv(`x`)∈[1,5] or `x`∈[1,5]. =# function relrand(lims::NTuple{2,<:Real}) low, high = lims; invlow = inv(low) lowthres = (invlow - 1.0)/(invlow + high - 2.0) if rand() < lowthres && low < 1.0 # smaller than 1.0 r = uniform_rand(low, 1.0) elseif high > 1.0 # bigger than 1.0 r = uniform_rand(1.0, high) else # default return uniform_rand(low, high) end end # === frequent error messages === # Note: there are some copied/overlapping definitions w/ Crystalline here @noinline function _throw_invalid_cntr(cntr::AbstractChar, D::Integer) if D == 3 throw(DomainError(cntr, "centering abbreviation must be either P, I, F, R, A, or C in dimension 3")) elseif D == 2 throw(DomainError(cntr, "centering abbreviation must be either p or c in dimension 2")) elseif D == 1 throw(DomainError(cntr, "centering abbreviation must be p in dimension 1")) else _throw_invalid_dim(D) end end @noinline function _throw_invalid_dim(D::Integer) throw(DomainError(D, "dimension must be 1, 2, or 3")) end @noinline function _throw_invalid_sgnum(sgnum::Integer, D::Integer) throw(DomainError(sgnum, "group number must be between 1 and $((2, 17, 230)[D]) in dimension $D")) end @inline function boundscheck_sgnum(sgnum::Integer, D::Integer) if D == 3 sgnum ∈ 1:230 || _throw_invalid_sgnum(sgnum, 3) elseif D == 2 sgnum ∈ 1:17 || _throw_invalid_sgnum(sgnum, 2) elseif D == 1 && sgnum ∈ 1:2 || _throw_invalid_sgnum(sgnum, 1) else _throw_invalid_dim(D) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
22243
module ParseIsotropy using Crystalline using Crystalline: AbstractIrrep export parselittlegroupirreps # --- Magic numbers --- const BYTES_PER_KCHAR = 3 const BYTES_PER_KVEC = 16*BYTES_PER_KCHAR; # --- 3D Space group irrep struct --- struct SGIrrep3D{T} <: AbstractIrrep{3} where T iridx::Int # sequential index assigned to ir by Stokes et al cdml::String # CDML label of irrep (including 𝐤-point label) irdim::Int # dimensionality of irrep (i.e. size) sgnum::Int # space group number sglabel::String # Hermann-Mauguin label of space group reality::Reality # real, pseudo-real, or complex order::Int # number of operations knum::Int # number of 𝐤-vecs in star pmknum::Int # number of ±𝐤-vecs in star special::Bool # whether star{𝐤} describes high-symmetry points pmkstar::Vector{KVec{3}} # star{𝐤} for Complex, star{±𝐤} for Real ops::Vector{SymOperation{3}} # every symmetry operation in space group translations::Vector{Vector{Float64}} # translations assoc with matrix repres of ops in irrep matrices::Vector{Matrix{T}} # non-translation assoc with matrix repres of ops in irrep end num(sgir::SGIrrep3D) = sgir.sgnum (sgir::SGIrrep3D)(αβγ=nothing) = sgir.matrices # TODO: add missing αβγ dependence order(sgir::SGIrrep3D) = sgir.order iuc(sgir::SGIrrep3D) = sgir.sglabel operations(sgir::SGIrrep3D) = sgir.ops isspecial(sgir::SGIrrep3D) = sgir.special orbit(sgir::SGIrrep3D) = sgir.pmkstar irdim(sgir::SGIrrep3D) = sgir.irdim dim(sgir::SGIrrep3D) = 3 # --- Parsing --- parseisoir(T::Type{Real}) = parseisoir(Float64) # just for being able to call it with Real or Complex parseisoir(T::Type{Complex}) = parseisoir(ComplexF64) # as input rather than Float64 and ComplexF64 function parseisoir(::Type{T}) where T<:Union{Float64,ComplexF64} datatag = if T <: Real; "PIR"; elseif T <: Complex; "CIR"; end io = open((@__DIR__)*"/../data/misc/ISOTROPY/"*datatag*"_data.txt","r") irreps = Vector{Vector{SGIrrep3D{T}}}() while !eof(io) # --- READ BASIC INFO, LIKE SG & IR #, NAMES, DIMENSIONALITY, ORDER --- irnum = parse(Int, String(read(io, 5))) # read IR# (next 5 characters) sgnum = parse(Int, String(read(io, 4))) # read SG# (next 4 characters) # read SGlabel, IRlabel, skip(io, 2) sglabel = filter(!isequal(' '), readuntil(io, "\"")) skip(io, 2) irlabel = Crystalline.formatirreplabel( Crystalline.roman2greek(filter(!isequal(' '), readuntil(io, "\"")))) # read irdim, irreality, knum, pmknum, opnum (rest of line; split at spaces) # irdim : dimension of IR # irreality : reality of IR (see Sec. 5 of Acta Cryst. (2013). A69, 388) # - 1 : intrinsically real IR # - 2 : intrinsically complex IR, but equiv. to its # own complex conjugate; pseudoreal # - 3 : intrinsically complex IR, inequivalent to # its own complex conjugate # knum : # of 𝐤-points in 𝐤-star # pmknum : # of 𝐤-points in ±𝐤-star # opnum : number of symmetry elements in little group of 𝐤-star # (i.e. order of little group of 𝐤-star) irdim, irreality′, knum, pmknum, opnum = parsespaced(String(readline(io))) # --- REMAP REALITY TYPE TO USUAL CONVENTION --- # ISOTROPY's convention is: 1 => REAL, 2 => PSEUDOREAL, and 3 => COMPLEX. # Our convention (consistent with the Herring and Frobenius-Schur criteria) is # instead that REAL = 1, PSEUDOREAL = -1, and COMPLEX = 0, as in encoded in the # Reality enum. We make the swap here, so we get a single consistent convention. irreality = fix_isotropy_reality_convention(irreality′) # --- READ VECTORS IN THE (±)𝐤-STAR (those not related by ±symmetry) --- # this is a weird subtlelty: Stokes et al store their 4×4 𝐤-matrices # in column major format; but they store their operators and irreps # in row-major format - we take care to follow their conventions on # a case-by-case basis Nstoredk = T <: Real ? pmknum : knum # number of stored 𝐤-points depend on whether we load real or complex representations k = [Vector{Float64}(undef, 3) for n=Base.OneTo(Nstoredk)] kabc = [Matrix{Float64}(undef, 3,3) for n=Base.OneTo(Nstoredk)] for n = Base.OneTo(Nstoredk) # for Complex, loop over distinct vecs in 𝐤-star; for Real loop over distinct vecs in ±𝐤-star if n == 1 # we don't have to worry about '\n' then, and can use faster read() kmat = reshape(parsespaced(String(read(io, BYTES_PER_KVEC))), (4,4)) # load as column major matrix else kmat = reshape(parsespaced(readexcept(io, BYTES_PER_KVEC, '\n')), (4,4)) # load as column major matrix end # Stokes' conventions implicitly assign NaN columns to unused free parameters when any # other free parameters are in play; here, we prefer to just have zero-columns. To do # that, we change common denominators to 1 if they were 0 in Stokes' data. kdenom = [(iszero(origdenom) ? 1 : origdenom) for origdenom in kmat[4,:]] # 𝐤-vectors are specified as a pair (k, kabc), denoting a 𝐤-vector # ∑³ᵢ₌₁ (kᵢ + aᵢα+bᵢβ+cᵢγ)*𝐆ᵢ (w/ recip. basis vecs. 𝐆ᵢ) # here the matrix kabc is decomposed into vectors (𝐚,𝐛,𝐜) while α,β,γ are free # parameters ranging over all non-special values (i.e. not coinciding with high-sym 𝐤) k[n] = (@view kmat[1:3,1])./kdenom[1] # coefs of "fixed" parts kabc[n] = (@view kmat[1:3,2:4])./(@view kdenom[2:4])' # coefs of free parameters (α,β,γ) end kspecial = iszero(kabc[1]) # if no free parameters, i.e. 𝐚=𝐛=𝐜=𝟎 ⇒ high-symmetry 𝐤-point (i.e. "special") checked_read2eol(io) # read to end of line & check we didn't miss anything # --- READ OPERATORS AND IRREPS IN LITTLE GROUP OF ±𝐤-STAR --- opmatrix = [Matrix{Float64}(undef, 3,4) for _=1:opnum] irtranslation = [zeros(Float64, 3) for _=1:opnum] irmatrix = [Matrix{T}(undef, irdim,irdim) for _=1:opnum] for i = 1:opnum # --- OPERATOR --- # matrix form of the symmetry operation (originally in a 4×4 form; the [4,4] idx is a common denominator) optempvec = parsespaced(readline(io)) opmatrix[i] = rowmajorreshape(optempvec, (4,4))[1:3,:]./optempvec[16] # surprisingly, this is in row-major form..! # note the useful convention that the nonsymmorphic translation always ∈[0,1[; in parts of Bilbao, components are # occasionally negative; this makes construction of `MultTable`s unnecessarily cumbersome # --- ASSOCIATED IRREP --- if !kspecial # if this is a general position, we have to incorporate a translational modulation in the point-part of the irreps transtemp = parsespaced(readline(io)) irtranslation[i] = transtemp[1:3]./transtemp[4] else irtranslation[i] = zeros(Float64, 3) end # irrep matrix "base" (read next irdim^2 elements into matrix) elcount1 = elcount2 = 0 while elcount1 != irdim^2 tempvec = parsespaced(T, readline(io)) elcount2 += length(tempvec) irmatrix[i][elcount1+1:elcount2] = tempvec elcount1 = elcount2 end irmatrix[i] = permutedims(irmatrix[i], (2,1)) # we loaded as column-major, but Stokes et al use row-major (unlike conventional Fortran) irmatrix[i] .= reprecision_data.(irmatrix[i]) end # --- STORE DATA IN VECTOR OF IRREPS --- irrep = SGIrrep3D{T}(irnum, irlabel, irdim, sgnum, sglabel, irreality, opnum, knum, pmknum, kspecial, KVec.(k, kabc), SymOperation{3}.(opmatrix), irtranslation, irmatrix) length(irreps) < sgnum && push!(irreps, Vector{SGIrrep3D{T}}()) # new space group idx push!(irreps[sgnum], irrep) # --- FINISHED READING CURRENT IRREP; MOVE TO NEXT --- end close(io) return irreps end """ parsespaced(T::Type, s::AbstractString) Parses a string `s` with spaces interpreted as delimiters, split- ting at every contiguious block of spaces and returning a vector of the split elements, with elements parsed as type `T`. E.g. `parsespaced(Int, " 1 2 5") = [1, 2, 5]` """ @inline function parsespaced(T::Type{<:Number}, s::AbstractString) spacesplit=split(s, r"\s+", keepempty=false) if T <: Complex for (i,el) in enumerate(spacesplit) if el[1]=='(' @inbounds spacesplit[i] = replace(replace(el[2:end-1],",-"=>"-"),','=>'+')*"i" end end end return parse.(T, spacesplit) end @inline parsespaced(s::AbstractString) = parsespaced(Int, s) """ readexcept(s::IO, nb::Integer, except::Char; all=true) Same as `read(s::IO, nb::Integer; all=true)` but allows us ignore byte matches to those in `except`. """ function readexcept(io::IO, nb::Integer, except::Union{Char,Nothing}='\n'; all=true) out = IOBuffer(); n = 0 while n < nb && !eof(io) c = read(io, Char) if c == except continue end write(out, c) n += 1 end return String(take!(out)) end function checked_read2eol(io) # read to end of line & check that this is indeed the last character s = readline(io) # check that the string indeed is empty; i.e. we didn't miss anything @assert isempty(s) "Parsing error; unexpected additional characters after expected EOL" return nothing end function rowmajorreshape(v::AbstractVector, dims::Tuple) return PermutedDimsArray(reshape(v, dims), reverse(ntuple(i->i, length(dims)))) end function fix_isotropy_reality_convention(iso_reality::Integer) iso_reality == 1 && return REAL iso_reality == 2 && return PSEUDOREAL iso_reality == 3 && return COMPLEX throw(DomainError(iso_reality, "unreachable: unexpected ISOTROPY reality value")) end const tabfloats = (sqrt(3)/2, sqrt(2)/2, sqrt(3)/4, cos(π/12)/sqrt(2), sin(π/12)/sqrt(2)) """ reprecision_data(x::Float64) --> Float64 Stokes et al. used a table to convert integers to floats; in addition, the floats were truncated on writing. We can restore their precision by checking if any of the relevant entries occur, and then returning their untruncated floating point value. See also `tabfloats::Tuple`. The possible floats that can occur in the irrep tables are: ┌ 0,1,-1,0.5,-0.5,0.25,-0.25 (parsed with full precision) │ ±0.866025403784439 => ±sqrt(3)/2 │ ±0.707106781186548 => ±sqrt(2)/2 │ ±0.433012701892219 => ±sqrt(3)/4 │ ±0.683012701892219 => ±cos(π/12)/sqrt(2) └ ±0.183012701892219 => ±sin(π/12)/sqrt(2) """ function reprecision_data(x::T) where T<:Real absx = abs(x) for preciseabsx in tabfloats if isapprox(absx, preciseabsx, atol=1e-4) return copysign(preciseabsx, x) end end return x end reprecision_data(z::T) where T<:Complex = complex(reprecision_data(real(z)), reprecision_data(imag(z))) function littlegroupirrep(ir::SGIrrep3D{<:Complex}) lgidx, lgops = littlegroup(operations(ir), orbit(ir)[1], centering(num(ir),3)) lgirdim′ = irdim(ir)/ir.knum; lgirdim = div(irdim(ir), ir.knum) @assert lgirdim′ == lgirdim "The dimension of the little group irrep must be an integer, equaling "* "the dimension of the space group irrep divided by the number of vectors "* "in star{𝐤}" kv = orbit(ir)[1] # representative element of the k-star; the k-vector of assoc. w/ this little group if !is_erroneous_lgir(num(ir), label(ir), 3) # broadcasting to get all the [1:lgirdim, 1:lgirdim] blocks of every irrep assoc. w/ the lgidx list lgirmatrices = getindex.((@view ir()[lgidx]), Ref(Base.OneTo(lgirdim)), Ref(Base.OneTo(lgirdim))) lgirtrans = ir.translations[lgidx] else #println("Manually swapped out corrected (CDML) LGIrrep for sgnum ", num(ir), ", irrep ", label(ir)) lgirmatrices, lgirtrans = manually_fixed_lgir(num(ir), label(ir)) end return LGIrrep{3}(label(ir), LittleGroup(num(ir), kv, klabel(ir), collect(lgops)), lgirmatrices, lgirtrans, reality(ir), false) end parselittlegroupirreps() = parselittlegroupirreps.(parseisoir(Complex)) function parselittlegroupirreps(irvec::Vector{SGIrrep3D{ComplexF64}}) lgirsd = Dict{String, Collection{LGIrrep{3}}}() curklab = nothing; accidx = Int[] for (idx, ir) in enumerate(irvec) # loop over distinct irreps (e.g., Γ1, Γ2, Γ3, Z1, Z2, ..., GP1) if curklab == klabel(ir) push!(accidx, idx) else if curklab !== nothing lgirs = Vector{LGIrrep{3}}(undef, length(accidx)) for (pos, kidx) in enumerate(accidx) # write all irreps of a specific k-point to a vector (e.g., Z1, Z2, ...) lgirs[pos] = littlegroupirrep(irvec[kidx]) end push!(lgirsd, curklab=>Collection(lgirs)) end curklab = klabel(ir) accidx = [idx,] end end # after the loop finishes, one batch of k-point irreps still needs # incorporation (because we're always _writing_ a new batch, when # we've moved into the next one); for ISOTROPY's default sorting, # this is the GP=Ω=[α,β,γ]ᵀ point) lgirs = Vector{LGIrrep{3}}(undef, length(accidx)) for (pos, kidx) in enumerate(accidx) lgirs[pos] = littlegroupirrep(irvec[kidx]) end lastklab = klabel(irvec[last(accidx)]) @assert lastklab == "Ω" push!(lgirsd, lastklab=>Collection(lgirs)) return lgirsd end const ERRONEOUS_LGIRS = (214=>"P₁", 214=>"P₂", 214=>"P₃") # extend to tuple of three-tuples if we ever need D ≠ 3 as well @inline function is_erroneous_lgir(sgnum::Integer, irlab::String, D::Integer=3) D == 1 && return false D ≠ 3 && Crystalline._throw_2d_not_yet_implemented(D) @simd for ps in ERRONEOUS_LGIRS (ps[1]==sgnum && ps[2]==irlab) && return true end return false end """ manually_fixed_lgir(sgnum::Integer, irlab::String) The small irreps associated with the little group of k-point P ≡ KVec(½,½,½) of space group 214 are not correct in ISOTROPY's dataset: specifically, while they have the correct characters and pass the 1st and 2nd character orthogonality theorems, they do not pass the grand orthogonality theorem that tests the irrep matrices themselves. To that end, we manually replace these small irreps with those listed by CDML (read off from their tables). Those irreps are manually extracted in the scripts/cdml_sg214_P1P2P3.jl file. The fix is made in littlegroupirrep(ir::SGIrrep3D{<:Complex}), using the check in is_erroneous_lgir(...), with the constant "erroneous" tuple ERRONEOUS_LGIRS. Emailed Stokes & Campton regarding the issue on Sept. 26, 2019; did not yet hear back. """ function manually_fixed_lgir(sgnum::Integer, irlab::String) # TODO: Use their new and corrected dataset (from February 17, 2020) instead of manually # fixing the old dataset. # I already verified that their new dataset is correct (and parses), and that P₁ # and P₃ pass tests. Their P₁ and P₃ (and P₂) irreps are not the same as those we # had below, but differ by a transformation R(THEIRS)R⁻¹ = (OURS) with # R = [1 1; 1 -1]/√2. # Thus, we should remove this method (here and from other callers), update and # commit the new datasets and then finally regenerate/refresh our own saved format # of the irreps (from build/write_littlegroup_irreps_from_ISOTROPY.jl) if sgnum == 214 CP = cis(π/12)/√2 # C*P ≈ 0.683013 + 0.183013im CQ = cis(5π/12)/√2 # C*Q ≈ 0.183013 + 0.683013im CcP = cis(-π/12)/√2 # C*conj(P) ≈ 0.683013 - 0.183013im CcQ = cis(-5π/12)/√2 # C*conj(Q) ≈ 0.183013 - 0.683013im if irlab == "P₁" matrices = [[1.0+0.0im 0.0+0.0im; 0.0+0.0im 1.0+0.0im], # x,y,z [0.0+0.0im 1.0+0.0im; 1.0+0.0im 0.0+0.0im], # x,-y,-z+1/2 [0.0+0.0im 0.0-1.0im; 0.0+1.0im 0.0+0.0im], # -x+1/2,y,-z [1.0+0.0im 0.0+0.0im; 0.0+0.0im -1.0+0.0im], # -x,-y+1/2,z [CP CcQ; CP -CcQ], # z,x,y [CcP CcP; CQ -CQ], # y,z,x [CcP -CcP; CQ CQ], # -y+1/2,z,-x [CP CcQ; -CP CcQ], # -z,-x+1/2,y [CcP CcP; -CQ CQ], # -y,-z+1/2,x [CP -CcQ; CP CcQ], # z,-x,-y+1/2 [CQ -CQ; CcP CcP], # y,-z,-x+1/2 [CcQ CP; -CcQ CP]] # -z+1/2,x,-y elseif irlab == "P₂" # there is, as far as I can see, nothing wrong with ISOTROPY's (214, P₂) # small irrep: but it doesn't agree with the form we extract from CDML # either. To be safe, and to have a consistent set of irreps for the P # point we just swap out this irrep as well. matrices = [[1.0+0.0im 0.0+0.0im; 0.0+0.0im 1.0+0.0im], # x,y,z [0.0+0.0im 0.0+1.0im; 0.0-1.0im 0.0+0.0im], # x,-y,-z+1/2 [0.0+0.0im -1.0+0.0im; -1.0+0.0im 0.0+0.0im], # -x+1/2,y,-z [-1.0+0.0im 0.0+0.0im; 0.0+0.0im 1.0+0.0im], # -x,-y+1/2,z [-0.5-0.5im -0.5-0.5im; 0.5-0.5im -0.5+0.5im], # z,x,y [-0.5+0.5im 0.5+0.5im; -0.5+0.5im -0.5-0.5im], # y,z,x [0.5-0.5im 0.5+0.5im; 0.5-0.5im -0.5-0.5im], # -y+1/2,z,-x [0.5+0.5im 0.5+0.5im; 0.5-0.5im -0.5+0.5im], # -z,-x+1/2,y [0.5-0.5im -0.5-0.5im; -0.5+0.5im -0.5-0.5im], # -y,-z+1/2,x [0.5+0.5im -0.5-0.5im; -0.5+0.5im -0.5+0.5im], # z,-x,-y+1/2 [-0.5-0.5im 0.5-0.5im; 0.5+0.5im 0.5-0.5im], # y,-z,-x+1/2 [-0.5+0.5im 0.5-0.5im; 0.5+0.5im 0.5+0.5im]] # -z+1/2,x,-y elseif irlab == "P₃" matrices = [[1.0+0.0im 0.0+0.0im; 0.0+0.0im 1.0+0.0im], # x,y,z [0.0+0.0im 1.0+0.0im; 1.0+0.0im 0.0+0.0im], # x,-y,-z+1/2 [0.0+0.0im 0.0-1.0im; 0.0+1.0im 0.0+0.0im], # -x+1/2,y,-z [1.0+0.0im 0.0+0.0im; 0.0+0.0im -1.0+0.0im], # -x,-y+1/2,z [-CQ -CcP; -CQ CcP], # z,x,y [-CcQ -CcQ; -CP CP], # y,z,x [-CcQ CcQ; -CP -CP], # -y+1/2,z,-x [-CQ -CcP; CQ -CcP], # -z,-x+1/2,y [-CcQ -CcQ; CP -CP], # -y,-z+1/2,x [-CQ CcP; -CQ -CcP], # z,-x,-y+1/2 [-CP CP; -CcQ -CcQ], # y,-z,-x+1/2 [-CcP -CQ; CcP -CQ]] # -z+1/2,x,-y else throw(DomainError((sgnum, irlab), "should not be called with these input; nothing to fix")) end translations = [zeros(Float64, 3) for _=Base.OneTo(length(matrices))] return matrices, translations else throw(DomainError((sgnum, irlab), "should not be called with these input; nothing to fix")) end end # TODO: We need to manually do things for the "special" k-points kᴮ from # the representation domain Φ that do not exist in the basic domain kᴬ∈Ω # i.e. for kᴮ∈Φ-Ω (labels like KA, ZA, etc.), which are not included in # ISOTROPY. We can do this by first finding a transformation R such that # kᴮ = Rkᴬ, and then transforming the LGIrrep of kᴬ appropriately (see # CDML Sec. 4.1 or B&C Sec. 5.5.). Parts of the steps are like this: # # kvmaps = ΦnotΩ_kvecs(sgnum, D) # from src/special_representation_domain_kpoints.jl # if kvmaps !== nothing # contains KVecs in the representation domain Φ that # # cannot be mapped to ones in the basic domain Ω # for kvmap in kvmaps # loop over each "new" KVec # # cdmlᴮ = kvmap.kᴮlab # CDML label of "new" KVec kᴮ∈Φ-Ω # cdmlᴬ = kvmap.kᴮlab # CDML label of "old" KVec kᴬ∈Ω # R = kvmap.op # Mapping from kᴬ to kᴮ: kᴮ = Rkᴬ # # pick kᴬ irreps in lgirsd # lgirsᴬ = lgirsd[cdmlᴬ] # end # # ... do stuff to lgirsᴬ to get lgirsᴮ via a transformation {R|v} # # derived from a holosymmetric parent group of sgnum and the transformation R # end # # The only kᴮ included in ISOTROPY is Z′≡ZA for sgs 195, 198, 200, 201, & 205: # all other kᴮ∈Φ-Ω points are omitted) # # Pa3 (Tₕ⁶), sg 205, cannot be treated by the transformation method and requires # manual treatment (B&C p. 415-417); fortunately, the Z′₁=ZA₁ irrep of 205 is # already included in ISOTROPY. #= function add_special_representation_domain_lgirs(lgirsd::Dict{String, <:AbstractVector{LGIrrep{D}}}) where D D ≠ 3 && Crystalline._throw_1d2d_not_yet_implemented(D) sgnum = num(first(first(lgirsd))) # does this space group contain any nontrivial k-vectors in Φ-Ω? # what is the method for adding in these missing k-vectors? end =# end # module
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
6575
using Crystalline, HTTP import ProgressMeter: @showprogress # crawling functionality const BANDREP_URL="https://www.cryst.ehu.es/cgi-bin/cryst/programs/bandrep.pl" """ crawlbandreps(sgnum::Integer, allpaths::Bool=false, timereversal::Bool=true) --> ::String (valid HTML table) Crawls a band representation from the Bilbao database. This is achieved by sending a "POST" request to the `<form> ... </form>` part of their HTML page. **Input**: - `sgnum` : Space group number - `allpaths` : Whether to include only maximal **k**-points (true) or all, i.e. general, **k**-points (true) - `timereversal` : Whether the band representation assumes time-reversal symmetry (`true`) or not (`false`)Type of bandrep, as string, either Note that we do not presently try to crawl Wyckoff-type inputs. **Output**: - `table_html` : Valid HTML <table> ... </table> for the requested band representation. """ function crawlbandreps(sgnum::Integer, allpaths::Bool=false, timereversal::Bool=true) # with (true ⇒ "Elementary TR") or without (false ⇒ "Elementary") time-reversal symmetry brtype = timereversal ? "Elementary TR" : "Elementary" brtypename = lowercasefirst(filter(!isspace, brtype)) allpaths_post = allpaths ? "yes" : "no" inputs = "super=$(sgnum)&"* # inputs to <form> ... </form>, in POST mode; "$(brtypename)=$(brtype)&"* # inputs are supplied as name=value pairs, with "nomaximal=$allpaths_post" # distinct inputs separated by '&' (see e.g., # (see e.g. https://stackoverflow.com/a/8430062/9911781) response = HTTP.post(BANDREP_URL, [], inputs) body = String(response.body) startstring = r"\<tr\>\<td(?:.*?)\>Wyckoff pos." startidx = findfirst(startstring, body)[1] stopidx = findlast("</td></tr></table>",body)[end] table_html="<table>"*body[startidx:stopidx] return table_html end # parsing functionality function html2dlm(body::String, oplus::Union{String,Char}='⊕') dlm='|' # list of replacements, mostly using regexes; see https://regexr.com for inspiration. replacepairlist= ( r"\<tr\>(.*?)\<\/tr\>" => SubstitutionString("\\1\n"), # rows; newline-separated (requires ugly hack around https://github.com/JuliaLang/julia/issues/27125 to escape \n) "<tr>"=>"\n", # <tr> tags are not always paired with </tr>; second pass here to remove stragglers r"\<td(?:.*?)\>(.*?)\<\/td\>" => SubstitutionString("\\1$(dlm)"), # columns; comma-separated r"\<sup\>(.*?)\<\/sup\>" => x->Crystalline.supscriptify(x[6:end-6]), # superscripts (convert to unicode) r"\<sub\>(.*?)\<\/sub\>" => x->Crystalline.subscriptify(x[6:end-6]), # subscripts (convert to unicode) r"\<i\>(.*?)\<\/i\>"=>s"\1", # italic annotations r"\<center\>(.*?)\<\/center\>"=>s"\1", # centering annotations "<br>"=>"", # linebreak tag in html; no </br> tag exists "<font size=\"5\">&uarr;</font>"=>"↑", # induction arrow r"<font style\=\"text-decoration:overline;\"\>([1-6])\<\/font\>"=>s"-\1", # wyckoff site symmetry groups w/ (roto)inversion (must come before spinful irrep conversion) r"\<font style\=\"text-decoration:overline;\"\>(.*?)\<\/font\>"=>s"\1ˢ", # spinful irrep "&oplus;"=>oplus, # special symbols # ⊕ "&Gamma;"=>'Γ', # Γ "&Sigma;"=>'Σ', # Σ "&Lambda;"=>'Λ', # Λ "&Delta;"=>'Δ', # Δ "GP"=>'Ω', # GP to Ω "&nbsp;"=>"", # non-breaking space '*'=>"", # * (for Σ k-points in e.g. sg 146: sending `u,-2*u,0`⇒`u,-2u,0`) "'"=>"′", # ′ (some Mulliken irrep labels) r"\<form.*?\"Decomposable\"\>\<\/form\>"=>"Decomposable", # decomposable bandreps contain a link to decompositions; ignore it "$(dlm)Decomposable"=>"$(dlm)true", # simplify statement of composability "$(dlm)Indecomposable"=>"$(dlm)false", "\\Indecomposable"=>"", "<table>"=>"","</table>"=>"", # get rid of table tags "$(dlm)\n"=>"\n", # if the last bits of a line is ", ", get rid of it r"\n\s*\Z"=>"", # if the last char in the string is a newline (possibly with spurious spaces), get rid of it r"\n\s+"=>"\n", # remove spurious white/space at start of any lines #r"((_.){2,})"=>(x)->"_{"*replace(x,"_"=>"")*"}", # tidy up multi-index subscripts #r"((\^.){2,})"=>(x)->"^{"*replace(x,"^"=>"")*"}" # tidy up multi-index superscripts ) for replacepair in replacepairlist body = replace(body, replacepair) end return body end #= # utilities for conversion between different textual/array/struct representations html2array(body) = Crystalline.dlm2array(html2dlm(body)) function html2struct(body::String, sgnum::Integer, allpaths::Bool=false, spinful::Bool=false, timereversal::Bool=true) Crystalline.array2struct(html2array(body), sgnum, allpaths, spinful, timereversal) end =# # crawl & write bandreps to disk function writebandreps(sgnum, allpaths, timereversal=true) paths_str = allpaths ? "allpaths" : "maxpaths" brtype_str = timereversal ? "ElementaryTR" : "Elementary" BR_dlm = html2dlm(crawlbandreps(sgnum, allpaths, timereversal), '⊕') filename = (@__DIR__)*"/../data/bandreps/3d/$(brtype_str)/$(paths_str)/$(string(sgnum)).csv" open(filename; write=true, create=true, truncate=true) do io write(io, BR_dlm) end return nothing end # run to crawl everything... (takes ∼5 min) for allpaths in (true, false) for timereversal in (true, false) @info "allpaths=$allpaths, timereversal=$timereversal" @showprogress 0.1 "Crawling ..." for sgnum in 1:MAX_SGNUM[3] writebandreps(sgnum, allpaths, timereversal) end # @sync for sgnum in 1:MAX_SGNUM[3] # spuriously fails on HTTP requests; not worth it # @async writebandreps(sgnum, allpaths, timereversal) # end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2115
using Crystalline, HTTP, Gumbo # Small convenience script to crawl and subsequently write all the xyzt forms of the # generators of the 3D space-groups. # ---------------------------------------------------------------------------------------- # ## Functions for crawling the generators of 3D space groups from Bilbao """ crawl_generators_xyzt(sgnum::Integer, D::Integer=3) Obtains the generators in xyzt format for a given space group number `sgnum` by crawling the Bilbao server. Only works for `D = 3`. """ function crawl_generators_xyzt(sgnum::Integer, D::Integer=3) htmlraw = crawl_generators_html(sgnum, D) # grab relevant rows of table table_html = children(children(children(children(last(children(htmlraw.root)))[6])[1])[1])[3:end] # grab relevant columns of table & extract xyzt-forms of generators gens_str = strip.(text.(only.(children.(getindex.(table_html, 2))))) return gens_str end function crawl_generators_html(sgnum::Integer, D::Integer=3) D != 3 && error("only 3D space group operations are crawlable") (sgnum < 1 || sgnum > 230) && error(DomainError(sgnum)) baseurl = "http://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-getgen?what=&gnum=" contents = HTTP.request("GET", baseurl * string(sgnum)) return parsehtml(String(contents.body)) end # ---------------------------------------------------------------------------------------- # ## Use crawling functions & write information to `/data/generators/sgs/3d/` for sgnum in 1:230 println(sgnum) gens_str = crawl_generators_xyzt(sgnum) filename = (@__DIR__)*"/../data/generators/sgs/3d/"*string(sgnum)*".csv" open(filename; write=true, create=true, truncate=true) do io first = true for str in gens_str # skip identity operation unless it's the only element; otherwise redundant if str != "x,y,z" || length(gens_str) == 1 if first first = false else write(io, '\n') end write(io, str) end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
4261
using Crystalline, HTTP, Gumbo # Small convenience script to crawl and subsequently write all the xyzt forms of the # generators of the 3D space-groups. # ---------------------------------------------------------------------------------------- # ## Functions for crawling the generators of 3D space groups from Bilbao """ crawl_generators_xyzt(pgnum::Integer, D::Integer=3) Obtains the generators in xyzt format for a given point group number `pgnum` by crawling the Bilbao server. Only works for `D = 3`. """ function crawl_pg_generators_xyzt(pgnum::Integer, D::Integer=3, include_pgiuc::Union{Nothing, String}=nothing) htmlraw = crawl_pg_generators_html(pgnum, D, include_pgiuc) # grab relevant rows of table table_html = children(children(children(children(last(children(htmlraw.root)))[7])[1])[1])[3:end] # grab relevant columns of table & extract xyzt-forms of generators gens_str = strip.(text.(only.(children.(getindex.(table_html, 2))))) return gens_str end function crawl_pg_generators_html(pgnum::Integer, D::Integer=3, include_pgiuc::Union{Nothing, String}=nothing) baseurl = begin if D == 3 "https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-point_genpos?w2do=gens&num=" elseif D == 2 "https://www.cryst.ehu.es/cgi-bin/plane/programs/nph-point_plane-genpos?w2do=gens&num=" include_pgiuc === nothing || error(DomainError(setting, "setting requests cannot be made separately in 2D")) else error(DomainError(D, "only 2D and 3D point group generators are crawlable")) end end url = baseurl * string(pgnum) if include_pgiuc !== nothing url *= "&what=" * include_pgiuc end contents = HTTP.request("GET", url) return parsehtml(String(contents.body)) end # ---------------------------------------------------------------------------------------- # ## Use crawling functions & write information to `/data/generators/pgs/` let D = 3 for (pgnum, pgiucs) in enumerate(Crystalline.PG_NUM2IUC[D]) for (setting, pgiuc) in enumerate(pgiucs) if pgiuc ∈ ("-62m", "-6m2") # need to flip the meaning of `setting` here to match sorting on Bilbao setting = setting == 1 ? 2 : (setting == 2 ? 1 : error()) end if setting == 1 gens_str = crawl_pg_generators_xyzt(pgnum, D) else gens_str = crawl_pg_generators_xyzt(pgnum, D, pgiuc) end unmangled_pgiuc = Crystalline._unmangle_pgiuclab(pgiuc) filename = (@__DIR__)*"/../data/generators/pgs/$(D)d/$(unmangled_pgiuc).csv" open(filename; write=true, create=true, truncate=true) do io first = true for str in gens_str # skip identity operation unless it's the only element; otherwise redundant if str != "x,y,z" || length(gens_str) == 1 if first first = false else write(io, '\n') end write(io, str) end end end end end end # Dimension 2 is following a different scheme than dimension 3 on Bilbao, so just correct # for that manually let D = 2 for (pgnum, pgiuc) in enumerate(Crystalline.PG_IUCs[D]) gens_str = crawl_pg_generators_xyzt(pgnum, D) unmangled_pgiuc = Crystalline._unmangle_pgiuclab(pgiuc) filename = (@__DIR__)*"/../data/generators/pgs/$(D)d/$(unmangled_pgiuc).csv" open(filename; write=true, create=true, truncate=true) do io first = true for str in gens_str # skip identity operation unless it's the only element; otherwise redundant if str != "x,y,z" || length(gens_str) == 1 if first first = false else write(io, '\n') end write(io, str) end end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
10070
using Crystalline, HTTP, Gumbo, JLD2, ProgressMeter, StaticArrays const BILBAO_PG_URL_BASE = "https://www.cryst.ehu.es/cgi-bin/cryst/programs/representations_out.pl?tipogrupo=spg&pointspace=point&" function bilbao_pgs_specifier(parent_sgnum::Integer, pgnum::Integer, pgiuc::String) # in principle, it is sufficient to only supply the appropraite parent space group # `parent_sgnum`. Note that it is _not_ sufficient to only supply `pgnum` due to # different setting variation possibilities. The inclusion of `pgiuc` appear mostly # immaterial return "num=$(parent_sgnum)&super=$(pgnum)&symbol=$(pgiuc)" # the url to a given point group is BILBAO_PG_URL_BASE*bilbao_pgs_specifier(..) end function findfirst_matching_parent_sgnum(pgiuc::String) # The 1D and 2D cases could be inferred from the 3D case, and Bilbao only lists the 3D # case, so this is restricted to the 3D case (note though, that the settings are not # shared between 1D/2D and 3D, unfortunately (e.g. "m")) for sgnum in 1:MAX_SGNUM[3] sg = spacegroup(sgnum, Val(3)) pg = Crystalline.find_parent_pointgroup(sg) label(pg) == pgiuc && return sgnum, num(pg) # return parent_sgnum, pgnum end throw(DomainError(pgiuc, "requested label cannot be found")) end function bilbao_pgs_url(pgiuc::String) parent_sgnum, pgnum = findfirst_matching_parent_sgnum(pgiuc) url = BILBAO_PG_URL_BASE*bilbao_pgs_specifier(parent_sgnum, pgnum, pgiuc) return url end if !isdefined(@__MODULE__,:PG_HTML_REPLACEMENTS) const PG_HTML_REPLACEMENTS = ( r"<font style=\\\"text-decoration: overline;\\\">(.*?)</font>"=>s"-\1", # ↑ overbar ⇒ minus sign r"<sub>(.*)</sub>"=>x->Crystalline.subscriptify(x[6:end-6]), # subscripts r"<sup>(.*)</sup>"=>x->Crystalline.supscriptify(x[6:end-6]), # superscripts ) end function _parse_pgs_elements(s::AbstractString) if first(s) === 'e' # the form of ϕ_str will always be "(-)iNπ/M" with integers N and M: to just get the # paesing job done, I resort to the following hardcoded approach: ϕ_str_nom, ϕ_str_den = getfield(match(r"e<sup>(.*?)/(.*)</sup>", s), :captures) ϕ_str_nom′ = replace(replace(ϕ_str_nom, 'i'=>""), 'π'=>"") # strip i and π ϕ_nom′ = if ϕ_str_nom′ == "-" # special handling for N = 1 -1.0 elseif ϕ_str_nom′ == "" 1.0 else parse(Float64, ϕ_str_nom′) end ϕ = π*ϕ_nom′/parse(Float64, ϕ_str_den) return cis(ϕ) else # first, handle corner case for parse(ComplexF64, s): cannot parse "±i", but "±1i" # is OK (substitution below hacks around fact that s"\11i" refers to capture 11, # rather than capture 1 + string 1i) if occursin('i', s) s = replace(s, r"(\+|\-)i"=>m->m[1]*"1i") if s == "i"; s = "1i"; end # not covered by regex above end return parse(ComplexF64, s) end end """ crawl_pgirs(pgiuc::String, D::Integer=3, consistency_checks::Bool=true) Crawl the point group symmetry operations as well as the associated point group irreps for the point group characterized by the IUC label `pgiuc` and dimension `D` from Bilbao's website. Only works for `D = 3`, since Bilbao doesn't tabulate 1D/2D point group irreps explicitly. Returns a `Vector{PGIrrep{D}}`. """ function crawl_pgirs(pgiuc::String, D::Integer=3; consistency_checks::Bool=true) D ≠ 3 && throw(DomainError(D, "dimensions D≠3 not crawlable")) # --- crawl html data from Bilbao --- contents = HTTP.request("GET", bilbao_pgs_url(pgiuc)) body = parsehtml(String(contents.body)) # pick out the table that contains the irreps, including header table_html = children(last(children(body.root)))[end-7] # -7 part is hardcoded # strip out the header row and split at rows (i.e. across pgops) # header is [N | pgop matrix | pgop seitz | irrep 1 | irrep 2 | ...]) header_html = table_html[1][1] rows_html = children(table_html[1])[2:end] # split each row into columns rowcols_html = children.(rows_html) Nirs = length(first(rowcols_html))-3 # --- extract point group operators --- # extract pgops' matrix form from 2nd column pgops_html = getindex.(rowcols_html, 2) pgops_str = replace.(replace.(string.(pgops_html), Ref(r".*?<td align=\"right\">(.*?)</td>"=>s"\1")), # extra matrix elements & remove "front" Ref(r"</tr>.*"=>"")) # remove "tail" pgops_strs = split.(pgops_str, " ", keepempty=false) # matrix elements, row by row pgops_matrices = [collect(reshape(parse.(Int, strs), (3,3))') for strs in pgops_strs] pgops = SymOperation.(SMatrix{3,3,Float64}.(pgops_matrices)) # build point group PointGroup{3} from extracted pgops pgnum = Crystalline.pointgroup_iuc2num(pgiuc, 3) pg = PointGroup{3}(pgnum, pgiuc, pgops) # note that sorting matches pointgroup(...) if consistency_checks # test that pgops match results from pointgroup(pgiuc, 3), incl. matching sorting pg′ = pointgroup(pgiuc, Val(3)) @assert operations(pg) == operations(pg′) #= # ~~~ dead code ~~~ # extract pgops' seitz notation from 3rd columns seitz_html = children.(first.(children.(getindex.(rowcols_html, 3)))) seitz_str = [join(string.(el)) for el in seitz_html] for replacepair in PG_HTML_REPLACEMENTS seitz_str .= replace.(seitz_str, Ref(replacepair)) end # | test whether we extract pgops and seitz notation mutually consistently; this # | isn't really possible to test for neatly in general, unfortunately, due to an # | indeterminacy of conventions in cases like 2₁₋₁₀ vs 2₋₁₁₀; at the moment. # | We keep the code in case it needs to be used for debugging at some point. @assert all(replace.(seitz.(pgops), Ref(r"{(.*)\|0}"=>s"\1")) .== seitz_str) =# end # --- extract irreps --- irreps_html = [string.(getindex.(rowcols_html, i)) for i in 4:3+Nirs] # indexed first over distinct irreps, then over operators irreps_mats = Vector{Vector{Matrix{ComplexF64}}}(undef, Nirs) for (i,irs_html) in enumerate(irreps_html) # strip non-essential "pre/post" html; retain matrix/scalar as nested row/columns matrix_tabular = first.(getfield.(match.(r".*?<table><tbody>(.*?)</tbody></table>.*", irs_html), :captures)) matrix_els_regexs = eachmatch.(r"<td align=\\\"(?:left|right|center)\\\">\s*(.*?)</td>", matrix_tabular) matrix_els_strs = [first.(getfield.(els, :captures)) for els in matrix_els_regexs] # matrix_elements′ is an array of "flattened" matrices with string elements; some of # these elements can be of the form e<sup>(.*?)</sup> for an exponential, the rest # are integers. Now we parse these strings, taking care to allow exponential forms matrix_els = [_parse_pgs_elements.(els) for els in matrix_els_strs] # ::Vector{C64} Dⁱʳ = isqrt(length(first(matrix_els))) # a vector of matrices, one for each operation in pgops, for the ith irrep irreps_mats[i] = [collect(transpose(reshape(els, Dⁱʳ, Dⁱʳ))) for els in matrix_els] end # --- extract irrep labels and irrep reality --- # ↓ ::Vector{Vector{HTMLNode}} labs_and_realities_html = children.(getindex.(children(header_html)[4:end],1)) irrreps_labs_html = join.(getindex.(labs_and_realities_html, # ::Vector{String} Base.OneTo.(lastindex.(labs_and_realities_html) .- 1))) irreps_labs = replace.(replace.(irrreps_labs_html, Ref(PG_HTML_REPLACEMENTS[2])), Ref(PG_HTML_REPLACEMENTS[3])) irreps_labs .= replace.(irreps_labs, Ref("GM"=>"Γ")) irreps_realities = parse.(Int8, strip.(string.(getindex.(labs_and_realities_html, lastindex.(labs_and_realities_html))), Ref(['(', ')']))) # --- return a vector of extracted point group irreps ::Vector{PGIrrep{3}} --- return PGIrrep{3}.(irreps_labs, Ref(pg), irreps_mats, Reality.(irreps_realities)) end function __crawl_and_write_3d_pgirreps() savepath = (@__DIR__)*"/../data/irreps/pgs/3d/" # we only save the point group irreps. filename_irreps = savepath*"/irreps_data" JLD2.jldopen(filename_irreps*".jld2", "w") do irreps_file @showprogress for pgiuc in PG_IUCs[3] # ==== crawl and prepare irreps data ==== pgirs = crawl_pgirs(pgiuc, 3; consistency_checks=true) matrices = [pgir.matrices for pgir in pgirs] realities = [reality(pgir) for pgir in pgirs] cdmls = [label(pgir) for pgir in pgirs] # ==== save irreps ==== # we do not save the point group operations anew; they are already stored in # "test/data/xyzt-operations/pgs/..."; note that we explicitly checked the # sorting and # equivalence of operations when pgirs was crawled above (cf. flag # `consistency_checks=true`) unmangled_pgiuc = Crystalline._unmangle_pgiuclab(pgiuc) # replace '/'s by '_slash_'s irreps_file[unmangled_pgiuc*"/matrices"] = matrices irreps_file[unmangled_pgiuc*"/realities"] = Integer.(realities) irreps_file[unmangled_pgiuc*"/cdmls"] = cdmls end end return filename_irreps end # ====================================================== #= pgirs = Vector{Vector{PGIrrep{3}}}(undef, length(PG_IUCs[3])) for (idx, pgiuc) in enumerate(PG_IUCs[3]) println(pgiuc) pgirs[idx] = crawl_pgirs(pgiuc) end =# # Save to local format __crawl_and_write_3d_pgirreps()
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3564
using HTTP, Gumbo # Small convenience script to crawl and subsequently write all the xyzt forms of the # general positions/generators of subperiodic groups. # ---------------------------------------------------------------------------------------- # ## Functions for crawling the generators of 3D space groups from Bilbao """ crawl_subperiodic_xyzt(num::Integer, D::Integer=3) Obtains the general positions or generators in xyzt format for a given subperiodic group number `num` by crawling the Bilbao server. """ function crawl_subperiodic_xyzt(num::Integer, D::Integer=3, P::Integer=2, kind::String="operations") htmlraw = crawl_subperiodic_html(num, D, P, kind) # layout of html page depends on whether kind is `"operations"` or `"generators"`, so we # pick a different html element in the structure depending on this idx = kind == "generators" ? 5 : kind == "operations" ? 4 : error(DomainError(kind)) # grab relevant rows of table table_html = children(children(children(children(last(children(htmlraw.root)))[idx])[1])[1])[3:end] # grab relevant columns of table & extract xyzt-forms of generators gens_str = strip.(text.(only.(children.(getindex.(table_html, 2))))) return gens_str end function subperiodic_url(num::Integer, D::Integer, P::Integer, kind::String) sub = if D==3 && P==2 (num < 1 || num > 80) && error(DomainError(num)) "layer" elseif D==3 && P==1 (num < 1 || num > 75) && error(DomainError(num)) "rod" elseif D==2 && P==1 (num < 1 || num > 7) && error(DomainError(num)) "frieze" else error("cannot crawl subperiodic groups of dimensionality $D and periodicity $P") end return "https://cryst.ehu.es/cgi-bin/subperiodic/programs/nph-sub_gen?" * "what=$(kind == "generators" ? "gen" : kind == "operations" ? "gp" : error())" * "&gnum=$(num)&subtype=$(sub)&" end function crawl_subperiodic_html(num::Integer, D::Integer, P::Integer, kind::String) contents = HTTP.request("GET", subperiodic_url(num, D, P, kind)) return parsehtml(String(contents.body)) end # ---------------------------------------------------------------------------------------- # ## Use crawling functions & write information to: # `/test/data/xyzt-operations/generators/subperiodic/{layer|rod|frieze}/` # `/test/data/xyzt-operations/subperiodic/{layer|rod|frieze}/` for (D, P, sub, maxnum) in [(3,2,"layer",80), (3,1,"rod",75), (2,1,"frieze",7)] println(sub) for kind in ["operations", "generators"] println(" ", kind) for num in 1:maxnum println(" ", num) gens_str = crawl_subperiodic_xyzt(num, D, P, kind) filename = (@__DIR__)*"/../test/data/xyzt-$kind/subperiodic/$sub/"*string(num)*".csv" open(filename; write=true, create=true, truncate=true) do io first = true for str in gens_str # skip identity operation unless it's the only element; otherwise redundant if kind == "operations" || (((D == 3 && str != "x,y,z") || (D == 2 && str != "x,y")) || length(gens_str) == 1) if first first = false else write(io, '\n') end write(io, str) end end end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2175
using Crystalline, HTTP, Gumbo # Small convenience script to crawl and subsequently write all the xyzt forms of the # symmetry operations of the 230 three-dimensional space groups. Enables us to just read the # symmetry data from the hard-disk rather than constantly querying the Bilbao server # ---------------------------------------------------------------------------------------- # ## Functions for crawling the operations of 3D space groups from Bilbao """ crawl_sgops_xyzt(sgnum::Integer, D::Integer=3) Obtains the symmetry operations in xyzt format for a given space group number `sgnum` by crawling the Bilbao server; see `spacegroup` for additional details. Only works for `D = 3`. """ function crawl_sgops_xyzt(sgnum::Integer, D::Integer=3) htmlraw = crawl_sgops_html(sgnum, D) ops_html = children.(children(last(children(htmlraw.root)))[4:2:end]) Nops = length(ops_html) sgops_str = Vector{String}(undef,Nops) for (i,op_html) in enumerate(ops_html) sgops_str[i] = _stripnum(op_html[1].text) # strip away the space group number end return sgops_str end function crawl_sgops_html(sgnum::Integer, D::Integer=3) D != 3 && error("only 3D space group operations are crawlable") (sgnum < 1 || sgnum > 230) && error(DomainError(sgnum)) baseurl = "http://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-getgen?what=text&gnum=" contents = HTTP.request("GET", baseurl * string(sgnum)) return parsehtml(String(contents.body)) end function _stripnum(s) if occursin(' ', s) # if the operation "number" is included as part of s _,s′ = split(s, isspace; limit=2) end return String(s′) # ensure we return a String, rather than possibly a SubString end # ---------------------------------------------------------------------------------------- # ## Use crawling functions & write information to `/data/operations/sgs/3d/` for sgnum in 1:230 sgops_str = crawl_sgops_xyzt(sgnum) filename = (@__DIR__)*"/../data/operations/sgs/3d/"*string(sgnum)*".csv" open(filename; write=true, create=true, truncate=true) do io foreach(str -> write(io, str, '\n'), sgops_str) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2263
using Crystalline, HTTP, Gumbo using StaticArrays, LinearAlgebra # ---------------------------------------------------------------------------------------- # # CRAWL 3D WYCKOFF POSITIONS FROM BILBAO (2D and 1D obtained manually...) const BILBAO_URL = "https://www.cryst.ehu.es/cgi-bin/cryst/programs/" const WYCK_URL_BASE_3D = BILBAO_URL*"nph-normsets?from=wycksets&gnum=" wyck_3d_url(sgnum) = WYCK_URL_BASE_3D*string(sgnum) """ crawl_wyckpos_3d(sgnum::Integer) Obtains the 3D Wyckoff positions for a given space group number `sgnum` by crawling the Bilbao Crystallographic Server; returns a vector of `WyckoffPosition{3}`. """ function crawl_wyckpos_3d(sgnum::Integer) htmlraw = crawl_wyckpos_3d_html(sgnum) wps_html = children.(children(children(children(last(children(htmlraw.root)))[3])[5][1])) N_wps = length(wps_html)-1 wps = Vector{WyckoffPosition{3}}(undef, N_wps) for (i,el) in enumerate(@view wps_html[2:end]) letter, mult_str, sitesym_str, rv_str, _ = getfield.(first.(getfield.(el, Ref(:children))), Ref(:text)) rv = RVec{3}(rv_str) mult = parse(Int, mult_str) wps[i] = WyckoffPosition{3}(mult, only(letter), rv) end return wps end function crawl_wyckpos_3d_html(sgnum::Integer) (sgnum < 1 || sgnum > 230) && error(DomainError(sgnum)) contents = HTTP.request("GET", wyck_3d_url(sgnum)) return parsehtml(String(contents.body)) end # ---------------------------------------------------------------------------------------- # # CRAWL & SAVE/WRITE 3D WYCKOFF POSITIONS TO `data/wyckpos/3d/...` function _write_wyckpos_3d(sgnum::Integer) wps = crawl_wyckpos_3d(sgnum) open((@__DIR__)*"/../data/wyckpos/3d/"*string(sgnum)*".csv", "w+") do io for (idx, wp) in enumerate(wps) qstr = strip(string(parent(wp)), ('[',']')) for repl in ('α'=>'x', 'β'=>'y', 'γ'=>'z', " "=>"") qstr = replace(qstr, repl) end print(io, wp.mult, '|', wp.letter, '|', qstr) idx ≠ length(wps) && println(io) end end end # actually crawl and write 3D Wyckoff positions foreach(1:MAX_SGNUM[3]) do sgnum println(sgnum) _write_wyckpos_3d(sgnum) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
9650
using Crystalline, HTTP, Gumbo, LinearAlgebra # getting the maximal subgroups of t type # getting the matching transformation matrix # https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-tranmax?way=up&super=2&sub=1&index=2&client=maxsub&what=&path=&series=&conj=all&type=t # simpler: # https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-tranmax?way=up&super=2&sub=1&type=t """ crawl_maximal_subgroups(numᴳ::Integer; subgroup_kind=:tk)) Obtains the maximal subgroups for a given space group G, with number `numᴳ`, by crawling the Bilbao server, i.e. find the space groups {Hⱼ} such that Hⱼ < G with _no_ Hⱼ < Hₖ. Only works for 3D space groups. The keyword argument `subgroup_kind` specifies whether to return the translationengleiche ("t"), klassengleiche ("k"), or either ("tk") subgroup kind. """ function crawl_maximal_subgroups(numᴳ::Integer, D::Integer=3; subgroup_kind::Symbol=:tk, verbose::Bool=true) if subgroup_kind ∉ (:t, :k, :tk) throw(DomainError(subgroup_kind, "the subgroup type must be :t, :k, or :tk")) end htmlraw = http_request_maximal_subgroups(numᴳ, D) # grab relevant rows of table body_html = last(children(htmlraw.root)) table_html = if D == 3 children(body_html[6][1][1])[2:end] elseif D == 2 children(children(body_html[4][3][1])[1])[2:end] end # grab relevant columns of table & extract xyzt-forms of generators numsᴴ = parse.(Int, _grab_column(table_html, 2)) :: Vector{Int} indices = parse.(Int, _grab_column(table_html, 4)) :: Vector{Int} kinds = Symbol.(_grab_column(table_html, 5)) :: Vector{Symbol} if subgroup_kind != :tk subgroup_kind_indices = findall(==(subgroup_kind), kinds) keepat!(numsᴴ, subgroup_kind_indices) keepat!(indices, subgroup_kind_indices) keepat!(kinds, subgroup_kind_indices) end Ppss = find_transformation_matrices.(numsᴴ, numᴳ, D, kinds, indices) # vector of {P|p} transformations verbose && println(stdout, "crawled ", D == 3 ? "space" : "plane", " group ", numᴳ, " (", length(numsᴴ), " subgroups)") return [(;num, index, kind, Pps) for (num, index, kind, Pps) in zip(numsᴴ, indices, kinds, Ppss)] end function _grab_column(table_html::Vector{HTMLNode}, i::Integer) strip.(Gumbo.text.(only.(children.(getindex.(table_html, i))))) :: Vector{SubString{String}} end function http_request_maximal_subgroups(numᴳ::Integer, D::Integer=3) (numᴳ < 1 || numᴳ > 230) && error(DomainError(numᴳ)) bilbaourl = "https://www.cryst.ehu.es/cgi-bin/" program_spec = if D == 3 "cryst/programs/nph-lxi?client=maxsub&way=up&type=t&gnum=" elseif D == 2 "plane/programs/nph-plane_maxsub?gnum=" else throw(DomainError(D)) end contents = HTTP.request("GET", bilbaourl * program_spec * string(numᴳ)) return parsehtml(String(contents.body)) end # ---------------------------------------------------------------------------------------- # function find_transformation_matrices(numᴴ::Integer, numᴳ::Integer, D::Integer, kind::Symbol, index::Integer) htmlraw = http_request_subgroup_transformation(numᴴ, numᴳ, D, kind, index) # grab relevant rows of table(s) body_html = children(last(children(htmlraw.root))) multiple_conjugacy_classes = (Gumbo.text(body_html[5]) == " The subgroups of the same type can be divided in\n ") if !multiple_conjugacy_classes # all transformations in the single (only) conjugacy class tables_html = [children(body_html[5][5][2])[2:end]] # Note that a single conjugacy class may still have multiple distinct transformations # (e.g., mapping H onto different conjugate parts of G); we are generally only interested # in the first mapping, so we just grab the first row (the first transformation; # usually the simplest). else # transformations to multiple distinct conjugacy classes: include a representative # of each conjugacy class. Different conjugacy class transformations map to # different conjugacy classes of the supergroup; so we should include both when # we think about implications for topology (because the symmetry eigenvalues in # distinct conjugacy classes can differ) table_idx = 5 tables_html = Vector{HTMLNode}[] while (table_idx ≤ length(children(body_html[9])) && (subbody_html = body_html[9][table_idx]; begins_with_conjugacy_str = startswith(Gumbo.text(subbody_html[1]), "Conjugacy class"); begins_with_conjugacy_str || table_idx == 5) ) subbody_idx = 1+begins_with_conjugacy_str push!(tables_html, children(subbody_html[subbody_idx])[2:end]) # transformation table_idx += 2 end end # The transformations {P|p} consist of a rotation part P and a translation part p; # notably, the rotation part P may also contain a scaling part (i.e. detP is not # necessarily 1) Pps = Vector{Tuple{Matrix{Rational{Int}}, Vector{Rational{Int}}}}(undef, length(tables_html)) for (i,table_html) in enumerate(tables_html) row_html = table_html[1] Pp_str = replace(replace(Gumbo.text(row_html[2]), r"\n *"=>'\n'), r" +"=>',') Pp_str_rows = split.(split(Pp_str, '\n'), ',') P = [parse_maybe_fraction(Pp_str_rows[row][col]) for row in 1:D, col in 1:D] p = [parse_maybe_fraction(Pp_str_rows[row][D+1]) for row in 1:D] Pps[i] = (P, p) end # the transformation is intended as acting _inversely_ on the elements of H # (equivalently, directly on the elements of g∈G that have isomorphic elements in H); # that is, for every h∈H, there exists a mapped h′∈H′ with H′<G in the exact sense, with # h′ = {P|p} h {P|p}⁻¹ = `transform(h, inv(P), -inv(W)*p)` # since det P is not necessarily 1, the transformation can collapse multiple elements # onto eachother, such that some h′ become equivalent in the new lattice basis; this is # e.g. the case in subgroup 167 of space group 230; to fix this, the result could be # passed to `reduce_ops`. Hence, the relation we get it: # H′ = [transform(h, inv(P), -inv(P)*p) for h in H] # H′_reduced = reduce_ops(H′, centering(G)) # G_reduced = reduce_ops(G, centering(G)) # issubgroup(H′_reduced, G_reduced) == true return Pps end function parse_maybe_fraction(s) slash_idxs = findfirst("/", s) if isnothing(slash_idxs) return Rational{Int}(parse(Int, s)::Int) else slash_idx = slash_idxs[1] # only takes up one codepoint parse(Int, s[1:slash_idx-1])::Int // parse(Int, s[slash_idx+1:end])::Int end end function http_request_subgroup_transformation(numᴴ::Integer, numᴳ::Integer, # H < G D::Integer, kind::Symbol, index::Integer) (numᴳ < 1 || numᴳ > 230) && error(DomainError(numᴳ)) (numᴴ < 1 || numᴴ > 230) && error(DomainError(numᴴ)) baseurl = "https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-tranmax?way=up&" url = baseurl * "type=$(kind)&super=$(numᴳ)&sub=$(numᴴ)&index=$(index)" if D == 2 url *= "&client=planesubmax&subtype=plane" end contents = HTTP.request("GET", url) return parsehtml(String(contents.body)) end # ---------------------------------------------------------------------------------------- # # Crawl and save all the data (~10-15 min) @time begin subgroup_data = ([# === 1D === (done manually) # line group 1 [(num = 1, index = 2, kind = :k, Pps = [([2//1;;], [0//1])]), (num = 1, index = 3, kind = :k, Pps = [([3//1;;], [0//1])]) ], # line group 2 [(num = 1, index = 2, kind = :t, Pps = [([1//1;;], [0//1])]), (num = 2, index = 2, kind = :k, Pps = [([2//1;;], [0//1]), ([2//1;;], [1//2])]), (num = 2, index = 3, kind = :k, Pps = [([3//1;;], [0//1])]) ] ], # === 2D === crawl_maximal_subgroups.(1:17, 2), # === 3D === crawl_maximal_subgroups.(1:230, 3)) end using JLD2 jldsave("data/spacegroup_subgroups_data.jld2"; subgroups_data=subgroups_data) # ---------------------------------------------------------------------------------------- # # Test that H and G are indeed subgroups under the provided transformations using Test @testset for D in 1:3 println("=== D = ", D, " ===") subgroups_data_D = subgroups_data[D] for numᴳ in 1:MAX_SGNUM[D] println(" G = ", numᴳ) G = spacegroup(numᴳ, D) G_reduced = reduce_ops(G, centering(G)) subgroup_data = subgroups_data_D[numᴳ] numsᴴ = getindex.(subgroup_data, Ref(:num)) Ppss = getindex.(subgroup_data, Ref(:Pps)) kinds = getindex.(subgroup_data, Ref(:kind)) for (numᴴ, kind, Pps) in zip(numsᴴ, kinds, Ppss) kind == :k && continue # skip klassengleiche println(" H = ", numᴴ) H = spacegroup(numᴴ, D) for (c, (P, p)) in enumerate(Pps) length(Pps) > 1 && println(" Conjugacy class ", Char(Int('a')-1+c)) H′ = transform.(H, Ref(inv(P)), Ref(-inv(P)*p)) H′_reduced = reduce_ops(H′, centering(G)) @test issubgroup(G_reduced, H′_reduced) end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3087
using Crystalline using StaticArrays # --- definitions --- # to be transferred to Crystalline's definitions # --- parsing --- #cd(@__DIR__) io = open((@__DIR__)*"/../data/operations/msgs/iso-magnetic_table_bns.txt") # --- read dictionary of operations --- function read_ops!(io, ops_d, stop_string) while (str=readline(io); str ≠ stop_string) parts = split(str, isspace; keepempty=false) code, xyz = parts[1], parts[2] op = SymOperation(xyz) ops_d[code] = op end return ops_d end readuntil(io, "Non-hexagonal groups:"); readline(io) nonhex_ops_d = Dict{String, SymOperation{3}}() read_ops!(io, nonhex_ops_d, "Hexagonal groups:") hex_ops_d = Dict{String, SymOperation{3}}() read_ops!(io, hex_ops_d, "----------") # --- read individual groups --- function parse_opstr(str::AbstractString, ops_d) str′ = strip(str, ['(', ')','\'']) code, translation_str = split(str′, '|')::Vector{SubString{String}} translation_parts = split(translation_str, ',') translation_tup = ntuple(Val(3)) do i Crystalline.parsefraction(translation_parts[i]) end translation = SVector{3, Float64}(translation_tup) op = SymOperation{3}(ops_d[code].rotation, translation) tr = last(str) == '\'' return MSymOperation(op, tr) end function read_group!(io) # BNS: number & label readuntil(io, "BNS: ") num_str = readuntil(io, " ") # numbering in format `sgnum.cnum` sgnum, cnum = parse.(Int, split(num_str, "."))::Vector{Int} # `sgnum`: F space-group associated number, `cnum`: crystal-system sequential number bns_label = replace(readuntil(io, " "), '\''=>'′') # BNS label in IUC-style # OG: number and label readuntil(io, "OG: ") N₁N₂N₃_str = readuntil(io, " ") # numbering in format `N₁.N₂.N₃` N₁, N₂, N₃ = parse.(Int, split(N₁N₂N₃_str, "."))::Vector{Int} og_label = replace(readuntil(io, '\n'), '\''=>'′') # OG label in IUC-style # operator strings is_hex = crystalsystem(sgnum) ∈ ("hexagonal" , "trigonal") readuntil(io, "Operators") c = read(io, Char) if c == ' ' readuntil(io, "(BNS):") elseif c ≠ ':' error("unexpected parsing failure") end ops_str = readuntil(io, "Wyckoff") op_strs = split(ops_str, isspace; keepempty=false) # parse operator strings to operations g = Vector{MSymOperation{3}}(undef, length(op_strs)) for (i, str) in enumerate(op_strs) g[i] = parse_opstr(str, is_hex ? hex_ops_d : nonhex_ops_d) isdone = str[end] == '\n' isdone && break end return MSpaceGroup{3}((sgnum, cnum), g), bns_label, og_label, (N₁, N₂, N₃) end msgs = MSpaceGroup{3}[] MSG_BNS_LABELs_D = Dict{Tuple{Int, Int}, String}() MSG_OG_LABELs_D = Dict{Tuple{Int, Int, Int}, String}() MSG_BNS2OG_NUMs_D = Dict{Tuple{Int, Int}, Tuple{Int, Int, Int}}() for i in 1:1651 msg, bns_label, og_label, (N₁, N₂, N₃) = read_group!(io) push!(msgs, msg) MSG_BNS_LABELs_D[msg.num] = bns_label MSG_OG_LABELs_D[(N₁, N₂, N₃)] = og_label MSG_BNS2OG_NUMs_D[msg.num] = (N₁, N₂, N₃) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
7526
using Crystalline # The listings below include all unique, labelled k-points in the representation domain # whose little group is not trivial. In addition, Γ=(0,0) and Ω=(u,v) are included for # every group. The notation follows Bilbao's LKVEC tool [^1] entirely. Note that this # implies some occasionally odd-looking choices, e.g. (see (*) marks below): # - *Plane groups 3 & 4*: the X and Y labels are defined counter-intuitively, such that # X = (0,1/2) and Y = (1/2,0). This also differs from the definitions in the # other primitive rectangular (op) Bravais lattices (i.e. 6, 7, & 8), which # instead have X = (1/2,0) etc. The difference also exists for k-line labels. # - *Plane group 5 vs. 9*: although both are centred rectangular (oc) Bravais lattices, # their k-vector labels do not agree, but differ by coordinate permutations. # The origin for these differences lies in different settings for the plane group # operations. Because we use Bilbao's conventions for plane group operations, we also stick # with their conventions for k-vector labels here, even though they are somewhat unsightly # occasionally. # Litvin & Wike's 'Character tables and compatibility relations of the eighty layer groups # and seventeen plane groups' (1991), give labels that do not have these deficiencies (and # otherwise agree with LKVEC) in table 24 and figure 7. However, this implies a different # setting for the symmetry operations, so we cannot really adopt it. # [^1]: [Bilbao's LKVEC](https://www.cryst.ehu.es/subperiodic/get_layer_kvec.html) PLANE2KVEC = Dict( 1 => ([], KVec{2}.([])), 2 => (["Y", "B", "A"], KVec{2}.(["0,1/2", "1/2,0", "1/2,-1/2"])), 3 => (["X", "Y", "S", #= (*) =# "Σ", "ΣA", "C", "CA"], KVec{2}.(["0,1/2", "1/2,0", "1/2,1/2", "0,u", "0,-u", "1/2,u", "1/2,-u"])), 4 => (["X", "Y", "S", #= non-symmorphic =# #= (*) =# "Σ", "ΣA", "C", "CA"], KVec{2}.(["0,1/2", "1/2,0", "1/2,1/2", "0,u", "0,-u", "1/2,u", "1/2,-u"])), 5 => (["Y", "Σ", "ΣA", #= (*) =# "C", "CA"], KVec{2}.(["0,1", "0,2u", "0,-2u", "1,2u", "1,-2u"])), 6 => (["X", "Y", "S", "Σ", "C", "Δ", "D"], KVec{2}.(["1/2,0", "0,1/2", "1/2,1/2", "u,0", "u,1/2", "0,u", "1/2,u"])), 7 => (["X", "Y", "S", #= non-symmorphic =# "Σ", "C", "Δ", "D"], KVec{2}.(["1/2,0", "0,1/2", "1/2,1/2", "u,0", "u,1/2", "0,u", "1/2,u"])), 8 => (["X", "Y", "S", #= non-symmorphic =# "Σ", "C", "Δ", "D"], KVec{2}.(["1/2,0", "0,1/2", "1/2,1/2", "u,0", "u,1/2", "0,u", "1/2,u"])), 9 => (["Y", "S", "Σ", "Δ", "F", "C"], KVec{2}.(["1,0", "1/2,1/2", "2u,0", "0,2u", "1,2u", "2u,1"])), 10 => (["X", "M"], KVec{2}.(["0,1/2", "1/2,1/2"])), 11 => (["X", "M", "Σ", "Δ", "Y"], KVec{2}.(["0,1/2", "1/2,1/2", "u,u", "0,u", "u,1/2"])), 12 => (["X", "M", "Σ", #= non-symmorphic =# "Δ", "Y"], KVec{2}.(["0,1/2", "1/2,1/2", "u,u", "0,u", "u,1/2"])), 13 => (["K", "KA"], KVec{2}.(["1/3,1/3", "2/3,-1/3"])), 14 => (["K", "M", "Σ", "ΣA"], KVec{2}.(["1/3,1/3", "1/2,0", "u,0", "0,u"])), 15 => (["K", "KA", "M", "Λ", "ΛA", "T", "TA"], KVec{2}.(["1/3,1/3", "2/3,-1/3", "1/2,0", "u,u", "2u,-u", "1/2-u,2u", "1/2+u,-2u"])), 16 => (["K", "M"], KVec{2}.(["1/3,1/3", "1/2,0"])), 17 => (["K", "M", "Σ", "Λ", "T"], KVec{2}.(["1/3,1/3", "1/2,0", "u,0", "u,u", "1/2-u,2u"])) ) # push Γ and Ω k-points, which are in all plane groups, to front & end of the above vectors foreach(values(PLANE2KVEC)) do d pushfirst!(d[1], "Γ"); push!(d[1], "Ω") pushfirst!(d[2], KVec("0,0")); push!(d[2], KVec("α,β")) end # should be called with a reduced set of operations (i.e. no centering translation copies) function _find_isomorphic_parent_pointgroup(G) D = dim(G) ctᴳ = MultTable(G).table @inbounds for iuclab in PG_IUCs[D] P = pointgroup(iuclab, D) ctᴾ = MultTable(P).table if ctᴳ == ctᴾ # bit sloppy; would miss ismorphisms that are "concealed" by row/column swaps return P end end error("failed to find an isomorphic parent point group") end # build little group irreps of tabulated k-points by matching up to the assoc. point group LGIRSD_2D = Dict{Int, Dict{String, Vector{LGIrrep{2}}}}() for (sgnum, (klabs, kvs)) in PLANE2KVEC issymmorph(sgnum, 2) || continue # treat only symmorphic groups sg = spacegroup(sgnum, Val(2)) lgs = littlegroup.(Ref(sg), kvs) # little groups at each tabulated k-point ops′ = reduce_ops.(lgs) # reduce to operations without centering "copies" lgs .= LittleGroup.(sgnum, kvs, klabs, ops′) pgs = _find_isomorphic_parent_pointgroup.(lgs) # find the parent point group pglabs = label.(pgs) # labels of the parent point groups pgirs_vec = pgirreps.(pglabs, Val(2)) LGIRSD_2D[sgnum] = Dict{String, Vector{LGIrrep{2}}}() for (klab, lg, pgirs) in zip(klabs, lgs, pgirs_vec) # regarding cdml labels: in 3D some CDML labels can have a ± superscript; in 2D, # however, the labelling scheme is just numbers; taking `last(label(pgir))` picks # out this number ('₁', '₂', etc.) cdmls = Ref(klab).*last.(label.(pgirs)) matrices = getfield.(pgirs, Ref(:matrices)) translations = [zeros(2) for _ in lg] pgirs_realities = reality.(pgirs) lgirs = LGIrrep{2}.(cdmls, Ref(lg), matrices, Ref(translations), pgirs_realities, false) LGIRSD_2D[sgnum][klab] = lgirs end end # correct the reality by calling out to `calc_reality` explicitly (the thing to guard # against here is that the Herring criterion and the Frobenius-Schur criterion need not # agree: i.e. LGIrreps do not necessarily inherit the reality of a parent PGIrrep) LGIRSD_2D′ = Dict{Int, Dict{String, Vector{LGIrrep{2}}}}() for (sgnum, LGIRSD_2D) in LGIRSD_2D sg = reduce_ops(spacegroup(sgnum, Val(2))) LGIRSD_2D′[sgnum] = Dict{String, Vector{LGIrrep{2}}}() for (klab, lgirs) in LGIRSD_2D lgirs′ = LGIrrep{2}[] for lgir in lgirs reality_type = calc_reality(lgir, sg) lgir′ = LGIrrep{2}(label(lgir), group(lgir), lgir.matrices, lgir.translations, reality_type , false) push!(lgirs′, lgir′) end LGIRSD_2D′[sgnum][klab]= lgirs′ end end # ----------------------------------------------------------------------------------------- # ADD LGIRREPS OR THE NON-SYMMORPHIC PLANE GROUPS (FROM HAND-TABULATION) let # "load" the `LGIrrep`s of plane groups 4, 7, 8, and 12 into `LGIRSD_2D` (using `let` # statement to avoid namespace clash w/ existing `LGIRSD_2D`) include("setup_2d_littlegroup_irreps_nonsymmorph.jl") merge!(LGIRSD_2D′, LGIRSD_2D) end # ----------------------------------------------------------------------------------------- # CREATE A SORTED VECTOR OF `Vector{LGIrrep}` WHOSE INDICES MATCH THE SGNUM LGIRS_2D′ = Vector{valtype(LGIRSD_2D′)}(undef, 17) foreach(LGIRSD_2D′) do (sgnum, lgirsd) LGIRS_2D′[sgnum] = lgirsd end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
10814
using Crystalline function make_lgirrep(cdml_suffix::String, lg::LittleGroup{D}, scalars_or_matrices::Vector, reality_type::Reality=REAL, translations=nothing) where D cdml = klabel(lg)*cdml_suffix if eltype(scalars_or_matrices) <: Number matrices = [fill(ComplexF64(v), 1,1) for v in scalars_or_matrices] else matrices = scalars_or_matrices end if isnothing(translations) translations = [zeros(D) for _ in matrices] end return LGIrrep{D}(cdml, lg, matrices, translations, reality_type, false) end # ----------------------------------------------------------------------------------------- # --- MANUAL TABULATION OF IRREPS OF NONSYMMORPHIC PLANE GROUPS (4, 7, 8, & 12) ----------- # In all cases, the irreps (and associated labels) were obtained simply by comparison with # their parent space group. The settings are identical between these plane groups and their # parent space group, except for plane group 4, which corresponds to an yz-plane instead of # an xy-plane of its parent. LGIRSD_2D = Dict{Int, Dict{String, Vector{LGIrrep{2}}}}() # --- Plane group 4 ----------------------------------------------------------------------- # The yz-plane of space group 7 LGIRSD_2D[4] = Dict{String, Vector{LGIrrep{2}}}() # Γ kv = KVec(0,0) lg = LittleGroup(4, kv, "Γ", [S"x,y", S"-x,y+1/2"]) LGIRSD_2D[4]["Γ"] = [ make_lgirrep("₁", lg, [1, +1], REAL) make_lgirrep("₂", lg, [1, -1], REAL) ] # X (from 3D B-point) kv = KVec(0,1/2) lg = LittleGroup(4, kv, "X", [S"x,y", S"-x,y+1/2"]) LGIRSD_2D[4]["X"] = [ make_lgirrep("₁", lg, [1, 1im], COMPLEX) make_lgirrep("₂", lg, [1, -1im], COMPLEX) ] # Y (from 3D Z-point) kv = KVec(1/2,0) lg = LittleGroup(4, kv, "Y", [S"x,y", S"-x,y+1/2"]) LGIRSD_2D[4]["Y"] = [ make_lgirrep("₁", lg, [1, 1], REAL) make_lgirrep("₂", lg, [1, -1], REAL) ] # S (from 3D D-point) kv = KVec(1/2,1/2) lg = LittleGroup(4, kv, "S", [S"x,y", S"-x,y+1/2"]) LGIRSD_2D[4]["S"] = [ make_lgirrep("₁", lg, [1, 1im], COMPLEX) make_lgirrep("₂", lg, [1, -1im], COMPLEX) ] # Σ (from 3D F-point) kv = KVec("0,u") lg = LittleGroup(4, kv, "Σ", [S"x,y", S"-x,y+1/2"]) LGIRSD_2D[4]["Σ"] = [ make_lgirrep("₁", lg, [1, 1], COMPLEX, [[0.0,0.0], [0.0,0.5]]) make_lgirrep("₂", lg, [1, -1], COMPLEX, [[0.0,0.0], [0.0,0.5]]) ] # ΣA (from Σ) kv = KVec("0,-u") lg = LittleGroup(4, kv, "ΣA", [S"x,y", S"-x,y+1/2"]) LGIRSD_2D[4]["ΣA"] = [ make_lgirrep("₁", lg, [1, 1], COMPLEX, [[0.0,0.0], [0.0,0.5]]) # same as Σ ... make_lgirrep("₂", lg, [1, -1], COMPLEX, [[0.0,0.0], [0.0,0.5]]) ] # C (from 3D G-point) kv = KVec("1/2,u") lg = LittleGroup(4, kv, "C", [S"x,y", S"-x,y+1/2"]) LGIRSD_2D[4]["C"] = [ make_lgirrep("₁", lg, [1, 1], COMPLEX, [[0.0,0.0], [0.0,0.5]]) # same as Σ ... make_lgirrep("₂", lg, [1, -1], COMPLEX, [[0.0,0.0], [0.0,0.5]]) ] # CA (from C) kv = KVec("1/2,-u") lg = LittleGroup(4, kv, "CA", [S"x,y", S"-x,y+1/2"]) LGIRSD_2D[4]["CA"] = [ make_lgirrep("₁", lg, [1, 1], COMPLEX, [[0.0,0.0], [0.0,0.5]]) # same as Σ ... make_lgirrep("₂", lg, [1, -1], COMPLEX, [[0.0,0.0], [0.0,0.5]]) ] # --- Plane group 7 ----------------------------------------------------------------------- # The xz-plane of space group 28 LGIRSD_2D[7] = Dict{String, Vector{LGIrrep{2}}}() # Γ kv = KVec(0,0) lg = LittleGroup(7, kv, "Γ", [S"x,y", S"-x,-y", S"-x+1/2,y", S"x+1/2,-y"]) LGIRSD_2D[7]["Γ"] = [ make_lgirrep("₁", lg, [1, +1, +1, +1], REAL) make_lgirrep("₂", lg, [1, +1, -1, -1], REAL) make_lgirrep("₃", lg, [1, -1, +1, -1], REAL) make_lgirrep("₄", lg, [1, -1, -1, +1], REAL) ] # Y kv = KVec(0,1/2) lg = LittleGroup(7, kv, "Y", [S"x,y", S"-x,-y", S"-x+1/2,y", S"x+1/2,-y"]) LGIRSD_2D[7]["Y"] = [ make_lgirrep("₁", lg, [1, +1, +1, +1], REAL) make_lgirrep("₂", lg, [1, +1, -1, -1], REAL) make_lgirrep("₃", lg, [1, -1, +1, -1], REAL) make_lgirrep("₄", lg, [1, -1, -1, +1], REAL) ] # X kv = KVec(1/2,0) lg = LittleGroup(7, kv, "X", [S"x,y", S"-x,-y", S"-x+1/2,y", S"x+1/2,-y"]) LGIRSD_2D[7]["X"] = [ make_lgirrep("₁", lg, [[1 0; 0 1], [0 -1; -1 0], [1 0; 0 -1], [0 -1; 1 0]], REAL) ] # S kv = KVec(1/2,1/2) lg = LittleGroup(7, kv, "S", [S"x,y", S"-x,-y", S"-x+1/2,y", S"x+1/2,-y"]) LGIRSD_2D[7]["S"] = [ make_lgirrep("₁", lg, [[1 0; 0 1], [0 -1; -1 0], [1 0; 0 -1], [0 -1; 1 0]], REAL) ] # Σ kv = KVec("u,0") lg = LittleGroup(7, kv, "Σ", [S"x,y", S"x+1/2,-y"]) LGIRSD_2D[7]["Σ"] = [ make_lgirrep("₁", lg, [1, +1], REAL, [[0.0,0.0], [0.5,0.0]]) make_lgirrep("₂", lg, [1, -1], REAL, [[0.0,0.0], [0.5,0.0]]) ] # C kv = KVec("u,1/2") lg = LittleGroup(7, kv, "C", [S"x,y", S"x+1/2,-y"]) LGIRSD_2D[7]["C"] = [ make_lgirrep("₁", lg, [1, +1], REAL, [[0.0,0.0], [0.5,0.0]]) make_lgirrep("₂", lg, [1, -1], REAL, [[0.0,0.0], [0.5,0.0]]) ] # Δ kv = KVec("0,u") lg = LittleGroup(7, kv, "Δ", [S"x,y", S"-x+1/2,y"]) LGIRSD_2D[7]["Δ"] = [ make_lgirrep("₁", lg, [1, -1], REAL) make_lgirrep("₂", lg, [1, +1], REAL) ] # D kv = KVec("1/2,u") lg = LittleGroup(7, kv, "D", [S"x,y", S"-x+1/2,y"]) LGIRSD_2D[7]["D"] = [ make_lgirrep("₁", lg, [1, +1], COMPLEX) make_lgirrep("₂", lg, [1, -1], COMPLEX) ] # --- Plane group 8 ----------------------------------------------------------------------- # The xz-plane of space group 32 LGIRSD_2D[8] = Dict{String, Vector{LGIrrep{2}}}() # Γ kv = KVec(0,0) lg = LittleGroup(8, kv, "Γ", [S"x,y", S"-x,-y", S"-x+1/2,y+1/2", S"x+1/2,-y+1/2"]) LGIRSD_2D[8]["Γ"] = [ make_lgirrep("₁", lg, [1, +1, +1, +1], REAL) make_lgirrep("₂", lg, [1, +1, -1, -1], REAL) make_lgirrep("₃", lg, [1, -1, +1, -1], REAL) make_lgirrep("₄", lg, [1, -1, -1, +1], REAL) ] # Y kv = KVec(0,1/2) lg = LittleGroup(8, kv, "Y", [S"x,y", S"-x,-y", S"-x+1/2,y+1/2", S"x+1/2,-y+1/2"]) LGIRSD_2D[8]["Y"] = [ make_lgirrep("₁", lg, [[1 0; 0 1], [0 -1; -1 0], [0 -1; 1 0], [1 0; 0 -1]], REAL) ] # X kv = KVec(1/2,0) lg = LittleGroup(8, kv, "X", [S"x,y", S"-x,-y", S"-x+1/2,y+1/2", S"x+1/2,-y+1/2"]) LGIRSD_2D[8]["X"] = [ make_lgirrep("₁", lg, [[1 0; 0 1], [0 -1; -1 0], [1 0; 0 -1], [0 -1; 1 0]], REAL) ] # S kv = KVec(1/2,1/2) lg = LittleGroup(8, kv, "S", [S"x,y", S"-x,-y", S"-x+1/2,y+1/2", S"x+1/2,-y+1/2"]) LGIRSD_2D[8]["S"] = [ make_lgirrep("₁", lg, [1, +1, +1im, +1im], COMPLEX) make_lgirrep("₂", lg, [1, +1, -1im, -1im], COMPLEX) make_lgirrep("₃", lg, [1, -1, +1im, -1im], COMPLEX) make_lgirrep("₄", lg, [1, -1, -1im, +1im], COMPLEX) ] # Σ kv = KVec("u,0") lg = LittleGroup(8, kv, "Σ", [S"x,y", S"x+1/2,-y+1/2"]) LGIRSD_2D[8]["Σ"] = [ make_lgirrep("₁", lg, [1, +1], REAL, [[0.0,0.0], [0.5,0.5]]) make_lgirrep("₂", lg, [1, -1], REAL, [[0.0,0.0], [0.5,0.5]]) ] # C kv = KVec("u,1/2") lg = LittleGroup(8, kv, "C", [S"x,y", S"x+1/2,-y+1/2"]) LGIRSD_2D[8]["C"] = [ make_lgirrep("₁", lg, [1, -1im], COMPLEX, [[0.0,0.0], [0.5,0.5]]) make_lgirrep("₂", lg, [1, +1im], COMPLEX, [[0.0,0.0], [0.5,0.5]]) ] # Δ kv = KVec("0,u") lg = LittleGroup(8, kv, "Δ", [S"x,y", S"-x+1/2,y+1/2"]) LGIRSD_2D[8]["Δ"] = [ make_lgirrep("₁", lg, [1, +1], REAL, [[0.0,0.0], [0.5,0.5]]) make_lgirrep("₂", lg, [1, -1], REAL, [[0.0,0.0], [0.5,0.5]]) ] # D kv = KVec("1/2,u") lg = LittleGroup(8, kv, "D", [S"x,y", S"-x+1/2,y+1/2"]) LGIRSD_2D[8]["D"] = [ make_lgirrep("₁", lg, [1, -1im], COMPLEX, [[0.0,0.0], [0.5,0.5]]) make_lgirrep("₂", lg, [1, +1im], COMPLEX, [[0.0,0.0], [0.5,0.5]]) ] # --- Plane group 12 ---------------------------------------------------------------------- # The xy-plane of space group 100 LGIRSD_2D[12] = Dict{String, Vector{LGIrrep{2}}}() # Γ kv = KVec(0,0) lg = LittleGroup(12, kv, "Γ", [S"x,y", S"-x,-y", S"-y,x", S"y,-x", S"-x+1/2,y+1/2", S"x+1/2,-y+1/2", S"-y+1/2,-x+1/2", S"y+1/2,x+1/2"]) LGIRSD_2D[12]["Γ"] = [ make_lgirrep("₁", lg, [1, +1, +1, +1, +1, +1, +1, +1], REAL) make_lgirrep("₂", lg, [1, +1, -1, -1, +1, +1, -1, -1], REAL) make_lgirrep("₃", lg, [1, +1, -1, -1, -1, -1, +1, +1], REAL) make_lgirrep("₄", lg, [1, +1, +1, +1, -1, -1, -1, -1], REAL) make_lgirrep("₅", lg, [[1 0; 0 1], [-1 0; 0 -1], [0 -1; 1 0], [0 1; -1 0], [-1 0; 0 1], [1 0; 0 -1], [0 -1; -1 0], [0 1; 1 0]], REAL) ] # M kv = KVec(1/2,1/2) lg = LittleGroup(12, kv, "M", [S"x,y", S"-x,-y", S"-y,x", S"y,-x", S"-x+1/2,y+1/2", S"x+1/2,-y+1/2", S"-y+1/2,-x+1/2", S"y+1/2,x+1/2"]) LGIRSD_2D[12]["M"] = [ make_lgirrep("₁", lg, [1, -1, 1im, -1im, 1im, -1im, 1, -1], COMPLEX) make_lgirrep("₂", lg, [1, -1, -1im, 1im, 1im, -1im, -1, 1], COMPLEX) make_lgirrep("₃", lg, [1, -1, -1im, 1im, -1im, 1im, 1, -1], COMPLEX) make_lgirrep("₄", lg, [1, -1, 1im, -1im, -1im, 1im, -1, 1], COMPLEX) make_lgirrep("₅", lg, [[1 0; 0 1], [1 0; 0 1], [-1 0; 0 1], [-1 0; 0 1], [0 -1; 1 0], [0 -1; 1 0], [0 -1; -1 0], [0 -1; -1 0]]) ] # X kv = KVec(0,1/2) lg = LittleGroup(12, kv, "X", [S"x,y", S"-x,-y", S"-x+1/2,y+1/2", S"x+1/2,-y+1/2"]) LGIRSD_2D[12]["X"] = [ make_lgirrep("₁", lg, [[1 0; 0 1], [1 0; 0 -1], [0 -1; 1 0], [0 1; 1 0]]) ] # Δ kv = KVec("0,u") lg = LittleGroup(12, kv, "Δ", [S"x,y", S"-x+1/2,y+1/2"]) LGIRSD_2D[12]["Δ"] = [ make_lgirrep("₁", lg, [1, 1], REAL, [[0.0,0.0], [0.5,0.5]]) make_lgirrep("₂", lg, [1, -1], REAL, [[0.0,0.0], [0.5,0.5]]) ] # Y kv = KVec("u,1/2") lg = LittleGroup(12, kv, "Y", [S"x,y", S"x+1/2,-y+1/2"]) LGIRSD_2D[12]["Y"] = [ make_lgirrep("₁", lg, [1, -1im], COMPLEX, [[0.0,0.0], [0.5,0.5]]) make_lgirrep("₂", lg, [1, 1im], COMPLEX, [[0.0,0.0], [0.5,0.5]]) ] # Σ kv = KVec("u,u") lg = LittleGroup(12, kv, "Σ", [S"x,y", S"y+1/2,x+1/2"]) LGIRSD_2D[12]["Σ"] = [ make_lgirrep("₁", lg, [1, 1], REAL, [[0.0,0.0], [0.5,0.5]]) make_lgirrep("₂", lg, [1, -1], REAL, [[0.0,0.0], [0.5,0.5]]) ] # ----------------------------------------------------------------------------------------- # ADD TRIVIAL Ω IRREP TO EACH LISTING for (sgnum, lgirsd) in LGIRSD_2D local lg = LittleGroup(sgnum, KVec("u,v"), "Ω", [S"x,y"]) lgirsd["Ω"] = [make_lgirrep("₁", lg, [1], sgnum == 4 ? COMPLEX : REAL)] # (reality is COMPLEX at Ω for plane group 4, and REAL for plane groups 7, 8, and 12) end # ----------------------------------------------------------------------------------------- # TEST FOR SUBSET OF POSSIBLE TYPOS for (sgnum, lgirsd) in LGIRSD_2D sg = reduce_ops(spacegroup(sgnum, Val(2)), true) for (klab,lgirs) in lgirsd g = group(first(lgirs)) if klabel(g) != klab error("Tabulation error: mismatched k-label $(klabel(g)) and dict-index $(klab)") end if reality.(lgirs) != calc_reality.(lgirs, Ref(sg), Ref(Crystalline.TEST_αβγs[2])) error("Tabulation error: reality type") end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2410
# Utility to write a ::BandRepSet to a .csv file using Crystalline function bandrep2csv(filename::String, brs::BandRepSet) open(filename, "w") do io bandrep2csv(io, brs) end end function extract_klabel(s::String) # cheat a bit here and exploit that we know that the only greek letters # occuring in the k-label are Γ, Λ, Δ, Σ, and Ω stopidx = findfirst(c->c∉(('A':'Z'..., 'Γ', 'Λ', 'Δ', 'Σ', 'Ω')), s)::Int return s[1:prevind(s, stopidx)] # `prevind` needed since labels are not just ascii end function bandrep2csv(io::IO, brs::BandRepSet) print(io, "Wyckoff pos.") for br in brs print(io, "|", br.wyckpos, "(", br.sitesym, ")") end println(io) print(io, "Band-Rep.") for br in brs print(io, "|", br.label, "(", br.dim, ")") end println(io) irlabs = brs.irlabs for (idx, (klab,kv)) in enumerate(zip(brs.klabs, brs.kvs)) print(io, klab, ":") print(io, '('*strip(replace(string(kv), " "=>""), ('[', ']'))*')') iridxs = findall(irlab -> extract_klabel(irlab) == klab, irlabs) for br in brs print(io, "|", ) has_multiple = false for iridx in iridxs v = br.irvec[iridx] if !iszero(v) has_multiple && print(io, '⊕') isone(v) || print(io, v) print(io, irlabs[iridx]) # TODO: write irrep dimension; possible, but tedious & requires # loading irreps separately has_multiple = true end end end idx ≠ length(brs.klabs) && println(io) end end # ---------------------------------------------------------------------------------------- # # define `make_bandrep_set` that creates `::BandRepSet` include("setup_2d_band_representations.jl") basepath = joinpath((@__DIR__), "..", "data/bandreps/2d") for allpaths in (false, true) path_tag = allpaths ? "allpaths" : "maxpaths" for timereversal in (false, true) tr_tag = timereversal ? "elementaryTR" : "elementary" for sgnum in 1:MAX_SGNUM[2] brs = calc_bandreps(sgnum, Val(2); allpaths=allpaths, timereversal=timereversal) filename = joinpath(basepath, tr_tag, path_tag, string(sgnum)*".csv") bandrep2csv(filename, brs) end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
6907
using Crystalline, JLD2 """ __write_littlegroupirreps(LGIRS::Vector{Dict{Vector{LGIrrep}}}) --> ::String, ::String Write all little group/small irreps, i.e. `LGIrrep`s, in the input to disk, as JLD2 files, in order to ease subsequent loading of `LGIrrep`s. Input is of the type `LGIRS::Vector{Dict{Vector{LGIrrep}}}` intended as vector-indexed across space group number, then dict-indexed across distinct **k**-point labels, and finally vector-indexed across distinct irreps; in practice, calling `__write_littlegroupirreps()` will load `LGIRS` via `parselittlegroupirreps` and write **all** the `LGIrrep`s in ISOTROPY. There is generally no reason for a user to **ever** do this. Returns the filepath of the saved .jld2 files. """ function __write_littlegroupirreps( LGIRS::Vector{Dict{String, <:AbstractVector{LGIrrep{D}}}}) where D savepath = (@__DIR__)*"/../data/irreps/lgs/"*string(D)*"d" filename_lgs = joinpath(savepath, "littlegroups_data.jld2") filename_irreps = joinpath(savepath, "irreps_data.jld2") JLD2.jldopen(filename_lgs, "w") do littlegroups_file JLD2.jldopen(filename_irreps, "w") do irreps_file for lgirsd in LGIRS # fixed sgnum: lgirsd has structure lgirsd[klab][iridx] sgnum = num(first(lgirsd["Γ"])) Nk = length(lgirsd) # ==== little groups data ==== sgops = operations(first(lgirsd["Γ"])) klab_list = Vector{String}(undef, Nk) kstr_list = Vector{String}(undef, Nk) opsidx_list = Vector{Vector{Int16}}(undef, Nk) # Int16 because number of ops ≤ 192; ideally, would use UInt8 for (kidx, (klab, lgirs)) in enumerate(lgirsd) # lgirs is a vector of LGIrreps, all at the same 𝐤-point lgir = first(lgirs) # 𝐤-info is the same for each LGIrrep in vector lgirs klab_list[kidx] = klab kstr_list[kidx] = filter(!isspace, chop(string(position(lgir)); head=1, tail=1)) opsidx_list[kidx] = map(y->findfirst(==(y), sgops), operations(lgir)) end # ==== irreps data ==== matrices_list = [[lgir.matrices for lgir in lgirs] for lgirs in values(lgirsd)] #translations_list = [[lgir.translations for lgir in lgirs] for lgirs in values(lgirsd)] # don't want to save a bunch of zeros if all translations are zero: # instead, save `nothing` as a sentinel value translations_list = [Union{Nothing, Vector{Vector{Float64}}}[ all(iszero, Crystalline.translations(lgir)) ? nothing : Crystalline.translations(lgir) for lgir in lgirs] for lgirs in values(lgirsd)] # dreadful generator, but OK... realities_list = [[Integer(reality(lgir)) for lgir in lgirs] for lgirs in values(lgirsd)] cdml_list = [[label(lgir) for lgir in lgirs] for lgirs in values(lgirsd)] # ==== save data ==== # little groups littlegroups_file[string(sgnum)*"/sgops"] = xyzt.(sgops) littlegroups_file[string(sgnum)*"/klab_list"] = klab_list littlegroups_file[string(sgnum)*"/kstr_list"] = kstr_list littlegroups_file[string(sgnum)*"/opsidx_list"] = opsidx_list # irreps irreps_file[string(sgnum)*"/matrices_list"] = matrices_list irreps_file[string(sgnum)*"/translations_list"] = translations_list irreps_file[string(sgnum)*"/realities_list"] = realities_list # ::Vector{Int8} irreps_file[string(sgnum)*"/cdml_list"] = cdml_list end # end of loop end # close irreps_file end # close littlegroups_file return filename_lgs, filename_irreps end # ---------------------------------------------------------------------------------------- # # 1D line groups: little groups irreps written down manually LGIRS_1D = [Dict{String, Vector{LGIrrep{1}}}() for _ in 1:2] function make_1d_lgirrep(sgnum::Integer, klab::String, cdml_suffix::String, kx, ops::Vector{SymOperation{1}}, scalars::Vector{<:Number}=[1.0,], reality_type::Reality=REAL) cdml = klab*cdml_suffix lg = LittleGroup{1}(sgnum, KVec{1}(string(kx)), klab, ops) matrices = [fill(ComplexF64(v), 1,1) for v in scalars] translations = [zeros(1) for _ in scalars] return LGIrrep{1}(cdml, lg, matrices, translations, reality_type, false) end # Line group 1 LGIRS_1D[1]["Γ"] = [make_1d_lgirrep(1, "Γ", "₁", 0, [S"x"], [1.0])] LGIRS_1D[1]["X"] = [make_1d_lgirrep(1, "X", "₁", 0.5, [S"x"], [1.0])] LGIRS_1D[1]["Ω"] = [make_1d_lgirrep(1, "Ω", "₁", "u", [S"x"], [1.0], COMPLEX)] # Line group 2 LGIRS_1D[2]["Γ"] = [make_1d_lgirrep(2, "Γ", "₁⁺", 0, [S"x", S"-x"], [1.0, 1.0]), # even make_1d_lgirrep(2, "Γ", "₁⁻", 0, [S"x", S"-x"], [1.0, -1.0])] # odd LGIRS_1D[2]["X"] = [make_1d_lgirrep(2, "X", "₁⁺", 0.5, [S"x", S"-x"], [1.0, 1.0]), # even make_1d_lgirrep(2, "X", "₁⁻", 0.5, [S"x", S"-x"], [1.0, -1.0])] # odd LGIRS_1D[2]["Ω"] = [make_1d_lgirrep(2, "Ω", "₁", "u", [S"x"], [1.0])] # ---------------------------------------------------------------------------------------- # # 2D plane groups: little groups irreps extracted for symmorphic groups via point groups include("setup_2d_littlegroup_irreps.jl") # defines the variable LGIRS_2D′ # ---------------------------------------------------------------------------------------- # # ---------------------------------------------------------------------------------------- # # actually write .jld files for 1D and 3D # (to do this, we must close `LGIRREPS_JLDFILES` and `LGS_JLDFILES` - which are opened upon # initialization of Crystalline - before writing new content to them; to that end, we simply # close the files below (make sure you don't have Crystalline loaded in another session # though..!)) foreach(jldfile -> close(jldfile[]), Crystalline.LGIRREPS_JLDFILES) foreach(jldfile -> close(jldfile[]), Crystalline.LGS_JLDFILES) # 3D (from ISOTROPY) include(joinpath((@__DIR__), "ParseIsotropy.jl")) # load the ParseIsotropy module using Main.ParseIsotropy # (exports `parselittlegroupirreps`) LGIRS_3D = parselittlegroupirreps() # ... ISOTROPY is missing several irreps; we bring those in below, obtained from manual # transcription of irreps from Bilbao; script below defines `LGIRS_add` which stores these # manual additions (a Dict with `sgnum` keys) include(joinpath((@__DIR__), "..", "data/irreps/lgs/manual_lgirrep_additions.jl")) for (sgnum, lgirsd_add) in LGIRS_add # merge Bilbao additions with ISOTROPY irreps merge!(LGIRS_3D[sgnum], lgirsd_add) end __write_littlegroupirreps(LGIRS_3D) # 2D (from point group matching) __write_littlegroupirreps(LGIRS_2D′) # 1D (manual) __write_littlegroupirreps(LGIRS_1D)
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
37129
# The goal of this script is to tabulate and construct the irreps in Φ-Ω (basic domain, Ω; # representation domain, Φ) that are missing from ISOTROPY but still feature in the bandreps # from Bilbao. By manual comparison, we found that there are 145 such irreps, across 20 # space groups, namely: # ┌───────┬─────────────────────────────────────────────────────────────────────────────┬───────────────┬────────────────────────────────┬──────────────┐ # │ │ Missing │ Missing │ [NS≡nonsymmorph; S≡symmorph] │ Has fragile │ # │ SGs │ LGIrrep labels │ KVec labels │ Match method │ phases? │ # │───────┼─────────────────────────────────────────────────────────────────────────────┼───────────────┼────────────────────────────────┼──────────────│ # │ 23 │ WA₁, WA₂, WA₃, WA₄ │ WA │ S: MonoOrthTetraCubic ┐ │ ÷ │ # │ 24 │ WA₁ │ WA │ NS: Inherits from └ 23 │ ÷ │ # │ 82 │ PA₁, PA₂, PA₃, PA₄ │ PA │ S: MonoOrthTetraCubic │ │ # │ 121 │ PA₁, PA₂, PA₃, PA₄, PA₅ │ PA │ S: MonoOrthTetraCubic ┐ │ │ # │ 122 │ PA₁, PA₂ │ PA │ NS: Inherits from └ 121 │ │ # │ 143 │ HA₁, HA₂, HA₃, KA₁, KA₂, KA₃, PC₁, PC₂, PC₃ │ HA, KA, PC │ S: TriHex │ │ # │ 144 │ HA₁, HA₂, HA₃, KA₁, KA₂, KA₃, PC₁, PC₂, PC₃ │ HA, KA, PC │ NS: Orphan (type b) ┐ │ ÷ │ # │ 145 │ HA₁, HA₂, HA₃, KA₁, KA₂, KA₃, PC₁, PC₂, PC₃ │ HA, KA, PC │ NS: Orphan (type b) ┘ │ ÷ │ # │ 150 │ HA₁, HA₂, HA₃, KA₁, KA₂, KA₃, PA₁, PA₂, PA₃ │ HA, KA, PA │ S: TriHex │ │ # │ 152 │ HA₁, HA₂, HA₃, KA₁, KA₂, KA₃, PA₁, PA₂, PA₃ │ HA, KA, PA │ NS: Orphan (type b) ┐ │ ÷ │ # │ 154 │ HA₁, HA₂, HA₃, KA₁, KA₂, KA₃, PA₁, PA₂, PA₃ │ HA, KA, PA │ NS: Orphan (type b) ┘ │ │ # │ 157 │ HA₁, HA₂, HA₃, KA₁, KA₂, KA₃, PC₁, PC₂, PC₃ │ HA, KA, PC │ S: TriHex ───────┐ │ │ # │ 159 │ HA₁, HA₂, HA₃, KA₁, KA₂, KA₃, PC₁, PC₂, PC₃ │ HA, KA, PC │ NS: Inherits from └ 157 │ │ # │ 174 │ HA₁, HA₂, HA₃, HA₄, HA₅, HA₆, KA₁, KA₂, KA₃, KA₄, KA₅, KA₆, PA₁, PA₂, PA₃ │ HA, KA, PA │ S: TriHex │ │ # │ 189 │ HA₁, HA₂, HA₃, HA₄, HA₅, HA₆, KA₁, KA₂, KA₃, KA₄, KA₅, KA₆, PA₁, PA₂, PA₃ │ HA, KA, PA │ S: TriHex ───────┐ │ │ # │ 190 │ HA₁, HA₂, HA₃, KA₁, KA₂, KA₃, KA₄, KA₅, KA₆, PA₁, PA₂, PA₃ │ HA, KA, PA │ NS: Inherits from └ 189 │ │ # │ 197 │ PA₁, PA₂, PA₃, PA₄ │ PA │ S: MonoOrthTetraCubic ┐ │ ÷ │ # │ 199 │ PA₁, PA₂, PA₃ │ PA │ NS: Inherits from └ 197 │ ÷ │ # │ 217 │ PA₁, PA₂, PA₃, PA₄, PA₅ │ PA │ S: MonoOrthTetraCubic ┐ │ │ # │ 220 │ PA₁, PA₂, PA₃ │ PA │ NS: Inherits from └ 217 │ │ # └───────┴─────────────────────────────────────────────────────────────────────────────┴───────────────┴────────────────────────────────┴──────────────┘ # In principle, these irreps _could_ be constructed from the existing irreps in ISOTROPY by # suitable transformations, as described by B&C (e.g. near p. 414) or CDML (p. 69-73). # Unfortunately, we have thus far not managed to implement that scheme correctly. Instead, # we here just go the brute-force path and tabulate the things we need manually. # NB: Of the above space groups, only SG 82 has nontrivial symmetry indicator for bosons # with TR. Most of the space groups, however, can support symmetry-indicated fragile # topology (÷ means 'cannot'). # ======================================================================================== # # ================================== UTILITY FUNCTIONS =================================== # # ======================================================================================== # using Crystalline # manually converting # https://www.cryst.ehu.es/cgi-bin/cryst/programs/representations_out.pl # to our own data format for the missing k-points listed in # src/special_representation_domain_kpoints.jl function build_lgirrep_with_type(cdml, lg, Psτs, sgops) # input handling if Psτs isa Vector # assume zero-τ factors Ps = complex.(float.(Psτs)) τs = nothing elseif Psτs isa Tuple{<:Any, <:Any} # nonzero τ-factors; input as 2-tuple Ps = complex.(float.(Psτs[1])) τs = Psτs[2] else throw("Unexpected input format of Psτs") end # convert scalar irreps (numbers) to 1×1 matrices if eltype(Ps) <: Number Ps = fill.(Ps, 1, 1) end lgir = LGIrrep{3}(cdml, lg, Ps, τs, REAL) # place-holder `REAL` reality type reality = calc_reality(lgir, sgops) lgir = LGIrrep{3}(cdml, lg, Ps, τs, reality) # update reality type end function prepare_lg_and_sgops(sgnum, kv, klab, ops) lg = LittleGroup{3}(sgnum, kv, klab, ops) sgops = reduce_ops(spacegroup(sgnum, Val(3)), centering(sgnum, 3), true) # for herrring return lg, sgops end function assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) lg, sgops = prepare_lg_and_sgops(sgnum, kv, klab, lgops) cdmls = Crystalline.formatirreplabel.(Ref(klab) .* string.(1:length(Psτs))) lgirs = build_lgirrep_with_type.(cdmls, Ref(lg), Psτs, Ref(sgops)) end if !isdefined(Main, :cispi) cispi(x) = cis(π*x) end # ======================================================================================== # # =========================== MANUALLY COPIED IRREP DATA BELOW =========================== # # ======================================================================================== # # "preallocate" a storage dict sgnums = [23, 24, 82, 121, 122, 143, 144, 145, 150, 152, 154, 157, 159, 174, 189, 190, 197, 199, 217, 220] LGIRS_add = Dict(sgnum=>Dict{String, Vector{LGIrrep{3}}}() for sgnum in sgnums) # ========= 23 ========= sgnum = 23 # WA₁, WA₂, WA₃, WA₄ klab = "WA" kv = KVec(-1/2,-1/2,-1/2) lgops = SymOperation{3}.(["x,y,z", "x,-y,-z", "-x,y,-z", "-x,-y,z"]) # 1, 2₁₀₀, 2₀₁₀, 2₀₀₁ # listed first across irrep (ascending, e.g. WA1, WA2, WA3, WA4 here) then across lgops Psτs = [[1, 1, 1, 1], # Ps = matrices # nonzero τs (translations) can be specified by entering a 2-tuple of Ps and τs instead of a vector of Ps [1, -1, -1, 1], [1, 1, -1, -1], [1, -1, 1, -1],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 24 ========= sgnum = 24 # WA₁ klab = "WA" kv = KVec(-1/2,-1/2,-1/2) lgops = SymOperation{3}.(["x,y,z", "x,-y,-z+1/2", "-x+1/2,y,-z", "-x,-y+1/2,z"]) # 1, {2₁₀₀|00½}, {2₀₁₀|½00}, {2₀₀₁|0½0} Psτs = [[[1 0; 0 1], [1 0; 0 -1], [0 -im; im 0], [0 1; 1 0]],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 82 ========= sgnum = 82 # PA₁, PA₂, PA₃, PA₄ klab = "PA" kv = KVec(-1/2,-1/2,-1/2) lgops = SymOperation{3}.(["x,y,z", "-x,-y,z", "y,-x,-z", "-y,x,-z"]) # 1, 2₀₀₁, -4⁺₀₀₁, -4⁻₀₀₁ Psτs = [[1, 1, 1, 1], [1, 1, -1, -1], [1, -1, -im, im], [1, -1, im, -im],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 121 ========= sgnum = 121 # PA₁, PA₂, PA₃, PA₄, PA₅ klab = "PA" kv = KVec(-1/2,-1/2,-1/2) lgops = SymOperation{3}.(["x,y,z", "-x,-y,z", "y,-x,-z", "-y,x,-z", "-x,y,-z", "x,-y,-z", "-y,-x,z", "y,x,z"]) # 1, 2₀₀₁, -4⁺₀₀₁, -4⁻₀₀₁, 2₀₁₀, 2₁₀₀, m₁₁₀, m₁₋₁₀ Psτs = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, -1, -1, 1, 1, -1, -1], [1, 1, -1, -1, -1, -1, 1, 1], [1, 1, 1, 1, -1, -1, -1, -1], [[1 0; 0 1], [-1 0; 0 -1], [0 -1; 1 0], [0 1; -1 0], [0 1; 1 0], [0 -1; -1 0], [1 0; 0 -1], [-1 0; 0 1]],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 122 ========= sgnum = 122 # PA₁, PA₂ klab = "PA" kv = KVec(-1/2,-1/2,-1/2) lgops = SymOperation{3}.(["x,y,z", "-x,-y,z", "y,-x,-z", "-y,x,-z", "-x,y+1/2,-z+1/4", "x,-y+1/2,-z+1/4", "-y,-x+1/2,z+1/4", "y,x+1/2,z+1/4"]) # 1, 2₀₀₁, -4⁺₀₀₁, -4⁻₀₀₁, {2₀₁₀|0,1/2,1/4}, {2₁₀₀|0,1/2,1/4}, {m₁₁₀|0,1/2,1/4}, {m₁₋₁₀|0,1/2,1/4} Psτs = [[[1 0; 0 1], [1 0; 0 -1], [1 0; 0 im], [1 0; 0 -im], [0 -1; 1 0], [0 1; 1 0], [0 -im; 1 0], [0 im; 1 0]], [[1 0; 0 1], [1 0; 0 -1], [-1 0; 0 -im], [-1 0; 0 im], [0 1; -1 0], [0 -1; -1 0], [0 -im; 1 0], [0 im; 1 0]],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 143 ========= sgnum = 143 lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z"]) # 1, 3⁺₀₀₁, 3⁻₀₀₁ # HA₁, HA₂, HA₃ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) Psτs = [[1, 1, 1], [1, cispi(-2/3), cispi(2/3)], [1, cispi(2/3), cispi(-2/3)],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops & irreps as HA₁, HA₂, HA₃ LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PC₁, PC₂, PC₃ klab = "PC" kv = KVec("-1/3,-1/3,-w") # ... same lgops & irreps as HA₁, HA₂, HA₃ LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 144 ========= sgnum = 144 lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z+1/3", "-x+y,-x,z+2/3"]) # 1, {3⁺₀₀₁|0,0,1/3}, {3⁻₀₀₁|0,0,2/3} # HA₁, HA₂, HA₃ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) Psτs = [[1, cispi(-1/3), cispi(-2/3)], [1, -1, 1], [1, cispi(1/3), cispi(2/3)],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃ klab = "KA" kv = KVec(-1/3,-1/3,0) Psτs = [[1, 1, 1], [1, cispi(-2/3), cispi(2/3)], [1, cispi(2/3), cispi(-2/3)],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PC₁, PC₂, PC₃ klab = "PC" kv = KVec("-1/3,-1/3,-w") Psτs = [([1, 1, 1], [[0.0,0,0], [0,0,1/3], [0,0,2/3]]), # nonzero τs ([1, cispi(-2/3), cispi(2/3)], [[0.0,0,0], [0,0,1/3], [0,0,2/3]]), ([1, cispi(2/3), cispi(-2/3)], [[0.0,0,0], [0,0,1/3], [0,0,2/3]]),] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 145 ========= sgnum = 145 lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z+2/3", "-x+y,-x,z+1/3"]) # 1, {3⁺₀₀₁|0,0,2/3}, {3⁻₀₀₁|0,0,1/3} # HA₁, HA₂, HA₃ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) Psτs = [[1, 1, -1], [1, cispi(-2/3), cispi(-1/3)], [1, cispi(2/3), cispi(1/3)],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops as HA₁, HA₂, HA₃ Psτs = [[1, 1, 1], [1, cispi(-2/3), cispi(2/3)], [1, cispi(2/3), cispi(-2/3)],] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PC₁, PC₂, PC₃ klab = "PC" kv = KVec("-1/3,-1/3,-w") # ... same lgops as HA₁, HA₂, HA₃ Psτs = [([1, 1, 1], [[0.0,0,0], [0,0,2/3], [0,0,1/3]]), # nonzero τs ([1, cispi(-2/3), cispi(2/3)], [[0.0,0,0], [0,0,2/3], [0,0,1/3]]), ([1, cispi(2/3), cispi(-2/3)], [[0.0,0,0], [0,0,2/3], [0,0,1/3]]),] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 150 ========= sgnum = 150 # HA₁, HA₂, HA₃ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z", "y,x,-z", "x-y,-y,-z", "-x,-x+y,-z"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻, 2₁₁₀, 2₁₀₀, 2₀₁₀ Psτs = [[1, 1, 1, 1, 1, 1], [1, 1, 1, -1, -1, -1], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops & irreps as HA₁, HA₂, HA₃ LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PA₁, PA₂, PA₃ klab = "PA" kv = KVec("-1/3,-1/3,-w") lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻ Psτs = [[1, 1, 1], [1, cispi(-2/3), cispi(2/3)], [1, cispi(2/3), cispi(-2/3)], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 152 ========= sgnum = 152 # HA₁, HA₂, HA₃ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z+1/3", "-x+y,-x,z+2/3", "y,x,-z", "x-y,-y,-z+2/3", "-x,-x+y,-z+1/3"]) # 1, {3₀₀₁⁺|0,0,⅓}, {3₀₀₁⁻|0,0,⅔}, 2₁₁₀, {2₁₀₀|0,0,⅔}, {2₀₁₀|0,0,⅓} Psτs = [[1, -1, 1, 1, 1, -1], [1, -1, 1, -1, -1, 1], [[1 0; 0 1], [cispi(-1/3) 0; 0 cispi(1/3)], [cispi(-2/3) 0; 0 cispi(2/3)], [0 1; 1 0], [0 cispi(-2/3); cispi(2/3) 0], [0 cispi(-1/3); cispi(1/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops as HA₁, HA₂, HA₃ Psτs = [[1, 1, 1, 1, 1, 1], [1, 1, 1, -1, -1, -1], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PA₁, PA₂, PA₃ klab = "PA" kv = KVec("-1/3,-1/3,-w") lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z+1/3", "-x+y,-x,z+2/3"]) # 1, {3₀₀₁⁺|0,0,⅓}, {3₀₀₁⁻|0,0,⅔} Psτs = [([1, 1, 1], [[0.0,0,0], [0,0,1/3], [0,0,2/3]]), ([1, cispi(-2/3), cispi(2/3)], [[0.0,0,0], [0,0,1/3], [0,0,2/3]]), ([1, cispi(2/3), cispi(-2/3)], [[0.0,0,0], [0,0,1/3], [0,0,2/3]]), ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 154 ========= sgnum = 154 # HA₁, HA₂, HA₃ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z+2/3", "-x+y,-x,z+1/3", "y,x,-z", "x-y,-y,-z+1/3", "-x,-x+y,-z+2/3"]) # 1, {3₀₀₁⁺|0,0,⅔}, {3₀₀₁⁻|0,0,⅓}, 2₁₁₀, {2₁₀₀|0,0,⅓}, {2₀₁₀|0,0,⅔} Psτs = [[1, 1, -1, -1, 1, -1], [1, 1, -1, 1, -1, 1], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(-1/3) 0; 0 cispi(1/3)], [0 1; 1 0], [0 cispi(-1/3); cispi(1/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops as HA₁, HA₂, HA₃ Psτs = [[1, 1, 1, 1, 1, 1], [1, 1, 1, -1, -1, -1], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PA₁, PA₂, PA₃ klab = "PA" kv = KVec("-1/3,-1/3,-w") lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z+2/3", "-x+y,-x,z+1/3"]) # 1, {3₀₀₁⁺|0,0,⅔}, {3₀₀₁⁻|0,0,⅓} Psτs = [([1, 1, 1], [[0.0,0,0], [0,0,2/3], [0,0,1/3]]), ([1, cispi(-2/3), cispi(2/3)], [[0.0,0,0], [0,0,2/3], [0,0,1/3]]), ([1, cispi(2/3), cispi(-2/3)], [[0.0,0,0], [0,0,2/3], [0,0,1/3]]), ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 157 ========= sgnum = 157 # HA₁, HA₂, HA₃ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z", "y,x,z", "x-y,-y,z", "-x,-x+y,z"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻, m₋₁₁₀, m₁₂₀, m₂₁₀ Psτs = [[1, 1, 1, 1, 1, 1], [1, 1, 1, -1, -1, -1], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops & irreps as HA₁, HA₂, HA₃ LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PC₁, PC₂, PC₃ klab = "PC" kv = KVec("-1/3,-1/3,-w") # ... same lgops & irreps as HA₁, HA₂, HA₃ LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 159 ========= sgnum = 159 # HA₁, HA₂, HA₃ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z", "y,x,z+1/2", "x-y,-y,z+1/2", "-x,-x+y,z+1/2"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻, {m₋₁₁₀|0,0,½}, {m₁₂₀|0,0,½}, {m₂₁₀|0,0,½} Psτs = [[1, 1, 1, -1im, -1im, -1im], [1, 1, 1, 1im, 1im, 1im], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 -1; 1 0], [0 cispi(-1/3); cispi(-2/3) 0], [0 cispi(1/3); cispi(2/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops as HA₁, HA₂, HA₃ Psτs = [[1, 1, 1, 1, 1, 1], [1, 1, 1, -1, -1, -1], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PC₁, PC₂, PC₃ klab = "PC" kv = KVec("-1/3,-1/3,-w") # ... same lgops as HA₁, HA₂, HA₃ Psτs = [([1, 1, 1, 1, 1, 1], [[0.0,0,0], [0.0,0,0], [0.0,0,0], [0,0,1/2], [0,0,1/2], [0,0,1/2]]), ([1, 1, 1, -1, -1, -1], [[0.0,0,0], [0.0,0,0], [0.0,0,0], [0,0,1/2], [0,0,1/2], [0,0,1/2]]), ([[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], [[0.0,0,0], [0.0,0,0], [0.0,0,0], [0,0,1/2], [0,0,1/2], [0,0,1/2]]), ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 174 ========= sgnum = 174 # HA₁, HA₂, HA₃, HA₄, HA₅, HA₆ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z", "x,y,-z", "-y,x-y,-z", "-x+y,-x,-z"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻, m₀₀₁, -6₀₀₁⁻, -6₀₀₁⁺ Psτs = [[1, 1, 1, 1, 1, 1], [1, 1, 1, -1, -1, -1], [1, cispi(-2/3), cispi(2/3), 1, cispi(-2/3), cispi(2/3)], [1, cispi(-2/3), cispi(2/3), -1, cispi(1/3), cispi(-1/3)], [1, cispi(2/3), cispi(-2/3), 1, cispi(2/3), cispi(-2/3)], [1, cispi(2/3), cispi(-2/3), -1, cispi(-1/3), cispi(1/3)], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃, KA₄, KA₅, KA₆ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops and irreps as HA₁, HA₂, HA₃ LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PA₁, PA₂, PA₃ klab = "PA" kv = KVec("-1/3,-1/3,-w") lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻ Psτs = [[1, 1, 1], [1, cispi(-2/3), cispi(2/3)], [1, cispi(2/3), cispi(-2/3)], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 189 ========= sgnum = 189 # HA₁, HA₂, HA₃, HA₄, HA₅, HA₆ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z", "x,y,-z", "-y,x-y,-z", "-x+y,-x,-z", "y,x,-z", "x-y,-y,-z", "-x,-x+y,-z", "y,x,z", "x-y,-y,z", "-x,-x+y,z"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻, m₀₀₁, -6₀₀₁⁻, -6₀₀₁⁺, 2₁₁₀, 2₁₀₀, 2₀₁₀, m₋₁₁₀, m₁₂₀, m₂₁₀ Psτs = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1], [1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1], [1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [-1 0; 0 -1], [cispi(1/3) 0; 0 cispi(-1/3)], [cispi(-1/3) 0; 0 cispi(1/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0], [0 -1; -1 0], [0 cispi(-1/3); cispi(1/3) 0], [0 cispi(1/3); cispi(-1/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃, KA₄, KA₅, KA₆ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops and irreps as HA₁, HA₂, HA₃ LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PA₁, PA₂, PA₃ klab = "PA" kv = KVec("-1/3,-1/3,-w") lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z", "y,x,z", "x-y,-y,z", "-x,-x+y,z"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻, m₋₁₁₀, m₁₂₀, m₂₁₀ Psτs = [[1, 1, 1, 1, 1, 1], [1, 1, 1, -1, -1, -1], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 190 ========= sgnum = 190 # HA₁, HA₂, HA₃ klab = "HA" kv = KVec(-1/3,-1/3,-1/2) lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z", "x,y,-z+1/2", "-y,x-y,-z+1/2", "-x+y,-x,-z+1/2", "y,x,-z", "x-y,-y,-z", "-x,-x+y,-z", "y,x,z+1/2", "x-y,-y,z+1/2", "-x,-x+y,z+1/2"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻, {m₀₀₁|0,0,½}, {-6₀₀₁⁻|0,0,½}, {-6₀₀₁⁺|0,0,½}, 2₁₁₀, 2₁₀₀, 2₀₁₀, {m₋₁₁₀|0,0,½}, {m₁₂₀|0,0,½}, {m₂₁₀|0,0,½} Psτs = [[[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [1 0; 0 -1], [cispi(-2/3) 0; 0 cispi(-1/3)], [cispi(2/3) 0; 0 cispi(1/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0], [0 1; -1 0], [0 cispi(2/3); cispi(1/3) 0], [0 cispi(-2/3); cispi(-1/3) 0]], [[1 0; 0 1], [cispi(2/3) 0; 0 cispi(-2/3)], [cispi(-2/3) 0; 0 cispi(2/3)], [1 0; 0 -1], [cispi(2/3) 0; 0 cispi(1/3)], [cispi(-2/3) 0; 0 cispi(-1/3)], [0 1; 1 0], [0 cispi(-2/3); cispi(2/3) 0], [0 cispi(2/3); cispi(-2/3) 0], [0 1; -1 0], [0 cispi(-2/3); cispi(-1/3) 0], [0 cispi(2/3); cispi(1/3) 0]], [[1 0; 0 1], [1 0; 0 1], [1 0; 0 1], [1 0; 0 -1], [1 0; 0 -1], [1 0; 0 -1], [0 1; 1 0], [0 1; 1 0], [0 1; 1 0], [0 1; -1 0], [0 1; -1 0], [0 1; -1 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # KA₁, KA₂, KA₃, KA₄, KA₅, KA₆ klab = "KA" kv = KVec(-1/3,-1/3,0) # ... same lgops as HA₁, HA₂, HA₃ Psτs = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1], [1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1], [1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], [[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [-1 0; 0 -1], [cispi(1/3) 0; 0 cispi(-1/3)], [cispi(-1/3) 0; 0 cispi(1/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0], [0 -1; -1 0], [0 cispi(-1/3); cispi(1/3) 0], [0 cispi(1/3); cispi(-1/3) 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # PA₁, PA₂, PA₃ klab = "PA" kv = KVec("-1/3,-1/3,-w") lgops = SymOperation{3}.(["x,y,z", "-y,x-y,z", "-x+y,-x,z", "y,x,z+1/2", "x-y,-y,z+1/2", "-x,-x+y,z+1/2"]) # 1, 3₀₀₁⁺, 3₀₀₁⁻, {m₋₁₁₀|0,0,½}, {m₁₂₀|0,0,½}, {m₂₁₀|0,0,½} Psτs = [([1, 1, 1, 1, 1, 1], [[0,0,0.0], [0,0,0.0], [0,0,0.0], [0,0,1/2], [0,0,1/2], [0,0,1/2]]), ([1, 1, 1, -1, -1, -1], [[0,0,0.0], [0,0,0.0], [0,0,0.0], [0,0,1/2], [0,0,1/2], [0,0,1/2]]), ([[1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], [[0,0,0.0], [0,0,0.0], [0,0,0.0], [0,0,1/2], [0,0,1/2], [0,0,1/2]]), ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 197 ========= sgnum = 197 # PA₁, PA₂, PA₃, PA₄ klab = "PA" kv = KVec(-1/2,-1/2,-1/2) lgops = SymOperation{3}.(["x,y,z", "-x,-y,z", "-x,y,-z", "x,-y,-z", "z,x,y", "z,-x,-y", # 1, 2₀₀₁, 2₀₁₀, 2₁₀₀, 3₁₁₁⁺, 3₋₁₁₋₁⁺, 3₋₁₁₁⁻, 3₋₁₋₁₁⁺, 3₁₁₁⁻, 3₋₁₁₁⁺, 3₋₁₋₁₁⁻, 3₋₁₁₋₁⁻ "-z,-x,y", "-z,x,-y", "y,z,x", "-y,z,-x", "y,-z,-x", "-y,-z,x"]) Psτs = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, cispi(-2/3), cispi(-2/3), cispi(-2/3), cispi(-2/3), cispi(2/3), cispi(2/3), cispi(2/3), cispi(2/3)], [1, 1, 1, 1, cispi(2/3), cispi(2/3), cispi(2/3), cispi(2/3), cispi(-2/3), cispi(-2/3), cispi(-2/3), cispi(-2/3)], [[1 0 0; 0 1 0; 0 0 1], [1 0 0; 0 -1 0; 0 0 -1], [-1 0 0; 0 -1 0; 0 0 1], [-1 0 0; 0 1 0; 0 0 -1], [0 0 1; 1 0 0; 0 1 0], [0 0 -1; 1 0 0; 0 -1 0], [0 0 1; -1 0 0; 0 -1 0], [0 0 -1; -1 0 0; 0 1 0], [0 1 0; 0 0 1; 1 0 0], [0 -1 0; 0 0 -1; 1 0 0], [0 -1 0; 0 0 1; -1 0 0], [0 1 0; 0 0 -1; -1 0 0]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 199 ========= sgnum = 199 # PA₁, PA₂, PA₃ klab = "PA" kv = KVec(-1/2,-1/2,-1/2) lgops = SymOperation{3}.(["x,y,z", "-x,-y+1/2,z", "-x+1/2,y,-z", "x,-y,-z+1/2", "z,x,y", # 1, {2₀₀₁|0,½,0}, {2₀₁₀|½,0,0}, {2₁₀₀|0,0,½}, 3₁₁₁⁺, {3₋₁₁₋₁⁺|0,0,½}, {3₋₁₁₁⁻|0,½,0}, {3₋₁₋₁₁⁺|½,0,0}, 3₁₁₁⁻, {3₋₁₁₁⁺|½,0,0}, {3₋₁₋₁₁⁻|0,0,½}, {3₋₁₁₋₁⁻|0,½,0} "z,-x,-y+1/2", "-z,-x+1/2,y", "-z+1/2,x,-y", "y,z,x", "-y+1/2,z,-x", "y,-z,-x+1/2", "-y,-z+1/2,x"]) Psτs = [[[1 0; 0 1], [1 0; 0 -1], [0 1; 1 0], [0 -1im; 1im 0], [cispi(-1/12)/√2 cispi(-1/12)/√2; cispi(5/12)/√2 cispi(-7/12)/√2], [cispi(-1/12)/√2 cispi(11/12)/√2; cispi(5/12)/√2 cispi(5/12)/√2], [cispi(-1/12)/√2 cispi(-1/12)/√2; cispi(-7/12)/√2 cispi(5/12)/√2], [cispi(5/12)/√2 cispi(-7/12)/√2; cispi(-1/12)/√2 cispi(-1/12)/√2], [cispi(1/12)/√2 cispi(-5/12)/√2; cispi(1/12)/√2 cispi(7/12)/√2], [cispi(1/12)/√2 cispi(7/12)/√2; cispi(1/12)/√2 cispi(-5/12)/√2], [cispi(-5/12)/√2 cispi(1/12)/√2; cispi(7/12)/√2 cispi(1/12)/√2], [cispi(1/12)/√2 cispi(-5/12)/√2; cispi(-11/12)/√2 cispi(-5/12)/√2]], [[1 0; 0 1], [1 0; 0 -1], [0 1; 1 0], [0 -1im; 1im 0], [cispi(-3/4)/√2 cispi(-3/4)/√2; cispi(-1/4)/√2 cispi(3/4)/√2], [cispi(-3/4)/√2 cispi(1/4)/√2; cispi(-1/4)/√2 cispi(-1/4)/√2], [cispi(-3/4)/√2 cispi(-3/4)/√2; cispi(3/4)/√2 cispi(-1/4)/√2], [cispi(-1/4)/√2 cispi(3/4)/√2; cispi(-3/4)/√2 cispi(-3/4)/√2], [cispi(3/4)/√2 cispi(1/4)/√2; cispi(3/4)/√2 cispi(-3/4)/√2], [cispi(3/4)/√2 cispi(-3/4)/√2; cispi(3/4)/√2 cispi(1/4)/√2], [cispi(1/4)/√2 cispi(3/4)/√2; cispi(-3/4)/√2 cispi(3/4)/√2], [cispi(3/4)/√2 cispi(1/4)/√2; cispi(-1/4)/√2 cispi(1/4)/√2]], [[1 0; 0 1], [1 0; 0 -1], [0 1; 1 0], [0 -1im; 1im 0], [cispi(7/12)/√2 cispi(7/12)/√2; cispi(-11/12)/√2 cispi(1/12)/√2], [cispi(7/12)/√2 cispi(-5/12)/√2; cispi(-11/12)/√2 cispi(-11/12)/√2], [cispi(7/12)/√2 cispi(7/12)/√2; cispi(1/12)/√2 cispi(-11/12)/√2], [cispi(-11/12)/√2 cispi(1/12)/√2; cispi(7/12)/√2 cispi(7/12)/√2], [cispi(-7/12)/√2 cispi(11/12)/√2; cispi(-7/12)/√2 cispi(-1/12)/√2], [cispi(-7/12)/√2 cispi(-1/12)/√2; cispi(-7/12)/√2 cispi(11/12)/√2], [cispi(11/12)/√2 cispi(-7/12)/√2; cispi(-1/12)/√2 cispi(-7/12)/√2], [cispi(-7/12)/√2 cispi(11/12)/√2; cispi(5/12)/√2 cispi(11/12)/√2]], ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 217 ========= sgnum = 217 # PA₁, PA₂, PA₃, PA₄, PA₅ klab = "PA" kv = KVec(-1/2,-1/2,-1/2) lgops = SymOperation{3}.(["x,y,z", "-x,-y,z", "-x,y,-z", "x,-y,-z", "z,x,y", "z,-x,-y", # 1, 2₀₀₁, 2₀₁₀, 2₁₀₀, 3₁₁₁⁺, 3₋₁₁₋₁⁺, 3₋₁₁₁⁻, 3₋₁₋₁₁⁺, 3₁₁₁⁻, 3₋₁₁₁⁺, 3₋₁₋₁₁⁻, 3₋₁₁₋₁⁻, m₋₁₁₀, m₁₁₀, -4₀₀₁⁺, -4₀₀₁⁻, m₀₋₁₁, -4₁₀₀⁺, -4₁₀₀⁻, m₀₁₁, m₋₁₀₁, -4₀₁₀⁻, m₁₀₁, -4₀₁₀⁺ "-z,-x,y", "-z,x,-y", "y,z,x", "-y,z,-x", "y,-z,-x", "-y,-z,x", "y,x,z", "-y,-x,z", "y,-x,-z", "-y,x,-z", "x,z,y", "-x,z,-y", "-x,-z,y", "x,-z,-y", "z,y,x", "z,-y,-x", "-z,y,-x", "-z,-y,x"]) Psτs = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], [[1 0; 0 1], [1 0; 0 1], [1 0; 0 1], [1 0; 0 1], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(-2/3) 0; 0 cispi(2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [cispi(2/3) 0; 0 cispi(-2/3)], [0 1; 1 0], [0 1; 1 0], [0 1; 1 0], [0 1; 1 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(2/3); cispi(-2/3) 0], [0 cispi(-2/3); cispi(2/3) 0], [0 cispi(-2/3); cispi(2/3) 0], [0 cispi(-2/3); cispi(2/3) 0], [0 cispi(-2/3); cispi(2/3) 0]], [[1 0 0; 0 1 0; 0 0 1], [1 0 0; 0 -1 0; 0 0 -1], [-1 0 0; 0 -1 0; 0 0 1], [-1 0 0; 0 1 0; 0 0 -1], [0 0 1; 1 0 0; 0 1 0], [0 0 -1; 1 0 0; 0 -1 0], [0 0 1; -1 0 0; 0 -1 0], [0 0 -1; -1 0 0; 0 1 0], [0 1 0; 0 0 1; 1 0 0], [0 -1 0; 0 0 -1; 1 0 0], [0 -1 0; 0 0 1; -1 0 0], [0 1 0; 0 0 -1; -1 0 0], [1 0 0; 0 0 1; 0 1 0], [1 0 0; 0 0 -1; 0 -1 0], [-1 0 0; 0 0 1; 0 -1 0], [-1 0 0; 0 0 -1; 0 1 0], [0 0 1; 0 1 0; 1 0 0], [0 0 -1; 0 -1 0; 1 0 0], [0 0 1; 0 -1 0; -1 0 0], [0 0 -1; 0 1 0; -1 0 0], [0 1 0; 1 0 0; 0 0 1], [0 -1 0; 1 0 0; 0 0 -1], [0 -1 0; -1 0 0; 0 0 1], [0 1 0; -1 0 0; 0 0 -1]], [[1 0 0; 0 1 0; 0 0 1], [1 0 0; 0 -1 0; 0 0 -1], [-1 0 0; 0 -1 0; 0 0 1], [-1 0 0; 0 1 0; 0 0 -1], [0 0 1; 1 0 0; 0 1 0], [0 0 -1; 1 0 0; 0 -1 0], [0 0 1; -1 0 0; 0 -1 0], [0 0 -1; -1 0 0; 0 1 0], [0 1 0; 0 0 1; 1 0 0], [0 -1 0; 0 0 -1; 1 0 0], [0 -1 0; 0 0 1; -1 0 0], [0 1 0; 0 0 -1; -1 0 0], # same as first "half" of PA₄ -[1 0 0; 0 0 1; 0 1 0], -[1 0 0; 0 0 -1; 0 -1 0], -[-1 0 0; 0 0 1; 0 -1 0], -[-1 0 0; 0 0 -1; 0 1 0], -[0 0 1; 0 1 0; 1 0 0], -[0 0 -1; 0 -1 0; 1 0 0], -[0 0 1; 0 -1 0; -1 0 0], -[0 0 -1; 0 1 0; -1 0 0], -[0 1 0; 1 0 0; 0 0 1], -[0 -1 0; 1 0 0; 0 0 -1], -[0 -1 0; -1 0 0; 0 0 1], -[0 1 0; -1 0 0; 0 0 -1]], # negative of second "half" of PA₄ ] LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs) # ========= 220 ========= sgnum = 220 # PA₁, PA₂, PA₃ klab = "PA" kv = KVec(-1/2,-1/2,-1/2) lgops = SymOperation{3}.(["x,y,z", "-x,-y+1/2,z", "-x+1/2,y,-z", "x,-y,-z+1/2", "z,x,y", # 1, {2₀₀₁|0,½,0}, {2₀₁₀|½,0,0}, {2₁₀₀|0,0,½}, 3₁₁₁⁺, {3₋₁₁₋₁⁺|0,0,½}, {3₋₁₁₁⁻|0,½,0}, {3₋₁₋₁₁⁺|½,0,0}, 3₁₁₁⁻, {3₋₁₁₁⁺|½,0,0}, {3₋₁₋₁₁⁻|0,0,½}, {3₋₁₁₋₁⁻|0,½,0}, {m₋₁₁₀|¼,¼,¼}, {m₁₁₀|¾,¼,¼}, {-4₀₀₁⁺|¼,¾,¼}, {-4₀₀₁⁻|¼,¼,¾}, {m₀₋₁₁|¼,¼,¼}, {-4₁₀₀⁺|¼,¼,¾}, {-4₁₀₀⁻|¾,¼,¼}, {m₀₁₁|¼,¾,¼}, {m₋₁₀₁|¼,¼,¼}, {-4₀₁₀⁻|¼,¾,¼}, {m₁₀₁|¼,¼,¾}, {-4₀₁₀⁺|¾,¼,¼} "z,-x,-y+1/2", "-z,-x+1/2,y", "-z+1/2,x,-y", "y,z,x", "-y+1/2,z,-x", "y,-z,-x+1/2", "-y,-z+1/2,x", "y+1/4,x+1/4,z+1/4", "-y+3/4,-x+1/4,z+1/4", "y+1/4,-x+3/4,-z+1/4", "-y+1/4,x+1/4,-z+3/4", "x+1/4,z+1/4,y+1/4", "-x+1/4,z+1/4,-y+3/4", "-x+3/4,-z+1/4,y+1/4", "x+1/4,-z+3/4,-y+1/4", "z+1/4,y+1/4,x+1/4", "z+1/4,-y+3/4,-x+1/4", "-z+1/4,y+1/4,-x+3/4", "-z+3/4,-y+1/4,x+1/4"]) Psτs = # PA₁ [[ [1 0; 0 1], [1 0; 0 -1], [0 1; 1 0], [0 -1im; 1im 0], [cispi(-3/4)/√2 cispi(-3/4)/√2; cispi(-1/4)/√2 cispi(3/4)/√2 ], [cispi(-3/4)/√2 cispi(1/4)/√2; cispi(-1/4)/√2 cispi(-1/4)/√2], [cispi(-3/4)/√2 cispi(-3/4)/√2; cispi(3/4)/√2 cispi(-1/4)/√2], [cispi(-1/4)/√2 cispi(3/4)/√2; cispi(-3/4)/√2 cispi(-3/4)/√2], [cispi(3/4)/√2 cispi(1/4)/√2; cispi(3/4)/√2 cispi(-3/4)/√2], [cispi(3/4)/√2 cispi(-3/4)/√2; cispi(3/4)/√2 cispi(1/4)/√2 ], [cispi(1/4)/√2 cispi(3/4)/√2; cispi(-3/4)/√2 cispi(3/4)/√2 ], [cispi(3/4)/√2 cispi(1/4)/√2; cispi(-1/4)/√2 cispi(1/4)/√2 ], [0 -1im; -1 0], [0 1im; -1 0], [-1im 0; 0 -1], [1 0; 0 1im], [cispi(-3/4)/√2 cispi(1/4)/√2; cispi(1/4)/√2 cispi(1/4)/√2 ], [cispi(-3/4)/√2 cispi(-3/4)/√2; cispi(1/4)/√2 cispi(-3/4)/√2], [cispi(1/4)/√2 cispi(-3/4)/√2; cispi(1/4)/√2 cispi(1/4)/√2 ], [cispi(3/4)/√2 cispi(3/4)/√2; cispi(3/4)/√2 cispi(-1/4)/√2], [cispi(1/4)/√2 cispi(3/4)/√2; cispi(-1/4)/√2 cispi(-3/4)/√2], [cispi(1/4)/√2 cispi(-1/4)/√2; cispi(-1/4)/√2 cispi(1/4)/√2 ], [cispi(3/4)/√2 cispi(1/4)/√2; cispi(-3/4)/√2 cispi(-1/4)/√2], [cispi(-3/4)/√2 cispi(-1/4)/√2; cispi(-1/4)/√2 cispi(-3/4)/√2], ]] push!(Psτs, # PA₂ (first 12 irreps same as PA₁, next 12 have sign flipped) Psτs[1] .* vcat(ones(Int, 12), fill(-1, 12)) ) push!(Psτs, # PA₃ (4-dimensional irrep) [ [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1], # --- [1 0 0 0; 0 -1 0 0; 0 0 -1 0; 0 0 0 1], # --- [0 1 0 0; 1 0 0 0; 0 0 0 1im; 0 0 -1im 0], # --- [0 -1im 0 0; 1im 0 0 0; 0 0 0 -1; 0 0 -1 0], # --- [cispi(7/12)/√2 cispi(7/12)/√2 0 0; # --- cispi(-11/12)/√2 cispi(1/12)/√2 0 0; 0 0 cispi(-7/12)/√2 cispi(11/12)/√2; 0 0 cispi(-7/12)/√2 cispi(-1/12)/√2], [cispi(7/12)/√2 cispi(-5/12)/√2 0 0; # --- cispi(-11/12)/√2 cispi(-11/12)/√2 0 0; 0 0 cispi(5/12)/√2 cispi(11/12)/√2; 0 0 cispi(5/12)/√2 cispi(-1/12)/√2], [cispi(7/12)/√2 cispi(7/12)/√2 0 0; # --- cispi(1/12)/√2 cispi(-11/12)/√2 0 0; 0 0 cispi(5/12)/√2 cispi(-1/12)/√2; 0 0 cispi(-7/12)/√2 cispi(-1/12)/√2], [cispi(-11/12)/√2 cispi(1/12)/√2 0 0; # --- cispi(7/12)/√2 cispi(7/12)/√2 0 0; 0 0 cispi(-1/12)/√2 cispi(5/12)/√2; 0 0 cispi(11/12)/√2 cispi(5/12)/√2], [cispi(-7/12)/√2 cispi(11/12)/√2 0 0; # --- cispi(-7/12)/√2 cispi(-1/12)/√2 0 0; 0 0 cispi(7/12)/√2 cispi(7/12)/√2; 0 0 cispi(-11/12)/√2 cispi(1/12)/√2], [cispi(-7/12)/√2 cispi(-1/12)/√2 0 0; # --- cispi(-7/12)/√2 cispi(11/12)/√2 0 0; 0 0 cispi(-5/12)/√2 cispi(7/12)/√2; 0 0 cispi(1/12)/√2 cispi(1/12)/√2], [cispi(11/12)/√2 cispi(-7/12)/√2 0 0; # --- cispi(-1/12)/√2 cispi(-7/12)/√2 0 0; 0 0 cispi(1/12)/√2 cispi(-11/12)/√2; 0 0 cispi(-5/12)/√2 cispi(-5/12)/√2], [cispi(-7/12)/√2 cispi(11/12)/√2 0 0; # --- cispi(5/12)/√2 cispi(11/12)/√2 0 0; 0 0 cispi(-5/12)/√2 cispi(-5/12)/√2; 0 0 cispi(-11/12)/√2 cispi(1/12)/√2], [0 0 1im 0; 0 0 0 1im; 1 0 0 0; 0 1 0 0], # --- [0 0 -1im 0; 0 0 0 1im; 1 0 0 0; 0 -1 0 0], # --- [0 0 0 -1; 0 0 1 0; 0 1 0 0; 1 0 0 0], # --- [0 0 0 -1im; 0 0 -1im 0; 0 -1im 0 0; 1im 0 0 0], # --- [0 0 cispi(-1/12)/√2 cispi(-7/12)/√2; # --- 0 0 cispi(-1/12)/√2 cispi(5/12)/√2; cispi(7/12)/√2 cispi(7/12)/√2 0 0; cispi(-11/12)/√2 cispi(1/12)/√2 0 0], [0 0 cispi(11/12)/√2 cispi(-7/12)/√2; # --- 0 0 cispi(11/12)/√2 cispi(5/12)/√2; cispi(7/12)/√2 cispi(-5/12)/√2 0 0; cispi(-11/12)/√2 cispi(-11/12)/√2 0 0], [0 0 cispi(11/12)/√2 cispi(5/12)/√2; # --- 0 0 cispi(-1/12)/√2 cispi(5/12)/√2; cispi(7/12)/√2 cispi(7/12)/√2 0 0; cispi(1/12)/√2 cispi(-11/12)/√2 0 0], [0 0 cispi(5/12)/√2 cispi(11/12)/√2; # --- 0 0 cispi(-7/12)/√2 cispi(11/12)/√2; cispi(-11/12)/√2 cispi(1/12)/√2 0 0; cispi(7/12)/√2 cispi(7/12)/√2 0 0], [0 0 cispi(-11/12)/√2 cispi(-11/12)/√2; # --- 0 0 cispi(-5/12)/√2 cispi(7/12)/√2; cispi(-7/12)/√2 cispi(11/12)/√2 0 0; cispi(-7/12)/√2 cispi(-1/12)/√2 0 0], [0 0 cispi(1/12)/√2 cispi(-11/12)/√2; # --- 0 0 cispi(7/12)/√2 cispi(7/12)/√2; cispi(-7/12)/√2 cispi(-1/12)/√2 0 0; cispi(-7/12)/√2 cispi(11/12)/√2 0 0], [0 0 cispi(7/12)/√2 cispi(-5/12)/√2; # --- 0 0 cispi(1/12)/√2 cispi(1/12)/√2; cispi(11/12)/√2 cispi(-7/12)/√2 0 0; cispi(-1/12)/√2 cispi(-7/12)/√2 0 0], [0 0 cispi(1/12)/√2 cispi(1/12)/√2; # --- 0 0 cispi(-5/12)/√2 cispi(7/12)/√2; cispi(-7/12)/√2 cispi(11/12)/√2 0 0; cispi(5/12)/√2 cispi(11/12)/√2 0 0], ] ) LGIRS_add[sgnum][klab] = assemble_lgirreps(sgnum, kv, klab, lgops, Psτs)
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2729
# Conversion from the basis setting of ITA to ML/CDML: for an operator # in ITA setting, gᴵᵀᴬ, the corresponding operator in ML/CDML setting, # gᴹᴸ, is obtained as gᴹᴸ = PgᴵᵀᴬP⁻¹. # # We can use this to transform an operator in CDML to one in the ITA # setting by gᴵᵀᴬ = P⁻¹gᴹᴸP; if P has rotation and rotation parts 𝐏 and 𝐩, # we can achieve this by `gᴵᵀᴬ = transform(gᴹᴸ, P, p)`. [We use an opposite # convention for P vs. P⁻¹ internally, so the switch from ML→ITA is correct.] # # The transformation matrices P are obtained from Stokes & Hatch's book, # Isotropy subgroups of the 230 crystallographic space groups, Table 6, # p. 6-1 to 6-4 (its use is described in their Section 4). # # If the settings agree between ITA and ML/CDML (i.e. if orientation and # origo are the same; they are both in "conventional" settings, in the sense # that they are not forced-primitive, as in B&C) the transformation is # trivial and we do not give one. _unpack(pair::Pair{Int,<:SymOperation}) = pair[1] => copy.(Crystalline.unpack(pair[2])) const TRANSFORMS_CDML2ITA = Base.ImmutableDict(_unpack.([ 3:15 .=> Ref(SymOperation{3}("z,x,y")) 38:41 .=> Ref(SymOperation{3}("-z,y,x")) 48 => SymOperation{3}("x-1/4,y-1/4,z-1/4") 50 => SymOperation{3}("x-1/4,y-1/4,z") 59 => SymOperation{3}("x-1/4,y-1/4,z") 68 => SymOperation{3}("x,y-1/4,z-1/4") 70 => SymOperation{3}("x-7/8,y-7/8,z-7/8") 85 => SymOperation{3}("x-3/4,y-1/4,z") 86 => SymOperation{3}("x-3/4,y-3/4,z-3/4") 88 => SymOperation{3}("x,y-3/4,z-7/8") 125 => SymOperation{3}("x-3/4,y-3/4,z") 126 => SymOperation{3}("x-3/4,y-3/4,z-3/4") 129 => SymOperation{3}("x-3/4,y-1/4,z") 130 => SymOperation{3}("x-3/4,y-1/4,z") 133 => SymOperation{3}("x-3/4,y-1/4,z-3/4") 134 => SymOperation{3}("x-3/4,y-1/4,z-3/4") 137 => SymOperation{3}("x-3/4,y-1/4,z-3/4") 138 => SymOperation{3}("x-3/4,y-1/4,z-3/4") 141 => SymOperation{3}("x,y-1/4,z-7/8") 142 => SymOperation{3}("x,y-1/4,z-7/8") 146 => SymOperation{3}("y,-x+y,z") 148 => SymOperation{3}("y,-x+y,z") 151 => SymOperation{3}("x,y,z-1/6") 153 => SymOperation{3}("x,y,z-5/6") 154 => SymOperation{3}("x,y,z-1/6") 155 => SymOperation{3}("y,-x+y,z") 160 => SymOperation{3}("y,-x+y,z") 161 => SymOperation{3}("y,-x+y,z") 166 => SymOperation{3}("y,-x+y,z") 167 => SymOperation{3}("y,-x+y,z") 201 => SymOperation{3}("x-3/4,y-3/4,z-3/4") 203 => SymOperation{3}("x-7/8,y-7/8,z-7/8") 222 => SymOperation{3}("x-3/4,y-3/4,z-3/4") 224 => SymOperation{3}("x-3/4,y-3/4,z-3/4") ])...)
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
1968
using Documenter using Crystalline # make sure we actually do `using Crystalline` before calling doctests (as described in # https://juliadocs.github.io/Documenter.jl/stable/man/doctests/#Module-level-metadata) DocMeta.setdocmeta!(Crystalline, :DocTestSetup, :(using Crystalline); recursive=true) makedocs( modules = [Crystalline, Bravais], sitename = "Crystalline.jl", authors = "Thomas Christensen <[email protected]> and contributors", repo = "https://github.com/thchr/Crystalline.jl/blob/{commit}{path}#L{line}", format=Documenter.HTML(; prettyurls = get(ENV, "CI", nothing) == "true", canonical = "https://thchr.github.io/Crystalline.jl", assets = ["assets/custom.css"], # increase logo size size_threshold = 300 * 2^10, # or include "api.md" page in `size_threshold_ignore` ), pages = [ "Home" => "index.md", "Symmetry operations" => "operations.md", "Groups" => "groups.md", "Irreps" => "irreps.md", "Bravais types & bases" => "bravais.md", "Band representations" => "bandreps.md", "Lattices" => "lattices.md", "API" => "api.md", "Internal API" => "internal-api.md", ], warnonly = Documenter.except( :autodocs_block, :cross_references, :docs_block, :doctest, :eval_block, :example_block, :footnote, :linkcheck_remotes, :linkcheck, :meta_block, :parse_error, :setup_block, #:missing_docs # necessary due to docstrings from SmithNormalForm vendoring :( ), clean = true ) # Documenter can also automatically deploy documentation to gh-pages. # See "Hosting Documentation" and deploydocs() in the Documenter manual # for more information. deploydocs( repo = "github.com/thchr/Crystalline.jl.git", target = "build", deps = nothing, make = nothing, push_preview = true )
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
9335
module CrystallineGraphMakieExt if isdefined(Base, :get_extension) import GraphMakie using GraphMakie: Makie, NetworkLayout else import ..GraphMakie using ..GraphMakie: Makie, NetworkLayout end using Crystalline using Crystalline: GroupRelationGraph, SG_PRIMITIVE_ORDERs, SUPERGROUP using Graphs, StaticArrays, LinearAlgebra using LayeredLayouts: solve_positions, Zarate ## -------------------------------------------------------------------------------------- ## # Visualize graph of maximal subgroups a particular group (descendants of `g`) # ----------------- function map_numbers_to_oneto(xs; rev::Bool=false) uxs = sort!(unique(xs); rev) idxss = [findall(==(x), xs) for x in uxs] ys = Vector{Int}(undef, length(xs)) for (y,idxs) in enumerate(idxss) ys[idxs] .= y end return ys end # TODO: generalize to groups besides `SpaceGroup`? function layout_by_order(gr::GroupRelationGraph{D,SpaceGroup{D}}; ymap=map_numbers_to_oneto) where D orders = SG_PRIMITIVE_ORDERs[D][gr.nums] N = length(orders) yposs = ymap(orders) xposs = Vector{Float64}(undef, N) maxwidth = maximum([length(findall(==(o), orders)) for o in unique(orders)]) for o in unique(orders) idxs = findall(==(o), orders) xposs[idxs] = ((1:length(idxs)) .- (1 + (length(idxs)-1)/2)) .* (maxwidth / length(idxs)) end return Makie.Point2f.(xposs, yposs), orders end # use a spring layout in x-coordinates, fixing y-coordinates, via NetworkLayout.jl/pull/52 function layout_by_order_spring(gr::GroupRelationGraph{D,SpaceGroup{D}}; ymap=map_numbers_to_oneto) where D xy, orders = layout_by_order(gr; ymap) orderslim = extrema(orders) # to use `pin` in this manner we require NetworkLayout ≥v0.4.5 pin = Dict(i=>(false, true) for i in eachindex(xy)) algo = NetworkLayout.Spring(; initialpos=xy, pin, initialtemp=1.0) xy′ = algo(gr) return xy′, orders end function layout_by_minimal_crossings(gr::GroupRelationGraph{D,SpaceGroup{D}}; force_layer_bool=true) where D orders = SG_PRIMITIVE_ORDERs[D][gr.nums] is_supergroup_relations = gr.direction==SUPERGROUP # if true, must flip y-ordering twice force_layer = if force_layer_bool layers′ = map_numbers_to_oneto(orders; rev = is_supergroup_relations) maxlayer = maximum(layers′) 1:length(orders) .=> (maxlayer+1) .- layers′ else Pair{Int, Int}[] end # `solve_positions` implicitly assumes `SimpleGraph`/`SimpleDiGraph` type graphs, so we # must first convert `gr` to `gr′::SimpleDiGraph` gr′ = SimpleDiGraphFromIterator(edges(gr)) xs, ys, _ = solve_positions(Zarate(), gr′; force_layer) is_supergroup_relations && (xs .= -xs) # re-reverse the ordering return Makie.Point2f.(ys, -xs), orders end # ----------------- function prettystring(x::Rational) io = IOBuffer() show(io, numerator(x)) isone(denominator(x)) && return String(take!(io)) print(io, "/") show(io, denominator(x)) return String(take!(io)) end function rationalizedstring(x) s = sprint(show, prettystring.(rationalize.(x))) return replace(s, "\""=>"") end function stringify_relations(gr::GroupRelationGraph, e::Edge) s, d = src(e), dst(e) snum, dnum = gr.nums[s], gr.nums[d] info = gr.infos[snum] didx = findfirst(child->child.num==(dnum), info.children) isnothing(didx) && error("edge destination not contained in graph") Pps = info[didx] if length(Pps.classes) > 1 return "multiple conjugacy classes" else Pp = only(Pps.classes) P, p = Pp.P, Pp.p if isone(P) if iszero(p) return "identity" # trivial mapping else return "p = "*rationalizedstring(p) # translation mapping end else return "P = "*rationalizedstring(P) * # rotation mapping (iszero(p) ? "" : ", p = "*rationalizedstring(p)) end end end """ plot!(ax, gr::GroupRelationGraph{D}; layout) Visualize the graph structure of `gr`. If the Makie backend is GLMakie, the resulting plot will be interactive (on hover and drag). See also `Makie.plot`. ## Keyword arguments - `layout`: `:strict`, `:quick`, or `:spring`. By default, `:strict` is chosen for Graphs with less than 40 edges and less than 20 vertices, otherwise `:spring`. - `:strict`: a Sugiyama-style DAG layout algorithm, which rigorously minimizes the number of edge crossings in the graph layout. Performs well for relatively few edges, but very poorly otherwise. - `:quick`: distributes nodes in each layer horizontally, with node randomly assigned relative node positions. - `:spring`: same as `:quick`, but with node positions in each layer relaxed using a layer-pinned spring layout. ## Example ```jl using Crystalline using GraphMakie, GLMakie gr = maximal_subgroups(202) plot(gr) ``` Note that `plot(gr)` is conditionally defined only upon loading of GraphMakie; additionally, a backend for Makie must be explicitly loaded (here, GLMakie). """ function Makie.plot!( ax::Makie.Axis, gr::GroupRelationGraph{D}; layout::Symbol=(Graphs.ne(gr) ≤ 40 && Graphs.nv(gr) ≤ 20) ? :strict : :spring ) where D mapping_strings = stringify_relations.(Ref(gr), edges(gr)) # --- compute layout of vertices --- xy, orders = layout == :strict ? layout_by_minimal_crossings(gr; force_layer_bool=true) : layout == :spring ? layout_by_order_spring(gr) : layout == :quick ? layout_by_order(gr) : error("invalid `layout` keyword argument (valid: `:strict`, `:spring`, `:quick`)") # --- graphplot --- p = GraphMakie.graphplot!(ax, gr; nlabels = string.(gr.nums), nlabels_distance = 6, nlabels_align = (:center, :bottom), nlabels_textsize = 20, nlabels_attr=(;strokecolor=:white, strokewidth=2.5), node_color = Makie.RGBf(.2, .5, .3), edge_color = fill(Makie.RGBf(.5, .5, .5), ne(gr)), edge_width = fill(2.0, ne(gr)), node_size = fill(10, nv(gr)), arrow_size = 0, elabels = fill("", ne(gr)), elabels_textsize = 16, elabels_distance = 15) p[:node_pos][] = xy # update layout of vertices # --- group "order" y-axis --- Makie.hidespines!(ax, :r, :b, :t) # remove other axes spines Makie.hidexdecorations!(ax, grid = true) unique_yidxs = unique(i->xy[i][2], eachindex(xy)) unique_yvals = [xy[i][2] for i in unique_yidxs] unique_yorders = [string(orders[i]) for i in unique_yidxs] ax.yticks = (unique_yvals, unique_yorders) ax.ylabel = "group order (primitive)" ax.ylabelsize = 18 ax.ygridvisible = false ax.ytrimspine = true # --- enable interactions --- # (following http://juliaplots.org/GraphMakie.jl/stable/generated/depgraph/) Makie.deregister_interaction!(ax, :rectanglezoom) Makie.register_interaction!(ax, :edrag, GraphMakie.EdgeDrag(p)) Makie.register_interaction!(ax, :ndrag, GraphMakie.NodeDrag(p)) es = collect(edges(gr)) function node_hover_action(state, idx, event, axis) num = gr.nums[idx] iuclabel = iuc(num, D) p.nlabels[][idx] = string(num) * (state ? " (" * iuclabel * ")" : "") p.node_size[][idx] = state ? 17 : 10 p.nlabels[] = p.nlabels[]; p.node_size[] = p.node_size[]; # trigger observables # highlight edge descendants of highlighted nodes nidxs = Int[idx] i = 1 while i ≤ length(nidxs) s = nidxs[i] for d in gr.fadjlist[s] e = Edge(s, d) eidx = something(findfirst(==(e), es)) p.edge_width[][eidx] = state ? 2.75 : 2.0 p.edge_color[][eidx] = state ? Makie.RGBf(.35, .35, .7) : Makie.RGBf(.5, .5, .5) d ∈ nidxs || push!(nidxs, d) end i += 1 end p.edge_width[] = p.edge_width[]; p.edge_color[] = p.edge_color[] end nodehover = GraphMakie.NodeHoverHandler(node_hover_action) Makie.register_interaction!(ax, :nodehover, nodehover) function edge_hover_action(state, idx, event, axis) p.elabels[][idx] = state ? mapping_strings[idx] : "" # edge text p.edge_width[][idx] = state ? 4.0 : 2.0 # edge width p.elabels[] = p.elabels[]; p.edge_width[] = p.edge_width[] # trigger observable end edgehover = GraphMakie.EdgeHoverHandler(edge_hover_action) Makie.register_interaction!(ax, :edgehover, edgehover) return p end function Makie.plot(gr::GroupRelationGraph; axis = NamedTuple(), figure = NamedTuple(), kws...) f = Makie.Figure(size=(800,900); figure...) f[1,1] = ax = Makie.Axis(f; axis...) p = Makie.plot!(ax, gr; kws...) return Makie.FigureAxisPlot(f, ax, p) end end # module CrystallineGraphMakieExt
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
14040
module CrystallinePyPlotExt # Preamble -------------------------------------------------------------------------------- if isdefined(Base, :get_extension) using PyPlot using PyPlot: plot3D, plt import PyPlot: plot else using ..PyPlot using ..PyPlot: plot3D, plt import ..PyPlot: plot end using Crystalline using Crystalline: AbstractFourierLattice, AbstractVec, calcfouriergridded # extend rather than define so it can be called externally via `Crystalline.(...)` import Crystalline: _create_isosurf_plot_data using Meshing: MarchingCubes, isosurface using Statistics: quantile using StaticArrays: SVector export mesh_3d_levelsetlattice # Defaults -------------------------------------------------------------------------------- const ORIGIN_MARKER_OPTS = (marker="o", markerfacecolor="white", markeredgecolor="black", markeredgewidth=1.5, markersize=4.5) # ::DirectBasis --------------------------------------------------------------------------- function plot(Rs::AbstractBasis{D}, cntr::SVector{D, <:Real}=zeros(SVector{D, Float64}), ax=plt.axes(projection = D==3 ? (using3D(); "3d") : "rectilinear")) where D Rs′ = Rs .+ Ref(cntr) # basis vectors translated by cntr if D == 1 ax.plot((cntr[1], Rs′[1]), (0, 0)) ax.plot((cntr[1],), (0,); ORIGIN_MARKER_OPTS...) # origin elseif D == 2 corner = sum(Rs) + cntr for R′ in Rs′ ax.plot((cntr[1], R′[1]), (cntr[2], R′[2]); color="black") # basis vectors ax.plot((R′[1], corner[1]), (R′[2], corner[2]); color="grey") # remaining unit cell boundaries end ax.plot((cntr[1],), (cntr[2],); ORIGIN_MARKER_OPTS...) # origin elseif D == 3 corners = (Rs[1]+Rs[3], Rs[1]+Rs[2], Rs[2]+Rs[3]) .+ Ref(cntr) dirs = ((-1,1,-1), (-1,-1,1), (1,-1,-1)) for R′ in Rs′ ax.plot3D((cntr[1], R′[1]), (cntr[2], R′[2]), (cntr[3], R′[3]); color="black") # basis vectors end for (i,R) in enumerate(Rs) for (corner,dir) in zip(corners,dirs) # remaining unit cell boundaries ax.plot3D((corner[1], corner[1]+dir[i]*R[1]), (corner[2], corner[2]+dir[i]*R[2]), (corner[3], corner[3]+dir[i]*R[3]); color="grey") end end ax.plot3D((cntr[1],), (cntr[2],), (cntr[3],); ORIGIN_MARKER_OPTS...) # origin ax.set_zlabel("z") end ax.set_xlabel("x"); ax.set_ylabel("y") # seems broken in 3D (https://github.com/matplotlib/matplotlib/pull/13474); # FIXME: may raise an error in later matplotlib releases # ax.set_aspect("equal", adjustable="box") # actually, seems fixed after https://github.com/matplotlib/matplotlib/pull/23409 # but will error on some matplotlib versions, so should be behind a version guard return ax end # ::AbstractFourierLattice ---------------------------------------------------------------- """ plot(flat::AbstractFourierLattice, Rs::DirectBasis) Plots a lattice `flat::AbstractFourierLattice` with lattice vectors given by `Rs::DirectBasis`. Possible kwargs are (defaults in brackets) - `N`: resolution [`100` in 2D, `20` in 3D] - `filling`: determine isovalue from relative filling fraction [`0.5`] - `isoval`: isovalue [nothing (inferred from `filling`)] - `repeat`: if not `nothing`, repeats the unit cell an integer number of times [`nothing`] - `fig`: figure handle to plot [`nothing`, i.e. opens a new figure] If both `filling` and `isoval` kwargs simultaneously not equal to `nothing`, then `isoval` takes precedence. ## Examples Compute a modulated `FourierLattice` for a lattice in plane group 16 and plot it via PyPlot.jl: ```julia-repl julia> using Crystalline, PyPlot julia> flat = modulate(levelsetlattice(16, Val(2))) julia> Rs = directbasis(16, Val(2)) julia> plot(flat, Rs) ``` """ function plot(flat::AbstractFourierLattice, Rs::DirectBasis{D}; N::Integer=(D==2 ? 100 : 20), filling::Union{Real, Nothing}=0.5, isoval::Union{Real, Nothing}=nothing, repeat::Union{Integer, Nothing}=nothing, fig=nothing, ax=nothing) where D xyz, vals, isoval = _create_isosurf_plot_data(flat; N, filling, isoval) plotiso(xyz, vals, isoval, Rs, repeat, fig, ax) return xyz, vals, isoval end function _create_isosurf_plot_data( flat::AbstractFourierLattice{D}; N::Integer=(D==2 ? 100 : 20), filling::Union{Real, Nothing}=0.5, isoval::Union{Real, Nothing}=nothing) where D xyz = range(-.5, .5, length=N) vals = calcfouriergridded(xyz, flat, N) if isnothing(isoval) isnothing(filling) && error(ArgumentError("`filling` and `isoval` cannot both be `nothing`")) # we don't want to "double count" the BZ edges - so to avoid that, exclude the last # index of each dimension (same approach as in `MPBUtils.filling2isoval`) isoidxs = Base.OneTo(N-1) vals′ = if D == 2; (@view vals[isoidxs, isoidxs]) elseif D == 3; (@view vals[isoidxs, isoidxs, isoidxs]) end isoval = quantile(Iterators.flatten(vals′), filling) end return xyz, vals, isoval end # plot isocontour of data function plotiso(xyz, vals, isoval::Real, Rs::DirectBasis{D}, repeat::Union{Integer, Nothing}=nothing, fig=nothing, ax=nothing) where D # If `fig` is nothing and `ax`` is nothing, we make a figure and add a subplot # If `fig` is nothing but `ax`` is not nothing, we plot directly into the provided axis # If `fig` is not nothing but `ax`` is nothing, we add an axis to the provided figure if isnothing(ax) if isnothing(fig) fig = plt.figure() end ax = fig.add_subplot(projection= D==3 ? (using3D(); "3d") : "rectilinear") end if D == 2 # convert to a cartesian coordinate system rather than direct basis of Ri N = length(xyz) X = broadcast((x,y) -> x*Rs[1][1] + y*Rs[2][1], reshape(xyz,(1,N)), reshape(xyz, (N,1))) Y = broadcast((x,y) -> x*Rs[1][2] + y*Rs[2][2], reshape(xyz,(1,N)), reshape(xyz, (N,1))) # note: the x-vs-y ordering has to be funky this way, because plotting routines expect # x to vary across columns and y to vary across rows - sad :(. See also the # `calcfouriergridded` method. ax.contourf(X,Y,vals; levels=(-1e12, isoval, 1e12), cmap=plt.get_cmap("gray",2)) ax.contour(X,Y,vals,levels=(isoval,), colors="w", linestyles="solid") origo = sum(Rs)./2 plot(Rs, -origo, ax) # plot unit cell ax.scatter([0],[0], color="C4", s=30, marker="+") uc = (zeros(eltype(Rs)), Rs[1], Rs[1]+Rs[2], Rs[2]) .- Ref(origo) pad = (maximum(maximum.(uc)) .- minimum(minimum.(uc)))/25 xlims = extrema(getindex.(uc, 1)); ylims = extrema(getindex.(uc, 2)) if !isnothing(repeat) # allow repetitions of unit cell in 2D minval, maxval = extrema(vals) for r1 in -repeat:repeat for r2 in -repeat:repeat if r1 == r2 == 0; continue; end offset = Rs[1].*r1 .+ Rs[2].*r2 X′ = X .+ offset[1]; Y′ = Y .+ offset[2] ax.contourf(X′, Y′, vals; levels=(minval, isoval, maxval), cmap=plt.get_cmap("gray",256)) #get_cmap(coolwarm,3) is also good ax.contour(X′, Y′, vals; levels=(isoval,), colors="w", linestyles="solid") end end xd = -(-)(xlims...)*repeat; yd = -(-)(ylims...)*repeat plt.xlim(xlims .+ (-1,1).*xd .+ (-1,1).*pad) plt.ylim(ylims .+ (-1,1).*yd .+ (-1,1).*pad) else plt.xlim(xlims .+ (-1,1).*pad); plt.ylim(ylims .+ (-1,1).*pad); end ax.set_aspect("equal", adjustable="box") ax.set_axis_off() elseif D == 3 # TODO: Isocaps (when Meshing.jl supports it) #caps_verts′, caps_faces′ = mesh_3d_levelsetisocaps(vals, isoval, Rs) # Calculate a triangular meshing of the Fourier lattice using Meshing.jl verts′, faces′ = mesh_3d_levelsetlattice(vals, isoval, Rs) # TODO: All plot utilities should probably be implemented as PlotRecipies or similar # In principle, it would be good to plot the isosurface using Makie here; but it # just doesn't make sense to take on Makie as a dependency, solely for this purpose. # It seems more appropriate to let a user bother with that, and instead give some # way to extract the isosurface's verts and faces. Makie can then plot it with # using Makie # verts′, faces′ = Crystalline.mesh_3d_levelsetlattice(flat, isoval, Rs) # isomesh = convert_arguments(Mesh, verts′, faces′)[1] # scene = Scene() # mesh!(isomesh, color=:grey) # display(scene) # For now though, we just use matplotlib; the performance is awful though, since it # vector-renders each face (of which there are _a lot_). plot_trisurf(verts′[:,1], verts′[:,2], verts′[:,3], triangles = faces′ .- 1) plot(Rs, -sum(Rs)./2, ax) # plot the boundaries of the lattice's unit cell end return nothing end # Meshing utilities (for ::AbstractFourierLattice) ---------------------------------------- function mesh_3d_levelsetlattice(vals, isoval::Real, Rs::DirectBasis{3}) # marching cubes algorithm to find isosurfaces (using Meshing.jl) algo = MarchingCubes(iso=isoval, eps=1e-3) verts, faces = isosurface(vals, algo; origin = SVector(-0.5,-0.5,-0.5), widths = SVector(1.0,1.0,1.0)) # transform to Cartesian basis & convert from N-vectors of 3-vectors to N×3 matrices verts′, faces′ = _mesh_to_cartesian(verts, faces, Rs) return verts′, faces′ end function mesh_3d_levelsetlattice(flat::AbstractFourierLattice, isoval::Real, Rs::DirectBasis{3}) # marching cubes algorithm to find isosurfaces (using Meshing.jl) algo = MarchingCubes(iso=isoval, eps=1e-3) verts, faces = isosurface(flat, algo; origin = SVector(-0.5,-0.5,-0.5), widths = SVector(1.0,1.0,1.0)) # transform to Cartesian basis & convert from N-vectors of 3-vectors to N×3 matrices verts′, faces′ = _mesh_to_cartesian(verts, faces, Rs) return verts′, faces′ end function _mesh_to_cartesian(verts::AbstractVector, faces::AbstractVector, Rs::AbstractBasis{3}) Nᵛᵉʳᵗˢ = length(verts); Nᶠᵃᶜᵉˢ = length(faces) verts′ = Matrix{Float64}(undef, Nᵛᵉʳᵗˢ, 3) @inbounds @simd for j in (1,2,3) # Cartesian xyz-coordinates R₁ⱼ, R₂ⱼ, R₃ⱼ = Rs[1][j], Rs[2][j], Rs[3][j] for i in Base.OneTo(Nᵛᵉʳᵗˢ) # vertices verts′[i,j] = verts[i][1]*R₁ⱼ + verts[i][2]*R₂ⱼ + verts[i][3]*R₃ⱼ end end # convert `faces` from Nᶠᵃᶜᵉˢ-vector of 3-vectors to Nᶠᵃᶜᵉˢ×3 matrix faces′ = [faces[i][j] for i in Base.OneTo(Nᶠᵃᶜᵉˢ), j in (1,2,3)] return verts′, faces′ end #= # TODO: requires `using Contour.jl` function mesh_3d_levelsetisocaps(vals, isoval::Real, Rs::DirectBasis{3}) N = size(vals, 1) xyz = range(-.5, .5, length=N) # gotta do this for each side of the box; each opposing side is equivalent due to # translational invariance though - so just 3 sides to check patches = NTuple{3, Vector{Float64}}[] for ss = 1:3 vals_slice = ss == 1 ? vals[1,:,:] : (ss == 2 ? vals[:,1,:] : vals[:,:,1]) cnt=Contour.contour(xyz, xyz, vals_slice, isoval) for line in lines(cnt) e = coordinates(line) fixed_coords = fill(-0.5, length(e[1])) if ss == 1 # fixed x-side xs, ys, zs = fixed_coords, e... elseif ss == 2 # fixed y-side ys, xs, zs = fixed_coords, e... else # ss == 3 # fixed z-side zs, xs, ys = fixed_coords, e... end end push!(patches, (xs, ys, zs)) end # TODO: We need to construct a mesh out of the boundary lines now # TODO: We need to copy counter-facing sides end =# # ::KVec ---------------------------------------------------------------------------------- # Plotting a single `KVec` or `RVec` function plot(kv::AbstractVec{D}, ax=plt.axes(projection = D==3 ? (using3D(); "3d") : "rectilinear")) where D freeαβγ = freeparams(kv) nαβγ = count(freeαβγ) nαβγ == 3 && return ax # general point/volume (nothing to plot) _scatter = D == 3 ? ax.scatter3D : ax.scatter _plot = D == 3 ? ax.plot3D : ax.plot if nαβγ == 0 # point k = kv() _scatter(k...) elseif nαβγ == 1 # line k⁰, k¹ = kv(zeros(D)), kv(freeαβγ.*0.5) ks = [[k⁰[i], k¹[i]] for i in 1:D] _plot(ks...) elseif nαβγ == 2 && D > 2 # plane k⁰⁰, k¹¹ = kv(zeros(D)), kv(freeαβγ.*0.5) αβγ, j = (zeros(3), zeros(3)), 1 for i = 1:3 if freeαβγ[i] αβγ[j][i] = 0.5 j += 1 end end k⁰¹, k¹⁰ = kv(αβγ[1]), kv(αβγ[2]) # calling Poly3DCollection is not so straightforward: follow the advice # at https://discourse.julialang.org/t/3d-polygons-in-plots-jl/9761/3 verts = ([tuple(k⁰⁰...); tuple(k¹⁰...); tuple(k¹¹...); tuple(k⁰¹...)],) plane = PyPlot.PyObject(art3D).Poly3DCollection(verts, alpha = 0.15) PyPlot.PyCall.pycall(plane.set_facecolor, PyPlot.PyCall.PyAny, [52, 152, 219]./255) PyPlot.PyCall.pycall(ax.add_collection3d, PyPlot.PyCall.PyAny, plane) end return ax end # Plotting a vector of `KVec`s or `RVec`s function plot(vs::AbstractVector{<:AbstractVec{D}}) where D ax = plt.axes(projection= D==3 ? (using3D(); "3d") : "rectilinear") for v in vs plot(v, ax) end return ax end # Plotting a `LittleGroup` plot(lgs::AbstractVector{<:LittleGroup}) = plot(position.(lgs)) end # module CrystallinePyPlotExt
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
8542
module Crystalline # dependencies using LinearAlgebra using StaticArrays using DelimitedFiles using JLD2 using PrettyTables using Combinatorics # → `find_isomorphic_parent_pointgroup` in pointgroup.jl using Requires using Reexport using DocStringExtensions import Graphs using Base: OneTo, @propagate_inbounds import Base: getindex, setindex!, # → iteration/AbstractArray interface IndexStyle, size, copy, # ⤶ iterate, string, zero, readuntil, show, summary, *, +, -, ==, ImmutableDict, isone, one, convert, parent, sort! import LinearAlgebra: inv # include submodules include("SquareStaticMatrices.jl") using .SquareStaticMatrices # exports `SSqMatrix{D,T}` # include vendored SmithNormalForm.jl package from ../.vendor/ include("../.vendor/SmithNormalForm/src/SmithNormalForm.jl") using .SmithNormalForm import .SmithNormalForm: smith, Smith # TODO: remove explicit import when we update SmithNormalForm export smith, Smith # export, so that loading Crystalline effectively also provides SmithNormalForm @reexport using Bravais import Bravais: primitivize, conventionalize, cartesianize, transform, centering using Bravais: stack, all_centeringtranslations, centeringtranslation, centering_volume_fraction # included files and exports include("constants.jl") export MAX_SGNUM, MAX_SUBGNUM, MAX_MSGNUM, MAX_MSUBGNUM, ENANTIOMORPHIC_PAIRS include("utils.jl") # useful utility methods (seldom needs exporting) export splice_kvpath, interpolate_kvpath include("types.jl") # defines useful types for space group symmetry analysis export SymOperation, # types DirectBasis, ReciprocalBasis, Reality, REAL, PSEUDOREAL, COMPLEX, Collection, MultTable, LGIrrep, PGIrrep, SiteIrrep, KVec, RVec, BandRep, BandRepSet, SpaceGroup, PointGroup, LittleGroup, CharacterTable, # operations on ... matrix, xyzt, # ::AbstractOperation rotation, translation, issymmorph, # ::SymOperation num, order, operations, # ::AbstractGroup klabel, characters, # ::AbstractIrrep classcharacters, label, reality, group, ⊕, israyrep, # ::LGIrrep isspecial, dim, parts, # ::KVec & RVec irreplabels, klabels, # ::BandRep & ::BandRepSet isspinful include("types_symmetryvectors.jl") export SymmetryVector, NewBandRep, CompositeBandRep export irreps, multiplicities, occupation include("notation.jl") export schoenflies, iuc, centering, seitz, mulliken include("subperiodic.jl") export SubperiodicGroup include("magnetic/notation-data.jl") include("magnetic/types.jl") export MSymOperation, MSpaceGroup include("tables/rotation_translation.jl") include("tables/groups/pointgroup.jl") include("tables/groups/spacegroup.jl") include("tables/groups/subperiodicgroup.jl") include("tables/groups/mspacegroup.jl") include("tables/generators/pointgroup.jl") include("tables/generators/spacegroup.jl") include("tables/generators/subperiodicgroup.jl") include("assembly/groups/pointgroup.jl") include("assembly/groups/spacegroup.jl") include("assembly/groups/subperiodicgroup.jl") include("assembly/groups/mspacegroup.jl") export pointgroup, spacegroup, subperiodicgroup, mspacegroup include("assembly/generators/pointgroup.jl") include("assembly/generators/spacegroup.jl") include("assembly/generators/subperiodicgroup.jl") export generate, generators include("show.jl") # printing of structs from src/[types.jl, types_symmetry_vectors.jl] include("orders.jl") include("symops.jl") # symmetry operations for space, plane, and line groups export @S_str, compose, issymmorph, littlegroup, orbit, reduce_ops, issubgroup, isnormal include("conjugacy.jl") # construction of conjugacy classes export classes, is_abelian include("wyckoff.jl") # wyckoff positions and site symmetry groups export wyckoffs, WyckoffPosition, multiplicity, SiteGroup, sitegroup, sitegroups, cosets, findmaximal, siteirreps include("symeigs2irrep.jl") # find irrep multiplicities from symmetry eigenvalue data export find_representation include("pointgroup.jl") # symmetry operations for crystallographic point groups export pgirreps, PG_IUCs, find_isomorphic_parent_pointgroup include("irreps_reality.jl") export realify, realify!, calc_reality # Large parts of the functionality in special_representation_domain_kpoints.jl should not be # in the core module, but belongs in a build file or similar. For now, the main goal of the # file hasn't been achieved and the other methods are non-essential. So, we skip it. #= # TODO: The `const ΦNOTΩ_KVECS_AND_MAPS = _ΦnotΩ_kvecs_and_maps_imdict()` call takes 15 s # precompile. It is a fundamentally awful idea to do it this way. using CSV # → special_representation_domain_kpoints.jl include("special_representation_domain_kpoints.jl") export ΦnotΩ_kvecs =# include("littlegroup_irreps.jl") export lgirreps, littlegroups include("lattices.jl") export ModulatedFourierLattice, getcoefs, getorbits, levelsetlattice, modulate, normscale, normscale! include("compatibility.jl") export subduction_count include("bandrep.jl") export bandreps, classification, nontrivial_factors, basisdim include("calc_bandreps.jl") export calc_bandreps include("deprecations.jl") export get_littlegroups, get_lgirreps, get_pgirreps, WyckPos, kvec, wyck, kstar include("grouprelations/grouprelations.jl") export maximal_subgroups, minimal_supergroups # some functions are extensions of base-owned names; we need to (re)export them in order to # get the associated docstrings listed by Documeter.jl export position, inv, isapprox # ---------------------------------------------------------------------------------------- # # EXTENSIONS AND JLD-FILE INITIALIZATION if !isdefined(Base, :get_extension) using Requires # load extensions via Requires.jl on Julia versions <v1.9 end # define functions we want to extend and have accessible via `Crystalline.(...)` if an # extension is loaded function _create_isosurf_plot_data end # implemented on CrystallinePyPlotExt load ## __init__ # - open .jld2 data files, so we don't need to keep opening/closing them # - optional code-loading, using Requires. # store the opened jldfiles in `Ref{..}`s for type-stability's sake (need `Ref` since we # need to mutate them in `__init__` but cannot use `global const` in a function, cf. # https://github.com/JuliaLang/julia/issues/13817) const LGIRREPS_JLDFILES = ntuple(_ -> Ref{JLD2.JLDFile{JLD2.MmapIO}}(), Val(3)) const LGS_JLDFILES = ntuple(_ -> Ref{JLD2.JLDFile{JLD2.MmapIO}}(), Val(3)) const PGIRREPS_JLDFILE = Ref{JLD2.JLDFile{JLD2.MmapIO}}() const DATA_DIR = joinpath(dirname(@__DIR__), "data") function __init__() # open `LGIrrep` and `LittleGroup` data files for read access on package load (this # saves a lot of time compared to `jldopen`ing each time we call e.g. `lgirreps`, # where the time for opening/closing otherwise dominates) for D in (1,2,3) global LGIRREPS_JLDFILES[D][] = JLD2.jldopen(DATA_DIR*"/irreps/lgs/$(D)d/irreps_data.jld2", "r") global LGS_JLDFILES[D][] = JLD2.jldopen(DATA_DIR*"/irreps/lgs/$(D)d/littlegroups_data.jld2", "r") end global PGIRREPS_JLDFILE[] = # only has 3D data; no need for tuple over dimensions JLD2.jldopen(DATA_DIR*"/irreps/pgs/3d/irreps_data.jld2", "r") # ensure we close files on exit atexit(() -> foreach(jldfile -> close(jldfile[]), LGIRREPS_JLDFILES)) atexit(() -> foreach(jldfile -> close(jldfile[]), LGS_JLDFILES)) atexit(() -> close(PGIRREPS_JLDFILE[])) # load extensions via Requires.jl on Julia versions <v1.9 @static if !isdefined(Base, :get_extension) @require PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee" begin include("../ext/CrystallinePyPlotExt.jl") # loads PyPlot and Meshing export mesh_3d_levelsetlattice end @require GraphMakie = "1ecd5474-83a3-4783-bb4f-06765db800d2" begin include("../ext/CrystallineGraphMakieExt.jl") end end end # precompile statements if Base.VERSION >= v"1.4.2" include("precompile.jl") _precompile_() end end # module
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
5776
module SquareStaticMatrices # This module defines `SqSMatrix{D,T}` an analogue of `SMatrix{D,D,T,D*D}` that only needs # a single dimensional type parameter, avoiding the redundant type parameter `L=D*D`. # This is desirable if we want to have a square static matrix in some struct but want to # avoid dragging the redundant `L` parameter around *everywhere*. # The trick here is to store the matrix as a nested `NTuple{D,NTuple{D,T}}` rather than as # `NTuple{D*D, T}` as in StaticArrays. # The performance is pretty much on par with an `SMatrix` (e.g. there are no allocations), # only very slightly slower because we didn't bother to implemented certain things as # generated functions. Other than that, the memory layout should be essentially the same. # Some relevant discussion of related problems is e.g.: # https://github.com/JuliaLang/julia/issues/18466 # https://discourse.julialang.org/t/addition-to-parameter-of-parametric-type/20059 using LinearAlgebra: checksquare using Base: @propagate_inbounds using StaticArrays: StaticMatrix import StaticArrays: SMatrix, MMatrix import Base: convert, size, getindex, firstindex, lastindex, eachcol, one, zero, IndexStyle, copy export SqSMatrix # ---------------------------------------------------------------------------------------- # # struct definition # an equivalent of `SMatrix{D,D,T}`, but requiring only a single dimension type # parameter, rather than two struct SqSMatrix{D, T} <: StaticMatrix{D, D, T} cols::NTuple{D, NTuple{D, T}} # tuple of columns (themselves stored as tuples) end # ---------------------------------------------------------------------------------------- # # AbstractArray interface eachcol(A::SqSMatrix) = A.cols @propagate_inbounds function getindex(A::SqSMatrix{D}, idx::Int) where D @boundscheck 1 ≤ idx ≤ D*D || throw(BoundsError(A, (idx,))) j, i = (idx+D-1)÷D, mod1(idx, D) return @inbounds A.cols[j][i] end @propagate_inbounds function getindex(A::SqSMatrix{D}, i::Int, j::Int) where D @boundscheck (1 ≤ i ≤ D && 1 ≤ j ≤ D) || throw(BoundsError(A, (i,j))) return @inbounds A.cols[j][i] end IndexStyle(::Type{<:SqSMatrix}) = IndexCartesian() copy(A::SqSMatrix) = A # cf. https://github.com/JuliaLang/julia/issues/41918 # ---------------------------------------------------------------------------------------- # # constructors and converters @propagate_inbounds @inline function convert(::Type{SqSMatrix{D, T}}, A::AbstractMatrix) where {D,T} # TODO: this could be a little bit faster if we used a generated function as they do in # for the StaticArrays ` unroll_tuple(a::AbstractArray, ::Length{L})` method... @boundscheck checksquare(A) == D cols = ntuple(Val{D}()) do j ntuple(i->convert(T, @inbounds A[i,j]), Val{D}()) end SqSMatrix{D,T}(cols) end # allow an NTuple{D,NTuple{D,T}} to be converted automatically to SqSMatrix{D,T} if relevant function convert(::Type{SqSMatrix{D, T}}, cols::NTuple{D, NTuple{D, T}}) where {D,T} SqSMatrix{D,T}(cols) end @propagate_inbounds SqSMatrix{D,T}(A::AbstractMatrix) where {D,T} = convert(SqSMatrix{D,T}, A) @propagate_inbounds SqSMatrix{D}(A::AbstractMatrix{T}) where {D,T} = convert(SqSMatrix{D,T}, A) @propagate_inbounds function SqSMatrix(A::AbstractMatrix{T}) where T D = checksquare(A) @inbounds SqSMatrix{D}(A::AbstractMatrix{T}) end SqSMatrix{D,T}(A::SqSMatrix{D,T}) where {D,T} = A # resolve an ambiguity (StaticMatrix vs. AbstractMatrix) SqSMatrix(A::SqSMatrix) = A # resolve another ambiguity function flatten_nested(cols::NTuple{D, NTuple{D, T}}) where {D,T} ntuple(Val{D*D}()) do idx i, j = (idx+D-1)÷D, mod1(idx, D) @inbounds cols[i][j] end end flatten(A::SqSMatrix{D,T}) where {D,T} = flatten_nested(A.cols) # equivalent recursive implementation (equal performance for small N but much worse for large N) # flatten_nested(cols::NTuple{N, NTuple{N, T}}) where {N,T} = flatten_nested(cols...) # flatten_nested(x) = x # flatten_nested(x,y) = (x...,y...) # flatten_nested(x,y,z...) = (x..., flatten_nested(y, z...)...) for M in (:SMatrix, :MMatrix) @eval $M(A::SqSMatrix{D, T}) where {D,T} = $M{D, D, T}(flatten(A)) end # use a generated function to stack a "square" NTuple very efficiently: allows efficient # conversion from an `SMatrix` to an `SqSmatrix` @generated function stack_square_tuple(xs::NTuple{N, T}) where {N,T} D = isqrt(N) if D*D != N return :(throw(DomainError($N, "called with tuple of non-square length $N"))) else exs=[[:(xs[$i+($j-1)*$D]) for i in 1:D] for j in 1:D] quote Base.@_inline_meta @inbounds return $(Expr(:tuple, (map(ex->Expr(:tuple, ex...), exs))...)) end end end @inline function convert(::Type{SqSMatrix{D,T}}, A::Union{SMatrix{D,D,T}, MMatrix{D,D,T}}) where {D,T} SqSMatrix{D,T}(@inbounds stack_square_tuple(A.data)) end SqSMatrix(A::SMatrix{D,D,T}) where {D,T} = convert(SqSMatrix{D,T}, A) SqSMatrix{D,T}(A::SMatrix{D,D,T′}) where {D,T,T′} = convert(SqSMatrix{D,T}, convert(SMatrix{D,D,T}, A)) # resolve ambiguity in convert due to interaction w/ StaticArray's `StaticMatrix` subtyping: convert(::Type{SqSMatrix{D, T}}, A::SqSMatrix{D, T}) where {D, T} = A # ---------------------------------------------------------------------------------------- # # linear algebra and other methods # by the magic of julia's compiler, this reduces to the exact same machine code as if we # were writing out ntuples ourselves (i.e. the initial construction as an SMatrix is # optimized out completely) for f in (:zero, :one) @eval $f(::Type{SqSMatrix{D,T}}) where {D,T} = SqSMatrix{D,T}($f(SMatrix{D,D,T})) @eval $f(::SqSMatrix{D,T}) where {D, T} = $f(SqSMatrix{D,T}) end end # module
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
12369
# conversion between delimited text files and array representations dlm2array(io::IO) = DelimitedFiles.readdlm(io, '|', String, '\n') dlm2array(str::String) = dlm2array(IOBuffer(str)) # utilities for creation of BandRep and BandRepSet function dlm2struct(str::Union{String,IO}, sgnum::Integer, allpaths::Bool=false, spinful::Bool=false, timereversal::Bool=true) M = dlm2array(str); array2struct(M, sgnum, allpaths, spinful, timereversal) end function array2struct(M::Matrix{String}, sgnum::Integer, allpaths::Bool=false, spinful::Bool=false, timereversal::Bool=true) klist = permutedims(mapreduce(x->String.(split(x,":")), hcat, M[4:end,1])) # 1ˢᵗ col is labels, 2ⁿᵈ col is coordinates as strings klabs, kvs = (@view klist[:,1]), KVec.(@view klist[:,2]) temp = split_paren.(@view M[1,2:end]) wyckpos, sitesym = getindex.(temp, 1), getindex.(temp, 2) # wyckoff position and site symmetry point group of bandrep temp .= split_paren.(@view M[2,2:end]) # same size, so reuse array label, dim = getindex.(temp, 1), parse.(Int, getindex.(temp, 2)) # label of bandrep # whether M contains info on decomposability; we don't use this anymore, but need to # know to parse the rest of the contents correctly (we used to always include this info # but might not in the future; so protect against this) has_decomposable_info = M[3,1] == "Decomposable" # decomposable = parse.(Bool, vec(@view M[3,2:end])) # whether BR can be BR-decomposed # set of irreps that jointly make up the bandrep brtags = collect(eachcol(@view M[3+has_decomposable_info:end, 2:end])) for br in brtags br .= replace.(br, Ref(r"\([1-9]\)"=>"")) # get rid of irrep dimension info end # A BandRepSet can either reference single-valued or double-valued irreps, not both; # thus, we "throw out" one of the two here, depending on `spinful`. if spinful # double-valued irreps only (spinful systems) delidxs = findall(map(!isspinful, brtags)) else # single-valued irreps only (spinless systems) delidxs = findall(map(isspinful, brtags)) end for vars in (brtags, wyckpos, sitesym, label, dim) deleteat!(vars, delidxs) end irlabs, irvecs = get_irrepvecs(brtags) BRs = BandRep.(wyckpos, sitesym, label, dim, map(isspinful, brtags), irvecs, Ref(irlabs)) return BandRepSet(sgnum, BRs, kvs, klabs, irlabs, spinful, timereversal) end function get_irrepvecs(brtags) Nklabs = length(first(brtags)) # there's equally many (composite) irrep tags in each band representation irlabs = Vector{String}() for kidx in OneTo(Nklabs) irlabs_at_kidx = Vector{String}() for tag in getindex.(brtags, kidx) # tag could be a combination like Γ1⊕2Γ₂ (or something simpler, like Γ₁) for irrep in split(tag, '⊕') irrep′ = filter(!isdigit, irrep) # filter off any multiplicities if irrep′ ∉ irlabs_at_kidx push!(irlabs_at_kidx, irrep′) end end end sort!(irlabs_at_kidx) append!(irlabs, irlabs_at_kidx) end irvecs = [zeros(Int, length(irlabs)) for _ in OneTo(length(brtags))] for (bridx, tags) in enumerate(brtags) for (kidx,tag) in enumerate(tags) for irrep in split(tag, '⊕') # note this irrep tag may contain numerical prefactors! buf = IOBuffer(irrep) prefac_str = readuntil(buf, !isdigit) seek(buf, ncodeunits(prefac_str)) # go back to first non-digit position in buffer if isempty(prefac_str) prefac = Int(1) else prefac = parse(Int, prefac_str) end ir′ = read(buf, String) # the rest of the irrep buffer is the actual cdml label close(buf) iridx = findfirst(==(ir′), irlabs) # find position in irlabs vector irvecs[bridx][iridx] = prefac end end end return irlabs, irvecs end """ bandreps(sgnum::Integer, D::Integer=3; allpaths::Bool=false, spinful::Bool=false, timereversal::Bool=true) Returns the elementary band representations (EBRs) as a `BandRepSet` for space group `sgnum` and dimension `D`. ## Keyword arguments - `allpaths`: include a minimal sufficient set (`false`, default) or all (`true`) **k**-vectors. - `spinful`: single- (`false`, default) or double-valued (`true`) irreps, as appropriate for spinless and spinful particles, respectively. Only available for `D=3`. - `timereversal`: assume presence (`true`, default) or absence (`false`) of time-reversal symmetry. ## References 3D EBRs are obtained from the Bilbao Crystallographic Server's [BANDREP program](http://www.cryst.ehu.es/cgi-bin/cryst/programs/bandrep.pl); please reference the original research papers noted there if used in published work. """ function bandreps(sgnum::Integer, D::Integer=3; allpaths::Bool=false, spinful::Bool=false, timereversal::Bool=true) D ∉ (1,2,3) && _throw_invalid_dim(D) paths_str = allpaths ? "allpaths" : "maxpaths" brtype_str = timereversal ? "elementaryTR" : "elementary" filename = joinpath(DATA_DIR, "bandreps/$(D)d/$(brtype_str)/$(paths_str)/$(string(sgnum)).csv") open(filename) do io brs = dlm2struct(io, sgnum, allpaths, spinful, timereversal) end end """ $(TYPEDSIGNATURES) Return the nontrivial (i.e., ≠ {0,1}) elementary factors of an EBR basis, provided as a `BandRepSet` or `Smith` decomposition. """ function nontrivial_factors(F::Smith) Λ = F.SNF nontriv_idx = findall(is_not_one_or_zero, Λ) return Λ[nontriv_idx] end function nontrivial_factors(brs::BandRepSet) F = smith(stack(brs), inverse=false) return nontrivial_factors(F) end is_not_one_or_zero(x) = !(isone(x) || iszero(x)) """ classification(brs_or_F::Union{BandRepSet, Smith}) --> String Return the symmetry indicator group ``X^{\\text{BS}}`` of an EBR basis `F_or_brs`, provided as a `BandRepSet` or `Smith` decomposition. Technically, the calculation answers the question "what direct product of ``\\mathbb{Z}_n`` groups is the the quotient group ``X^{\\text{BS}} = \\{\\text{BS}\\}/\\{\\text{AI}\\}`` isomorphic to?" (see [Po, Watanabe, & Vishwanath, Nature Commun. **8**, 50 (2017)](https://doi.org/10.1038/s41467-017-00133-2) for more information). """ function classification(nontriv_Λ::AbstractVector{<:Integer}) if isempty(nontriv_Λ) return "Z₁" else return "Z"*subscriptify(join(nontriv_Λ, "×Z")) end end function classification(brs_or_F::Union{BandRepSet, Smith}) return classification(nontrivial_factors(brs_or_F)) end """ basisdim(brs::BandRepSet) --> Int Return the dimension of the (linearly independent parts) of a band representation set. This is ``d^{\\text{bs}} = d^{\\text{ai}}`` in the notation of [Po, Watanabe, & Vishwanath, Nature Commun. **8**, 50 (2017)](https://doi.org/10.1038/s41467-017-00133-2), or equivalently, the rank of `stack(brs)` over the ring of integers. This is the number of linearly independent basis vectors that span the expansions of a band structure viewed as symmetry data. """ function basisdim(brs::BandRepSet) Λ = smith(stack(brs)).SNF nnz = count(!iszero, Λ) # number of nonzeros in Smith normal diagonal matrix return nnz end """ wyckbasis(brs::BandRepSet) --> Vector{Vector{Int}} Computes the (band representation) basis for bands generated by localized orbitals placed at the Wyckoff positions. Any band representation that can be expanded on this basis with positive integer coefficients correspond to a trivial insulators (i.e. deformable to atomic limit). Conversely, bands that cannot are topological, either fragily (some negative coefficients) or strongly (fractional coefficients). """ function wyckbasis(brs::BandRepSet) # Compute Smith normal form: for an n×m matrix B with integer elements, # find matrices S, diagm(Λ), and T (of size n×n, n×m, and m×m, respectively) # with integer elements such that B = S*diagm(Λ)*T. Λ is a vector # [λ₁, λ₂, ..., λᵣ, 0, 0, ..., 0] with λⱼ₊₁ divisible by λⱼ and r ≤ min(n,m). # The matrices T and S have integer-valued pseudo-inverses. F = smith(stack(brs)) # Smith normal factorization with λⱼ ≥ 0 S, S⁻¹, Λ = F.S, F.Sinv, F.SNF #T, T⁻¹ = F.T, F.Tinv, nnz = count(!iszero, Λ) # number of nonzeros in Smith normal diagonal matrix nzidxs = OneTo(nnz) # If we apply S⁻¹ to a given set of (integer) symmetry data 𝐧, the result # should be the (integer) factors qᵢCᵢ (Cᵢ=Λᵢ here) discussed in Tang, Po, # [...], Nature Physics 15, 470 (2019). Conversely, the columns of S gives an integer- # coefficient basis for all gapped band structures, while the columns of S*diagm(Λ) # generates all atomic insulator band structures (assuming integer coefficients). # See also your notes in scripts/derive_sg2_bandrep.jl return S[:, nzidxs], diagm(F)[:,nzidxs], S⁻¹[:, nzidxs] end # misc minor utility functions isspinful(br::AbstractVector{T} where T<:AbstractString) = any(x->occursin(r"\\bar|ˢ", x), br) function split_paren(str::AbstractString) openpar = something(findfirst(==('('), str)) # index of the opening parenthesis before_paren = SubString(str, firstindex(str), prevind(str, openpar)) inside_paren = SubString(str, nextind(str, openpar), prevind(str, lastindex(str))) return before_paren, inside_paren end # TODO: Remove this (unexported method) """ matching_littlegroups(brs::BandRepSet, ::Val{D}=Val(3)) Finds the matching little groups for each *k*-point referenced in `brs`. This is mainly a a convenience accessor, since e.g. [`littlegroup(::SpaceGroup, ::KVec)`](@ref) could also return the required little groups. The benefit here is that the resulting operator sorting of the returned little group is identical to the operator sortings assumed in [`lgirreps`](@ref) and [`littlegroups`](@ref). Returns a `Vector{LittleGroup{D}}` (unlike [`littlegroups`](@ref), which returns a `Dict{String, LittleGroup{D}}`). ## Note 1 Unlike the operations returned by [`spacegroup`](@ref), the returned little groups do not include copies of operators that would be identical when transformed to a primitive basis. The operators are, however, still given in a conventional basis. """ function matching_littlegroups(brs::BandRepSet, ::Val{D}=Val(3)) where D lgs = littlegroups(num(brs), Val(D)) # TODO: generalize to D≠3 klabs_in_brs = klabels(brs) # find all k-point labels in BandRepSet if !issubset(klabs_in_brs, keys(lgs)) throw(DomainError(klabs_in_brs, "Could not locate all LittleGroups from BandRep")) end return getindex.(Ref(lgs), klabs_in_brs) end function matching_lgirreps(brs::BandRepSet) lgirsd = lgirreps(num(brs), Val(3)) # create "physical/real" irreps if `brs` assumes time-reversal symmetry if brs.timereversal for (klab, lgirs) in lgirsd lgirsd[klab] = realify(lgirs) end end # all lgirreps from ISOTROPY as a flat vector; note that sorting is arbitrary lgirs = collect(Iterators.flatten(values(lgirsd))) # TODO: generalize to D≠3 # find all the irreps in lgirs that feature in the BandRepSet, and # sort them according to BandRepSet's sorting lgirlabs = label.(lgirs) brlabs = normalizesubsup.(irreplabels(brs)) find_and_sort_idxs = Vector{Int}(undef, length(brlabs)) @inbounds for (idx, brlab) in enumerate(brlabs) matchidx = findfirst(==(brlab), lgirlabs) if matchidx !== nothing find_and_sort_idxs[idx] = matchidx else throw(DomainError(brlab, "could not be found in ISOTROPY dataset")) end end # find all the irreps _not_ in the BandRepSet; keep existing sorting not_in_brs_idxs = filter(idx -> idx∉find_and_sort_idxs, eachindex(lgirlabs)) # return: 1st element = lgirs ∈ BandRepSet (matching) # 2nd element = lgirs ∉ BandRepSet (not matching) return (@view lgirs[find_and_sort_idxs]), (@view lgirs[not_in_brs_idxs]) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
9291
using LinearAlgebra: dot, \ # The implementation here follows Cano et al., Phys. Rev. B 97, 035139 (2018) # (https://doi.org/10.1103/PhysRevB.97.035139), specifically, Sections II.C-D # ---------------------------------------------------------------------------------------- # """ reduce_dict_of_vectors([f=identity,] d::Dict{_, <:Vector}) --> Vector{T} Return the concatenated vector of all of vectors in `d` under the element-wise application of `f`. Effectively flattens a `Dict` of `Vector`s to a single `Vector`. Note that application of `f` to vector-elements of `d` must return a stable type `T`. """ function reduce_dict_of_vectors(f::F, d::Dict{<:Any, <:AbstractVector}) where F # get element type of application of `f` to elements of vectors in `d`; assumed fixed eltype = typeof(f(first(first(values(d))))) # get total number of elements across vectors in `d` N = sum(((_, v),) -> length(v), d) # preallocate output vector w = Vector{eltype}(undef, N) start = 1 for v in values(d) stop = start + length(v) - 1 @inbounds for (i, j) in enumerate(start:stop) w[j] = f(v[i]) end start = stop + 1 end return w end reduce_dict_of_vectors(d::Dict{<:Any, <:Vector}) = reduce_dict_of_vectors(identity, d) """ reduce_orbits!(orbits::Vector{WyckoffPosition}, cntr::Char, conv_or_prim::Bool=true]) Update `orbits` in-place to contain only those Wyckoff positions that are not equivalent in a primitive basis (as determined by the centering type `cntr`). Returns the updated `orbits`. If `conv_or_prim = true` (default), the Wyckoff positions are returned in the original, conventional basis; if `conv_or_prim = false`, they are returned in a primitive basis. """ function reduce_orbits!( orbits::AbstractVector{WyckoffPosition{D}}, cntr::Char, conv_or_prim::Bool=true ) where D orbits′ = primitivize.(orbits, cntr) i = 2 # start from second element while i ≤ length(orbits) wp′ = parent(orbits′[i]) was_removed = false for j in 1:i-1 δᵢⱼ = wp′ - parent(orbits′[j]) if (iszero(free(δᵢⱼ)) && all(x->abs(rem(x, 1.0, RoundNearest)) < DEFAULT_ATOL, constant(δᵢⱼ))) # -> means it's equivalent to a previously "greenlit" orbit deleteat!(orbits, i) deleteat!(orbits′, i) was_removed = true break end end was_removed || (i += 1) end return conv_or_prim ? orbits : orbits′ end # TODO: This is probably pretty fragile and depends on an implicit shared iteration order of # cosets and orbits; it also assumes that wp is the first position in the `orbits` # vector. Seems to be sufficient for now though... function reduce_cosets!(ops::Vector{SymOperation{D}}, wp::WyckoffPosition{D}, orbits::Vector{WyckoffPosition{D}}) where D wp ≈ first(orbits) || error("implementation depends on a shared iteration order; sorry...") i = 1 while i ≤ length(ops) && i ≤ length(orbits) wpᵢ = orbits[i] opᵢ = ops[i] if opᵢ*parent(wp) ≈ parent(wpᵢ) i += 1 # then opᵢ is indeed a "generator" of wpᵢ else deleteat!(ops, i) end end i ≤ length(ops) && deleteat!(ops, i:length(ops)) return ops end # ---------------------------------------------------------------------------------------- # # Bandrep related functions: induction/subduction """ induce_bandrep(siteir::SiteIrrep, h::SymOperation, kv::KVec) Return the band representation induced by the provided `SiteIrrep` evaluated at `kv` and for a `SymOperation` `h`. """ function induce_bandrep(siteir::SiteIrrep{D}, h::SymOperation{D}, kv::KVec{D}) where D siteg = group(siteir) wp = position(siteg) kv′ = constant(h*kv) # <-- TODO: Why only constant part? χs = characters(siteir) # only loop over the cosets/orbits that are not mere centering "copies" orbits = orbit(siteg) gαs = cosets(siteg) cntr = centering(num(siteg), D) reduce_orbits!(orbits, cntr, true) # remove centering "copies" from orbits reduce_cosets!(gαs, wp, orbits) # remove the associated cosets # sum over all the (non-centering-equivalent) wyckoff positions/cosets in the orbit χᴳₖ = zero(ComplexF64) for (wpα′, gα′) in zip(orbits, gαs) tα′α′ = constant(parent(h*wpα′) - parent(wpα′)) # TODO: <-- explain why we only need constant part here? opᵗ = SymOperation(-tα′α′) gα′⁻¹ = inv(gα′) gα′⁻¹ggα′ = compose(gα′⁻¹, compose(opᵗ, compose(h, gα′, false), false ), false) site_symmetry_index = findfirst(≈(gα′⁻¹ggα′), siteg) if site_symmetry_index !== nothing χᴳₖ += cis(2π*dot(kv′, tα′α′)) * χs[site_symmetry_index] # NB: The sign in this `cis(...)` above is different from in Elcoro's. # I think this is consistent with our overall sign convention (see #12), # however, and flipping the sign causes problems for the calculation of some # subductions to `LGIrrep`s, which would be consistent with this. I.e., # I'm fairly certain this is consistent and correct given our phase # conventions for `LGIrrep`s. end end return χᴳₖ end function subduce_onto_lgirreps( siteir::SiteIrrep{D}, lgirs::AbstractVector{LGIrrep{D}} ) where D lg = group(first(lgirs)) kv = position(lg) # characters of induced site representation and little group irreps site_χs = induce_bandrep.(Ref(siteir), lg, Ref(kv)) lgirs_χm = matrix(characters(lgirs)) # little group irrep multiplicities, after subduction m = lgirs_χm\site_χs m′ = round.(Int, real.(m)) # truncate to integers isapprox(m, m′, atol=DEFAULT_ATOL) || error(DomainError(m, "failed to convert to integers")) return m′ end # ---------------------------------------------------------------------------------------- # function calc_bandrep( siteir :: SiteIrrep{D}, lgirsv :: AbstractVector{<:AbstractVector{LGIrrep{D}}}, timereversal :: Bool ) where D multsv = [subduce_onto_lgirreps(siteir, lgirs) for lgirs in lgirsv] occupation = sum(zip(first(multsv), first(lgirsv)); init=0) do (m, lgir) m * irdim(lgir) end n = SymmetryVector(lgirsv, multsv, occupation) spinful = false # NB: default; Crystalline currently doesn't have spinful irreps return NewBandRep(siteir, n, timereversal, spinful) end function calc_bandrep( siteir :: SiteIrrep{D}; timereversal :: Bool=true, allpaths :: Bool=false ) where D lgirsd = lgirreps(num(siteir), Val(D)) allpaths || filter!(((_, lgirs),) -> isspecial(first(lgirs)), lgirsd) timereversal && realify!(lgirsd) lgirsv = [lgirs for lgirs in values(lgirsd)] return calc_bandrep(siteir, lgirsv, timereversal) end # ---------------------------------------------------------------------------------------- # """ calc_bandreps(sgnum::Integer, Dᵛ::Val{D}=Val(3); timereversal::Bool=true, allpaths::Bool=false) Compute the band representations of space group `sgnum` in dimension `D`, returning a `BandRepSet`. ## Keyword arguments - `timereversal` (default, `true`): whether the irreps used to induce the band representations are assumed to be time-reversal invariant (i.e., are coreps, see [`realify`](@ref)). - `allpaths` (default, `false`): whether the band representations are projected to all distinct **k**-points returned by `lgirreps` (`allpaths = false`), including high-symmetry **k**-lines and -plane, or only to the maximal **k**-points (`allpaths = true`), i.e., just to high-symmetry points. ## Notes All band representations associated with maximal Wyckoff positions are returned, irregardless of whether they are elementary (i.e., no regard is made to whether the band representation is "composite"). As such, the returned band representations generally are a superset of the set of elementary band representations (and so contain all elementary band representations). ## Implementation The implementation is based on Cano, Bradlyn, Wang, Elcoro, et al., [Phys. Rev. B **97**, 035139 (2018)](https://doi.org/10.1103/PhysRevB.97.035139), Sections II.C-D. """ function calc_bandreps( sgnum::Integer, Dᵛ::Val{D} = Val(3); timereversal::Bool = true, allpaths::Bool = false ) where D # get all the little group irreps that we want to subduce onto lgirsd = lgirreps(sgnum, Val(D)) allpaths || filter!(((_, lgirs),) -> isspecial(first(lgirs)), lgirsd) timereversal && realify!(lgirsd) lgirsv = [lgirs for lgirs in values(lgirsd)] # get the bandreps induced by every maximal site symmetry irrep sg = spacegroup(sgnum, Dᵛ) sitegs = findmaximal(sitegroups(sg)) brs = NewBandRep{D}[] for siteg in sitegs siteirs = siteirreps(siteg; mulliken=true) timereversal && (siteirs = realify(siteirs)) append!(brs, calc_bandrep.(siteirs, Ref(lgirsv), Ref(timereversal))) end return Collection(brs) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
5429
@doc raw""" subduction_count(Dᴳᵢ, Dᴴⱼ[, αβγᴴⱼ]) --> Int For two groups ``G`` and ``H``, where ``H`` is a subgroup of ``G``, i.e. ``H<G``, with associated irreducible representations `Dᴳᵢ` = ``D^G_i(g)`` and `Dᴴⱼ` = ``D^H_j(g)`` over operations ``g∈G`` and ``h∈H<G``, compute the compatibility relation between the two irreps from the subduction reduction formula (or "magic" formula/Schur orthogonality relation), returning how many times ``n^{GH}_{ij}`` the subduced representation ``D^G_i↓H`` contains the irrep ``D^H_j``; in other words, this gives the compatibility between the two irreps. Optionally, a vector `αβγᴴⱼ` may be provided, to evaluate the characters/irreps of `Dᴳᵢ` at a concrete value of ``(α,β,γ)``. This is e.g. meaningful for `LGIrrep`s at non-special **k**-vectors. Defaults to `nothing`. The result is computed using the reduction formula [see e.g. Eq. (15) of [arXiv:1706.09272v2](https://arxiv.org/abs/1706.09272)]: ``n^{GH}_{ij} = |H|^{-1} \sum_h \chi^G_i(h)\chi^H_j(h)^*`` ## Example Consider the two compatible **k**-vectors Γ (a point) and Σ (a line) in space group 207: ```jl lgirsd = lgirreps(207, Val(3)); Γ_lgirs = lgirsd["Γ"]; # at Γ ≡ [0.0, 0.0, 0.0] Σ_lgirs = lgirsd["Σ"]; # at Σ ≡ [α, α, 0.0] ``` We can test their compatibility via: ```jl [[subduction_count(Γi, Σj) for Γi in Γ_lgirs] for Σj in Σ_lgirs] > # Γ₁ Γ₂ Γ₃ Γ₄ Γ₅ > [ 1, 0, 1, 1, 2] # Σ₁ > [ 0, 1, 1, 2, 1] # Σ₂ ``` With following enterpretatation for compatibility relations between irreps at Γ and Σ: | Compatibility relation | Degeneracies | |------------------------|--------------| | Γ₁ → Σ₁ | 1 → 1 | | Γ₂ → Σ₂ | 1 → 1 | | Γ₃ → Σ₁ + Σ₂ | 2 → 1 + 1 | | Γ₄ → Σ₁ + 2Σ₂ | 3 → 1 + 2 | | Γ₅ → 2Σ₁ + Σ₂ | 3 → 2 + 1 | where, in this case, all the small irreps are one-dimensional. """ function subduction_count(Dᴳᵢ::T, Dᴴⱼ::T, αβγᴴⱼ::Union{Vector{<:Real},Nothing}=nothing) where T<:AbstractIrrep # find matching operations between H & G and verify that H<G boolsubgroup, idxsᴳ²ᴴ = _findsubgroup(operations(Dᴳᵢ), operations(Dᴴⱼ)) !boolsubgroup && throw(DomainError("Provided irreps are not H<G subgroups")) # compute characters # TODO: Care should be taken that the irreps # actually can refer to identical k-points; that should be a check # too, and then we should make sure that the characters are actually # evaluated at that KVec χᴳᵢ = characters(Dᴳᵢ) χᴴⱼ = characters(Dᴴⱼ, αβγᴴⱼ) # compute number of times that Dᴴⱼ occurs in the reducible # subduced irrep Dᴳᵢ↓H s = zero(ComplexF64) @inbounds for (idxᴴ, χᴴⱼ′) in enumerate(χᴴⱼ) s += χᴳᵢ[idxsᴳ²ᴴ[idxᴴ]]*conj(χᴴⱼ′) end (abs(imag(s)) > DEFAULT_ATOL) && error("unexpected finite imaginary part") nᴳᴴᵢⱼ_float = real(s)/order(Dᴴⱼ) # account for the fact that the orthogonality relations are changed for coreps; seems # only the subgroup is important to include here - not exactly sure why nᴳᴴᵢⱼ_float /= corep_orthogonality_factor(Dᴴⱼ) nᴳᴴᵢⱼ = round(Int, nᴳᴴᵢⱼ_float) abs(nᴳᴴᵢⱼ - nᴳᴴᵢⱼ_float) > DEFAULT_ATOL && error("unexpected non-integral compatibility count") return nᴳᴴᵢⱼ end """ $(TYPEDSIGNATURES) """ function find_compatible(kv::KVec{D}, kvs′::Vector{KVec{D}}) where D isspecial(kv) || throw(DomainError(kv, "input kv must be a special k-point")) compat_idxs = Vector{Int}() @inbounds for (idx′, kv′) in enumerate(kvs′) isspecial(kv′) && continue # must be a line/plane/general point to match a special point kv is_compatible(kv, kv′) && push!(compat_idxs, idx′) end return compat_idxs end """ $(TYPEDSIGNATURES) Check whether a special k-point `kv` is compatible with a non-special k-point `kv′`. Note that, in general, this is only meaningful if the basis of `kv` and `kv′` is primitive. TODO: This method should eventually be merged with the equivalently named method in PhotonicBandConnectivity/src/connectivity.jl, which handles everything more correctly, but currently has a slightly incompatible API. """ function is_compatible(kv::KVec{D}, kv′::KVec{D}) where D isspecial(kv) || throw(DomainError(kv, "must be special")) isspecial(kv′) && return false return _can_intersect(kv′, kv) # TODO: We need some way to also get the intersection αβγ and reciprocal lattice vector # difference, if any. end #= function compatibility_matrix(brs::BandRepSet) lgirs_in, lgirs_out = matching_lgirreps(brs::BandRepSet) for (iᴳ, Dᴳᵢ) in enumerate(lgirs_in) # super groups for (jᴴ, Dᴴⱼ) in enumerate(lgirs_out) # sub groups # we ought to only check this on a per-kvec basis instead of # on a per-lgir basis to avoid redunant checks, but can't be asked... compat_bool = is_compatible(position(Dᴳᵢ), position(Dᴴⱼ)) # TODO: Get associated (αβγ, G) "matching" values that makes kvⱼ and kvᵢ and # compatible; use to get correct lgirs at their "intersection". if compat_bool nᴳᴴᵢⱼ = subduction_count(Dᴳᵢ, Dᴴⱼ, αβγ) if !iszero(nᴳᴴᵢⱼ) # TODO: more complicated than I thought: have to match across different special lgirreps. end end end end end =#
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
5253
""" classes(ops::AbstractVector{SymOperation{D}}, [cntr::Union{Char, Nothing}]) --> Vector{Vector{SymOperation{D}}} Return the conjugacy classes of a group ``G`` defined by symmetry operations `ops`. ## Definitions Two elements ``a`` and ``b`` in ``G`` are considered conjugate if there exists a ``g ∈ G`` such that ``gag^{-1} = b``. This defines an equivalence relation ``\\sim``, i.e., we say that ``a \\sim b`` if ``a`` and ``b`` are conjugate. The conjugacy classes of ``G`` are the distinct equivalence classes that can be identified under this equivalence relation, i.e. the grouping of ``G`` into subsets that are equivalent under conjugacy. ## Extended help If `ops` describe operations in a crystal system that is not primitive (i.e., if its [`centering`](@ref) type is not `p` or `P`) but is presented in a conventional setting, the centering symbol `cntr` _must_ be given. If `ops` is not in a centered crystal system, or if `ops` is already reduced to a primitive setting, `cntr` should be given as `nothing` (default behavior) or, alternatively, as `P` or `p` (depending on dimensionality). A single-argument calls to `classes` with `SpaceGroup` or `LittleGroup` types will assume that `ops` is provided in a conventional setting, i.e., will forward the method call to `classes(ops, centering(ops, dim(ops)))`. To avoid this behavior (if `ops` was already reduced to a primitive setting prior to calling `classes`), `cntr` should be provided explicitly as `nothing`. """ function classes( ops::AbstractVector{SymOperation{D}}, cntr::Union{Char, Nothing}=nothing, _modτ::Bool=!(ops isa SiteGroup) # `SiteGroup` elements compose w/ `modτ=false` ) where D ops⁻¹ = inv.(ops) cntr_ops = if cntr === nothing nothing else SymOperation{D}.(all_centeringtranslations(cntr, Val(D))) end conj_classes = Vector{Vector{SymOperation{D}}}() classified = sizehint!(BitSet(), length(ops)) i = 0 while length(classified) < length(ops) i += 1 i ∈ classified && continue a = ops[i] conj_class = push!(conj_classes, [a])[end] push!(classified, i) for (g, g⁻¹) in zip(ops, ops⁻¹) b = compose(compose(g, a, _modτ), g⁻¹, _modτ) if all(Base.Fix1(!≈, b), conj_class) # check that `b` is not already in class add_to_class!(classified, conj_class, b, ops) end # special treatment for cases where we have a space or little group that # is not in a primitive setting (but a conventional setting) and might # additionally not include "copies" of trivial centering translations among # `ops`; to account for this case, we just create translated copies of `b` # over all possible centers and check those against `ops` as well until # convergence (TODO: there's probably a much cleaner/more performant way of # doing this) if cntr_ops !== nothing && length(cntr_ops) > 0 all_additions = 0 new_additions = 1 # initialize to enter loop while new_additions != 0 && all_additions < length(cntr_ops) # this while loop is here to make sure we don't depend on ordering of # translation additions to `conj_class`, i.e. to ensure convergence new_additions = 0 for cntr_op in cntr_ops b′ = compose(cntr_op, b, _modτ) if all(Base.Fix1(!≈, b′), conj_class) new_additions += add_to_class!(classified, conj_class, b′, ops) end end all_additions += new_additions end end end end return conj_classes end classes(g::AbstractGroup) = classes(g, centering(g)) # adds `b` to `class` and index of `b` in `ops` to `classified` function add_to_class!(classified, class, b, ops) i′ = findfirst(op -> isapprox(op, b, nothing, false), ops) if i′ !== nothing # `b` might not exist in `ops` if `ops` refers to a group of reduced symmetry # operations (i.e. without centering translation copies) that nevertheless is # still in a non-primitive setting; in that case, we just don't include `b` push!(classified, i′) push!(class, ops[i′]) # better to take `ops[i′]` than `b` cf. possible float errors return true else return false # added nothing end end """ is_abelian(ops::AbstractVector{SymOperation}, [cntr::Union{Char, Nothing}]) --> Bool Return the whether the group composed of the elements `ops` is Abelian. A group ``G`` is Abelian if all its elements commute mutually, i.e., if ``g = hgh^{-1}`` for all ``g,h ∈ G``. See discussion of the setting argument `cntr` in [`classes`](@ref). """ function is_abelian( ops::AbstractVector{SymOperation{D}}, cntr::Union{Char, Nothing}=nothing ) where D return length(classes(ops, cntr)) == length(ops) end is_abelian(g::AbstractGroup) = is_abelian(g, centering(g))
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
4270
# --- SCALARS --- const DEFAULT_ATOL = 1e-12 # absolute tolerance for approximate equality const NULL_ATOL = 1e-11 # absolute tolerance for nullspace @doc raw""" MAX_SGNUM :: Tuple{Int,Int,Int} Return the number of distinct space group types across dimensions 1, 2, and 3 (indexable by dimensionality). """ const MAX_SGNUM = (2, 17, 230) @doc raw""" MAX_SUBGNUM :: ImmutableDict An immutable dictionary with values `v::Int` and keys `k::Tuple{Int,Int}`, where `v` is the number of distinct subperiodic group types for a given key `k = (D,P)` describing a subperiodic group of dimensionality `D` and periodicity `P`: - layer groups: `(D,P) = (3,2)` - rod groups: `(D,P) = (3,1)` - frieze groups: `(D,P) = (2,1)` """ const MAX_SUBGNUM = ImmutableDict((3,2)=>80, (3,1)=>75, (2,1)=>7) @doc raw""" MAX_MSGNUM :: Tuple{Int,Int,Int} Analogous to `MAX_SUBGNUM`, but for the number of magnetic space groups. """ const MAX_MSGNUM = (7, 80, 1651) # Figure 1.2.1 of Litvin's book @doc raw""" MAX_MSUBGNUM :: Tuple{Int,Int,Int} Analogous to `MAX_SUBGNUM`, but for the number of magnetic subperiodic groups. """ const MAX_MSUBGNUM = ImmutableDict((3,2)=>528, (3,1)=>394, (2,1)=>31) # Litvin, Fig. 1.2.1 # --- VECTORS --- # arbitrary test vector for e.g. evaluating KVecs lines/planes/volumes; 3D by default const TEST_αβγ = [0.123123123, 0.456456456, 0.789789789] const TEST_αβγs = (TEST_αβγ[1:1], TEST_αβγ[1:2], TEST_αβγ) # --- LISTS --- # The following space group numbers are symmorphic; in 3D they each embody one of # the 73 arithmetic crystal classes. Basically, this is the combination of the 14 # Bravais lattices with the 32 point groups/geometric crystal classes. Obtained from e.g. # > tuple((tuple([i for i in 1:MAX_SGNUM[D] if issymmorph(i, D)]...) for D = 1:3)...) const SYMMORPH_SGNUMS = (# 1D (1st index; all elements are symmorph) (1, 2), # 2D (2nd index) ((1, 2, 3, 5, 6, 9, 10, 11, 13, 14, 15, 16, 17)), # 3D (3rd index) (1,2,3,5,6,8,10,12,16,21,22,23,25,35,38,42,44,47,65, 69,71,75,79,81,82,83,87,89,97,99,107,111,115,119,121, 123,139,143,146,147,148,149,150,155,156,157,160,162, 164,166,168,174,175,177,183,187,189,191,195,196,197, 200,202,204,207,209,211,215,216,217,221,225,229) ) @doc raw""" ENANTIOMORPHIC_PAIRS :: NTuple{11, Pair{Int,Int}} Return the space group numbers of the 11 enantiomorphic space group pairs in 3D. The space group types associated with each such pair `(sgnum, sgnum')` are related by a mirror transformation: i.e. there exists a transformation ``\mathbb{P} = \{\mathbf{P}|\mathbf{p}\}`` between the two groups ``G = \{g\}`` and ``G' = \{g'\}`` such that ``G' = \mathbb{P}^{-1}G\mathbb{P}`` where ``\mathbf{P}`` is improper (i.e. ``\mathrm{det}\mathbf{P} < 0``). We define distinct space group *types* as those that cannot be related by a proper transformation (i.e. with ``\mathrm{det}\mathbf{P} > 0``). With that view, there are 230 space group types. If the condition is relaxed to allow improper rotations, there are ``230-11 = 219`` distinct *affine* space group types. See e.g. ITA5 Section 8.2.2. The enantiomorphic space group types are also chiral space group types in 3D. There are no enantiomorphic pairs in lower dimensions; in 3D all enantiomorphic pairs involve screw symmetries, whose direction is inverted between pairs (i.e. have opposite handedness). """ const ENANTIOMORPHIC_PAIRS = (76 => 78, 91 => 95, 92 => 96, 144 => 145, 152 => 154, 151 => 153, 169 => 170, 171 => 172, 178 => 179, 180 => 181, 213 => 212) # this is just the cached result of # pairs_label = [ # cf. ITA5 p. 727 # "P4₁" => "P4₃", "P4₁22" => "P4₃22", "P4₁2₁2" => "P4₃2₁2", "P3₁" => "P3₂", # "P3₁21" => "P3₂21", "P3₁12" => "P3₂12", "P6₁" => "P6₅", "P6₂" => "P6₄", # "P6₁22" => "P6₅22", "P6₂22" => "P6₄22", "P4₁32" => "P4₃32" # ] # iucs = iuc.(1:230) # pairs = map(((x,y),) -> findfirst(==(x), iucs) => findfirst(==(y), iucs), ps)
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
1270
@deprecate get_littlegroups littlegroups @deprecate get_lgirreps lgirreps @deprecate get_pgirreps pgirreps @deprecate get_wycks wyckoffs @deprecate WyckPos WyckoffPosition @deprecate( CharacterTable(irs::AbstractVector{<:AbstractIrrep}, αβγ::Union{AbstractVector{<:Real}, Nothing}), characters(irs, αβγ) ) @deprecate( CharacterTable(irs::AbstractVector{<:AbstractIrrep}), characters(irs) ) @deprecate kvec(lg::LittleGroup) position(lg) @deprecate kvec(lgir::LGIrrep) position(lgir) @deprecate wyck(g::SiteGroup) position(g) @deprecate wyck(wp::WyckoffPosition) parent(wp) @deprecate wyck(BR::BandRep) position(BR) @deprecate( kstar(g::AbstractVector{SymOperation{D}}, kv::KVec{D}, cntr::Char) where D, orbit(g, kv, cntr) ) @deprecate kstar(lgir::LGIrrep) orbit(lgir) @deprecate( SiteGroup(sg::SpaceGroup{D}, wp::WyckoffPosition{D}) where D, sitegroup(sg, wp) ) @deprecate( SiteGroup(sgnum::Integer, wp::WyckoffPosition{D}) where D, sitegroup(sgnum, wp) ) Base.@deprecate_binding( # cannot use plain `@deprecate` for types IrrepCollection, Collection{T} where T<:AbstractIrrep ) @deprecate matrix(brs::BandRepSet; kws...) stack(brs::BandRepSet)
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
24310
""" realify(lgirsd::AbstractDict{<:AbstractIrrep, <:AbstractVector{<:AbstractIrrep}}) --> Dict{<:AbstractIrrep, <:AbstractVector{<:AbstractIrrep}} Apply `realify` to each value of `lgirsd`, returning a new `Dict` of realified irreps. """ function realify(lgirsd::AbstractDict{<:AbstractString, <:AbstractVector{<:AbstractIrrep}}) return Dict(klab => realify(lgirs) for (klab, lgirs) in lgirsd) end """ realify!(lgirsd::AbstractDict{<:AbstractIrrep, <:AbstractVector{<:AbstractIrrep}}) Apply `realify` to each value of `lgirsd` in-place, returning the mutated `lgirsd`. """ function realify!(lgirsd::AbstractDict{<:AbstractString, <:AbstractVector{<:AbstractIrrep}}) for (klab, lgirs) in lgirsd lgirsd[klab] = realify(lgirs) end return lgirsd end # ---------------------------------------------------------------------------------------- # """ realify(lgirs::AbstractVector{<:LGIrrep}; verbose::Bool=false) --> AbstractVector{<:LGIrrep} From `lgirs`, a vector of `LGIrrep`s, determine the associated (gray) co-representations, i.e. the "real", or "physical" irreps that are relevant in scenarios with time-reversal symmetry. For `LGIrrep` that are `REAL`, or that characterize a k-point 𝐤 which is not equivalent to -𝐤 (i.e. its star does not include both 𝐤 and -𝐤; equivalently, the little group includes time-reversal symmetry), the associated co-representations are just the original irreps themselves. For `PSEUDOREAL` and `COMPLEX` `LGIrrep`s where ±𝐤 are equivalent, the associated co-representations are built from pairs of irreps that "stick" together. This method computes this pairing and sets the `LGIrrep` field `iscorep` to true, to indicate that the resulting "paired irrep" (i.e. the co-representation) should be doubled with itself (`PSEUDOREAL` reality) or its complex conjugate (`COMPLEX` reality). ### Background For background, see p. 650-652 (and p. 622-626 for point groups) in Bradley & Cracknell's book. Their discussion is for magnetic groups (the "realified" irreps are, in fact, simply co-representations of the "gray" magnetic groups). Cornwell's book also explicates this at some length as does Inui et al. (p. 296-299). ### Keyword arguments - `verbose::Bool`: if set to `true`, prints details about mapping from small irrep to small corep for each `LGIrrep` (default: `false`). """ function realify(lgirs::AbstractVector{LGIrrep{D}}; verbose::Bool=false) where D Nirr = length(lgirs) lg = group(first(lgirs)) kv = position(lg) # must be the same for all irreps in list αβγ = SVector{D}(TEST_αβγs[D]) kv_αβγ = kv(αβγ) sgnum = num(lg) lgops = operations(lg) Nops = order(lg) # order of little group (= number of operations) cntr = centering(sgnum, D) sgops = operations(spacegroup(sgnum, Val(D))) verbose && print(klabel(lg), " │ ") # Check if -𝐤 is in the star of 𝐤, or if 𝐤 is equivalent to -𝐤: # if so, TR is an element of the little group; if not, it isn't # ║ 𝐑𝐞𝐚𝐬𝐨𝐧: if there is an element g of the (unitary) 𝑠𝑝𝑎𝑐𝑒 group G # ║ that takes 𝐤 to -𝐤 mod 𝐆, then (denoting the TR element by Θ, # ║ acting as θ𝐤 = -𝐤) the antiunitary element θg will take 𝐤 to # ║ 𝐤 mod 𝐆, i.e. θg will be an element of the little group of 𝐤 # ║ M(k) associated with the **gray** space group M ≡ G + θG. # ║ Conversely, if no such element g exists, there can be no anti- # ║ unitary elements in the little group derived from M; as a result, # ║ TR is not part of the little group and so does not modify its # ║ small irreps (called "co-reps" for magnetic groups). # ║ There can then only be type 'x' degeneracy (between 𝐤 and -𝐤) # ║ but TR will not change the degeneracy at 𝐤 itself. Cornwall # ║ refers to this as "Case (1)" on p. 151. corep_idxs = Vector{Vector{Int}}() # define outside `if-else` to help inference if !isapproxin(-kv, orbit(sgops, kv, cntr), cntr, true; atol=DEFAULT_ATOL) append!(corep_idxs, ([i] for i in OneTo(Nirr))) # TR ∉ M(k) ⇒ smalls irrep (... small co-reps) not modified by TR verbose && println(klabel(lg), "ᵢ ∀i (type x) ⇒ no additional degeneracy (star{k} ∌ -k)") else # Test if 𝐤 is equivalent to -𝐤, i.e. if 𝐤 = -𝐤 + 𝐆 k_equiv_kv₋ = isapprox(-kv, kv, cntr; atol=DEFAULT_ATOL) # Find an element in G that takes 𝐤 → -𝐤 (if 𝐤 is equivalent to -𝐤, # then this is just the unit-element I (if `sgops` is sorted conven- # tionally, with I first, this is indeed what the `findfirst(...)` # bits below will find) if !k_equiv_kv₋ g₋ = sgops[findfirst(g-> isapprox(g*kv, -kv, cntr; atol=DEFAULT_ATOL), sgops)] else # This is a bit silly: if k_equiv_kv₋ = true, we will never use g₋; but I'm not sure if # the compiler will figure that out, or if it will needlessly guard against missing g₋? g₋ = one(SymOperation{D}) # ... the unit element I end # -𝐤 is part of star{𝐤}; we infer reality of irrep from ISOTROPY's data (could also # be done using `calc_reality(...)`) ⇒ deduce new small irreps (... small co-reps) skiplist = Vector{Int}() for (i, lgir) in enumerate(lgirs) i ∈ skiplist && continue # already matched to this irrep previously; i.e. already included now _check_not_corep(lgir) verbose && i ≠ 1 && print(" │ ") if reality(lgir) == REAL push!(corep_idxs, [i]) if verbose println(label(lgir), " (real) ⇒ no additional degeneracy") end elseif reality(lgir) == PSEUDOREAL # doubles irrep on its own push!(corep_idxs, [i, i]) if verbose println(label(lgir)^2, " (pseudo-real) ⇒ doubles degeneracy") end elseif reality(lgir) == COMPLEX # In this case, there must exist a "partner" irrep (say, Dⱼ) which is # equivalent to the complex conjugate of the current irrep (say, Dᵢ), i.e. # an equivalence Dⱼ ∼ Dᵢ*; we next search for this equivalence. # When we check for equivalence between irreps Dᵢ* and Dⱼ we must account # for the possibility of a 𝐤-dependence in the matrix-form of the irreps; # specifically, for an element g, its small irrep is # Dᵢ[g] = exp(2πik⋅τᵢ[g])Pᵢ[g], # where, crucially, for symmetry lines, planes, and general points 𝐤 depends # on (one, two, and three) free parameters (α,β,γ). # Thus, for equivalence of irreps Dᵢ* and Dⱼ we require that # Dᵢ*[g] ~ Dⱼ[g] ∀g ∈ G(k) # ⇔ exp(-2πik⋅τᵢ[g])Pᵢ*[g] ~ exp(2πik⋅τⱼ[g])Pⱼ[g] # It seems rather tedious to prove that this is the case for all 𝐤s along a # line/plane (α,β,γ). Rather than attempt this, we simply test against an # arbitrary value of (α,β,γ) [superfluous entries are ignored] that is # non-special (i.e. ∉ {0,0.5,1}); this is `αβγ`. # Characters of the conjugate of Dᵢ, i.e. tr(Dᵢ*) = tr(Dᵢ)* θχᵢ = conj.(characters(lgir, αβγ)) # Find matching complex partner partner = 0 for j = i+1:Nirr # only check if jth irrep has not previously matched and is complex if j ∉ skiplist && reality(lgirs[j]) == COMPLEX # Note that we require only equivalence of Dᵢ* and Dⱼ; not equality. # Cornwell describes (p. 152-153 & 188) a neat trick for checking this # efficiently: specifically, Dᵢ* and Dⱼ are equivalent irreps if # χⁱ(g)* = χʲ(g₋⁻¹gg₋) ∀g ∈ G(k) # with g₋ an element of G that takes 𝐤 to -𝐤, and where χⁱ (χʲ) denotes # the characters of the respective irreps. χⱼ = characters(lgirs[j], αβγ) match = true for n in OneTo(Nops) if k_equiv_kv₋ # 𝐤 = -𝐤 + 𝐆 ⇒ g₋ = I (the unit element), s.t. g₋⁻¹gg₋ = I⁻¹gI = g (Cornwall's case (3)) χⱼ_g₋⁻¹gg₋ = χⱼ[n] else # 𝐤 not equivalent to -𝐤, i.e. 𝐤 ≠ -𝐤 + 𝐆, but -𝐤 is in the star of 𝐤 (Cornwall's case (2)) g₋⁻¹gg₋ = compose(compose(inv(g₋), lgops[n], false), g₋, false) n′Δw = findequiv(g₋⁻¹gg₋, lgops, cntr) if n′Δw === nothing error("unexpectedly did not find little group element matching g₋⁻¹gg₋") end n′, Δw = n′Δw χⱼ_g₋⁻¹gg₋ = cispi(2*dot(kv_αβγ, Δw)) .* χⱼ[n′] end match = isapprox(θχᵢ[n], χⱼ_g₋⁻¹gg₋; atol=DEFAULT_ATOL) if !match # ⇒ not a match break end end if match # ⇒ a match partner = j if verbose println(label(lgir)*label(lgirs[j]), " (complex) ⇒ doubles degeneracy") end end end end partner == 0 && error("Didn't find a matching complex partner for $(label(lgir))") push!(skiplist, partner) push!(corep_idxs, [i, partner]) else throw(ArgumentError("unreachable: invalid real/pseudo-real/complex reality = $(reality(lgir))")) end end end Ncoreps = length(corep_idxs) # New small co-rep labels (composite) newlabs = [join(label(lgirs[i]) for i in corep_idxs[i′]) for i′ in OneTo(Ncoreps)] # Build a vector of "new" small irreps (small co-reps), following B&C p. 616 & Inui p. # 298-299. For pseudo-real and complex co-reps, we set a flag `iscorep = true`, to # indicate to "evaluation" methods, `(lgir::LGIrrep)(αβγ)`, that a diagonal # "doubling" is required (see below). lgirs′ = Vector{LGIrrep{D}}(undef, Ncoreps) for i′ in OneTo(Ncoreps) idxs = corep_idxs[i′] if length(idxs) == 1 # ⇒ real or type x (unchanged irreps) lgirs′[i′] = lgirs[idxs[1]] # has iscorep = false flag set already elseif idxs[1] == idxs[2] # ⇒ pseudoreal ("self"-doubles irreps) # The resulting co-rep of a pseudo-real irrep Dᵢ is # D = diag(Dᵢ, Dᵢ) # See other details under complex case. lgir = lgirs[idxs[1]] blockmatrices = _blockdiag2x2.(lgir.matrices) lgirs′[i′] = LGIrrep{D}(newlabs[i′], lg, blockmatrices, lgir.translations, PSEUDOREAL, true) else # ⇒ complex (doubles irreps w/ complex conjugate) # The co-rep of a complex irreps Dᵢ and Dⱼ is # D = diag(Dᵢ, Dⱼ) # where we know that Dⱼ ∼ Dᵢ*. Note that this is _not_ generally the same as # diag(Dⱼ, Dⱼ*), since we have only established that Dⱼ ∼ Dᵢ*, not Dⱼ = Dᵢ*. # Note also that we require the Dᵢ and Dⱼ irreps to have identical free phases, # i.e. `translations` fields, so that the overall irrep "moves" with a single # phase factor in k-space - we check for that explicitly for now, to be safe. τsᵢ = lgirs[idxs[1]].translations; τsⱼ = lgirs[idxs[2]].translations @assert τsᵢ == τsⱼ blockmatrices = _blockdiag2x2.(lgirs[idxs[1]].matrices, lgirs[idxs[2]].matrices) lgirs′[i′] = LGIrrep{D}(newlabs[i′], lg, blockmatrices, τsᵢ, COMPLEX, true) end end return Collection(lgirs′) end """ realify(pgirs::AbstractVector{T}) where T<:AbstractIrrep --> Vector{T} Return physically real irreps (coreps) from a set of conventional irreps (as produced by e.g. [`pgirreps`](@ref)). Fallback method for point-group-like `AbstractIrrep`s. ## Example ```jl-doctest julia> pgirs = pgirreps("4", Val(3)); julia> characters(pgirs) CharacterTable{3}: ⋕9 (4) ───────┬──────────────────── │ Γ₁ Γ₂ Γ₃ Γ₄ ───────┼──────────────────── 1 │ 1 1 1 1 2₀₀₁ │ 1 1 -1 -1 4₀₀₁⁺ │ 1 -1 1im -1im 4₀₀₁⁻ │ 1 -1 -1im 1im ───────┴──────────────────── julia> characters(realify(pgirs)) CharacterTable{3}: ⋕9 (4) ───────┬────────────── │ Γ₁ Γ₂ Γ₃Γ₄ ───────┼────────────── 1 │ 1 1 2 2₀₀₁ │ 1 1 -2 4₀₀₁⁺ │ 1 -1 0 4₀₀₁⁻ │ 1 -1 0 ───────┴────────────── ``` """ function realify(irs::AbstractVector{T}) where T<:AbstractIrrep irs′ = Vector{T}() sizehint!(irs′, length(irs)) # a small dance to accomodate `AbstractIrrep`s that may have more fields than `PGIrrep`: # find out if that is the case and identify "where" those fields are (assumed defined at # the "end" of the `AbstractIrrep` type definition) T_nfields = nfields(first(irs)) T_extrafields = T_nfields - 5 skiplist = Int[] for (idx, ir) in enumerate(irs) _check_not_corep(ir) r = reality(ir) # usually REAL; inline-check r == REAL && (push!(irs′, ir); continue) # ir is either COMPLEX or PSEUDOREAL if we reached this point if r == COMPLEX idx ∈ skiplist && continue # already included χs = characters(ir) # identify complex partner by checking for irreps whose characters are # equal to the complex conjugate of `ir`'s idx_partner = findfirst(irs) do ir′ χ′s = characters(ir′) all(i-> conj(χs[i]) ≈ χ′s[i], eachindex(χ′s)) end idx_partner === nothing && error("fatal: could not find complex partner") push!(skiplist, idx_partner) ir_partner = irs[idx_partner] blockmatrices = _blockdiag2x2.(ir.matrices, ir_partner.matrices) if T <: PGIrrep || T <: SiteIrrep # if `irs` were a SiteIrrep or PGIrrep w/ Mulliken labels, we may have to # manually abbreviate the composite label newlab = _abbreviated_mulliken_corep_label(label(ir), label(ir_partner)) else newlab = label(ir)*label(ir_partner) end elseif r == PSEUDOREAL # NB: this case doesn't actually ever arise for crystallographic point groups... blockmatrices = _blockdiag2x2.(ir.matrices) newlab = label(ir)^2 end push!(irs′, T(newlab, group(ir), blockmatrices, r, true, # if there are more than 5 fields in `ir`, assume they are unchanged # and splat them in now (NB: this depends a fixed field ordering in # `AbstractIrrep`, which is probably not a great idea, but meh) ntuple(i->getfield(ir, 5+i), Val(T_extrafields))...)) end return Collection(irs′) end # ---------------------------------------------------------------------------------------- # @noinline function _check_not_corep(ir::AbstractIrrep) if iscorep(ir) throw(DomainError(true, "method cannot be applied to irreps that have already been converted to coreps")) end end # returns the block diagonal matrix `diag(A1, A2)` (and assumes identically sized and # square `A1` and `A2`). function _blockdiag2x2(A1::AbstractMatrix{T}, A2::AbstractMatrix{T}) where T n = LinearAlgebra.checksquare(A1) LinearAlgebra.checksquare(A2) == n || throw(DimensionMismatch()) B = zeros(T, 2n, 2n) for i in OneTo(n) i′ = i+n @inbounds for j in OneTo(n) j′ = j+n B[i,j] = A1[i,j] B[i′,j′] = A2[i,j] end end return B end # returns the block diagonal matrix `diag(A, A)` (and assumes square `A`) function _blockdiag2x2(A::AbstractMatrix{T}) where T n = LinearAlgebra.checksquare(A) B = zeros(T, 2n, 2n) for i in OneTo(n) i′ = i+n @inbounds for j in OneTo(n) j′ = j+n aᵢⱼ = A[i,j] B[i,j] = aᵢⱼ B[i′,j′] = aᵢⱼ end end return B end # ---------------------------------------------------------------------------------------- # function _abbreviated_mulliken_corep_label(lab1, lab2) # the Mulliken label of a corep is not always the concatenation of the Mulliken labels # of the associated irrep labels, because the corep label is sometimes abbreviated # relative to the concatenated form; this only occurs for COMPLEX labels where the # abbreviation will remove repeated pre-superscript labels; we fix it below in a # slightly dull way by just checking the abbreviation-exceptions manually listed in # `MULLIKEN_LABEL_REALITY_EXCEPTIONS` and abbreviating accordingly; if not an exception # it is still the concatenation of irrep-labels MULLIKEN_LABEL_REALITY_EXCEPTIONS = ( ("²E", "¹E") => "E", ("²Eg", "¹Eg") => "Eg", ("²Eᵤ", "¹Eᵤ") => "Eᵤ", ("²E₁", "¹E₁") => "E₁", ("²E₂", "¹E₂") => "E₂", ("²E′", "¹E′") => "E′", ("²E′′", "¹E′′") => "E′′", ("²E₁g", "¹E₁g") => "E₁g", ("²E₁ᵤ", "¹E₁ᵤ") => "E₁ᵤ", ("²E₂g", "¹E₂g") => "E₂g", ("²E₂ᵤ", "¹E₂ᵤ") => "E₂ᵤ") for (lab1′lab2′, abbreviated_lab1′lab2′) in MULLIKEN_LABEL_REALITY_EXCEPTIONS if (lab1, lab2) == lab1′lab2′ || (lab2, lab1) == lab1′lab2′ return abbreviated_lab1′lab2′ end end return lab1*lab2 end # ---------------------------------------------------------------------------------------- # @doc raw""" calc_reality(lgir::LGIrrep, sgops::AbstractVector{SymOperation{D}}, αβγ::Union{Vector{<:Real},Nothing}=nothing) --> ::(Enum Reality) Compute and return the reality of a `lgir::LGIrrep` using the Herring criterion. The computed value is one of three integers in ``{1,-1,0}``. In practice, this value is returned via a member of the Enum `Reality`, which has instances `REAL = 1`, `PSEUDOREAL = -1`, and `COMPLEX = 0`. ## Optional arguments As a sanity check, a value of `αβγ` can be provided to check for invariance along a symmetry symmetry line/plane/general point in k-space. The reality must be invariant to this choice. ## Note The provided space group operations `sgops` **must** be the set reduced by primitive translation vectors; i.e. using `spacegroup(...)` directly is **not** allowable in general (since the irreps we reference only include these "reduced" operations). This reduced set of operations can be obtained e.g. from the Γ point irreps of ISOTROPY's dataset, or alternatively, from `reduce_ops(spacegroup(...), true)`. ## Implementation The Herring criterion evaluates the following sum ``[∑ χ({β|b}²)]/[g_0/M(k)]`` over symmetry operations ``{β|b}`` that take ``k → -k``. Here ``g_0`` is the order of the point group of the space group and ``M(k)`` is the order of star(``k``) [both in a primitive basis]. See e.g. Cornwell, p. 150-152 & 187-188 (which we mainly followed), Inui Eq. (13.48), Dresselhaus, p. 618, or [Herring's original paper](https://doi.org/10.1103/PhysRev.52.361). """ function calc_reality(lgir::LGIrrep{D}, sgops::AbstractVector{SymOperation{D}}, αβγ::Union{Vector{<:Real},Nothing}=nothing) where D iscorep(lgir) && throw(DomainError(iscorep(lgir), "method should not be called with LGIrreps where iscorep=true")) lgops = operations(lgir) kv = position(lgir) kv₋ = -kv cntr = centering(num(lgir), D) χs = characters(lgir, αβγ) kv_αβγ = kv(αβγ) s = zero(ComplexF64) for op in sgops if isapprox(op*kv, kv₋, cntr, atol=DEFAULT_ATOL) # check if op*k == -k; if so, include in sum op² = compose(op, op, false) # this is `op*op`, _including_ trivial lattice translation parts # find the equivalent of `op²` in `lgops`; this may differ by a number of # primitive lattice vectors `w_op²`; the difference must be included when # we calculate the trace of the irrep 𝐃: the irrep matrix 𝐃 is ∝exp(2πi𝐤⋅𝐭) tmp = findequiv(op², lgops, cntr) tmp === nothing && error("unexpectedly could not find matching operator of op²") idx_of_op²_in_lgops, Δw_op² = tmp ϕ_op² = cispi(2*dot(kv_αβγ, Δw_op²)) # phase accumulated by "trivial" lattice translation parts [cispi(x) = exp(iπx)] χ_op² = ϕ_op²*χs[idx_of_op²_in_lgops] # χ(op²) s += χ_op² end end pgops = pointgroup(sgops) # point group assoc. w/ space group g₀ = length(pgops) # order of pgops (denoted h, or macroscopic order, in Bradley & Cracknell) Mk = length(orbit(pgops, kv, cntr)) # order of star of k (denoted qₖ in Bradley & Cracknell) normalization = convert(Int, g₀/Mk) # order of G₀ᵏ; the point group derived from the little group Gᵏ (denoted b in Bradley & Cracknell; [𝐤] in Inui) # s = ∑ χ({β|b}²) and normalization = g₀/M(k) in Cornwell's Eq. (7.18) notation type_float = real(s)/normalization type = round(Int8, type_float) # check that output is a valid: real integer in (0,1,-1) isapprox(imag(s), 0.0, atol=DEFAULT_ATOL) || _throw_reality_not_real(s) isapprox(type_float, type, atol=DEFAULT_ATOL) || _throw_reality_not_integer(type_float) return type ∈ (-1, 0, 1) ? Reality(type) : UNDEF # return [∑ χ({β|b}²)]/[g₀/M(k)] end # Frobenius-Schur criterion for point group irreps (Inui p. 74-76): # |g|⁻¹∑ χ(g²) = {1 (≡ real), -1 (≡ pseudoreal), 0 (≡ complex)} function calc_reality(pgir::PGIrrep) χs = characters(pgir) pg = group(pgir) s = zero(eltype(χs)) for op in pg op² = op*op idx = findfirst(op->isapprox(op, op², nothing, false), pg) idx === nothing && error("unexpectedly did not find point group element matching op²") s += χs[idx] end type_float = real(s)/order(pg) type = round(Int8, type_float) isapprox(imag(s), 0.0, atol=DEFAULT_ATOL) || _throw_reality_not_real(s) isapprox(type_float, type, atol=DEFAULT_ATOL) || _throw_reality_not_integer(type_float) return type ∈ (-1, 0, 1) ? Reality(type) : UNDEF # return |g|⁻¹∑ χ(g²) end @noinline _throw_reality_not_integer(x) = error("Criterion must yield an integer; obtained non-integer value = $(x)") @noinline _throw_reality_not_real(x) = error("Criterion must yield a real value; obtained complex value = $(x)") """ $TYPEDSIGNATURES --> Int Return a multiplicative factor for use in checking the orthogonality relations of "physically real" irreps (coreps). For such "physically real" irreps, the conventional orthogonality relations (by conventional we mean orthogonality relations that sum only over unitary operations, i.e. no "gray" operations/products with time-inversion) still hold if we include a multiplicative factor `f` that depends on the underlying reality type `r` of the corep, such that `f(REAL) = 1`, `f(COMPLEX) = 2`, and `f(PSEUDOREAL) = 4`. If the provided irrep is not a corep (i.e. has `iscorep(ir) = false`), the multiplicative factor is 1. ## References See e.g. Bradley & Cracknell Eq. (7.4.10). """ function corep_orthogonality_factor(ir::AbstractIrrep) if iscorep(ir) r = reality(ir) r == PSEUDOREAL && return 4 r == COMPLEX && return 2 # error call is needed for type stability error("unreachable; invalid combination of iscorep=true and reality type") else # not a corep or REAL return 1 end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
22403
## --- TYPES --- abstract type AbstractFourierLattice{D}; end getcoefs(flat::AbstractFourierLattice) = flat.orbitcoefs getorbits(flat::AbstractFourierLattice) = flat.orbits dim(::AbstractFourierLattice{D}) where D = D function (==)(flat1::AbstractFourierLattice, flat2::AbstractFourierLattice) return flat1.orbits == flat2.orbits && flat1.orbitcoefs == flat2.orbitcoefs end function Base.isapprox(flat1::AbstractFourierLattice, flat2::AbstractFourierLattice; kwargs...) return ( isapprox(flat1.orbits, flat2.orbits; kwargs...) && isapprox(flat1.orbitcoefs, flat2.orbitcoefs; kwargs...) ) end @doc """ UnityFourierLattice{D} <: AbstractFourierLattice{D} A general `D`-dimensional Fourier (plane wave) lattice specified by orbits of reciprocal lattice vectors (`orbits`) and coefficient interrelations (`orbitcoefs`)). The norm of all elements in `orbitcoefs` is unity. `orbits` (and associated coefficients) are sorted in order of increasing norm (low to high). """ struct UnityFourierLattice{D} <: AbstractFourierLattice{D} orbits::Vector{Vector{SVector{D, Int}}} # Vector of orbits of 𝐆-vectors (in 𝐆-basis) orbitcoefs::Vector{Vector{ComplexF64}} # Vector of interrelations between coefficients of 𝐆-plane waves within an orbit; unit norm end @doc """ ModulatedFourierLattice{D} <: AbstractFourierLattice{D} A `D`-dimensional concrete Fourier (plane wave) lattice, derived from a [`UnityFourierLattice{D}`](@ref) by scaling and modulating its orbit coefficients by complex numbers; in general, the coefficients do not have unit norm. """ struct ModulatedFourierLattice{D} <: AbstractFourierLattice{D} orbits::Vector{Vector{SVector{D, Int}}} # Vector of orbits of 𝐆-vectors (in 𝐆-basis) orbitcoefs::Vector{Vector{ComplexF64}} # Vector of coefficients of 𝐆-plane waves within an orbit end ## --- METHODS --- # Group orbits of plane waves G = (G)ᵀ under a symmetry operation Ô = {W|w}, # using that Ô acts as Ô⁻¹={W⁻¹|-W⁻¹w} when acting on functions, i.e. # Ôexp(iG⋅r) = Ôexp(iG⋅Ô⁻¹r) = exp[iG⋅(W⁻¹r-W⁻¹w)] # and # exp(iG⋅W⁻¹r) = exp(iGᵀW⁻¹r) = exp{i[(W⁻¹)ᵀG]ᵀ⋅r} @doc """ levelsetlattice(sgnum::Integer, D::Integer=2, idxmax::NTuple=ntuple(i->2,D)) --> UnityFourierLattice{D} Compute a "neutral"/uninitialized Fourier lattice basis, a [`UnityFourierLattice`](@ref), consistent with the symmetries of the space group `sgnum` in dimension `D`. The resulting lattice `flat` is expanded in a Fourier basis split into symmetry-derived orbits, with intra-orbit coefficients constrained by the symmetries of the space-group. The inter-orbit coefficients are, however, free and unconstrained. The Fourier resolution along each reciprocal lattice vector is controlled by `idxmax`: e.g., if `D = 2` and `idxmax = (2, 3)`, the resulting Fourier lattice may contain reciprocal lattice vectors (k₁, k₂) with k₁∈[0,±1,±2] and k₂∈[0,±1,±2,±3], referred to a 𝐆-basis. This "neutral" lattice can, and usually should, be subsequently modulated by [`modulate`](@ref) (which modulates the inter-orbit coefficients, which may eliminate "synthetic symmetries" that can exist in the "neutral" configuration, due to all inter-orbit coefficients being set to unity). ## Examples Compute a `UnityFourierLattice`, modulate it with random inter-orbit coefficients via `modulate`, and finally plot it (via PyPlot.jl): ```julia-repl julia> uflat = levelsetlattice(16, Val(2)) julia> flat = modulate(uflat) julia> Rs = directbasis(16, Val(2)) julia> using PyPlot julia> plot(flat, Rs) ``` """ function levelsetlattice(sgnum::Integer, D::Integer=2, idxmax::NTuple{D′,Int}=ntuple(i->2, D)) where D′ D == D′ || throw(DomainError((D=D, idxmax=idxmax), "incompatible dimensions")) return levelsetlattice(sgnum, Val(D′), idxmax) end function levelsetlattice(sgnum::Integer, Dᵛ::Val{D}, idxmax::NTuple{D,Int}=ntuple(i->2, D)) where D # check validity of inputs (sgnum < 1) && throw(DomainError(sgnum, "sgnum must be greater than 1")) D ∉ (1,2,3) && _throw_invalid_dim(D) D ≠ length(idxmax) && throw(DomainError((D, idxmax), "D must equal length(idxmax): got (D = $D) ≠ (length(idxmax) = $(length(idxmax)))")) (D == 2 && sgnum > 17) || (D == 3 && sgnum > 230) && throw(DomainError(sgnum, "sgnum must be in range 1:17 in 2D and in 1:230 in 3D")) # prepare sg = spacegroup(sgnum, Dᵛ) sgops = operations(sg) Ws = rotation.(sgops) # operations W in R-basis (point group part) ws = translation.(sgops) # We define the "reciprocal orbit" associated with the action of W through (W⁻¹)ᵀ # calculating the operators (W⁻¹)ᵀ in the 𝐆-basis: # The action of a symmetry operator in an 𝐑-basis, i.e. W(𝐑), on a 𝐤 vector in a # 𝐆-basis, i.e. 𝐤(𝐆), is 𝐤′(𝐆)ᵀ = 𝐤(𝐆)ᵀW(𝐑)⁻¹. To deal with column vectors, we # transpose, obtaining 𝐤′(𝐆) = [W(𝐑)⁻¹]ᵀ𝐤(𝐆) [details in symops.jl, above littlegroup(...)]. W⁻¹ᵀs = transpose.(inv.(Ws)) # If idxmax is interpreted as (imax, jmax, ...), then this produces an iterator # over i = -imax:imax, j = -jmax:jmax, ..., where each call returns (..., j, i); # note that the final order is anti-lexicographical; so we reverse it in the actual # loop for our own sanity's sake reviter = Iterators.product(reverse((:).(.-idxmax, idxmax))...) # --- compute orbits --- orbits = Vector{Vector{SVector{D,Int}}}() # vector to store orbits of G-vectors (in G-basis) for rG in reviter G = SVector{D,Int}(reverse(rG)) # fix order and convert to SVector{D,Int} from Tuple skip = false # if G already contained in an orbit; go to next G for orb in orbits isapproxin(G, orb) && (skip=true; break) end skip && continue neworb = _orbit(W⁻¹ᵀs, G) # compute orbit assoc with G-vector # the symmetry transformation may introduce round-off errors, but we know that # the indices must be integers; fix that here, and check its validity as well neworb′ = [round.(Int,G′) for G′ in neworb] if norm(neworb′ .- neworb) > DEFAULT_ATOL; error("The G-combinations and their symmetry-transforms must be integers"); end push!(orbits, neworb′) # add orbit to list of orbits end # --- restrictions on orbit coeffs. due to nonsymmorphic elements in space group --- orbitcoefs = Vector{Vector{ComplexF64}}() deleteidx = Vector{Int}() for (o,orb) in enumerate(orbits) start = true; prevspan = [] for (W⁻¹ᵀ, w) in zip(W⁻¹ᵀs, ws) conds = zeros(ComplexF64, length(orb), length(orb)) for (m, G) in enumerate(orb) G′ = W⁻¹ᵀ*G # planewave G is transformed to by W⁻¹ᵀ diffs = norm.(Ref(G′) .- orb); n = argmin(diffs) # find assoc linear index in orbit diffs[n] > DEFAULT_ATOL && error("Part of an orbit was miscalculated; diff = $(diffs[n])") # the inverse translation is -W⁻¹w; the phase is thus exp(-iG⋅W⁻¹w) which # is equivalent to exp[-i(W⁻¹ᵀG)w]. We use the latter, so we avoid an # unnecessary matrix-vector product [i.e. dot(G, W⁻¹w) = dot(G′, w)] conds[n,m] = cis(-2π*dot(G′, w)) # cis(x) = exp(ix) end nextspan = nullspace(conds-I, atol=NULL_ATOL) if start prevspan = nextspan start = false elseif !isempty(prevspan) && !isempty(nextspan) spansect = nullspace([prevspan -nextspan], atol=NULL_ATOL)[size(prevspan, 2)+1:end,:] prevspan = nextspan*spansect else prevspan = nothing; break end end if !isnothing(prevspan) if size(prevspan,2) != 1; error("Unexpected size of prevspan"); end coefbasis = vec(prevspan) coefbasis ./= coefbasis[argmax(norm(coefbasis, Inf))] push!(orbitcoefs, coefbasis) else push!(deleteidx, o) end end deleteat!(orbits, deleteidx) # sort in order of descending wavelength (e.g., [0,0,...] term comes first; highest G-combinations come last) perm = sortperm(orbits, by=x->norm(first(x))) permute!(orbits, perm) permute!(orbitcoefs, perm) return UnityFourierLattice{D}(orbits, orbitcoefs) end @doc """ _orbit(Ws, x) Computes the orbit of a direct-space point `x` under a set of point-group operations `Ws`, i.e. computes the set {gx | g∈G} where g denotes elements of the group G composed of all operations in `Ws` (possibly iterated, to ensure full coverage). It is important that `Ws` and `x` are given in the same basis. [``W' = PWP⁻¹`` if the basis change is from coordinates r to r' = Pr, corresponding to a new set of basis vectors (x̂')ᵀ=x̂ᵀP; e.g., when going from a direct basis representation to a Cartesian one, the basis change matrix is P = [R₁ R₂ R₃], with Rᵢ inserted as column vectors] """ function _orbit(Ws::AbstractVector{<:AbstractMatrix{<:Real}}, x::AbstractVector{<:Real}) fx = float.(x) xorbit = [fx] for W in Ws x′ = fx while true x′ = W*x′ if !isapproxin(x′, xorbit) push!(xorbit, x′) else break end end end return sort!(xorbit) # convenient to sort it before returning, for future comparisons end function transform(flat::AbstractFourierLattice{D}, P::AbstractMatrix{<:Real}) where D # The orbits consist of G-vector specified as a coordinate vector 𝐤≡(k₁,k₂,k₃)ᵀ, referred # to the untransformed 𝐆-basis (𝐚* 𝐛* 𝐜*), and we want to instead express it as a coordinate # vector 𝐤′≡(k₁′,k₂′,k₃′)ᵀ referred to the transformed 𝐆-basis (𝐚*′ 𝐛*′ 𝐜*′)≡(𝐚* 𝐛* 𝐜*)(P⁻¹)ᵀ, # where P is the transformation matrix. This is achieved by transforming according to 𝐤′ = Pᵀ𝐤 # or, equivalently, (k₁′ k₂′ k₃′)ᵀ = Pᵀ(k₁ k₂ k₃)ᵀ. See also `transform(::KVec, ...)` and # `transform(::ReciprocalBasis, ...)`. # vec of vec of G-vectors (in a **untransformed** 𝐆-basis) orbits = getorbits(flat) # prealloc. a vec of vec of k-vecs (to be filled in the **transformed** 𝐆-basis) orbits′ = [Vector{SVector{D, Int}}(undef, length(orb)) for orb in orbits] # transform all k-vecs in the orbits for (i, orb) in enumerate(orbits) for (j, k) in enumerate(orb) k′ = P'*k int_k′ = round.(Int, k′) if !isapprox(k′, int_k′, atol=DEFAULT_ATOL) error("unexpectedly obtained non-integer k-vector in orbit") end orbits′[i][j] = int_k′ :: SVector{D,Int} end end # --- Comment regarding the `convert(SVector{D, Int}, ...)` call above: --- # Because primitive reciprocal basis Gs′≡(𝐚*′ 𝐛*′ 𝐜*′) consists of "larger" vectors # than the conventional basis Gs≡(𝐚* 𝐛* 𝐜*) (since the direct lattice shrinks when we # go to a primitive basis), not every conventional reciprocal lattice coordinate vector # 𝐤 has a primitive integer-coordinate vector 𝐤′=Pᵀ𝐤 (i.e. kᵢ∈ℕ does not imply kᵢ′∈ℕ). # However, since `flat` is derived consistent with the symmetries in a conventional # basis, the necessary restrictions will already have been imposed in the creation of # `flat` so that the primitivized version will have only integer coefficients (otherwise # the lattice would not be periodic in the primitive cell). I.e. we need not worry that # the conversion is impossible, so long that we transform to a meaningful basis. # The same issue of course isn't relevant for transforming in the reverse direction. # the coefficients of flat are unchanged; only the 𝐑- and 𝐆-basis change return typeof(flat)(orbits′, deepcopy(getcoefs(flat))) # return in the same type as `flat` end @doc raw""" primitivize(flat::AbstractFourierLattice, cntr::Char) --> ::typeof(flat) Given `flat` referred to a conventional basis with centering `cntr`, compute the derived (but physically equivalent) lattice `flat′` referred to the associated primitive basis. Specifically, if `flat` refers to a direct conventional basis `Rs` ``≡ (\mathbf{a} \mathbf{b} \mathbf{c})`` [with coordinate vectors ``\mathbf{r} ≡ (r_1, r_2, r_3)^{\mathrm{T}}``] then `flat′` refers to a direct primitive basis `Rs′` ``≡ (\mathbf{a}' \mathbf{b}' \mathbf{c}') ≡ (\mathbf{a} \mathbf{b} \mathbf{c})\mathbf{P}`` [with coordinate vectors ``\mathbf{r}' ≡ (r_1', r_2', r_3')^{\mathrm{T}} = \mathbf{P}^{-1}\mathbf{r}``], where ``\mathbf{P}`` denotes the basis-change matrix obtained from `primitivebasismatrix(...)`. To compute the associated primitive basis vectors, see [`primitivize(::DirectBasis, ::Char)`](@ref) [specifically, `Rs′ = primitivize(Rs, cntr)`]. ## Examples A centered ('c') lattice from plane group 5 in 2D, plotted in its conventional and primitive basis (requires `using PyPlot`): ```julia-repl julia> sgnum = 5; D = 2; cntr = centering(sgnum, D) # 'c' (body-centered) julia> Rs = directbasis(sgnum, Val(D)) # conventional basis (rectangular) julia> flat = levelsetlattice(sgnum, Val(D)) # Fourier lattice in basis of Rs julia> flat = modulate(flat) # modulate the lattice coefficients julia> plot(flat, Rs) julia> Rs′ = primitivize(Rs, cntr) # primitive basis (oblique) julia> flat′ = primitivize(flat, cntr) # Fourier lattice in basis of Rs′ julia> using PyPlot julia> plot(flat′, Rs′) ``` """ function primitivize(flat::AbstractFourierLattice{D}, cntr::Char) where D # Short-circuit for lattices that have trivial transformation matrices (D == 3 && cntr == 'P') && return flat (D == 2 && cntr == 'p') && return flat D == 1 && return flat P = primitivebasismatrix(cntr, Val(D)) return transform(flat, P) end """ conventionalize(flat::AbstractFourierLattice, cntr::Char) --> ::typeof(flat′) Given `flat` referred to a primitive basis with centering `cntr`, compute the derived (but physically equivalent) lattice `flat′` referred to the associated conventional basis. See also the complementary method [`primitivize(::AbstractFourierLattice, ::Char)`](@ref) for additional details. """ function conventionalize(flat::AbstractFourierLattice{D}, cntr::Char) where D # Short-circuit for lattices that have trivial transformation matrices (D == 3 && cntr == 'P') && return flat (D == 2 && cntr == 'p') && return flat D == 1 && return flat P = primitivebasismatrix(cntr, Val(D)) return transform(flat, inv(P)) end @doc """ modulate(flat::UnityFourierLattice{D}, modulation::AbstractVector{ComplexF64}=rand(ComplexF64, length(getcoefs(flat))), expon::Union{Nothing, Real}=nothing, Gs::Union{ReciprocalBasis{D}, Nothing}=nothing) --> ModulatedFourierLattice{D} Derive a concrete, modulated Fourier lattice from a `UnityFourierLattice` `flat` (containing the _interrelations_ between orbit coefficients), by multiplying the "normalized" orbit coefficients by a `modulation`, a _complex_ modulating vector (in general, should be complex; otherwise restores unintended symmetry to the lattice). Distinct `modulation` vectors produce distinct realizations of the same lattice described by the original `flat`. By default, a random complex vector is used. An exponent `expon` can be provided, which introduces a penalty term to short- wavelength features (i.e. high-|G| orbits) by dividing the orbit coefficients by |G|^`expon`; producing a "simpler" and "smoother" lattice boundary when `expon > 0` (reverse for `expon < 0`). This basically amounts to a continuous "simplifying" operation on the lattice (it is not necessarily a smoothing operation; it simply suppresses "high-frequency" components). If `expon = nothing`, no rescaling is performed. If `Gs` is provided as `nothing`, the orbit norm is computed in the reciprocal lattice basis (and, so, may not strictly speaking be a norm if the lattice basis is not cartesian); to account for the basis explicitly, `Gs` must be provided as a [`ReciprocalBasis`](@ref), see also [`normscale`](@ref). """ function modulate(flat::AbstractFourierLattice{D}, modulation::Union{Nothing, AbstractVector{ComplexF64}}=nothing, expon::Union{Nothing, Real}=nothing, Gs::Union{ReciprocalBasis{D}, Nothing}=nothing) where D if isnothing(modulation) Ncoefs = length(getcoefs(flat)) mod_r, mod_ϕ = rand(Float64, Ncoefs), 2π.*rand(Float64, Ncoefs) modulation = mod_r .* cis.(mod_ϕ) # ≡ reⁱᵠ (pick modulus and phase uniformly random) end orbits = getorbits(flat); orbitcoefs = getcoefs(flat) # unpacking ... # multiply the orbit coefficients by the overall `modulation` vector modulated_orbitcoefs = orbitcoefs.*modulation flat′ = ModulatedFourierLattice{D}(orbits, modulated_orbitcoefs) if !isnothing(expon) && !iszero(expon) # `expon ≠ 0`: interpret as a penalty term on short-wavelength orbits (high |𝐆|) # by dividing the orbit coefficients by |𝐆|^`expon`; producing smoother lattice # boundaries and simpler features for `expon > 0` (reverse for `expon < 0`) normscale!(flat′, expon, Gs) end return flat′ end @doc """ normscale(flat::ModulatedFourierLattice, expon::Real, Gs::Union{ReciprocalBasis, Nothing} = nothing) --> ModulatedFourierLattice Applies inverse-orbit norm rescaling of expansion coefficients with a norm exponent `expon`. If `Gs` is nothing, the orbit norm is computed in the lattice basis (and, so, is not strictly a norm); by providing `Gs` as [`ReciprocalBasis`](@ref), the norm is evaluated correctly in cartesian setting. See further discussion in [`modulate`](@ref). An in-place equivalent is provided in [`normscale!`](@ref). """ function normscale(flat::ModulatedFourierLattice{D}, expon::Real, Gs::Union{ReciprocalBasis{D}, Nothing} = nothing) where D return normscale!(deepcopy(flat), expon, Gs) end @doc """ normscale!(flat::ModulatedFourierLattice, expon::Real, Gs::Union{ReciprocalBasis, Nothing} = nothing) --> ModulatedFourierLattice In-place equivalent of [`normscale`](@ref): mutates `flat`. """ function normscale!(flat::ModulatedFourierLattice{D}, expon::Real, Gs::Union{ReciprocalBasis{D}, Nothing} = nothing) where D n₀ = isnothing(Gs) ? 1.0 : sum(norm, Gs) / D if !iszero(expon) orbits = getorbits(flat) @inbounds for i in eachindex(orbits) n = if isnothing(Gs) norm(first(orbits[i])) else norm(first(orbits[i])'*Gs) / n₀ end rescale_factor = n^expon rescale_factor == zero(rescale_factor) && continue # for G = [0,0,0] case flat.orbitcoefs[i] ./= rescale_factor end end return flat end # ----------------------------------------------------------------------------------------- # The utilities and methods below are mostly used for plotting (see src/pyplotting.jl). # We keep them here since they do not depend on PyPlot and have more general utility in # principle (e.g., exporting associated Meshes). @doc raw""" (flat::AbstractFourierLattice)(xyz) --> Float64 (flat::AbstractFourierLattice)(xyzs...) --> Float64 Evaluate an `AbstractFourierLattice` at the point `xyz` and return its real part, i.e. ```math \mathop{\mathrm{Re}}\sum_i c_i \exp(2\pi i\mathbf{G}_i\cdot\mathbf{r}) ``` with ``\mathrm{G}_i`` denoting reciprocal lattice vectors in the allowed orbits of `flat`, with ``c_i`` denoting the associated coefficients (and ``\mathbf{r} \equiv`` `xyz`). `xyz` may be any iterable object with dimension matching `flat` consisting of real numbers (e.g., a `Tuple`, `Vector`, or `SVector`). Alternatively, the coordinates can be supplied individually (i.e., as `flat(x, y, z)`). """ function (flat::AbstractFourierLattice)(xyz) dim(flat) == length(xyz) || throw(DimensionMismatch("dimensions of flat and xyz are mismatched")) orbits = getorbits(flat) coefs = getcoefs(flat) f = zero(Float64) for (orb, cs) in zip(orbits, coefs) for (G, c) in zip(orb, cs) # though one might naively think the phase would need a conversion between # 𝐑- and 𝐆-bases, this is not necessary since P(𝐆)ᵀP(𝐑) = 2π𝐈 by definition exp_im, exp_re = sincos(2π*dot(G, xyz)) f += real(c)*exp_re - imag(c)*exp_im # ≡ real(c*exp(2π*1im*dot(G, xyz))) end end return f end (flat::AbstractFourierLattice{D})(xyzs::Vararg{Real, D}) where D = flat(SVector{D, Float64}(xyzs)) # note: # the "(x,y,z) ordering" depends on dimension D: # D = 2: x runs over cols (dim=2), y over rows (dim=1), i.e. "y-then-x" # D = 3: x runs over dim=1, y over dim=2, z over dim=3, i.e. "x-then-y-then-z" # this is because plotting utilities usually "y-then-x", but e.g. Meshing.jl (for 3D # isosurfaces) assumes the the more natural "x-then-y-then-z" sorting used here. This does # require some care though, because if we export the output of a 3D calculation to Matlab, # to use it for isosurface generation, it again requires a sorting like "y-then-x-then-z", # so we need to permute dimensions 1 and 2 of the output of `calcfouriergridded` when used # with Matlab. function calcfouriergridded!(vals, xyz, flat::AbstractFourierLattice{D}, N::Integer=length(xyz)) where D # evaluate `flat` over all gridpoints via broadcasting if D == 2 # x along columns, y along rows: "y-then-x" broadcast!(flat, vals, reshape(xyz, (1,N)), reshape(xyz, (N,1))) elseif D == 3 # x along dim 1, y along dim 2, z along dim 3: "x-then-y-then-z", equivalent to a # triple loop, ala `for x∈xyz, y∈xyz, z∈xyz; vals[ix,iy,iz] = f(x,y,z); end` broadcast!(flat, vals, reshape(xyz, (N,1,1)), reshape(xyz, (1,N,1)), reshape(xyz, (1,1,N))) end return vals end function calcfouriergridded(xyz, flat::AbstractFourierLattice{D}, N::Integer=length(xyz)) where D vals = Array{Float64, D}(undef, ntuple(i->N, D)...) return calcfouriergridded!(vals, xyz, flat, N) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
10973
# ---------------------------------------------------------------------------------------- # # LittleGroup data loading """ littlegroups(sgnum::Integer, D::Union{Val{Int}, Integer}=Val(3)) -> Dict{String, LittleGroup{D}} For given space group number `sgnum` and dimension `D`, return the associated little groups (`LittleGroups{D}`s) at high-symmetry k-points, lines, and planes (see also [`lgirreps`](@ref)). Returns a `Dict` with little group **k**-point labels as keys and vectors of `LittleGroup{D}`s as values. ## Notes A conventional crystallographic setting is assumed (as in [`spacegroup`](@ref)). Unlike `spacegroup`, "centering"-copies of symmetry operations are not included in the returned `LittleGroup`s; as an example, space group 110 (body-centered, with centering symbol 'I') has a centering translation `[1/2,1/2,1/2]` in the conventional setting: the symmetry operations returned by `spacegroup` thus includes e.g. both `{1|0}` and `{1|½,½,½}` while the symmetry operations returned by `littlegroups` only include `{1|0}` (and so on). Currently, only `D = 3` is supported. ## References The underlying data is sourced from the ISOTROPY dataset: see also [`lgirreps`](@ref). """ function littlegroups(sgnum::Integer, ::Val{D}=Val(3), jldfile::JLD2.JLDFile=LGS_JLDFILES[D][]) where D D ∉ (1,2,3) && _throw_invalid_dim(D) sgops_str, klabs, kstrs, opsidxs = _load_littlegroups_data(sgnum, jldfile) sgops = SymOperation{D}.(sgops_str) lgs = Dict{String, LittleGroup{D}}() @inbounds for (klab, kstr, opsidx) in zip(klabs, kstrs, opsidxs) lgs[klab] = LittleGroup{D}(sgnum, KVec{D}(kstr), klab, sgops[opsidx]) end return lgs end # convenience functions without Val(D) usage; avoid internally littlegroups(sgnum::Integer, D::Integer) = littlegroups(sgnum, Val(D)) # ---------------------------------------------------------------------------------------- # # LGIrrep data loading """ lgirreps(sgnum::Integer, D::Union{Val{Int}, Integer}=Val(3)) -> Dict{String, Collection{LGIrrep{D}}} For given space group number `sgnum` and dimension `D`, return the associated little group (or "small") irreps (`LGIrrep{D}`s) at high-symmetry k-points, lines, and planes. Returns a `Dict` with little group **k**-point labels as keys and vectors of `LGIrrep{D}`s as values. ## Notes - The returned irreps are complex in general. Real irreps (as needed in time-reversal invariant settings) can subsequently be obtained with the [`realify`](@ref) method. - Returned irreps are spinless. - The irrep labelling follows CDML conventions. - Irreps along lines or planes may depend on free parameters `αβγ` that parametrize the **k** point. To evaluate the irreps at a particular value of `αβγ` and return the associated matrices, use `(lgir::LGIrrep)(αβγ)`. If `αβγ` is an empty tuple in this call, the matrices associated with `lgir` will be evaluated assuming `αβγ = [0,0,...]`. ## References The underlying data is sourced from the ISOTROPY ISO-IR dataset. Please cite the original reference material associated with ISO-IR: 1. Stokes, Hatch, & Campbell, [ISO-IR, ISOTROPY Software Suite](https://stokes.byu.edu/iso/irtables.php). 2. Stokes, Campbell, & Cordes, [Acta Cryst. A. **69**, 388-395 (2013)](https://doi.org/10.1107/S0108767313007538). The ISO-IR dataset is occasionally missing some **k**-points that lie outside the basic domain but still resides in the representation domain (i.e. **k**-points with postscripted 'A', 'B', etc. labels, such as 'ZA'). In such cases, the missing irreps may instead have been manually sourced from the Bilbao Crystallographic Database. """ function lgirreps(sgnum::Integer, Dᵛ::Val{D}=Val(3), lgs_jldfile::JLD2.JLDFile=LGS_JLDFILES[D][], irs_jldfile::JLD2.JLDFile=LGIRREPS_JLDFILES[D][]) where D D ∉ (1,2,3) && _throw_invalid_dim(D) lgs = littlegroups(sgnum, Dᵛ, lgs_jldfile) Ps_list, τs_list, realities_list, cdmls_list = _load_lgirreps_data(sgnum, irs_jldfile) lgirsd = Dict{String, Collection{LGIrrep{D}}}() for (Ps, τs, realities, cdmls) in zip(Ps_list, τs_list, realities_list, cdmls_list) klab = klabel(first(cdmls)) lg = lgs[klab] lgirsd[klab] = Collection( [LGIrrep{D}(cdml, lg, P, τ, Reality(reality)) for (P, τ, reality, cdml) in zip(Ps, τs, realities, cdmls)]) end return lgirsd end lgirreps(sgnum::Integer, D::Integer) = lgirreps(sgnum, Val(D)) # ===== utility functions (loads raw data from the harddisk) ===== function _load_littlegroups_data(sgnum::Integer, jldfile::JLD2.JLDFile) jldgroup = jldfile[string(sgnum)] sgops_str::Vector{String} = jldgroup["sgops"] klabs::Vector{String} = jldgroup["klab_list"] kstrs::Vector{String} = jldgroup["kstr_list"] opsidxs::Vector{Vector{Int16}} = jldgroup["opsidx_list"] return sgops_str, klabs, kstrs, opsidxs end function _load_lgirreps_data(sgnum::Integer, jldfile::JLD2.JLDFile) jldgroup = jldfile[string(sgnum)] # ≈ 70% of the time in loading all irreps is spent in getting Ps_list and τs_list Ps_list::Vector{Vector{Vector{Matrix{ComplexF64}}}} = jldgroup["matrices_list"] τs_list::Vector{Vector{Union{Nothing,Vector{Vector{Float64}}}}} = jldgroup["translations_list"] realities_list::Vector{Vector{Int8}} = jldgroup["realities_list"] cdmls_list::Vector{Vector{String}} = jldgroup["cdml_list"] return Ps_list, τs_list, realities_list, cdmls_list end # ---------------------------------------------------------------------------------------- # # Evaluation of LGIrrep at specific `αβγ` function (lgir::LGIrrep)(αβγ::Union{AbstractVector{<:Real}, Nothing} = nothing) Ps = lgir.matrices τs = lgir.translations if !iszero(τs) k = position(lgir)(αβγ) Ps′ = [copy(P) for P in Ps] # copy this way to avoid overwriting nested array..! for (i,τ) in enumerate(τs) if !iszero(τ) && !iszero(k) Ps′[i] .*= cispi(2*dot(k,τ)) # note cis(x) = exp(ix) # NOTE/TODO/FIXME: # This follows the convention in Eq. (11.37) of Inui as well as the Bilbao # server, i.e. has Dᵏ({I|𝐭}) = exp(i𝐤⋅𝐭); but disagrees with several other # references (e.g. Herring 1937a and Kovalev's book; and even Bilbao's # own _publications_?!). # In these other references one has Dᵏ({I|𝐭}) = exp(-i𝐤⋅𝐭), while Inui takes # Dᵏ({I|𝐭}) = exp(i𝐤⋅𝐭) [cf. (11.36)]. The former choice, i.e. Dᵏ({I|𝐭}) = # exp(-i𝐤⋅𝐭) actually appears more natural, since we usually have symmetry # operations acting _inversely_ on functions of spatial coordinates and # Bloch phases exp(i𝐤⋅𝐫). # Importantly, the exp(i𝐤⋅τ) is also the convention adopted by Stokes et al. # in Eq. (1) of Acta Cryst. A69, 388 (2013), i.e. in ISOTROPY (also # explicated at https://stokes.byu.edu/iso/irtableshelp.php), so, overall, # this is probably the sanest choice for this dataset. # This weird state of affairs was also noted explicitly by Chen Fang in # https://doi.org/10.1088/1674-1056/28/8/087102 (near Eqs. (11-12)). # # If we wanted swap the sign here, we'd likely have to swap t₀ in the check # for ray-representations in `check_multtable_vs_ir(::MultTable, ::LGIrrep)` # to account for this difference. It is not enough just to swap the sign # - I checked (⇒ 172 failures in test/multtable.jl) - you would have # to account for the fact that it would be -β⁻¹τ that appears in the # inverse operation, not just τ. Same applies here, if you want to # adopt the other convention, it should probably not just be a swap # to -τ, but to -β⁻¹τ. Probably best to stick with Inui's definition. end end return Ps′ else return Ps end # FIXME: Attempt to flip phase convention. Does not pass tests. #= lg = group(lgir) if !issymmorph(lg) k = position(lgir)(αβγ) for (i,op) in enumerate(lg) Ps[i] .* cis(-4π*dot(k, translation(op))) end end =# end # ---------------------------------------------------------------------------------------- # # Misc functions with `LGIrrep` """ israyrep(lgir::LGIrrep, αβγ=nothing) -> (::Bool, ::Matrix) Computes whether a given little group irrep `ir` is a ray representation by computing the coefficients αᵢⱼ in DᵢDⱼ=αᵢⱼDₖ; if any αᵢⱼ differ from unity, we consider the little group irrep a ray representation (as opposed to the simpler "vector" representations where DᵢDⱼ=Dₖ). The function returns a boolean (true => ray representation) and the coefficient matrix αᵢⱼ. """ function israyrep(lgir::LGIrrep, αβγ::Union{Nothing,Vector{Float64}}=nothing) k = position(lgir)(αβγ) lg = group(lgir) # indexing into/iterating over `lg` yields the LittleGroup's operations Nₒₚ = length(lg) α = Matrix{ComplexF64}(undef, Nₒₚ, Nₒₚ) # TODO: Verify that this is OK; not sure if we can just use the primitive basis # here, given the tricks we then perform subsequently? mt = MultTable(primitivize(lg)) for (row, oprow) in enumerate(lg) for (col, opcol) in enumerate(lg) t₀ = translation(oprow) + rotation(oprow)*translation(opcol) - translation(lg[mt.table[row,col]]) ϕ = 2π*dot(k,t₀) # include factor of 2π here due to normalized bases α[row,col] = cis(ϕ) end end return any(x->norm(x-1.0)>DEFAULT_ATOL, α), α end function ⊕(lgir1::LGIrrep{D}, lgir2::LGIrrep{D}) where D if position(lgir1) ≠ position(lgir2) || num(lgir1) ≠ num(lgir2) || order(lgir1) ≠ order(lgir2) error("The direct sum of two LGIrreps requires identical little groups") end if lgir1.translations ≠ lgir2.translations error("The provided LGIrreps have different translation-factors and cannot be \ combined within a single translation factor system") end cdml = label(lgir1)*"⊕"*label(lgir2) g = group(lgir1) T = eltype(eltype(lgir1.matrices)) z12 = zeros(T, irdim(lgir1), irdim(lgir2)) z21 = zeros(T, irdim(lgir2), irdim(lgir1)) matrices = [[m1 z12; z21 m2] for (m1, m2) in zip(lgir1.matrices, lgir2.matrices)] translations = lgir1.translations reality = UNDEF iscorep = lgir1.iscorep || lgir2.iscorep return LGIrrep{D}(cdml, g, matrices, translations, reality, iscorep) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
38780
""" schoenflies(sgnum::Integer) --> String Return the [Schoenflies notation](https://en.wikipedia.org/wiki/Schoenflies_notation) for space group number `sgnum` in dimension 3. Note that Schoenflies notation is well-defined only for 3D point and space groups. """ schoenflies(sgnum::Integer) = SCHOENFLIES_TABLE[sgnum] schoenflies(sg::SpaceGroup{3}) = schoenflies(num(sg)) """ iuc(sgnum::Integer, D::Integer=3) --> String Return the IUC (International Union of Crystallography) notation for space group number `sgnum` in dimension `D` (1, 2, or 3), as used in the International Tables of Crystallography. The notation is sometimes also known as the [Hermann-Mauguin notation](https://en.wikipedia.org/wiki/Hermann–Mauguin_notation). """ @inline function iuc(sgnum::Integer, D::Integer=3) if D==3 @boundscheck (sgnum ∈ 1:230) || _throw_invalid_sgnum(sgnum, 3) return @inbounds SG_IUCs[3][sgnum] elseif D==2 @boundscheck (sgnum ∈ 1:17) || _throw_invalid_sgnum(sgnum, 2) return @inbounds SG_IUCs[2][sgnum] elseif D==1 @boundscheck (sgnum ∈ 1:2) || _throw_invalid_sgnum(sgnum, 1) return @inbounds SG_IUCs[1][sgnum] else _throw_invalid_dim(D) end end @inline iuc(sg::Union{SpaceGroup{D},LittleGroup{D}}) where D = iuc(num(sg), D) """ centering(g::AbstractGroup) --> Char Return the conventional centering type of a group. For groups without lattice structure (e.g., point groups), return `nothing`. """ centering(sg_or_lg::Union{SpaceGroup{D},LittleGroup{D}}) where D = centering(num(sg_or_lg), D) # Schoenflies notation, ordered relative to space group number # [from https://bruceravel.github.io/demeter/artug/atoms/space.html] const SCHOENFLIES_TABLE = ( # triclinic "C₁¹", "Cᵢ¹", # monoclinic "C₂¹", "C₂²", "C₂³", "Cₛ¹", "Cₛ²", "Cₛ³", "Cₛ⁴", "C₂ₕ¹", "C₂ₕ²", "C₂ₕ³", "C₂ₕ⁴", "C₂ₕ⁵", "C₂ₕ⁶", # orthorhombic "D₂¹", "D₂²", "D₂³", "D₂⁴", "D₂⁵", "D₂⁶", "D₂⁷", "D₂⁸", "D₂⁹", "C₂ᵥ¹", "C₂ᵥ²", "C₂ᵥ³", "C₂ᵥ⁴", "C₂ᵥ⁵", "C₂ᵥ⁶", "C₂ᵥ⁷", "C₂ᵥ⁸", "C₂ᵥ⁹", "C₂ᵥ¹⁰", "C₂ᵥ¹¹", "C₂ᵥ¹²", "C₂ᵥ¹³", "C₂ᵥ¹⁴", "C₂ᵥ¹⁵", "C₂ᵥ¹⁶", "C₂ᵥ¹⁷", "C₂ᵥ¹⁸", "C₂ᵥ¹⁹", "C₂ᵥ²⁰", "C₂ᵥ²¹", "C₂ᵥ²²", "D₂ₕ¹", "D₂ₕ²", "D₂ₕ³", "D₂ₕ⁴", "D₂ₕ⁵", "D₂ₕ⁶", "D₂ₕ⁷", "D₂ₕ⁸", "D₂ₕ⁹", "D₂ₕ¹⁰", "D₂ₕ¹¹", "D₂ₕ¹²", "D₂ₕ¹³", "D₂ₕ¹⁴", "D₂ₕ¹⁵", "D₂ₕ¹⁶", "D₂ₕ¹⁷", "D₂ₕ¹⁸", "D₂ₕ¹⁹", "D₂ₕ²⁰", "D₂ₕ²¹", "D₂ₕ²²", "D₂ₕ²³", "D₂ₕ²⁴", "D₂ₕ²⁵", "D₂ₕ²⁶", "D₂ₕ²⁷", "D₂ₕ²⁸", # tetragonal "C₄¹", "C₄²", "C₄³", "C₄⁴", "C₄⁵", "C₄⁶", "S₄¹", "S₄²", "C₄ₕ¹", "C₄ₕ²", "C₄ₕ³", "C₄ₕ⁴", "C₄ₕ⁵", "C₄ₕ⁶", "D₄¹", "D₄²", "D₄³", "D₄⁴", "D₄⁵", "D₄⁶", "D₄⁷", "D₄⁸", "D₄⁹", "D₄¹⁰", "C₄ᵥ¹", "C₄ᵥ²", "C₄ᵥ³", "C₄ᵥ⁴", "C₄ᵥ⁵", "C₄ᵥ⁶", "C₄ᵥ⁷", "C₄ᵥ⁸", "C₄ᵥ⁹", "C₄ᵥ¹⁰", "C₄ᵥ¹¹", "C₄ᵥ¹²", "D₂d¹", "D₂d²", "D₂d³", "D₂d⁴", "D₂d⁵", "D₂d⁶", "D₂d⁷", "D₂d⁸", "D₂d⁹", "D₂d¹⁰", "D₂d¹¹", "D₂d¹²", "D₄ₕ¹", "D₄ₕ²", "D₄ₕ³", "D₄ₕ⁴", "D₄ₕ⁵", "D₄ₕ⁶", "D₄ₕ⁷", "D₄ₕ⁸", "D₄ₕ⁹", "D₄ₕ¹⁰", "D₄ₕ¹¹", "D₄ₕ¹²", "D₄ₕ¹³", "D₄ₕ¹⁴", "D₄ₕ¹⁵", "D₄ₕ¹⁶", "D₄ₕ¹⁷", "D₄ₕ¹⁸", "D₄ₕ¹⁹", "D₄ₕ²⁰", # trigonal "C₃¹", "C₃²", "C₃³", "C₃⁴", "C₃ᵢ¹", "C₃ᵢ²", "D₃¹", "D₃²", "D₃³", "D₃⁴", "D₃⁵", "D₃⁶", "D₃⁷", "C₃ᵥ¹", "C₃ᵥ²", "C₃ᵥ³", "C₃ᵥ⁴", "C₃ᵥ⁵", "C₃ᵥ⁶", "D₃d¹", "D₃d²", "D₃d³", "D₃d⁴", "D₃d⁵", "D₃d⁶", # hexagonal "C₆¹", "C₆²", "C₆³", "C₆⁴", "C₆⁵", "C₆⁶", "C₃ₕ¹", "C₆ₕ¹", "C₆ₕ²", "D₆¹", "D₆²", "D₆³", "D₆⁴", "D₆⁵", "D₆⁶", "C₆ᵥ¹", "C₆ᵥ²", "C₆ᵥ³", "C₆ᵥ⁴", "D₃ₕ¹", "D₃ₕ²", "D₃ₕ³", "D₃ₕ⁴", "D₆ₕ¹", "D₆ₕ²", "D₆ₕ³", "D₆ₕ⁴", # cubic "T¹", "T²", "T³", "T⁴", "T⁵", "Tₕ¹", "Tₕ²", "Tₕ³", "Tₕ⁴", "Tₕ⁵", "Tₕ⁶", "Tₕ⁷", "O¹", "O²", "O³", "O⁴", "O⁵", "O⁶", "O⁷", "O⁸", "Td¹", "Td²", "Td³", "Td⁴", "Td⁵", "Td⁶", "Oₕ¹", "Oₕ²", "Oₕ³", "Oₕ⁴", "Oₕ⁵", "Oₕ⁶", "Oₕ⁷", "Oₕ⁸", "Oₕ⁹", "Oₕ¹⁰" ) # IUC/Hermann-Mauguin notation, ordered relative to space/plane group number const SG_IUCs = ( # ------------------------------------------------------------------------------------------ # line-group notation (one dimension) [see https://en.wikipedia.org/wiki/Line_group] # ------------------------------------------------------------------------------------------ ("p1", "p1m"), # ------------------------------------------------------------------------------------------ # plane-group notation (two dimensions) [see e.g. Table 19 of Cracknell, Adv. Phys. 1974, or # https://www.cryst.ehu.es/cgi-bin/plane/programs/nph-plane_getgen?from=getwp] # ------------------------------------------------------------------------------------------ ( # oblique "p1", "p2", # rectangular ('p' or 'c' centering; c-centered lattices are rhombic in their primitive cell) "p1m1", "p1g1", "c1m1", "p2mm", "p2mg", "p2gg", "c2mm", # square "p4", "p4mm", "p4gm", # hexagonal "p3", "p3m1", "p31m", "p6", "p6mm" ), # ------------------------------------------------------------------------------------------ # space-group notation (three dimensions) following the conventions of ITA and Bilbao: # https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-getgen # ------------------------------------------------------------------------------------------ ( # triclinic "P1", "P-1", # monoclinic "P2", "P2₁", "C2", "Pm", "Pc", "Cm", "Cc", "P2/m", "P2₁/m", "C2/m", "P2/c", "P2₁/c", "C2/c", # orthorhombic "P222", "P222₁", "P2₁2₁2", "P2₁2₁2₁", "C222₁", "C222", "F222", "I222", "I2₁2₁2₁", "Pmm2", "Pmc2₁", "Pcc2", "Pma2", "Pca2₁", "Pnc2", "Pmn2₁", "Pba2", "Pna2₁", "Pnn2", "Cmm2", "Cmc2₁", "Ccc2", "Amm2", "Aem2", "Ama2", "Aea2", "Fmm2", "Fdd2", "Imm2", "Iba2", "Ima2", "Pmmm", "Pnnn", "Pccm", "Pban", "Pmma", "Pnna", "Pmna", "Pcca", "Pbam", "Pccn", "Pbcm", "Pnnm", "Pmmn", "Pbcn", "Pbca", "Pnma", "Cmcm", "Cmce", "Cmmm", "Cccm", "Cmme", "Ccce", "Fmmm", "Fddd", "Immm", "Ibam", "Ibca", "Imma", # tetragonal "P4", "P4₁", "P4₂", "P4₃", "I4", "I4₁", "P-4", "I-4", "P4/m", "P4₂/m", "P4/n", "P4₂/n", "I4/m", "I4₁/a", "P422", "P42₁2", "P4₁22", "P4₁2₁2", "P4₂22", "P4₂2₁2", "P4₃22", "P4₃2₁2", "I422", "I4₁22", "P4mm", "P4bm", "P4₂cm", "P4₂nm", "P4cc", "P4nc", "P4₂mc", "P4₂bc", "I4mm", "I4cm", "I4₁md", "I4₁cd", "P-42m", "P-42c", "P-42₁m", "P-42₁c", "P-4m2", "P-4c2", "P-4b2", "P-4n2", "I-4m2", "I-4c2", "I-42m", "I-42d", "P4/mmm", "P4/mcc", "P4/nbm", "P4/nnc", "P4/mbm", "P4/mnc", "P4/nmm", "P4/ncc", "P4₂/mmc", "P4₂/mcm", "P4₂/nbc", "P4₂/nnm", "P4₂/mbc", "P4₂/mnm", "P4₂/nmc", "P4₂/ncm", "I4/mmm", "I4/mcm", "I4₁/amd", "I4₁/acd", # trigonal "P3", "P3₁", "P3₂", "R3", "P-3", "R-3", "P312", "P321", "P3₁12", "P3₁21", "P3₂12", "P3₂21", "R32", "P3m1", "P31m", "P3c1", "P31c", "R3m", "R3c", "P-31m", "P-31c", "P-3m1", "P-3c1", "R-3m", "R-3c", # hexagonal "P6", "P6₁", "P6₅", "P6₂", "P6₄", "P6₃", "P-6", "P6/m", "P6₃/m", "P622", "P6₁22", "P6₅22", "P6₂22", "P6₄22", "P6₃22", "P6mm", "P6cc", "P6₃cm", "P6₃mc", "P-6m2", "P-6c2", "P-62m", "P-62c", "P6/mmm", "P6/mcc", "P6₃/mcm", "P6₃/mmc", # cubic "P23", "F23", "I23", "P2₁3", "I2₁3", "Pm-3", "Pn-3", "Fm-3", "Fd-3", "Im-3", "Pa-3", "Ia-3", "P432", "P4₂32", "F432", "F4₁32", "I432", "P4₃32", "P4₁32", "I4₁32", "P-43m", "F-43m", "I-43m", "P-43n", "F-43c", "I-43d", "Pm-3m", "Pn-3n", "Pm-3n", "Pn-3m", "Fm-3m", "Fm-3c", "Fd-3m", "Fd-3c", "Im-3m", "Ia-3d" ) ) @doc raw""" seitz(op::SymOperation) --> String Computes the correponding Seitz notation for a symmetry operation in triplet/xyzt form. Implementation based on ITA5 Table 11.2.1.1, with 3D point group parts inferred from the trace and determinant of the matrix ``\mathb{W}`` in the triplet ``\{\mathbf{W}|\mathbf{w}\}``. | detW/trW | -3 | -2 | -1 | 0 | 1 | 2 | 3 | |:---------|----|----|----|----|---|---|---| | **1** | | | 2 | 3 | 4 | 6 | 1 | | **-1** | -1 | -6 | -4 | -3 | m | | | with the elements of the table giving the type of symmetry operation in in Hermann-Mauguin notation. The rotation axis and the rotation sense are computed following the rules in ITA6 Sec. 1.2.2.4(1)(b-c). See also . Note that the orientation of the axis (i.e. its sign) does not necessarily match the orientation picked in Tables 1.4.2.1-5 of ITA6; it is a matter of (arbitrary) convention, and the conventions have not been explicated in ITA. 2D operations are treated by the same procedure, by elevation in a third dimension; 1D operations by a simple inspection of sign. """ function seitz(op::SymOperation{D}) where D w = translation(op) if D == 3 W = rotation(op) elseif D == 2 # augment 2D case by "adding" an invariant z dimension W′ = rotation(op) W = @inbounds SMatrix{3,3,Float64,9}( # build by column (= [W′ zeros(2); 0 0 1]) W′[1], W′[2], 0.0, W′[3], W′[4], 0.0, 0.0, 0.0, 1.0 ) elseif D == 1 W = rotation(op) isone(abs(W[1])) || throw(DomainError((W,w), "not a valid 1D symmetry operation")) W_str = signbit(W[1]) ? "-1" : "1" if iszero(w[1]) return W_str else w_str = unicode_frac(w[1]) return '{'*W_str*'|'*w_str*'}' end else throw(DomainError(D, "dimension different from 1, 2, or 3 is not supported")) end detW′ = det(W); detW = round(Int, detW′) # det, then trunc & check isapprox(detW′, detW, atol=DEFAULT_ATOL) || throw(DomainError(detW′, "det W must be an integer for a SymOperation {W|w}")) trW′ = tr(W); trW = round(Int, trW′) # tr, then trunc & check isapprox(trW′, trW, atol=DEFAULT_ATOL) || throw(DomainError(trW′, "tr W must be an integer for a SymOperation {W|w}")) io_pgop = IOBuffer() iszero(w) || print(io_pgop, '{') # --- rotation order (and proper/improper determination) --- rot = rotation_order_3d(detW, trW) # works for 2D also, since we augmented W above order = abs(rot) if rot == -2 print(io_pgop, 'm') else print(io_pgop, rot) end if order ≠ 1 # --- rotation axis (for order ≠ 1)--- u = if D == 2 && rot ≠ -2 # only need orientation in 2D for mirrors SVector{3,Int}(0, 0, 1) else rotation_axis_3d(W, detW, order) end if !(D == 2 && rot ≠ -2) # (for 2D, ignore z-component) join(io_pgop, (subscriptify(string(u[i])) for i in SOneTo(D))) end # --- rotation sense (for order > 2}) --- # ±-rotation sense is determined from sign of det(𝐙) where # 𝐙 ≡ [𝐮|𝐱|det(𝐖)𝐖𝐱] where 𝐱 is an arbitrary vector that # is not parallel to 𝐮. [ITA6 Vol. A, p. 16, Sec. 1.2.2.4(1)(c)] if order > 2 x = rand(-1:1, SVector{3, Int}) while iszero(x×u) # check that generated 𝐱 is not parallel to 𝐮 (if it is, 𝐱×𝐮 = 0) x = rand(-1:1, SVector{3, Int}) iszero(u) && error("rotation axis has zero norm; input is likely invalid") end Z = hcat(u, x, detW*(W*x)) print(io_pgop, signbit(det(Z)) ? '⁻' : '⁺') end end # --- add translation for nonsymorphic operations --- if !iszero(w) print(io_pgop, '|') join(io_pgop, (unicode_frac(wᵢ) for wᵢ in w), ',') print(io_pgop, '}') end return String(take!(io_pgop)) end seitz(str::String) = seitz(SymOperation(str)) """ rotation_order_3d(detW::Real, trW::Real) --> Int Determine the integer rotation order of a 3D point group operation with a 3×3 matrix representation `W` (alternatively specified by its determinant `detW` and its trace `trW`). The rotation order of - Proper rotations is positive. - Improper (mirrors, inversion, roto-inversions) is negative. """ function rotation_order_3d(detW::Real, trW::Real) if detW == 1 # proper rotations if -1 ≤ trW ≤ 1 # 2-, 3-, or 4-fold rotation rot = convert(Int, trW) + 3 elseif trW == 2 # 6-fold rotation rot = 6 elseif trW == 3 # identity operation rot = 1 else _throw_seitzerror(trW, detW) end elseif detW == -1 # improper rotations (rotoinversions) if trW == -3 # inversion rot = -1 elseif trW == -2 # 6-fold rotoinversion rot = -6 elseif -1 ≤ trW ≤ 0 # 4- and 3-fold rotoinversion rot = convert(Int, trW) - 3 elseif trW == 1 # mirror, note that "m" == "-2" conceptually rot = -2 else _throw_seitzerror(trW, detW) end else _throw_seitzerror(trW, detW) end return rot end """ rotation_order(W::Matrix{<:Real}) --> Int rotation_order(op::SymOperation) --> Int Determine the integer rotation order of a point group operation, input either as a matrix `W` or `op::SymOperation`. The rotation order of - Proper rotations is positive. - Improper (mirrors, inversion, roto-inversions) is negative. """ function rotation_order(W::AbstractMatrix{<:Real}) if size(W) == (1,1) return convert(Int, W[1,1]) elseif size(W) == (2,2) # we augment 2D case by effectively "adding" an invariant z dimension, extending # into 3D: then we just shortcut to what det and tr of that "extended" matrix is return rotation_order_3d(det(W), tr(W) + one(eltype(W))) elseif size(W) ≠ (3,3) throw(DomainError(size(W), "Point group operation must have a dimension ≤3")) end return rotation_order_3d(det(W), tr(W)) end rotation_order(op::SymOperation) = rotation_order(rotation(op)) function rotation_axis_3d(W::AbstractMatrix{<:Real}, detW::Real, order::Integer) # the rotation axis 𝐮 of a 3D rotation 𝐖 of order k is determined from the product of # 𝐘ₖ(𝐖) ≡ (d𝐖)ᵏ⁻¹+(d𝐖)ᵏ⁻² + ... + (d𝐖) + 𝐈 where d ≡ det(𝐖) # with an arbitrary vector 𝐯 that is not perpendicular to 𝐮 [cf. ITA6 Vol. A, p. 16, # Sec. 1.2.2.4(1)(b)] order ≤ 0 && throw(DomainError(order, "order must be positive (i.e. not include sign)")) # if W is the identity or inversion, the notion of an axis doesn't make sense isone(order) && throw(DomainError(order, "order must be non-unity (i.e. operation must not be identity or inversion)")) Yₖ = SMatrix{3,3,Float64}(I) # calculate Yₖ by iteration term = SMatrix{3,3,eltype(W)}(I) for j in OneTo(order-1) term = term*W # iteratively computes Wʲ if detW^j == -1; Yₖ = Yₖ - term else Yₖ = Yₖ + term end end u′ = Yₖ*rand(SVector{3, Float64}) while LinearAlgebra.norm(u′) < 1e-6 # there is near-infinitesimal chance that u′ is zero for random v, but check anyway u′ = Yₖ*rand(SVector{3, Float64}) end # TODO: this ought to be more robust: the below doesn't allow for axes that are e.g., # [2 3 0]; only axes that have a `1` somewhere; in general, we need to find a way # to e.g., "multiply-up" [1, 1.333333, 0] to [3, 4, 0]. Conceptually, it is # related to identifying a floating-point analogue of gcd. norm = minimum(abs, Base.Filter(x->abs(x)>DEFAULT_ATOL, u′)) # minimum nonzero element u′ = u′/norm # normalize u = round.(Int, u′) # convert from float to integer and check validity of conversion if !isapprox(u′, u, atol=DEFAULT_ATOL) throw(DomainError(u′, "the rotation axis must be equivalent to an integer vector by appropriate normalization")) end # the sign of u is arbitrary: we adopt the convention of '-' elements coming "before" # '+' elements; e.g. [-1 -1 1] is picked over [1 1 -1] and [-1 1 -1] is picked over # [1 -1 1]; note that this impacts the sense of rotation which depends on the sign of # the rotation axis; finally, if all elements have the same sign (or zero), we pick a # positive overall sign ('+') if all(≤(0), u) u = -u else negidx = findfirst(signbit, u) firstnonzero = findfirst(≠(0), u) # don't need to bother taking abs, as -0 = 0 for integers (and floats) if negidx ≠ nothing && (negidx ≠ firstnonzero || negidx === firstnonzero === 3) u = -u end end return u end rotation_axis_3d(W::AbstractMatrix) = rotation_axis_3d(W, det(W), rotation_order(W)) rotation_axis_3d(op::SymOperation{3}) = (W=rotation(op); rotation_axis_3d(W, det(W), abs(rotation_order(W)))) _throw_seitzerror(trW, detW) = throw(DomainError((trW, detW), "trW = $(trW) for detW = $(detW) is not a valid symmetry operation; see ITA5 Vol A, Table 11.2.1.1")) # ----------------------------------------------------------------------------------------- # MULLIKEN NOTATION FOR POINT GROUP IRREPS const PGIRLABS_CDML2MULLIKEN_3D = ImmutableDict( # sorted in ascending order wrt. Γᵢ CDML sorting; i.e. as # Γ₁, Γ₂, ... # or Γ₁⁺, Γ₁⁻, Γ₂⁺, Γ₂⁻, ... # the association between CDMl and Mulliken labels are obtained obtained from # https://www.cryst.ehu.es/cgi-bin/cryst/programs/representations_point.pl?tipogrupo=spg # note that e.g., https://www.cryst.ehu.es/rep/point.html cannot be used, because the # Γ-labels there do not always refer to the CDML convention; more likely, the B&C # convention. For "setting = 2" cases, we used the `bilbao_pgs_url(..)` from the # point group irrep crawl script # includes all labels in PG_IUCs[3] "1" => ImmutableDict("Γ₁"=>"A"), "-1" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ"), "2" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"B"), "m" => ImmutableDict("Γ₁"=>"A′", "Γ₂"=>"A′′"), "2/m" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺"=>"Bg", "Γ₂⁻"=>"Bᵤ"), "222" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"B₁", "Γ₃"=>"B₃", "Γ₄"=>"B₂"), "mm2" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"B₂", "Γ₄"=>"B₁"), "mmm" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺"=>"B₁g", "Γ₂⁻"=>"B₁ᵤ", "Γ₃⁺"=>"B₃g", "Γ₃⁻"=>"B₃ᵤ", "Γ₄⁺"=>"B₂g", "Γ₄⁻"=>"B₂ᵤ"), "4" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"B", "Γ₃"=>"²E", "Γ₄"=>"¹E"), "-4" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"B", "Γ₃"=>"²E", "Γ₄"=>"¹E"), "4/m" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺"=>"Bg", "Γ₂⁻"=>"Bᵤ", "Γ₃⁺"=>"²Eg", "Γ₃⁻"=>"²Eᵤ", "Γ₄⁺"=>"¹Eg", "Γ₄⁻"=>"¹Eᵤ"), "422" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"B₁", "Γ₃"=>"A₂", "Γ₄"=>"B₂", "Γ₅"=>"E"), "4mm" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"B₁", "Γ₃"=>"B₂", "Γ₄"=>"A₂", "Γ₅"=>"E"), "-42m" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"B₁", "Γ₃"=>"B₂", "Γ₄"=>"A₂", "Γ₅"=>"E"), # setting 1 "-4m2" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"B₁", "Γ₃"=>"B₂", "Γ₄"=>"A₂", "Γ₅"=>"E"), # setting 2 *** see notes below *** # NB: Bilbao has chosen a convention where the Mulliken irrep labels of -4m2 are a bit # strange, at least in one perspective: specifically, the labels do not make sense # when compared to the labels of -42m and break with the usual "Mulliken rules", # (to establish a correspondence between the irrep labels of -4m2 and -42m, one # ought to make the swaps (-4m2 → -42m): B₁ → B₂, B₂ → A₂, A₂ → B₁); the cause of # this is partly also that the Γᵢ labels are permuted seemingly unnecessarily # -42m and -4m2; but this is because those irrep labels are "inherited" from space # groups 111 (P-42m) and 115 (P-4m2); ultimately, Bilbao chooses to retain # consistency between space & point groups and a simple Γᵢ and Mulliken label # matching rule. We follow their conventions; otherwise comparisons are too hard # (and it seems Bilba's conventions are also motivated by matching ISOTROPY's). # The Mulliken label assignment that "makes sense" in comparison to the labels of # -42m is: # `ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"B₁", "Γ₄"=>"B₂", "Γ₅"=>"E")` # More discussion and context in issue #57; and a similar issue affects the irreps # in point group -6m2 "4/mmm" => ImmutableDict("Γ₁⁺"=>"A₁g", "Γ₁⁻"=>"A₁ᵤ", "Γ₂⁺"=>"B₁g", "Γ₂⁻"=>"B₁ᵤ", "Γ₃⁺"=>"A₂g", "Γ₃⁻"=>"A₂ᵤ", "Γ₄⁺"=>"B₂g", "Γ₄⁻"=>"B₂ᵤ", "Γ₅⁺"=>"Eg", "Γ₅⁻"=>"Eᵤ"), "3" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"²E", "Γ₃"=>"¹E"), "-3" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺"=>"²Eg", "Γ₂⁻"=>"²Eᵤ", "Γ₃⁺"=>"¹Eg", "Γ₃⁻"=>"¹Eᵤ"), "312" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"E"), # setting 1 "321" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"E"), # setting 2 "3m1" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"E"), # setting 1 "31m" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"E"), # setting 2 "-31m" => ImmutableDict("Γ₁⁺"=>"A₁g", "Γ₁⁻"=>"A₁ᵤ", "Γ₂⁺"=>"A₂g", "Γ₂⁻"=>"A₂ᵤ", "Γ₃⁺"=>"Eg", "Γ₃⁻"=>"Eᵤ"), # setting 1 "-3m1" => ImmutableDict("Γ₁⁺"=>"A₁g", "Γ₁⁻"=>"A₁ᵤ", "Γ₂⁺"=>"A₂g", "Γ₂⁻"=>"A₂ᵤ", "Γ₃⁺"=>"Eg", "Γ₃⁻"=>"Eᵤ"), # setting 2 "6" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"B", "Γ₃"=>"²E₁", "Γ₄"=>"²E₂", "Γ₅"=>"¹E₁", "Γ₆"=>"¹E₂"), "-6" => ImmutableDict("Γ₁"=>"A′", "Γ₂"=>"A′′", "Γ₃"=>"²E′", "Γ₄"=>"²E′′", "Γ₅"=>"¹E′", "Γ₆"=>"¹E′′"), "6/m" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺"=>"Bg", "Γ₂⁻"=>"Bᵤ", "Γ₃⁺"=>"²E₁g", "Γ₃⁻"=>"²E₁ᵤ", "Γ₄⁺"=>"²E₂g", "Γ₄⁻"=>"²E₂ᵤ", "Γ₅⁺"=>"¹E₁g", "Γ₅⁻"=>"¹E₁ᵤ", "Γ₆⁺"=>"¹E₂g", "Γ₆⁻"=>"¹E₂ᵤ"), "622" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"B₂", "Γ₄"=>"B₁", "Γ₅"=>"E₂", "Γ₆"=>"E₁"), "6mm" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"B₂", "Γ₄"=>"B₁", "Γ₅"=>"E₂", "Γ₆"=>"E₁"), "-62m" => ImmutableDict("Γ₁"=>"A₁′", "Γ₂"=>"A₁′′", "Γ₃"=>"A₂′′", "Γ₄"=>"A₂′", "Γ₅"=>"E′", "Γ₆"=>"E′′"), # setting 1 "-6m2" => ImmutableDict("Γ₁"=>"A₁′", "Γ₂"=>"A₁′′", "Γ₃"=>"A₂′′", "Γ₄"=>"A₂′", "Γ₅"=>"E′", "Γ₆"=>"E′′"), # setting 2 *** see also (*) above for discussion of label "issues" ** "6/mmm" => ImmutableDict("Γ₁⁺"=>"A₁g", "Γ₁⁻"=>"A₁ᵤ", "Γ₂⁺"=>"A₂g", "Γ₂⁻"=>"A₂ᵤ", "Γ₃⁺"=>"B₂g", "Γ₃⁻"=>"B₂ᵤ", "Γ₄⁺"=>"B₁g", "Γ₄⁻"=>"B₁ᵤ", "Γ₅⁺"=>"E₂g", "Γ₅⁻"=>"E₂ᵤ", "Γ₆⁺"=>"E₁g", "Γ₆⁻"=>"E₁ᵤ"), "23" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"¹E", "Γ₃"=>"²E", "Γ₄"=>"T"), "m-3" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺"=>"¹Eg", "Γ₂⁻"=>"¹Eᵤ", "Γ₃⁺"=>"²Eg", "Γ₃⁻"=>"²Eᵤ", "Γ₄⁺"=>"Tg", "Γ₄⁻"=>"Tᵤ"), "432" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"E", "Γ₄"=>"T₁", "Γ₅"=>"T₂"), "-43m" => ImmutableDict("Γ₁"=>"A₁", "Γ₂"=>"A₂", "Γ₃"=>"E", "Γ₄"=>"T₂", "Γ₅"=>"T₁"), "m-3m" => ImmutableDict("Γ₁⁺"=>"A₁g", "Γ₁⁻"=>"A₁ᵤ", "Γ₂⁺"=>"A₂g", "Γ₂⁻"=>"A₂ᵤ", "Γ₃⁺"=>"Eg", "Γ₃⁻"=>"Eᵤ", "Γ₄⁺"=>"T₁g", "Γ₄⁻"=>"T₁ᵤ", "Γ₅⁺"=>"T₂g", "Γ₅⁻"=>"T₂ᵤ") ) const PGIRLABS_CDML2MULLIKEN_3D_COREP = ImmutableDict( # Same as `PGIRLABS_CDML2MULLIKEN_3D` but with labels for physically real irreps # (coreps); the label for real irreps are unchanged, but the labels for complex irreps # differ (e.g. ¹E and ²E becomes E). Point groups 1, -1, 2, m, 2/m, 222, mm2, mmm, 422, # 4mm, -42m, -4m2, 4/mmm, 312, 321, 3m1, 31m, -31m, -3m1, 622, 6mm, -62m, -6m2, 6/mmm, # 432, -43m, and m-3m have only real irreps, so we don't include them here. "4" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"B", "Γ₃Γ₄"=>"E"), "-4" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"B", "Γ₃Γ₄"=>"E"), "4/m" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺"=>"Bg", "Γ₂⁻"=>"Bᵤ", "Γ₃⁺Γ₄⁺"=>"Eg", "Γ₃⁻Γ₄⁻"=>"Eᵤ"), "3" => ImmutableDict("Γ₁"=>"A", "Γ₂Γ₃"=>"E"), "-3" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺Γ₃⁺"=>"Eg", "Γ₂⁻Γ₃⁻"=>"Eᵤ"), "6" => ImmutableDict("Γ₁"=>"A", "Γ₂"=>"B", "Γ₃Γ₅"=>"E₁", "Γ₄Γ₆"=>"E₂"), "-6" => ImmutableDict("Γ₁"=>"A′", "Γ₂"=>"A′′", "Γ₃Γ₅"=>"E′", "Γ₄Γ₆"=>"E′′"), "6/m" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺"=>"Bg", "Γ₂⁻"=>"Bᵤ", "Γ₃⁺Γ₅⁺"=>"E₁g", "Γ₃⁻Γ₅⁻"=>"E₁ᵤ", "Γ₄⁺Γ₆⁺"=>"E₂g", "Γ₄⁻Γ₆⁻"=>"E₂ᵤ"), "23" => ImmutableDict("Γ₁"=>"A", "Γ₂Γ₃"=>"E", "Γ₄"=>"T"), "m-3" => ImmutableDict("Γ₁⁺"=>"Ag", "Γ₁⁻"=>"Aᵤ", "Γ₂⁺Γ₃⁺"=>"Eg", "Γ₂⁻Γ₃⁻"=>"Eᵤ", "Γ₄⁺"=>"Tg", "Γ₄⁻"=>"Tᵤ"), ) """ $(TYPEDSIGNATURES) Return the Mulliken label of a point group irrep `pgir`. ## Notes This functionality is a simple mapping between the tabulated CDML point group irrep labels and associated Mulliken labels [^1], using the listings from the Bilbao Crystallographic Database [^2]. Ignoring subscript, the rough rules associated with assignment of Mulliken labels are: 1. **Irrep dimensionality**: - **1D irreps**: if a real irrep, assign A or B (B if antisymmetric under a principal rotation); if a complex irrep, assigned label ¹E or ²E. - **2D irreps**: assign label E. - **3D irreps**: assign label T. 2. **_u_ and _g_ subscripts**: if the group contains inversion, indicate whether irrep is symmetric (g ~ gerade) or antisymmetric (u ~ ungerade) under inversion. 3. **Prime superscripts**: if the group contains a mirror *m* aligned with a principal rotation axis, but does *not* contain inversion, indicate whether irrep is symmetric (′) or antisymmetric (′′) under this mirror. 4. **Numeral subscripts**: the rules for assignment of numeral subscripts are too complicated in general - and indeed, we are unaware of a general coherent rule -- to describe here. ## References [^1]: Mulliken, Report on Notation for the Spectra of Polyatomic Molecules, [J. Chem. Phys. *23*, 1997 (1955)](https://doi.org/10.1063/1.1740655). [^2]: Bilbao Crystallographic Database's [Representations PG program](https://www.cryst.ehu.es/cgi-bin/cryst/programs/representations_point.pl?tipogrupo=spg). """ function mulliken(pgir::PGIrrep{D}) where D pglab = label(group(pgir)) pgirlab = label(pgir) return _mulliken(pglab, pgirlab, iscorep(pgir)) end function _mulliken(pglab, pgirlab, iscorep) # split up to let `SiteIrrep` overload `mulliken` if iscorep return PGIRLABS_CDML2MULLIKEN_3D_COREP[pglab][pgirlab] else return PGIRLABS_CDML2MULLIKEN_3D[pglab][pgirlab] end end #= # ATTEMPT AT ACTUALLY IMPLEMENTING THE MULLIKEN NOTATION OURSELVES, USING THE "RULES" # UNFORTUNATELY, THERE IS A LACK OF SPECIFICATION OF THESE RULES; THIS E.G. IMPACTS: # - ¹ and ² superscripts to E labels: no rules, whatsoever. Cannot reverse-engineer # whatever the "rule" is (if there is any) that fits all point groups; e.g., rule # seems different between e.g. {4, -4, 4/m} and {6, -6, 23, m-3}. the rule we went # with below works for {4, -4, 4/m}, but not {6, -6, 23, m-3} # - how to infer that a ₁₂₃ subscript to a label is not needed (i.e. that the label # is already unambiguous? there just doesn't seem to be any way to infer this # generally, without looking at all the different irreps at the same time. # - straaange corner cases for A/B label assignment; e.g. -6m2 is all A labels, # but the principal rotation (-6) has characters with both positive and negative # sign; so the only way strictly A-type labels could be assigned if we pick some # other principal rotation, e.g. 3₀₀₁... that doesn't make sense. # - sometimes, subscript assignment differs, e.g. for 622: B₁ vs. B₂. the rule used # to pick subscripts are ambiguous here, because there are two sets of two-fold # rotation operations perpendicular to the principal axis - and they have opposite # signs; so the assignment of ₁₂ subscripts depends on arbitrarily picking one of # these sets. # - more issues probably exist... # BECAUSE OF THIS, WE JUST OPT TO ULTIMATELY JUST NOT IMPLEMENT THIS OURSELVES, AND INSTEAD # RESTRICT OURSELVES TO GETTING THE MULLIKEN NOTATION ONLY FOR TABULATED POINT GROUPS BY # COMPARING WITH THE ASSOCIATED LABELS # # TENTATIVE IMPLEMENTATION: # Rough guidelines are e.g. in http://www.pci.tu-bs.de/aggericke/PC4e/Kap_IV/Mulliken.html & # xuv.scs.illinois.edu/516/handouts/Mulliken%20Symbols%20for%20Irreducible%20Representations.pdf # The "canonical" standard/most explicit resource is probably Pure & Appl. Chem., 69, 1641 # (1997), see e.g. https://core.ac.uk/download/pdf/9423.pdf or Mulliken's own 'Report on # Notation for the Spectra of Polyatomic Molecules' (https://doi.org/10.1063/1.1740655) # # Note that the convention's choices not terribly specific when it comes to cornercases, # such as for B-type labels with 3 indices or E-type labels with 1/2 indices function mulliken(ir::Union{PGIrrep{D}, LGIrrep{D}}) where D D ∈ (1,2,3) || _throw_invalid_dim(D) if ir isa LGIrrep && !issymmorphic(num(ir), D) error("notation not defined for `LGIrrep`s of nonsymmorphic space groups") end g = group(ir) χs = characters(ir) irD = irdim(ir) # --- determine "main" label of the irrep (A, B, E, or T) --- # find all "maximal" (=principal) rotations, including improper ones idxs_principal = find_principal_rotations(g, include_improper=true) op_principal = g[first(idxs_principal)] # a representative principal rotation axis_principal = D == 1 ? nothing : # associcated rotation axis isone(op_principal) ? nothing : D == 2 ? SVector(0,0,1) : #= D == 3 =# rotation_axis_3d(op_principal) lab = if irD == 1 # A or B χ′s = @view χs[idxs_principal] # if character of rotation around _any_ principal rotation axis (i.e. maximum # rotation order) is negative, then label is B; otherwise A. If complex character # label is ¹E or ²E if all(x->isapprox(abs(real(x)), 1, atol=DEFAULT_ATOL), χ′s) # => real irrep any(isapprox(-1, atol=DEFAULT_ATOL), χ′s) ? "B" : "A" else # => complex irrep # must then be a complex rep; label is ¹E or ²E. the convention at e.g. Bilbao # seems to be to (A) pick a principal rotation with positive sense ("⁺"), # then (B) look at its character, χ, then (C) if Imχ < 0 => assign ¹ # superscript, if Imχ > 0 => assign ² superscript. this is obviously a very # arbitrary convention, but I guess it's as good as any idx⁺ = findfirst(idx->seitz(g[idx])[end] == '⁺', idxs_principal) idx⁺ === nothing && (idx⁺ = 1) # in case of 2-fold rotations where 2⁺ = 2⁻ imag(χ′s[idx⁺]) < 0 ? "¹E" : "²E" end elseif irD == 2 # E (reality is always real for PGIrreps w/ irD = 3) "E" elseif irD == 3 # T (reality is always real for PGIrreps w/ irD = 3) "T" else throw(DomainError(irD, "the dimensions of a crystallographic point group irrep "* "is expected to be between 1 and 3")) # in principle, 4 => "G" and 5 => "H", but irreps of dimension larger than 3 never # arise for crystallographic point groups; not even when considering time-reversal end # --> number subscript ₁, ₂, ₃ # NOTE: these rules are very messy and also not well-documented; it is especially # bad for E and T labels; there, I've just inferred a rule that works for the # crystallographic point groups, simply by comparing to published tables (e.g., # Bilbao and http://symmetry.jacobs-university.de/) if axis_principal !== nothing if lab == "A" || lab == "B" # ordinarily, we can follow a "simple" scheme - but there is an arbitrary # choice involved when we have point groups 222 or mmm - where we need to assign # 3 different labels to B-type irreps # special rules needed for "222" (C₂) and "mmm" (D₂ₕ) groups # check B-type label and point group 222 [identity + 3×(2-fold rotation)] or # mmm [identity + 3×(2-fold rotation + mirror) + inversion] istricky_B_case = if lab == "B" (length(g)==4 && count(op->rotation_order(op)==2, g) == 3) || # 222 (length(g)==8 && count(op->abs(rotation_order(op))==2, g) == 6) # mmm else false end if !istricky_B_case # simple scheme: # find a 2-fold rotation or mirror (h) whose axis is ⟂ to principal axis: # χ(h) = +1 => ₁ # χ(h) = -1 => ₂ idxᴬᴮ = if D == 3 findfirst(g) do op abs(rotation_order(op)) == 2 && dot(rotation_axis_3d(op), axis_principal) == 0 end elseif D == 2 findfirst(op -> rotation_order(op) == -2, g) end if idxᴬᴮ !== nothing lab *= real(χs[idxᴬᴮ]) > 0 ? '₁' : '₂' end else # tricky B case (222 or mmm) # there's no way to do this independently of a choice of setting; we just # follow what seems to be the norm and _assume_ the presence of 2₀₀₁, 2₀₁₀, # and 2₁₀₀; if they don't exist, things will go bad! ... no way around it idxˣ = findfirst(op->seitz(op)=="2₁₀₀", g) idxʸ = findfirst(op->seitz(op)=="2₀₁₀", g) idxᶻ = findfirst(op->seitz(op)=="2₀₀₁", g) if idxˣ === nothing || idxʸ === nothing || idxᶻ === nothing error("cannot assign tricky B-type labels for nonconventional axis settings") end χsˣʸᶻ = (χs[idxˣ], χs[idxʸ], χs[idxᶻ]) lab *= χsˣʸᶻ == (-1,-1,+1) ? '₁' : χsˣʸᶻ == (-1,+1,-1) ? '₂' : χsˣʸᶻ == (+1,-1,-1) ? '₃' : error("unexpected character combination") end elseif lab == "E" || lab == "¹E" || lab == "²E" # TODO # disambiguation needed for pgs 6 (C₆), 6/m (C₆ₕ), 622 (D₆), 6mm (C₆ᵥ), # 6/mmm (D₆ₕ) # rule seems to be that we look at the 2-fold rotation operation aligned with # the principal axis; denoting this operation by 2, the rule is: # χ(2) = -1 => E₁ # χ(2) = +1 => E₂ idxᴱ = findfirst(g) do op rotation_order(op) == 2 && (D==2 || rotation_axis_3d(op) == axis_principal) end if idxᴱ !== nothing lab *= real(χs[idxᴱ]) < 0 ? '₁' : '₂' end elseif lab == "T" # disambiguation of T symbols is only needed for 432 (O), -43m (Td) and m-3m # (Oₕ) pgs; the disambiguation can be done by checking the sign of the character # of a principal rotation; which in this case is always a 4-fold proper or # improper rotation ±4, the rule thus is: # χ(±4) = -1 => T₂ # χ(±4) = +1 => T₁ # to avoid also adding unnecessary subscripts to pgs 23 and m-3 (whose T-type # irreps are already disambiguated), we check if the principal rotation has # order 4 - if not, this automatically excludes 23 and m-3. if abs(rotation_order(op_principal)) == 4 # we only need to check a single character; all ±4 rotations have the same # character in this cornercase lab *= real(χs[first(idxs_principal)]) > 0 ? '₁' : '₂' end end end # --> letter subscript g, ᵤ and prime superscript ′, ′′ idx_inversion = findfirst(op -> isone(-rotation(op)), g) if idx_inversion !== nothing # --> letter subscript g, ᵤ # rule applies for groups with inversion -1: # χ(-1) = +1 => _g [gerade ~ even] # χ(-1) = -1 => ᵤ [ungerade ~ odd] lab *= real(χs[idx_inversion]) > 0 ? 'g' : 'ᵤ' elseif length(g) > 1 # --> prime superscript ′, ′′ # rule applies for groups without inversion and with a mirror aligned with a # principal rotation axis; most often m₀₀₁ in 3D _or_ for the 2-element group # consisting only of {1, "mᵢⱼₖ"}. Denoting the mirror by "m", the rule is: # χ(m) = +1 => ′ # χ(m) = -1 => ′′ # rule is relevant only for point groups m, -6, -62m in 3D and m in 2D idxᵐ = if length(g) == 2 findfirst(op -> occursin("m", seitz(op)), g) # check if {1, "mᵢⱼₖ"} case elseif D == 3 # mirror aligned with principal axis casecan now assume that D == 3 # (only occurs if D = 3; so if D = 2, we just move on) findfirst(g) do op # find aligned mirror (rotation_order(op) == -2) && (rotation_axis_3d(op) == axis_principal) end end if idxᵐ !== nothing lab *= real(χs[idxᵐ]) > 0 ? "′" : "′′" end end return lab end =# """ $(TYPEDSIGNATURES) Return the the indices of the "maximal" rotations among a set of operations `ops`, i.e. those of maximal order (the "principal rotations"). ## Keyword arguments - `include_improper` (`=false`): if `true`, improper rotations are included in the consideration. If the order of improper and proper rotations is identical, only the indices of the proper rotations are returned. If the maximal (signed) rotation order is -2 (a mirror), it is ignored, and the index of the identity operation is returned. """ function find_principal_rotations(ops::AbstractVector{SymOperation{D}}; include_improper::Bool=false) where D # this doesn't distinguish between rotation direction; i.e., picks either ⁺ or ⁻ # depending on ordering of `ops`. if there are no rotations, then we expect that there # will at least always be an identity operation - otherwise, we throw an error # may pick either a proper or improper rotation; picks a proper rotation if max order # of proper rotation exceeds order of max improper rotation rots = rotation_order.(ops) maxrot = maximum(rots) # look for proper rotations rot = if include_improper minrot = minimum(rots) # look for improper rotations maxrot ≥ abs(minrot) ? maxrot : (minrot == -2 ? maxrot : minrot) else maxrot end idxs = findall(==(rot), rots) return idxs::Vector{Int} end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
5599
# ---------------------------------------------------------------------------------------- # # POINT GROUPS const PG_ORDERs = ImmutableDict( # PG_ORDERs[iuc] == order(pointgroup(iuc, D)) (for all D) "1" => 1, "-1" => 2, "2" => 2, "m" => 2, "2/m" => 4, # unique axes b setting "222" => 4, "mm2" => 4, "mmm" => 8, "4" => 4, "-4" => 4, "4/m" => 8, "422" => 8, "4mm" => 8, "-42m" => 8, "-4m2" => 8, # D₂d setting variations "4/mmm" => 16, "3" => 3, "-3" => 6, "312" => 6, "321" => 6, # D₃ setting variations (hexagonal axes) "3m1" => 6, "31m" => 6, # C₃ᵥ setting variations (hexagonal axes) "-31m" => 12, "-3m1" => 12, # D₃d setting variations (hexagonal axes) "6" => 6, "-6" => 6, "6/m" => 12, "622" => 12, "6mm" => 12, "-62m" => 12, "-6m2" => 12, # D₃ₕ setting variations "6/mmm" => 24, "23" => 12, "m-3" => 24, "432" => 24, "-43m" => 24, "m-3m" => 48 ) # ---------------------------------------------------------------------------------------- # # SPACE GROUPS const SG_ORDERs = ( # SG_ORDERs[D][n] == order(spacegroup(n, D)) # ----- D=1 ----- [ 1, 2], # ----- D=2 ----- [ 1, 2, 2, 2, 4, 4, 4, 4, 8, 4, 8, 8, 3, 6, 6, 6, 12], # ----- D=3 ----- [ 1, 2, 2, 2, 4, 2, 2, 4, 4, 4, 4, 8, 4, 4, 8, 4, 4, 4, 4, 8, 8, 16, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 32, 32, 16, 16, 16, 16, 4, 4, 4, 4, 8, 8, 4, 8, 8, 8, 8, 8, 16, 16, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 3, 3, 3, 9, 6, 18, 6, 6, 6, 6, 6, 6, 18, 6, 6, 6, 6, 18, 18, 12, 12, 12, 12, 36, 36, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 24, 24, 24, 12, 48, 24, 12, 24, 24, 24, 96, 96, 48, 24, 48, 24, 24, 96, 96, 48, 24, 24, 48, 24, 96, 48, 24, 96, 48, 48, 48, 48, 48, 192, 192, 192, 192, 96, 96] ) const SG_PRIMITIVE_ORDERs = ( # SG_ORDERs[D][n] == order(primitivize(spacegroup(n, D))) # ----- D=1 ----- SG_ORDERs[1], # no centered lattices # ----- D=2 ----- [ 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 8, 8, 3, 6, 6, 6, 12], # ----- D=3 ----- [ 1, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 24, 24, 24, 12, 12, 12, 12, 12, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48] ) # ---------------------------------------------------------------------------------------- # # SUBPERIODIC GROUPS subg_index(D,P) = fld(D*P+1,2) # hashmap of (D,P) → idx: (2,1) → 1, (3,1) → 2, (3,2) → 3 const SUBG_ORDERs = (# SUBG_ORDERs[subg_index(D,P)][n] == order(subperiodicgroup(n, D, P)) # ----- D=2, P=1 (frieze groups) ----- [ 1, 2, 2, 2, 2, 4, 4], # ----- D=3, P=1 (rod groups) ----- [ 1, 2, 2, 2, 2, 4, 4, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 3, 3, 3, 6, 6, 6, 6, 6, 6, 12, 12, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 24, 24, 24], # ----- D=3, P=2 (layer groups) ----- [ 1, 2, 2, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 3, 6, 6, 6, 6, 6, 12, 12, 6, 6, 12, 12, 12, 12, 12, 24] ) const SUBG_PRIMITIVE_ORDERs = ( # SUBG_PRIMITIVE_ORDERs[subg_index(D,P)][n] == order(primitivize(subperiodicgroup(n,D,P))) # ----- D=2, P=1 ----- SUBG_ORDERs[subg_index(2,1)], # no centered lattices # ----- D=3, P=1 ----- SUBG_ORDERs[subg_index(3,1)], # no centered lattices [# ----- D=3, P=2 ----- 1, 2, 2, 2, 2, 4, 4, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 3, 6, 6, 6, 6, 6, 12, 12, 6, 6, 12, 12, 12, 12, 12, 24], )
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
27272
# ===== CONSTANTS ===== # We include several axes settings; as a result, there are more than 32 point groups # under the 3D case, because some variations are "setting-degenerate" (but are needed # to properly match all space group settings) const PG_NUM2IUC = ( (["1"], ["m"]), # 1D (["1"], ["2"], ["m"], ["mm2"], ["4"], ["4mm"], ["3"], # 2D ["3m1", "31m"], # C₃ᵥ setting variations ["6"], ["6mm"]), (["1"], ["-1"], ["2"], ["m"], ["2/m"], ["222"], ["mm2"], # 3D ["mmm"], ["4"], ["-4"], ["4/m"], ["422"], ["4mm"], ["-42m", "-4m2"], # D₂d setting variations ["4/mmm"], ["3"], ["-3"], ["312", "321"], # D₃ setting variations (hexagonal axes) ["3m1", "31m"], # C₃ᵥ setting variations (hexagonal axes) ["-31m", "-3m1"], # D₃d setting variations (hexagonal axes) ["6"], ["-6"], ["6/m"], ["622"], ["6mm"], ["-62m", "-6m2"], # D₃ₕ setting variations ["6/mmm"], ["23"], ["m-3"], ["432"], ["-43m"], ["m-3m"]) ) # a flat tuple-listing of all the iuc labels in PG_NUM2IUC; sliced across dimensions const PG_IUCs = map(x->collect(Iterators.flatten(x)), PG_NUM2IUC) # a tuple of ImmutableDicts, giving maps from iuc label to point group number const PG_IUC2NUM = tuple([ImmutableDict([lab=>findfirst(∋(lab), PG_NUM2IUC[D]) for lab in PG_IUCs[D]]...) for D in (1,2,3)]...) # The IUC notation for point groups can be mapped to the Schoenflies notation, but the # mapping is not one-to-one but rather one-to-many; e.g. 3m1 and 31m maps to C₃ᵥ but # correspond to different axis orientations. # When there is a choice of either hexagonal vs. rhombohedral or unique axes b vs unique # axes a/c we choose hexagonal and unique axes b, respectively. const PG_IUC2SCHOENFLIES = ImmutableDict( "1" => "C₁", "-1" => "Cᵢ", "2" => "C₂", "m" => "Cₛ", "2/m" => "C₂ₕ", # unique axes b setting "222" => "D₂", "mm2" => "C₂ᵥ", "mmm" => "D₂ₕ", "4" => "C₄", "-4" => "S₄", "4/m" => "C₄ₕ", "422" => "D₄", "4mm" => "C₄ᵥ", "-42m" => "D₂d", "-4m2" => "D₂d", # D₂d setting variations "4/mmm" => "D₄ₕ", "3" => "C₃", "-3" => "C₃ᵢ", "312" => "D₃", "321" => "D₃", # D₃ setting variations (hexagonal axes) "3m1" => "C₃ᵥ", "31m" => "C₃ᵥ", # C₃ᵥ setting variations (hexagonal axes) "-31m" => "D₃d", "-3m1" => "D₃d", # D₃d setting variations (hexagonal axes) "6" => "C₆", "-6" => "C₃ₕ", "6/m" => "C₆ₕ", "622" => "D₆", "6mm" => "C₆ᵥ", "-62m" => "D₃ₕ", "-6m2" => "D₃ₕ", # D₃ₕ setting variations "6/mmm" => "D₆ₕ", "23" => "T", "m-3" => "Tₕ", "432" => "O", "-43m" => "Td", "m-3m" => "Oₕ" ) # ===== METHODS ===== # --- Notation --- function pointgroup_iuc2num(iuclab::String, D::Integer) pgnum = get(PG_IUC2NUM[D], iuclab, nothing) if pgnum === nothing throw(DomainError(iuclab, "invalid point group IUC label")) else return pgnum end end schoenflies(pg::PointGroup) = PG_IUC2SCHOENFLIES[iuc(pg)] @inline function pointgroup_num2iuc(pgnum::Integer, Dᵛ::Val{D}, setting::Integer) where D @boundscheck D ∉ (1,2,3) && _throw_invalid_dim(D) @boundscheck 1 ≤ pgnum ≤ length(PG_NUM2IUC[D]) || throw(DomainError(pgnum, "invalid pgnum; out of bounds of Crystalline.PG_NUM2IUC")) iucs = @inbounds PG_NUM2IUC[D][pgnum] @boundscheck 1 ≤ setting ≤ length(iucs) || throw(DomainError(setting, "invalid setting; out of bounds of Crystalline.PG_NUM2IUC[pgnum]")) return @inbounds iucs[setting] end # --- POINT GROUPS VS SPACE & LITTLE GROUPS --- function find_parent_pointgroup(g::AbstractGroup{D}) where D # Note: this method will only find parent point groups with the same setting (i.e. # basis) as `g` *and* with the same operator sorting. From a more general # perspective, one might be interested in finding any isomorphic parent point # group (that is achieved by `find_isomorphic_parent_pointgroup`). xyzt_pgops = sort!(xyzt.(pointgroup(g))) @inbounds for iuclab in PG_IUCs[D] P = pointgroup(iuclab, D) if sort!(xyzt.(P)) == xyzt_pgops # the sorting/xyzt isn't strictly needed; belts & buckles... return P end end return nothing end # --- POINT GROUP IRREPS --- _unmangle_pgiuclab(iuclab) = replace(iuclab, "/"=>"_slash_") # loads 3D point group data from the .jld2 file opened in `PGIRREPS_JLDFILE` function _load_pgirreps_data(iuclab::String) jldgroup = PGIRREPS_JLDFILE[][_unmangle_pgiuclab(iuclab)] matrices::Vector{Vector{Matrix{ComplexF64}}} = jldgroup["matrices"] realities::Vector{Int8} = jldgroup["realities"] cdmls::Vector{String} = jldgroup["cdmls"] return matrices, realities, cdmls end # 3D """ pgirreps(iuclab::String, ::Val{D}=Val(3); mullikken::Bool=false) where D ∈ (1,2,3) pgirreps(iuclab::String, D; mullikken::Bool=false) Return the (crystallographic) point group irreps of the IUC label `iuclab` of dimension `D` as a `Vector{PGIrrep{D}}`. See `Crystalline.PG_IUC2NUM[D]` for possible IUC labels in dimension `D`. ## Notation The irrep labelling follows the conventions of CDML [^1] [which occasionally differ from those in e.g. Bradley and Cracknell, *The Mathematical Theory of Symmetry in Solids* (1972)]. To use Mulliken ("spectroscopist") irrep labels instead, set the keyword argument `mulliken = true` (default, `false`). See also [`mulliken`](@ref). ## Data sources The data is sourced from the Bilbao Crystallographic Server [^2]. If you are using this functionality in an explicit fashion, please cite the original reference [^3]. ## References [^1]: Cracknell, Davies, Miller, & Love, Kronecher Product Tables 1 (1979). [^2]: Bilbao Crystallographic Database's [Representations PG program](https://www.cryst.ehu.es/cgi-bin/cryst/programs/representations_point.pl?tipogrupo=spg). [^3]: Elcoro et al., [J. of Appl. Cryst. **50**, 1457 (2017)](https://doi.org/10.1107/S1600576717011712) """ function pgirreps(iuclab::String, ::Val{3}=Val(3); mulliken::Bool=false) pg = pointgroup(iuclab, Val(3)) # operations matrices, realities, cdmls = _load_pgirreps_data(iuclab) pgirlabs = !mulliken ? cdmls : _mulliken.(Ref(iuclab), cdmls, false) return Collection(PGIrrep{3}.(pgirlabs, Ref(pg), matrices, Reality.(realities))) end # 2D function pgirreps(iuclab::String, ::Val{2}; mulliken::Bool=false) pg = pointgroup(iuclab, Val(2)) # operations # Because the operator sorting and setting is identical* between the shared point groups # of 2D and 3D, we can just do a whole-sale transfer of shared irreps from 3D to 2D. # (*) Actually, "2" and "m" have different settings in 2D and 3D; but they just have two # operators and irreps each, so the setting difference doesn't matter. # That the settings and sorting indeed agree between 2D and 3D is tested in # scripts/compare_pgops_3dvs2d.jl matrices, realities, cdmls = _load_pgirreps_data(iuclab) pgirlabs = !mulliken ? cdmls : _mulliken.(Ref(iuclab), cdmls, false) return Collection(PGIrrep{2}.(pgirlabs, Ref(pg), matrices, Reality.(realities))) end # 1D function pgirreps(iuclab::String, ::Val{1}; mulliken::Bool=false) pg = pointgroup(iuclab, Val(1)) # Situation in 1D is sufficiently simple that we don't need to bother with loading from # a disk; just branch on one of the two possibilities if iuclab == "1" matrices = [[fill(one(ComplexF64), 1, 1)]] cdmls = ["Γ₁"] elseif iuclab == "m" matrices = [[fill(one(ComplexF64), 1, 1), fill(one(ComplexF64), 1, 1)], # even [fill(one(ComplexF64), 1, 1), -fill(one(ComplexF64), 1, 1)]] # odd cdmls = ["Γ₁", "Γ₂"] else throw(DomainError(iuclab, "invalid 1D point group IUC label")) end pgirlabs = !mulliken ? cdmls : _mulliken.(Ref(iuclab), cdmls, false) return Collection(PGIrrep{1}.(pgirlabs, Ref(pg), matrices, REAL)) end pgirreps(iuclab::String, ::Val{D}; kws...) where D = _throw_invalid_dim(D) # if D ∉ (1,2,3) pgirreps(iuclab::String, D::Integer; kws...) = pgirreps(iuclab, Val(D); kws...) function pgirreps(pgnum::Integer, Dᵛ::Val{D}=Val(3); setting::Integer=1, kws...) where D iuc = pointgroup_num2iuc(pgnum, Dᵛ, setting) return pgirreps(iuc, Dᵛ; kws...) end function pgirreps(pgnum::Integer, D::Integer; kws...) return pgirreps(pgnum, Val(D); kws...) :: Collection{<:PGIrrep} end function ⊕(pgir1::PGIrrep{D}, pgir2::PGIrrep{D}) where D if label(group(pgir1)) ≠ label(group(pgir2)) || order(pgir1) ≠ order(pgir2) error("The direct sum of two PGIrreps requires identical point groups") end pgirlab = label(pgir1)*"⊕"*label(pgir2) g = group(pgir1) T = eltype(eltype(pgir1.matrices)) z12 = zeros(T, irdim(pgir1), irdim(pgir2)) z21 = zeros(T, irdim(pgir2), irdim(pgir1)) matrices = [[m1 z12; z21 m2] for (m1, m2) in zip(pgir1.matrices, pgir2.matrices)] reality = UNDEF iscorep = pgir1.iscorep || pgir2.iscorep return PGIrrep{D}(pgirlab, g, matrices, reality, iscorep) end # ---------------------------------------------------------------------------------------- # """ find_isomorphic_parent_pointgroup(g::AbstractVector{SymOperation{D}}) --> PointGroup{D}, Vector{Int}, Bool Given a group `g` (or a collection of operators, defining a group), identifies a "parent" point group that is isomorphic to `g`. Three variables are returned: - `pg`: the identified "parent" point group, with operators sorted to match the sorting of `g`'s operators. - `Iᵖ²ᵍ`: a permutation vector which transforms the standard sorting of point group operations (as returned by [`pointgroup(::String)`](@ref)) to the operator sorting of `g`. - `equal`: a boolean, identifying whether the point group parts of `g` operations are identical (`true`) or merely isomorphic to the point group operations in `g`. In practice, this indicates whether `pg` and `g` are in the same setting or not. ## Implementation The identification is made partly on the basis of comparison of operators (this is is sufficient for the `equal = true` case) and partly on the basis of comparison of multiplication tables (`equal = false` case); the latter can be combinatorially slow if the sorting of operators is unlucky (i.e., if permutation between sortings in `g` and `pg` differ by many pairwise permutations). Beyond mere isomorphisms of multiplication tables, the search also guarantees that all rotation orders are shared between `pg` and `g`; similarly, the rotation senses (e.g., 4⁺ & 4⁻ have opposite rotation senses or directions) are shared. This disambiguates point groups that are intrinsically isomorphic to eachother, e.g. "m" and "-1", but which still differ in their spatial interpretation. ## Properties The following properties hold for `g`, `pg`, and `Iᵖ²ᵍ`: ```jl pg, Iᵖ²ᵍ, equal = find_isomorphic_parent_pointgroup(g) @assert MultTable(pg) == MultTable(pointgroup(g)) pg′ = pointgroup(label(pg), dim(pg)) # "standard" sorting @assert pg′[Iᵖ²ᵍ] == pg ``` If `equal = true`, the following also holds: ```jl pointgroup(g) == operations(pg) == operations(pg′)[Iᵖ²ᵍ] ``` ## Example ```jl sgnum = 141 wp = wyckoffs(sgnum, Val(3))[end] # 4a Wyckoff position sg = spacegroup(sgnum, Val(3)) siteg = sitegroup(sg, wp) pg, Iᵖ²ᵍ, equal = find_isomorphic_parent_pointgroup(siteg) ``` """ function find_isomorphic_parent_pointgroup(g::AbstractVector{SymOperation{D}}) where D Nᵍ = length(g) Nᵍ == 1 && isone(first(g)) && return pointgroup("1", Val(D)), [1], true # a site group is always similar to a point group (i.e. a group w/o translations); it # can be transformed to that setting by transforming each element g∈`siteg` as t⁻¹∘g∘t # where t denotes translation by the site group's wyckoff position. In practice, we can # just "drop the translation" parts to get the same result though; this is faster g′ = pointgroup(g) # get rid of any repeated point group operations, if they exist ordersᵍ = rotation_order_and_sense.(g′) # first sorting step: by rotation order Iᵍ = sortperm(ordersᵍ) permute!(ordersᵍ, Iᵍ) permute!(g′, Iᵍ) # identify rotation orders as indexing groups I_groups = _find_equal_groups_in_sorted(ordersᵍ) # -------------------------------------------------------------------------------------- # first, we check if we literally have the exact same group operations; in that case # we can check for group equality rather than isomorphism, and get combinatorial speedup # since we don't have to attempt a search over permutations of multiplication tables Iᵖ = Vector{Int}(undef, Nᵍ) ordersᵖ = Vector{Tuple{Int, Int}}(undef, Nᵍ) for iuclab in PG_IUCs[D] pg = _fast_path_necessary_checks!(iuclab, ordersᵖ, Iᵖ, Nᵍ, ordersᵍ, Val(D)) isnothing(pg) && continue # check if there is a permutation of operators that makes `g` and `pg` equal bool, permᵖ²ᵍ = _has_equal_pg_operations(g′, pg, I_groups, nothing) bool || continue # we have a match: compute "unwinding" compound permutation, s.t. `g ~ pg[Iᵖ²ᵍ]` Iᵖ²ᵍ = invpermute!(permute!(Iᵖ, permᵖ²ᵍ), Iᵍ) # Iᵖ[permᵖ²ᵍ][invperm(Iᵍ)], but faster invpermute!(permute!(pg.operations, permᵖ²ᵍ), Iᵍ) # sort `pg` to match `g` return pg, Iᵖ²ᵍ, true end # -------------------------------------------------------------------------------------- # if there is a rotation order with only one element, which is not simply the identity, # then we can compare that element directly with an associated point group element, # even if we are in different settings: whatever the mapping is between them, it will be # uniquely defined (up to a sign); so if this the case, we can do the "exact check" # also for groups that are related by an orthogonal transformation unique_op_idx_into_I_groups = findfirst(I_groups) do I_group length(I_group) == 1 || return false isone(g′[I_group[1]]) && return false return true end if !isnothing(unique_op_idx_into_I_groups) unique_op_idx = only(I_groups[something(unique_op_idx_into_I_groups)]) # into `g′` unique_opᵍ = g′[unique_op_idx] unique_Wᵍ = rotation(unique_opᵍ) for iuclab in PG_IUCs[D] pg = _fast_path_necessary_checks!(iuclab, ordersᵖ, Iᵖ, Nᵍ, ordersᵍ, Val(D)) isnothing(pg) && continue # compute the unique transformation between the two group's "unique" elements # s.t. `unique_Wᵖ = transformation * unique_Wᵍ * transformation⁻¹` unique_Wᵖ = rotation(pg[unique_op_idx]) transformation = find_similarity_transform(unique_Wᵍ, unique_Wᵖ) # check if there is a permutation of operators that makes `g` and `pg` equal bool, permᵖ²ᵍ = _has_equal_pg_operations(g′, pg, I_groups, transformation) bool || continue # we have a match: compute "unwinding" compound permutation, s.t. `g ~ pg[Iᵖ²ᵍ]` Iᵖ²ᵍ = invpermute!(permute!(Iᵖ, permᵖ²ᵍ), Iᵍ) # = Iᵖ[permᵖ²ᵍ][invperm(Iᵍ)] invpermute!(permute!(pg.operations, permᵖ²ᵍ), Iᵍ) # sort `pg` to match `g` return pg, Iᵖ²ᵍ, false end end # -------------------------------------------------------------------------------------- # if we arrived here, the group is not equal to any group in our "storage", so we must # make do with finding an isomorphic group; this is potentially much more demanding # because we have to check all (meaningful) permutations of the multiplication tables; # for some groups, this is practically impossible (even with the tricks we play to # reduce the combinatorial explosion into a product of smaller combinatorial problems). # fortunately, for the space groups we are interested in, the earlier equality check # takes care of bad situations like that. # we deliberately split this into a separate loop (even though it incurs a bit of # repetive work) because we'd prefer to return an identical group rather than an # isomorphic group, if that is at all possible mtᵍ = MultTable(g′).table for iuclab in PG_IUCs[D] # NB: in principle, this could probably be sped up a lot by using subgroup relations # to "group up" meaningful portions (in addition to grouping by rotation order) pg = _fast_path_necessary_checks!(iuclab, ordersᵖ, Iᵖ, Nᵍ, ordersᵍ, Val(D)) isnothing(pg) && continue # create `pg`'s multiplication table, "order-sorted" mtᵖ = MultTable(pg).table # rigorous, slow, combinatorial search P = rigorous_isomorphism_search(I_groups, mtᵍ, mtᵖ) if P !== nothing # found isomorphic point group! # compute "combined/unwound indexing" Iᵖ²ᵍ of Iᵍ, Iᵖ, and P, where Iᵖ²ᵍ has # produces g ~ pg[Iᵖ²ᵍ] in the sense that they have the same character table # and same rotation orders. We can get that by noting that we already have # g[Iᵍ] ~ pg[Iᵖ[P]], and then `invperm` gets us the rest of the way. Iᵖ²ᵍ = invpermute!(permute!(Iᵖ, P), Iᵍ) # = Iᵖ[P][invperm(Iᵍ)], but faster invpermute!(permute!(pg.operations, P), Iᵍ) # sort pg to match g return pg, Iᵖ²ᵍ, false end end error("could not find an isomorphic parent point group") end """ _find_equal_groups_in_sorted(v::AbstractVector) --> Vector{UnitRange} Returns indices into groups of equal values in `v`. Input `v` *must* be sorted so that identical values are adjacent. ## Example ```jl _find_equal_groups_in_sorted([-4,1,1,3,3,3]) # returns [1:1, 2:3, 4:6] ``` """ function _find_equal_groups_in_sorted(v::AbstractVector) vᵘ = unique(v) Nᵘ, N = length(vᵘ), length(v) idx_groups = Vector{UnitRange{Int}}(undef, Nᵘ) start = stop = 1 for (i,o) in enumerate(vᵘ) while stop < N && v[stop+1] == o stop += 1 end idx_groups[i] = start:stop stop += 1 start = stop end return idx_groups end # checks two necessary (but not sufficient) conditions for a reference (point) group ("g"; # specified by its order `Nᵍ` and sorted rotation-order-&-sense vector `ordersᵍ`) to be # isomorphic to the conventional point group ("p") with label `iuclab` and dimension `D`; # the rotation-order-&-sense values of `pg` are written into `ordersᵖ` which is mutated # (provided the first check succeeds); similarly, the sorting-permutation is written into # `Iᵖ` in mutating fashion # if the conditions are not met, we can bail early to save time, returning `nothing` - but # if they are met, we return the rotation-order-&-sense sorted point group operations `pg` # associated with `iuclab` as well as a permutation vector `Iᵖ` that implements the sorting function _fast_path_necessary_checks!( iuclab::AbstractString, ordersᵖ::Vector{Tuple{Int, Int}}, # ← mutated: must be `similar` to `ordersᵍ` Iᵖ::Vector{Int}, # ← mutated: must have same length as `ordersᵍ` Nᵍ::Integer, ordersᵍ::Vector{Tuple{Int, Int}}, Dᵛ::Val{D} where D ) # fast-path check: number of group elements (order) must agree PG_ORDERs[iuclab] == Nᵍ || return nothing # go ahead and load the point group operations for closer inspection pg = pointgroup(iuclab, Dᵛ) # copare in rotation-order-&-sense-sorting + check if they agree between "g" and "p" ordersᵖ .= rotation_order_and_sense.(pg) sortperm!(Iᵖ, ordersᵖ) permute!(ordersᵖ, Iᵖ) ordersᵍ == ordersᵖ || return nothing # checks passed; return point group rotation-order-&-sense-sorted permute!(pg.operations, Iᵖ) return pg end # check if the group `g′` has the same operations as the point group with label `iuclab`, # possibly with in a different sorting function _has_equal_pg_operations( g′::AbstractVector{SymOperation{D}}, pg::AbstractVector{SymOperation{D}}, I_groups::AbstractVector{<:AbstractVector{<:Integer}}, transformation::Union{Nothing, AbstractMatrix{<:Real}} # ↑ assumes mapping `Ref(pg) = transformation .* Ref(g′) .* inv(transformation)` ) where D # check if the group operations literally are equal, but (maybe) just shuffled permᵖ²ᵍ = Vector{Int}(undef, sum(length, I_groups)) for I_group in I_groups for i in I_group opᵢ = if isnothing(transformation) g′[i] else transform(g′[i], transformation) # `transformation * g′[i] * transformation⁻¹` end idx = findfirst(≈(opᵢ), (@view pg[I_group])) idx === nothing && return false, permᵖ²ᵍ # ... not equal permᵖ²ᵍ[i] = idx + I_group[1] - 1 end end return true, permᵖ²ᵍ end """ $TYPEDSIGNATURES --> Matrix{Int} Returns a multiplication table derived from `mt` but under a reordering permutation `P` of the operator indices in `mt`. In practice, this corresponds to a permutation of the rows and columns of `mt` as well as a subsequent relabelling of elements via `P`. ## Example ```jl pg = pointgroup("-4m2", Val(3)) mt = MultTable(pg) P = [2,3,1,4,5,8,6,7] # permutation of operator indices mt′ = permute_multtable(mt.table, P) mt′ == MultTable(pg[P]).table ``` """ function permute_multtable(mt::Matrix{Int}, P::AbstractVector{Int}) replace!(mt[P, P], (P .=> Base.OneTo(length(P)))...) end # this is a rigorous search; it checks every possible permutation of each "order group". # it is much faster (sometimes by ~14 orders of magnitude) than a naive permutation search # which doesn't divide into "order groups" first, but can still be intractably slow (e.g. # for site groups of space group 216). function rigorous_isomorphism_search(I_orders::AbstractVector{<:AbstractVector{Int}}, mtᵍ::Matrix{Int}, mtᵖ::Matrix{Int}, Jᵛ::Val{J}=Val(length(I_orders))) where J # we're using `j` as the rotation-order-group index below J == length(I_orders) || throw(DimensionMismatch("static parameter and length must match")) Ns = ntuple(j->factorial(length(I_orders[j])), Jᵛ) P = Vector{Int}(undef, sum(length, I_orders)) # loop over all possible products of permutations of the elements of I_orders (each a # vector); effectively, this is a kroenecker product of permutations. In total, there # are `prod(Iⱼ -> factorial(length(Iⱼ), I_orders)` such permutations; this is much less # than a brute-force search over permutations that doesn't exploit groupings (with # `factorial(sum(length, I_orders))`) - but it can still be overwhelming occassionally ns_prev = zeros(Int, J) for ns in CartesianIndices(Ns) # TODO: This should be done in "blocks" of equal order: i.e., there is no point in # exploring permutations of I_orders[j+1] etc. if the current permutation of # I_orders[j] isn't matching up with mtᵍ - this could give very substantial # scaling improvements since it approximately turns a `prod(...` above into a # `sum(...` for j in Base.OneTo(J) nⱼ = ns[j] if nⱼ != ns_prev[j] Iⱼ = I_orders[j] P[Iⱼ] .= nthperm(Iⱼ, nⱼ) ns_prev[j] = nⱼ end end mtᵖ′ = permute_multtable(mtᵖ, P) if mtᵍ == mtᵖ′ return P # found a valid isomorphism (the permutation) between mtᵍ and mtᵖ end end return nothing # failed to find an isomorphism (because there wasn't any!) end function rotation_order_and_sense(op::SymOperation{D}) where D r = rotation_order(op) D == 1 && return (r, 0) # no "rotation sense" in 1D; `0` as sentinel o = abs(r) if o ≤ 2 # no rotation sense for identity, mirrors, 2-fold rotation, or inversion return (r, 0) # use `0` as sentinel end # henceforth, `o > 2`, and it is possible to define a ±1 (left/right) sense relative to # an axis; the calculation below is borrowed from `seitz` (TODO: consolidate) W = rotation(op) detW = det(W) if D == 2 # augment to be 3×3 for ease of implementation W = @inbounds SMatrix{3,3,Float64,9}( # build by column (= [W zeros(2); 0 0 1]) W[1], W[2], 0.0, W[3], W[4], 0.0, 0.0, 0.0, 1.0) end # --- rotation axis --- u = if D == 2 SVector{3,Int}(0, 0, 1) else # D == 3 rotation_axis_3d(rotation(op), detW, o) end # --- rotation sense --- # ±-rotation sense is determined from sign of det(𝐙) where 𝐙 ≡ [𝐮|𝐱|det(𝐖)𝐖𝐱] # with 𝐱 an arbitrary vector that is not parallel to 𝐮. [ITA6 vol. A, p. 16, sec. # 1.2.2.4(1)(c)] x = rand(-1:1, SVector{3, Int}) while iszero(x×u) # check that generated 𝐱 is not parallel to 𝐮 (if it is, 𝐱×𝐮 = 0) x = rand(-1:1, SVector{3, Int}) iszero(u) && error("rotation axis has zero norm; input is likely invalid") end Z = hcat(u, x, detW*(W*x)) sense_float = sign(det(Z)) sense = round(Int, sense_float) sense_float ≈ sense || error("rotation sense is not an integer; unexpected failure") return (r, sense) end # find_similarity_transform(X, Y) --> Matrix{<:Real} # Given two similar (diagonalizable) matrices, `X` and `Y`, find an orthogonal # transformation matrix `P` s.t. `Y = P⁻¹XP`. Errors if `X` and `Y` are not similar. # The idea works like this: denote by `Λ` the (identical, by necessity of being similar) # eigenvalue matrix of `X` and `Y` and by `Vˣ` and `Vʸ` the associated (invertible) # eigenvector matrices. Then `X = VˣΛ(Vˣ)⁻¹` and `Y = VʸΛ(Vʸ)⁻¹` and equivalently # `(Vʸ)⁻¹YVʸ = Λ = (Vˣ)⁻¹XVˣ`; left- & right-multiplying this relation by `Vʸ` & `(Vʸ)⁻¹`, # respectively, gives `Vʸ(Vʸ)⁻¹YVʸ(Vʸ)⁻¹ = Y = Vʸ(Vˣ)⁻¹XVˣ(Vʸ)⁻¹ = [Vʸ(Vˣ)⁻¹]X[Vˣ(Vʸ)⁻¹]`, # which, finally, by comparison with `Y = P⁻¹XP` lets us identify `P = Vʸ(Vˣ)⁻¹`. # If `X` and `Y` are real symmetric matrices, we have `(Vˣʸ)⁻¹ = (Vˣʸ)ᵀ` (i.e., orthogonal # eigenvector matrices), in which case the transformation is also orthogonal (`Pᵀ=P⁻¹`). function find_similarity_transform(X, Y) eˣ = eigen(X); eʸ = eigen(Y) if !(eˣ.values ≈ eʸ.values) error("matrices `X` and `Y` are not similar; a basis change between `X` and `Y` does not exist") end Vˣ = eˣ.vectors; Vʸ = eʸ.vectors P = Vˣ*inv(Vʸ) if P isa Matrix{<:Real} # oftentimes, the eigendecomposition will simply be real already return P else # we don't want to be working with complex matrices, and physically, this should never # occur, so we check here and error if we have non-negligible imaginary entries if sum(abs∘imag, P) > DEFAULT_ATOL error("non-neglible imaginary parts in transformation matrix") end return real(P) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2040
# Generated by SnoopCompile using # tinf = @snoopi_deep begin # using Crystalline # D = 3 # for D in 3:-1:2 # spacegroup(MAX_SGNUM[D], Val(D)) # lgirreps(MAX_SGNUM[D], Val(D)) # directbasis(MAX_SGNUM[D], Val(D)) # wyckoffs(MAX_SGNUM[D], Val(D)) # pointgroup(PG_IUCs[D][end], Val(D)) # bandreps(MAX_SGNUM[D], D) # characters(lgirreps(MAX_SGNUM[D], Val(D))["Γ"]) # MultTable(primitivize(littlegroups(MAX_SGNUM[D], Val(D))["Γ"])) # conventionalize(primitivize(spacegroup(MAX_SGNUM[D], Val(D)))[end], centering(MAX_SGNUM[D], D)) # end # KVec("0,0,1/2"); KVec("0,1/2") # seitz(SymOperation("-x,-y,-z+1")); seitz(SymOperation("-x,-y+1/2")) # end # julia> ttot, pcs = SnoopCompile.parcel(tinf; tmin=0.05) # julia> SnoopCompile.write("src/precompile.jl", pcs[end][end][end]) # # I then manually removed several of the methods that "ping" the on disk (e.g., # `spacegroup`, `lgirreps`, `bandreps`, `littlegroups`) since they seem to # invalidate themselves on package load (they all depend on some global state via the # currently non-relocatable files they load data from; maybe they need to be Artifacts to # not do that?). In addition, I manually removed several other precompile statements that # ultimately seemed to cause _increased_ latency (again, perhaps due to invalidation). # What remains is rather modest, but I think a net, albeit modest, win. function _precompile_() ccall(:jl_generating_output, Cint, ()) == 1 || return nothing Base.precompile(Tuple{typeof(seitz),SymOperation{3}}) # time: 0.9289543 Base.precompile(Tuple{typeof(characters),Vector{LGIrrep{3}}}) # time: 0.5580262 Base.precompile(Tuple{typeof(characters),Vector{LGIrrep{2}}}) # time: 0.1106631 Base.precompile(Tuple{Type{SymOperation},String}) # time: 0.1149793 end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
23333
# ---------------------------------------------------------------------------------------- # # SymOperation function show(io::IO, ::MIME"text/plain", op::AbstractOperation{D}) where D opseitz, opxyzt = seitz(op), xyzt(op) print(io, opseitz) # don't print triplet & matrix format if the IOContext is :compact=>true if get(io, :compact, false) return nothing end # --- print triplet expression --- printstyled(io, " ", repeat('─',max(38-length(opseitz)-length(opxyzt), 1)), " (", opxyzt, ")"; color=:light_black) println(io) # --- print matrix --- # info that is needed before we start writing by column τstrs = fractionify.(translation(op), false) Nsepτ = maximum(length, τstrs) firstcol_hasnegative = any(_has_negative_sign_and_isnonzero, @view matrix(op)[:,1]) for i in 1:D printstyled(io, " ", i == 1 ? '┌' : (i == D ? '└' : '│'), color=:light_black) # open brace char for j in 1:D c = matrix(op)[i,j] # assume and exploit that a valid symop (in the lattice basis only!) never has an # entry that is more than two characters long (namely, -1) in its rotation parts sep = repeat(' ', 1 + (j ≠ 1 || firstcol_hasnegative) - _has_negative_sign_and_isnonzero(c)) if isinteger(c) cᴵ = convert(Int, matrix(op)[i,j]) printstyled(io, sep, cᴵ, color=:light_black) else # just use the same sep even if the symop is specified in a nonstandard basis (e.g. # cartesian); probably isn't a good general solution, but good enough for now printstyled(io, sep, round(c; digits=4), color=:light_black) end end printstyled(io, " ", i == 1 ? "╷" : (i == D ? "╵" : "┆"), " ", repeat(' ', Nsepτ-length(τstrs[i])), τstrs[i], " ", color=:light_black) printstyled(io, i == 1 ? '┐' : (i == D ? '┘' : '│'), color=:light_black) # close brace char op isa MSymOperation && i == 1 && timereversal(op) && print(io, '′') i ≠ D && println(io) end return nothing end _has_negative_sign_and_isnonzero(x) = !iszero(x) && signbit(x) # print vectors of `SymOperation`s compactly show(io::IO, op::AbstractOperation) = print(io, seitz(op)) # ---------------------------------------------------------------------------------------- # # MultTable function show(io::IO, ::MIME"text/plain", mt::MultTable) summary(io, mt) println(io, ":") seitz_ops = seitz.(mt.operations) pretty_table(io, getindex.(Ref(seitz_ops), mt.table); row_labels = seitz_ops, header = seitz_ops, vlines = [1,], hlines = [:begin, 1, :end] ) return nothing end # ---------------------------------------------------------------------------------------- # # AbstractVec function show(io::IO, ::MIME"text/plain", v::AbstractVec) cnst, free = parts(v) print(io, '[') if isspecial(v) for i in eachindex(cnst) coord = cnst[i] == -0.0 ? 0.0 : cnst[i] # normalize -0.0 to 0.0 prettyprint_scalar(io, coord) # prepare for next coordinate/termination i == length(cnst) ? print(io, ']') : print(io, ", ") end else for i in eachindex(cnst) # constant/fixed parts if !iszero(cnst[i]) || iszero(@view free[i,:]) # don't print zero, if it adds unto anything nonzero coord = cnst[i] == -0.0 ? 0.0 : cnst[i] # normalize -0.0 to 0.0 prettyprint_scalar(io, coord) end # free-parameter parts for j in eachindex(cnst) if !iszero(free[i,j]) sgn = signaschar(free[i,j]) if !(iszero(cnst[i]) && sgn=='+' && iszero(free[i,1:j-1])) # don't print '+' if nothing precedes it print(io, sgn) end if abs(free[i,j]) != oneunit(eltype(free)) # don't print prefactors of 1 prettyprint_scalar(io, abs(free[i,j])) end print(io, j==1 ? 'α' : (j == 2 ? 'β' : 'γ')) end end # prepare for next coordinate/termination i == length(cnst) ? print(io, ']') : print(io, ", ") end end return end # print arrays of `AbstractVec`s compactly show(io::IO, v::AbstractVec) = show(io, MIME"text/plain"(), v) function prettyprint_scalar(io, v::Real) if isinteger(v) print(io, Int(v)) else # print all fractions divisible by 2, ..., 10 as fractions, and everything else # as decimal rv = rationalize(Int, v; tol=1e-2) if isapprox(v, rv; atol=DEFAULT_ATOL) print(io, rv.num, "/", rv.den) else print(io, v) end end end function show(io::IO, ::MIME"text/plain", wp::WyckoffPosition) print(io, wp.mult, wp.letter, ": ") # TODO: This is `=` elsewhere; change? show(io, MIME"text/plain"(), parent(wp)) end # ---------------------------------------------------------------------------------------- # # AbstractGroup function summary(io::IO, g::AbstractGroup) print(io, typeof(g)) _print_group_descriptor(io, g; prefix=" ") print(io, " with ", order(g), " operations") end function show(io::IO, ::MIME"text/plain", g::AbstractGroup) if !haskey(io, :compact) io = IOContext(io, :compact => true) end summary(io, g) println(io, ':') for (i, op) in enumerate(g) print(io, ' ') show(io, MIME"text/plain"(), op) if i < order(g); println(io); end end end function show(io::IO, g::AbstractGroup) print(io, '[') join(io, g, ", ") print(io, ']') end function show(io::IO, g::Union{LittleGroup, SiteGroup}) print(io, '[') join(io, g, ", ") print(io, ']') printstyled(io, " (", position(g), ")", color=:light_black) end function _print_group_descriptor(io::IO, g::AbstractGroup; prefix::AbstractString="") print(io, prefix) g isa GenericGroup && return nothing print(io, "⋕") join(io, num(g), '.') # this slightly odd approach to treat magnetic groups also print(io, " (", label(g), ")") if position(g) !== nothing print(io, " at ") print(io, fullpositionlabel(g)) end return nothing end function _group_descriptor(g; prefix::AbstractString="") return sprint( (io, _g) -> _print_group_descriptor(io, _g; prefix), g) end # ---------------------------------------------------------------------------------------- # # AbstractIrrep function show(io::IO, ::MIME"text/plain", ir::AbstractIrrep) irlab = label(ir) lablen = length(irlab) nindent = lablen+1 prettyprint_header(io, irlab) prettyprint_irrep_matrices(io, ir, nindent) end function show(io::IO, ir::AbstractIrrep) print(io, label(ir)) end # ... utilities to print PGIrreps and LGIrreps function prettyprint_group_header(io::IO, g::AbstractGroup) print(io, "⋕", num(g), " (", iuc(g), ")") if g isa LittleGroup print(io, " at " , klabel(g), " = ") show(io, MIME"text/plain"(), position(g)) end println(io) end function prettyprint_scalar_or_matrix(io::IO, printP::AbstractMatrix, prefix::AbstractString, ϕabc_contrib::Bool=false, digits::Int=4) if size(printP) == (1,1) # scalar case v = @inbounds printP[1] prettyprint_irrep_scalars(io, v, ϕabc_contrib; digits) else # matrix case formatter(x) = _stringify_characters(x; digits) # FIXME: not very optimal; e.g. makes a whole copy and doesn't handle displaysize compact_print_matrix(io, printP, prefix, formatter) end end function prettyprint_irrep_scalars( io::IO, v::Number, ϕabc_contrib::Bool=false; atol::Real=DEFAULT_ATOL, digits::Int=4 ) if norm(v) < atol print(io, 0) elseif isapprox(v, real(v), atol=atol) # real scalar if ϕabc_contrib && isapprox(abs(real(v)), 1.0, atol=atol) signbit(real(v)) && print(io, '-') else print(io, _stringify_characters(real(v); digits)) end elseif isapprox(v, imag(v)*im, atol=atol) # imaginary scalar if ϕabc_contrib && isapprox(abs(imag(v)), 1.0, atol=atol) signbit(imag(v)) && print(io, '-') else print(io, _stringify_characters(imag(v); digits)) end print(io, "i") else # complex scalar (print as polar) vρ, vθ = abs(v), angle(v) vθ /= π isapprox(vρ, 1.0, atol=atol) || print(io, _stringify_characters(vρ; digits)) print(io, "exp(") if isapprox(abs(vθ), 1.0, atol=atol) signbit(vθ) && print(io, '-') else print(io, _stringify_characters(vθ; digits)) end print(io, "iπ)") #print(io, ϕabc_contrib ? "(" : "", v, ϕabc_contrib ? ")" : "") end end function prettyprint_irrep_matrix( io::IO, lgir::LGIrrep, i::Integer, prefix::AbstractString; digits::Int=4 ) # unpack k₀, kabc = parts(position(group(lgir))) P = lgir.matrices[i] τ = lgir.translations[i] # phase contributions ϕ₀ = dot(k₀, τ) # constant phase ϕabc = [dot(kabcⱼ, τ) for kabcⱼ in eachcol(kabc)] # variable phase ϕabc_contrib = norm(ϕabc) > sqrt(dim(lgir))*DEFAULT_ATOL # print the constant part of the irrep that is independent of α,β,γ printP = abs(ϕ₀) < DEFAULT_ATOL ? P : cis(2π*ϕ₀)*P # avoids copy if ϕ₀≈0; copies otherwise prettyprint_scalar_or_matrix(io, printP, prefix, ϕabc_contrib) # print the variable phase part that depends on the free parameters α,β,γ if ϕabc_contrib nnzabc = count(c->abs(c)>DEFAULT_ATOL, ϕabc) print(io, "exp") if nnzabc == 1 print(io, "(") i = findfirst(c->abs(c)>DEFAULT_ATOL, ϕabc) c = ϕabc[i] signbit(c) && print(io, "-") if !(abs(c) ≈ 0.5) # do not print if multiplicative factor is 1 print(io, _stringify_characters(abs(2c); digits)) end print(io, "iπ", 'ΰ'+i, ")") # prints 'α', 'β', and 'γ' for i = 1, 2, and 3, respectively ('ΰ'='α'-1) else print(io, "[iπ(") first_nzidx = true for (i,c) in enumerate(ϕabc) if abs(c) > DEFAULT_ATOL if first_nzidx signbit(c) && print(io, '-') first_nzidx = false else print(io, signaschar(c)) end if !(abs(c) ≈ 0.5) # do not print if multiplicative factor is 1 print(io, _stringify_characters(abs(2c); digits)) end print(io, 'ΰ'+i) # prints 'α', 'β', and 'γ' for i = 1, 2, and 3, respectively ('ΰ'='α'-1) end end print(io, ")]") end end end function prettyprint_irrep_matrix( io::IO, ir::Union{<:PGIrrep, <:SiteIrrep}, i::Integer, prefix::AbstractString ) P = ir.matrices[i] prettyprint_scalar_or_matrix(io, P, prefix, false) end function prettyprint_irrep_matrices( io::IO, ir::Union{<:LGIrrep, <:PGIrrep, <:SiteIrrep}, nindent::Integer, nboxdelims::Integer=45 ) indent = repeat(" ", nindent) boxdelims = repeat("─", nboxdelims) linelen = nboxdelims + 4 + nindent Nₒₚ = order(ir) for (i,op) in enumerate(operations(ir)) print(io, indent, " ├─ ") opseitz, opxyzt = seitz(op), xyzt(op) printstyled(io, opseitz, ": ", repeat("─", linelen-11-nindent-length(opseitz)-length(opxyzt)), " (", opxyzt, ")\n"; color=:light_black) print(io, indent, " │ ") prettyprint_irrep_matrix(io, ir, i, indent*" │ ") if i < Nₒₚ; println(io, '\n', indent, " │"); end end print(io, "\n", indent, " └", boxdelims) end function prettyprint_header(io::IO, irlab::AbstractString, nboxdelims::Integer=45) println(io, irlab, " ─┬", repeat("─", nboxdelims)) end # ---------------------------------------------------------------------------------------- # # Collection{<:AbstractIrrep} function summary(io::IO, c::Collection{T}) where T <: AbstractIrrep print(io, length(c), "-element Collection{", T, "}") end function show(io::IO, ::MIME"text/plain", c::Collection{T}) where T <: AbstractIrrep summary(io, c) isassigned(c, firstindex(c)) && _print_group_descriptor(io, group(first(c)); prefix=" for ") println(io, ":") for i in eachindex(c) if isassigned(c, i) show(io, MIME"text/plain"(), c[i]) else print(io, " #undef") end i ≠ length(c) && println(io) end end function show(io::IO, c::Collection{T}) where T <: AbstractIrrep show(io, c.vs) g = group(first(c)) if position(g) !== nothing printstyled(io, " (", fullpositionlabel(g), ")"; color=:light_black) end end # ---------------------------------------------------------------------------------------- # # CharacterTable function show(io::IO, ::MIME"text/plain", ct::AbstractCharacterTable) chars = matrix(ct) chars_formatted = _stringify_characters.(chars; digits=4) ops = operations(ct) println(io, typeof(ct), " for ", tag(ct), ":") # type name and space group/k-point tags pretty_table(io, chars_formatted; # row/column names row_labels = seitz.(ops), # seitz labels header = labels(ct), # irrep labels tf = tf_unicode, vlines = [1,], hlines = [:begin, 1, :end] ) if ct isa ClassCharacterTable _print_class_representatives(io, ct) end end function _print_class_representatives(io::IO, ct::ClassCharacterTable) maxlen = maximum(length∘seitz∘first, classes(ct)) print(io, "Class representatives:") for class in classes(ct) print(io, "\n ") for (i, op) in enumerate(class)# op_str = seitz(op) if i == 1 printstyled(io, op_str; bold=true) length(class) ≠ 1 && print(io, " "^(maxlen-length(op_str)), " : ") else printstyled(io, op_str; color=:light_black) i ≠ length(class) && printstyled(io, ", "; color=:light_black) end end end end function _stringify_characters(c::Number; digits::Int=4) c′ = round(c; digits) cr, ci = reim(c′) if iszero(ci) # real isinteger(cr) && return string(Int(cr)) return string(cr) elseif iszero(cr) # imaginary isinteger(ci) && return string(Int(ci))*"im" return string(ci)*"im" else # complex (isinteger(cr) && isinteger(ci)) && return _complex_as_compact_string(Complex{Int}(cr,ci)) return _complex_as_compact_string(c′) end end function _complex_as_compact_string(c::Complex) # usual string(::Complex) has spaces; avoid that io = IOBuffer() print(io, real(c), signaschar(imag(c)), abs(imag(c)), "im") return String(take!(io)) end # ---------------------------------------------------------------------------------------- # # BandRep function prettyprint_symmetryvector( io::IO, irvec::AbstractVector{<:Real}, irlabs::Vector{String}; braces::Bool=true) Nⁱʳʳ = length(irlabs) Nⁱʳʳ′ = length(irvec) if !(Nⁱʳʳ′ == Nⁱʳʳ || Nⁱʳʳ′ == Nⁱʳʳ+1) # we allow irvec to exceed the dimension of irlabs by 1, in case it includes dim(BR) throw(DimensionMismatch("irvec and irlabs must have matching dimensions")) end braces && print(io, '[') first_nz = true group_klab = klabel(first(irlabs)) for idx in 1:Nⁱʳʳ # shared prepwork irlab = irlabs[idx] klab = klabel(irlab) if klab ≠ group_klab # check if this irrep belongs to a new k-label group first_nz = true group_klab = klab print(io, ", ") end c = irvec[idx] # coefficient of current term c == 0 && continue # early stop if the coefficient is zero absc = abs(c) if first_nz # first nonzero entry in a k-label group if abs(c) == 1 c == -1 && print(io, '-') else print(io, c) end first_nz = false else # entry that is added/subtracted from another irrep print(io, signaschar(c)) if absc ≠ 1 print(io, absc) end end print(io, irlab) end braces && print(io, ']') end function symvec2string(irvec::AbstractVector{<:Real}, irlabs::Vector{String}; braces::Bool=true) io = IOBuffer() prettyprint_symmetryvector(io, irvec, irlabs; braces=braces) return String(take!(io)) end summary(io::IO, BR::BandRep) = print(io, dim(BR), "-band BandRep (", label(BR), " at ", position(BR), ")") function show(io::IO, ::MIME"text/plain", BR::BandRep) summary(io, BR) print(io, ":\n ") prettyprint_symmetryvector(io, BR, irreplabels(BR)) end function show(io::IO, BR::BandRep) prettyprint_symmetryvector(io, BR, irreplabels(BR)) end # ---------------------------------------------------------------------------------------- # # BandRepSet function show(io::IO, ::MIME"text/plain", brs::BandRepSet) Nⁱʳʳ = length(irreplabels(brs)) Nᵉᵇʳ = length(brs) # print a "title" line and the irrep labels println(io, "BandRepSet (⋕", num(brs), "): ", length(brs), " BandReps, ", "sampling ", Nⁱʳʳ, " LGIrreps ", "(spin-", isspinful(brs) ? "½" : "1", " ", brs.timereversal ? "w/" : "w/o", " TR)") # print band representations as table k_idx = (i) -> findfirst(==(klabel(irreplabels(brs)[i])), klabels(brs)) # highlighters h_odd = Highlighter((data,i,j) -> i≤Nⁱʳʳ && isodd(k_idx(i)), crayon"light_blue") h_μ = Highlighter((data,i,j) -> i==Nⁱʳʳ+1, crayon"light_yellow") pretty_table(io, # table contents stack(brs); # row/column names row_labels = vcat(irreplabels(brs), "μ"), header = (position.(brs), chop.(label.(brs), tail=2)), # remove repetitive "↑G" postfix # options/formatting/styling formatters = (v,i,j) -> iszero(v) ? "·" : string(v), vlines = [1,], hlines = [:begin, 1, Nⁱʳʳ+1, :end], row_label_alignment = :l, alignment = :c, highlighters = (h_odd, h_μ), header_crayon = crayon"bold" # TODO: Would be nice to highlight the `row_labels` in a style matching the contents, # but not possible atm (https://github.com/ronisbr/PrettyTables.jl/issues/122) ) # print k-vec labels print(io, " KVecs: ") join(io, klabels(brs), ", ") end # ---------------------------------------------------------------------------------------- # # SymmetryVector function Base.show(io :: IO, ::MIME"text/plain", n :: SymmetryVector) print(io, length(n)-1, "-irrep ", typeof(n), ":\n ") show(io, n) end function Base.show(io :: IO, n :: SymmetryVector) print(io, "[") for (i, (mults_k, lgirs_k)) in enumerate(zip(n.multsv, n.lgirsv)) str = if !iszero(mults_k) Crystalline.symvec2string(mults_k, label.(lgirs_k); braces=false) else # if there are no occupied irreps at the considered k-point print "0kᵢ" "0" * klabel(first(lgirs_k)) * "ᵢ" end printstyled(io, str; color=iseven(i) ? :normal : :light_blue) i ≠ length(n.multsv) && print(io, ", ") end print(io, "]") printstyled(io, " (", occupation(n), " band", abs(occupation(n)) ≠ 1 ? "s" : "", ")"; color=:light_black) end # ---------------------------------------------------------------------------------------- # # NewBandRep function Base.show(io :: IO, ::MIME"text/plain", br :: NewBandRep) print(io, length(br.n)-1, "-irrep ", typeof(br), ":\n ") print(io, "(", ) printstyled(io, label(position(br.siteir)); bold=true) print(io, "|") printstyled(io, label(br.siteir); bold=true) print(io, "): ") show(io, br.n) end function Base.show(io :: IO, br :: NewBandRep) print(io, "(", label(position(br.siteir)), "|", label(br.siteir), ")") end # ---------------------------------------------------------------------------------------- # # Collection{<:NewBandRep} function Base.show(io :: IO, ::MIME"text/plain", brs :: Collection{<:NewBandRep}) irlabs = irreplabels(brs) Nⁱʳʳ = length(irlabs) # print a "summary" line print(io, length(brs), "-element ", typeof(brs), " for ⋕", num(brs)) print(io, " (", iuc(num(brs), dim(brs)), ") ") print(io, "over ", Nⁱʳʳ, " irreps") print(io, " (spin-", first(brs).spinful ? "½" : "1", " w/", first(brs).timereversal ? "" : "o", "TR):") println(io) # print band representations as table k_idx = (i) -> findfirst(==(klabel(irreplabels(brs)[i])), klabels(brs)) # highlighters h_odd = Highlighter((data,i,j) -> i≤Nⁱʳʳ && isodd(k_idx(i)), crayon"light_blue") h_μ = Highlighter((data,i,j) -> i==Nⁱʳʳ+1, crayon"light_yellow") pretty_table(io, # table contents stack(brs); # row/column names row_labels = vcat(irlabs, "μ"), header = (label.(position.(brs)), label.(getfield.(brs, :siteir))), # options/formatting/styling formatters = (v,i,j) -> iszero(v) ? "·" : string(v), vlines = [1,], hlines = [:begin, 1, Nⁱʳʳ+1, :end], row_label_alignment = :l, alignment = :c, highlighters = (h_odd, h_μ), header_crayon = crayon"bold" # TODO: Would be nice to highlight the `row_labels` in a style matching the contents, # but not possible atm (https://github.com/ronisbr/PrettyTables.jl/issues/122) ) end # ---------------------------------------------------------------------------------------- # # CompositeBandRep function Base.show(io::IO, cbr::CompositeBandRep{D}) where D first = true for (j, c) in enumerate(cbr.coefs) iszero(c) && continue absc = abs(c) if first first = false c < 0 && print(io, "-") else print(io, " ", Crystalline.signaschar(c), " ") end if !isone(absc) if isinteger(absc) print(io, Int(absc)) else print(io, "(", numerator(absc), "/", denominator(absc), ")×") end end print(io, cbr.brs[j]) end first && print(io, "0") end function Base.show(io::IO, ::MIME"text/plain", cbr::CompositeBandRep{D}) where D println(io, length(irreplabels(cbr)), "-irrep ", typeof(cbr), ":") print(io, " ") show(io, cbr) μ = occupation(cbr) printstyled(io, " (", μ, " band", abs(μ) ≠ 1 ? "s" : "", ")", color=:light_black) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
39471
# The basic goal of this endeavor is only to find the k-points and irreps that # are missing in ISOTROPY still belong to representation domain Φ (ISOTROPY all points from # the basic domain Ω and some - but not all - from Φ). # TODO: Unfortunately, it doesn't currently work. # --- STRUCTS --- struct KVecMapping kᴬlab::String kᴮlab::String op::SymOperation end function show(io::IO, ::MIME"text/plain", kvmap::KVecMapping) println(io, kvmap.kᴬlab, " => ", kvmap.kᴮlab, " via R = ", xyzt(kvmap.op)) end # --- HARDCODED CONSTANTS --- # Cached results of `Tuple(tuple(_find_holosymmetric_sgnums(D)...) for D = 1:3)` HOLOSYMMETRIC_SGNUMS = ( (2,), # 1D (2, 6, 7, 8, 9, 11, 12, 17), # 2D (2, 10, 11, 12, 13, 14, 15, 47, 48, 49, 50, 51, 52, 53, 54, 55, # 3D 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 166, 167, 191, 192, 193, 194, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230) ) # Holosymmetric point group labels (get corresponding point groups from `pointgroup(...)`) # ordered in ascending point group order (number of operators). # For 3D, we used Table 2 of J. Appl. Cryst. (2018). 51, 1481–1491 (https://doi.org/10.1107/S1600576718012724) # For 2D and 1D, the cases can be inferred from case-by-case enumeration. const HOLOSYMMETRIC_PG_IUCLABs = ( ("m",), # 1D ("2", "mm2", "4mm", "6mm"), # 2D ("-1", "2/m", "mmm", "-31m", "-3m1", "4/mmm", "6/mmm", "m-3m") # 3D ) # Table 1 of J. Appl. Cryst. (2018). 51, 1481–1491 (https://doi.org/10.1107/S1600576718012724) const HOLOSYMMETRIC_PG_FOR_BRAVAISTYPE = ImmutableDict( "aP" => ["-1"], # (not ideal to be using Vector here, but meh...) (("mP", "mC") .=> Ref(["2/m"]))..., (("oP", "oI", "oF", "oC") .=> Ref(["mmm"]))..., "hR" => ["-31m","-3m1"], # special case: two possible settings (-31m and -3m1) "hP" => ["6/mmm"], (("tP", "tI") .=> Ref(["4/mmm"]))..., (("cP", "cI", "cF") .=> Ref(["m-3m"]))... ) # Mnemonized/cached data from calling # Tuple(tuple(getindex.(_find_arithmetic_partner.(1:MAX_SGNUM[D], D), 2)...) for D in 1:3) const ARITH_PARTNER_GROUPS = ( (1,2), # 1D (1,2,3,3,5,6,6,6,9,10,11,11,13,14,15,16,17), # 2D (1,2,3,3,5,6,6,8,8,10,10,12,10,10,12,16,16,16,16,21,21,22,23,23,25,25,25,25,25,25,25,25,25,25, # 3D 35,35,35,38,38,38,38,42,42,44,44,44,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,65,65,65, 65,65,65,69,69,71,71,71,71,75,75,75,75,79,79,81,82,83,83,83,83,87,87,89,89,89,89,89,89,89,89, 97,97,99,99,99,99,99,99,99,99,107,107,107,107,111,111,111,111,115,115,115,115,119,119,121,121, 123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,139,139,139,139,143,143,143,146, 147,148,149,150,149,150,149,150,155,156,157,156,157,160,160,162,162,164,164,166,166,168,168,168, 168,168,168,174,175,175,177,177,177,177,177,177,183,183,183,183,187,187,189,189,191,191,191,191, 195,196,197,195,197,200,200,202,202,204,200,204,207,207,209,209,211,207,207,211,215,216,217,215, 216,217,221,221,221,221,225,225,225,225,229,229) ) # Orphan space group numbers in (3D only) const ORPHAN_SGNUMS = ( (198,), # type (a) in B&C p. 414 (76, 78, 144, 145, 151, 152, 153, 154, 169, 170, 171, 172), # type (b) (91, 95, 92, 96, 178, 179, 180, 181, 212, 213), # type (c); no new k-vecs though (205,) # type (d) ) # The group to supergroups (G => G′) map from CDML Table 4.1; necessary to # construct the irrep mapping for orphans of type (a) and (b). In addition, # we include a translation vector p that is necessary in order to ensure the # same setting for group/supergroups (only relevant for sgnums 151-154). const ORPHAN_AB_SUPERPARENT_SGNUMS = ImmutableDict( # group sgnum => (supergroup sgnum, transformation translation p [rotation P = "x,y,z" for all]) 76 => (91, zeros(3)), 78 => (95, zeros(3)), 144 => (178, zeros(3)), 145 => (179, zeros(3)), 151 => (181, [0.0,0.0,1/3]), # cf. www.cryst.ehu.es/cryst/minsup.html 152 => (178, [0.0,0.0,1/6]), 153 => (180, [0.0,0.0,1/6]), 154 => (179, [0.0,0.0,1/3]), 169 => (178, zeros(3)), 170 => (179, zeros(3)), 171 => (180, zeros(3)), 172 => (181, zeros(3)), 198 => (212, zeros(3)) ) # Dict of group (G) => supergroup (G₀) relations, along with their transformation operators, # for tricky corner cases that cannot be treated by a naïve subgroup check which # doesn't account for the changes in crystal setting between space groups (centering, # orientation etc.); this is rather tedious. We manually read off the appropriate # supergroups - and picked one from the list of holosymmetric sgs - and then subsequently # manually verified that that choice makes G a normal/invariant of G₀, i.e. that G◁G₀. # This extraction was done using Bilbao's MINSUP program (www.cryst.ehu.es/cryst/minsup.html), # so the setting is already consistent with ITA. # Abbreviations below: min-sup-sg ≡ minimal (normal and holosymmetric) supergroup const CORNERCASES_SUBSUPER_NORMAL_SGS = Crystalline.ImmutableDict( # group sgnum => (supergroup sgnum, transformation rotation P, transformation translation p) 17 => (51, copy.(unpack(SymOperation{3}("z,x,y")))...), # min-sup-sg 26 => (51, copy.(unpack(SymOperation{3}("z,x,y")))...), # min-sup-sg 28 => (51, copy.(unpack(SymOperation{3}("x,-z,y")))...), # min-sup-sg 29 => (54, copy.(unpack(SymOperation{3}("-z,y,x+1/4")))...), # min-sup-sg 30 => (52, copy.(unpack(SymOperation{3}("z,x+1/4,y+1/4")))...), # min-sup-sg 33 => (52, copy.(unpack(SymOperation{3}("x+1/4,z,-y+1/4")))...), # min-sup-sg 38 => (63, copy.(unpack(SymOperation{3}("y,z,x+1/4")))...), # min-sup-sg 39 => (64, copy.(unpack(SymOperation{3}("y+1/4,z,x+1/4")))...), # min-sup-sg 40 => (63, copy.(unpack(SymOperation{3}("-z,y,x")))...), # min-sup-sg 41 => (64, copy.(unpack(SymOperation{3}("-z,y,x")))...), # min-sup-sg 43 => (70, copy.(unpack(SymOperation{3}("z,x+3/8,y+3/8")))...), # min-sup-sg 46 => (72, copy.(unpack(SymOperation{3}("-z,y,x+1/4")))...), # min-sup-sg 80 => (141, copy.(unpack(SymOperation{3}("x+1/2,y+3/4,z")))...), # NOT min-sup-sg: instead, a cycle through 88=>141 which ensures normality/invariance 86 => (133, copy.(unpack(SymOperation{3}("x,y+1/2,z")))...), # min-sup-sg 88 => (141, copy.(unpack(SymOperation{3}("x,y+1/2,z")))...), # min-sup-sg 90 => (127, copy.(unpack(SymOperation{3}("x,y+1/2,z")))...), # min-sup-sg 98 => (141, copy.(unpack(SymOperation{3}("x,y+1/4,z+3/8")))...), # min-sup-sg 109 => (141, copy.(unpack(SymOperation{3}("x,y+1/4,z")))...), # min-sup-sg 110 => (142, copy.(unpack(SymOperation{3}("x,y+1/4,z")))...), # min-sup-sg 122 => (141, copy.(unpack(SymOperation{3}("x,y+1/4,z+3/8")))...), # min-sup-sg 210 => (227, copy.(unpack(SymOperation{3}("x+3/8,y+3/8,z+3/8")))...) # min-sup-sg ) # Transformation matrices from CDML to ITA settings include(joinpath(DATA_DIR, "misc/transformation_matrices_CDML2ITA.jl")) # ⇒ defines TRANSFORMS_CDML2ITA::ImmutableDict # --- FUNCTIONS --- function is_orphan_sg(sgnum::Integer, D::Integer=3) D ≠ 3 && _throw_1d2d_not_yet_implemented(D) # 2D not considered in CDML for orphantypeidx in eachindex(ORPHAN_SGNUMS) sgnum ∈ ORPHAN_SGNUMS[orphantypeidx] && return orphantypeidx end return 0 # ⇒ not an orphan end """ _find_holosymmetric_sgnums(D::Integer) We compute the list of holosymmetric space group numbers by first finding the "maximal" arithmetic point group of each Bravais type (looping through all the space groups in that Bravais type); then we subsequently compare the arithmetic point groups of each space group to this maximal (Bravais-type-specific) point group; if they agree the space group is holosymmetric. See `is_holosymmetric` for description of holosymmetric space groups and of their connection to the representation and basic domains Φ and Ω. """ function _find_holosymmetric_sgnums(D::Integer) bravaistypes = bravaistype.(OneTo(MAX_SGNUM[D]), D, normalize=true) uniquebravaistypes = unique(bravaistypes) # Bravais types (1, 5, & 14 in 1D, 2D, & 3D) # find maximum point groups for each bravais type maxpointgroups = Dict(ubt=>Vector{SymOperation{D}}() for ubt in uniquebravaistypes) for (sgnum,bt) in enumerate(bravaistypes) pg = sort(pointgroup(spacegroup(sgnum,D)), by=xyzt) if length(pg) > length(maxpointgroups[bt]) maxpointgroups[bt] = pg; end end # determine whether each space group is a holosymmetric space group # then accumulate the `sgnum`s of the holosymmetric space groups holosymmetric_sgnums = Vector{Int}() for (sgnum,bt) in enumerate(bravaistypes) pg = sort(pointgroup(spacegroup(sgnum,D)), by=xyzt) if length(pg) == length(maxpointgroups[bt]) push!(holosymmetric_sgnums, sgnum) end end return holosymmetric_sgnums end """ is_holosymmetric(sgnum::Integer, D::Integer) --> Bool Return a Boolean answer for whether the representation domain Φ equals the basic domain Ω, i.e. whether the space group is holosymmetric (see CDML p. 31 and 56). Φ and Ω are defined such that the Brillouin zone BZ can be generated from Φ through the point group-parts of the space group operations g∈F (the "isogonal point group" in CDML; just the "point group of G" in ITA) and from Ω through the lattice's point group operations g∈P (the "holosymmetric point group") i.e. BZ≡∑_(r∈F)rΦ and BZ≡∑_(r∈P)rΦ. If Φ=Ω, we say that the space group is holosymmetric; otherwise, Φ is an integer multiple of Ω and we say that the space group is non-holosymmetric. In practice, rather than compute explicitly every time, we use a cache of holosymmetric space group numbers obtained from `_find_holosymmetric_sgnums` (from the `const` `HOLOSYMMERIC_SGNUMS`). """ is_holosymmetric(sgnum::Integer, D::Integer=3)::Bool = (sgnum ∈ HOLOSYMMETRIC_SGNUMS[D]) is_holosymmetric(sg::SpaceGroup) = is_holosymmetric(num(sg), dim(sg)) """ find_holosymmetric_supergroup(G::SpaceGroup) find_holosymmetric_supergroup(sgnum::Integer, D::Integer) --> PointGroup{D} Finds the minimal holosymmetric super point group `P` of a space group `G` (alternatively specified by its number `sgnum` and dimension `D`), such that the (isogonal) point group of `G`, denoted `F`, is a subgroup of `P`, i.e. such that `F`≤`P` with `P` restricted to the lattice type of `G` (see `HOLOSYMMETRIC_PG_FOR_BRAVAISTYPE`). For holosymmetric space groups `F=P`. """ function find_holosymmetric_superpointgroup(G::SpaceGroup) D = dim(G) F = pointgroup(G) # (isogonal) point group of G (::Vector{SymOperation{D}}) if D == 3 # In 3D there are cases (162, 163, 164, 165) where the distinctions # between hP and hR need to be accounted for explicitly, so there we # have to explicitly ensure that we only compare with pointgroups # that indeed match the lattice type (hR and hP have different holohedries) bt = bravaistype(num(G), D, normalize=true) for pglab in HOLOSYMMETRIC_PG_FOR_BRAVAISTYPE[bt] # this check is actually redunant for everything except the hR groups; we do it anyway P = pointgroup(pglab, D) # holosymmetric point group (::PointGroup) if issubgroup(operations(P), F) return P end end else # No tricky cornercasees in 2D or 1D: we can iterate through # the holosymmetric point groups to find the minimal holosymmetric # supergroup, because we already sorted HOLOSYMMETRIC_PG_IUCLABs # by the point group order for pglab in HOLOSYMMETRIC_PG_IUCLABs[D] P = pointgroup(pglab, D) # holosymmetric point group (::PointGroup) if issubgroup(operations(P), F) return P end end end throw("Did not find a holosymmetric super point group: if the setting is conventional, this should never happen") end find_holosymmetric_superpointgroup(sgnum::Integer, D::Integer=3) = find_holosymmetric_superpointgroup(spacegroup(sgnum, D)) """ find_holosymmetric_parent(G::SpaceGroup{D}) find_holosymmetric_parent(sgnum::Integer, D::Integer) --> Union{SpaceGroup{D}, Nothing} Find a holosymmetric space group G₀ such that the space group G with number `sgnum` is an invariant subgroup of G₀, i.e. G◁G₀: a "holosymmetric parent spacegroup" of G, in the notation of B&C and CDML. This identification is not necessarily unique; several distinct parents may exist. The meaning of invariant subgroup (also called a "normal subgroup") is that G is both a subgroup of G₀, i.e. G<G₀, and G is invariant under conjugation by any element g₀ of G₀. Thus, to find if G is an invariant subgroup of G₀ we first check if G is a subgroup of a G₀; then check that for every g₀∈G₀ and g∈G we have g₀gg₀⁻¹∈G. If we find these conditions to be fulfilled, we return the space group G₀. The search is complicated by the fact that the appropriate G₀ may be in a different setting than G is. At the moment a poor-man's fix is implemented that manually circumvents this case by explicit tabulation of cornercases; though this is only tested in 3D. If we find no match, we return `nothing`: the space groups for which this is true should agree with those in `ORPHAN_SGNUMS`. """ find_holosymmetric_parent(sgnum::Integer, D::Integer=3) = find_holosymmetric_parent(spacegroup(sgnum, D)) function find_holosymmetric_parent(G::SpaceGroup{D}) where D D ≠ 3 && _throw_1d2d_not_yet_implemented() sgnum = num(G) if !is_holosymmetric(sgnum, D) # nontrivial case: find invariant subgroup cntr = centering(sgnum, D) if !haskey(CORNERCASES_SUBSUPER_NORMAL_SGS, sgnum) # Naïve attempt to find a holosymmetric supergroup; this fails in 21 cases: # see data/misc/cornercases_normal_subsupergroup_pairs_with_transformations.jl. # Basically, this naïve approach assumes that the crystal setting between # G and its supergroup G⁰ agrees: it does not in general. for sgnum₀ in HOLOSYMMETRIC_SGNUMS[D] G₀ = spacegroup(sgnum₀, D) cntr₀ = centering(G₀) # === check whether G is a subgroup of G₀, G<G₀ === # won't be a naïve subgroup if centerings are different (effectively, a cheap short-circuit check) cntr ≠ cntr₀ && continue # now check if G<G₀ operator-element-wise issubgroup(G₀, G) || continue # check if G is an _invariant_ subgroup of G₀, i.e. if g₀gg₀⁻¹∈G # for every g₀∈G₀ and g∈G isnormal(G₀, G) && return G₀ end else # G must be a cornercase # The above naïve search does not work generally because different sgs are in # different settings; even when the Bravais types match, different choices can # be made for the coordinate axis (rotation, orientation, origo, handedness). # In general, that means that two sets of symmetry operations can be considered # to be a group-subgroup pair if there exists a single transformation operator # such that their operators agree. # Put more abstractly, in the above we check for a normal supergroup; but what # we really want is to check for a normal supergroup TYPE (the notion of "space # group type" differentiates from a concrete "space group", signifying a specific # choice of setting: usually, the distinction is ignored.). # We manually found the appropriate normal and holosymmetric supergroup by using # Bilbao's MINSUP program, along with the appropriate transformation matrix; see # data/misc/cornercases_normal_subsupergroup_pairs_with_transformations.jl and # the constant Tuple `CORNERCASES_SUBSUPER_NORMAL_SGS`. # So far only checked for 3D. sgnum₀, P₀, p₀ = CORNERCASES_SUBSUPER_NORMAL_SGS[sgnum] opsG₀ = operations(spacegroup(sgnum₀, 3)) # find the supergroup G₀ in its transformed setting using P₀ and p₀ opsG₀ .= transform.(opsG₀, Ref(P₀), Ref(p₀)) G₀ = SpaceGroup{D}(sgnum₀, opsG₀) # with G₀ in this setting, G is a subgroup of G₀, G is normal in G₀ # and G₀ is a holosymmetric space group (see test/holosymmetric.jl) return G₀ end # G doesn't have a holosymmetric parent space group ⇒ one of the "orphans" from CDML/B&C return nothing else # trivial case; a holosymmetric sg is its own parent return G end end """ find_arithmetic_partner(sgnum::Integer, D::Integer=3) Find the arithmetic/isogonal parent group of a space group G with number `sgnum` in dimension `D`. The arithmetic/isogonal parent group is the symmorphic group F that contains all the rotation parts of G. See `_find_arithmetic_partner` which this method is a mnemonization interface to. """ find_arithmetic_partner(sgnum::Integer, D::Integer=3)::Int = ARITH_PARTNER_GROUPS[D][sgnum] """ find_map_from_Ω_to_ΦnotΩ(G::SpaceGroup) find_map_from_Ω_to_ΦnotΩ(sgnum::Integer, D::Integer) Find the point group operations `Rs` that map the basic domain Ω to the "missing" domains in Φ-Ω for the space group `G`; this is akin to a coset decomposition of the (isogonal) point group `F` of `G` into the holosymmetric super point group `P` of `G`. """ function find_map_from_Ω_to_ΦnotΩ(G::SpaceGroup) if is_holosymmetric(num(G), dim(G)) return nothing else # G is not a holosymmetric sg, so Φ-Ω is finite P = operations(find_holosymmetric_superpointgroup(G)) # holosymmetric supergroup of G (::Vector{SymOperation{D}}) F = pointgroup(G) # (isogonal) point group of G (::Vector{SymOperation{D}}) index::Int = length(P)/length(F) # index of F in P = 2^"number of needed maps" if index == 1; println(num(G)); return nothing; end N::Int = log2(index) Rs = Vector{SymOperation{dim(G)}}(undef, N) matchidx = 0 # Find N coset representatives for i in 1:N matchidx = findnext(op->op∉F, P, matchidx+1) # find a coset representative for F in P Rs[i] = P[matchidx] if N > 1 && i < N # a bit of extra work to make sure we find an operator which # is not already in the coset P[matchidx]∘F by growing F with # the "newly added" elements that P[matchidx] produce F = append!(F, Ref(Rs[i]) .* F) end end return Rs end end find_map_from_Ω_to_ΦnotΩ(sgnum::Integer, D::Integer=3) = find_map_from_Ω_to_ΦnotΩ(spacegroup(sgnum, D)) # A sanity check for the above implementation, is to compare the number of distinct maps # obtained by first defining # Nmaps = [length(ops) for ops in Crystalline.find_map_from_Ω_to_ΦnotΩ.(keys(Crystalline.ΦNOTΩ_KVECS_AND_MAPS),3)] # against the tabulated maps # maxfreq(x) = maximum(values(StatsBase.countmap(x))) # Nmapsᶜᵈᵐˡ = [maxfreq([x.kᴬlab for x in mapset]) for mapset in values(Crystalline.ΦNOTΩ_KVECS_AND_MAPS)] # Then, Nmaps .> Nmapsᶜᵈᵐˡ (not equal, necessarily, because some maps might be trivially related to # a k-star or to a G-vector). function find_new_kvecs(G::SpaceGroup{D}) where D Rs = find_map_from_Ω_to_ΦnotΩ(G) Rs === nothing && return nothing # holosymmetric case cntr = centering(G) # load the KVecs in Ω from the ISOTROPY dataset lgs = littlegroups(num(G), Val(D)) # We are only interested in mapping kvs from the basic domain Ω; but ISOTROPY already # includes some of the ZA points that are in Φ-Ω, so we strip these already here (and # so find these points anew effectively). Also, there is no point in trying to map the # general point (also denoted Ω by us) to a new point, since it can be obtained by # parameter variation; so we filter that out as well. filter!(klablg_pair-> length(first(klablg_pair)) == 1 && first(klablg_pair) != "Ω", lgs) kvs = position.(values(lgs)) klabs = klabel.(values(lgs)) Nk = length(lgs) newkvs = [KVec[] for _ in OneTo(Nk)] newklabs = [String[] for _ in OneTo(Nk)] for (kidx, (kv, klab)) in enumerate(zip(kvs, klabs)) for (Ridx, R) in enumerate(Rs) newkv = R*kv # compare newkv to the stars of kv: if it is equivalent to any member of star{kv}, # it is not a "new" k-vector. We do not have to compare to _all_ kv′∈Ω (i.e. to all # kvs), because they must have inequivalent stars to kv in the first place and also # cannot be mapped to them by a point group operation of the arithmetic/isogonal point group kstar = orbit(G, kv, cntr) if any(kv′ -> isapprox(newkv, kv′, cntr), kstar) continue # jump out of loop if newkv is equivalent to any star{kv′} end # if we are not careful we may now add a "new" k-vector which is equivalent # to a previously added new k-vector (i.e. is equivalent to a k-vector in its # star): this can e.g. happen if R₁ and R₂ maps to the same KVec, which is a real # possibility. We check against the k-star of the new k-vectors just added. newkv_bool_vs_ΦnotΩ = true for kv′ in newkvs[kidx] k′star = orbit(G, kv′, cntr) # k-star of previously added new k-vector if any(kv′′ -> isapprox(newkv, kv′′, cntr), k′star) newkv_bool_vs_ΦnotΩ = false continue end end !newkv_bool_vs_ΦnotΩ && continue # jump out of loop if newkv is equivalent to any just added new KVec # newkv must now be a bonafide "new" KVec which is inequivalent to any original KVecs # kv′∈Ω, as well as any elements in their stars, and similarly inequivalent to any # previously added new KVecs newkv′∈Φ-Ω ⇒ add it to the list of new KVecs! push!(newkvs[kidx], newkv) push!(newklabs[kidx], klab*('@'+Ridx)*'′') # new labels, e.g. if klab = "Γ", then newklab = "ΓA′", "ΓB′", "ΓC′", ... # TODO: It seems we would need to rule out additional k-vectors by some rule # that I don't quite know yet. One option may be to consider k-vectors # that can be obtained by parameter-variation equivalent; I think this # is what is called the "uni-arm" description in # https://www.cryst.ehu.es/cryst/help/definitions_kvec.html#uniarm # Another concern could be that the symmetry of the reciprocal lattice # is not same as that of the direct lattice; that is also discussed in # link. In general, we should be finding the same k-vectors as those # generated by https://www.cryst.ehu.es/cryst/get_kvec.html; right now # we occassionally find too many (148 is a key example; 75 another). # See also their companion paper to that utility. # # Easiest ways to inspect our results is as: # sgnum = 75 # v=Crystalline.find_new_kvecs(sgnum, 3) # [v[3] string.(v[1]) first.(v[4]) string.(first.(v[2]))] # (only shows "A" generated KVecs though...) # # We also have some debugging code for this issue in test/holosymmetric.jl, # but at present it is not a priority to fix this, since we have the nominally # correct additions from CDML. end end # only retain the cases where something "new" was added mappedkvs = [kvs[kidx] for (kidx, newkvsₖᵥ) in enumerate(newkvs) if !isempty(newkvsₖᵥ)] mappedklabs = [klabs[kidx] for (kidx, newkvsₖᵥ) in enumerate(newkvs) if !isempty(newkvsₖᵥ)] filter!(!isempty, newkvs) filter!(!isempty, newklabs) # return arrays of {original KVec in Ω}, {new KVec(s) in Φ-Ω}, {original KVec label in Ω}, {new KVec label(s) in Φ-Ω}, return mappedkvs, newkvs, mappedklabs, newklabs end find_new_kvecs(sgnum::Integer, D::Integer=3) = find_new_kvecs(spacegroup(sgnum, D)) """ _find_arithmetic_partner(sg::SpaceGroup) _find_arithmetic_partner(sgnum::Integer, D::Integer=3) Find the symmorphic partner space group `sg′` of a space group `sg`, i.e. find the space group `sg′` whose group embodies the arithmetic crystal class of `sg`. In practice, this means that they have the same point group operations and that they share the same Bravais lattice (i.e. centering) and Brillouin zone. For symmorphic space groups, this is simply the space group itself. An equivalent terminonology (favored by B&C and CDML) for this operation is the "*isogonal* partner group" of `sg`. ITA doesn't appear to have a specific name for this operation, but we borrow the terminology from the notion of an "arithmetic crystal class". The answer is returned as a pair of space group numbers: `num(sg)=>num(sg′)`. """ function _find_arithmetic_partner(sg::SpaceGroup) D = dim(sg) sgnum = num(sg) cntr = centering(sgnum, D) if sgnum ∈ SYMMORPH_SGNUMS[D] return sgnum=>sgnum else pgops_sorted = sort(pointgroup(sg), by=xyzt) N_pgops = length(pgops_sorted) N_arith_crys_class = length(SYMMORPH_SGNUMS[D]) # exploit that the arithmetic partner typically is close to the index # of the space group, but is (at least for 3D space groups) always smaller idx₀ = findfirst(>(sgnum), SYMMORPH_SGNUMS[D]) if idx₀ === nothing # no point group of smaller index than the provided sg idx₀ = N_arith_crys_class end for idx′ in Iterators.flatten((idx₀-1:-1:1, idx₀:N_arith_crys_class)) sgnum′ = SYMMORPH_SGNUMS[D][idx′] # We have to take the `pointgroup(...)` operation here even though `sgops` # is symmorphic, because the `SymOperation`s are in a conventional basis # and may contain contain trivial primitive translations if `cntr′ ≠ 'P'` sgops′ = sort(pointgroup(spacegroup(sgnum′, D)), by=xyzt) if (length(sgops′) == N_pgops && all(sgops′ .== pgops_sorted) && # ... this assumes the coordinate setting # is the same between sg and sg′ (not # generally valid; but seems to work here, # probably because the setting is shared # by definition between these "partners"?) centering(sgnum′, D) == cntr) # the centering (actually, Bravais type, # but doesn't seem to make a difference) # must also agree! return sgnum=>sgnum′ end end end # if we reached this point, no match was found ⇒ implies an error..! throw(ErrorException("No arithmetic/isogonal partner group was found: this should"* "never happen for well-defined groups.")) end function _find_arithmetic_partner(sgnum::Integer, D::Integer=3) _find_arithmetic_partner(spacegroup(sgnum, D)) end """ _ΦnotΩ_kvecs_and_maps_imdict(;verbose::Bool=false) Load the special k-points kᴮ∈Φ-Ω that live in the representation domain Φ, but not in the basic domain Ω, as well parent space group operation R that link them to a related k-point in the basic domain kᴬ∈Ω. Returns an `ImmutableDict` over `KVecMapping` `Tuple`s, each a containing {kᴬ, kᴮ, R} triad, with kᴬ and kᴮ represented by their labels. The keys of the `ImmutableDict` give the associated space group number. The data used here is obtained from Table 3.11 of CDML. Because they split symmetry operations up into two groups, {monoclinic, orthorhombic, tetragonal, and cubic} vs. {trigonal, hexagonal}, we do the same when we load it; but the end-result concatenates both types into a single `ImmutableDict`. For convenience we later write the results of this function to constants `ΦNOTΩ_KVECS_AND_MAPS`. """ function _ΦnotΩ_kvecs_and_maps_imdict(;verbose::Bool=false) # prepare for loading csv files into ImmutableDict baseloadpath = (@__DIR__)*"/../data/misc/CDML_RepresentationDomainSpecialKPoints_" kwargs = (header=["kᴮ_num", "kᴮ", "R", "kᴬ"], comment="#", delim=", ", ignoreemptylines=true, types=[Int, String, Int, String]) d = Base.ImmutableDict{Int, NTuple{N, KVecMapping} where N}() for loadtype in ["MonoOrthTetraCubic", "TriHex"] # load crystal-specific variables loadpath = baseloadpath*loadtype*".csv" if loadtype == "MonoOrthTetraCubic" # Monoclinic, cubic, tetragonal, orthorhombic num2ops = Dict( 2=>SymOperation{3}("x,-y,-z"), 3=>SymOperation{3}("-x,y,-z"), 4=>SymOperation{3}("-x,-y,z"), 16=>SymOperation{3}("y,x,-z"), 26=>SymOperation{3}("-x,y,z"), 28=>SymOperation{3}("x,y,-z"), 37=>SymOperation{3}("y,x,z") ) elseif loadtype == "TriHex" # Trigonal & hexagonal num2ops = Dict( 2=>SymOperation{3}("x-y,x,z"), 6=>SymOperation{3}("y,-x+y,z"), 8=>SymOperation{3}("x,x-y,-z"), 9=>SymOperation{3}("y,x,-z"), 10=>SymOperation{3}("-x+y,y,-z"), 16=>SymOperation{3}("x,y,-z"), 23=>SymOperation{3}("x,x-y,z"), 24=>SymOperation{3}("y,x,z") ) end # read data from csv file data = CSV.read(loadpath; kwargs...) # convert csv file to ImmutableDict of KVecMapping NTuples cur_sgnum = 0 tempvec = Vector{KVecMapping}() for (idx, row) in enumerate(eachrow(data)) if iszero(row[:kᴮ_num]) if cur_sgnum ≠ 0 d = Base.ImmutableDict(d, cur_sgnum=>tuple(tempvec...)) end cur_sgnum = row[:R] tempvec = Vector{KVecMapping}() else R = num2ops[row[:R]] # CDML setting is not the same as ITA settings for all cases; for # the cur_sgnums where the two differ, we store the transformations # between the two settings in TRANSFORMS_CDML2ITA and apply it here if haskey(TRANSFORMS_CDML2ITA, cur_sgnum) P, p = TRANSFORMS_CDML2ITA[cur_sgnum] if verbose Pstr = xyzt(SymOperation{3}(hcat(P, p))) println("SG $(cur_sgnum): transforming from CDML to ITA setting via P = $(Pstr):\n", " From R = $(xyzt(R))\t= $(seitz(R))") end R = transform(R, P, p) verbose && println(" to R′ = $(xyzt(R))\t= $(seitz(R))") end push!(tempvec, KVecMapping(row[:kᴬ], row[:kᴮ], R)) end if idx == size(data, 1) d = Base.ImmutableDict(d, cur_sgnum=>tuple(tempvec...)) end end end return d end # Mnemonized data from calling `_ΦnotΩ_kvecs_and_maps_imdict()` (in 3D only) as an # ImmutableDict const ΦNOTΩ_KVECS_AND_MAPS = _ΦnotΩ_kvecs_and_maps_imdict() """ ΦnotΩ_kvecs(sgnum::Integer, D::Integer) For a space group G with number `sgnum` and dimensionality `D`, find the "missing" k-vectors in Φ-Ω, denoted kᴮ, as well as a mapping operation {R|v} that links these operations to an operation in Ω, denoted kᴬ such that kᴮ = Rkᴬ. The operation {R|v} is chosen from a parent space group. If possible, this parent space group is a holosymmetric parent group of which G is a normal subgroup. For 24 so-called "orphans", such a choice is impossible, and we instead have to make do with an ordinary non-holosymmetric parent (of which G is still a normal subgroup). Four "flavors" of orphans exist; 1, 2, 3, and 4. For orphan type 4, no normal supergroup can be found. Only in-equivalent "missing" k-vectors are returned (i.e. kᴮs are inequivalent to all the stars of all kᴬ∈Ω): this listing is obtained from CDML, and conveniently takes care of orphan types 3 and 4. If there are no "missing" k-vectors in Φ-Ω the method returns `nothing`. Otherwise, the method returns a `Vector` of `KVecMapping`s as well as the orphan type (`0` if not an orphan). Presently only works in 3D, since CDML does not tabulate the special k-points in Φ-Ω in 2D. This method should be used to subsequently generate the `LGIrrep`s of the missing k-vectors in Φ-Ω from the tabulated `LGIrrep`s for kᴬ∈Ω. This is possible for all 3D space groups except for number 205, which requires additional manual tabulation. """ function ΦnotΩ_kvecs(sgnum::Integer, D::Integer=3) D ≠ 3 && _throw_1d2d_not_yet_implemented(D) # No new k-points for holosymmetric sgs where Φ = Ω is_holosymmetric(sgnum, D) && return nothing # Check if sg is an "orphan" type (if 0 ⇒ not an orphan) in the sense discussed in CDML p. 70-71. orphantype = is_orphan_sg(sgnum, D) if orphantype == 3 # no new k-vectors after all (CDML p. 71, bullet (i)) [type (c)] return nothing elseif orphantype == 4 # sgnum = 205 needs special treatment [type (d)] # return the KVecMappings, which are handy to have even though the transformation # procedure doesn't apply to sg 205. Below are the cached results of # ΦNOTΩ_KVECS_AND_MAPS[find_arithmetic_partner(205, 3)]. The actual irreps at # ZA, AA, and BA are given in CDML p. C491; ZA is already include in ISOTROPY R₂₀₅ = SymOperation{D}("y,x,z") kvmaps = [KVecMapping("Z","ZA",R₂₀₅), KVecMapping("A","AA",R₂₀₅), KVecMapping("B","BA",R₂₀₅)] return kvmaps, orphantype elseif orphantype ∈ (1,2) # supergroup case [types (a,b)] # A supergroup G′ exists which contains some (but not all) necessary operations # that otherwise exist in the holosymmetric group; see table 4.1 of CDML; by exploiting # their connection to an isomorphic partner, we can get all the necessary operations # (see B&C). parent_sgnum, p = ORPHAN_AB_SUPERPARENT_SGNUMS[sgnum] end # If we reached here, orphantype is either 0 - in which case we can follow # the holosymmetric parent space group (G₀) approach - or orphantype is # 1 (a) or 2 (b); in that case, we should use the supergroup G′ to identify # the irrep mapping vectors {R|v}; but we can still use the point group operation # R inferred from find_arithmetic_partner and ΦNOTΩ_KVECS_AND_MAPS (if featuring) # We need the arithmetic parent group to find the correct key in ΦNOTΩ_KVECS_AND_MAPS # (since it only stores symmorphic space groups) arith_parent_sgnum = find_arithmetic_partner(sgnum, D) # There are some space groups (i.e. some isogonal partner groups) that just # do not get truly new k-points in Φ-Ω since they either already feature in # star{𝐤} or are equivalent (either via a primitive reciprocal G-vector or # by trivial parameter variation) to an existing KVec in Ω. In that case, # there is no entry for arith_parent_sgnum in ΦNOTΩ_KVECS_AND_MAPS and # there is nothing to add. This is the case for sgnums 1, 16, 22, 89, 148, # 177, 207, & 211). In that case, we set kvmaps_pg to `nothing`; otherwise # we obtain the matching set of mappings from ΦNOTΩ_KVECS_AND_MAPS that # contains ALL the new k-vecs and point-group mappings R from CDML Table 3.11 kvmaps_pg = get(ΦNOTΩ_KVECS_AND_MAPS, arith_parent_sgnum, nothing) kvmaps_pg === nothing && return nothing # now we need to find the appropriate parent group Gᵖᵃʳ: if not an orphan, # this is the parent holosymmetric space group G₀; if an orphan of type # (a) or (b) it is the supergroup G′ if iszero(orphantype) # ⇒ not an orphan opsGᵖᵃʳ = operations(find_holosymmetric_parent(sgnum, D)) else # ⇒ an orphan of type (a) or (b) opsGᵖᵃʳ = operations(spacegroup(parent_sgnum, D)) if !iszero(p) # transform setting if it differs (origin only) opsGᵖᵃʳ .= transform.(opsGᵖᵃʳ, Ref(Matrix{Float64}(I, 3, 3)), Ref(p)) end end # The mapping kvmaps_pg refers to a point operation {R|0} which may or may not # exist in the parent space group `Gᵖᵃʳ` with operations `opsGᵖᵃʳ`: but an operation # {R|v} should exist. We now find that operation (which we need when mapping irreps) kvmaps = Vector{KVecMapping}() for kvmap_pg in kvmaps_pg R = kvmap_pg.op # R in CDML notation matchidx = findfirst(op′->rotation(R)==rotation(op′), opsGᵖᵃʳ) # For orphans of type (a) or (b) there is the possibility of a situation # where R is **not** in Gᵖᵃʳ, namely if R = SymOperation{3}("-x,-y,-z"), see # B&C p. 414-415. # Despite this, for the KVecMappings included in CDML, this situation # never arises; this must mean that all those "new" KVecs generated by # inversion are equivalent to one of the "old" KVecs in Ω. We have verified # this explicitly, see below: # for otype = 1:2 # arith_orphs = Crystalline.find_arithmetic_partner.(Crystalline.ORPHAN_SGNUMS[otype]) # kvmaps_pg = get.(Ref(Crystalline.ΦNOTΩ_KVECS_AND_MAPS), arith_orphs, Ref(nothing)) # check = all.(xyzt.(getfield.(kvmap, :op)) .!= "-x,-y,-z" for kvmap in kvmaps_pg) # display(check) # ⇒ vector of `true`s # end if matchidx === nothing throw("Unexpected scenario encountered: please submit a bug-report.\n\t"* "R = $(xyzt(R)), parent_sgnum = $(parent_sgnum), orphantype = $(orphantype)") end sgop = opsGᵖᵃʳ[matchidx] # {R|v} symop from parent sg (CDML/B&C notation) push!(kvmaps, KVecMapping(kvmap_pg.kᴬlab, kvmap_pg.kᴮlab, sgop)) end return kvmaps, orphantype end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
14694
# ---------------------------------------------------------------------------------------- # # NOTATION FOR LAYER, ROD, AND FRIEZE GROUPS # notation from https://www.cryst.ehu.es/cgi-bin/subperiodic/programs/nph-sub_gen with a # few manual corrections from Kopsky & Litvin's 'Nomenclature, Symbols and Classification # of the Subperiodic Groups' report. const LAYERGROUP_IUCs = ( # 80 layer groups #=1=# "𝑝1", #=2=# "𝑝-1", #=3=# "𝑝112", #=4=# "𝑝11m", #=5=# "𝑝11a", #=6=# "𝑝112/m", #=7=# "𝑝112/a", #=8=# "𝑝211", #=9=# "𝑝2₁11", #=10=# "𝑐211", #=11=# "𝑝m11", #=12=# "𝑝b11", #=13=# "𝑐m11", #=14=# "𝑝2/m11", #=15=# "𝑝2₁/m11", #=16=# "𝑝2/b11", #=17=# "𝑝2₁/b11", #=18=# "𝑐2/m11", #=19=# "𝑝222", #=20=# "𝑝2₁22", #=21=# "𝑝2₁2₁2", #=22=# "𝑐222", #=23=# "𝑝mm2", #=24=# "𝑝ma2", #=25=# "𝑝ba2", #=26=# "𝑐mm2", #=27=# "𝑝m2m", #=28=# "𝑝m2₁b", #=29=# "𝑝b2₁m", #=30=# "𝑝b2b", #=31=# "𝑝m2a", #=32=# "𝑝m2₁n", #=33=# "𝑝b2₁a", #=34=# "𝑝b2n", #=35=# "𝑐m2m", #=36=# "𝑐m2e", #=37=# "𝑝mmm", #=38=# "𝑝maa", #=39=# "𝑝ban", #=40=# "𝑝mam", #=41=# "𝑝mma", #=42=# "𝑝man", #=43=# "𝑝baa", #=44=# "𝑝bam", #=45=# "𝑝bma", #=46=# "𝑝mmn", #=47=# "𝑐mmm", #=48=# "𝑐mme", #=49=# "𝑝4", #=50=# "𝑝-4", #=51=# "𝑝4/m", #=52=# "𝑝4/n", #=53=# "𝑝422", #=54=# "𝑝42₁2", #=55=# "𝑝4mm", #=56=# "𝑝4bm", #=57=# "𝑝-42m", #=58=# "𝑝-42₁m", #=59=# "𝑝-4m2", #=60=# "𝑝-4b2", #=61=# "𝑝4/mmm", #=62=# "𝑝4/nbm", #=63=# "𝑝4/mbm", #=64=# "𝑝4/nmm", #=65=# "𝑝3", #=66=# "𝑝-3", #=67=# "𝑝312", #=68=# "𝑝321", #=69=# "𝑝3m1", #=70=# "𝑝31m", #=71=# "𝑝-31m", #=72=# "𝑝-3m1", #=73=# "𝑝6", #=74=# "𝑝-6", #=75=# "𝑝6/m", #=76=# "𝑝622", #=77=# "𝑝6mm", #=78=# "𝑝-6m2", #=79=# "𝑝-62m", #=80=# "𝑝6/mmm") const RODGROUP_IUCs = ( # 75 rod groups # (for multiple setting choices, we always pick setting 1) #=1=# "𝓅1", #=2=# "𝓅-1", #=3=# "𝓅211", #=4=# "𝓅m11", #=5=# "𝓅c11", #=6=# "𝓅2/m11", #=7=# "𝓅2/c1", #=8=# "𝓅112", #=9=# "𝓅112₁", #=10=# "𝓅11m", #=11=# "𝓅112/m", #=12=# "𝓅112₁/m", #=13=# "𝓅222", #=14=# "𝓅222₁", #=15=# "𝓅mm2", #=16=# "𝓅cc2", #=17=# "𝓅mc2₁", #=18=# "𝓅2mm", #=19=# "𝓅2cm", #=20=# "𝓅mmm", #=21=# "𝓅ccm", #=22=# "𝓅mcm", #=23=# "𝓅4", #=24=# "𝓅4₁", #=25=# "𝓅4₂", #=26=# "𝓅4₃", #=27=# "𝓅-4", #=28=# "𝓅4/m", #=29=# "𝓅4₂/m", #=30=# "𝓅422", #=31=# "𝓅4₁22", #=32=# "𝓅4₂22", #=33=# "𝓅4₃22", #=34=# "𝓅4mm", #=35=# "𝓅4₂cm", #=36=# "𝓅4cc", #=37=# "𝓅-42m", #=38=# "𝓅-42c", #=39=# "𝓅4/mmm", #=40=# "𝓅4/mcc", #=41=# "𝓅4₂/mmc", #=42=# "𝓅3", #=43=# "𝓅3₁", #=44=# "𝓅3₂", #=45=# "𝓅-3", #=46=# "𝓅312", #=47=# "𝓅3₁12", #=48=# "𝓅3₂12", #=49=# "𝓅3m1", #=50=# "𝓅3c1", #=51=# "𝓅-31m", #=52=# "𝓅-31c", #=53=# "𝓅6", #=54=# "𝓅6₁", #=55=# "𝓅6₂", #=56=# "𝓅6₃", #=57=# "𝓅6₄", #=58=# "𝓅6₅", #=59=# "𝓅-6", #=60=# "𝓅6/m", #=61=# "𝓅6₃/m", #=62=# "𝓅622", #=63=# "𝓅6₁22", #=64=# "𝓅6₂22", #=65=# "𝓅6₃22", #=66=# "𝓅6₄22", #=67=# "𝓅6₅22", #=68=# "𝓅6mm", #=69=# "𝓅6cc", #=70=# "𝓅6₃mc", #=71=# "𝓅-6m2", #=72=# "𝓅-6c2", #=73=# "𝓅6/mmm", #=74=# "𝓅6/mcc", #=75=# "𝓅6₃/mmc") const FRIEZEGROUP_IUCs = ( # 7 frieze groups #=1=# "𝓅1", #=2=# "𝓅2", #=3=# "𝓅1m1", #=4=# "𝓅11m", #=5=# "𝓅11g", #=6=# "𝓅2mm", #=7=# "𝓅2mg") # ---------------------------------------------------------------------------------------- # # ASSOCIATIONS BETWEEN LAYER, ROD, & FRIEZE GROUPS VS. SPACE, PLANE, & LINE GROUPS # By indexing into the following arrays, one obtains the "parent" group number, associated # with the index' group number. As an example, `PLANE2SPACE_NUM[16] = 168`, meaning that the # 2D plane group ⋕16 has a parent in the 3D space group ⋕168. # Manual comparison to Bilbao's listings, and consulting Litvin's book's Table 30 (which # doesn't fully give the correct 1-to-1 matches, because the conventions changed later on) const PLANE2LAYER_NUMS = ( 1 #= p1 ⇒ 𝑝1 =#, 3 #= p2 ⇒ 𝑝112 =#, 11 #= p1m1 ⇒ 𝑝m11 =#, 12 #= p1g1 ⇒ 𝑝b11 =#, 13 #= c1m1 ⇒ 𝑐m11 =#, 23 #= p2mm ⇒ 𝑝mm2 =#, 24 #= p2mg ⇒ 𝑝ma2 =#, 25 #= p2gg ⇒ 𝑝ba2 =#, 26 #= c2mm ⇒ 𝑐mm2 =#, 49 #= p4 ⇒ 𝑝4 =#, 55 #= p4mm ⇒ 𝑝4mm =#, 56 #= p4gm ⇒ 𝑝4bm =#, 65 #= p3 ⇒ 𝑝3 =#, 69 #= p3m1 ⇒ 𝑝3m1 =#, 70 #= p31m ⇒ 𝑝3m1 =#, 73 #= p6 ⇒ 𝑝6 =#, 77 #= p6mm ⇒ 𝑝6mm =#) # Data from Table 1 of the SI of Watanabe, Po, and Vishwanath's 2017 Nature Commun. const LAYER2SPACE_NUMS = ( 1 #= 𝑝1 ⇒ P1 =#, 2 #= 𝑝-1 ⇒ P-1 =#, 3 #= 𝑝112 ⇒ P2 =#, 6 #= 𝑝11m ⇒ Pm =#, 7 #= 𝑝11a ⇒ Pc =#, 10 #= 𝑝112/m ⇒ P2/m =#, 13 #= 𝑝112/a ⇒ P2/c =#, 3 #= 𝑝211 ⇒ P2 =#, 4 #= 𝑝2₁11 ⇒ P2₁ =#, 5 #= 𝑐211 ⇒ C2 =#, 6 #= 𝑝m11 ⇒ Pm =#, 7 #= 𝑝b11 ⇒ Pc =#, 8 #= 𝑐m11 ⇒ Cm =#, 10 #= 𝑝2/m11 ⇒ P2/m =#, 11 #= 𝑝2₁/m11 ⇒ P2₁/m =#, 13 #= 𝑝2/b11 ⇒ P2/c =#, 14 #= 𝑝2₁/b11 ⇒ P2₁/c =#, 12 #= 𝑐2/m11 ⇒ C2/m =#, 16 #= 𝑝222 ⇒ P222 =#, 17 #= 𝑝2₁22 ⇒ P222₁ =#, 18 #= 𝑝2₁2₁2 ⇒ P2₁2₁2 =#, 21 #= 𝑐222 ⇒ C222 =#, 25 #= 𝑝mm2 ⇒ Pmm2 =#, 28 #= 𝑝ma2 ⇒ Pma2 =#, 32 #= 𝑝ba2 ⇒ Pba2 =#, 35 #= 𝑐mm2 ⇒ Cmm2 =#, 25 #= 𝑝m2m ⇒ Pmm2 =#, 26 #= 𝑝m2₁b ⇒ Pmc2₁ =#, 26 #= 𝑝b2₁m ⇒ Pmc2₁ =#, 27 #= 𝑝b2b ⇒ Pcc2 =#, 28 #= 𝑝m2a ⇒ Pma2 =#, 31 #= 𝑝m2₁n ⇒ Pmn2₁ =#, 29 #= 𝑝b2₁a ⇒ Pca2₁ =#, 30 #= 𝑝b2n ⇒ Pnc2 =#, 38 #= 𝑐m2m ⇒ Amm2 =#, 39 #= 𝑐m2e ⇒ Aem2 =#, 47 #= 𝑝mmm ⇒ Pmmm =#, 49 #= 𝑝maa ⇒ Pccm =#, 50 #= 𝑝ban ⇒ Pban =#, 51 #= 𝑝mam ⇒ Pmma =#, 51 #= 𝑝mma ⇒ Pmma =#, 53 #= 𝑝man ⇒ Pmna =#, 54 #= 𝑝baa ⇒ Pcca =#, 55 #= 𝑝bam ⇒ Pbam =#, 57 #= 𝑝bma ⇒ Pbcm =#, 59 #= 𝑝mmn ⇒ Pmmn =#, 65 #= 𝑐mmm ⇒ Cmmm =#, 67 #= 𝑐mme ⇒ Cmme =#, 75 #= 𝑝4 ⇒ P4 =#, 81 #= 𝑝-4 ⇒ P-4 =#, 83 #= 𝑝4/m ⇒ P4/m =#, 85 #= 𝑝4/n ⇒ P4/n =#, 89 #= 𝑝422 ⇒ P422 =#, 90 #= 𝑝42₁2 ⇒ P42₁2 =#, 99 #= 𝑝4mm ⇒ P4mm =#, 100 #= 𝑝4bm ⇒ P4bm =#, 111 #= 𝑝-42m ⇒ P-42m =#, 113 #= 𝑝-42₁m ⇒ P-42₁m =#, 115 #= 𝑝-4m2 ⇒ P-4m2 =#, 117 #= 𝑝-4b2 ⇒ P-4b2 =#, 123 #= 𝑝4/mmm ⇒ P4/mmm =#, 125 #= 𝑝4/nbm ⇒ P4/nbm =#, 127 #= 𝑝4/mbm ⇒ P4/mbm =#, 129 #= 𝑝4/nmm ⇒ P4/nmm =#, 143 #= 𝑝3 ⇒ P3 =#, 147 #= 𝑝-3 ⇒ P-3 =#, 149 #= 𝑝312 ⇒ P312 =#, 150 #= 𝑝321 ⇒ P321 =#, 156 #= 𝑝3m1 ⇒ P3m1 =#, 157 #= 𝑝31m ⇒ P31m =#, 162 #= 𝑝-31m ⇒ P-31m =#, 164 #= 𝑝-3m1 ⇒ P-3m1 =#, 168 #= 𝑝6 ⇒ P6 =#, 174 #= 𝑝-6 ⇒ P-6 =#, 175 #= 𝑝6/m ⇒ P6/m =#, 177 #= 𝑝622 ⇒ P622 =#, 183 #= 𝑝6mm ⇒ P6mm =#, 187 #= 𝑝-6m2 ⇒ P-6m2 =#, 189 #= 𝑝-62m ⇒ P-62m =#, 191 #= 𝑝6/mmm ⇒ P6/mmm =#) # this is just `LAYER2SPACE_NUMS[[PLANE2LAYER_NUMS...]]` const PLANE2SPACE_NUMS = ( 1 #= p1 ⇒ P1 =#, 3 #= p2 ⇒ P2 =#, 6 #= p1m1 ⇒ Pm =#, 7 #= p1g1 ⇒ Pc =#, 8 #= c1m1 ⇒ Cm =#, 25 #= p2mm ⇒ Pmm2 =#, 28 #= p2mg ⇒ Pma2 =#, 32 #= p2gg ⇒ Pba2 =#, 35 #= c2mm ⇒ Cmm2 =#, 75 #= p4 ⇒ P4 =#, 99 #= p4mm ⇒ P4mm =#, 100 #= p4gm ⇒ P4bm =#, 143 #= p3 ⇒ P3 =#, 156 #= p3m1 ⇒ P3m1 =#, 157 #= p31m ⇒ P31m =#, 168 #= p6 ⇒ P6 =#, 183 #= p6mm ⇒ P6mm =#) const FRIEZE2SPACE_NUMS = ( 1 #= 𝓅1 ⇒ P1 =#, 3 #= 𝓅2 ⇒ P2 =#, 6 #= 𝓅1m1 ⇒ Pm =#, 6 #= 𝓅11m ⇒ Pm =#, 7 #= 𝓅11g ⇒ Pc =#, 25 #= 𝓅2mm ⇒ Pmm2 =#, 28 #= 𝓅2mg ⇒ Pma2 =#) const FRIEZE2LAYER_NUMS = ( 1 #= 𝓅1 ⇒ 𝑝1 =#, 3 #= 𝓅2 ⇒ 𝑝112 =#, 11 #= 𝓅1m1 ⇒ 𝑝m11 =#, 4 #= 𝓅11m ⇒ 𝑝11m =#, 5 #= 𝓅11g ⇒ 𝑝11a =#, 23 #= 𝓅2mm ⇒ 𝑝mm2 =#, 24 #= 𝓅2mg ⇒ 𝑝ma2 =#) const FRIEZE2ROD_NUMS = ( 1 #= 𝓅1 ⇒ 𝓅1 =#, 3 #= 𝓅2 ⇒ 𝓅211 =#, 10 #= 𝓅1m1 ⇒ 𝓅11m =#, 4 #= 𝓅11m ⇒ 𝓅m11 =#, 5 #= 𝓅11g ⇒ 𝓅c11 =#, 18 #= 𝓅2mm ⇒ 𝓅2mm =#, 19 #= 𝓅2mg ⇒ 𝓅2cm =#) const FRIEZE2PLANE_NUMS = ( 1 #= 𝓅1 ⇒ p1 =#, 2 #= 𝓅2 ⇒ p2 =#, 3 #= 𝓅1m1 ⇒ p1m1 =#, 3 #= 𝓅11m ⇒ p1m1 =#, 4 #= 𝓅11g ⇒ p1g1 =#, 6 #= 𝓅2mm ⇒ p2mm =#, 7 #= 𝓅2mg ⇒ p2mg =#) const ROD2SPACE_NUMS = ( 1 #= 𝓅1 ⇒ P1 =#, 2 #= 𝓅-1 ⇒ P-1 =#, 3 #= 𝓅211 ⇒ P2 =#, 6 #= 𝓅m11 ⇒ Pm =#, 7 #= 𝓅c11 ⇒ Pc =#, 10 #= 𝓅2/m11 ⇒ P2/m =#, 13 #= 𝓅2/c1 ⇒ P2/c =#, 3 #= 𝓅112 ⇒ P2 =#, 4 #= 𝓅112₁ ⇒ P2₁ =#, 6 #= 𝓅11m ⇒ Pm =#, 10 #= 𝓅112/m ⇒ P2/m =#, 11 #= 𝓅112₁/m ⇒ P2₁/m =#, 16 #= 𝓅222 ⇒ P222 =#, 17 #= 𝓅222₁ ⇒ P222₁ =#, 25 #= 𝓅mm2 ⇒ Pmm2 =#, 27 #= 𝓅cc2 ⇒ Pcc2 =#, 26 #= 𝓅mc2₁ ⇒ Pmc2₁ =#, 25 #= 𝓅2mm ⇒ Pmm2 =#, 28 #= 𝓅2cm ⇒ Pma2 =#, 47 #= 𝓅mmm ⇒ Pmmm =#, 49 #= 𝓅ccm ⇒ Pccm =#, 63 #= 𝓅mcm ⇒ Cmcm =#, 75 #= 𝓅4 ⇒ P4 =#, 76 #= 𝓅4₁ ⇒ P4₁ =#, 77 #= 𝓅4₂ ⇒ P4₂ =#, 78 #= 𝓅4₃ ⇒ P4₃ =#, 81 #= 𝓅-4 ⇒ P-4 =#, 83 #= 𝓅4/m ⇒ P4/m =#, 84 #= 𝓅4₂/m ⇒ P4₂/m =#, 89 #= 𝓅422 ⇒ P422 =#, 91 #= 𝓅4₁22 ⇒ P4₁22 =#, 93 #= 𝓅4₂22 ⇒ P4₂22 =#, 95 #= 𝓅4₃22 ⇒ P4₃22 =#, 99 #= 𝓅4mm ⇒ P4mm =#, 101 #= 𝓅4₂cm ⇒ P4₂cm =#, 103 #= 𝓅4cc ⇒ P4cc =#, 111 #= 𝓅-42m ⇒ P-42m =#, 112 #= 𝓅-42c ⇒ P-42c =#, 123 #= 𝓅4/mmm ⇒ P4/mmm =#, 124 #= 𝓅4/mcc ⇒ P4/mcc =#, 131 #= 𝓅4₂/mmc ⇒ P4₂/mmc =#, 143 #= 𝓅3 ⇒ P3 =#, 144 #= 𝓅3₁ ⇒ P3₁ =#, 145 #= 𝓅3₂ ⇒ P3₂ =#, 147 #= 𝓅-3 ⇒ P-3 =#, 149 #= 𝓅312 ⇒ P312 =#, 151 #= 𝓅3₁12 ⇒ P3₁12 =#, 153 #= 𝓅3₂12 ⇒ P3₂12 =#, 156 #= 𝓅3m1 ⇒ P3m1 =#, 158 #= 𝓅3c1 ⇒ P3c1 =#, 162 #= 𝓅-31m ⇒ P-31m =#, 163 #= 𝓅-31c ⇒ P-31c =#, 168 #= 𝓅6 ⇒ P6 =#, 169 #= 𝓅6₁ ⇒ P6₁ =#, 171 #= 𝓅6₂ ⇒ P6₂ =#, 173 #= 𝓅6₃ ⇒ P6₃ =#, 172 #= 𝓅6₄ ⇒ P6₄ =#, 170 #= 𝓅6₅ ⇒ P6₅ =#, 174 #= 𝓅-6 ⇒ P-6 =#, 175 #= 𝓅6/m ⇒ P6/m =#, 176 #= 𝓅6₃/m ⇒ P6₃/m =#, 177 #= 𝓅622 ⇒ P622 =#, 178 #= 𝓅6₁22 ⇒ P6₁22 =#, 180 #= 𝓅6₂22 ⇒ P6₂22 =#, 182 #= 𝓅6₃22 ⇒ P6₃22 =#, 181 #= 𝓅6₄22 ⇒ P6₄22 =#, 179 #= 𝓅6₅22 ⇒ P6₅22 =#, 183 #= 𝓅6mm ⇒ P6mm =#, 184 #= 𝓅6cc ⇒ P6cc =#, 186 #= 𝓅6₃mc ⇒ P6₃mc =#, 187 #= 𝓅-6m2 ⇒ P-6m2 =#, 188 #= 𝓅-6c2 ⇒ P-6c2 =#, 191 #= 𝓅6/mmm ⇒ P6/mmm =#, 192 #= 𝓅6/mcc ⇒ P6/mcc =#, 194 #= 𝓅6/mmc ⇒ P6₃/mmc =#) const LINE2ROD_NUMS = (1 #= p1 ⇒ 𝓅1 =#, 10 #= p1m ⇒ 𝓅11m =#) const LINE2FRIEZE_NUMS = (1 #= p1 ⇒ 𝓅1 =#, 3 #= p1m ⇒ 𝓅1m1 =#) # ---------------------------------------------------------------------------------------- # # GROUP ELEMENTS """ $(TYPEDEF)$(TYPEDFIELDS) A subperiodic group of embedding dimension `D` and periodicity dimension `P`. Fields: - `operations`: the `SymOperation`s of the finite factor group ``G/T``, where ``G`` is the subperiodic group and ``T`` is the translation group of the associated lattice. - `num`: the canonical number of the group, following the International Tables for Crystallography, Volume E. """ struct SubperiodicGroup{D,P} <: AbstractGroup{D, SymOperation{D}} num :: Int operations :: Vector{SymOperation{D}} end const LayerGroup = SubperiodicGroup{3,2} const RodGroup = SubperiodicGroup{3,1} const FriezeGroup = SubperiodicGroup{2,1} function _throw_subperiodic_domain(D::Integer, P::Integer) throw(DomainError((D, P), "invalid dimension and periodicity for subperiodic group")) end @noinline function _throw_subperiodic_num(num::Integer, D::Integer, P::Integer) maxnum, sub = (D==3 && P==2) ? (80, "layer") : (D==3 && P==1) ? (75, "rod") : (D==2 && P==1) ? (7, "frieze") : _throw_subperiodic_domain(D, P) throw(DomainError(num, "group number must be between 1 and $maxnum for $sub groups (D=$D, P=$P)")) end @inline function _subperiodic_kind(D, P) # TODO: Move to a testing-utils module (only used in /test/) if D == 3 && P == 2 return "layer" elseif D == 3 && P == 1 return "rod" elseif D == 2 && P == 1 return "frieze" else _throw_subperiodic_domain(D, P) end end function _check_valid_subperiodic_num_and_dim(num::Integer, D::Integer, P::Integer) if D == 3 && P == 2 # layer groups num > 80 && _throw_subperiodic_num(num, D, P) elseif D == 3 && P == 1 # rod groups num > 75 && _throw_subperiodic_num(num, D, P) elseif D == 2 && P == 1 # frieze groups num > 7 && _throw_subperiodic_num(num, D, P) else _throw_subperiodic_domain(D,P) end num < 1 && throw(DomainError(num, "group number must be a positive integer")) return nothing end label(g::SubperiodicGroup{D,P}) where {D,P} = _subperiodic_label(num(g), D, P) @inline function _subperiodic_label(num::Integer, D::Integer, P::Integer) @boundscheck _check_valid_subperiodic_num_and_dim(num, D, P) if D == 3 && P == 2 return LAYERGROUP_IUCs[num] elseif D == 3 && P == 1 return RODGROUP_IUCs[num] elseif D == 2 && P == 1 return FRIEZEGROUP_IUCs[num] else _throw_subperiodic_domain(D, P) # unreachable under boundschecking end end centering(g::SubperiodicGroup{D,P}) where {D,P} = centering(num(g), D, P) function centering(num::Integer, D::Integer, P::Integer) if D == P return centering(num, D) else lab = _subperiodic_label(num, D, P) # (also checks input validity) return first(lab) end error("unreachable") end # ---------------------------------------------------------------------------------------- # function reduce_ops(subg::SubperiodicGroup{<:Any,P}, conv_or_prim::Bool=true, modw::Bool=true) where P return reduce_ops(operations(subg), centering(subg), conv_or_prim, modw, Val(P)) end function primitivize(subg::SubperiodicGroup{<:Any,P}, modw::Bool=true) where P return typeof(subg)(num(subg), reduce_ops(subg, false, modw)) end # TODO: conventionalize(::SubperiodicGroup) # ---------------------------------------------------------------------------------------- # # Band topology check for layer groups: # w/ time-reversal symmetry # "Z₂" = [2, 3, 7, 49, 50, 52, 66, 73] # "Z₂×Z₂" = [6, 51, 75] # w/o time-reversal symmetry: # "Z₂" = [2, 3, 7] # "Z₃" = [65] # "Z₄" = [49, 50, 52] # "Z₆" = [66, 73] # "Z₂×Z₂" = [6] # "Z₃×Z₃" = [74] # "Z₄×Z₄" = [51] # "Z₆×Z₆" = [75] # cf. Tables S18 and S20 of https://doi.org/10.1038/s41467-017-00133-2 # ---------------------------------------------------------------------------------------- #
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
7504
""" find_representation(symvals::AbstractVector{Number}, lgirs::AbstractVector{<:AbstractIrrep}, αβγ::Union{AbstractVector{<:Real},Nothing}=nothing, assert_return_T::Type{<:Union{Integer, AbstractFloat}}=Int), atol::Real=DEFAULT_ATOL, maxresnorm::Real=1e-3, verbose::Bool=false) --> Vector{assert_return_T} From a vector (or vector of vectors) of symmetry eigenvalues `symvals` sampled along all the operations of a group gᵢ, whose irreps are contained in `irs` (evaluated with optional free parameters `αβγ`), return the multiplicities of each irrep. Optionally, the multiciplities' element type can be specified via the `assert_return_T` argument (performing checked conversion; returns `nothing` if representation in `assert_return_T` is impossible). This can be useful if one suspects a particular band to transform like a fraction of an irrep (i.e., the specified symmetry data is incomplete). If no valid set of multiplicities exist (i.e., is solvable, and has real-valued and `assert_return_T` representible type), the sentinel value `nothing` is returned. Optional debugging information can in this case be shown by setting `verbose=true`. # Extended help Effectively, this applies the projection operator P⁽ʲ⁾ of each irrep's character set χ⁽ʲ⁾(gᵢ) (j = 1, ... , Nⁱʳʳ) to the symmetry data sᵢ ≡ `symvals`: P⁽ʲ⁾ ≡ (dⱼ/|g|) ∑ᵢ χ⁽ʲ⁾(gᵢ)*gᵢ [characters χ⁽ʲ⁾(gᵢ), irrep dimension dⱼ] P⁽ʲ⁾s = (dⱼ/|g|) ∑ᵢ χ⁽ʲ⁾(gᵢ)*sᵢ = nⱼ, [number of bands that transform like jth irrep] returning the irrep multiplicities mⱼ ≡ nⱼ/dⱼ. """ function find_representation(symvals::AbstractVector{<:Number}, lgirs::AbstractVector{<:AbstractIrrep}, αβγ::Union{AbstractVector{<:Real},Nothing}=nothing, assert_return_T::Type{<:Union{Integer, AbstractFloat}}=Int; atol::Real=DEFAULT_ATOL, maxresnorm::Real=1e-3, verbose::Bool=false) ct = characters(lgirs, αβγ) χs = matrix(ct) # character table as matrix (irreps-as-columns & operations-as-rows) # METHOD/THEORY: From projection operators, we have # (dⱼ/|g|) ∑ᵢ χᵢⱼ*sᵢ = nⱼ ∀j (1) # where χᵢⱼ≡χ⁽ʲ⁾(gᵢ) are the characters of the ith operation gᵢ of the jth irrep, sᵢ are # the symmetry eigenvalues (possibly, a sum!)¹ of gᵢ, and nⱼ is the number of bands that # transform like the jth irrep; finally, dⱼ is the jth irrep's dimension, and |g| is the # number of operations in the group. What we want here is the multiplicity mⱼ, i.e. the # number of times each irrep features in the band selection. mⱼ and nⱼ are related by # mⱼ ≡ nⱼ/dⱼ and are both integers since each irrep must feature a whole number of # times. Thus, we have # |g|⁻¹ ∑ᵢ χᵢⱼ*sᵢ = mⱼ ∀j (2a) # |g|⁻¹ χ†s = m (matrix notation) (2b) # Adrian suggested an equivalent approach, namely that ∑ⱼ χᵢⱼmⱼ = sᵢ ∀i, i.e. that # χm = s, (3) # such that s can be decomposed in a basis of irrep characters. This is clearly an # appealing perspective. It is easy to see that (2) and (3) are equivalent; but only if # we start from (3). Specifically, from the orthogonality of characters, we have # ∑ᵢ χʲ(gᵢ)*χᵏ(gᵢ) = δⱼₖ|g| ⇔ χ†χ = |g|I (4) # Thus, if we multiply (3) by χ†, we immediately obtain (2b) by using (4). # To go the other way, i.e. from (2) to (3), is harder since it is *not* true in general # that χχ† ∝ I. Instead, the situation is that χ/|g| is the *pseudo*inverse of χ†, in # the sense χ†(χ/|g|)χ† = χ†. This could almost certainly be exploited to go from (2b) # to (3), but it is not really important. # # Unfortunately, (1) doesn't seem to hold if we work with "realified" co-reps (i.e. # "doubled" complex or pseudoreal irreps). In that case, we do _not_² have χ†χ = |g|I. # TODO: I'm not sure why this ruins (2) and not (3), but that seems to be the case. # As such, we just use (3), even if it is slightly slower. # # ¹⁾ We can choose to work with a sum of symmetry eigenvalues of multiple bands - to # obtain the irrep multiplicities of a band multiplet - because (1) is a linear # one-to-one relation. # ²⁾ Instead, χ†χ is still a diagonal matrix, but the diagonal entries corresponding to # doubled irreps are 2|g| instead of |g| (from testing). #inv_g_order = inv(order(first(lgirs))) # [not used; see above] #ms = inv_g_order .* (χs' * symvals) # irrep multiplicities obtained from (2b) ms = χs\symvals # Adrian's approach residual = χs*ms - symvals if norm(residual) > maxresnorm if verbose @info """computed multiplicities have a residual exceeding `maxresnorm`, suggesting that there is no solution to ``χm = s``; typically, this means that `symdata` is "incomplete" (in the sense that it e.g., only contains "half" a degeneracy); `nothing` returned as sentinel""" end return nothing end # check that imaginary part is numerically zero and that all entries are representible # in type assert_return_T msℝ = real.(ms) if !isapprox(msℝ, ms, atol=atol) if verbose @info """non-negligible imaginary components found in irrep multicity; returning `nothing` as sentinel""" maximum(imag, ms) end return nothing end if assert_return_T <: Integer msT = round.(assert_return_T, msℝ) if isapprox(msT, msℝ, atol=atol) return msT else if verbose @info """multiplicities cannot be represented by the requested integer type, within the specified absolute tolerance (typically, this means that `symdata` is "incomplete" and needs to be "expanded" (i.e. add bands)""" end return nothing end elseif assert_return_T <: AbstractFloat # TODO: not sure why we wouldn't want to check for `atol` distance from nearest # integer here (returning `nothing` in the negative case) - should check if # we ever actually rely on this return convert.(assert_return_T, msℝ) end end function find_representation(multiplet_symvals::AbstractVector{<:AbstractVector{<:Number}}, lgirs::AbstractVector{<:LGIrrep}, αβγ::Union{AbstractVector{<:Real},Nothing}=nothing, assert_return_T::Type{<:Union{Integer, AbstractFloat}}=Int; atol::Real=DEFAULT_ATOL) # If multiple symmetry values are given, as a vector of vectors, we take their sum over # the band-multiplet to determine irrep of the overall multiplet (see discussion in main # method) find_representation(sum.(multiplet_symvals), lgirs, αβγ, assert_return_T, atol=atol) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
40577
""" @S_str -> SymOperation Construct a `SymOperation` from a triplet form given as a string. ## Example ```jldoctest julia> S"-y,x" 4⁺ ──────────────────────────────── (-y,x) ┌ 0 -1 ╷ 0 ┐ └ 1 0 ╵ 0 ┘ ``` """ macro S_str(s) SymOperation(s) end function xyzt2matrix(s::AbstractString, Dᵛ::Val{D}) where D W, w = xyzt2components(s, Dᵛ) return hcat(SMatrix(W), SVector(w)) end if !isdefined(Base, :eachsplit) # compat (https://github.com/JuliaLang/julia/pull/39245) eachsplit(str::T, splitter; limit::Integer=0, keepempty::Bool=true) where T = split(str, splitter; limit, keepempty) end function xyzt2components(s::AbstractString, ::Val{D}) where D # initialize zero'd MArrays for rotation/translation parts (allocation will be elided) W = zero(MMatrix{D, D, Float64}) # rotation w = zero(MVector{D, Float64}) # translation # "fill in" `W` and `w` according to content of `xyzts` xyzts = eachsplit(s, ',') xyzt2components!(W, w, xyzts) # convert to SArrays (elides allocation since `xyzt2components!` is inlined) return SMatrix(W), SVector(w) end @inline function xyzt2components!(W::MMatrix{D,D,T}, w::MVector{D,T}, xyzts #= iterator of AbstractStrings =#) where {D,T<:Real} chars = D == 3 ? ('x','y','z') : D == 2 ? ('x','y') : ('x',) d = 0 # dimension-consistency check @inbounds for (i,s) in enumerate(xyzts) # rotation/inversion/reflection part firstidx = nextidx = firstindex(s) while (idx = findnext(c -> c ∈ chars, s, nextidx)) !== nothing idx = something(idx) c = s[idx] j = c=='x' ? 1 : (c=='y' ? 2 : 3) if idx == firstidx W[i,j] = one(T) else previdx = prevind(s, idx) while (c′=s[previdx]; isspace(s[previdx])) previdx = prevind(s, previdx) previdx ≤ firstidx && break end if c′ == '+' || isspace(c′) W[i,j] = one(T) elseif c′ == '-' W[i,j] = -one(T) else throw(ArgumentError("failed to parse provided string representation")) end end nextidx = nextind(s, idx) end # nonsymmorphic part/fractional translation part lastidx = lastindex(s) if nextidx ≤ lastidx # ⇒ stuff "remaining" in `s`; a nonsymmorphic part slashidx = findnext(==('/'), s, nextidx) if slashidx !== nothing # interpret as integer fraction num = SubString(s, nextidx, prevind(s, slashidx)) den = SubString(s, nextind(s, slashidx), lastidx) w[i] = convert(T, parse(Int, num)/parse(Int, den)) else # interpret at number of type `T` w[i] = parse(T, SubString(s, nextidx, lastidx)) end end d = i end d == D || throw(DimensionMismatch("incompatible matrix size and string format")) return W, w end const IDX2XYZ = ('x', 'y', 'z') function matrix2xyzt(O::AbstractMatrix{<:Real}) D = size(O,1) buf = IOBuffer() @inbounds for i in OneTo(D) # point group part firstchar = true for j in OneTo(D) Oᵢⱼ = O[i,j] if !iszero(Oᵢⱼ) if !firstchar || signbit(Oᵢⱼ) print(buf, signaschar(Oᵢⱼ)) end print(buf, IDX2XYZ[j]) firstchar = false end end # nonsymmorphic/fractional translation part if size(O,2) == D+1 # for size(O) = D×D+1, interpret as a space-group operation and # check for nonsymmorphic parts if !iszero(O[i,D+1]) fractionify!(buf, O[i,D+1]) end end i != D && print(buf, ',') end return String(take!(buf)) end """ issymmorph(op::SymOperation, cntr::Char) --> Bool Return whether a given symmetry operation `op` is symmorphic (`true`) or nonsymmorphic (`false`). The operation is assumed provided in conventional basis with centering type `cntr`: checking symmorphism is then equivalent to checking whether the operation's translation part is zero or a lattice vector in the associated primitive basis. """ @inline function issymmorph(op::SymOperation{D}, cntr::Char) where D P = primitivebasismatrix(cntr, Val(D)) w_primitive = transform_translation(op, P, nothing) # translation in a primitive basis return iszero(w_primitive) end """ issymmorph(sg::Union{SpaceGroup, LittleGroup}) --> Bool Return whether a given space group `sg` is symmorphic (`true`) or nonsymmorphic (`false`). """ function issymmorph(g::AbstractGroup) all(op->issymmorph(op, centering(g)), operations(g)) end issymmorph(::PointGroup) = true """ issymmorph(sgnum::Integer, D::Integer=3) --> Bool Return whether the space group with number `sgnum` and dimensionality `D` is symmorphic (`true`) or nonsymmorphic (`false`). Equivalent to `issymmorph(spacegroup(sgnum, D))` but uses memoization for performance. """ function issymmorph(sgnum::Integer, D::Integer=3) @boundscheck _check_valid_sgnum_and_dim(sgnum, D) # check against memoized look-up of calling `issymmorph(spacegroup(sgnum, D))` if D == 3 return sgnum ∈ (1, 2, 3, 5, 6, 8, 10, 12, 16, 21, 22, 23, 25, 35, 38, 42, 44, 47, 65, 69, 71, 75, 79, 81, 82, 83, 87, 89, 97, 99, 107, 111, 115, 119, 121, 123, 139, 143, 146, 147, 148, 149, 150, 155, 156, 157, 160, 162, 164, 166, 168, 174, 175, 177, 183, 187, 189, 191, 195, 196, 197, 200, 202, 204, 207, 209, 211, 215, 216, 217, 221, 225, 229) elseif D == 2 return sgnum ∉ (4, 7, 8, 12) elseif D == 1 return true else error("unreachable: file a bug report") end end # ----- POINT GROUP ASSOCIATED WITH SPACE/PLANE GROUP (FULL OR LITTLE) --- """ pointgroup(ops:AbstractVector{SymOperation{D}}) pointgroup(sg::AbstractGroup) Computes the point group associated with a space group `sg` (characterized by a set of operators `ops`, which, jointly with lattice translations generate the space group), obtained by "taking away" any translational parts and then reducing to the resulting unique rotational operations. (technically, in the language of Bradley & Cracknell, this is the so-called isogonal point group of `sg`; see Sec. 1.5). Returns a `Vector` of `SymOperation`s. """ function pointgroup(ops::AbstractVector{SymOperation{D}}) where D # find SymOperations that are unique with respect to their rotational parts pgops = unique(rotation, ops) # return rotations only from the above unique set (set translations to zero) pgops .= SymOperation.(rotation.(pgops)) return pgops end pointgroup(sg::Union{SpaceGroup,LittleGroup}) = pointgroup(operations(sg)) # ----- GROUP ELEMENT COMPOSITION ----- """ compose(op1::T, op2::T, modτ::Bool=true) where T<:SymOperation Compose two symmetry operations `op1` ``= \\{W₁|w₁\\}`` and `op2` ``= \\{W₂|w₂\\}`` using the composition rule (in Seitz notation) ``\\{W₁|w₁\\}\\{W₂|w₂\\} = \\{W₁W₂|w₁+W₁w₂\\}`` By default, the translation part of the ``\\{W₁W₂|w₁+W₁w₂\\}`` is reduced to the range ``[0,1[``, i.e. computed modulo 1. This can be toggled off (or on) by the Boolean flag `modτ` (enabled, i.e. `true`, by default). Returns another `SymOperation`. The multiplication operator `*` is overloaded for `SymOperation`s to call `compose`, in the manner `op1 * op2 = compose(op1, op2, modτ=true)`. """ function compose(op1::T, op2::T, modτ::Bool=true) where T<:SymOperation T(compose(unpack(op1)..., unpack(op2)..., modτ)...) end function compose(W₁::T, w₁::R, W₂::T, w₂::R, modτ::Bool=true) where T<:SMatrix{D,D,<:Real} where R<:SVector{D,<:Real} where D W′ = W₁*W₂ w′ = w₁ + W₁*w₂ if modτ w′ = reduce_translation_to_unitrange(w′) end return W′, w′ end (*)(op1::T, op2::T) where T<:SymOperation = compose(op1, op2) """ reduce_translation_to_unitrange_q(w::AbstractVector{<:Real}) --> :: typeof(w) Reduce the components of the vector `w` to range [0.0, 1.0[, incorporating a tolerance `atol` in the reduction. """ function reduce_translation_to_unitrange(w::AbstractVector{<:Real}; atol=DEFAULT_ATOL) # naïve approach to achieve semi-robust reduction of integer-translation via a slightly # awful "approximate" modulo approach; basically just the equivalent of mod.(w′,1.0), # but reducing in a range DEFAULT_ATOL around each value. w′ = similar(w) for (i, wᵢ) in enumerate(w) w′ᵢ = mod(wᵢ, one(eltype(w))) if _fastpath_atol_isapprox(round(w′ᵢ), w′ᵢ; atol) # mod.(w, 1.0) occassionally does not reduce values that are very nearly 1.0 # due to floating point errors: we use a tolerance here to round everything # close to 0.0 or 1.0 exactly to 0.0 w′ᵢ = zero(eltype(w)) end @inbounds w′[i] = w′ᵢ end return typeof(w)(w′) end """ (⊚)(op1::T, op2::T) where T<:SymOperation --> Vector{Float64} Compose two symmetry operations `op1` ``= \\{W₁|w₁\\}`` and `op2` ``= \\{W₂|w₂\\}`` and return the quotient of ``w₁+W₁w₂`` and 1. This functionality complements `op1*op2`, which yields the translation modulo 1; accordingly, `translation(op1*op2) + op1⊚op2` yields the translation component of the composition `op1` and `op2` *without* taking it modulo 1, i.e. including any "trivial" lattice translation. Note that ⊚ can be auto-completed in Julia via \\circledcirc+[tab] """ function (⊚)(op1::T, op2::T) where T<:SymOperation # Translation result _without_ taking `mod` w′ = translation(op1) + rotation(op1)*translation(op2) # Then we take w′ modulo lattice vectors w′′ = reduce_translation_to_unitrange(w′) # Then we subtract the two w′′′ = w′ - w′′ return w′′′ end """ inv(op::SymOperation{D}) --> SymOperation{D} Compute the inverse {W|w}⁻¹ ≡ {W⁻¹|-W⁻¹w} of an operator `op` ≡ {W|w}. """ function inv(op::T) where T<:SymOperation W = rotation(op) w = translation(op) W⁻¹ = inv(W) w⁻¹ = -W⁻¹*w return T(W⁻¹, w⁻¹) end """ MultTable(ops::AbstractVector, modτ=true) Compute the multiplication (or Cayley) table of `ops`, an iterable of `SymOperation`s. A `MultTable` is returned, which contains symmetry operations resulting from composition of `row` and `col` operators; the table of indices give the symmetry operators relative to the ordering of `ops`. ## Keyword arguments - `modτ` (default: `true`): whether composition of operations is taken modulo lattice vectors (`true`) or not (`false`). """ function MultTable(ops; modτ::Bool=true) N = length(ops) table = Matrix{Int}(undef, N,N) for (row,oprow) in enumerate(ops) for (col,opcol) in enumerate(ops) op′ = compose(oprow, opcol, modτ) match = findfirst(≈(op′), ops) if isnothing(match) throw(DomainError(ops, "provided operations do not form a group; group does not contain $op′")) end @inbounds table[row,col] = match end end return MultTable(ops, table) end function check_multtable_vs_ir(lgir::LGIrrep{D}, αβγ=nothing) where D ops = operations(lgir) sgnum = num(lgir); cntr = centering(sgnum, D) primitive_ops = primitivize.(ops, cntr) # must do multiplication table in primitive basis, cf. choices in `compose` check_multtable_vs_ir(MultTable(primitive_ops), lgir, αβγ) end function check_multtable_vs_ir(mt::MultTable, ir::AbstractIrrep, αβγ=nothing; verbose::Bool=false) havewarned = false Ds = ir(αβγ) ops = operations(ir) if ir isa LGIrrep k = position(ir)(αβγ) end N = length(ops) checked = trues(N, N) for (i,Dⁱ) in enumerate(Ds) # rows for (j,Dʲ) in enumerate(Ds) # cols @inbounds mtidx = mt.table[i,j] if iszero(mtidx) && !havewarned @warn "Provided MultTable is not a group; cannot compare with irreps" checked[i,j] = false havewarned = true end Dⁱʲ = Dⁱ*Dʲ # If 𝐤 is on the BZ boundary and if the little group is nonsymmorphic # the representation could be a ray representation (see Inui, p. 89), # such that DᵢDⱼ = αᵢⱼᵏDₖ with a phase factor αᵢⱼᵏ = exp(i*𝐤⋅𝐭₀) where # 𝐭₀ is a lattice vector 𝐭₀ = τᵢ + βᵢτⱼ - τₖ, for symmetry operations # {βᵢ|τᵢ}. To ensure we capture this, we include this phase here. # See Inui et al. Eq. (5.29) for explanation. # Note that the phase's sign is opposite to that used in many other # conventions (e.g. Bradley & Cracknell, 1972, Eq. 3.7.7 & 3.7.8), # but consistent with that used in Stokes' paper (see irreps(::LGIrrep)). # It is still a puzzle to me why I cannot successfully flip the sign # of `ϕ` here and in `(lgir::LGIrrep)(αβγ)`. if ir isa LGIrrep t₀ = translation(ops[i]) .+ rotation(ops[i])*translation(ops[j]) .- translation(ops[mtidx]) ϕ = 2π*dot(k, t₀) # accumulated ray-phase match = Dⁱʲ ≈ cis(ϕ)*Ds[mtidx] # cis(x) = exp(ix) else match = Dⁱʲ ≈ Ds[mtidx] end if !match checked[i,j] = false if !havewarned && verbose println("""Provided irreps do not match group multiplication table for group $(num(ir)) in irrep $(label(ir)): First failure at (row,col) = ($(i),$(j)); Expected idx $(mtidx), got idx $(findall(≈(Dⁱʲ), Ds))""") print("Expected irrep = ") if ir isa LGIrrep println(cis(ϕ)*Ds[mtidx]) else println(Dⁱʲ) end println("Got irrep = $(Dⁱʲ)") havewarned = true end end end end return checked end # ----- LITTLE GROUP OF 𝐤 ----- # A symmetry operation g acts on a wave vector as (𝐤′)ᵀ = 𝐤ᵀg⁻¹ since we # generically operate with g on functions f(𝐫) via gf(𝐫) = f(g⁻¹𝐫), such that # the operation on a plane wave creates exp(i𝐤⋅g⁻¹𝐫); invariant plane waves # then define the little group elements {g}ₖ associated with wave vector 𝐤. # The plane waves are evidently invariant if 𝐤ᵀg⁻¹ = 𝐤ᵀ, or since g⁻¹ = gᵀ # (orthogonal transformations), if (𝐤ᵀg⁻¹)ᵀ = 𝐤 = (g⁻¹)ᵀ𝐤 = g𝐤; corresponding # to the requirement that 𝐤 = g𝐤). Because we have g and 𝐤 in different bases # (in the direct {𝐑} and reciprocal {𝐆} bases, respectively), we have to take # a little extra care here. Consider each side of the equation 𝐤ᵀ = 𝐤ᵀg⁻¹, # originally written in Cartesian coordinates, and rewrite each Cartesian term # through basis-transformation to a representation we know (w/ P(𝐗) denoting # a matrix with columns of 𝐗m that facilitates this transformation): # 𝐤ᵀ = [P(𝐆)𝐤(𝐆)]ᵀ = 𝐤(𝐆)ᵀP(𝐆)ᵀ (1) # 𝐤ᵀg⁻¹ = [P(𝐆)𝐤(𝐆)]ᵀ[P(𝐑)g(𝐑)P(𝐑)⁻¹]⁻¹ # = 𝐤(𝐆)ᵀP(𝐆)ᵀ[P(𝐑)⁻¹]⁻¹g(𝐑)⁻¹P(𝐑)⁻¹ # = 𝐤(𝐆)ᵀ2πg(𝐑)⁻¹P(𝐑)⁻¹ (2) # (1+2): 𝐤′(𝐆)ᵀP(𝐆)ᵀ = 𝐤(𝐆)ᵀ2πg(𝐑)⁻¹P(𝐑)⁻¹ # ⇔ 𝐤′(𝐆)ᵀ = 𝐤(𝐆)ᵀ2πg(𝐑)⁻¹P(𝐑)⁻¹[P(𝐆)ᵀ]⁻¹ # = 𝐤(𝐆)ᵀ2πg(𝐑)⁻¹P(𝐑)⁻¹[2πP(𝐑)⁻¹]⁻¹ # = 𝐤(𝐆)ᵀg(𝐑)⁻¹ # ⇔ 𝐤′(𝐆) = [g(𝐑)⁻¹]ᵀ𝐤(𝐆) = [g(𝐑)ᵀ]⁻¹𝐤(𝐆) # where we have used that P(𝐆)ᵀ = 2πP(𝐑)⁻¹ several times. Importantly, this # essentially shows that we can consider g(𝐆) and g(𝐑) mutually interchangeable # in practice. # By similar means, one can show that # [g(𝐑)⁻¹]ᵀ = P(𝐑)ᵀP(𝐑)g(𝐑)[P(𝐑)ᵀP(𝐑)]⁻¹ # = [P(𝐆)ᵀP(𝐆)]⁻¹g(𝐑)[P(𝐆)ᵀP(𝐆)], # by using that g(C)ᵀ = g(C)⁻¹ is an orthogonal matrix in the Cartesian basis. # [ *) We transform from a Cartesian basis to an arbitrary 𝐗ⱼ basis via a # [ transformation matrix P(𝐗) = [𝐗₁ 𝐗₂ 𝐗₃] with columns of 𝐗ⱼ; a vector # [ v(𝐗) in the 𝐗-representation corresponds to a Cartesian vector v(C)≡v via # [ v(C) = P(𝐗)v(𝐗) # [ while an operator O(𝐗) corresponds to a Cartesian operator O(C)≡O via # [ O(C) = P(𝐗)O(𝐗)P(𝐗)⁻¹ function littlegroup(ops::AbstractVector{SymOperation{D}}, kv::KVec{D}, cntr::Char='P') where D k₀, kabc = parts(kv) checkabc = !iszero(kabc) idxlist = Int[] for (idx, op) in enumerate(ops) k₀′, kabc′ = parts(compose(op, kv, checkabc)) # this is k₀(𝐆)′ = [g(𝐑)ᵀ]⁻¹k₀(𝐆) diff = k₀′ .- k₀ diff = primitivebasismatrix(cntr, Val(D))'*diff kbool = all(el -> isapprox(el, round(el), atol=DEFAULT_ATOL), diff) # check if k₀ and k₀′ differ by a _primitive_ reciprocal vector abcbool = checkabc ? isapprox(kabc′, kabc, atol=DEFAULT_ATOL) : true # check if kabc == kabc′; no need to check for difference by a reciprocal vec, since kabc is in interior of BZ if kbool && abcbool # ⇒ part of little group push!(idxlist, idx) end end return idxlist, view(ops, idxlist) end """ $(TYPEDSIGNATURES) Return the little group associated with space group `sg` at the **k**-vector `kv`. Optionally, an associated **k**-vector label `klab` can be provided; if not provided, the empty string is used as label. """ function littlegroup(sg::SpaceGroup, kv::KVec, klab::String="") _, lgops = littlegroup(operations(sg), kv, centering(sg)) return LittleGroup{dim(sg)}(num(sg), kv, klab, lgops) end # TODO: Generalize docstring to actual (broader) signature """ orbit(g::AbstractVector{<:SymOperation}, kv::KVec, cntr::Char) --> Vector{KVec{D}} orbit(lg::LittleGroup) orbit(lgir::LGIrrep) Return the orbit of of the reciprocal-space vector `kv` under the action of the group `g`, also known as the star of **k**. The orbit of `kv` in `g` is the set of inequivalent **k**-points obtained by composition of all the symmetry operations of `g` with `kv`. Two reciprocal vectors ``\\mathbf{k}`` and ``\\mathbf{k}'`` are equivalent if they differ by a primitive reciprocal lattice vector. If `kv` and `g` are specified in a conventional basis but refer to a non-primitive lattice, the centering type `cntr` must be provided to ensure that only equivalence by primitive (not conventional) reciprocal lattice vectors are considered. If the centering type of the group `g` can be inferred from `g` (e.g., if `g` is a `SpaceGroup`), `orbit` will assume a conventional setting and use the inferred centering type; otherwise, if `cntr` is neither explicitly set nor inferrable, a primitive setting is assumed. """ function orbit(g::AbstractVector{SymOperation{D}}, v::Union{AbstractVec{D}, Bravais.AbstractPoint{D}}, P::Union{Nothing, AbstractMatrix{<:Real}} = nothing) where D vs = [v] for op in g v′ = op*v if !isapproxin(v′, vs, P, #=modw=#true) push!(vs, v′) end end return vs end function orbit(g::AbstractVector{SymOperation{D}}, v::Union{AbstractVec{D}, Bravais.AbstractPoint{D}}, cntr::Char) where D return orbit(g, v, primitivebasismatrix(cntr, Val(D))) end orbit(sg::SpaceGroup{D}, kv::KVec{D}) where D = orbit(sg, kv, centering(sg)) """ cosets(G, H) For a subgroup `H` ``=H`` of `G` = ``G``, find a set of (left) coset representatives ``\\{g_i\\}`` of ``H`` in ``G``, such that (see e.g., Inui et al., Section 2.7) ```math G = \\bigcup_i g_i H. ``` The identity operation ``1`` is always included in ``\\{g_i\\}``. ## Example ```jldoctest cosets julia> G = pointgroup("6mm"); julia> H = pointgroup("3"); julia> Q = cosets(G, H) 4-element Vector{SymOperation{3}}: 1 2₀₀₁ m₁₁₀ m₋₁₁₀ ``` To generate the associated cosets, simply compose the representatives with `H`: ```jldoctest cosets julia> [compose.(Ref(q), H) for q in Q] 4-element Vector{Vector{SymOperation{3}}}: [1, 3₀₀₁⁺, 3₀₀₁⁻] [2₀₀₁, 6₀₀₁⁻, 6₀₀₁⁺] [m₁₁₀, m₁₀₀, m₀₁₀] [m₋₁₁₀, m₁₂₀, m₂₁₀] ``` """ function cosets( G::AbstractVector{T}, H::AbstractVector{T} ) where T<:AbstractOperation iszero(rem(length(G), length(H))) || error("H must be a subgroup of G: failed Lagrange's theorem") ind = div(length(G), length(H)) # [H:G] representatives = [one(T)] _cosets = Vector{T}[operations(H)] sizehint!(representatives, ind) sizehint!(_cosets, ind) for g in G any(_coset -> isapproxin(g, _coset), _cosets) && continue push!(representatives, g) push!(_cosets, compose.(Ref(g), H)) length(representatives) == ind && break end length(representatives) == ind || error("failed to find a set of coset representatives") return representatives end @doc raw""" compose(op::SymOperation, kv::KVec[, checkabc::Bool=true]) --> KVec Return the composition `op` ``= \{\mathbf{W}|\mathbf{w}\}`` and a reciprocal-space vector `kv` ``= \mathbf{k}``. The operation is assumed to be specified the direct lattice basis, and `kv` in the reciprocal lattice basis. If both were specified in the Cartesian basis, `op` would act directly via its rotation part. However, because of the different bases, it now acts as: ```math \mathbf{k}' = (\mathbf{W}^{\text{T}})^{-1}\mathbf{k}. ``` Note the transposition _and_ inverse of ``\mathbf{W}``, arising as a result of the implicit real-space basis of ``\{\mathbf{W}|\mathbf{w}\}`` versus the reciprocal-space basis of ``\mathbf{k}``. Note also that the composition of ``\{\mathbf{W}|\mathbf{w}\}`` with ``\mathbf{k}`` is invariant under ``\mathbf{w}``, i.e., translations do not act in reciprocal space. ## Extended help If `checkabc = false`, the free part of `KVec` is not transformed (can be improve performance in situations when `kabc` is zero, and several transformations are requested). """ @inline function compose(op::SymOperation{D}, kv::KVec{D}, checkabc::Bool=true) where D k₀, kabc = parts(kv) W⁻¹ᵀ = transpose(inv(rotation(op))) k₀′ = W⁻¹ᵀ*k₀ kabc′ = checkabc ? W⁻¹ᵀ * kabc : kabc return KVec{D}(k₀′, kabc′) end @doc raw""" compose(op::SymOperation, rv::RVec) --> RVec Return the composition of `op` ``= \{\mathbf{W}|\mathbf{w}\}`` and a real-space vector `rv` ``= \mathbf{r}``. The operation is taken to act directly, returning ```math \mathbf{r}' = \{\mathbf{W}|\mathbf{w}\}\mathbf{r} = \mathbf{W}\mathbf{r} + \mathbf{w}. ``` The corresponding inverse action ``\{\mathbf{W}|\mathbf{w}\}^{-1}\mathbf{r} = \mathbf{W}^{-1}\mathbf{r} - \mathbf{W}^{-1}\mathbf{w}`` can be obtained via `compose(inv(op), rv)`. """ function compose(op::SymOperation{D}, rv::RVec{D}) where D cnst, free = parts(rv) W, w = unpack(op) cnst′ = W*cnst + w free′ = W*free return RVec{D}(cnst′, free′) end (*)(op::SymOperation{D}, v::AbstractVec{D}) where D = compose(op, v) """ primitivize(op::SymOperation, cntr::Char, modw::Bool=true) --> typeof(op) Return a symmetry operation `op′` ``≡ \\{W'|w'\\}`` in a primitive setting, transformed from an input symmetry operation `op` ``= \\{W|w\\}`` in a conventional setting. The operations ``\\{W'|w'\\}`` and ``\\{W|w\\}`` are related by a transformation ``\\{P|p\\}`` via (cf. Section 1.5.2.3 of [^ITA6]): ```math \\{W'|w'\\} = \\{P|p\\}⁻¹\\{W|w\\}\\{P|p\\}. ``` where ``P`` and ``p`` are the basis change matrix and origin shifts, respectively. The relevant transformation ``\\{P|p\\}`` is inferred from the centering type, as provided by `cntr` (see also [`Bravais.centering`](@ref)). By default, translation parts of `op′`, i.e. ``w'`` are reduced modulo 1 (`modw = true`); to disable this, set `modw = false`. [^ITA6]: M.I. Aroyo, International Tables of Crystallography, Vol. A, 6th ed. (2016). """ function primitivize(op::SymOperation{D}, cntr::Char, modw::Bool=true) where D if (D == 3 && cntr === 'P') || (D == 2 && cntr === 'p') # primitive basis: identity-transform, short circuit return op else P = primitivebasismatrix(cntr, Val(D)) return transform(op, P, nothing, modw) end end """ conventionalize(op′::SymOperation, cntr::Char, modw::Bool=true) --> typeof(op) Return a symmetry operation `op` ``= \\{W|w\\}`` in a conventional setting, transformed from an input symmetry operation `op′` ``≡ \\{W'|w'\\}`` in a primitive setting. See [`primitivize(::SymOperation, ::Char, ::Bool)`](@ref) for description of the centering argument `cntr` and optional argument `modw`. """ function conventionalize(op::SymOperation{D}, cntr::Char, modw::Bool=true) where D if (D == 3 && cntr === 'P') || (D == 2 && cntr === 'p') # primitive basis: identity-transform, short circuit return op else P = primitivebasismatrix(cntr, Val(D)) return transform(op, inv(P), nothing, modw) end end @doc raw""" transform(op::SymOperation, P::AbstractMatrix{<:Real}, p::Union{AbstractVector{<:Real}, Nothing}=nothing, modw::Bool=true) --> SymOperation Transforms a `op` ``= \{\mathbf{W}|\mathbf{w}\}`` by a rotation matrix `P` and a translation vector `p` (can be `nothing` for zero-translations), producing a new symmetry operation `op′` ``= \{\mathbf{W}'|\mathbf{w}'\}`` (cf. Section 1.5.2.3 of [^ITA6]) ```math \{\mathbf{W}'|\mathbf{w}'\} = \{\mathbf{P}|\mathbf{p}\}^{-1}\{\mathbf{W}|\mathbf{w}\} \{\mathbf{P}|\mathbf{p}\} ``` with ```math \mathbf{W}' = \mathbf{P}^{-1}\mathbf{W}\mathbf{P} \text{ and } \mathbf{w}' = \mathbf{P}^{-1}(\mathbf{w}+\mathbf{W}\mathbf{p}-\mathbf{p}) ``` By default, the translation part of `op′`, i.e. ``\mathbf{w}'``, is reduced to the range ``[0,1)``, i.e. computed modulo 1. This can be disabled by setting `modw = false` (default, `modw = true`). See also [`Bravais.primitivize(::SymOperation, ::Char, ::Bool)`](@ref) and [`Bravais.conventionalize(::SymOperation, ::Char, ::Bool)`](@ref). [^ITA6]: M.I. Aroyo, International Tables of Crystallography, Vol. A, 6th ed. (2016). """ function transform(op::SymOperation{D}, P::AbstractMatrix{<:Real}, p::Union{AbstractVector{<:Real}, Nothing}=nothing, modw::Bool=true) where D W′ = transform_rotation(op, P) # = P⁻¹WP (+ rounding) w′ = transform_translation(op, P, p, modw) # = P⁻¹(w+Wp-p) # with W ≡ rotation(op) and w ≡ translation(op) return SymOperation{D}(W′, w′) end function transform_rotation(op::SymOperation{D}, P::AbstractMatrix{<:Real}) where D W = rotation(op) W′ = P\(W*P) # = P⁻¹WP # clean up rounding-errors introduced by transformation (e.g. # occassionally produces -0.0). The rotational part will # always have integer coefficients if it is in the conventional # or primitive basis of its lattice; if transformed to a nonstandard # lattice, it might not have that though. W′_cleanup = ntuple(Val(D*D)) do i @inbounds W′ᵢ = W′[i] rW′ᵢ = round(W′ᵢ) if !isapprox(W′ᵢ, rW′ᵢ, atol=DEFAULT_ATOL) rW′ᵢ = W′ᵢ # non-standard lattice transformation; fractional elements # (this is why we need Float64 in SymOperation{D}) end # since round(x) takes positive values x∈[0,0.5] to 0.0 and negative # values x∈[-0.5,-0.0] to -0.0 -- and since it is bad for us to have # both 0.0 and -0.0 -- we convert -0.0 to 0.0 here rW′ᵢ === -zero(Float64) && (rW′ᵢ = zero(Float64)) return W′ᵢ end if W′ isa SMatrix{D,D,Float64,D*D} return SMatrix{D,D,Float64,D*D}(W′_cleanup) else # P was not an SMatrix, so output isn't either return copyto!(W′, W′_cleanup) end end function transform_translation(op::SymOperation, P::AbstractMatrix{<:Real}, p::Union{AbstractVector{<:Real}, Nothing}=nothing, modw::Bool=true) w = translation(op) if !isnothing(p) w′ = P\(w+rotation(op)*p-p) # = P⁻¹(w+Wp-p) else w′ = P\w # = P⁻¹w [with p = zero(dim(op))] end if modw return reduce_translation_to_unitrange(w′) else return w′ end end # TODO: Maybe implement this in mutating form; lots of unnecessary allocations below in # many usecases """ reduce_ops(ops::AbstractVector{SymOperation{D}}, cntr::Char, conv_or_prim::Bool=true, modw::Bool=true) --> Vector{SymOperation{D}} Reduce the operations `ops`, removing operations that are identical in the primitive basis associated with the centering `cntr`. If `conv_or_prim = false`, the reduced operations are returned in the primitive basis associated with `cntr`; otherwise, in the conventional. If `modw = true`, the comparison in the primitive basis is done modulo unit primitive lattice vectors; otherwise not. A final argument of type `::Val{P}` can be specified to indicate a subperiodic group of periodicity dimension `P`, different from the spatial embedding dimension `D`. """ function reduce_ops(ops::AbstractVector{SymOperation{D}}, cntr::Char, conv_or_prim::Bool=true, modw::Bool=true, ::Val{Pdim}=Val(D) #= to allow subperiodic groups =#) where {D,Pdim} P = primitivebasismatrix(cntr, Val(D), Val(Pdim)) # transform ops (equiv. to `primitivize.(ops, cntr, modw)` but avoids loading `P` anew # for each SymOperation ops′ = transform.(ops, Ref(P), nothing, modw) # remove equivalent operations ops′_reduced = SymOperation{D}.(uniquetol(matrix.(ops′), atol=Crystalline.DEFAULT_ATOL)) if conv_or_prim # `true`: return in conventional basis return transform.(ops′_reduced, Ref(inv(P)), nothing, modw) else # `false`: return in primitive basis return ops′_reduced end end @inline function reduce_ops(slg::Union{SpaceGroup, LittleGroup}, conv_or_prim::Bool=true, modw::Bool=true) return reduce_ops(operations(slg), centering(slg), conv_or_prim, modw) end function primitivize(sg::SpaceGroup, modw::Bool=true) return typeof(sg)(num(sg), reduce_ops(sg, false, modw)) end function primitivize(lg::LittleGroup, modw::Bool=true) cntr = centering(lg) # transform both k-point and operations kv′ = primitivize(position(lg), cntr) ops′ = reduce_ops(operations(lg), cntr, false, modw) return typeof(lg)(num(lg), kv′, klabel(lg), ops′) end """ cartesianize(op::SymOperation{D}, Rs::DirectBasis{D}) --> SymOperation{D} Converts `opˡ` from a lattice basis to a Cartesian basis, by computing the transformed operators `opᶜ = 𝐑*opˡ*𝐑⁻¹` via the Cartesian basis matrix 𝐑 (whose columns are the `DirectBasis` vectors `Rs[i]`). # Note 1 The matrix 𝐑 maps vectors coefficients in a lattice basis 𝐯ˡ to coefficients in a Cartesian basis 𝐯ᶜ as 𝐯ˡ = 𝐑⁻¹𝐯ᶜ and vice versa as 𝐯ᶜ = 𝐑𝐯ˡ. Since a general transformation P transforms an "original" vectors with coefficients 𝐯 to new coefficients 𝐯′ via 𝐯′ = P⁻¹𝐯 and since we here here consider the lattice basis as the "original" basis we have P = 𝐑⁻¹. As such, the transformation of the operator `op` transforms as `opᶜ = P⁻¹*opˡ*P`, i.e. `opᶜ = transform(opˡ,P) = transform(opˡ,𝐑⁻¹)`. # Note 2 The display (e.g. Seitz and xyzt notation) of `SymOperation`s e.g. in the REPL implicitly assumes integer coefficients for its point-group matrix: as a consequence, displaying `SymOperation`s in a Cartesian basis may produce undefined behavior. The matrix representation remains valid, however. """ function cartesianize(op::SymOperation{D}, Rs::DirectBasis{D}) where D 𝐑 = stack(Rs) # avoids computing inv(𝐑) by _not_ calling out to transform(opˡ, inv(𝐑)) op′ = SymOperation{D}([𝐑*rotation(op)/𝐑 𝐑*translation(op)]) return op′ end function cartesianize(sg::SpaceGroup{D}, Rs::DirectBasis{D}) where D return SpaceGroup{D}(num(sg), cartesianize.(operations(sg), Ref(Rs))) end """ findequiv(op::SymOperation, ops::AbstractVector{SymOperation{D}}, cntr::Char) --> Tuple{Int, Vector{Float64}} Search for an operator `op′` in `ops` which is equivalent, modulo differences by *primitive* lattice translations `Δw`, to `op`. Return the index of `op′` in `ops`, as well as the primitive translation difference `Δw`. If no match is found returns `nothing`. The small irreps of `op` at wavevector k, Dⱼᵏ[`op`], can be computed from the small irreps of `op′`, Dⱼᵏ[`op′`], via Dⱼᵏ[`op`] = exp(2πik⋅`Δw`)Dⱼᵏ[`op′`] """ function findequiv(op::SymOperation{D}, ops::AbstractVector{SymOperation{D}}, cntr::Char) where D W = rotation(op) w = translation(op) P = primitivebasismatrix(cntr, Val(D)) w′ = P\w # `w` in its primitive basis for (j, opⱼ) in enumerate(ops) Wⱼ = rotation(opⱼ) wⱼ = translation(opⱼ) wⱼ′ = P\w if W == Wⱼ # rotation-part of op and opⱼ is identical # check if translation-part of op and opⱼ is equivalent, modulo a primitive lattice translation if all(el -> isapprox(el, round(el), atol=DEFAULT_ATOL), w′.-wⱼ′) return j, w.-wⱼ end end end return nothing # didn't find any match end """ _findsubgroup(opsᴳ::T, opsᴴ::T′) where T⁽′⁾<:AbstractVector{SymOperation} --> Tuple{Bool, Vector{Int}} Returns a 2-tuple with elements: 1. A boolean, indicating whether the group ``H`` (with operators `opsᴴ`) is a subgroup of the group ``G`` (with operators `opsᴳ`), i.e. whether ``H < G``. 2. An indexing vector `idxs` of `opsᴳ` into `opsᴴ` (empty if `H` is not a subgroup of `G`), such that `opsᴳ[idxs] == opsᴴ`. """ function _findsubgroup(opsᴳ::AbstractVector{SymOperation{D}}, opsᴴ::AbstractVector{SymOperation{D}}) where D idxsᴳ²ᴴ = Vector{Int}(undef, length(opsᴴ)) @inbounds for (idxᴴ, opᴴ) in enumerate(opsᴴ) idxᴳ = findfirst(==(opᴴ), opsᴳ) if idxᴳ !== nothing idxsᴳ²ᴴ[idxᴴ] = idxᴳ else return false, Int[] end end return true, idxsᴳ²ᴴ end """ issubgroup(opsᴳ::T, opsᴴ::T′) where T⁽′⁾<:AbstractVector{SymOperation} --> Bool Determine whether the operations in group ``H`` are a subgroup of the group ``G`` (each with operations `opsᴳ` and `opsᴴ`, respectively), i.e. whether ``H<G``. Specifically, this requires that ``G`` and ``H`` are both groups and that for every ``h∈H`` there exists an element ``g∈G`` such that ``h=g``. Returns a Boolean answer (`true` if normal, `false` if not). ## Note This compares space groups rather than space group types, i.e. the comparison assumes a matching setting choice between ``H`` and ``G``. To compare space group types with different conventional settings, they must first be transformed to a shared setting. """ function issubgroup(opsᴳ::AbstractVector{SymOperation{D}}, opsᴴ::AbstractVector{SymOperation{D}}) where D _subgroup_fastpath_checks(length(opsᴳ), length(opsᴴ)) || return false return _is_setting_matched_subgroup(opsᴳ, opsᴴ) end function _is_setting_matched_subgroup(opsᴳ::AbstractVector{SymOperation{D}}, opsᴴ::AbstractVector{SymOperation{D}}) where D for h in opsᴴ found = false for g in opsᴳ # consider two operations identical if they differ by an integer translation Δw = translation(h) - translation(g) if isapprox(rotation(h), rotation(g), atol=DEFAULT_ATOL) && isapprox(Δw, round.(Δw), atol=DEFAULT_ATOL) found = true continue end end found || return false end return true end function _subgroup_fastpath_checks(Nᴳ::Integer, Nᴴ::Integer) # "fast-path" checks for H !< G (returns false if violated, true as sentinel otherwise) Nᴳ > Nᴴ || return false # 1. Must be a proper supergroup (i.e. higher order) return rem(Nᴳ, Nᴴ) == 0 # 2. Must obey Lagrange's theorem (index is an integer) end """ isnormal(opsᴳ::AbstractVector{<:SymOperation}, opsᴴ::AbstractVector{<:SymOperation}; verbose::Bool=false) --> Bool Determine whether the operations in group ``H`` are normal in the group ``G`` (each with operations `opsᴳ` and `opsᴴ`), in the sense that ```math ghg⁻¹ ∈ H, ∀ g∈G, ∀ h∈H ``` Returns a Boolean answer (`true` if normal, `false` if not). ## Note This compares space groups rather than space group types, i.e. the comparison assumes a matching setting choice between ``H`` and ``G``. To compare space group types with different conventional settings, they must first be transformed to a shared setting. """ function isnormal(opsᴳ::AbstractVector{SymOperation{D}}, opsᴴ::AbstractVector{SymOperation{D}}; verbose::Bool=false) where D for g in opsᴳ g⁻¹ = inv(g) for h in opsᴴ # check if ghg⁻¹ ∉ G h′ = g*h*g⁻¹ if !isapproxin(h′, opsᴴ, nothing; atol=Crystalline.DEFAULT_ATOL) if verbose println("\nNormality-check failure:\n", "Found h′ = ", seitz(h′), "\n", "But h′ should be an element of the group: ", join(seitz.(opsᴴ), ", ")) end return false end end end return true end """ $(TYPEDSIGNATURES) Return the group generated from a finite set of generators `gens`. ## Keyword arguments - `cntr` (default, `nothing`): check equivalence of operations modulo primitive lattice vectors (see also `isapprox(::SymOperation, ::SymOperation, cntr::Union{Nothing, Char})`; only nonequivalent operations are included in the returned group. - `modτ` (default, `true`): the group composition operation can either be taken modulo lattice vectors (`true`) or not (`false`, useful e.g. for site symmetry groups). In this case, the provided generators will also be taken modulo integer lattice translations. - `Nmax` (default, `256`): the maximum size of the generated group. This is essentially a cutoff set to ensure halting of execution in case the provided set of generators do not define a *finite* group (especially relevant if `modτ=false`). If more operations than `Nmax` are generated, the method throws an overflow error. """ function generate(gens::AbstractVector{SymOperation{D}}; cntr::Union{Nothing,Char}=nothing, modτ::Bool = true, Nmax::Integer = 256) where D ops = if modτ [SymOperation{D}(op.rotation, reduce_translation_to_unitrange(translation(op))) for op in gens] else collect(gens) end unique!(ops) Ngens = length(ops) # FIXME: there's probably a more efficient way to do this? # Ideas: apparently, the group order can be inferred from the generators without # needing to compute the group itself (Schreier-Sims algorithm, see GAP; & # also the Orbit-Stabilizer theorem; https://math.stackexchange.com/a/1706006). while true Nₒₚ = length(ops) for opᵢ in (@view ops[OneTo(Nₒₚ)]) for opⱼ in (@view ops[OneTo(Ngens)]) # every op can be written as products w/ original generators opᵢⱼ = compose(opᵢ, opⱼ, modτ) if !isapproxin(opᵢⱼ, ops, cntr, modτ) push!(ops, opᵢⱼ) # early out if generators don't seem to form a closed group ... length(ops) > Nmax && _throw_overflowed_generation() end end end Nₒₚ == length(ops) && return GenericGroup{D}(ops) end end _throw_overflowed_generation() = throw(OverflowError("The provided set of generators overflowed Nmax distinct "* "operations: generators may not form a finite group; "* "otherwise, try increasing Nmax"))
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
40332
# ---------------------------------------------------------------------------------------- # # SymOperation # ---------------------------------------------------------------------------------------- # abstract type AbstractOperation{D} <: AbstractMatrix{Float64} end # the subtyping of `AbstractOperation{D}` to `AbstractMatrix{Float64}` is a bit of a pun, # especially for `MSymOperation` - but it makes a lot of linear-algebra-like things "just # work"™; examples includes `^` and `isapprox` of arrays of `<:AbstractOperation`s. # The interface of `AbstractOperation` is that it must define a `SymOperation(...)` that # returns a `SymOperation` with the associated spatial transform # define the AbstractArray interface for SymOperation @propagate_inbounds getindex(op::AbstractOperation, i::Int) = matrix(op)[i] IndexStyle(::Type{<:AbstractOperation}) = IndexLinear() size(::AbstractOperation{D}) where D = (D, D+1) copy(op::AbstractOperation) = op # cf. https://github.com/JuliaLang/julia/issues/41918 dim(::AbstractOperation{D}) where D = D # extracting StaticArray representations of the symmetry operation, amenable to linear algebra """ rotation(op::AbstractOperation{D}) --> SMatrix{D, D, Float64} Return the `D`×`D`` rotation part of `op`. """ rotation(op::AbstractOperation) = SMatrix(SymOperation(op).rotation) """ translation(op::AbstractOperation{D}) --> SVector{D, Float64} Return the `D`-dimensional translation part of `op`. """ translation(op::AbstractOperation) = SymOperation(op).translation """ matrix(op::AbstractOperation{D}) --> SMatrix{D, D+1, Float64} Return the `D`×`D+1` matrix representation of `op`. """ matrix(op::AbstractOperation) = matrix(SymOperation(op)) """ $(TYPEDEF)$(TYPEDFIELDS) """ struct SymOperation{D} <: AbstractOperation{D} rotation :: SqSMatrix{D, Float64} # a square stack-allocated matrix translation :: SVector{D, Float64} end SymOperation(m::AbstractMatrix{<:Real}) = SymOperation{size(m,1)}(float(m)) function SymOperation{D}(m::AbstractMatrix{Float64}) where D @boundscheck size(m) == (D, D+1) || throw(DomainError(size(m), "matrix size must be (D, D+1)")) # we construct the SqSMatrix's tuple data manually, rather than calling e.g. # `convert(SqSMatrix{D, Float64}, @view m[OneTo(D),OneTo(D)])`, just because it is # slightly faster that way (maybe the view has a small penalty?)... tuple_cols = ntuple(j -> ntuple(i -> (@inbounds m[i,j]), Val(D)), Val(D)) rotation = SqSMatrix{D, Float64}(tuple_cols) translation = SVector{D, Float64}(ntuple(j -> (@inbounds m[j, D+1]), Val(D))) return SymOperation{D}(rotation, translation) end function SymOperation( r::Union{SMatrix{D,D,<:Real}, MMatrix{D,D,<:Real}}, t::Union{SVector{D,<:Real}, MVector{D,<:Real}}=zero(SVector{D,Float64}) ) where D return SymOperation{D}(SqSMatrix{D,Float64}(r), t) end SymOperation(t::SVector{D,<:Real}) where D = SymOperation(one(SqSMatrix{D,Float64}), SVector{D,Float64}(t)) SymOperation{D}(t::AbstractVector{<:Real}) where D = SymOperation(one(SqSMatrix{D,Float64}), SVector{D,Float64}(t)) SymOperation{D}(op::SymOperation{D}) where D = op # part of `AbstractOperation` interface (to allow shared `MSymOperation` & `SymOperation` manipulations) function matrix(op::SymOperation{D}) where D return SMatrix{D, D+1, Float64, D*(D+1)}( (SquareStaticMatrices.flatten(op.rotation)..., translation(op)...)) end # string constructors xyzt(op::SymOperation) = matrix2xyzt(matrix(op)) SymOperation{D}(s::AbstractString) where D = SymOperation{D}(xyzt2components(s, Val(D))...) # type-unstable convenience constructors; avoid for anything non-REPL related, if possible SymOperation(m::Matrix{<:Real}) = SymOperation{size(m,1)}(float(m)) SymOperation(t::AbstractVector{<:Real}) = SymOperation{length(t)}(t) SymOperation(s::AbstractString) = SymOperation{count(==(','), s)+1}(s) rotation(m::AbstractMatrix{<:Real}) = @view m[:,1:end-1] # rotational (proper or improper) part of an operation translation(m::AbstractMatrix{<:Real}) = @view m[:,end] # translation part of an operation rotation(m::SMatrix{D,Dp1,<:Real}) where {D,Dp1} = m[:,SOneTo(D)] # needed for type-stability w/ StaticArrays (returns an SMatrix{D,D,...}) translation(m::SMatrix{D,Dp1,<:Real}) where {D,Dp1} = m[:,Dp1] # not strictly needed for type-stability (returns an SVector{D,...}) function (==)(op1::SymOperation{D}, op2::SymOperation{D}) where D return op1.rotation == op2.rotation && translation(op1) == translation(op2) end function Base.isapprox(op1::SymOperation{D}, op2::SymOperation{D}, cntr::Union{Nothing,Char}=nothing, modw::Bool=true; kws...) where D # check rotation part _fastpath_atol_isapprox(rotation(op1), rotation(op2); kws...) || return false # check translation part if cntr !== nothing && (D == 3 && cntr ≠ 'P' || D == 2 && cntr ≠ 'p') P = primitivebasismatrix(cntr, Val(D)) t1 = transform_translation(op1, P, nothing, modw) t2 = transform_translation(op2, P, nothing, modw) else t1 = translation(op1) t2 = translation(op2) if modw t1 = reduce_translation_to_unitrange(t1) t2 = reduce_translation_to_unitrange(t2) end end return _fastpath_atol_isapprox(t1, t2; kws...) end @inline _fastpath_atol_isapprox(x, y; atol=DEFAULT_ATOL) = norm(x - y) ≤ atol # (cf. https://github.com/JuliaLang/julia/pull/47464) unpack(op::SymOperation) = (rotation(op), translation(op)) one(::Type{SymOperation{D}}) where D = SymOperation{D}(one(SqSMatrix{D,Float64}), zero(SVector{D,Float64})) one(op::SymOperation) = one(typeof(op)) function isone(op::SymOperation{D}) where D @inbounds for D₁ in SOneTo(D) iszero(op.translation[D₁]) || return false for D₂ in SOneTo(D) check = D₁ ≠ D₂ ? iszero(op.rotation[D₁,D₂]) : isone(op.rotation[D₁,D₁]) check || return false end end return true end # ---------------------------------------------------------------------------------------- # # MultTable # ---------------------------------------------------------------------------------------- # """ $(TYPEDEF)$(TYPEDFIELDS) """ struct MultTable{O} <: AbstractMatrix{O} operations::Vector{O} table::Matrix{Int} # Cayley table: indexes into `operations` end MultTable(ops::Vector{O}, table) where O = MultTable{O}(ops, Matrix{Int}(table)) MultTable(ops, table) = (O=typeof(first(ops)); MultTable(collect(O, ops), table)) @propagate_inbounds function getindex(mt::MultTable, i::Int) mtidx = mt.table[i] return mt.operations[mtidx] end size(mt::MultTable) = size(mt.table) IndexStyle(::Type{<:MultTable}) = IndexLinear() # ---------------------------------------------------------------------------------------- # # AbstractVec: KVec & RVec & WyckoffPosition # ---------------------------------------------------------------------------------------- # # 𝐤-vectors (or, equivalently, 𝐫-vectors) are specified as a pair (k₀, kabc), denoting a 𝐤-vector # 𝐤 = ∑³ᵢ₌₁ (k₀ᵢ + aᵢα+bᵢβ+cᵢγ)*𝐆ᵢ (w/ recip. basis vecs. 𝐆ᵢ) # here the matrix kabc is columns of the vectors (𝐚,𝐛,𝐜) while α,β,γ are free parameters # ranging over all non-special values (i.e. not coinciding with any high-sym 𝐤). abstract type AbstractVec{D} end # A type which must have a vector field `cnst` (subtyping `AbstractVector`, of length `D`) # and a matrix field `free` (subtyping `AbstractMatrix`; of size `(D,D)`). # Intended to represent points, lines, planes and volumes in direct (`RVec`) or reciprocal # space (`KVec`). constant(v::AbstractVec) = v.cnst free(v::AbstractVec) = v.free parts(v::AbstractVec) = (constant(v), free(v)) dim(::AbstractVec{D}) where D = D isspecial(v::AbstractVec) = iszero(free(v)) parent(v::AbstractVec) = v # fall-back for non-wrapped `AbstracVec`s """ $(TYPEDSIGNATURES) Return a vector whose entries are `true` (`false`) if the free parameters α,β,γ, respectively, occur with nonzero (zero) coefficients in `v`. """ freeparams(v::AbstractVec) = map(colⱼ->!iszero(colⱼ), eachcol(free(v))) """ $(TYPEDSIGNATURES) Return total number of free parameters occuring in `v`. """ nfreeparams(v::AbstractVec) = count(colⱼ->!iszero(colⱼ), eachcol(free(v))) function (v::AbstractVec)(αβγ::AbstractVector{<:Real}) cnst, free = parts(v) return cnst + free*αβγ end (v::AbstractVec)(αβγ::Vararg{Real}) = v([αβγ...]) (v::AbstractVec)(::Nothing) = constant(v) (v::AbstractVec)() = v(nothing) # parsing `AbstractVec`s from string format function _strip_split(str::AbstractString) str = filter(!isspace, strip(str, ['(', ')', '[', ']'])) # tidy up string (remove parens & spaces) return split(str, ',') # TODO: change to `eachsplit` end function parse_abstractvec(xyz::Vector{<:SubString}, T::Type{<:AbstractVec{D}}) where D length(xyz) == D || throw(DimensionMismatch("Dimension D doesn't match input string")) cnst = zero(MVector{D, Float64}) free = zero(MMatrix{D, D, Float64}) for (i, coord) in enumerate(xyz) # --- "free" coordinates, free[i,:] --- for (j, matchgroup) in enumerate((('α','u','x'), ('β','v','y'), ('γ','w','z'))) pos₂ = findfirst(∈(matchgroup), coord) if !isnothing(pos₂) free[i,j] = searchpriornumerals(coord, pos₂) end end # --- "fixed"/constant coordinate, cnst[i] --- m = match(r"(?:\+|\-)?(?:(?:[0-9]|/|\.)+)(?!(?:[0-9]|\.)*[αuxβvyγwz])", coord) # regex matches any digit sequence, possibly including slashes, that is _not_ # followed by one of the free-part identifiers αuβvγw (this is the '(?!' bit). # If a '+' or '-' exist before the first digit, it is included in the match. # The '(?:' bits in the groups simply makes sure that we don't actually create a # capture group, because we only need the match and not the individual captures # (i.e. just a small optimization of the regex). # We do not allow arithmetic aside from division here, obviously: any extra numbers # terms are ignored. if m===nothing # no constant terms if last(coord) ∈ ('α','u','x','β','v','y','γ','w','z') # free-part only case continue # cnst[i] is zero already else throw(ErrorException("Unexpected parsing error in constant term")) end else cnst[i] = parsefraction(m.match) end end return T(cnst, free) end # generate KVec and RVec structs and parsers jointly... for T in (:KVec, :RVec) @eval begin struct $T{D} <: AbstractVec{D} cnst :: SVector{D,Float64} free :: SqSMatrix{D,Float64} end free(v::$T) = SMatrix(v.free) @doc """ $($T){D}(str::AbstractString) --> $($T){D} $($T)(str::AbstractString) --> $($T) $($T)(::AbstractVector, ::AbstractMatrix) --> $($T) Return a `$($T)` by parsing the string representations `str`, supplied in one of the following formats: ```jl "(\$1,\$2,\$3)" "[\$1,\$2,\$3]" "\$1,\$2,\$3" ``` where the coordinates `\$1`,`\$2`, and `\$3` are strings that may contain fractions, decimal numbers, and "free" parameters {`'α'`,`'β'`,`'γ'`} (or, alternatively and equivalently, {`'u'`,`'v'`,`'w'`} or {`'x'`,`'y'`,`'z'`}). Fractions such as `1/2` and decimal numbers can be parsed: but use of any other special operator besides `/` will produce undefined behavior (e.g. do not use `*`). ## Example ```jldoctest julia> $($T)("0.25,α,0") [1/4, α, 0] ``` """ function $T{D}(str::AbstractString) where D xyz = _strip_split(str) return parse_abstractvec(xyz, $T{D}) end function $T(str::AbstractString) xyz = _strip_split(str) D = length(xyz) return parse_abstractvec(xyz, $T{D}) end function $T(cnst::AbstractVector{<:Real}, free::AbstractMatrix{<:Real}=zero(SqSMatrix{length(cnst), Float64})) D = length(cnst) @boundscheck D == LinearAlgebra.checksquare(free) || throw(DimensionMismatch("Mismatched argument sizes")) $T{D}(SVector{D,Float64}(cnst), SqSMatrix{D,Float64}(free)) end $T(xs::Vararg{Real, D}) where D = $T(SVector{D, Float64}(xs)) $T(xs::NTuple{D, <:Real}) where D = $T(SVector{D, Float64}(xs)) end end # arithmetic with abstract vectors (-)(v::T) where T<:AbstractVec = T(-constant(v), -free(v)) for op in (:(-), :(+)) @eval function $op(v1::T, v2::T) where T<:AbstractVec cnst1, free1 = parts(v1); cnst2, free2 = parts(v2) return T($op(cnst1, cnst2), $op(free1, free2)) end @eval function $op(v1::T, cnst2::AbstractVector) where T<:AbstractVec dim(v1) == length(cnst2) || throw(DimensionMismatch("argument dimensions must be equal")) cnst1, free1 = parts(v1) return T($op(cnst1, cnst2), free1) end @eval function $op(cnst1::AbstractVector, v2::T) where T<:AbstractVec length(cnst1) == dim(v2) || throw(DimensionMismatch("argument dimensions must be equal")) cnst2, free2 = parts(v2) return T($op(cnst1, cnst2), $op(free2)) end end function zero(::Type{T}) where T<:AbstractVec{D} where D T(zero(SVector{D,Float64}), zero(SqSMatrix{D,Float64})) end zero(v::AbstractVec) = zero(typeof(v)) function (==)(v1::T, v2::T) where T<:AbstractVec cnst1, free1 = parts(v1); cnst2, free2 = parts(v2) # ... unpacking return cnst1 == cnst2 && free1 == free2 end """ isapprox(v1::T, v2::T, [cntr::Union{Char, Nothing, AbstractMatrix{<:Real}}, modw::Bool]; kwargs...) --> Bool Compute approximate equality of two vector quantities `v1` and `v2` of type, `T = Union{<:AbstractVec, <:AbstractPoint}`. If `modw = true`, equivalence is considered modulo lattice vectors. If `v1` and `v2` are in the conventional setting of a non-primitive lattice, the centering type `cntr` (see [`Bravais.centering`](@ref)) should be given to ensure that the relevant (primitive) lattice vectors are used in the comparison. ## Optional arguments - `cntr`: if not provided, the comparison will not account for equivalence by primitive lattice vectors (equivalent to setting `cntr=nothing`), only equivalence by lattice vectors in the basis of `v1` and `v2`. `cntr` may also be provided as a `D`×`D` `AbstractMatrix` to give the relevant transformation matrix directly. - `modw`: whether vectors that differ by multiples of a lattice vector are considered equivalent. - `kwargs...`: optional keyword arguments (e.g., `atol` and `rtol`) to be forwarded to `Base.isapprox`. """ function Base.isapprox(v1::T, v2::T, cntr::Union{Nothing, Char, AbstractMatrix{<:Real}}=nothing, modw::Bool=true; kwargs...) where T<:AbstractVec{D} where D v₀1, vabc1 = parts(v1); v₀2, vabc2 = parts(v2) # ... unpacking T′ = typeof(parent(v1)) # for wrapped RVec or KVec types like WyckoffPosition if modw # equivalence modulo a primitive lattice vector δ₀ = v₀1 - v₀2 if cntr !== nothing P = if cntr isa Char primitivebasismatrix(cntr, Val(D)) else # AbstractMatrix{<:Real} convert(SMatrix{D, D, eltype(cntr), D*D}, cntr) end δ₀ = T′ <: KVec ? P' * δ₀ : T′ <: RVec ? P \ δ₀ : error("`isapprox` is not implemented for type $T") end all(x -> isapprox(x, round(x); kwargs...), δ₀) || return false else # ordinary equivalence isapprox(v₀1, v₀2; kwargs...) || return false end # check if `vabc1 ≈ vabc2`; no need to check for difference by a lattice vector, since # `vabc1` and `vabc2` are in the interior of the BZ return isapprox(vabc1, vabc2; kwargs...) end function Base.isapprox(v1::T, v2::T, cntr::Union{Nothing, Char, AbstractMatrix{<:Real}}=nothing, modw::Bool=true; kwargs...) where T<:AbstractPoint{D} where D if modw # equivalence modulo a primitive lattice vector δ = v1 - v2 if cntr !== nothing P = if cntr isa Char primitivebasismatrix(cntr, Val(D)) else # AbstractMatrix{<:Real} convert(SMatrix{D, D, eltype(cntr), D*D}, cntr) end δ = T <: ReciprocalPoint ? P' * δ : T <: DirectPoint ? P \ δ : error("`isapprox` is not implemented for type $T") end return all(x -> isapprox(x, round(x); kwargs...), δ) else # ordinary equivalence return isapprox(v1, v2; kwargs...) end end # Note that the _coefficients_ of a general 𝐤- or 𝐫-vector transforms differently than the # reciprocal or direct _basis_, which transforms from non-primed to primed variants. See # discussion in Bravais.jl /src/transform.jl. @doc raw""" transform(v::AbstractVec, P::AbstractMatrix) --> v′::typeof(v) Return a transformed coordinate vector `v′` from an original coordinate vector `v` using a basis change matrix `P`. Note that a basis change matrix ``\mathbf{P}`` transforms direct coordinate vectors (`RVec`) as ``\mathbf{r}' = \mathbf{P}^{-1}\mathbf{r}`` but transforms reciprocal coordinates (`KVec`) as ``\mathbf{k}' = \mathbf{P}^{\mathrm{T}}\mathbf{k}`` [^ITA6] [^ITA6]: M.I. Aroyo, International Tables of Crystallography, Vol. A, 6th edition (2016): Secs. 1.5.1.2 and 1.5.2.1. """ transform(::AbstractVec, ::AbstractMatrix{<:Real}) function transform(kv::KVec{D}, P::AbstractMatrix{<:Real}) where D # P maps an "original" reciprocal-space coefficient vector (k₁ k₂ k₃)ᵀ to a transformed # coefficient vector (k₁′ k₂′ k₃′)ᵀ = Pᵀ(k₁ k₂ k₃)ᵀ k₀, kabc = parts(kv) return KVec{D}(P'*k₀, P'*kabc) end function transform(rv::RVec{D}, P::AbstractMatrix{<:Real}) where D # P maps an "original" direct-space coefficient vector (r₁ r₂ r₃)ᵀ to a transformed # coefficient vector (r₁′ r₂′ r₃′)ᵀ = P⁻¹(r₁ r₂ r₃)ᵀ rcnst, rfree = parts(rv) return RVec{D}(P\rcnst, P\rfree) end @doc raw""" primitivize(v::AbstractVec, cntr::Char) --> v′::typeof(v) Transforms a conventional coordinate vector `v` to a standard primitive basis (specified by the centering type `cntr`), returning the primitive coordinate vector `v′`. Note that a basis change matrix ``\mathbf{P}`` (as returned e.g. by [`Bravais.primitivebasismatrix`](@ref)) transforms direct coordinate vectors ([`RVec`](@ref)) as ``\mathbf{r}' = \mathbf{P}^{-1}\mathbf{r}`` but transforms reciprocal coordinates ([`KVec`](@ref)) as ``\mathbf{k}' = \mathbf{P}^{\text{T}}\mathbf{k}`` [^ITA6]. Recall also the distinction between transforming a basis and the coordinates of a vector. [^ITA6]: M.I. Aroyo, International Tables of Crystallography, Vol. A, 6th edition (2016): Secs. 1.5.1.2 and 1.5.2.1. """ function primitivize(v::AbstractVec{D}, cntr::Char) where D if cntr == 'P' || cntr == 'p' return v else P = primitivebasismatrix(cntr, Val(D)) return transform(v, P) end end """ conventionalize(v′::AbstractVec, cntr::Char) --> v::typeof(v′) Transforms a primitive coordinate vector `v′` back to a standard conventional basis (specified by the centering type `cntr`), returning the conventional coordinate vector `v`. See also [`primitivize`](@ref) and [`transform`](@ref). """ function conventionalize(v′::AbstractVec{D}, cntr::Char) where D if cntr == 'P' || cntr == 'p' return v′ else P = primitivebasismatrix(cntr, Val(D)) return transform(v′, inv(P)) end end # --- Wyckoff positions --- struct WyckoffPosition{D} <: AbstractVec{D} mult :: Int letter :: Char v :: RVec{D} # associated with a single representative end parent(wp::WyckoffPosition) = wp.v free(wp::WyckoffPosition) = free(parent(wp)) constant(wp::WyckoffPosition) = constant(parent(wp)) multiplicity(wp::WyckoffPosition) = wp.mult label(wp::WyckoffPosition) = string(multiplicity(wp), wp.letter) function transform(wp::WyckoffPosition, P::AbstractMatrix{<:Real}) return typeof(wp)(wp.mult, wp.letter, transform(parent(wp), P)) end # ---- ReciprocalPosition/Wingten position --- # TODO: Wrap all high-symmetry k-points in a structure with a label and a `KVec`, similarly # to `WyckoffPosition`s? Maybe kind of awful for dispatch purposes, unless we introduce a # new abstract type between `AbstractVec` and `KVec`/`RVec`... # ---------------------------------------------------------------------------------------- # # AbstractGroup: Generic Group, SpaceGroup, PointGroup, LittleGroup, SiteGroup, MSpaceGroup # ---------------------------------------------------------------------------------------- # """ $(TYPEDEF) The abstract supertype of all group structures, with assumed group elements of type `O` and embedding dimension `D`. Minimum interface includes definitions of: - `num(::AbstractGroup)`, returning an integer or tuple of integers. - `operations(::AbstractGroup)`, returning a set of operations. or, alternatively, fields with names `num` and `operations`, behaving accordingly. """ abstract type AbstractGroup{D,O} <: AbstractVector{O} end # where O <: AbstractOperation{D} # Interface: must have fields `operations`, `num` and dimensionality `D`. """ num(g::AbstractGroup) -> Int Return the conventional number assigned to the group `g`. """ num(g::AbstractGroup) = g.num """ operations(g::AbstractGroup) -> Vector{<:AbstractOperation} Return an `Vector` containing the operations of the group `g`. """ operations(g::AbstractGroup) = g.operations """ dim(g::AbstractGroup) -> Int Return the dimensionality of the coordinate space of the group `g`. This is a statically known number, either equaling 1, 2, or 3. """ dim(::AbstractGroup{D}) where D = D # define the AbstractArray interface for AbstractGroup @propagate_inbounds getindex(g::AbstractGroup, i::Int) = operations(g)[i] # allows direct indexing into an op::SymOperation like op[1,2] to get matrix(op)[1,2] @propagate_inbounds setindex!(g::AbstractGroup, op::SymOperation, i::Int) = (operations(g)[i] .= op) size(g::AbstractGroup) = size(operations(g)) IndexStyle(::Type{<:AbstractGroup}) = IndexLinear() # common `AbstractGroup` utilities order(g::AbstractGroup) = length(g) # fall-back for groups without an associated position notion (for dispatch); this extends # `Base.position` rather than introducing a new `position` function due to # https://github.com/JuliaLang/julia/issues/33799 """ position(x::Union{AbstractGroup, AbstractIrrep}) If a position is associated with `x`, return it; if no position is associated, return `nothing`. Applicable cases include `LittleGroup` (return the associated **k**-vector) and `SiteGroup` (returns the associated Wyckoff position), as well as their associated irrep types (`LGIrrep` and `SiteIrrep`). """ Base.position(::AbstractGroup) = nothing # sorting sort!(g::AbstractGroup; by=xyzt, kws...) = (sort!(operations(g); by, kws...); g) # --- Generic group --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct GenericGroup{D} <: AbstractGroup{D, SymOperation{D}} operations::Vector{SymOperation{D}} end num(::GenericGroup) = 0 label(::GenericGroup) = "" # --- Space group --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct SpaceGroup{D} <: AbstractGroup{D, SymOperation{D}} num::Int operations::Vector{SymOperation{D}} end label(sg::SpaceGroup) = iuc(sg) # --- Point group --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct PointGroup{D} <: AbstractGroup{D, SymOperation{D}} num::Int label::String operations::Vector{SymOperation{D}} end label(pg::PointGroup) = pg.label iuc(pg::PointGroup) = label(pg) centering(::PointGroup) = nothing # --- Little group --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct LittleGroup{D} <: AbstractGroup{D, SymOperation{D}} num::Int kv::KVec{D} klab::String operations::Vector{SymOperation{D}} end LittleGroup(num::Integer, kv::KVec{D}, klab::AbstractString, ops::AbstractVector{SymOperation{D}}) where D = LittleGroup{D}(num, kv, klab, ops) LittleGroup(num::Integer, kv::KVec{D}, ops::AbstractVector{SymOperation{D}}) where D = LittleGroup{D}(num, kv, "", ops) Base.position(lg::LittleGroup) = lg.kv klabel(lg::LittleGroup) = lg.klab label(lg::LittleGroup) = iuc(num(lg), dim(lg)) orbit(lg::LittleGroup) = orbit(spacegroup(num(lg), dim(lg)), position(lg), centering(num(lg), dim(lg))) # --- Site symmetry group --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct SiteGroup{D} <: AbstractGroup{D, SymOperation{D}} num::Int wp::WyckoffPosition{D} operations::Vector{SymOperation{D}} cosets::Vector{SymOperation{D}} end label(g::SiteGroup) = iuc(num(g), dim(g)) centering(::SiteGroup) = nothing """ $(TYPEDSIGNATURES) Return the cosets of a `SiteGroup` `g`. The cosets generate the orbit of the Wyckoff position [`position(g)`](@ref) (see also [`orbit(::SiteGroup)`](@ref)) and furnish a left-coset decomposition of the underlying space group, jointly with the operations in `g` itself. """ cosets(g::SiteGroup) = g.cosets Base.position(g::SiteGroup) = g.wp # --- "position labels" of LittleGroup and SiteGroups --- positionlabel(g::LittleGroup) = klabel(g) positionlabel(g::SiteGroup) = label(position(g)) positionlabel(g::AbstractGroup) = "" function fullpositionlabel(g::AbstractGroup) # print position label L & coords C as "L = C" if position(g) !== nothing return string(positionlabel(g), " = ", parent(position(g))) else return "" end end # TODO: drop `klabel` and use `position` label exclusively? # ---------------------------------------------------------------------------------------- # # Reality <: Enum{Int8}: 1 (≡ real), -1 (≡ pseudoreal), 0 (≡ complex) # ---------------------------------------------------------------------------------------- # """ Reality <: Enum{Int8} Enum type with instances ``` REAL = 1 PSEUDOREAL = -1 COMPLEX = 0 ``` The return value of [`reality(::AbstractIrrep)`](@ref) and [`calc_reality`](@ref) is an instance of `Reality`. The reality type of an irrep is relevant for constructing "physically real" irreps (co-reps) via [`realify`](@ref). """ @enum Reality::Int8 begin REAL = 1 PSEUDOREAL = -1 COMPLEX = 0 UNDEF = 2 # for irreps that are artificially joined together (e.g., by ⊕) end # ---------------------------------------------------------------------------------------- # # AbstractIrrep: PGIrrep, LGIrrep, SiteIrrep # ---------------------------------------------------------------------------------------- # """ AbstractIrrep{D} Abstract supertype for irreps of dimensionality `D`: must have fields `cdml`, `matrices`, `g` (underlying group), `reality` (and possibly `translations`). May overload a function `irreps` that returns the associated irrep matrices; if not, will simply be `matrices`. """ abstract type AbstractIrrep{D} end group(ir::AbstractIrrep) = ir.g label(ir::AbstractIrrep) = ir.cdml matrices(ir::AbstractIrrep) = ir.matrices """ reality(ir::AbstractIrrep) --> Reality Return the reality of `ir` (see []`Reality`](@ref)). """ reality(ir::AbstractIrrep) = ir.reality translations(ir::AbstractIrrep) = hasfield(typeof(ir), :translations) ? ir.translations : nothing characters(ir::AbstractIrrep, αβγ::Union{AbstractVector{<:Real},Nothing}=nothing) = tr.(ir(αβγ)) irdim(ir::AbstractIrrep) = size(first(matrices(ir)),1) klabel(ir::AbstractIrrep) = klabel(label(ir)) order(ir::AbstractIrrep) = order(group(ir)) operations(ir::AbstractIrrep) = operations(group(ir)) num(ir::AbstractIrrep) = num(group(ir)) dim(::AbstractIrrep{D}) where D = D Base.position(ir::AbstractIrrep) = position(group(ir)) function klabel(cdml::String) idx = findfirst(c->isdigit(c) || issubdigit(c) || c=='ˢ', cdml) # look for regular digit or subscript digit previdx = idx !== nothing ? prevind(cdml, idx) : lastindex(cdml) return cdml[firstindex(cdml):previdx] end (ir::AbstractIrrep)(αβγ) = [copy(m) for m in matrices(ir)] """ $TYPEDSIGNATURES --> Bool Return whether the provided irrep has been made "physically real" (i.e. is a corep) so that it differs from the underlying irrep (i.e. whether the irrep and "derived" corep differ). For an irrep that has not been passed to [`realify`](@ref), this is always `false`. For an irrep produced by `realify`, this can be either `false` or `true`: if the reality type is `REAL` it is `false`; if the reality type is `PSEUDOREAL` or `COMPLEX` it is `true`. """ iscorep(ir::AbstractIrrep) = ir.iscorep """ ⊕(ir1::T, ir2::T, ir3::T...) where T<:AbstractIrrep --> T Compute the representation obtained from direct sum of the irreps `ir1`, `ir2`, `ir3`, etc. The resulting representation is reducible and has dimension `irdim(ir1) + irdim(ir2) + irdim(ir3) + …`. The groups of the provided irreps must be identical. If `T isa LGIrrep`, the irrep translation factors must also be identical (due to an implementation detail of the `LGIrrep` type). Also provided via `Base.:+`. """ ⊕(ir1::T, ir2::T, ir3::T...) where T<:AbstractIrrep = ⊕(⊕(ir1, ir2), ir3...) Base.:+(ir1::T, ir2::T) where T<:AbstractIrrep = ⊕(ir1, ir2) Base.:+(ir1::T, ir2::T, ir3::T...) where T<:AbstractIrrep = +(+(ir1, ir2), ir3...) # --- Point group irreps --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct PGIrrep{D} <: AbstractIrrep{D} cdml::String g::PointGroup{D} matrices::Vector{Matrix{ComplexF64}} reality::Reality iscorep::Bool end function PGIrrep{D}(cdml::String, pg::PointGroup{D}, matrices::Vector{Matrix{ComplexF64}}, reality::Reality) where D PGIrrep{D}(cdml, pg, matrices, reality, false) end # --- Little group irreps --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct LGIrrep{D} <: AbstractIrrep{D} cdml::String # CDML label of irrep (including k-point label) g::LittleGroup{D} # contains sgnum, kv, klab, and operations that define the little group matrices::Vector{Matrix{ComplexF64}} translations::Vector{Vector{Float64}} reality::Reality iscorep::Bool end function LGIrrep{D}(cdml::String, lg::LittleGroup{D}, matrices::Vector{Matrix{ComplexF64}}, translations::Union{Vector{Vector{Float64}}, Nothing}, reality::Reality) where D translations = if translations === nothing # sentinel value for all-zero translations [zeros(Float64, D) for _=OneTo(order(lg))] else translations end return LGIrrep{D}(cdml, lg, matrices, translations, reality, false) end isspecial(lgir::LGIrrep) = isspecial(position(lgir)) issymmorph(lgir::LGIrrep) = issymmorph(group(lgir)) orbit(lgir::LGIrrep) = orbit(spacegroup(num(lgir), dim(lgir)), position(lgir), centering(num(lgir), dim(lgir))) # Site symmetry irreps """ $(TYPEDEF)$(TYPEDFIELDS) """ struct SiteIrrep{D} <: AbstractIrrep{D} cdml :: String g :: SiteGroup{D} matrices :: Vector{Matrix{ComplexF64}} reality :: Reality iscorep :: Bool pglabel :: String # label of point group that is isomorphic to the site group `g` end Base.position(siteir::SiteIrrep) = position(group(siteir)) # ---------------------------------------------------------------------------------------- # # Collection{T} # ---------------------------------------------------------------------------------------- # """ Collection{T} <: AbstractVector{T} A wrapper around a `Vector{T}`, that allows custom printing and dispatch rules of custom `T` (e.g., `AbstractIrrep` & `NewBandRep`). In Crystalline, it is assumed that all elements of the wrapped vector are associated with the _same_ space or point group. Accordingly, if `T` implements [`dim`](@ref) or [`num`](@ref), either must return the same value for each element of the `Collection` (and is equal to `dim(::Collection)` and `num(::Collection)`). """ struct Collection{T} <: AbstractVector{T} vs :: Vector{T} end # ::: AbstractArray interface ::: Base.size(c::Collection) = size(c.vs) Base.IndexStyle(::Type{<:Collection}) = IndexLinear() @propagate_inbounds Base.getindex(c::Collection{T}, i::Integer) where T = c.vs[i]::T @propagate_inbounds Base.setindex!(c::Collection{T}, v::T, i::Integer) where T = (c.vs[i]=v) Base.similar(c::Collection{T}) where T = Collection{T}(similar(c.vs)) Base.iterate(c::Collection) = iterate(c.vs) Base.iterate(c::Collection, state) = iterate(c.vs, state) # ::: Interface ::: dim(vs::Collection) = dim(first(vs)) num(vs::Collection) = num(first(vs)) # ::: Methods for `Collection{<:AbstractIrrep}` ::: Base.position(c::Collection{<:AbstractIrrep}) = position(first(c)) # ---------------------------------------------------------------------------------------- # # CharacterTable # ---------------------------------------------------------------------------------------- # abstract type AbstractCharacterTable <: AbstractMatrix{ComplexF64} end @propagate_inbounds getindex(ct::AbstractCharacterTable, i::Int) = matrix(ct)[i] size(ct::AbstractCharacterTable) = size(matrix(ct)) IndexStyle(::Type{<:AbstractCharacterTable}) = IndexLinear() labels(ct::AbstractCharacterTable) = ct.irlabs matrix(ct::AbstractCharacterTable) = ct.table tag(ct::AbstractCharacterTable) = ct.tag """ $(TYPEDEF)$(TYPEDFIELDS) """ struct CharacterTable{D} <: AbstractCharacterTable ops::Vector{SymOperation{D}} irlabs::Vector{String} table::Matrix{ComplexF64} # irreps along columns & operations along rows # TODO: for LGIrreps, it might be nice to keep this more versatile and include the # translations and k-vector as well; then we could print a result that doesn't # specialize on a given αβγ choice (see also CharacterTable(::LGirrep)) tag::String end function CharacterTable{D}(ops::AbstractVector{SymOperation{D}}, irlabs::AbstractVector{String}, table::AbstractMatrix{<:Real}) where D return CharacterTable{D}(ops, irlabs, table, "") end operations(ct::CharacterTable) = ct.ops """ characters(irs::AbstractVector{<:AbstractIrrep}, αβγ=nothing) Compute the character table associated with vector of `AbstractIrrep`s `irs`, returning a `CharacterTable`. ## Optional arguments Optionally, an `αβγ::AbstractVector{<:Real}` variable can be passed to evaluate the irrep (and associated characters) with concrete free parameters (e.g., for `LGIrrep`s, a concrete **k**-vector sampled from a "line-irrep"). Defaults to `nothing`, indicating it being either irrelevant (e.g., for `PGIrrep`s) or all free parameters implicitly set to zero. """ function characters(irs::AbstractVector{<:AbstractIrrep{D}}, αβγ::Union{AbstractVector{<:Real}, Nothing}=nothing) where D g = group(first(irs)) table = Array{ComplexF64}(undef, length(g), length(irs)) for (j,col) in enumerate(eachcol(table)) col .= characters(irs[j], αβγ) end return CharacterTable{D}(operations(g), label.(irs), table, _group_descriptor(g)) end struct ClassCharacterTable{D} <: AbstractCharacterTable classes_ops::Vector{Vector{SymOperation{D}}} irlabs::Vector{String} table::Matrix{ComplexF64} # irreps along columns & class-representative along rows tag::String end classes(ct::ClassCharacterTable) = ct.classes_ops operations(ct::ClassCharacterTable) = first.(classes(ct)) # representative operations """ classcharacters(irs::AbstractVector{<:AbstractIrrep}, αβγ=nothing) Compute the character table associated with the conjugacy classes of a vector of `AbstractIrrep`s `irs`, returning a `ClassCharacterTable`. Since characters depend only on the conjugacy class (this is not true for ray, or projective, irreps), the class-specific characters often more succintly communicate the same information as the characters for each operation (as returned by [`characters`](@ref)). See also: [`classes`](@ref). ## Optional arguments Optionally, an `αβγ::AbstractVector{<:Real}` variable can be passed to evaluate the irrep (and associated characters) with concrete free parameters (e.g., for `LGIrrep`s, a concrete **k**-vector sampled from a "line-irrep"). Defaults to `nothing`, indicating it being either irrelevant (e.g., for `PGIrrep`s) or all free parameters implicitly set to zero. """ function classcharacters(irs::AbstractVector{<:AbstractIrrep{D}}, αβγ::Union{AbstractVector{<:Real}, Nothing}=nothing) where D g = group(first(irs)) classes_ops = classes(g) classes_idx = [findfirst(==(first(class_ops)), g)::Int for class_ops in classes_ops] table = Array{ComplexF64}(undef, length(classes_ops), length(irs)) for j in 1:length(irs) ir = irs[j](αβγ) for (i,idx) in enumerate(classes_idx) table[i,j] = tr(ir[idx]) end end return ClassCharacterTable{D}(classes_ops, label.(irs), table, _group_descriptor(g)) end # ---------------------------------------------------------------------------------------- # # BandRep & BandRepSet (band representations) # ---------------------------------------------------------------------------------------- # # --- BandRep --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct BandRep <: AbstractVector{Int} wyckpos::String # Wyckoff position that induces the BR sitesym::String # Site-symmetry point group of Wyckoff pos (IUC notation) label::String # Symbol ρ↑G, with ρ denoting the irrep of the site-symmetry group dim::Int # Dimension (i.e. # of bands) in band rep spinful::Bool # Whether a given bandrep involves spinful irreps ("\bar"'ed irreps) irvec::Vector{Int} # Vector that references irlabs of a parent BandRepSet; nonzero # entries correspond to an element in the band representation irlabs::Vector{String} # A reference to the labels; same as in the parent BandRepSet end Base.position(BR::BandRep) = BR.wyckpos sitesym(BR::BandRep) = BR.sitesym label(BR::BandRep) = BR.label irreplabels(BR::BandRep) = BR.irlabs """ dim(BR::BandRep) --> Int Return the number of bands included in the provided `BandRep`. """ dim(BR::BandRep) = BR.dim # TODO: Deprecate to `occupation` instead # define the AbstractArray interface for BandRep size(BR::BandRep) = (size(BR.irvec)[1] + 1,) # number of irreps sampled by BandRep + 1 (filling) @propagate_inbounds function getindex(BR::BandRep, i::Int) return i == length(BR.irvec)+1 ? dim(BR) : BR.irvec[i] end IndexStyle(::Type{<:BandRep}) = IndexLinear() function iterate(BR::BandRep, i=1) # work-around performance issue noted in https://discourse.julialang.org/t/iteration-getindex-performance-of-abstractarray-wrapper-types/53729 if i == length(BR) return dim(BR), i+1 else return iterate(BR.irvec, i) # also handles `nothing` when iteration is done end end # --- BandRepSet --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct BandRepSet <: AbstractVector{BandRep} sgnum::Int # space group number, sequential bandreps::Vector{BandRep} kvs::Vector{<:KVec} # Vector of 𝐤-points # TODO: Make parametric klabs::Vector{String} # Vector of associated 𝐤-labels (in CDML notation) irlabs::Vector{String} # Vector of (sorted) CDML irrep labels at _all_ 𝐤-points spinful::Bool # Whether the band rep set includes (true) or excludes (false) spinful irreps timereversal::Bool # Whether the band rep set assumes time-reversal symmetry (true) or not (false) end num(brs::BandRepSet) = brs.sgnum klabels(brs::BandRepSet) = brs.klabs irreplabels(brs::BandRepSet) = brs.irlabs isspinful(brs::BandRepSet) = brs.spinful reps(brs::BandRepSet) = brs.bandreps # define the AbstractArray interface for BandRepSet size(brs::BandRepSet) = (length(reps(brs)),) # number of distinct band representations @propagate_inbounds getindex(brs::BandRepSet, i::Int) = reps(brs)[i] IndexStyle(::Type{<:BandRepSet}) = IndexLinear()
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
17407
# ---------------------------------------------------------------------------------------- # # AbstractSymmetryVector definition abstract type AbstractSymmetryVector{D} <: AbstractVector{Int} end # ---------------------------------------------------------------------------------------- # # SymmetryVector mutable struct SymmetryVector{D} <: AbstractSymmetryVector{D} const lgirsv :: Vector{Collection{LGIrrep{D}}} const multsv :: Vector{Vector{Int}} occupation :: Int end # ::: AbstractSymmetryVector interface ::: irreps(n::SymmetryVector) = n.lgirsv multiplicities(n::SymmetryVector) = n.multsv occupation(n::SymmetryVector) = n.occupation SymmetryVector(n::SymmetryVector) = n SymmetryVector{D}(n::SymmetryVector{D}) where D = n SymmetryVector{D′}(::SymmetryVector{D}) where {D′, D} = error("incompatible dimensions") # ::: AbstractArray interface beyond AbstractSymmetryVector ::: function Base.similar(n::SymmetryVector{D}) where D SymmetryVector{D}(n.lgirsv, similar(n.multsv), 0) end @propagate_inbounds function Base.setindex!(n::SymmetryVector, v::Int, i::Int) Nⁱʳ = length(n) @boundscheck i > Nⁱʳ && throw(BoundsError(n, i)) i == Nⁱʳ && (n.occupation = v; return v) i₀ = i₁ = 0 for mults in multiplicities(n) i₁ += length(mults) if i ≤ i₁ mults[i-i₀] = v return v end i₀ = i₁ end end # ::: Optimizations and utilities ::: function Base.Vector(n::SymmetryVector) nv = Vector{Int}(undef, length(n)) i = 1 @inbounds for mults in multiplicities(n) N = length(mults) nv[i:i+N-1] .= mults i += N end nv[end] = occupation(n) return nv end irreplabels(n::SymmetryVector) = [label(ir) for ir in Iterators.flatten(irreps(n))] klabels(n::SymmetryVector) = [klabel(first(irs)) for irs in irreps(n)] num(n::SymmetryVector) = num(first(first(irreps(n)))) # ::: Parsing from string ::: """ parse(::Type{SymmetryVector{D}}, s::AbstractString, lgirsv::Vector{Collection{LGIrrep{D}}}) -> SymmetryVector{D} Parse a string `s` to a `SymmetryVector` over the irreps provided in `lgirsv`. The irrep labels of `lgirsv` and `s` must use the same convention. ## Example ```jldoctest julia> brs = calc_bandreps(220); julia> lgirsv = irreps(brs); # irreps at P, H, Γ, & PA julia> s = "[2P₃, 4N₁, H₁H₂+H₄H₅, Γ₁+Γ₂+Γ₄+Γ₅, 2PA₃]"; julia> parse(SymmetryVector, s, lgirsv) 15-irrep SymmetryVector{3}: [2P₃, 4N₁, H₁H₂+H₄H₅, Γ₁+Γ₂+Γ₄+Γ₅, 2PA₃] (8 bands) ``` """ function Base.parse( T::Type{<:SymmetryVector}, s::AbstractString, lgirsv::Vector{Collection{LGIrrep{D}}}) where D if !isnothing(dim(T)) && dim(T) != D # small dance to allow using both `T=SymmetryVector` & `T=SymmetryVector{D}` error("incompatible dimensions of requested SymmetryVector and provided `lgirsv`") end s′ = replace(s, " "=>"", "*"=>"") multsv = [zeros(Int, length(lgirs)) for lgirs in lgirsv] μ = typemax(Int) # sentinel for uninitialized for (i, lgirs) in enumerate(lgirsv) found_irrep = false for (j, lgir) in enumerate(lgirs) irlab = label(lgir) idxs = findfirst(irlab, s′) isnothing(idxs) && continue found_irrep = true pos₂ = first(idxs) m = searchpriornumerals(s′, pos₂, Int) multsv[i][j] = m end if !found_irrep error("could not identify any irreps associated with the \ $(klabel(first(lgirs)))-point in the input string $s") end μ′ = sum(multsv[i][j]*irdim(lgirs[j]) for j in eachindex(lgirs)) if μ == typemax(Int) # uninitialized μ = μ′ else # validate that occupation number is invariant across all k-points μ == μ′ || error("inconsistent occupation numbers across k-points") end end return SymmetryVector(lgirsv, multsv, μ) end # ---------------------------------------------------------------------------------------- # # AbstractSymmetryVector interface & shared implementation # ::: API ::: """ SymmetryVector(n::AbstractSymmetryVector) -> SymmetryVector Return a `SymmetryVector` realization of `n`. If `n` is already a `SymmetryVector`, return `n` directly; usually, the returned value will directly reference information in `n` (i.e., will not be a copy). """ function SymmetryVector(::AbstractSymmetryVector) end # ::: Optional API (if not `SymmetryVector`; otherwise fall-back to `SymmetryVector`) ::: """ irreps(n::AbstractSymmetryVector{D}) -> AbstractVector{<:Collection{<:AbstractIrrep{D}}} Return the irreps referenced by `n`. The returned value is an `AbstractVector` of `Collection{<:AbstractIrrep}`s, with irreps for distinct groups, usually associated with specific **k**-manifolds, belonging to the same `Collection`. See also [`multiplicities(::AbstractSymmetryVector)`](@ref). """ irreps(n::AbstractSymmetryVector) = irreps(SymmetryVector(n)) """ multiplicities(n::AbstractSymmetryVector) -> AbstractVector{<:AbstractVector{Int}} Return the multiplicities of the irreps referenced by `n`. See also [`irreps(::AbstractSymmetryVector)`](@ref). """ multiplicities(n::AbstractSymmetryVector) = multiplicities(SymmetryVector(n)) """ occupation(n::AbstractSymmetryVector) -> Int Return the occupation of (i.e., number of bands contained within) `n`. """ occupation(n::AbstractSymmetryVector) = occupation(SymmetryVector(n)) # misc convenience accessors irreplabels(n::AbstractSymmetryVector) = irreplabels(SymmetryVector(n)) klabels(n::AbstractSymmetryVector) = klabels(SymmetryVector(n)) num(n::AbstractSymmetryVector) = num(SymmetryVector(n)) # ::: AbstractArray interface ::: Base.size(n::AbstractSymmetryVector) = (mapreduce(length, +, multiplicities(n)) + 1,) @propagate_inbounds function Base.getindex(n::AbstractSymmetryVector, i::Int) Nⁱʳ = length(n) @boundscheck i > Nⁱʳ && throw(BoundsError(n, i)) i == Nⁱʳ && return occupation(n) i₀ = i₁ = 0 for mults in multiplicities(n) i₁ += length(mults) if i ≤ i₁ return mults[i-i₀] end i₀ = i₁ end error("unreachable reached") end Base.iterate(n::AbstractSymmetryVector) = multiplicities(n)[1][1], (1, 1) function Base.iterate(n::AbstractSymmetryVector, state::Tuple{Int, Int}) i, j = state j += 1 if i > length(multiplicities(n)) return nothing end if j > length(multiplicities(n)[i]) if i == length(multiplicities(n)) return occupation(n), (i+1, j) end i += 1 j = 1 end return multiplicities(n)[i][j], (i, j) end # ::: Algebraic operations ::: function Base.:+(n::AbstractSymmetryVector{D}, m::AbstractSymmetryVector{D}) where D _n = SymmetryVector(n) _m = SymmetryVector(m) irreps(_n) === irreps(_m) return SymmetryVector(irreps(_n), multiplicities(_n) .+ multiplicities(_m), occupation(_n) + occupation(_m)) end function Base.:-(n::AbstractSymmetryVector{D}) where D SymmetryVector{D}(irreps(n), -multiplicities(n), -occupation(n)) end Base.:-(n::AbstractSymmetryVector{D}, m::AbstractSymmetryVector{D}) where D = n + (-m) function Base.:*(n::AbstractSymmetryVector{D}, k::Integer) where D SymmetryVector{D}(irreps(n), [ms .* k for ms in multiplicities(n)], occupation(n) * k) end Base.:*(k::Integer, n::AbstractSymmetryVector) = n * k function Base.zero(n::AbstractSymmetryVector{D}) where D SymmetryVector{D}(irreps(n), zero.(multiplicities(n)), 0) end # make sure `sum(::AbstractSymmetryVector)` is type-stable (necessary since the + operation # now may change the type of an `AbstractSymmetryVector` - so `n[1]` and `n[1]+n[2]` may # be of different types) and always returns a `SymmetryVector` Base.reduce_first(::typeof(+), n::AbstractSymmetryVector) = SymmetryVector(n) # ::: Utilities & misc ::: dim(::AbstractSymmetryVector{D}) where D = D dim(::Type{<:AbstractSymmetryVector{D}}) where D = D dim(::Type{<:AbstractSymmetryVector}) = nothing # ---------------------------------------------------------------------------------------- # # NewBandRep struct NewBandRep{D} <: AbstractSymmetryVector{D} siteir :: SiteIrrep{D} n :: SymmetryVector{D} timereversal :: Bool spinful :: Bool end # ::: AbstractSymmetryVector interface ::: SymmetryVector(br::NewBandRep) = br.n # ::: AbstractArray interface beyond AbstractSymmetryVector ::: Base.setindex!(br::NewBandRep{D}, v::Int, i::Int) where D = (br.n[i] = v) function Base.similar(br::NewBandRep{D}) where D NewBandRep{D}(br.siteir, similar(br.n), br.timereversal, br.spinful) end Base.Vector(br::NewBandRep) = Vector(br.n) # ::: Utilities ::: group(br::NewBandRep) = group(br.siteir) Base.position(br::NewBandRep) = position(group(br)) # ::: Conversion to BandRep ::: function Base.convert(::Type{BandRep}, br::NewBandRep{D}) where D wyckpos = label(position(br.siteir)) sitesym = br.siteir.pglabel siteirlabel = label(br.siteir)*"↑G" dim = occupation(br) spinful = br.spinful irvec = collect(br)[1:end-1] irlabs = irreplabels(br) return BandRep(wyckpos, sitesym, siteirlabel, dim, spinful, irvec, irlabs) end # ---------------------------------------------------------------------------------------- # # Collection{<:NewBandRep} # ::: Utilities ::: irreps(brs::Collection{<:NewBandRep}) = irreps(SymmetryVector(first(brs))) irreplabels(brs::Collection{<:NewBandRep}) = irreplabels(SymmetryVector(first(brs))) klabels(brs::Collection{<:NewBandRep}) = klabels(SymmetryVector(first(brs))) # ::: Conversion to BandRepSet ::: function Base.convert(::Type{BandRepSet}, brs::Collection{<:NewBandRep}) sgnum = num(brs) bandreps = convert.(Ref(BandRep), brs) kvs = [position(lgirs) for lgirs in irreps(brs)] klabs = klabels(brs) irlabs = irreplabels(brs) spinful = first(brs).spinful timereversal = first(brs).timereversal return BandRepSet(sgnum, bandreps, kvs, klabs, irlabs, spinful, timereversal) end # ---------------------------------------------------------------------------------------- # # CompositeBandRep """ CompositeBandRep{D} <: AbstractSymmetryVector{D} A type representing a linear rational-coefficient combination of `NewBandRep{D}`s. Although the coefficients may be rational numbers in general, their superposition must correspond to integer-valued irrep multiplicities and band occupation numbers; in particular, if they do not, conversion to a `SymmetryVector` will error. See also [`CompositeBandRep_from_indices`](@ref) for construction from a vector included indices into `brs`. ## Fields - `coefs::Vector{Rational{Int}}`: a coefficient vector associated with each band representation in `brs`; the coefficient of the `i`th band representation `brs[i]` is `coefs[i]`. - `brs::Collection{NewBandRep{D}}`: the band representations referenced by `coefs`. ## Example ### Fragile symmetry vector As a first example, we build a `CompositeBandRep` representing a fragilely topological configuration (i.e., featuring negative integer coefficients): ```julia julia> brs = calc_bandreps(2); julia> coefs = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1]; julia> cbr = CompositeBandRep(coefs, brs) 16-irrep CompositeBandRep{3}: (1g|Ag) + (1f|Aᵤ) + (1e|Ag) - (1a|Aᵤ) (2 bands) ``` We can build the associated [`SymmetryVector`](@ref) to inspect the associated irrep content: ```julia julia> SymmetryVector(cbr) [2Z₁⁺, 2Y₁⁻, 2U₁⁻, 2X₁⁺, 2T₁⁺, 2Γ₁⁺, 2V₁⁺, 2R₁⁺] (2 bands) ``` Similarly, we can confirm that `cbr` is indeed a simple linear combination of the associated band representations: ```julia julia> sum(c * brs[i] for (i, c) in enumerate(coefs)) == cbr true ``` And we can even do simple arithmetic with `cbr` (a `CompositeBandRep` is an element of a monoid: ```julia julia> cbr + 2cbr 3(1g|Ag) + 3(1f|Aᵤ) + 3(1e|Ag) - 3(1a|Aᵤ) (6 bands) ``` ### Nontrivial symmetry vector The coefficients of a `CompositeBandRep` can be non-integer, provided the associated irrep multiplicities of the overall summation are integer. Accordingly, a `CompositeBandRep` may also be used to represent a topologically nontrivial symmetry vector (and, by extension, any physical symmetry vector): ```julia julia> coefs = [-1//4, 0, -1//4, 0, -1//4, 0, 1//4, 0, 1//4, 0, 1//4, 0, -1//4, 0, 1//4, 1]; julia> cbr = CompositeBandRep{3}(coefs, brs) 16-irrep CompositeBandRep{3}: -(1/4)×(1h|Ag) - (1/4)×(1g|Ag) - (1/4)×(1f|Ag) + (1/4)×(1e|Ag) + (1/4)×(1d|Ag) + (1/4)×(1c|Ag) - (1/4)×(1b|Ag) + (1/4)×(1a|Ag) + (1a|Aᵤ) (1 band) julia> SymmetryVector(cbr) 16-irrep SymmetryVector{3}: [Z₁⁺, Y₁⁻, U₁⁻, X₁⁻, T₁⁻, Γ₁⁻, V₁⁻, R₁⁻] (1 band) ``` """ struct CompositeBandRep{D} <: AbstractSymmetryVector{D} coefs :: Vector{Rational{Int}} brs :: Collection{NewBandRep{D}} function CompositeBandRep{D}(coefs, brs) where D if length(coefs) ≠ length(brs) error("length of provided coefficients do not match length of provided band \ representations") end new{D}(coefs, brs) end end function CompositeBandRep(coefs, brs::Collection{NewBandRep{D}}) where D return CompositeBandRep{D}(coefs, brs) end # ::: Convenience constructor ::: """ CompositeBandRep_from_indices(idxs::Vector{Int}, brs::Collection{<:NewBandRep}) Return a [`CompositeBandRep`](@ref) whose symmetry content is equal to the sum the band representations of `brs` over `idxs`. In terms of irrep multiplicity, this is equivalent to `sum(brs[idxs])` in the sense that `CompositeBandRep(idxs, brs)` is equal to `sum(brs[idxs])` for each irrep multiplicity. The difference, and primary motivation for using `CompositeBandRep`, is that `CompositeBandRep` retains information about which band representations are included and with what multiplicity (the multiplicity of the `i`th `brs`-element being equaling to `count(==(i), idxs)`). ## Example ```julia julia> brs = calc_bandreps(2); julia> cbr = CompositeBandRep_from_indices([1, 1, 2, 6], brs) 16-irrep CompositeBandRep{3}: (1f|Aᵤ) + (1h|Aᵤ) + 2(1h|Ag) (4 bands) julia> cbr == brs[1] + brs[1] + brs[2] + brs[6] true julia> SymmetryVector(cbr) 16-irrep SymmetryVector{3}: [2Z₁⁺+2Z₁⁻, Y₁⁺+3Y₁⁻, 2U₁⁺+2U₁⁻, 2X₁⁺+2X₁⁻, 3T₁⁺+T₁⁻, 2Γ₁⁺+2Γ₁⁻, 3V₁⁺+V₁⁻, R₁⁺+3R₁⁻] (4 bands) ``` """ function CompositeBandRep_from_indices(idxs::Vector{Int}, brs::Collection{<:NewBandRep}) coefs = zeros(Rational{Int}, length(brs)) for i in idxs @boundscheck checkbounds(brs, i) coefs[i] += 1 end CompositeBandRep(coefs, brs) end # ::: AbstractSymmetryVector interface ::: function SymmetryVector(cbr::CompositeBandRep{D}) where {D} brs = cbr.brs lgirsv = irreps(brs) multsv_r = zeros.(eltype(cbr.coefs), size.(multiplicities(first(brs)))) μ = 0 for (j, c) in enumerate(cbr.coefs) iszero(c) && continue multsv_r .+= c * multiplicities(brs[j]) μ += c * occupation(brs[j]) end multsv = similar.(multsv_r, Int) for (i, (mults_r, mults)) in enumerate(zip(multsv_r, multsv)) for (j, m_r) in enumerate(mults_r) m_int = round(Int, m_r) if m_int ≠ m_r error(LazyString("CompositeBandRep has non-integer multiplicity ", m_r, " for irrep ", label(lgirsv[i][j]), ": cannot convert to SymmetryVector")) end mults[j] = m_int end end multsv = [Int.(mults) for mults in multsv_r] μ = Int(μ) return SymmetryVector{D}(lgirsv, multsv, μ) end function occupation(cbr::CompositeBandRep) μ_r = sum(c * occupation(cbr.brs[j]) for (j, c) in enumerate(cbr.coefs) if !iszero(c); init=zero(eltype(cbr.coefs))) isinteger(μ_r) || error(lazy"CompositeBandRep has non-integer occupation (= $μ_r)") return Int(μ_r) end # ::: overloads to avoid materializing a SymmetryVector unnecessarily ::: irreps(cbr::CompositeBandRep) = irreps(first(cbr.brs)) klabels(cbr::CompositeBandRep) = klabels(first(cbr.brs)) irreplabels(cbr::CompositeBandRep) = irreplabels(first(cbr.brs)) num(cbr::CompositeBandRep) = num(first(cbr.brs)) # ::: AbstractArray interface ::: Base.size(cbr::CompositeBandRep) = size(first(cbr.brs)) function Base.getindex(cbr::CompositeBandRep{D}, i::Int) where {D} m_r = sum(c * cbr.brs[j][i] for (j, c) in enumerate(cbr.coefs) if !iszero(c); init=zero(eltype(cbr.coefs))) isinteger(m_r) || error(lazy"CompositeBandRep has non-integer multiplicity (= $m_r)") return Int(m_r) end # ::: Arithmetic operations ::: function Base.:+(cbr1::CompositeBandRep{D}, cbr2::CompositeBandRep{D}) where D if cbr1.brs !== cbr2.brs error("provided CompositeBandReps must reference egal `brs`") end return CompositeBandRep{D}(cbr1.coefs + cbr2.coefs, cbr1.brs) end Base.:-(cbr::CompositeBandRep{D}) where D = CompositeBandRep{D}(-cbr.coefs, cbr.brs) Base.:-(cbr1::CompositeBandRep{D}, cbr2::CompositeBandRep{D}) where D = cbr1 + (-cbr2) function Base.:*(cbr::CompositeBandRep{D}, n::Integer) where D return CompositeBandRep{D}(cbr.coefs .* n, cbr.brs) end Base.zero(cbr::CompositeBandRep{D}) where D = CompositeBandRep{D}(zero(cbr.coefs), cbr.brs)
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
10617
# === frequent error messages === @noinline _throw_1d2d_not_yet_implemented(D::Integer) = throw(DomainError(D, "dimensions D≠3 not yet supported")) @noinline _throw_2d_not_yet_implemented(D::Integer) = throw(DomainError(D, "dimensions D=2 not yet supported")) @noinline _throw_invalid_dim(D::Integer) = throw(DomainError(D, "dimension must be 1, 2, or 3")) @noinline _throw_invalid_sgnum(sgnum::Integer, D::Integer) = throw(DomainError(sgnum, "sgnum must be between 1 and $(MAX_SGNUM[D]) in dimension $(D)")) # === string manipulation/parsing === """ parsefraction(str::AbstractString) Parse a string `str`, allowing fraction inputs (e.g. `"1/2"`), return as `Float64`. """ function parsefraction(str::AbstractString) slashidx = findfirst(==('/'), str) if slashidx === nothing return parse(Float64, str) else num = SubString(str, firstindex(str), prevind(str, slashidx)) den = SubString(str, nextind(str, slashidx), lastindex(str)) return parse(Float64, num)/parse(Float64, den) end end """ fractionify!(io::IO, x::Real, forcesign::Bool=true, tol::Real=1e-6) Write a string representation of the nearest fraction (within a tolerance `tol`) of `x` to `io`. If `forcesign` is true, the sign character of `x` is printed whether `+` or `-` (otherwise, only printed if `-`). """ function fractionify!(io::IO, x::Number, forcesign::Bool=true, tol::Real=1e-6) if forcesign || signbit(x) print(io, signaschar(x)) end t = rationalize(float(x), tol=tol) # convert to "minimal" Rational fraction (within nearest `tol` neighborhood) print(io, abs(numerator(t))) if !isinteger(t) print(io, '/') print(io, denominator(t)) end return nothing end function fractionify(x::Number, forcesign::Bool=true, tol::Real=1e-6) buf = IOBuffer() fractionify!(buf, x, forcesign, tol) return String(take!(buf)) end signaschar(x::Real) = signbit(x) ? '-' : '+' function searchpriornumerals(coord, pos₂, ::Type{T}=Float64) where T pos₁ = pos₂ while (prev = prevind(coord, pos₁)) != 0 # not first character if isnumeric(coord[prev]) || coord[prev] == '.' pos₁ = prev elseif coord[prev] == '+' || coord[prev] == '-' pos₁ = prev break else break end end prefix = coord[pos₁:prevind(coord, pos₂)] if !any(isnumeric, prefix) # in case there's no numerical prefix, it must be unity if prefix == "+" || prefix == "" return one(T) elseif prefix == "-" return -one(T) else throw(DomainError(prefix, "unable to parse prefix")) end else return parse(T, prefix) end end # --- UNICODE FUNCTIONALITY --- const SUBSCRIPT_MAP = Dict('1'=>'₁', '2'=>'₂', '3'=>'₃', '4'=>'₄', '5'=>'₅', # digits '6'=>'₆', '7'=>'₇', '8'=>'₈', '9'=>'₉', '0'=>'₀', 'a'=>'ₐ', 'e'=>'ₑ', 'h'=>'ₕ', 'i'=>'ᵢ', 'j'=>'ⱼ', # letters (missing several) 'k'=>'ₖ', 'l'=>'ₗ', 'm'=>'ₘ', 'n'=>'ₙ', 'o'=>'ₒ', 'p'=>'ₚ', 'r'=>'ᵣ', 's'=> 'ₛ', 't'=>'ₜ', 'u'=>'ᵤ', 'v'=>'ᵥ', 'x'=>'ₓ', '+'=>'₊', '-'=>'₋', '='=>'₌', '('=>'₍', ')'=>'₎', # special characters 'β'=>'ᵦ', 'γ'=>'ᵧ', 'ρ'=>'ᵨ', 'ψ'=>'ᵩ', 'χ'=>'ᵪ', # greek # missing letter subscripts: b, c, d, f, g, q, w, y, z ) const SUPSCRIPT_MAP = Dict('1'=>'¹', '2'=>'²', '3'=>'³', '4'=>'⁴', '5'=>'⁵', # digits '6'=>'⁶', '7'=>'⁷', '8'=>'⁸', '9'=>'⁹', '0'=>'⁰', 'a'=>'ᵃ', 'b'=>'ᵇ', 'c'=>'ᶜ', 'd'=>'ᵈ', 'e'=>'ᵉ', 'f'=>'ᶠ', 'g'=>'ᵍ', 'h'=>'ʰ', 'i'=>'ⁱ', 'j'=>'ʲ', # letters (only 'q' missing) 'k'=>'ᵏ', 'l'=>'ˡ', 'm'=>'ᵐ', 'n'=>'ⁿ', 'o'=>'ᵒ', 'p'=>'ᵖ', 'r'=>'ʳ', 's'=>'ˢ', 't'=>'ᵗ', 'u'=>'ᵘ', 'v'=>'ᵛ', 'w'=>'ʷ', 'x'=>'ˣ', 'y'=>'ʸ', 'z'=>'ᶻ', '+'=>'⁺', '-'=>'⁻', '='=>'⁼', '('=>'⁽', ')'=>'⁾', # special characters 'α'=>'ᵅ', 'β'=>'ᵝ', 'γ'=>'ᵞ', 'δ'=>'ᵟ', 'ε'=>'ᵋ', # greek 'θ'=>'ᶿ', 'ι'=>'ᶥ', 'φ'=>'ᶲ', 'ψ'=>'ᵠ', 'χ'=>'ᵡ', # missing letter superscripts: q ) const SUBSCRIPT_MAP_REVERSE = Dict(v=>k for (k,v) in SUBSCRIPT_MAP) const SUPSCRIPT_MAP_REVERSE = Dict(v=>k for (k,v) in SUPSCRIPT_MAP) subscriptify(str::AbstractString) = map(subscriptify, str) function subscriptify(c::Char) if c ∈ keys(SUBSCRIPT_MAP) return SUBSCRIPT_MAP[c] else return c end end supscriptify(str::AbstractString) = map(supscriptify, str) function supscriptify(c::Char) if c ∈ keys(SUPSCRIPT_MAP) return SUPSCRIPT_MAP[c] else return c end end function formatirreplabel(str::AbstractString) buf = IOBuffer() for c in str if c ∈ ('+','-') write(buf, supscriptify(c)) elseif isdigit(c) write(buf, subscriptify(c)) else write(buf, c) end end return String(take!(buf)) end normalizesubsup(str::AbstractString) = map(normalizesubsup, str) function normalizesubsup(c::Char) if c ∈ keys(SUBSCRIPT_MAP_REVERSE) return SUBSCRIPT_MAP_REVERSE[c] elseif c ∈ keys(SUPSCRIPT_MAP_REVERSE) return SUPSCRIPT_MAP_REVERSE[c] else return c end end issubdigit(c::AbstractChar) = (c >= '₀') & (c <= '₉') issupdigit(c::AbstractChar) = (c ≥ '⁰') & (c ≤ '⁹') || c == '\u00B3' || c == '\u00B2' function unicode_frac(x::Number) xabs=abs(x) if xabs == 0; return "0" # early termination for common case & avoids undesirable sign for -0.0 elseif isinteger(x); return string(convert(Int, x)) elseif xabs ≈ 1/2; xstr = "½" elseif xabs ≈ 1/3; xstr = "⅓" elseif xabs ≈ 2/3; xstr = "⅔" elseif xabs ≈ 1/4; xstr = "¼" elseif xabs ≈ 3/4; xstr = "¾" elseif xabs ≈ 1/5; xstr = "⅕" elseif xabs ≈ 2/5; xstr = "⅖" elseif xabs ≈ 3/5; xstr = "⅗" elseif xabs ≈ 4/5; xstr = "⅘" elseif xabs ≈ 1/6; xstr = "⅙" elseif xabs ≈ 5/6; xstr = "⅚" elseif xabs ≈ 1/7; xstr = "⅐" elseif xabs ≈ 1/8; xstr = "⅛" elseif xabs ≈ 3/8; xstr = "⅜" elseif xabs ≈ 5/8; xstr = "⅝" elseif xabs ≈ 7/8; xstr = "⅞" elseif xabs ≈ 1/9; xstr = "⅑" elseif xabs ≈ 1/10; xstr = "⅒" else xstr = string(xabs) # return a conventional string representation end return signbit(x) ? "-"*xstr : xstr end const ROMAN2GREEK_DICT = Dict("LD"=>"Λ", "DT"=>"Δ", "SM"=>"Σ", "GM"=>"Γ", "GP"=>"Ω") #"LE"=>"ΛA", "DU"=>"ΔA", "SN"=>"ΣA", # These are the awkwardly annoted greek analogues of the pairs (Z,ZA), (W,WA) etc. # They "match" a simpler k-vector, by reducing their second character by one, # alphabetically (e.g. LE => LD = Λ). The primed post-scripting notation is our own # (B&C seems to use prime instead, e.g. on p. 412) function roman2greek(label::String) idx = findfirst(!isletter, label) if idx !== nothing front=label[firstindex(label):prevind(label,idx)] if front ∈ keys(ROMAN2GREEK_DICT) return ROMAN2GREEK_DICT[front]*label[idx:lastindex(label)] end end return label end function printboxchar(io, i, N) if i == 1 print(io, "╭") #┌ elseif i == N print(io, "╰") #└ else print(io, "│") end end function readuntil(io::IO, delim::F; keep::Bool=false) where F<:Function buf = IOBuffer() while !eof(io) c = read(io, Char) if delim(c) keep && write(buf, c) break end write(buf, c) end return String(take!(buf)) end const tf_compact_borderless = TextFormat( ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', Symbol[], :none) """ $(TYPEDSIGNATURES) Print a matrix using PrettyTables, allowing a `prerow` input to be printed before each row of the matrix. `elformat` is applied to each element of the matrix before printing. """ function compact_print_matrix(io, X::Matrix, prerow, elformat=identity) rowsA = UnitRange(axes(X,1)) io′ = IOBuffer() pretty_table(io′, X; tf=tf_compact_borderless, show_header=false, formatters = (v,i,j) -> elformat(v), alignment = :r) X_str = String(take!(io′)) X_rows = split(X_str, '\n') for i in rowsA i != first(rowsA) && print(io, prerow) # w/ unicode characters for left/right square braces (https://en.wikipedia.org/wiki/Miscellaneous_Technical) print(io, i == first(rowsA) ? '⎡' : (i == last(rowsA) ? '⎣' : '⎢')) print(io, X_rows[i], ' ') print(io, i == first(rowsA) ? '⎤' : (i == last(rowsA) ? '⎦' : '⎥')) if i != last(rowsA); println(io); end end end # === misc functionality === """ isapproxin(x, itr, optargs...; kwargs...) --> Bool Determine whether `x` ∈ `itr` with approximate equality. """ isapproxin(x, itr, optargs...; kwargs...) = any(y -> isapprox(y, x, optargs...; kwargs...), itr) """ uniquetol(a; kwargs) Computes approximate-equality unique with tolerance specifiable via keyword arguments `kwargs` in O(n²) runtime. Copied from https://github.com/JuliaLang/julia/issues/19147#issuecomment-256981994 """ function uniquetol(A::AbstractArray{T}; kwargs...) where T S = Vector{T}() for a in A if !any(s -> isapprox(s, a; kwargs...), S) push!(S, a) end end return S end if VERSION < v"1.5" """ ImmutableDict(ps::Pair...) Construct an `ImmutableDict` from any number of `Pair`s; a convenience function that extends `Base.ImmutableDict` which otherwise only allows construction by iteration. """ function Base.ImmutableDict(ps::Pair{K,V}...) where {K,V} d = Base.ImmutableDict{K,V}() for p in ps # construct iteratively (linked list) d = Base.ImmutableDict(d, p) end return d end Base.ImmutableDict(ps::Pair...) = Base.ImmutableDict(ps) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
16238
# ---------------------------------------------------------------------------------------- # # CONSTRUCTORS/GETTERS FOR WYCKPOS """ $(TYPEDSIGNATURES) Return the Wyckoff positions of space group `sgnum` in dimension `D` as a `Vector{WyckoffPosition{D}`. The positions are given in the conventional basis setting, following the conventions of the Bilbao Crystallographic Server (from which the underlying data is sourced [^1]). ## Example ```jldoctest julia> wps = wyckoffs(16, 2) 4-element Vector{WyckoffPosition{2}}: 6d: [α, β] 3c: [1/2, 0] 2b: [1/3, 2/3] 1a: [0, 0] ``` ## References [^1]: Aroyo, *et al.*, [Z. Kristallogr. **221**, 15-27 (2006)](https://doi.org/0.1524/zkri.2006.221.1.15) """ function wyckoffs(sgnum::Integer, ::Val{D}=Val(3)) where D strarr = open(joinpath(DATA_DIR, "wyckpos/$(D)d/"*string(sgnum)*".csv")) do io DelimitedFiles.readdlm(io, '|', String, '\n') end::Matrix{String} mults = parse.(Int, @view strarr[:,1])::Vector{Int} letters = only.(@view strarr[:,2])::Vector{Char} rvs = RVec{D}.((@view strarr[:,3]))::Vector{RVec{D}} return WyckoffPosition{D}.(mults, letters, rvs) end wyckoffs(sgnum::Integer, D::Integer) = wyckoffs(sgnum, Val(D)) # ---------------------------------------------------------------------------------------- # # METHODS function compose(op::SymOperation{D}, wp::WyckoffPosition{D}) where D WyckoffPosition{D}(multiplicity(wp), wp.letter, compose(op, parent(wp))) end (*)(op::SymOperation{D}, wp::WyckoffPosition{D}) where D = compose(op, wp) """ $(TYPEDSIGNATURES) Return all site symmetry groups associated with a space group, specified either as `sg :: SpaceGroup{D}` or by its conventional number `sgnum` and dimension `D`. See also [`sitegroup`](@ref) for calculation of the site symmetry group of a specific Wyckoff position. """ function sitegroups(sg::SpaceGroup{D}) where D wps = wyckoffs(num(sg), Val(D)) return sitegroup.(Ref(sg), wps) end sitegroups(sgnum::Integer, Dᵛ::Val{D}) where D = sitegroups(spacegroup(sgnum, Dᵛ)) sitegroups(sgnum::Integer, D::Integer) = sitegroups(spacegroup(sgnum, D)) """ $(TYPEDSIGNATURES) Return the site symmetry group `g::SiteGroup` for a Wyckoff position `wp` in space group `sg` (or with space group number `sgnum`; in this case, the dimensionality is inferred from `wp`). `g` is a group of operations that are isomorphic to the those listed in `sg` (in the sense that they might differ by lattice vectors) and that leave the Wyckoff position `wp` invariant, such that `all(op -> wp == compose(op, wp), g) == true`. The returned `SiteGroup` also contains the coset representatives of the Wyckoff position (that are again isomorphic to those featured in `sg`), accessible via [`cosets`](@ref), which e.g. generate the orbit of the Wyckoff position (see [`orbit(::SiteGroup)`](@ref)) and define a left-coset decomposition of `sg` jointly with the elements in `g`. ## Example ```jldoctest sitegroup julia> sgnum = 16; julia> D = 2; julia> wp = wyckoffs(sgnum, D)[3] # pick a Wyckoff position 2b: [1/3, 2/3] julia> sg = spacegroup(sgnum, D); julia> g = sitegroup(sg, wp) SiteGroup{2} ⋕16 (p6) at 2b = [1/3, 2/3] with 3 operations: 1 {3⁺|1,1} {3⁻|0,1} ``` The group structure of a `SiteGroup` can be inspected with `MultTable`: ```jldoctest sitegroup julia> MultTable(g) 3×3 MultTable{SymOperation{2}}: ──────────┬────────────────────────────── │ 1 {3⁺|1,1} {3⁻|0,1} ──────────┼────────────────────────────── 1 │ 1 {3⁺|1,1} {3⁻|0,1} {3⁺|1,1} │ {3⁺|1,1} {3⁻|0,1} 1 {3⁻|0,1} │ {3⁻|0,1} 1 {3⁺|1,1} ──────────┴────────────────────────────── ``` The original space group can be reconstructed from a left-coset decomposition, using the operations and cosets contained in a `SiteGroup`: ```jldoctest sitegroup julia> ops = [opʰ*opᵍ for opʰ in cosets(g) for opᵍ in g]; julia> Set(sg) == Set(ops) true ``` ## Terminology Mathematically, the site symmetry group is a *stabilizer group* for a Wyckoff position, in the same sense that the little group of **k** is a stabilizer group for a **k**-point. See also [`sitegroups`](@ref) for calculation of all site symmetry groups of a given space group. """ function sitegroup(sg::SpaceGroup{D}, wp::WyckoffPosition{D}) where D Nsg = order(sg) Ncoset = multiplicity(wp) Nsite, check = divrem(Nsg, Ncoset) if check != 0 throw(DomainError((Ncoset, Nsg), "Wyckoff multiplicity must divide space group order")) end siteops = Vector{SymOperation{D}}(undef, Nsite) cosets = Vector{SymOperation{D}}(undef, Ncoset) orbitrvs = Vector{RVec{D}}(undef, Ncoset) rv = parent(wp) # both cosets and site symmetry group contains the identity operation, and the orbit # automatically contains rv; add them outside loop siteops[1] = cosets[1] = one(SymOperation{D}) orbitrvs[1] = rv isite = icoset = 1 for op in sg icoset == Ncoset && isite == Nsite && break # stop if all representatives found isone(op) && continue # already added identity outside loop; avoid adding twice W, w = unpack(op) # rotation and translation rv′ = op * rv Δ = rv′ - rv Δcnst, Δfree = parts(Δ) # Check whether difference between rv and rv′ is a lattice vector: if so, `op` is # isomorphic to a site symmetry operation; if not, to a coset operation. # We check this in the original lattice basis, i.e. do not force conversion to a # primitive basis. This is consistent with e.g. Bilbao and makes good sense. # The caller is of course free to do this themselves (via their choice of basis for # the specified `sg` and `wp`). if ( # tolerance'd equiv. of `all(isinteger, Δcnst) && all(iszero, Δfree)` all(x->isapprox(x, round(x), atol=DEFAULT_ATOL), Δcnst) && all(x->abs(x)≤(DEFAULT_ATOL), Δfree) ) # ⇒ site symmetry operation w′ = w - Δcnst siteops[isite+=1] = SymOperation{D}(W, w′) else # ⇒ coset operation icoset == Ncoset && continue # we only need `Ncoset` representatives in total # reduce generated Wyckoff representative to coordinate range q′ᵢ∈[0,1) rv′′ = RVec(reduce_translation_to_unitrange(constant(rv′)), free(rv′)) if any(rv->isapprox(rv, rv′′, nothing, false), (@view orbitrvs[OneTo(icoset)])) # ⇒ already included a coset op that maps to this rv′′; don't include twice continue end # shift operation so generated `WyckoffPosition`s has coordinates q′ᵢ∈[0,1) w′ = w - (constant(rv′) - constant(rv′′)) # add coset operation and new Wyckoff position to orbit cosets[icoset+=1] = SymOperation{D}(W, w′) orbitrvs[icoset] = rv′′ # TODO: For certain Wyckoff positions in space groups 151:154 (8 in total), the # above calculation of w′ lead to very small (~1e-16) negative values for # the new representatives generated from these coset operations, i.e. # `orbit(g)` can contain Wyckoff positions with negative coordinates, # differing from zero by ~1e-16. end end return SiteGroup{D}(num(sg), wp, siteops, cosets) end function sitegroup(sgnum::Integer, wp::WyckoffPosition{D}) where D sg = spacegroup(sgnum, Val(D)) return sitegroup(sg, wp) end # `MulTable`s of `SiteGroup`s should be calculated with `modτ = false` always function MultTable(g::SiteGroup) MultTable(operations(g); modτ=false) end """ orbit(g::SiteGroup) --> Vector{WyckoffPosition} Compute the orbit of the Wyckoff position associated with the site symmetry group `g`. ## Extended help The orbit of a Wyckoff position ``\\mathbf{r}`` in a space group ``G`` is defined as the set of inequivalent points in the unit cell that can be obtained by applying the elements of ``G`` to ``\\mathbf{r}``. Equivalently, every element of the orbit of ``\\mathbf{r}`` can be written as the composition of a coset representative of the Wyckoff position's site group in ``G`` with ``\\mathbf{r}``. """ function orbit(g::SiteGroup) rv′s = cosets(g) .* Ref(position(g)) end """ findmaximal(sitegs::AbstractVector{<:SiteGroup}) Given an `AbstractVector{<:SiteGroup}` over the distinct Wyckoff positions of a space group, return those `SiteGroup`s that are associated with a maximal Wyckoff positions. Results are returned as a `view` into the input vector (i.e. as an `AbstractVector{<:SiteGroup}`). The associated Wyckoff positions can be retrieved via [`position`](@ref). ## Definition A Wyckoff position is maximal if its site symmetry group has higher order than the site symmetry groups of any "nearby" Wyckoff positions (i.e. Wyckoff positions that can be connected, i.e. made equivalent, through parameter variation to the considered Wyckoff position). ## Example ```jldoctest julia> sgnum = 5; julia> D = 2; julia> sg = spacegroup(sgnum, Val(D)); julia> sitegs = sitegroups(sg) 2-element Vector{SiteGroup{2}}: [1] (4b: [α, β]) [1, m₁₀] (2a: [0, β]) julia> only(findmaximal(sitegs)) SiteGroup{2} ⋕5 (c1m1) at 2a = [0, β] with 2 operations: 1 m₁₀ ``` """ function findmaximal(sitegs::AbstractVector{SiteGroup{D}}) where D maximal = Int[] for (idx, g) in enumerate(sitegs) wp = position(g) v = parent(wp) N = order(g) # if `wp` is "special" (i.e. has no "free" parameters), then it must # be a maximal wyckoff position, since if there are other lines # passing through it, they must have lower symmetry (otherwise, only # the line would have been included in the listings of wyckoff positions) isspecial(v) && (push!(maximal, idx); continue) # if `wp` has "free" parameters, it can still be a maximal wyckoff # position, provided that it doesn't go through any other special # points or intersect any other wyckoff lines/planes of higher symmetry has_higher_sym_nearby = false for (idx′, g′) in enumerate(sitegs) idx′ == idx && continue # don't check against self order(g′) < order(g) && continue # `g′` must have higher symmetry to "supersede" `g` wp′_orbit = orbit(g′) # must check for all orbits of wp′ in general for wp′′ in wp′_orbit v′ = parent(wp′′) if _can_intersect(v, v′) # `wp′` can "intersect" `wp` and is higher order has_higher_sym_nearby = true break end end has_higher_sym_nearby && break end # check if there were "nearby" points that had higher symmetry, if not, `wp` is a # maximal wyckoff position has_higher_sym_nearby || push!(maximal, idx) end return @view sitegs[maximal] end function _can_intersect(v::AbstractVec{D}, v′::AbstractVec{D}; atol::Real=DEFAULT_ATOL) where D # check if solution exists to [A] v′ = v(αβγ) or [B] v′(αβγ′) = v(αβγ) by solving # a least squares problem and then checking if it is a strict solution. Details: # Let v(αβγ) = v₀ + V*αβγ and v′(αβγ′) = v₀′ + V′*αβγ′ # [A] v₀′ = v₀ + V*αβγ ⇔ V*αβγ = v₀′-v₀ # [B] v₀′ + V′*αβγ′ = v₀ + V*αβγ ⇔ V*αβγ - V′*αβγ′ = v₀′-v₀ # ⇔ hcat(V,-V′)*vcat(αβγ,αβγ′) = v₀′-v₀ # these equations can always be solved in the least squares sense using the # pseudoinverse; we can then subsequently check if the residual of that solution is in # fact zero, in which can the least squares solution is a "proper" solution, signaling # that `v` and `v′` can intersect (at the found values of `αβγ` and `αβγ′`) Δcnst = constant(v′) - constant(v) if isspecial(v′) # `v′` is special; `v` is not Δfree = free(v) # D×D matrix return _can_intersect_equivalence_check(Δcnst, Δfree, atol) else # neither `v′` nor `v` are special Δfree = hcat(free(v), -free(v′)) # D×2D matrix return _can_intersect_equivalence_check(Δcnst, Δfree, atol) end # NB: the above seemingly trivial splitting of return statements is intentional & to # avoid type-instability (because the type of `Δfree` differs in the two brances) end function _can_intersect_equivalence_check(Δcnst::StaticVector{D}, Δfree::StaticMatrix{D}, atol::Real) where D # to be safe, we have to check for equivalence between `v` and `v′` while accounting # for the fact that they could differ by a lattice vector; in practice, for the wyckoff # listings that we have have in 3D, this seems to only make a difference in a single # case (SG 130, wyckoff position 8f) - but there the distinction is actually needed Δfree⁻¹ = pinv(Δfree) for V in Iterators.product(ntuple(_->(0.0, -1.0, 1.0), Val(D))...) # loop over adjacent lattice vectors Δcnst_plus_V = Δcnst + SVector{D,Float64}(V) αβγ = Δfree⁻¹*Δcnst_plus_V # either D-dim `αβγ` or 2D-dim `hcat(αβγ, αβγ′)` Δ = Δcnst_plus_V - Δfree*αβγ # residual of least squares solve norm(Δ) < atol && return true end return false end # ---------------------------------------------------------------------------------------- # """ siteirreps(sitegroup::SiteGroup; mulliken::Bool=false]) --> Vector{PGIrrep} Return the site symmetry irreps associated with the provided `SiteGroup`, obtained from a search over isomorphic point groups. The `SiteIrrep`s are in general a permutation of the irreps of the associated isomorphic point group. By default, the labels of the site symmetry irreps are given in the CDML notation; to use the Mulliken notation, set the keyword argument `mulliken` to `true` (default, `false`). ## Example ```jldoctest julia> sgnum = 16; julia> sg = spacegroup(sgnum, 2); julia> wp = wyckoffs(sgnum, 2)[3] # pick the third Wyckoff position 2b: [1/3, 2/3] julia> siteg = sitegroup(sg, wp) SiteGroup{2} ⋕16 (p6) at 2b = [1/3, 2/3] with 3 operations: 1 {3⁺|1,1} {3⁻|0,1} julia> siteirs = siteirreps(siteg) 3-element Collection{SiteIrrep{2}} for ⋕16 (p6) at 2b = [1/3, 2/3]: Γ₁ ─┬───────────────────────────────────────────── ├─ 1: ────────────────────────────────── (x,y) │ 1 │ ├─ {3⁺|1,1}: ──────────────────── (-y+1,x-y+1) │ 1 │ ├─ {3⁻|0,1}: ───────────────────── (-x+y,-x+1) │ 1 └───────────────────────────────────────────── Γ₂ ─┬───────────────────────────────────────────── ├─ 1: ────────────────────────────────── (x,y) │ 1 │ ├─ {3⁺|1,1}: ──────────────────── (-y+1,x-y+1) │ exp(0.6667iπ) │ ├─ {3⁻|0,1}: ───────────────────── (-x+y,-x+1) │ exp(-0.6667iπ) └───────────────────────────────────────────── Γ₃ ─┬───────────────────────────────────────────── ├─ 1: ────────────────────────────────── (x,y) │ 1 │ ├─ {3⁺|1,1}: ──────────────────── (-y+1,x-y+1) │ exp(-0.6667iπ) │ ├─ {3⁻|0,1}: ───────────────────── (-x+y,-x+1) │ exp(0.6667iπ) └───────────────────────────────────────────── ``` """ function siteirreps(siteg::SiteGroup{D}; mulliken::Bool=false) where D parent_pg, Iᵖ²ᵍ, _ = find_isomorphic_parent_pointgroup(siteg) pglabel = label(parent_pg) pgirs = pgirreps(pglabel, Val(D); mulliken) # note that we _have to_ make a copy when re-indexing `pgir.matrices` here, since # .jld files apparently cache accessed content; so if we modify it, we mess with the # underlying data (see https://github.com/JuliaIO/JLD2.jl/issues/277) siteirs = map(pgirs) do pgir SiteIrrep{D}(label(pgir), siteg, pgir.matrices[Iᵖ²ᵍ], reality(pgir), pgir.iscorep, pglabel) end return Collection(siteirs) end mulliken(siteir::SiteIrrep) = _mulliken(siteir.pglabel, label(siteir), iscorep(siteir))
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
692
function generators(iuclab::String, ::Type{PointGroup{D}}=PointGroup{3}) where D @boundscheck _check_valid_pointgroup_label(iuclab, D) codes = PG_GENS_CODES_Ds[D][iuclab] # convert `codes` to `SymOperation`s and add to `operations` operations = Vector{SymOperation{D}}(undef, length(codes)) for (n, code) in enumerate(codes) op = SymOperation{D}(get_indexed_rotation(code, Val{D}()), zero(SVector{D,Float64})) operations[n] = op end return operations end function generators(pgnum::Integer, ::Type{PointGroup{D}}, setting::Integer=1) where D iuclab = pointgroup_num2iuc(pgnum, Val(D), setting) return generators(iuclab, PointGroup{D}) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3686
""" generators(num::Integer, T::Type{AbstractGroup{D}}[, optargs]) generators(pgiuc::String, T::PointGroup{D}}) --> Vector{SymOperation{D}} Return the generators of the group type `T` which may be a `SpaceGroup{D}` or a `PointGroup{D}` parameterized by its dimensionality `D`. Depending on `T`, the group is determined by inputting as the first argument: - `SpaceGroup{D}`: the space group number `num::Integer`. - `PointGroup{D}`: the point group IUC label `pgiuc::String` (see also [`pointgroup(::String)`) or the canonical point group number `num::Integer`, which can optionally be supplemented by an integer-valued setting choice `setting::Integer` (see also [`pointgroup(::Integer, ::Integer, ::Integer)`](@ref)]). - `SubperiodicGroup{D}`: the subperiodic group number `num::Integer`. Setting choices match those in [`spacegroup`](@ref), [`pointgroup`](@ref), and [`subperiodicgroup`](@ref). Iterated composition of the returned symmetry operations will generate all operations of the associated space or point group (see [`generate`](@ref)). As an example, `generate(generators(num, `SpaceGroup{D}))` and `spacegroup(num, D)` return identical operations (with different sorting typically); and similarly so for point and subperiodic groups. ## Example Generators of space group 200: ```jldoctest julia> generators(200, SpaceGroup{3}) 4-element Vector{SymOperation{3}}: 2₀₀₁ 2₀₁₀ 3₁₁₁⁺ -1 ``` Generators of point group m-3m: ```jldoctest julia> generators("2/m", PointGroup{3}) 2-element Vector{SymOperation{3}}: 2₀₁₀ -1 ``` Generators of the Frieze group 𝓅2mg: ```jldoctest julia> generators(7, SubperiodicGroup{2, 1}) 2-element Vector{SymOperation{2}}: 2 {m₁₀|½,0} ``` ## Citing Please cite the original data sources if used in published work: - Space groups: [Aroyo et al., Z. Kristallogr. Cryst. Mater. **221**, 15 (2006)](https://doi.org/10.1524/zkri.2006.221.1.15); - Point group: Bilbao Crystallographic Server's [2D and 3D GENPOS](https://www.cryst.ehu.es/cryst/get_point_genpos.html); - Subperiodic groups: Bilbao Crystallographic Server's [SUBPERIODIC GENPOS](https://www.cryst.ehu.es/subperiodic/get_sub_gen.html). ## Extended help Note that the returned generators are not guaranteed to be the smallest possible set of generators; i.e., there may exist other generators with fewer elements (an example is space group 168 (P6), for which the returned generators are `[2₀₀₁, 3₀₀₁⁺]` even though the group could be generated by just `[6₀₀₁⁺]`). The returned generators, additionally, are not guaranteed to be [minimal](https://en.wikipedia.org/wiki/Generating_set_of_a_module), i.e., they may include proper subsets that generate the group themselves (e.g., in space group 75 (P4), the returned generators are `[2₀₀₁, 4₀₀₁⁺]` although the subset `[4₀₀₁⁺]` is sufficient to generate the group). The motivation for this is to expose as similar generators as possible for similar crystal systems (see e.g. Section 8.3.5 of the International Tables of Crystallography, Vol. A, Ed. 5 (ITA) for further background). Note also that, contrary to conventions in ITA, the identity operation is excluded among the returned generators (except in space group 1) since it composes trivially and adds no additional context. """ function generators(sgnum::Integer, ::Type{SpaceGroup{D}}=SpaceGroup{3}) where D @boundscheck _check_valid_sgnum_and_dim(sgnum, D) codes = SG_GENS_CODES_Vs[D][sgnum] # convert `codes` to `SymOperation`s and add to `operations` operations = Vector{SymOperation{D}}(undef, length(codes)) _include_symops_from_codes!(operations, codes; add_identity=false) return operations end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
1092
""" generators(num::Integer, ::Type{SubperiodicGroup{D,P}}) --> ::Vector{SymOperation{D}} Return a canonical set of generators for the subperiodic group `num` of embedding dimension `D` and periodicity dimension `P`. See also [`subperiodicgroup`](@ref). See also [`generators(::Integer, ::Type{SpaceGroup})`](@ref) and information therein. ## Example ```jldoctest julia> generators(7, SubperiodicGroup{2, 1}) 2-element Vector{SymOperation{2}}: 2 {m₁₀|½,0} ``` ## Data sources The generators returned by this function were originally retrieved from the [Bilbao Crystallographic Database, SUBPERIODIC GENPOS](https://www.cryst.ehu.es/subperiodic/get_sub_gen.html). """ function generators(num::Integer, ::Type{SubperiodicGroup{D,P}}) where {D,P} @boundscheck _check_valid_subperiodic_num_and_dim(num, D, P) codes = SUBG_GENS_CODES_Vs[(D,P)][num] # convert `codes` to `SymOperation`s and add to `operations` operations = Vector{SymOperation{D}}(undef, length(codes)) _include_symops_from_codes!(operations, codes; add_identity=false) return operations end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2191
""" mspacegroup(BNS₁, BNS₂) mspacegroup(OG₃) --> MSpaceGroup{3} Return the magnetic space group with BNS numbers `(BNS₁, BNS₂)` or the sequential OG number `OG₃` (from 1 to 1651). ## Data sources The data underlying this function was retrieved from ISOTROPY's compilation of Daniel Litvin's magnetic space group tables (http://www.bk.psu.edu/faculty/litvin/Download.html). """ function mspacegroup(BNS₁::Integer, BNS₂::Integer, Dᵛ::Val{D}=Val(3)) where D D == 3 || throw(DomainError("only 3D magnetic space groups are supported")) msgnum = (BNS₁, BNS₂) codes = MSG_CODES_D[msgnum] label = MSG_BNS_LABELs_D[msgnum] cntr = first(label) Ncntr = centering_volume_fraction(cntr, Dᵛ) Nop = (length(codes)+1) # number of operations ÷ by equiv. centering translations operations = Vector{MSymOperation{D}}(undef, Nop * Ncntr) operations[1] = MSymOperation{D}(one(SymOperation{D}), false) for (n, code) in enumerate(codes) op = SymOperation{D}(ROTATIONS_3D[code[1]], TRANSLATIONS_3D[code[2]]) operations[n+1] = MSymOperation{D}(op, code[3]) end # add the centering-translation related operations (not included in `codes`) if Ncntr > 1 cntr_translations = all_centeringtranslations(cntr, Dᵛ) for (i, t) in enumerate(cntr_translations) for n in 1:Nop mop = operations[n] t′ = reduce_translation_to_unitrange(translation(mop) + t) op′ = SymOperation{D}(mop.op.rotation, t′) mop′ = MSymOperation{D}(op′, mop.tr) operations[n+i*Nop] = mop′ end end end return MSpaceGroup{D}(msgnum, operations) end function mspacegroup(OG₃::Integer, ::Val{D}=Val(3)) where D D == 3 || throw(DomainError("only 3-dimensional magnetic space groups are supported")) OG₃ ∈ 1:MAX_MSGNUM[D] || _throw_invalid_msgnum(OG₃, D) BNS₁, BNS₂ = MSG_OG₃2BNS_NUMs_V[OG₃] return mspacegroup(BNS₁, BNS₂, Val(3)) end @noinline function _throw_invalid_msgnum(OG₃, D) throw(DomainError(OG₃, "the sequential magnetic space group number must be between 1 and $(MAX_MSGNUM[D]) in dimension $D")) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2447
""" pointgroup(iuclab::String, ::Union{Val{D}, Integer}=Val(3)) --> PointGroup{D} Return the symmetry operations associated with the point group identified with label `iuclab` in dimension `D` as a `PointGroup{D}`. """ function pointgroup(iuclab::AbstractString, Dᵛ::Val{D}=Val(3)) where D @boundscheck _check_valid_pointgroup_label(iuclab, D) pgnum = pointgroup_iuc2num(iuclab, D) # this is not generally a particularly well-established numbering return _pointgroup(iuclab, pgnum, Dᵛ) end @inline pointgroup(iuclab::String, D::Integer) = pointgroup(iuclab, Val(D)) """ pointgroup(pgnum::Integer, ::Union{Val{D}, Integer}=Val(3), setting::Integer=1) --> PointGroup{D} Return the symmetry operations associated with the point group identfied with canonical number `pgnum` in dimension `D` as a `PointGroup{D}`. The connection between a point group's numbering and its IUC label is enumerated in `Crystalline.PG_NUM2IUC[D]` and `Crystalline.IUC2NUM[D]`. Certain point groups feature in multiple setting variants: e.g., IUC labels 321 and 312 both correspond to `pgnum = 18` and correspond to the same group structure expressed in two different settings. The `setting` argument allows choosing between these setting variations. """ function pointgroup(pgnum::Integer, Dᵛ::Val{D}=Val(3), setting::Integer=1) where D iuclab = pointgroup_num2iuc(pgnum, Dᵛ, setting) # also checks validity of `(pgnum, D)` return _pointgroup(iuclab, pgnum, Dᵛ) end @inline function pointgroup(pgnum::Integer, D::Integer, setting::Integer=1) return pointgroup(pgnum, Val(D), setting) end function _pointgroup(iuclab::String, pgnum::Integer, Dᵛ::Val{D}) where D codes = PG_CODES_Ds[D][iuclab] Nop = (length(codes)+1) # number of operations operations = Vector{SymOperation{D}}(undef, Nop) operations[1] = one(SymOperation{D}) for (n, code) in enumerate(codes) op = SymOperation{D}(get_indexed_rotation(code, Dᵛ), zero(SVector{D,Float64})) operations[n+1] = op end return PointGroup{D}(pgnum, iuclab, operations) end function _check_valid_pointgroup_label(iuclab::AbstractString, D) D ∉ (1,2,3) && _throw_invalid_dim(D) if iuclab ∉ PG_IUCs[D] throw(DomainError(iuclab, "iuc label not found in database (see possible labels in `PG_IUCs[D]`)")) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3707
""" spacegroup(sgnum::Integer, ::Val{D}=Val(3)) spacegroup(sgnum::Integer, D::Integer) --> SpaceGroup{D} Return the space group symmetry operations for a given space group number `sgnum` and dimensionality `D` as a `SpaceGroup{D}`. The returned symmetry operations are specified relative to the conventional basis vectors, i.e. are not necessarily primitive (see [`centering`](@ref)). If desired, operations for the primitive unit cell can subsequently be generated using [`primitivize`](@ref) or [`Crystalline.reduce_ops`](@ref). The default choices for the conventional basis vectors follow the conventions of the Bilbao Crystallographic Server (or, equivalently, the International Tables of Crystallography), which are: - Unique axis *b* (cell choice 1) for monoclinic space groups. - Obverse triple hexagonal unit cell for rhombohedral space groups. - Origin choice 2: inversion centers are placed at (0,0,0). (relevant for certain centrosymmetric space groups with two possible choices; e.g., in the orthorhombic, tetragonal or cubic crystal systems). See also [`directbasis`](@ref). ## Data sources The symmetry operations returned by this function were originally retrieved from the [Bilbao Crystallographic Server, SPACEGROUP GENPOS](https://www.cryst.ehu.es/cryst/get_gen.html). The associated citation is: ([Aroyo et al., Z. Kristallogr. Cryst. Mater. **221**, 15 (2006).](https://doi.org/10.1524/zkri.2006.221.1.15)). """ function spacegroup(sgnum, Dᵛ::Val{D}=Val(3)) where D @boundscheck _check_valid_sgnum_and_dim(sgnum, D) codes = SG_CODES_Vs[D][sgnum] cntr = centering(sgnum, D) Ncntr = centering_volume_fraction(cntr, Dᵛ) Nop = length(codes)+1 # number of operations ÷ by equiv. centering translations operations = Vector{SymOperation{D}}(undef, Nop * Ncntr) # convert `codes` to `SymOperation`s and add to `operations` _include_symops_from_codes!(operations, codes) # add the centering-translation related operations (not included in `codes`) if Ncntr > 1 cntr_translations = all_centeringtranslations(cntr, Dᵛ) _include_symops_centering_related!(operations, cntr_translations, Nop) end return SpaceGroup{D}(sgnum, operations) end spacegroup(sgnum::Integer, D::Integer) = spacegroup(sgnum, Val(D)) function _include_symops_from_codes!( operations::Vector{SymOperation{D}}, codes; add_identity::Bool = true) where D if add_identity # add trivial identity operation separately and manually operations[1] = one(SymOperation{D}) end for (n, code) in enumerate(codes) op = SymOperation{D}(get_indexed_rotation(code[1], Val{D}()), get_indexed_translation(code[2], Val{D}())) operations[n+add_identity] = op end return operations end function _include_symops_centering_related!( operations::Vector{SymOperation{D}}, cntr_translations, Nop) where D for (i, t) in enumerate(cntr_translations) for n in 1:Nop op = operations[n] t′ = reduce_translation_to_unitrange(translation(op) + t) op′ = SymOperation{D}(op.rotation, t′) operations[n+i*Nop] = op′ end end return operations end function _check_valid_sgnum_and_dim(sgnum::Integer, D::Integer) if D == 3 sgnum > 230 && _throw_invalid_sgnum(sgnum, D) elseif D == 2 sgnum > 17 && _throw_invalid_sgnum(sgnum, D) elseif D == 1 sgnum > 2 && _throw_invalid_sgnum(sgnum, D) else _throw_invalid_dim(D) end sgnum < 1 && throw(DomainError(sgnum, "group number must be a positive integer")) return nothing end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3140
# NOTE: There's some unfortunate conventional choices regarding the setting of rod groups: # the periodicity is assumed to be along the z-direction - this is contrary to how the # layer groups (xy periodicity) and frieze groups (x periodicity) are built... One # possible motivation for this choice would be to have rod groups more closely # resemble the corresponding space groups; but this way, the frieze groups don't # resemble the rod groups (instead, the layer groups)... Quite annoying in a # computational setting ...: we now need to keep track of _which_ direction is the # periodic one... Seems more appealing to just establish some convention (say, # P = 1 ⇒ x periodicity; P = 2 ⇒ xy periodicity). Unfortunately, if we do that, # we need to change the labels for the rod groups (they are setting dependent). # This problem is discussed in e.g. ITE1 Section 1.2.6; one option is to indicate the # direction of periodicity with a subscript (e.g., ₐ for x-direction; but that doesn't # work too well with unicode that doesn't have {b,c}-subscripts. """ subperiodicgroup(num::Integer, ::Val{D}=Val(3), ::Val{P}=Val(2)) subperiodicgroup(num::Integer, D::Integer, P::Integer) --> ::SubperiodicGroup{D,P} Return the operations of the subperiodic group `num` of embedding dimension `D` and periodicity dimension `P` as a `SubperiodicGroup{D,P}`. The setting choices are those of the International Tables for Crystallography, Volume E. Allowed combinations of `D` and `P` and their associated group names are: - `D = 3`, `P = 2`: Layer groups (`num` = 1, …, 80). - `D = 3`, `P = 1`: Rod groups (`num` = 1, …, 75). - `D = 2`, `P = 1`: Frieze groups (`num` = 1, …, 7). ## Example ```jldoctest julia> subperiodicgroup(7, Val(2), Val(1)) SubperiodicGroup{2, 1} ⋕7 (𝓅2mg) with 4 operations: 1 2 {m₁₀|½,0} {m₀₁|½,0} ``` ## Data sources The symmetry operations returned by this function were originally retrieved from the [Bilbao Crystallographic Database, SUBPERIODIC GENPOS](https://www.cryst.ehu.es/subperiodic/get_sub_gen.html). """ function subperiodicgroup(num::Integer, Dᵛ::Val{D}=Val(3), Pᵛ::Val{P}=Val(2)) where {D, P} @boundscheck _check_valid_subperiodic_num_and_dim(num, D, P) codes = SUBG_CODES_Vs[(D,P)][num] cntr = centering(num, D, P) Ncntr = centering_volume_fraction(cntr, Dᵛ, Pᵛ) Nop = (length(codes)+1) # number of operations ÷ by equiv. centering translations operations = Vector{SymOperation{D}}(undef, Nop * Ncntr) # convert `codes` to `SymOperation`s and add to `operations` _include_symops_from_codes!(operations, codes) # add the centering-translation related operations (not included in `codes`) if Ncntr > 1 cntr_translations = all_centeringtranslations(cntr, Dᵛ, Pᵛ) _include_symops_centering_related!(operations, cntr_translations, Nop) end return SubperiodicGroup{D, P}(num, operations) end subperiodicgroup(num::Integer, D::Integer, P::Integer) = subperiodicgroup(num, Val(D), Val(P))
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
4289
using Graphs include(joinpath((@__DIR__), "types.jl")) include(joinpath((@__DIR__), "show.jl")) include(joinpath((@__DIR__), "init_data.jl")) # ---------------------------------------------------------------------------------------- # function group(g::GroupRelation{D,AG}, classidx::Int=1) where {D,AG} # TODO: instantiate a group of type AG with number `n.num` H = spacegroup(g.num, Val{D}()) # transform `H` to the setting defined by `transforms[conjugacyclass]` t = g.classes[classidx] if isnothing(t.P) && isnothing(t.p) return H else P, p = something(t.P), something(t.p) P⁻¹ = inv(P) return typeof(H)(num(H), transform.(H, Ref(P⁻¹), Ref(-P⁻¹*p))) end end # technically, this concept of taking a "all the recursive children" of a graph vertex is # called the "descendants" of the graph in 'networkx'; similarly, going the other way # (supergroups) is called the "ancestors": # see https://networkx.org/documentation/stable/reference/algorithms/dag.html) for (f, rel_shorthand, rel_kind, doctxt) in ((:maximal_subgroups, :MAXSUB, :SUBGROUP, "maximal sub"), (:minimal_supergroups, :MINSUP, :SUPERGROUP, "minimal super")) relations_3D = Symbol(rel_shorthand, :_RELATIONSD_3D) relations_2D = Symbol(rel_shorthand, :_RELATIONSD_2D) relations_1D = Symbol(rel_shorthand, :_RELATIONSD_1D) @eval begin @doc """ $($f)(num::Integer, AG::Type{<:AbstractGroup}=SpaceGrop{3}; kind) Returns the graph structure of the $($doctxt)groups as a `GroupRelationGraph` for a group of type `AG` and number `num`. ## Visualization The resulting group structure can be plotted using Makie.jl (e.g., GLMakie.jl) using `plot(::GroupRelationGraph)`: ```jl julia> using Crystalline julia> gr = $($f)(112, SpaceGroup{3}) julia> using GraphMakie, GLMakie julia> plot(gr) ``` ## Keyword arguments - `kind` (default, `Crystalline.TRANSLATIONENGLEICHE`): to return klassengleiche relations, set `kind = Crystalline.KLASSENGLEICHE`). For klassengleiche relationships, only a selection of reasonably low-index relationships are returned. ## Data sources The group relationships returned by this function were retrieved from the Bilbao Crystallographic Server's [MAXSUB](https://www.cryst.ehu.es/cryst/maxsub.html) program. Please cite the original reference work associated with MAXSUB: - Aroyo et al., [Z. Kristallogr. Cryst. Mater. **221**, 15 (2006)](https://doi.org/10.1524/zkri.2006.221.1.15). """ function $f(num::Integer, ::Type{SpaceGroup{D}}=SpaceGroup{3}; kind::GleicheKind = TRANSLATIONENGLEICHE) where D D ∈ (1,2,3) || _throw_invalid_dim(D) relationsd = (D == 3 ? $relations_3D : D == 2 ? $relations_2D : D == 1 ? $relations_1D : error("unreachable") ) :: Dict{Int, GroupRelations{D, SpaceGroup{D}}} infos = Dict{Int, GroupRelations{D,SpaceGroup{D}}}() vertices = Int[num] remaining_vertices = Int[num] fadjlist = Vector{Int}[] while !isempty(remaining_vertices) num′ = pop!(remaining_vertices) info′ = relationsd[num′] children = filter(rel->rel.kind==kind, info′) infos[num′] = valtype(infos)(num′, children) push!(fadjlist, Int[]) for child in children k = findfirst(==(child.num), vertices) if isnothing(k) push!(vertices, child.num) if child.num ∉ remaining_vertices pushfirst!(remaining_vertices, child.num) end k = length(vertices) end push!(fadjlist[end], k) end end return GroupRelationGraph(vertices, fadjlist, infos, $rel_kind) end # function $f end # begin @eval end # for (f, ...)
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2967
# ---------------------------------------------------------------------------------------- # # Dictionaries of maximal subgroup relationships in 1D, 2D, & 3D const MAXSUB_RELATIONSD_1D = Dict{Int, GroupRelations{1, SpaceGroup{1}}}() const MAXSUB_RELATIONSD_2D = Dict{Int, GroupRelations{2, SpaceGroup{2}}}() const MAXSUB_RELATIONSD_3D = Dict{Int, GroupRelations{3, SpaceGroup{3}}}() let subgroup_data = JLD2.load_object(joinpath((@__DIR__), "..", "..", "data", "spacegroup_subgroups_data.jld2")) for (D, maxsubsd) in zip(1:3, (MAXSUB_RELATIONSD_1D, MAXSUB_RELATIONSD_2D, MAXSUB_RELATIONSD_3D)) for (numᴳ, data) in enumerate(subgroup_data[D]) grouprels = Vector{GroupRelation{D,SpaceGroup{D}}}(undef, length(data)) for (i, (numᴴ, index, kindstr, Pps)) in enumerate(data) classes = Vector{ConjugacyTransform{D}}(undef, length(Pps)) for (j, (P, p)) in enumerate(Pps) P′ = isnothing(P) ? P : SqSMatrix{D,Float64}(P) p′ = isnothing(p) ? p : SVector{D,Float64}(p) classes[j] = ConjugacyTransform(P′, p′) end kind = kindstr == :t ? TRANSLATIONENGLEICHE : KLASSENGLEICHE grouprels[i] = GroupRelation{SpaceGroup{D}}(numᴳ, numᴴ, index, kind, classes) end maxsubsd[numᴳ] = GroupRelations{SpaceGroup{D}}(numᴳ, reverse!(grouprels)) end end end # ---------------------------------------------------------------------------------------- # # Dictionaries of minimal supergroup relationships in 1D, 2D, & 3D const MINSUP_RELATIONSD_1D = Dict{Int, GroupRelations{1, SpaceGroup{1}}}() const MINSUP_RELATIONSD_2D = Dict{Int, GroupRelations{2, SpaceGroup{2}}}() const MINSUP_RELATIONSD_3D = Dict{Int, GroupRelations{3, SpaceGroup{3}}}() for (D, minsupsd, maxsubsd) in zip(1:3, (MINSUP_RELATIONSD_1D, MINSUP_RELATIONSD_2D, MINSUP_RELATIONSD_3D), (MAXSUB_RELATIONSD_1D, MAXSUB_RELATIONSD_2D, MAXSUB_RELATIONSD_3D)) for numᴴ in 1:MAX_SGNUM[D] grouprels = Vector{GroupRelation{D,SpaceGroup{D}}}() for numᴳ in 1:MAX_SGNUM[D] # NB: the loop-range above cannot be reduced to `numᴴ:MAX_SGNUM[D]` since # that would exclude some klassengleiche relationships where `numᴴ > numᴳ` rsᴳᴴ = maxsubsd[numᴳ] idxs = findall(rᴳᴴ -> rᴳᴴ.num==numᴴ, rsᴳᴴ) for i in idxs rᴳᴴ = rsᴳᴴ[i] rᴴᴳ = GroupRelation{SpaceGroup{D}}(numᴴ, numᴳ, rᴳᴴ.index, rᴳᴴ.kind, rᴳᴴ.classes #= NB: note, per Bilbao convention, we do not invert transformations in `.classes` =#) push!(grouprels, rᴴᴳ) end end minsupsd[numᴴ] = GroupRelations{SpaceGroup{D}}(numᴴ, grouprels) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
5116
# `show` & `summary` is_tgleiche(kind::GleicheKind) = kind == TRANSLATIONENGLEICHE function Base.summary(io::IO, rels::GroupRelations{D,AG}) where {D,AG} print(io, "GroupRelations{", AG, "} ⋕", rels.num, " (", iuc(rels.num, D), ") with ", length(rels), " elements") end function Base.summary(io::IO, rel::GroupRelation{D,AG}) where {D,AG} print(io, "GroupRelation{", AG, "} ⋕", rel.num) printstyled(io, is_tgleiche(rel.kind) ? "ᵀ" : "ᴷ"; color = is_tgleiche(rel.kind) ? :green : :red) print(io, " (", iuc(rel.num, D), ") with ", length(rel.classes), " conjugacy class", length(rel.classes) == 1 ? "" : "es") end function Base.show(io::IO, ::MIME"text/plain", rels::GroupRelations{D,AG}) where {D,AG} AG <: SpaceGroup || error("correct show not yet implemented for this type") summary(io, rels) print(io, ":") for rel in values(rels) print(io, "\n ") _print_child(io, rel.num, rel.kind, rel.index) end end function _print_child( io::IO, num::Int, kind::Union{Nothing, GleicheKind}, index::Union{Nothing, Int}) print(io, "⋕", num) if !isnothing(kind) printstyled(io, is_tgleiche(kind) ? "ᵀ" : "ᴷ"; color = is_tgleiche(kind) ? :green : :red) end if !isnothing(index) printstyled(io, " (index ", index, ")"; color=:light_black) end end function Base.show(io::IO, rels::GroupRelations{D,AG}) where {AG,D} print(io, "[") Nrels = length(rels) for (i, rel) in enumerate(values(rels)) print(io, rel.num) printstyled(io, is_tgleiche(rel.kind) ? "ᵀ" : "ᴷ"; color = is_tgleiche(rel.kind) ? :green : :red) i == Nrels || print(io, ", ") end print(io, "]") end function Base.show(io::IO, ::MIME"text/plain", g::GroupRelation) summary(io, g) print(io, ":") for (i, ct) in enumerate(g.classes) printstyled(io, "\n ", Crystalline.supscriptify(string(i)), "⁾ ", color=:light_black) print(io, ct) end end function Base.show(io::IO, t::ConjugacyTransform{D}) where D print(io, "P = ") if isnothing(t.P) && isnothing(t.p) print(io, 1) else P, p = something(t.P), something(t.p) if !isone(P) print(io, replace(string(rationalize.(float(P))), r"//1([ |\]|;])"=>s"\1", "//"=>"/", "Rational{Int64}"=>"")) else print(io, 1) end if !iszero(p) print(io, ", p = ", replace(string(rationalize.(float(p))), r"//1([,|\]])"=>s"\1", "//"=>"/", "Rational{Int64}"=>"")) end end end function Base.summary(io::IO, gr::GroupRelationGraph{D, AG}) where {D,AG} print(io, "GroupRelationGraph", " (", gr.direction == SUPERGROUP ? "super" : "sub", "groups)", " of ", AG, " ⋕", first(gr.nums), " with ", length(gr.nums), " vertices") end function Base.show(io::IO, gr::GroupRelationGraph) summary(io, gr) print(io, ":") num = first(gr.nums) # find "base" group number _print_graph_leaves(io, gr, num, Bool[], nothing, nothing) end function _print_graph_leaves( io::IO, gr::GroupRelationGraph, num::Int, is_last::Vector{Bool}, kind::Union{Nothing, GleicheKind}, index::Union{Nothing, Int} ) # indicate "structure"-relationship of graph "leaves"/children via box-characters indent = length(is_last) print(io, "\n ") if indent ≥ 2 for l in 1:indent-1 if !is_last[l] printstyled(io, "│"; color=:light_black) print(io, " ") else print(io, " ") end end end if indent > 0 printstyled(io, last(is_last) ? "└" : "├", "─►"; color=:light_black) end # print info about child _print_child(io, num, kind, index) # now move on to children of current child; print info about them, recursively if !isnothing(kind) && kind == KLASSENGLEICHE # avoid printing recursively for klassengleiche as this implies infinite looping # NB: in principle, this means we don't show the entire structure of # `gr.infos`; but it is also really not that clear how to do this # properly for klassengleiche relations which are not a DAG but often # cyclic # only one child and child is trivial group elseif length(gr.infos[num].children) == 1 && gr.infos[num].children[1].num == 1 child = gr.infos[num].children[1] printstyled(io, " ╌╌►"; color=:light_black) _print_child(io, child.num, child.kind, child.index) # multiple children/nontrivial children else N_children = length(gr.infos[num].children) for (i,child) in enumerate(gr.infos[num].children) child_is_last = vcat(is_last, i==N_children) _print_graph_leaves(io, gr, child.num, child_is_last, child.kind, child.index) end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3865
# ---------------------- # @enum GleicheKind::Int8 TRANSLATIONENGLEICHE KLASSENGLEICHE @enum RelationKind::Int8 SUBGROUP SUPERGROUP # ---------------------- # struct ConjugacyTransform{D} # transform to a specific conjugacy class P :: Union{Nothing, SqSMatrix{D,Float64}} p :: Union{Nothing, SVector{D,Float64}} end # ---------------------- # struct GroupRelation{D,AG} # all conjugacy classes of a subgroup parent :: Int # the supergroup if num indicates a subgroup, and vice versa num :: Int # group label; aka node label index :: Int # index of H in G or vice versa, depending on context kind :: GleicheKind classes :: Vector{ConjugacyTransform{D}} # isomorphisms over distinct conjugacy classes end function GroupRelation{AG}(parent::Int, num::Integer, index::Integer, kind::GleicheKind, transforms::Union{Nothing, Vector{ConjugacyTransform{D}}} ) where {D,AG} return GroupRelation{D,AG}(parent, num, index, kind, transforms) end # ---------------------- # struct GroupRelations{D,AG} <: AbstractVector{GroupRelation{D,AG}} num :: Int # group label; aka node label children :: Vector{GroupRelation{D,AG}} # list of sub- or supergroups end function GroupRelations{AG}(num::Integer, gs::AbstractVector{GroupRelation{D,AG}} ) where {D,AG} return GroupRelations{D,AG}(num, gs) end Base.getindex(rels::GroupRelations, i::Integer) = getindex(rels.children, i) Base.size(rels::GroupRelations) = size(rels.children) # ---------------------- # struct GroupRelationGraph{D,AG} <: Graphs.AbstractGraph{Int} nums :: Vector{Int} # group numbers associated w/ each graph vertex index fadjlist :: Vector{Vector{Int}} # indexes into `nums` conceptually infos :: Dict{Int, GroupRelations{D,AG}} # sub/supergroup relation details direction :: RelationKind # whether this is a sub- or supergroup relation end dim(::GroupRelationGraph{D}) where D = D Base.getindex(gr::GroupRelationGraph, i::Integer) = getindex(gr.infos, i) # ---------------------------------------------------------------------------------------- # # Graphs.jl `AbstractGraph` interface for `GroupRelationGraph` Graphs.vertices(gr::GroupRelationGraph) = eachindex(gr.nums) Base.eltype(::GroupRelationGraph) = Int Graphs.edgetype(::GroupRelationGraph) = Graphs.SimpleEdge{Int} function Graphs.has_edge(gr::GroupRelationGraph, src::Integer, dst::Integer) return Graphs.has_vertex(gr, src) && dst ∈ gr.fadjlist[src] end Graphs.has_vertex(gr::GroupRelationGraph, src::Integer) = src ∈ Graphs.vertices(gr) function Graphs.outneighbors(gr, src::Integer) # every index "outgoing" upon `src` Graphs.has_vertex(gr, src) || throw(DomainError(src, "`src` is not in graph")) return gr.fadjlist[src] end function Graphs.inneighbors(gr, src::Integer) # every index "incident" upon `src` Graphs.has_vertex(gr, src) || throw(DomainError(src, "`src` is not in graph")) idxs = findall(∋(src), gr.fadjlist) return idxs end Graphs.ne(gr::GroupRelationGraph) = sum(length, gr.fadjlist) Graphs.nv(gr::GroupRelationGraph) = length(Graphs.vertices(gr)) Graphs.is_directed(::Union{Type{<:GroupRelationGraph}, GroupRelationGraph}) = true Graphs.edges(gr::GroupRelationGraph) = GroupRelationGraphEdgeIter(gr) struct GroupRelationGraphEdgeIter{D,AG} gr :: GroupRelationGraph{D,AG} end function Base.iterate(it::GroupRelationGraphEdgeIter, state::Union{Nothing, Tuple{Int,Int}}=(1,1)) # breadth-first iteration i,j = state if length(it.gr.fadjlist[i]) < j if length(it.gr.fadjlist) > i return iterate(it, (i+1, 1)) # go to next vertex else return nothing # no more edges or vertices end else return Graphs.Edge(i, it.gr.fadjlist[i][j]), (i, j+1) end end Base.length(it::GroupRelationGraphEdgeIter) = Graphs.ne(it.gr)
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
117131
const MSG_BNS_LABELs_D = Dict{Tuple{Int, Int}, String}( (1, 1) => "P1", (1, 2) => "P11′", (1, 3) => "P_S1", (2, 4) => "P-1", (2, 5) => "P-11′", (2, 6) => "P-1′", (2, 7) => "P_S-1", (3, 1) => "P2", (3, 2) => "P21′", (3, 3) => "P2′", (3, 4) => "P_a2", (3, 5) => "P_b2", (3, 6) => "P_C2", (4, 7) => "P2₁", (4, 8) => "P2₁1′", (4, 9) => "P2₁′", (4, 10) => "P_a2₁", (4, 11) => "P_b2₁", (4, 12) => "P_C2₁", (5, 13) => "C2", (5, 14) => "C21′", (5, 15) => "C2′", (5, 16) => "C_c2", (5, 17) => "C_a2", (6, 18) => "Pm", (6, 19) => "Pm1′", (6, 20) => "Pm′", (6, 21) => "P_am", (6, 22) => "P_bm", (6, 23) => "P_Cm", (7, 24) => "Pc", (7, 25) => "Pc1′", (7, 26) => "Pc′", (7, 27) => "P_ac", (7, 28) => "P_cc", (7, 29) => "P_bc", (7, 30) => "P_Cc", (7, 31) => "P_Ac", (8, 32) => "Cm", (8, 33) => "Cm1′", (8, 34) => "Cm′", (8, 35) => "C_cm", (8, 36) => "C_am", (9, 37) => "Cc", (9, 38) => "Cc1′", (9, 39) => "Cc′", (9, 40) => "C_cc", (9, 41) => "C_ac", (10, 42) => "P2/m", (10, 43) => "P2/m1′", (10, 44) => "P2′/m", (10, 45) => "P2/m′", (10, 46) => "P2′/m′", (10, 47) => "P_a2/m", (10, 48) => "P_b2/m", (10, 49) => "P_C2/m", (11, 50) => "P2₁/m", (11, 51) => "P2₁/m1′", (11, 52) => "P2₁′/m", (11, 53) => "P2₁/m′", (11, 54) => "P2₁′/m′", (11, 55) => "P_a2₁/m", (11, 56) => "P_b2₁/m", (11, 57) => "P_C2₁/m", (12, 58) => "C2/m", (12, 59) => "C2/m1′", (12, 60) => "C2′/m", (12, 61) => "C2/m′", (12, 62) => "C2′/m′", (12, 63) => "C_c2/m", (12, 64) => "C_a2/m", (13, 65) => "P2/c", (13, 66) => "P2/c1′", (13, 67) => "P2′/c", (13, 68) => "P2/c′", (13, 69) => "P2′/c′", (13, 70) => "P_a2/c", (13, 71) => "P_b2/c", (13, 72) => "P_c2/c", (13, 73) => "P_A2/c", (13, 74) => "P_C2/c", (14, 75) => "P2₁/c", (14, 76) => "P2₁/c1′", (14, 77) => "P2₁′/c", (14, 78) => "P2₁/c′", (14, 79) => "P2₁′/c′", (14, 80) => "P_a2₁/c", (14, 81) => "P_b2₁/c", (14, 82) => "P_c2₁/c", (14, 83) => "P_A2₁/c", (14, 84) => "P_C2₁/c", (15, 85) => "C2/c", (15, 86) => "C2/c1′", (15, 87) => "C2′/c", (15, 88) => "C2/c′", (15, 89) => "C2′/c′", (15, 90) => "C_c2/c", (15, 91) => "C_a2/c", (16, 1) => "P222", (16, 2) => "P2221′", (16, 3) => "P2′2′2", (16, 4) => "P_a222", (16, 5) => "P_C222", (16, 6) => "P_I222", (17, 7) => "P222₁", (17, 8) => "P222₁1′", (17, 9) => "P2′2′2₁", (17, 10) => "P22′2₁′", (17, 11) => "P_a222₁", (17, 12) => "P_c222₁", (17, 13) => "P_B222₁", (17, 14) => "P_C222₁", (17, 15) => "P_I222₁", (18, 16) => "P2₁2₁2", (18, 17) => "P2₁2₁21′", (18, 18) => "P2₁′2₁′2", (18, 19) => "P2₁2₁′2′", (18, 20) => "P_b2₁2₁2", (18, 21) => "P_c2₁2₁2", (18, 22) => "P_B2₁2₁2", (18, 23) => "P_C2₁2₁2", (18, 24) => "P_I2₁2₁2", (19, 25) => "P2₁2₁2₁", (19, 26) => "P2₁2₁2₁1′", (19, 27) => "P2₁′2₁′2₁", (19, 28) => "P_c2₁2₁2₁", (19, 29) => "P_C2₁2₁2₁", (19, 30) => "P_I2₁2₁2₁", (20, 31) => "C222₁", (20, 32) => "C222₁1′", (20, 33) => "C2′2′2₁", (20, 34) => "C22′2₁′", (20, 35) => "C_c222₁", (20, 36) => "C_a222₁", (20, 37) => "C_A222₁", (21, 38) => "C222", (21, 39) => "C2221′", (21, 40) => "C2′2′2", (21, 41) => "C22′2′", (21, 42) => "C_c222", (21, 43) => "C_a222", (21, 44) => "C_A222", (22, 45) => "F222", (22, 46) => "F2221′", (22, 47) => "F2′2′2", (22, 48) => "F_S222", (23, 49) => "I222", (23, 50) => "I2221′", (23, 51) => "I2′2′2", (23, 52) => "I_c222", (24, 53) => "I2₁2₁2₁", (24, 54) => "I2₁2₁2₁1′", (24, 55) => "I2₁′2₁′2₁", (24, 56) => "I_c2₁2₁2₁", (25, 57) => "Pmm2", (25, 58) => "Pmm21′", (25, 59) => "Pm′m2′", (25, 60) => "Pm′m′2", (25, 61) => "P_cmm2", (25, 62) => "P_amm2", (25, 63) => "P_Cmm2", (25, 64) => "P_Amm2", (25, 65) => "P_Imm2", (26, 66) => "Pmc2₁", (26, 67) => "Pmc2₁1′", (26, 68) => "Pm′c2₁′", (26, 69) => "Pmc′2₁′", (26, 70) => "Pm′c′2₁", (26, 71) => "P_amc2₁", (26, 72) => "P_bmc2₁", (26, 73) => "P_cmc2₁", (26, 74) => "P_Amc2₁", (26, 75) => "P_Bmc2₁", (26, 76) => "P_Cmc2₁", (26, 77) => "P_Imc2₁", (27, 78) => "Pcc2", (27, 79) => "Pcc21′", (27, 80) => "Pc′c2′", (27, 81) => "Pc′c′2", (27, 82) => "P_ccc2", (27, 83) => "P_acc2", (27, 84) => "P_Ccc2", (27, 85) => "P_Acc2", (27, 86) => "P_Icc2", (28, 87) => "Pma2", (28, 88) => "Pma21′", (28, 89) => "Pm′a2′", (28, 90) => "Pma′2′", (28, 91) => "Pm′a′2", (28, 92) => "P_ama2", (28, 93) => "P_bma2", (28, 94) => "P_cma2", (28, 95) => "P_Ama2", (28, 96) => "P_Bma2", (28, 97) => "P_Cma2", (28, 98) => "P_Ima2", (29, 99) => "Pca2₁", (29, 100) => "Pca2₁1′", (29, 101) => "Pc′a2₁′", (29, 102) => "Pca′2₁′", (29, 103) => "Pc′a′2₁", (29, 104) => "P_aca2₁", (29, 105) => "P_bca2₁", (29, 106) => "P_cca2₁", (29, 107) => "P_Aca2₁", (29, 108) => "P_Bca2₁", (29, 109) => "P_Cca2₁", (29, 110) => "P_Ica2₁", (30, 111) => "Pnc2", (30, 112) => "Pnc21′", (30, 113) => "Pn′c2′", (30, 114) => "Pnc′2′", (30, 115) => "Pn′c′2", (30, 116) => "P_anc2", (30, 117) => "P_bnc2", (30, 118) => "P_cnc2", (30, 119) => "P_Anc2", (30, 120) => "P_Bnc2", (30, 121) => "P_Cnc2", (30, 122) => "P_Inc2", (31, 123) => "Pmn2₁", (31, 124) => "Pmn2₁1′", (31, 125) => "Pm′n2₁′", (31, 126) => "Pmn′2₁′", (31, 127) => "Pm′n′2₁", (31, 128) => "P_amn2₁", (31, 129) => "P_bmn2₁", (31, 130) => "P_cmn2₁", (31, 131) => "P_Amn2₁", (31, 132) => "P_Bmn2₁", (31, 133) => "P_Cmn2₁", (31, 134) => "P_Imn2₁", (32, 135) => "Pba2", (32, 136) => "Pba21′", (32, 137) => "Pb′a2′", (32, 138) => "Pb′a′2", (32, 139) => "P_cba2", (32, 140) => "P_bba2", (32, 141) => "P_Cba2", (32, 142) => "P_Aba2", (32, 143) => "P_Iba2", (33, 144) => "Pna2₁", (33, 145) => "Pna2₁1′", (33, 146) => "Pn′a2₁′", (33, 147) => "Pna′2₁′", (33, 148) => "Pn′a′2₁", (33, 149) => "P_ana2₁", (33, 150) => "P_bna2₁", (33, 151) => "P_cna2₁", (33, 152) => "P_Ana2₁", (33, 153) => "P_Bna2₁", (33, 154) => "P_Cna2₁", (33, 155) => "P_Ina2₁", (34, 156) => "Pnn2", (34, 157) => "Pnn21′", (34, 158) => "Pn′n2′", (34, 159) => "Pn′n′2", (34, 160) => "P_ann2", (34, 161) => "P_cnn2", (34, 162) => "P_Ann2", (34, 163) => "P_Cnn2", (34, 164) => "P_Inn2", (35, 165) => "Cmm2", (35, 166) => "Cmm21′", (35, 167) => "Cm′m2′", (35, 168) => "Cm′m′2", (35, 169) => "C_cmm2", (35, 170) => "C_amm2", (35, 171) => "C_Amm2", (36, 172) => "Cmc2₁", (36, 173) => "Cmc2₁1′", (36, 174) => "Cm′c2₁′", (36, 175) => "Cmc′2₁′", (36, 176) => "Cm′c′2₁", (36, 177) => "C_cmc2₁", (36, 178) => "C_amc2₁", (36, 179) => "C_Amc2₁", (37, 180) => "Ccc2", (37, 181) => "Ccc21′", (37, 182) => "Cc′c2′", (37, 183) => "Cc′c′2", (37, 184) => "C_ccc2", (37, 185) => "C_acc2", (37, 186) => "C_Acc2", (38, 187) => "Amm2", (38, 188) => "Amm21′", (38, 189) => "Am′m2′", (38, 190) => "Amm′2′", (38, 191) => "Am′m′2", (38, 192) => "A_amm2", (38, 193) => "A_bmm2", (38, 194) => "A_Bmm2", (39, 195) => "Abm2", (39, 196) => "Abm21′", (39, 197) => "Ab′m2′", (39, 198) => "Abm′2′", (39, 199) => "Ab′m′2", (39, 200) => "A_abm2", (39, 201) => "A_bbm2", (39, 202) => "A_Bbm2", (40, 203) => "Ama2", (40, 204) => "Ama21′", (40, 205) => "Am′a2′", (40, 206) => "Ama′2′", (40, 207) => "Am′a′2", (40, 208) => "A_ama2", (40, 209) => "A_bma2", (40, 210) => "A_Bma2", (41, 211) => "Aba2", (41, 212) => "Aba21′", (41, 213) => "Ab′a2′", (41, 214) => "Aba′2′", (41, 215) => "Ab′a′2", (41, 216) => "A_aba2", (41, 217) => "A_bba2", (41, 218) => "A_Bba2", (42, 219) => "Fmm2", (42, 220) => "Fmm21′", (42, 221) => "Fm′m2′", (42, 222) => "Fm′m′2", (42, 223) => "F_Smm2", (43, 224) => "Fdd2", (43, 225) => "Fdd21′", (43, 226) => "Fd′d2′", (43, 227) => "Fd′d′2", (43, 228) => "F_Sdd2", (44, 229) => "Imm2", (44, 230) => "Imm21′", (44, 231) => "Im′m2′", (44, 232) => "Im′m′2", (44, 233) => "I_cmm2", (44, 234) => "I_amm2", (45, 235) => "Iba2", (45, 236) => "Iba21′", (45, 237) => "Ib′a2′", (45, 238) => "Ib′a′2", (45, 239) => "I_cba2", (45, 240) => "I_aba2", (46, 241) => "Ima2", (46, 242) => "Ima21′", (46, 243) => "Im′a2′", (46, 244) => "Ima′2′", (46, 245) => "Im′a′2", (46, 246) => "I_cma2", (46, 247) => "I_ama2", (46, 248) => "I_bma2", (47, 249) => "Pmmm", (47, 250) => "Pmmm1′", (47, 251) => "Pm′mm", (47, 252) => "Pm′m′m", (47, 253) => "Pm′m′m′", (47, 254) => "P_ammm", (47, 255) => "P_Cmmm", (47, 256) => "P_Immm", (48, 257) => "Pnnn", (48, 258) => "Pnnn1′", (48, 259) => "Pn′nn", (48, 260) => "Pn′n′n", (48, 261) => "Pn′n′n′", (48, 262) => "P_cnnn", (48, 263) => "P_Cnnn", (48, 264) => "P_Innn", (49, 265) => "Pccm", (49, 266) => "Pccm1′", (49, 267) => "Pc′cm", (49, 268) => "Pccm′", (49, 269) => "Pc′c′m", (49, 270) => "Pc′cm′", (49, 271) => "Pc′c′m′", (49, 272) => "P_accm", (49, 273) => "P_cccm", (49, 274) => "P_Bccm", (49, 275) => "P_Cccm", (49, 276) => "P_Iccm", (50, 277) => "Pban", (50, 278) => "Pban1′", (50, 279) => "Pb′an", (50, 280) => "Pban′", (50, 281) => "Pb′a′n", (50, 282) => "Pb′an′", (50, 283) => "Pb′a′n′", (50, 284) => "P_aban", (50, 285) => "P_cban", (50, 286) => "P_Aban", (50, 287) => "P_Cban", (50, 288) => "P_Iban", (51, 289) => "Pmma", (51, 290) => "Pmma1′", (51, 291) => "Pm′ma", (51, 292) => "Pmm′a", (51, 293) => "Pmma′", (51, 294) => "Pm′m′a", (51, 295) => "Pmm′a′", (51, 296) => "Pm′ma′", (51, 297) => "Pm′m′a′", (51, 298) => "P_amma", (51, 299) => "P_bmma", (51, 300) => "P_cmma", (51, 301) => "P_Amma", (51, 302) => "P_Bmma", (51, 303) => "P_Cmma", (51, 304) => "P_Imma", (52, 305) => "Pnna", (52, 306) => "Pnna1′", (52, 307) => "Pn′na", (52, 308) => "Pnn′a", (52, 309) => "Pnna′", (52, 310) => "Pn′n′a", (52, 311) => "Pnn′a′", (52, 312) => "Pn′na′", (52, 313) => "Pn′n′a′", (52, 314) => "P_anna", (52, 315) => "P_bnna", (52, 316) => "P_cnna", (52, 317) => "P_Anna", (52, 318) => "P_Bnna", (52, 319) => "P_Cnna", (52, 320) => "P_Inna", (53, 321) => "Pmna", (53, 322) => "Pmna1′", (53, 323) => "Pm′na", (53, 324) => "Pmn′a", (53, 325) => "Pmna′", (53, 326) => "Pm′n′a", (53, 327) => "Pmn′a′", (53, 328) => "Pm′na′", (53, 329) => "Pm′n′a′", (53, 330) => "P_amna", (53, 331) => "P_bmna", (53, 332) => "P_cmna", (53, 333) => "P_Amna", (53, 334) => "P_Bmna", (53, 335) => "P_Cmna", (53, 336) => "P_Imna", (54, 337) => "Pcca", (54, 338) => "Pcca1′", (54, 339) => "Pc′ca", (54, 340) => "Pcc′a", (54, 341) => "Pcca′", (54, 342) => "Pc′c′a", (54, 343) => "Pcc′a′", (54, 344) => "Pc′ca′", (54, 345) => "Pc′c′a′", (54, 346) => "P_acca", (54, 347) => "P_bcca", (54, 348) => "P_ccca", (54, 349) => "P_Acca", (54, 350) => "P_Bcca", (54, 351) => "P_Ccca", (54, 352) => "P_Icca", (55, 353) => "Pbam", (55, 354) => "Pbam1′", (55, 355) => "Pb′am", (55, 356) => "Pbam′", (55, 357) => "Pb′a′m", (55, 358) => "Pb′am′", (55, 359) => "Pb′a′m′", (55, 360) => "P_abam", (55, 361) => "P_cbam", (55, 362) => "P_Abam", (55, 363) => "P_Cbam", (55, 364) => "P_Ibam", (56, 365) => "Pccn", (56, 366) => "Pccn1′", (56, 367) => "Pc′cn", (56, 368) => "Pccn′", (56, 369) => "Pc′c′n", (56, 370) => "Pc′cn′", (56, 371) => "Pc′c′n′", (56, 372) => "P_bccn", (56, 373) => "P_cccn", (56, 374) => "P_Accn", (56, 375) => "P_Cccn", (56, 376) => "P_Iccn", (57, 377) => "Pbcm", (57, 378) => "Pbcm1′", (57, 379) => "Pb′cm", (57, 380) => "Pbc′m", (57, 381) => "Pbcm′", (57, 382) => "Pb′c′m", (57, 383) => "Pbc′m′", (57, 384) => "Pb′cm′", (57, 385) => "Pb′c′m′", (57, 386) => "P_abcm", (57, 387) => "P_bbcm", (57, 388) => "P_cbcm", (57, 389) => "P_Abcm", (57, 390) => "P_Bbcm", (57, 391) => "P_Cbcm", (57, 392) => "P_Ibcm", (58, 393) => "Pnnm", (58, 394) => "Pnnm1′", (58, 395) => "Pn′nm", (58, 396) => "Pnnm′", (58, 397) => "Pn′n′m", (58, 398) => "Pnn′m′", (58, 399) => "Pn′n′m′", (58, 400) => "P_annm", (58, 401) => "P_cnnm", (58, 402) => "P_Bnnm", (58, 403) => "P_Cnnm", (58, 404) => "P_Innm", (59, 405) => "Pmmn", (59, 406) => "Pmmn1′", (59, 407) => "Pm′mn", (59, 408) => "Pmmn′", (59, 409) => "Pm′m′n", (59, 410) => "Pmm′n′", (59, 411) => "Pm′m′n′", (59, 412) => "P_bmmn", (59, 413) => "P_cmmn", (59, 414) => "P_Bmmn", (59, 415) => "P_Cmmn", (59, 416) => "P_Immn", (60, 417) => "Pbcn", (60, 418) => "Pbcn1′", (60, 419) => "Pb′cn", (60, 420) => "Pbc′n", (60, 421) => "Pbcn′", (60, 422) => "Pb′c′n", (60, 423) => "Pbc′n′", (60, 424) => "Pb′cn′", (60, 425) => "Pb′c′n′", (60, 426) => "P_abcn", (60, 427) => "P_bbcn", (60, 428) => "P_cbcn", (60, 429) => "P_Abcn", (60, 430) => "P_Bbcn", (60, 431) => "P_Cbcn", (60, 432) => "P_Ibcn", (61, 433) => "Pbca", (61, 434) => "Pbca1′", (61, 435) => "Pb′ca", (61, 436) => "Pb′c′a", (61, 437) => "Pb′c′a′", (61, 438) => "P_abca", (61, 439) => "P_Cbca", (61, 440) => "P_Ibca", (62, 441) => "Pnma", (62, 442) => "Pnma1′", (62, 443) => "Pn′ma", (62, 444) => "Pnm′a", (62, 445) => "Pnma′", (62, 446) => "Pn′m′a", (62, 447) => "Pnm′a′", (62, 448) => "Pn′ma′", (62, 449) => "Pn′m′a′", (62, 450) => "P_anma", (62, 451) => "P_bnma", (62, 452) => "P_cnma", (62, 453) => "P_Anma", (62, 454) => "P_Bnma", (62, 455) => "P_Cnma", (62, 456) => "P_Inma", (63, 457) => "Cmcm", (63, 458) => "Cmcm1′", (63, 459) => "Cm′cm", (63, 460) => "Cmc′m", (63, 461) => "Cmcm′", (63, 462) => "Cm′c′m", (63, 463) => "Cmc′m′", (63, 464) => "Cm′cm′", (63, 465) => "Cm′c′m′", (63, 466) => "C_cmcm", (63, 467) => "C_amcm", (63, 468) => "C_Amcm", (64, 469) => "Cmca", (64, 470) => "Cmca1′", (64, 471) => "Cm′ca", (64, 472) => "Cmc′a", (64, 473) => "Cmca′", (64, 474) => "Cm′c′a", (64, 475) => "Cmc′a′", (64, 476) => "Cm′ca′", (64, 477) => "Cm′c′a′", (64, 478) => "C_cmca", (64, 479) => "C_amca", (64, 480) => "C_Amca", (65, 481) => "Cmmm", (65, 482) => "Cmmm1′", (65, 483) => "Cm′mm", (65, 484) => "Cmmm′", (65, 485) => "Cm′m′m", (65, 486) => "Cmm′m′", (65, 487) => "Cm′m′m′", (65, 488) => "C_cmmm", (65, 489) => "C_ammm", (65, 490) => "C_Ammm", (66, 491) => "Cccm", (66, 492) => "Cccm1′", (66, 493) => "Cc′cm", (66, 494) => "Cccm′", (66, 495) => "Cc′c′m", (66, 496) => "Ccc′m′", (66, 497) => "Cc′c′m′", (66, 498) => "C_cccm", (66, 499) => "C_accm", (66, 500) => "C_Accm", (67, 501) => "Cmma", (67, 502) => "Cmma1′", (67, 503) => "Cm′ma", (67, 504) => "Cmma′", (67, 505) => "Cm′m′a", (67, 506) => "Cmm′a′", (67, 507) => "Cm′m′a′", (67, 508) => "C_cmma", (67, 509) => "C_amma", (67, 510) => "C_Amma", (68, 511) => "Ccca", (68, 512) => "Ccca1′", (68, 513) => "Cc′ca", (68, 514) => "Ccca′", (68, 515) => "Cc′c′a", (68, 516) => "Ccc′a′", (68, 517) => "Cc′c′a′", (68, 518) => "C_ccca", (68, 519) => "C_acca", (68, 520) => "C_Acca", (69, 521) => "Fmmm", (69, 522) => "Fmmm1′", (69, 523) => "Fm′mm", (69, 524) => "Fm′m′m", (69, 525) => "Fm′m′m′", (69, 526) => "F_Smmm", (70, 527) => "Fddd", (70, 528) => "Fddd1′", (70, 529) => "Fd′dd", (70, 530) => "Fd′d′d", (70, 531) => "Fd′d′d′", (70, 532) => "F_Sddd", (71, 533) => "Immm", (71, 534) => "Immm1′", (71, 535) => "Im′mm", (71, 536) => "Im′m′m", (71, 537) => "Im′m′m′", (71, 538) => "I_cmmm", (72, 539) => "Ibam", (72, 540) => "Ibam1′", (72, 541) => "Ib′am", (72, 542) => "Ibam′", (72, 543) => "Ib′a′m", (72, 544) => "Iba′m′", (72, 545) => "Ib′a′m′", (72, 546) => "I_cbam", (72, 547) => "I_bbam", (73, 548) => "Ibca", (73, 549) => "Ibca1′", (73, 550) => "Ib′ca", (73, 551) => "Ib′c′a", (73, 552) => "Ib′c′a′", (73, 553) => "I_cbca", (74, 554) => "Imma", (74, 555) => "Imma1′", (74, 556) => "Im′ma", (74, 557) => "Imma′", (74, 558) => "Im′m′a", (74, 559) => "Imm′a′", (74, 560) => "Im′m′a′", (74, 561) => "I_cmma", (74, 562) => "I_bmma", (75, 1) => "P4", (75, 2) => "P41′", (75, 3) => "P4′", (75, 4) => "P_c4", (75, 5) => "P_C4", (75, 6) => "P_I4", (76, 7) => "P4₁", (76, 8) => "P4₁1′", (76, 9) => "P4₁′", (76, 10) => "P_c4₁", (76, 11) => "P_C4₁", (76, 12) => "P_I4₁", (77, 13) => "P4₂", (77, 14) => "P4₂1′", (77, 15) => "P4₂′", (77, 16) => "P_c4₂", (77, 17) => "P_C4₂", (77, 18) => "P_I4₂", (78, 19) => "P4₃", (78, 20) => "P4₃1′", (78, 21) => "P4₃′", (78, 22) => "P_c4₃", (78, 23) => "P_C4₃", (78, 24) => "P_I4₃", (79, 25) => "I4", (79, 26) => "I41′", (79, 27) => "I4′", (79, 28) => "I_c4", (80, 29) => "I4₁", (80, 30) => "I4₁1′", (80, 31) => "I4₁′", (80, 32) => "I_c4₁", (81, 33) => "P-4", (81, 34) => "P-41′", (81, 35) => "P-4′", (81, 36) => "P_c-4", (81, 37) => "P_C-4", (81, 38) => "P_I-4", (82, 39) => "I-4", (82, 40) => "I-41′", (82, 41) => "I-4′", (82, 42) => "I_c-4", (83, 43) => "P4/m", (83, 44) => "P4/m1′", (83, 45) => "P4′/m", (83, 46) => "P4/m′", (83, 47) => "P4′/m′", (83, 48) => "P_c4/m", (83, 49) => "P_C4/m", (83, 50) => "P_I4/m", (84, 51) => "P4₂/m", (84, 52) => "P4₂/m1′", (84, 53) => "P4₂′/m", (84, 54) => "P4₂/m′", (84, 55) => "P4₂′/m′", (84, 56) => "P_c4₂/m", (84, 57) => "P_C4₂/m", (84, 58) => "P_I4₂/m", (85, 59) => "P4/n", (85, 60) => "P4/n1′", (85, 61) => "P4′/n", (85, 62) => "P4/n′", (85, 63) => "P4′/n′", (85, 64) => "P_c4/n", (85, 65) => "P_C4/n", (85, 66) => "P_I4/n", (86, 67) => "P4₂/n", (86, 68) => "P4₂/n1′", (86, 69) => "P4₂′/n", (86, 70) => "P4₂/n′", (86, 71) => "P4₂′/n′", (86, 72) => "P_c4₂/n", (86, 73) => "P_C4₂/n", (86, 74) => "P_I4₂/n", (87, 75) => "I4/m", (87, 76) => "I4/m1′", (87, 77) => "I4′/m", (87, 78) => "I4/m′", (87, 79) => "I4′/m′", (87, 80) => "I_c4/m", (88, 81) => "I4₁/a", (88, 82) => "I4₁/a1′", (88, 83) => "I4₁′/a", (88, 84) => "I4₁/a′", (88, 85) => "I4₁′/a′", (88, 86) => "I_c4₁/a", (89, 87) => "P422", (89, 88) => "P4221′", (89, 89) => "P4′22′", (89, 90) => "P42′2′", (89, 91) => "P4′2′2", (89, 92) => "P_c422", (89, 93) => "P_C422", (89, 94) => "P_I422", (90, 95) => "P42₁2", (90, 96) => "P42₁21′", (90, 97) => "P4′2₁2′", (90, 98) => "P42₁′2′", (90, 99) => "P4′2₁′2", (90, 100) => "P_c42₁2", (90, 101) => "P_C42₁2", (90, 102) => "P_I42₁2", (91, 103) => "P4₁22", (91, 104) => "P4₁221′", (91, 105) => "P4₁′22′", (91, 106) => "P4₁2′2′", (91, 107) => "P4₁′2′2", (91, 108) => "P_c4₁22", (91, 109) => "P_C4₁22", (91, 110) => "P_I4₁22", (92, 111) => "P4₁2₁2", (92, 112) => "P4₁2₁21′", (92, 113) => "P4₁′2₁2′", (92, 114) => "P4₁2₁′2′", (92, 115) => "P4₁′2₁′2", (92, 116) => "P_c4₁2₁2", (92, 117) => "P_C4₁2₁2", (92, 118) => "P_I4₁2₁2", (93, 119) => "P4₂22", (93, 120) => "P4₂221′", (93, 121) => "P4₂′22′", (93, 122) => "P4₂2′2′", (93, 123) => "P4₂′2′2", (93, 124) => "P_c4₂22", (93, 125) => "P_C4₂22", (93, 126) => "P_I4₂22", (94, 127) => "P4₂2₁2", (94, 128) => "P4₂2₁21′", (94, 129) => "P4₂′2₁2′", (94, 130) => "P4₂2₁′2′", (94, 131) => "P4₂′2₁′2", (94, 132) => "P_c4₂2₁2", (94, 133) => "P_C4₂2₁2", (94, 134) => "P_I4₂2₁2", (95, 135) => "P4₃22", (95, 136) => "P4₃221′", (95, 137) => "P4₃′22′", (95, 138) => "P4₃2′2′", (95, 139) => "P4₃′2′2", (95, 140) => "P_c4₃22", (95, 141) => "P_C4₃22", (95, 142) => "P_I4₃22", (96, 143) => "P4₃2₁2", (96, 144) => "P4₃2₁21′", (96, 145) => "P4₃′2₁2′", (96, 146) => "P4₃2₁′2′", (96, 147) => "P4₃′2₁′2", (96, 148) => "P_c4₃2₁2", (96, 149) => "P_C4₃2₁2", (96, 150) => "P_I4₃2₁2", (97, 151) => "I422", (97, 152) => "I4221′", (97, 153) => "I4′22′", (97, 154) => "I42′2′", (97, 155) => "I4′2′2", (97, 156) => "I_c422", (98, 157) => "I4₁22", (98, 158) => "I4₁221′", (98, 159) => "I4₁′22′", (98, 160) => "I4₁2′2′", (98, 161) => "I4₁′2′2", (98, 162) => "I_c4₁22", (99, 163) => "P4mm", (99, 164) => "P4mm1′", (99, 165) => "P4′m′m", (99, 166) => "P4′mm′", (99, 167) => "P4m′m′", (99, 168) => "P_c4mm", (99, 169) => "P_C4mm", (99, 170) => "P_I4mm", (100, 171) => "P4bm", (100, 172) => "P4bm1′", (100, 173) => "P4′b′m", (100, 174) => "P4′bm′", (100, 175) => "P4b′m′", (100, 176) => "P_c4bm", (100, 177) => "P_C4bm", (100, 178) => "P_I4bm", (101, 179) => "P4₂cm", (101, 180) => "P4₂cm1′", (101, 181) => "P4₂′c′m", (101, 182) => "P4₂′cm′", (101, 183) => "P4₂c′m′", (101, 184) => "P_c4₂cm", (101, 185) => "P_C4₂cm", (101, 186) => "P_I4₂cm", (102, 187) => "P4₂nm", (102, 188) => "P4₂nm1′", (102, 189) => "P4₂′n′m", (102, 190) => "P4₂′nm′", (102, 191) => "P4₂n′m′", (102, 192) => "P_c4₂nm", (102, 193) => "P_C4₂nm", (102, 194) => "P_I4₂nm", (103, 195) => "P4cc", (103, 196) => "P4cc1′", (103, 197) => "P4′c′c", (103, 198) => "P4′cc′", (103, 199) => "P4c′c′", (103, 200) => "P_c4cc", (103, 201) => "P_C4cc", (103, 202) => "P_I4cc", (104, 203) => "P4nc", (104, 204) => "P4nc1′", (104, 205) => "P4′n′c", (104, 206) => "P4′nc′", (104, 207) => "P4n′c′", (104, 208) => "P_c4nc", (104, 209) => "P_C4nc", (104, 210) => "P_I4nc", (105, 211) => "P4₂mc", (105, 212) => "P4₂mc1′", (105, 213) => "P4₂′m′c", (105, 214) => "P4₂′mc′", (105, 215) => "P4₂m′c′", (105, 216) => "P_c4₂mc", (105, 217) => "P_C4₂mc", (105, 218) => "P_I4₂mc", (106, 219) => "P4₂bc", (106, 220) => "P4₂bc1′", (106, 221) => "P4₂′b′c", (106, 222) => "P4₂′bc′", (106, 223) => "P4₂b′c′", (106, 224) => "P_c4₂bc", (106, 225) => "P_C4₂bc", (106, 226) => "P_I4₂bc", (107, 227) => "I4mm", (107, 228) => "I4mm1′", (107, 229) => "I4′m′m", (107, 230) => "I4′mm′", (107, 231) => "I4m′m′", (107, 232) => "I_c4mm", (108, 233) => "I4cm", (108, 234) => "I4cm1′", (108, 235) => "I4′c′m", (108, 236) => "I4′cm′", (108, 237) => "I4c′m′", (108, 238) => "I_c4cm", (109, 239) => "I4₁md", (109, 240) => "I4₁md1′", (109, 241) => "I4₁′m′d", (109, 242) => "I4₁′md′", (109, 243) => "I4₁m′d′", (109, 244) => "I_c4₁md", (110, 245) => "I4₁cd", (110, 246) => "I4₁cd1′", (110, 247) => "I4₁′c′d", (110, 248) => "I4₁′cd′", (110, 249) => "I4₁c′d′", (110, 250) => "I_c4₁cd", (111, 251) => "P-42m", (111, 252) => "P-42m1′", (111, 253) => "P-4′2′m", (111, 254) => "P-4′2m′", (111, 255) => "P-42′m′", (111, 256) => "P_c-42m", (111, 257) => "P_C-42m", (111, 258) => "P_I-42m", (112, 259) => "P-42c", (112, 260) => "P-42c1′", (112, 261) => "P-4′2′c", (112, 262) => "P-4′2c′", (112, 263) => "P-42′c′", (112, 264) => "P_c-42c", (112, 265) => "P_C-42c", (112, 266) => "P_I-42c", (113, 267) => "P-42₁m", (113, 268) => "P-42₁m1′", (113, 269) => "P-4′2₁′m", (113, 270) => "P-4′2₁m′", (113, 271) => "P-42₁′m′", (113, 272) => "P_c-42₁m", (113, 273) => "P_C-42₁m", (113, 274) => "P_I-42₁m", (114, 275) => "P-42₁c", (114, 276) => "P-42₁c1′", (114, 277) => "P-4′2₁′c", (114, 278) => "P-4′2₁c′", (114, 279) => "P-42₁′c′", (114, 280) => "P_c-42₁c", (114, 281) => "P_C-42₁c", (114, 282) => "P_I-42₁c", (115, 283) => "P-4m2", (115, 284) => "P-4m21′", (115, 285) => "P-4′m′2", (115, 286) => "P-4′m2′", (115, 287) => "P-4m′2′", (115, 288) => "P_c-4m2", (115, 289) => "P_C-4m2", (115, 290) => "P_I-4m2", (116, 291) => "P-4c2", (116, 292) => "P-4c21′", (116, 293) => "P-4′c′2", (116, 294) => "P-4′c2′", (116, 295) => "P-4c′2′", (116, 296) => "P_c-4c2", (116, 297) => "P_C-4c2", (116, 298) => "P_I-4c2", (117, 299) => "P-4b2", (117, 300) => "P-4b21′", (117, 301) => "P-4′b′2", (117, 302) => "P-4′b2′", (117, 303) => "P-4b′2′", (117, 304) => "P_c-4b2", (117, 305) => "P_C-4b2", (117, 306) => "P_I-4b2", (118, 307) => "P-4n2", (118, 308) => "P-4n21′", (118, 309) => "P-4′n′2", (118, 310) => "P-4′n2′", (118, 311) => "P-4n′2′", (118, 312) => "P_c-4n2", (118, 313) => "P_C-4n2", (118, 314) => "P_I-4n2", (119, 315) => "I-4m2", (119, 316) => "I-4m21′", (119, 317) => "I-4′m′2", (119, 318) => "I-4′m2′", (119, 319) => "I-4m′2′", (119, 320) => "I_c-4m2", (120, 321) => "I-4c2", (120, 322) => "I-4c21′", (120, 323) => "I-4′c′2", (120, 324) => "I-4′c2′", (120, 325) => "I-4c′2′", (120, 326) => "I_c-4c2", (121, 327) => "I-42m", (121, 328) => "I-42m1′", (121, 329) => "I-4′2′m", (121, 330) => "I-4′2m′", (121, 331) => "I-42′m′", (121, 332) => "I_c-42m", (122, 333) => "I-42d", (122, 334) => "I-42d1′", (122, 335) => "I-4′2′d", (122, 336) => "I-4′2d′", (122, 337) => "I-42′d′", (122, 338) => "I_c-42d", (123, 339) => "P4/mmm", (123, 340) => "P4/mmm1′", (123, 341) => "P4/m′mm", (123, 342) => "P4′/mm′m", (123, 343) => "P4′/mmm′", (123, 344) => "P4′/m′m′m", (123, 345) => "P4/mm′m′", (123, 346) => "P4′/m′mm′", (123, 347) => "P4/m′m′m′", (123, 348) => "P_c4/mmm", (123, 349) => "P_C4/mmm", (123, 350) => "P_I4/mmm", (124, 351) => "P4/mcc", (124, 352) => "P4/mcc1′", (124, 353) => "P4/m′cc", (124, 354) => "P4′/mc′c", (124, 355) => "P4′/mcc′", (124, 356) => "P4′/m′c′c", (124, 357) => "P4/mc′c′", (124, 358) => "P4′/m′cc′", (124, 359) => "P4/m′c′c′", (124, 360) => "P_c4/mcc", (124, 361) => "P_C4/mcc", (124, 362) => "P_I4/mcc", (125, 363) => "P4/nbm", (125, 364) => "P4/nbm1′", (125, 365) => "P4/n′bm", (125, 366) => "P4′/nb′m", (125, 367) => "P4′/nbm′", (125, 368) => "P4′/n′b′m", (125, 369) => "P4/nb′m′", (125, 370) => "P4′/n′bm′", (125, 371) => "P4/n′b′m′", (125, 372) => "P_c4/nbm", (125, 373) => "P_C4/nbm", (125, 374) => "P_I4/nbm", (126, 375) => "P4/nnc", (126, 376) => "P4/nnc1′", (126, 377) => "P4/n′nc", (126, 378) => "P4′/nn′c", (126, 379) => "P4′/nnc′", (126, 380) => "P4′/n′n′c", (126, 381) => "P4/nn′c′", (126, 382) => "P4′/n′nc′", (126, 383) => "P4/n′n′c′", (126, 384) => "P_c4/nnc", (126, 385) => "P_C4/nnc", (126, 386) => "P_I4/nnc", (127, 387) => "P4/mbm", (127, 388) => "P4/mbm1′", (127, 389) => "P4/m′bm", (127, 390) => "P4′/mb′m", (127, 391) => "P4′/mbm′", (127, 392) => "P4′/m′b′m", (127, 393) => "P4/mb′m′", (127, 394) => "P4′/m′bm′", (127, 395) => "P4/m′b′m′", (127, 396) => "P_c4/mbm", (127, 397) => "P_C4/mbm", (127, 398) => "P_I4/mbm", (128, 399) => "P4/mnc", (128, 400) => "P4/mnc1′", (128, 401) => "P4/m′nc", (128, 402) => "P4′/mn′c", (128, 403) => "P4′/mnc′", (128, 404) => "P4′/m′n′c", (128, 405) => "P4/mn′c′", (128, 406) => "P4′/m′nc′", (128, 407) => "P4/m′n′c′", (128, 408) => "P_c4/mnc", (128, 409) => "P_C4/mnc", (128, 410) => "P_I4/mnc", (129, 411) => "P4/nmm", (129, 412) => "P4/nmm1′", (129, 413) => "P4/n′mm", (129, 414) => "P4′/nm′m", (129, 415) => "P4′/nmm′", (129, 416) => "P4′/n′m′m", (129, 417) => "P4/nm′m′", (129, 418) => "P4′/n′mm′", (129, 419) => "P4/n′m′m′", (129, 420) => "P_c4/nmm", (129, 421) => "P_C4/nmm", (129, 422) => "P_I4/nmm", (130, 423) => "P4/ncc", (130, 424) => "P4/ncc1′", (130, 425) => "P4/n′cc", (130, 426) => "P4′/nc′c", (130, 427) => "P4′/ncc′", (130, 428) => "P4′/n′c′c", (130, 429) => "P4/nc′c′", (130, 430) => "P4′/n′cc′", (130, 431) => "P4/n′c′c′", (130, 432) => "P_c4/ncc", (130, 433) => "P_C4/ncc", (130, 434) => "P_I4/ncc", (131, 435) => "P4₂/mmc", (131, 436) => "P4₂/mmc1′", (131, 437) => "P4₂/m′mc", (131, 438) => "P4₂′/mm′c", (131, 439) => "P4₂′/mmc′", (131, 440) => "P4₂′/m′m′c", (131, 441) => "P4₂/mm′c′", (131, 442) => "P4₂′/m′mc′", (131, 443) => "P4₂/m′m′c′", (131, 444) => "P_c4₂/mmc", (131, 445) => "P_C4₂/mmc", (131, 446) => "P_I4₂/mmc", (132, 447) => "P4₂/mcm", (132, 448) => "P4₂/mcm1′", (132, 449) => "P4₂/m′cm", (132, 450) => "P4₂′/mc′m", (132, 451) => "P4₂′/mcm′", (132, 452) => "P4₂′/m′c′m", (132, 453) => "P4₂/mc′m′", (132, 454) => "P4₂′/m′cm′", (132, 455) => "P4₂/m′c′m′", (132, 456) => "P_c4₂/mcm", (132, 457) => "P_C4₂/mcm", (132, 458) => "P_I4₂/mcm", (133, 459) => "P4₂/nbc", (133, 460) => "P4₂/nbc1′", (133, 461) => "P4₂/n′bc", (133, 462) => "P4₂′/nb′c", (133, 463) => "P4₂′/nbc′", (133, 464) => "P4₂′/n′b′c", (133, 465) => "P4₂/nb′c′", (133, 466) => "P4₂′/n′bc′", (133, 467) => "P4₂/n′b′c′", (133, 468) => "P_c4₂/nbc", (133, 469) => "P_C4₂/nbc", (133, 470) => "P_I4₂/nbc", (134, 471) => "P4₂/nnm", (134, 472) => "P4₂/nnm1′", (134, 473) => "P4₂/n′nm", (134, 474) => "P4₂′/nn′m", (134, 475) => "P4₂′/nnm′", (134, 476) => "P4₂′/n′n′m", (134, 477) => "P4₂/nn′m′", (134, 478) => "P4₂′/n′nm′", (134, 479) => "P4₂/n′n′m′", (134, 480) => "P_c4₂/nnm", (134, 481) => "P_C4₂/nnm", (134, 482) => "P_I4₂/nnm", (135, 483) => "P4₂/mbc", (135, 484) => "P4₂/mbc1′", (135, 485) => "P4₂/m′bc", (135, 486) => "P4₂′/mb′c", (135, 487) => "P4₂′/mbc′", (135, 488) => "P4₂′/m′b′c", (135, 489) => "P4₂/mb′c′", (135, 490) => "P4₂′/m′bc′", (135, 491) => "P4₂/m′b′c′", (135, 492) => "P_c4₂/mbc", (135, 493) => "P_C4₂/mbc", (135, 494) => "P_I4₂/mbc", (136, 495) => "P4₂/mnm", (136, 496) => "P4₂/mnm1′", (136, 497) => "P4₂/m′nm", (136, 498) => "P4₂′/mn′m", (136, 499) => "P4₂′/mnm′", (136, 500) => "P4₂′/m′n′m", (136, 501) => "P4₂/mn′m′", (136, 502) => "P4₂′/m′nm′", (136, 503) => "P4₂/m′n′m′", (136, 504) => "P_c4₂/mnm", (136, 505) => "P_C4₂/mnm", (136, 506) => "P_I4₂/mnm", (137, 507) => "P4₂/nmc", (137, 508) => "P4₂/nmc1′", (137, 509) => "P4₂/n′mc", (137, 510) => "P4₂′/nm′c", (137, 511) => "P4₂′/nmc′", (137, 512) => "P4₂′/n′m′c", (137, 513) => "P4₂/nm′c′", (137, 514) => "P4₂′/n′mc′", (137, 515) => "P4₂/n′m′c′", (137, 516) => "P_c4₂/nmc", (137, 517) => "P_C4₂/nmc", (137, 518) => "P_I4₂/nmc", (138, 519) => "P4₂/ncm", (138, 520) => "P4₂/ncm1′", (138, 521) => "P4₂/n′cm", (138, 522) => "P4₂′/nc′m", (138, 523) => "P4₂′/ncm′", (138, 524) => "P4₂′/n′c′m", (138, 525) => "P4₂/nc′m′", (138, 526) => "P4₂′/n′cm′", (138, 527) => "P4₂/n′c′m′", (138, 528) => "P_c4₂/ncm", (138, 529) => "P_C4₂/ncm", (138, 530) => "P_I4₂/ncm", (139, 531) => "I4/mmm", (139, 532) => "I4/mmm1′", (139, 533) => "I4/m′mm", (139, 534) => "I4′/mm′m", (139, 535) => "I4′/mmm′", (139, 536) => "I4′/m′m′m", (139, 537) => "I4/mm′m′", (139, 538) => "I4′/m′mm′", (139, 539) => "I4/m′m′m′", (139, 540) => "I_c4/mmm", (140, 541) => "I4/mcm", (140, 542) => "I4/mcm1′", (140, 543) => "I4/m′cm", (140, 544) => "I4′/mc′m", (140, 545) => "I4′/mcm′", (140, 546) => "I4′/m′c′m", (140, 547) => "I4/mc′m′", (140, 548) => "I4′/m′cm′", (140, 549) => "I4/m′c′m′", (140, 550) => "I_c4/mcm", (141, 551) => "I4₁/amd", (141, 552) => "I4₁/amd1′", (141, 553) => "I4₁/a′md", (141, 554) => "I4₁′/am′d", (141, 555) => "I4₁′/amd′", (141, 556) => "I4₁′/a′m′d", (141, 557) => "I4₁/am′d′", (141, 558) => "I4₁′/a′md′", (141, 559) => "I4₁/a′m′d′", (141, 560) => "I_c4₁/amd", (142, 561) => "I4₁/acd", (142, 562) => "I4₁/acd1′", (142, 563) => "I4₁/a′cd", (142, 564) => "I4₁′/ac′d", (142, 565) => "I4₁′/acd′", (142, 566) => "I4₁′/a′c′d", (142, 567) => "I4₁/ac′d′", (142, 568) => "I4₁′/a′cd′", (142, 569) => "I4₁/a′c′d′", (142, 570) => "I_c4₁/acd", (143, 1) => "P3", (143, 2) => "P31′", (143, 3) => "P_c3", (144, 4) => "P3₁", (144, 5) => "P3₁1′", (144, 6) => "P_c3₁", (145, 7) => "P3₂", (145, 8) => "P3₂1′", (145, 9) => "P_c3₂", (146, 10) => "R3", (146, 11) => "R31′", (146, 12) => "R_I3", (147, 13) => "P-3", (147, 14) => "P-31′", (147, 15) => "P-3′", (147, 16) => "P_c-3", (148, 17) => "R-3", (148, 18) => "R-31′", (148, 19) => "R-3′", (148, 20) => "R_I-3", (149, 21) => "P312", (149, 22) => "P3121′", (149, 23) => "P312′", (149, 24) => "P_c312", (150, 25) => "P321", (150, 26) => "P3211′", (150, 27) => "P32′1", (150, 28) => "P_c321", (151, 29) => "P3₁12", (151, 30) => "P3₁121′", (151, 31) => "P3₁12′", (151, 32) => "P_c3₁12", (152, 33) => "P3₁21", (152, 34) => "P3₁211′", (152, 35) => "P3₁2′1", (152, 36) => "P_c3₁21", (153, 37) => "P3₂12", (153, 38) => "P3₂121′", (153, 39) => "P3₂12′", (153, 40) => "P_c3₂12", (154, 41) => "P3₂21", (154, 42) => "P3₂211′", (154, 43) => "P3₂2′1", (154, 44) => "P_c3₂21", (155, 45) => "R32", (155, 46) => "R321′", (155, 47) => "R32′", (155, 48) => "R_I32", (156, 49) => "P3m1", (156, 50) => "P3m11′", (156, 51) => "P3m′1", (156, 52) => "P_c3m1", (157, 53) => "P31m", (157, 54) => "P31m1′", (157, 55) => "P31m′", (157, 56) => "P_c31m", (158, 57) => "P3c1", (158, 58) => "P3c11′", (158, 59) => "P3c′1", (158, 60) => "P_c3c1", (159, 61) => "P31c", (159, 62) => "P31c1′", (159, 63) => "P31c′", (159, 64) => "P_c31c", (160, 65) => "R3m", (160, 66) => "R3m1′", (160, 67) => "R3m′", (160, 68) => "R_I3m", (161, 69) => "R3c", (161, 70) => "R3c1′", (161, 71) => "R3c′", (161, 72) => "R_I3c", (162, 73) => "P-31m", (162, 74) => "P-31m1′", (162, 75) => "P-3′1m", (162, 76) => "P-3′1m′", (162, 77) => "P-31m′", (162, 78) => "P_c-31m", (163, 79) => "P-31c", (163, 80) => "P-31c1′", (163, 81) => "P-3′1c", (163, 82) => "P-3′1c′", (163, 83) => "P-31c′", (163, 84) => "P_c-31c", (164, 85) => "P-3m1", (164, 86) => "P-3m11′", (164, 87) => "P-3′m1", (164, 88) => "P-3′m′1", (164, 89) => "P-3m′1", (164, 90) => "P_c-3m1", (165, 91) => "P-3c1", (165, 92) => "P-3c11′", (165, 93) => "P-3′c1", (165, 94) => "P-3′c′1", (165, 95) => "P-3c′1", (165, 96) => "P_c-3c1", (166, 97) => "R-3m", (166, 98) => "R-3m1′", (166, 99) => "R-3′m", (166, 100) => "R-3′m′", (166, 101) => "R-3m′", (166, 102) => "R_I-3m", (167, 103) => "R-3c", (167, 104) => "R-3c1′", (167, 105) => "R-3′c", (167, 106) => "R-3′c′", (167, 107) => "R-3c′", (167, 108) => "R_I-3c", (168, 109) => "P6", (168, 110) => "P61′", (168, 111) => "P6′", (168, 112) => "P_c6", (169, 113) => "P6₁", (169, 114) => "P6₁1′", (169, 115) => "P6₁′", (169, 116) => "P_c6₁", (170, 117) => "P6₅", (170, 118) => "P6₅1′", (170, 119) => "P6₅′", (170, 120) => "P_c6₅", (171, 121) => "P6₂", (171, 122) => "P6₂1′", (171, 123) => "P6₂′", (171, 124) => "P_c6₂", (172, 125) => "P6₄", (172, 126) => "P6₄1′", (172, 127) => "P6₄′", (172, 128) => "P_c6₄", (173, 129) => "P6₃", (173, 130) => "P6₃1′", (173, 131) => "P6₃′", (173, 132) => "P_c6₃", (174, 133) => "P-6", (174, 134) => "P-61′", (174, 135) => "P-6′", (174, 136) => "P_c-6", (175, 137) => "P6/m", (175, 138) => "P6/m1′", (175, 139) => "P6′/m", (175, 140) => "P6/m′", (175, 141) => "P6′/m′", (175, 142) => "P_c6/m", (176, 143) => "P6₃/m", (176, 144) => "P6₃/m1′", (176, 145) => "P6₃′/m", (176, 146) => "P6₃/m′", (176, 147) => "P6₃′/m′", (176, 148) => "P_c6₃/m", (177, 149) => "P622", (177, 150) => "P6221′", (177, 151) => "P6′2′2", (177, 152) => "P6′22′", (177, 153) => "P62′2′", (177, 154) => "P_c622", (178, 155) => "P6₁22", (178, 156) => "P6₁221′", (178, 157) => "P6₁′2′2", (178, 158) => "P6₁′22′", (178, 159) => "P6₁2′2′", (178, 160) => "P_c6₁22", (179, 161) => "P6₅22", (179, 162) => "P6₅221′", (179, 163) => "P6₅′2′2", (179, 164) => "P6₅′22′", (179, 165) => "P6₅2′2′", (179, 166) => "P_c6₅22", (180, 167) => "P6₂22", (180, 168) => "P6₂221′", (180, 169) => "P6₂′2′2", (180, 170) => "P6₂′22′", (180, 171) => "P6₂2′2′", (180, 172) => "P_c6₂22", (181, 173) => "P6₄22", (181, 174) => "P6₄221′", (181, 175) => "P6₄′2′2", (181, 176) => "P6₄′22′", (181, 177) => "P6₄2′2′", (181, 178) => "P_c6₄22", (182, 179) => "P6₃22", (182, 180) => "P6₃221′", (182, 181) => "P6₃′2′2", (182, 182) => "P6₃′22′", (182, 183) => "P6₃2′2′", (182, 184) => "P_c6₃22", (183, 185) => "P6mm", (183, 186) => "P6mm1′", (183, 187) => "P6′m′m", (183, 188) => "P6′mm′", (183, 189) => "P6m′m′", (183, 190) => "P_c6mm", (184, 191) => "P6cc", (184, 192) => "P6cc1′", (184, 193) => "P6′c′c", (184, 194) => "P6′cc′", (184, 195) => "P6c′c′", (184, 196) => "P_c6cc", (185, 197) => "P6₃cm", (185, 198) => "P6₃cm1′", (185, 199) => "P6₃′c′m", (185, 200) => "P6₃′cm′", (185, 201) => "P6₃c′m′", (185, 202) => "P_c6₃cm", (186, 203) => "P6₃mc", (186, 204) => "P6₃mc1′", (186, 205) => "P6₃′m′c", (186, 206) => "P6₃′mc′", (186, 207) => "P6₃m′c′", (186, 208) => "P_c6₃mc", (187, 209) => "P-6m2", (187, 210) => "P-6m21′", (187, 211) => "P-6′m′2", (187, 212) => "P-6′m2′", (187, 213) => "P-6m′2′", (187, 214) => "P_c-6m2", (188, 215) => "P-6c2", (188, 216) => "P-6c21′", (188, 217) => "P-6′c′2", (188, 218) => "P-6′c2′", (188, 219) => "P-6c′2′", (188, 220) => "P_c-6c2", (189, 221) => "P-62m", (189, 222) => "P-62m1′", (189, 223) => "P-6′2′m", (189, 224) => "P-6′2m′", (189, 225) => "P-62′m′", (189, 226) => "P_c-62m", (190, 227) => "P-62c", (190, 228) => "P-62c1′", (190, 229) => "P-6′2′c", (190, 230) => "P-6′2c′", (190, 231) => "P-62′c′", (190, 232) => "P_c-62c", (191, 233) => "P6/mmm", (191, 234) => "P6/mmm1′", (191, 235) => "P6/m′mm", (191, 236) => "P6′/mm′m", (191, 237) => "P6′/mmm′", (191, 238) => "P6′/m′m′m", (191, 239) => "P6′/m′mm′", (191, 240) => "P6/mm′m′", (191, 241) => "P6/m′m′m′", (191, 242) => "P_c6/mmm", (192, 243) => "P6/mcc", (192, 244) => "P6/mcc1′", (192, 245) => "P6/m′cc", (192, 246) => "P6′/mc′c", (192, 247) => "P6′/mcc′", (192, 248) => "P6′/m′c′c", (192, 249) => "P6′/m′cc′", (192, 250) => "P6/mc′c′", (192, 251) => "P6/m′c′c′", (192, 252) => "P_c6/mcc", (193, 253) => "P6₃/mcm", (193, 254) => "P6₃/mcm1′", (193, 255) => "P6₃/m′cm", (193, 256) => "P6₃′/mc′m", (193, 257) => "P6₃′/mcm′", (193, 258) => "P6₃′/m′c′m", (193, 259) => "P6₃′/m′cm′", (193, 260) => "P6₃/mc′m′", (193, 261) => "P6₃/m′c′m′", (193, 262) => "P_c6₃/mcm", (194, 263) => "P6₃/mmc", (194, 264) => "P6₃/mmc1′", (194, 265) => "P6₃/m′mc", (194, 266) => "P6₃′/mm′c", (194, 267) => "P6₃′/mmc′", (194, 268) => "P6₃′/m′m′c", (194, 269) => "P6₃′/m′mc′", (194, 270) => "P6₃/mm′c′", (194, 271) => "P6₃/m′m′c′", (194, 272) => "P_c6₃/mmc", (195, 1) => "P23", (195, 2) => "P231′", (195, 3) => "P_I23", (196, 4) => "F23", (196, 5) => "F231′", (196, 6) => "F_S23", (197, 7) => "I23", (197, 8) => "I231′", (198, 9) => "P2₁3", (198, 10) => "P2₁31′", (198, 11) => "P_I2₁3", (199, 12) => "I2₁3", (199, 13) => "I2₁31′", (200, 14) => "Pm-3", (200, 15) => "Pm-31′", (200, 16) => "Pm′-3′", (200, 17) => "P_Im-3", (201, 18) => "Pn-3", (201, 19) => "Pn-31′", (201, 20) => "Pn′-3′", (201, 21) => "P_In-3", (202, 22) => "Fm-3", (202, 23) => "Fm-31′", (202, 24) => "Fm′-3′", (202, 25) => "F_Sm-3", (203, 26) => "Fd-3", (203, 27) => "Fd-31′", (203, 28) => "Fd′-3′", (203, 29) => "F_Sd-3", (204, 30) => "Im-3", (204, 31) => "Im-31′", (204, 32) => "Im′-3′", (205, 33) => "Pa-3", (205, 34) => "Pa-31′", (205, 35) => "Pa′-3′", (205, 36) => "P_Ia-3", (206, 37) => "Ia-3", (206, 38) => "Ia-31′", (206, 39) => "Ia′-3′", (207, 40) => "P432", (207, 41) => "P4321′", (207, 42) => "P4′32′", (207, 43) => "P_I432", (208, 44) => "P4₂32", (208, 45) => "P4₂321′", (208, 46) => "P4₂′32′", (208, 47) => "P_I4₂32", (209, 48) => "F432", (209, 49) => "F4321′", (209, 50) => "F4′32′", (209, 51) => "F_S432", (210, 52) => "F4₁32", (210, 53) => "F4₁321′", (210, 54) => "F4₁′32′", (210, 55) => "F_S4₁32", (211, 56) => "I432", (211, 57) => "I4321′", (211, 58) => "I4′32′", (212, 59) => "P4₃32", (212, 60) => "P4₃321′", (212, 61) => "P4₃′32′", (212, 62) => "P_I4₃32", (213, 63) => "P4₁32", (213, 64) => "P4₁321′", (213, 65) => "P4₁′32′", (213, 66) => "P_I4₁32", (214, 67) => "I4₁32", (214, 68) => "I4₁321′", (214, 69) => "I4₁′32′", (215, 70) => "P-43m", (215, 71) => "P-43m1′", (215, 72) => "P-4′3m′", (215, 73) => "P_I-43m", (216, 74) => "F-43m", (216, 75) => "F-43m1′", (216, 76) => "F-4′3m′", (216, 77) => "F_S-43m", (217, 78) => "I-43m", (217, 79) => "I-43m1′", (217, 80) => "I-4′3m′", (218, 81) => "P-43n", (218, 82) => "P-43n1′", (218, 83) => "P-4′3n′", (218, 84) => "P_I-43n", (219, 85) => "F-43c", (219, 86) => "F-43c1′", (219, 87) => "F-4′3c′", (219, 88) => "F_S-43c", (220, 89) => "I-43d", (220, 90) => "I-43d1′", (220, 91) => "I-4′3d′", (221, 92) => "Pm-3m", (221, 93) => "Pm-3m1′", (221, 94) => "Pm′-3′m", (221, 95) => "Pm-3m′", (221, 96) => "Pm′-3′m′", (221, 97) => "P_Im-3m", (222, 98) => "Pn-3n", (222, 99) => "Pn-3n1′", (222, 100) => "Pn′-3′n", (222, 101) => "Pn-3n′", (222, 102) => "Pn′-3′n′", (222, 103) => "P_In-3n", (223, 104) => "Pm-3n", (223, 105) => "Pm-3n1′", (223, 106) => "Pm′-3′n", (223, 107) => "Pm-3n′", (223, 108) => "Pm′-3′n′", (223, 109) => "P_Im-3n", (224, 110) => "Pn-3m", (224, 111) => "Pn-3m1′", (224, 112) => "Pn′-3′m", (224, 113) => "Pn-3m′", (224, 114) => "Pn′-3′m′", (224, 115) => "P_In-3m", (225, 116) => "Fm-3m", (225, 117) => "Fm-3m1′", (225, 118) => "Fm′-3′m", (225, 119) => "Fm-3m′", (225, 120) => "Fm′-3′m′", (225, 121) => "F_Sm-3m", (226, 122) => "Fm-3c", (226, 123) => "Fm-3c1′", (226, 124) => "Fm′-3′c", (226, 125) => "Fm-3c′", (226, 126) => "Fm′-3′c′", (226, 127) => "F_Sm-3c", (227, 128) => "Fd-3m", (227, 129) => "Fd-3m1′", (227, 130) => "Fd′-3′m", (227, 131) => "Fd-3m′", (227, 132) => "Fd′-3′m′", (227, 133) => "F_Sd-3m", (228, 134) => "Fd-3c", (228, 135) => "Fd-3c1′", (228, 136) => "Fd′-3′c", (228, 137) => "Fd-3c′", (228, 138) => "Fd′-3′c′", (228, 139) => "F_Sd-3c", (229, 140) => "Im-3m", (229, 141) => "Im-3m1′", (229, 142) => "Im′-3′m", (229, 143) => "Im-3m′", (229, 144) => "Im′-3′m′", (230, 145) => "Ia-3d", (230, 146) => "Ia-3d1′", (230, 147) => "Ia′-3′d", (230, 148) => "Ia-3d′", (230, 149) => "Ia′-3′d′", ) # OG labels indexed by N₃ᴼᴳ of `MSG_BNS2OG_NUMs_D` (consecutively running numbering) const MSG_OG_LABELS_V = String[ "P1 # ", # 1 "P11′", # 2 "P_2s1", # 3 "P-1", # 4 "P-11′", # 5 "P-1′", # 6 "P_2s-1", # 7 "P2", # 8 "P21′", # 9 "P2′", # 10 "P_2a2", # 11 "P_2b2", # 12 "P_C2", # 13 "P_2b2′", # 14 "P2_1", # 15 "P2_11′", # 16 "P2_1′", # 17 "P_2a2_1", # 18 "C2", # 19 "C21′", # 20 "C2′", # 21 "C_2c2", # 22 "C_P2", # 23 "C_P2′", # 24 "Pm", # 25 "Pm1′", # 26 "Pm′", # 27 "P_2am", # 28 "P_2bm", # 29 "P_Cm", # 30 "P_2cm′", # 31 "Pc", # 32 "Pc1′", # 33 "Pc′", # 34 "P_2ac", # 35 "P_2bc", # 36 "P_Cc", # 37 "Cm", # 38 "Cm1′", # 39 "Cm′", # 40 "C_2cm", # 41 "C_Pm", # 42 "C_2cm′", # 43 "C_Pm′", # 44 "Cc", # 45 "Cc1′", # 46 "Cc′", # 47 "C_Pc", # 48 "P2/m", # 49 "P2/m1′", # 50 "P2′/m", # 51 "P2/m′", # 52 "P2′/m′", # 53 "P_2a2/m", # 54 "P_2b2/m", # 55 "P_C2/m", # 56 "P_2b2′/m", # 57 "P_2c2/m′", # 58 "P2_1/m", # 59 "P2_1/m1′", # 60 "P2_1′/m", # 61 "P2_1/m′", # 62 "P2_1′/m′", # 63 "P_2a2_1/m", # 64 "P_2c2_1/m′", # 65 "C2/m", # 66 "C2/m1′", # 67 "C2′/m", # 68 "C2/m′", # 69 "C2′/m′", # 70 "C_2c2/m", # 71 "C_P2/m", # 72 "C_2c2/m′", # 73 "C_P2′/m", # 74 "C_P2/m′", # 75 "C_P2′/m′", # 76 "P2/c", # 77 "P2/c1′", # 78 "P2′/c", # 79 "P2/c′", # 80 "P2′/c′", # 81 "P_2a2/c", # 82 "P_2b2/c", # 83 "P_C2/c", # 84 "P_2b2′/c", # 85 "P2_1/c", # 86 "P2_1/c1′", # 87 "P2_1′/c", # 88 "P2_1/c′", # 89 "P2_1′/c′", # 90 "P_2a2_1/c", # 91 "C2/c", # 92 "C2/c1′", # 93 "C2′/c", # 94 "C2/c′", # 95 "C2′/c′", # 96 "C_P2/c", # 97 "C_P2′/c", # 98 "P222", # 99 "P2221′", # 100 "P2′2′2", # 101 "P_2a222", # 102 "P_C222", # 103 "P_F222", # 104 "P_2c22′2′", # 105 "P222_1", # 106 "P222_11′", # 107 "P2′2′2_1", # 108 "P22′2_1′", # 109 "P_2a222_1", # 110 "P_C222_1", # 111 "P_2a2′2′2_1", # 112 "P2_12_12", # 113 "P2_12_121′", # 114 "P2_1′2_1′2", # 115 "P2_12_1′2′", # 116 "P_2c2_12_12", # 117 "P_2c2_12_1′2′", # 118 "P2_12_12_1", # 119 "P2_12_12_11′", # 120 "P2_1′2_1′2_1", # 121 "C222_1", # 122 "C222_11′", # 123 "C2′2′2_1", # 124 "C22′2_1′", # 125 "C_P222_1", # 126 "C_P2′2′2_1", # 127 "C_P22′2_1′", # 128 "C222", # 129 "C2221′", # 130 "C2′2′2", # 131 "C22′2′", # 132 "C_2c222", # 133 "C_P222", # 134 "C_I222", # 135 "C_2c22′2′", # 136 "C_P2′2′2", # 137 "C_P22′2′", # 138 "C_I2′22′", # 139 "F222", # 140 "F2221′", # 141 "F2′2′2", # 142 "F_C222", # 143 "F_C22′2′", # 144 "I222", # 145 "I2221′", # 146 "I2′2′2", # 147 "I_P222", # 148 "I_P2′2′2", # 149 "I2_12_12_1", # 150 "I2_12_12_11′", # 151 "I2_1′2_1′2_1", # 152 "I_P2_12_12_1", # 153 "I_P2_1′2_1′2_1", # 154 "Pmm2", # 155 "Pmm21′", # 156 "Pm′m2′", # 157 "Pm′m′2", # 158 "P_2cmm2", # 159 "P_2amm2", # 160 "P_Cmm2", # 161 "P_Amm2", # 162 "P_Fmm2", # 163 "P_2cmm′2′", # 164 "P_2cm′m′2", # 165 "P_2am′m′2", # 166 "P_Am′m′2", # 167 "Pmc2_1", # 168 "Pmc2_11′", # 169 "Pm′c2_1′", # 170 "Pmc′2_1′", # 171 "Pm′c′2_1", # 172 "P_2amc2_1", # 173 "P_2bmc2_1", # 174 "P_Cmc2_1", # 175 "P_2amc′2_1′", # 176 "P_2bm′c′2_1", # 177 "Pcc2", # 178 "Pcc21′", # 179 "Pc′c2′", # 180 "Pc′c′2", # 181 "P_2acc2", # 182 "P_Ccc2", # 183 "P_2bc′c2′", # 184 "Pma2", # 185 "Pma21′", # 186 "Pm′a2′", # 187 "Pma′2′", # 188 "Pm′a′2", # 189 "P_2bma2", # 190 "P_2cma2", # 191 "P_Ama2", # 192 "P_2bm′a2′", # 193 "P_2cm′a2′", # 194 "P_2cma′2′", # 195 "P_2cm′a′2", # 196 "P_Am′a′2", # 197 "Pca2_1", # 198 "Pca2_11′", # 199 "Pc′a2_1′", # 200 "Pca′2_1′", # 201 "Pc′a′2_1", # 202 "P_2bca2_1", # 203 "P_2bc′a′2_1", # 204 "Pnc2", # 205 "Pnc21′", # 206 "Pn′c2′", # 207 "Pnc′2′", # 208 "Pn′c′2", # 209 "P_2anc2", # 210 "P_2anc′2′", # 211 "Pmn2_1", # 212 "Pmn2_11′", # 213 "Pm′n2_1′", # 214 "Pmn′2_1′", # 215 "Pm′n′2_1", # 216 "P_2bmn2_1", # 217 "P_2bm′n2_1′", # 218 "Pba2", # 219 "Pba21′", # 220 "Pb′a2′", # 221 "Pb′a′2", # 222 "P_2cba2", # 223 "P_2cb′a2′", # 224 "P_2cb′a′2", # 225 "Pna2_1", # 226 "Pna2_11′", # 227 "Pn′a2_1′", # 228 "Pna′2_1′", # 229 "Pn′a′2_1", # 230 "Pnn2", # 231 "Pnn21′", # 232 "Pn′n2′", # 233 "Pn′n′2", # 234 "P_Fnn2", # 235 "Cmm2", # 236 "Cmm21′", # 237 "Cm′m2′", # 238 "Cm′m′2", # 239 "C_2cmm2", # 240 "C_Pmm2", # 241 "C_Imm2", # 242 "C_2cm′m2′", # 243 "C_2cm′m′2", # 244 "C_Pm′m2′", # 245 "C_Pm′m′2", # 246 "C_Im′m2′", # 247 "C_Im′m′2", # 248 "Cmc2_1", # 249 "Cmc2_11′", # 250 "Cm′c2_1′", # 251 "Cmc′2_1′", # 252 "Cm′c′2_1", # 253 "C_Pmc2_1", # 254 "C_Pm′c2_1′", # 255 "C_Pmc′2_1′", # 256 "C_Pm′c′2_1", # 257 "Ccc2", # 258 "Ccc21′", # 259 "Cc′c2′", # 260 "Cc′c′2", # 261 "C_Pcc2", # 262 "C_Pc′c2′", # 263 "C_Pc′c′2", # 264 "Amm2", # 265 "Amm21′", # 266 "Am′m2′", # 267 "Amm′2′", # 268 "Am′m′2", # 269 "A_2amm2", # 270 "A_Pmm2", # 271 "A_Imm2", # 272 "A_2amm′2′", # 273 "A_Pm′m2′", # 274 "A_Pmm′2′", # 275 "A_Pm′m′2", # 276 "A_Im′m′2", # 277 "Abm2", # 278 "Abm21′", # 279 "Ab′m2′", # 280 "Abm′2′", # 281 "Ab′m′2", # 282 "A_2abm2", # 283 "A_Pbm2", # 284 "A_Ibm2", # 285 "A_2ab′m′2", # 286 "A_Pb′m2′", # 287 "A_Pbm′2′", # 288 "A_Pb′m′2", # 289 "A_Ib′m′2", # 290 "Ama2", # 291 "Ama21′", # 292 "Am′a2′", # 293 "Ama′2′", # 294 "Am′a′2", # 295 "A_Pma2", # 296 "A_Pm′a2′", # 297 "A_Pma′2′", # 298 "A_Pm′a′2", # 299 "Aba2", # 300 "Aba21′", # 301 "Ab′a2′", # 302 "Aba′2′", # 303 "Ab′a′2", # 304 "A_Pba2", # 305 "A_Pb′a2′", # 306 "A_Pba′2′", # 307 "A_Pb′a′2", # 308 "Fmm2", # 309 "Fmm21′", # 310 "Fm′m2′", # 311 "Fm′m′2", # 312 "F_Cmm2", # 313 "F_Amm2", # 314 "F_Cmm′2′", # 315 "F_Cm′m′2", # 316 "F_Am′m2′", # 317 "F_Amm′2′", # 318 "F_Am′m′2", # 319 "Fdd2", # 320 "Fdd21′", # 321 "Fd′d2′", # 322 "Fd′d′2", # 323 "Imm2", # 324 "Imm21′", # 325 "Im′m2′", # 326 "Im′m′2", # 327 "I_Pmm2", # 328 "I_Pmm′2′", # 329 "I_Pm′m′2", # 330 "Iba2", # 331 "Iba21′", # 332 "Ib′a2′", # 333 "Ib′a′2", # 334 "I_Pba2", # 335 "I_Pba′2′", # 336 "I_Pb′a′2", # 337 "Ima2", # 338 "Ima21′", # 339 "Im′a2′", # 340 "Ima′2′", # 341 "Im′a′2", # 342 "I_Pma2", # 343 "I_Pm′a2′", # 344 "I_Pma′2′", # 345 "I_Pm′a′2", # 346 "Pmmm", # 347 "Pmmm1′", # 348 "Pm′mm", # 349 "Pm′m′m", # 350 "Pm′m′m′", # 351 "P_2ammm", # 352 "P_Cmmm", # 353 "P_Fmmm", # 354 "P_2ammm′", # 355 "P_2cm′m′m", # 356 "P_Cmmm′", # 357 "Pnnn", # 358 "Pnnn1′", # 359 "Pn′nn", # 360 "Pn′n′n", # 361 "Pn′n′n′", # 362 "P_Fnnn", # 363 "Pccm", # 364 "Pccm1′", # 365 "Pc′cm", # 366 "Pccm′", # 367 "Pc′c′m", # 368 "Pc′cm′", # 369 "Pc′c′m′", # 370 "P_2accm", # 371 "P_Cccm", # 372 "P_2accm′", # 373 "P_2ac′c′m", # 374 "P_2ac′c′m′", # 375 "P_Cccm′", # 376 "Pban", # 377 "Pban1′", # 378 "Pb′an", # 379 "Pban′", # 380 "Pb′a′n", # 381 "Pb′an′", # 382 "Pb′a′n′", # 383 "P_2cban", # 384 "P_2cb′an", # 385 "P_2cb′a′n", # 386 "Pmma", # 387 "Pmma1′", # 388 "Pm′ma", # 389 "Pmm′a", # 390 "Pmma′", # 391 "Pm′m′a", # 392 "Pmm′a′", # 393 "Pm′ma′", # 394 "Pm′m′a′", # 395 "P_2bmma", # 396 "P_2cmma", # 397 "P_Amma", # 398 "P_2bm′ma", # 399 "P_2bmma′", # 400 "P_2bm′ma′", # 401 "P_2cm′ma", # 402 "P_2cmm′a", # 403 "P_2cm′m′a", # 404 "P_Am′ma", # 405 "Pnna", # 406 "Pnna1′", # 407 "Pn′na", # 408 "Pnn′a", # 409 "Pnna′", # 410 "Pn′n′a", # 411 "Pnn′a′", # 412 "Pn′na′", # 413 "Pn′n′a′", # 414 "Pmna", # 415 "Pmna1′", # 416 "Pm′na", # 417 "Pmn′a", # 418 "Pmna′", # 419 "Pm′n′a", # 420 "Pmn′a′", # 421 "Pm′na′", # 422 "Pm′n′a′", # 423 "P_2bmna", # 424 "P_2bm′na", # 425 "P_2bmna′", # 426 "P_2bm′na′", # 427 "Pcca", # 428 "Pcca1′", # 429 "Pc′ca", # 430 "Pcc′a", # 431 "Pcca′", # 432 "Pc′c′a", # 433 "Pcc′a′", # 434 "Pc′ca′", # 435 "Pc′c′a′", # 436 "P_2bcca", # 437 "P_2bc′ca", # 438 "P_2bcca′", # 439 "P_2bc′ca′", # 440 "Pbam", # 441 "Pbam1′", # 442 "Pb′am", # 443 "Pbam′", # 444 "Pb′a′m", # 445 "Pb′am′", # 446 "Pb′a′m′", # 447 "P_2cbam", # 448 "P_2cb′am", # 449 "P_2cb′a′m", # 450 "Pccn", # 451 "Pccn1′", # 452 "Pc′cn", # 453 "Pccn′", # 454 "Pc′c′n", # 455 "Pc′cn′", # 456 "Pc′c′n′", # 457 "Pbcm", # 458 "Pbcm1′", # 459 "Pb′cm", # 460 "Pbc′m", # 461 "Pbcm′", # 462 "Pb′c′m", # 463 "Pbc′m′", # 464 "Pb′cm′", # 465 "Pb′c′m′", # 466 "P_2abcm", # 467 "P_2abc′m", # 468 "P_2abcm′", # 469 "P_2abc′m′", # 470 "Pnnm", # 471 "Pnnm1′", # 472 "Pn′nm", # 473 "Pnnm′", # 474 "Pn′n′m", # 475 "Pnn′m′", # 476 "Pn′n′m′", # 477 "Pmmn", # 478 "Pmmn1′", # 479 "Pm′mn", # 480 "Pmmn′", # 481 "Pm′m′n", # 482 "Pmm′n′", # 483 "Pm′m′n′", # 484 "P_2cmmn", # 485 "P_2cm′mn", # 486 "P_2cm′m′n", # 487 "Pbcn", # 488 "Pbcn1′", # 489 "Pb′cn", # 490 "Pbc′n", # 491 "Pbcn′", # 492 "Pb′c′n", # 493 "Pbc′n′", # 494 "Pb′cn′", # 495 "Pb′c′n′", # 496 "Pbca", # 497 "Pbca1′", # 498 "Pb′ca", # 499 "Pb′c′a", # 500 "Pb′c′a′", # 501 "Pnma", # 502 "Pnma1′", # 503 "Pn′ma", # 504 "Pnm′a", # 505 "Pnma′", # 506 "Pn′m′a", # 507 "Pnm′a′", # 508 "Pn′ma′", # 509 "Pn′m′a′", # 510 "Cmcm", # 511 "Cmcm1′", # 512 "Cm′cm", # 513 "Cmc′m", # 514 "Cmcm′", # 515 "Cm′c′m", # 516 "Cmc′m′", # 517 "Cm′cm′", # 518 "Cm′c′m′", # 519 "C_Pmcm", # 520 "C_Pm′cm", # 521 "C_Pmc′m", # 522 "C_Pmcm′", # 523 "C_Pm′c′m", # 524 "C_Pmc′m′", # 525 "C_Pm′cm′", # 526 "C_Pm′c′m′", # 527 "Cmca", # 528 "Cmca1′", # 529 "Cm′ca", # 530 "Cmc′a", # 531 "Cmca′", # 532 "Cm′c′a", # 533 "Cmc′a′", # 534 "Cm′ca′", # 535 "Cm′c′a′", # 536 "C_Pmca", # 537 "C_Pm′ca", # 538 "C_Pmc′a", # 539 "C_Pmca′", # 540 "C_Pm′c′a", # 541 "C_Pmc′a′", # 542 "C_Pm′ca′", # 543 "C_Pm′c′a′", # 544 "Cmmm", # 545 "Cmmm1′", # 546 "Cm′mm", # 547 "Cmmm′", # 548 "Cm′m′m", # 549 "Cmm′m′", # 550 "Cm′m′m′", # 551 "C_2cmmm", # 552 "C_Pmmm", # 553 "C_Immm", # 554 "C_2cm′m′m", # 555 "C_2cmm′m′", # 556 "C_Pm′mm", # 557 "C_Pmmm′", # 558 "C_Pm′m′m", # 559 "C_Pmm′m′", # 560 "C_Pm′m′m′", # 561 "C_Im′mm", # 562 "C_Im′m′m", # 563 "Cccm", # 564 "Cccm1′", # 565 "Cc′cm", # 566 "Cccm′", # 567 "Cc′c′m", # 568 "Ccc′m′", # 569 "Cc′c′m′", # 570 "C_Pccm", # 571 "C_Pc′cm", # 572 "C_Pccm′", # 573 "C_Pc′c′m", # 574 "C_Pcc′m′", # 575 "C_Pc′c′m′", # 576 "Cmma", # 577 "Cmma1′", # 578 "Cm′ma", # 579 "Cmma′", # 580 "Cm′m′a", # 581 "Cmm′a′", # 582 "Cm′m′a′", # 583 "C_2cmma", # 584 "C_Pmma", # 585 "C_Imma", # 586 "C_2cm′ma", # 587 "C_2cm′m′a", # 588 "C_Pm′ma", # 589 "C_Pmm′a", # 590 "C_Pmma′", # 591 "C_Imm′a", # 592 "C_Im′ma′", # 593 "Ccca", # 594 "Ccca1′", # 595 "Cc′ca", # 596 "Ccca′", # 597 "Cc′c′a", # 598 "Ccc′a′", # 599 "Cc′c′a′", # 600 "C_Pcca", # 601 "C_Pc′ca", # 602 "C_Pcca′", # 603 "C_Pcc′a′", # 604 "Fmmm", # 605 "Fmmm1′", # 606 "Fm′mm", # 607 "Fm′m′m", # 608 "Fm′m′m′", # 609 "F_Cmmm", # 610 "F_Cm′mm", # 611 "F_Cmmm′", # 612 "F_Cm′m′m", # 613 "F_Cmm′m′", # 614 "F_Cm′m′m′", # 615 "Fddd", # 616 "Fddd1′", # 617 "Fd′dd", # 618 "Fd′d′d", # 619 "Fd′d′d′", # 620 "Immm", # 621 "Immm1′", # 622 "Im′mm", # 623 "Im′m′m", # 624 "Im′m′m′", # 625 "I_Pmmm", # 626 "I_Pm′mm", # 627 "I_Pm′m′m", # 628 "I_Pm′m′m′", # 629 "Ibam", # 630 "Ibam1′", # 631 "Ib′am", # 632 "Ibam′", # 633 "Ib′a′m", # 634 "Iba′m′", # 635 "Ib′a′m′", # 636 "I_Pbam", # 637 "I_Pb′am", # 638 "I_Pbam′", # 639 "I_Pb′a′m", # 640 "I_Pb′am′", # 641 "I_Pb′a′m′", # 642 "Ibca", # 643 "Ibca1′", # 644 "Ib′ca", # 645 "Ib′c′a", # 646 "Ib′c′a′", # 647 "I_Pbca", # 648 "I_Pb′ca", # 649 "Imma", # 650 "Imma1′", # 651 "Im′ma", # 652 "Imma′", # 653 "Im′m′a", # 654 "Imm′a′", # 655 "Im′m′a′", # 656 "I_Pmma", # 657 "I_Pm′m′a", # 658 "I_Pmm′a′", # 659 "I_Pm′ma′", # 660 "P4", # 661 "P41′", # 662 "P4′", # 663 "P_2c4", # 664 "P_P4", # 665 "P_I4", # 666 "P_2c4′", # 667 "P4_1", # 668 "P4_11′", # 669 "P4_1′", # 670 "P_P4_1", # 671 "P4_2", # 672 "P4_21′", # 673 "P4_2′", # 674 "P_2c4_2", # 675 "P_P4_2", # 676 "P_I4_2", # 677 "P_2c4_2′", # 678 "P4_3", # 679 "P4_31′", # 680 "P4_3′", # 681 "P_P4_3", # 682 "I4", # 683 "I41′", # 684 "I4′", # 685 "I_P4", # 686 "I_P4′", # 687 "I4_1", # 688 "I4_11′", # 689 "I4_1′", # 690 "I_P4_1", # 691 "I_P4_1′", # 692 "P-4", # 693 "P-41′", # 694 "P-4′", # 695 "P_2c-4", # 696 "P_P-4", # 697 "P_I-4", # 698 "I-4", # 699 "I-41′", # 700 "I-4′", # 701 "I_P-4", # 702 "P4/m", # 703 "P4/m1′", # 704 "P4′/m", # 705 "P4/m′", # 706 "P4′/m′", # 707 "P_2c4/m", # 708 "P_P4/m", # 709 "P_I4/m", # 710 "P_2c4′/m", # 711 "P_P4/m′", # 712 "P4_2/m", # 713 "P4_2/m1′", # 714 "P4_2′/m", # 715 "P4_2/m′", # 716 "P4_2′/m′", # 717 "P_P4_2/m", # 718 "P_P4_2/m′", # 719 "P4/n", # 720 "P4/n1′", # 721 "P4′/n", # 722 "P4/n′", # 723 "P4′/n′", # 724 "P_2c4/n", # 725 "P_2c4′/n", # 726 "P4_2/n", # 727 "P4_2/n1′", # 728 "P4_2′/n", # 729 "P4_2/n′", # 730 "P4_2′/n′", # 731 "P_I4_2/n", # 732 "I4/m", # 733 "I4/m1′", # 734 "I4′/m", # 735 "I4/m′", # 736 "I4′/m′", # 737 "I_P4/m", # 738 "I_P4′/m", # 739 "I_P4/m′", # 740 "I_P4′/m′", # 741 "I4_1/a", # 742 "I4_1/a1′", # 743 "I4_1′/a", # 744 "I4_1/a′", # 745 "I4_1′/a′", # 746 "P422", # 747 "P4221′", # 748 "P4′22′", # 749 "P42′2′", # 750 "P4′2′2", # 751 "P_2c422", # 752 "P_P422", # 753 "P_I422", # 754 "P_2c4′22′", # 755 "P_P4′22′", # 756 "P42_12", # 757 "P42_121′", # 758 "P4′2_12′", # 759 "P42_1′2′", # 760 "P4′2_1′2", # 761 "P_2c42_12", # 762 "P_2c4′2_1′2", # 763 "P4_122", # 764 "P4_1221′", # 765 "P4_1′22′", # 766 "P4_12′2′", # 767 "P4_1′2′2", # 768 "P_P4_122", # 769 "P_P4_1′22′", # 770 "P4_12_12", # 771 "P4_12_121′", # 772 "P4_1′2_12′", # 773 "P4_12_1′2′", # 774 "P4_1′2_1′2", # 775 "P4_222", # 776 "P4_2221′", # 777 "P4_2′22′", # 778 "P4_22′2′", # 779 "P4_2′2′2", # 780 "P_2c4_222′", # 781 "P_P4_222", # 782 "P_I4_222′", # 783 "P_2c4_2′22", # 784 "P_P4_2′22′", # 785 "P4_22_12", # 786 "P4_22_121′", # 787 "P4_2′2_12′", # 788 "P4_22_1′2′", # 789 "P4_2′2_1′2", # 790 "P_2c4_22_12", # 791 "P_2c4_2′2_1′2", # 792 "P4_322", # 793 "P4_3221′", # 794 "P4_3′22′", # 795 "P4_32′2′", # 796 "P4_3′2′2", # 797 "P_P4_322", # 798 "P_P4_3′22′", # 799 "P4_32_12", # 800 "P4_32_121′", # 801 "P4_3′2_12′", # 802 "P4_32_1′2′", # 803 "P4_3′2_1′2", # 804 "I422", # 805 "I4221′", # 806 "I4′22′", # 807 "I42′2′", # 808 "I4′2′2", # 809 "I_P422", # 810 "I_P4′22′", # 811 "I_P42′2′", # 812 "I_P4′2′2", # 813 "I4_122", # 814 "I4_1221′", # 815 "I4_1′22′", # 816 "I4_12′2′", # 817 "I4_1′2′2", # 818 "I_P4_122", # 819 "I_P4_1′22′", # 820 "I_P4_12′2′", # 821 "I_P4_1′2′2", # 822 "P4mm", # 823 "P4mm1′", # 824 "P4′m′m", # 825 "P4′mm′", # 826 "P4m′m′", # 827 "P_2c4mm", # 828 "P_P4mm", # 829 "P_I4mm", # 830 "P_2c4′m′m", # 831 "P_2c4′mm′", # 832 "P_2c4m′m′", # 833 "P_P4′mm′", # 834 "P_I4m′m′", # 835 "P4bm", # 836 "P4bm1′", # 837 "P4′b′m", # 838 "P4′bm′", # 839 "P4b′m′", # 840 "P_2c4bm", # 841 "P_2c4′b′m", # 842 "P_2c4′bm′", # 843 "P_2c4b′m′", # 844 "P4_2cm", # 845 "P4_2cm1′", # 846 "P4_2′c′m", # 847 "P4_2′cm′", # 848 "P4_2c′m′", # 849 "P_P4_2cm", # 850 "P_P4_2′cm′", # 851 "P4_2nm", # 852 "P4_2nm1′", # 853 "P4_2′n′m", # 854 "P4_2′nm′", # 855 "P4_2n′m′", # 856 "P_I4_2nm", # 857 "P_I4_2n′m′", # 858 "P4cc", # 859 "P4cc1′", # 860 "P4′c′c", # 861 "P4′cc′", # 862 "P4c′c′", # 863 "P_P4cc", # 864 "P_P4′cc′", # 865 "P4nc", # 866 "P4nc1′", # 867 "P4′n′c", # 868 "P4′nc′", # 869 "P4n′c′", # 870 "P4_2mc", # 871 "P4_2mc1′", # 872 "P4_2′m′c", # 873 "P4_2′mc′", # 874 "P4_2m′c′", # 875 "P_P4_2mc", # 876 "P_P4_2′mc′", # 877 "P4_2bc", # 878 "P4_2bc1′", # 879 "P4_2′b′c", # 880 "P4_2′bc′", # 881 "P4_2b′c′", # 882 "I4mm", # 883 "I4mm1′", # 884 "I4′m′m", # 885 "I4′mm′", # 886 "I4m′m′", # 887 "I_P4mm", # 888 "I_P4′m′m", # 889 "I_P4′mm′", # 890 "I_P4m′m′", # 891 "I4cm", # 892 "I4cm1′", # 893 "I4′c′m", # 894 "I4′cm′", # 895 "I4c′m′", # 896 "I_P4cm", # 897 "I_P4′c′m", # 898 "I_P4′cm′", # 899 "I_P4c′m′", # 900 "I4_1md", # 901 "I4_1md1′", # 902 "I4_1′m′d", # 903 "I4_1′md′", # 904 "I4_1m′d′", # 905 "I4_1cd", # 906 "I4_1cd1′", # 907 "I4_1′c′d", # 908 "I4_1′cd′", # 909 "I4_1c′d′", # 910 "P-42m", # 911 "P-42m1′", # 912 "P-4′2′m", # 913 "P-4′2m′", # 914 "P-42′m′", # 915 "P_2c-42m", # 916 "P_P-42m", # 917 "P_I-42m", # 918 "P_2c-42′m′", # 919 "P_P-4′2m′", # 920 "P_I-4′2m′", # 921 "P-42c", # 922 "P-42c1′", # 923 "P-4′2′c", # 924 "P-4′2c′", # 925 "P-42′c′", # 926 "P_P-42c", # 927 "P_P-4′2c′", # 928 "P-42_1m", # 929 "P-42_1m1′", # 930 "P-4′2_1′m", # 931 "P-4′2_1m′", # 932 "P-42_1′m′", # 933 "P_2c-42_1m", # 934 "P_2c-4′2_1m′", # 935 "P-42_1c", # 936 "P-42_1c1′", # 937 "P-4′2_1′c", # 938 "P-4′2_1c′", # 939 "P-42_1′c′", # 940 "P-4m2", # 941 "P-4m21′", # 942 "P-4′m′2", # 943 "P-4′m2′", # 944 "P-4m′2′", # 945 "P_2c-4m2", # 946 "P_P-4m2", # 947 "P_I-4m2", # 948 "P_2c-4′m′2", # 949 "P_P-4′m2′", # 950 "P-4c2", # 951 "P-4c21′", # 952 "P-4′c′2", # 953 "P-4′c2′", # 954 "P-4c′2′", # 955 "P_P-4c2", # 956 "P_P-4′c2′", # 957 "P-4b2", # 958 "P-4b21′", # 959 "P-4′b′2", # 960 "P-4′b2′", # 961 "P-4b′2′", # 962 "P_2c-4b2", # 963 "P_2c-4′b′2", # 964 "P-4n2", # 965 "P-4n21′", # 966 "P-4′n′2", # 967 "P-4′n2′", # 968 "P-4n′2′", # 969 "P_I-4n2", # 970 "I-4m2", # 971 "I-4m21′", # 972 "I-4′m′2", # 973 "I-4′m2′", # 974 "I-4m′2′", # 975 "I_P-4m2", # 976 "I_P-4′m′2", # 977 "I-4c2", # 978 "I-4c21′", # 979 "I-4′c′2", # 980 "I-4′c2′", # 981 "I-4c′2′", # 982 "I_P-4c2", # 983 "I_P-4c′2′", # 984 "I-42m", # 985 "I-42m1′", # 986 "I-4′2′m", # 987 "I-4′2m′", # 988 "I-42′m′", # 989 "I_P-42m", # 990 "I_P-4′2′m", # 991 "I_P-4′2m′", # 992 "I_P-42′m′", # 993 "I-42d", # 994 "I-42d1′", # 995 "I-4′2′d", # 996 "I-4′2d′", # 997 "I-42′d′", # 998 "P4/mmm", # 999 "P4/mmm1′", # 1000 "P4/m′mm", # 1001 "P4′/mm′m", # 1002 "P4′/mmm′", # 1003 "P4′/m′m′m", # 1004 "P4/mm′m′", # 1005 "P4′/m′mm′", # 1006 "P4/m′m′m′", # 1007 "P_2c4/mmm", # 1008 "P_P4/mmm", # 1009 "P_I4/mmm", # 1010 "P_2c4′/mm′m", # 1011 "P_2c4′/mmm′", # 1012 "P_2c4/mm′m′", # 1013 "P_P4/m′mm", # 1014 "P_P4′/mmm′", # 1015 "P_P4′/m′mm′", # 1016 "P_I4/mm′m′", # 1017 "P4/mcc", # 1018 "P4/mcc1′", # 1019 "P4/m′cc", # 1020 "P4′/mc′c", # 1021 "P4′/mcc′", # 1022 "P4′/m′c′c", # 1023 "P4/mc′c′", # 1024 "P4′/m′cc′", # 1025 "P4/m′c′c′", # 1026 "P_P4/mcc", # 1027 "P_P4/m′cc", # 1028 "P_P4′/mcc′", # 1029 "P_P4′/m′cc′", # 1030 "P4/nbm", # 1031 "P4/nbm1′", # 1032 "P4/n′bm", # 1033 "P4′/nb′m", # 1034 "P4′/nbm′", # 1035 "P4′/n′b′m", # 1036 "P4/nb′m′", # 1037 "P4′/n′bm′", # 1038 "P4/n′b′m′", # 1039 "P_2c4/nbm", # 1040 "P_2c4′/nb′m", # 1041 "P_2c4′/nbm′", # 1042 "P_2c4/nb′m′", # 1043 "P4/nnc", # 1044 "P4/nnc1′", # 1045 "P4/n′nc", # 1046 "P4′/nn′c", # 1047 "P4′/nnc′", # 1048 "P4′/n′n′c", # 1049 "P4/nn′c′", # 1050 "P4′/n′nc′", # 1051 "P4/n′n′c′", # 1052 "P4/mbm", # 1053 "P4/mbm1′", # 1054 "P4/m′bm", # 1055 "P4′/mb′m", # 1056 "P4′/mbm′", # 1057 "P4′/m′b′m", # 1058 "P4/mb′m′", # 1059 "P4′/m′bm′", # 1060 "P4/m′b′m′", # 1061 "P_2c4/mbm", # 1062 "P_2c4′/mb′m", # 1063 "P_2c4′/mbm′", # 1064 "P_2c4/mb′m′", # 1065 "P4/mnc", # 1066 "P4/mnc1′", # 1067 "P4/m′nc", # 1068 "P4′/mn′c", # 1069 "P4′/mnc′", # 1070 "P4′/m′n′c", # 1071 "P4/mn′c′", # 1072 "P4′/m′nc′", # 1073 "P4/m′n′c′", # 1074 "P4/nmm", # 1075 "P4/nmm1′", # 1076 "P4/n′mm", # 1077 "P4′/nm′m", # 1078 "P4′/nmm′", # 1079 "P4′/n′m′m", # 1080 "P4/nm′m′", # 1081 "P4′/n′mm′", # 1082 "P4/n′m′m′", # 1083 "P_2c4/nmm", # 1084 "P_2c4′/nm′m", # 1085 "P_2c4′/nmm′", # 1086 "P_2c4/nm′m′", # 1087 "P4/ncc", # 1088 "P4/ncc1′", # 1089 "P4/n′cc", # 1090 "P4′/nc′c", # 1091 "P4′/ncc′", # 1092 "P4′/n′c′c", # 1093 "P4/nc′c′", # 1094 "P4′/n′cc′", # 1095 "P4/n′c′c′", # 1096 "P4_2/mmc", # 1097 "P4_2/mmc1′", # 1098 "P4_2/m′mc", # 1099 "P4_2′/mm′c", # 1100 "P4_2′/mmc′", # 1101 "P4_2′/m′m′c", # 1102 "P4_2/mm′c′", # 1103 "P4_2′/m′mc′", # 1104 "P4_2/m′m′c′", # 1105 "P_P4_2/mmc", # 1106 "P_P4_2/m′mc", # 1107 "P_P4_2/mm′c′", # 1108 "P_P4_2′/m′mc′", # 1109 "P4_2/mcm", # 1110 "P4_2/mcm1′", # 1111 "P4_2/m′cm", # 1112 "P4_2′/mc′m", # 1113 "P4_2′/mcm′", # 1114 "P4_2′/m′c′m", # 1115 "P4_2/mc′m′", # 1116 "P4_2′/m′cm′", # 1117 "P4_2/m′c′m′", # 1118 "P_P4_2/mcm", # 1119 "P_P4_2/m′cm", # 1120 "P_P4_2′/mcm′", # 1121 "P_P4_2′/m′cm′", # 1122 "P4_2/nbc", # 1123 "P4_2/nbc1′", # 1124 "P4_2/n′bc", # 1125 "P4_2′/nb′c", # 1126 "P4_2′/nbc′", # 1127 "P4_2′/n′b′c", # 1128 "P4_2/nb′c′", # 1129 "P4_2′/n′bc′", # 1130 "P4_2/n′b′c′", # 1131 "P4_2/nnm", # 1132 "P4_2/nnm1′", # 1133 "P4_2/n′nm", # 1134 "P4_2′/nn′m", # 1135 "P4_2′/nnm′", # 1136 "P4_2′/n′n′m", # 1137 "P4_2/nn′m′", # 1138 "P4_2′/n′nm′", # 1139 "P4_2/n′n′m′", # 1140 "P_I4_2/nnm", # 1141 "P_I4_2/nn′m′", # 1142 "P4_2/mbc", # 1143 "P4_2/mbc1′", # 1144 "P4_2/m′bc", # 1145 "P4_2′/mb′c", # 1146 "P4_2′/mbc′", # 1147 "P4_2′/m′b′c", # 1148 "P4_2/mb′c′", # 1149 "P4_2′/m′bc′", # 1150 "P4_2/m′b′c′", # 1151 "P4_2/mnm", # 1152 "P4_2/mnm1′", # 1153 "P4_2/m′nm", # 1154 "P4_2′/mn′m", # 1155 "P4_2′/mnm′", # 1156 "P4_2′/m′n′m", # 1157 "P4_2/mn′m′", # 1158 "P4_2′/m′nm′", # 1159 "P4_2/m′n′m′", # 1160 "P4_2/nmc", # 1161 "P4_2/nmc1′", # 1162 "P4_2/n′mc", # 1163 "P4_2′/nm′c", # 1164 "P4_2′/nmc′", # 1165 "P4_2′/n′m′c", # 1166 "P4_2/nm′c′", # 1167 "P4_2′/n′mc′", # 1168 "P4_2/n′m′c′", # 1169 "P4_2/ncm", # 1170 "P4_2/ncm1′", # 1171 "P4_2/n′cm", # 1172 "P4_2′/nc′m", # 1173 "P4_2′/ncm′", # 1174 "P4_2′/n′c′m", # 1175 "P4_2/nc′m′", # 1176 "P4_2′/n′cm′", # 1177 "P4_2/n′c′m′", # 1178 "I4/mmm", # 1179 "I4/mmm1′", # 1180 "I4/m′mm", # 1181 "I4′/mm′m", # 1182 "I4′/mmm′", # 1183 "I4′/m′m′m", # 1184 "I4/mm′m′", # 1185 "I4′/m′mm′", # 1186 "I4/m′m′m′", # 1187 "I_P4/mmm", # 1188 "I_P4/m′mm", # 1189 "I_P4′/mm′m", # 1190 "I_P4′/mmm′", # 1191 "I_P4′/m′m′m", # 1192 "I_P4/mm′m′", # 1193 "I_P4′/m′mm′", # 1194 "I_P4/m′m′m′", # 1195 "I4/mcm", # 1196 "I4/mcm1′", # 1197 "I4/m′cm", # 1198 "I4′/mc′m", # 1199 "I4′/mcm′", # 1200 "I4′/m′c′m", # 1201 "I4/mc′m′", # 1202 "I4′/m′cm′", # 1203 "I4/m′c′m′", # 1204 "I_P4/mcm", # 1205 "I_P4/m′cm", # 1206 "I_P4′/mc′m", # 1207 "I_P4′/mcm′", # 1208 "I_P4′/m′c′m", # 1209 "I_P4/mc′m′", # 1210 "I_P4′/m′cm′", # 1211 "I_P4/m′c′m′", # 1212 "I4_1/amd", # 1213 "I4_1/amd1′", # 1214 "I4_1/a′md", # 1215 "I4_1′/am′d", # 1216 "I4_1′/amd′", # 1217 "I4_1′/a′m′d", # 1218 "I4_1/am′d′", # 1219 "I4_1′/a′md′", # 1220 "I4_1/a′m′d′", # 1221 "I4_1/acd", # 1222 "I4_1/acd1′", # 1223 "I4_1/a′cd", # 1224 "I4_1′/ac′d", # 1225 "I4_1′/acd′", # 1226 "I4_1′/a′c′d", # 1227 "I4_1/ac′d′", # 1228 "I4_1′/a′cd′", # 1229 "I4_1/a′c′d′", # 1230 "P3", # 1231 "P31′", # 1232 "P_2c3", # 1233 "P3_1", # 1234 "P3_11′", # 1235 "P_2c3_2", # 1236 "P3_2", # 1237 "P3_21′", # 1238 "P_2c3_1", # 1239 "R3", # 1240 "R31′", # 1241 "R_R3", # 1242 "P-3", # 1243 "P-31′", # 1244 "P-3′", # 1245 "P_2c-3", # 1246 "R-3", # 1247 "R-31′", # 1248 "R-3′", # 1249 "R_R-3", # 1250 "P312", # 1251 "P3121′", # 1252 "P312′", # 1253 "P_2c312", # 1254 "P321", # 1255 "P3211′", # 1256 "P32′1", # 1257 "P_2c321", # 1258 "P3_112", # 1259 "P3_1121′", # 1260 "P3_112′", # 1261 "P_2c3_212", # 1262 "P3_121", # 1263 "P3_1211′", # 1264 "P3_12′1", # 1265 "P_2c3_221", # 1266 "P3_212", # 1267 "P3_2121′", # 1268 "P3_212′", # 1269 "P_2c3_112′", # 1270 "P3_221", # 1271 "P3_2211′", # 1272 "P3_22′1", # 1273 "P_2c3_12′1", # 1274 "R32", # 1275 "R321′", # 1276 "R32′", # 1277 "R_R32", # 1278 "P3m1", # 1279 "P3m11′", # 1280 "P3m′1", # 1281 "P_2c3m1", # 1282 "P_2c3m′1", # 1283 "P31m", # 1284 "P31m1′", # 1285 "P31m′", # 1286 "P_2c31m", # 1287 "P_2c31m′", # 1288 "P3c1", # 1289 "P3c11′", # 1290 "P3c′1", # 1291 "P31c", # 1292 "P31c1′", # 1293 "P31c′", # 1294 "R3m", # 1295 "R3m1′", # 1296 "R3m′", # 1297 "R_R3m", # 1298 "R_R3m′", # 1299 "R3c", # 1300 "R3c1′", # 1301 "R3c′", # 1302 "P-31m", # 1303 "P-31m1′", # 1304 "P-3′1m", # 1305 "P-3′1m′", # 1306 "P-31m′", # 1307 "P_2c-31m", # 1308 "P_2c-31m′", # 1309 "P-31c", # 1310 "P-31c1′", # 1311 "P-3′1c", # 1312 "P-3′1c′", # 1313 "P-31c′", # 1314 "P-3m1", # 1315 "P-3m11′", # 1316 "P-3′m1", # 1317 "P-3′m′1", # 1318 "P-3m′1", # 1319 "P_2c-3m1", # 1320 "P_2c-3m′1", # 1321 "P-3c1", # 1322 "P-3c11′", # 1323 "P-3′c1", # 1324 "P-3′c′1", # 1325 "P-3c′1", # 1326 "R-3m", # 1327 "R-3m1′", # 1328 "R-3′m", # 1329 "R-3′m′", # 1330 "R-3m′", # 1331 "R_R-3m", # 1332 "R_R-3m′", # 1333 "R-3c", # 1334 "R-3c1′", # 1335 "R-3′c", # 1336 "R-3′c′", # 1337 "R-3c′", # 1338 "P6", # 1339 "P61′", # 1340 "P6′", # 1341 "P_2c6", # 1342 "P_2c6′", # 1343 "P6_1", # 1344 "P6_11′", # 1345 "P6_1′", # 1346 "P6_5", # 1347 "P6_51′", # 1348 "P6_5′", # 1349 "P6_2", # 1350 "P6_21′", # 1351 "P6_2′", # 1352 "P_2c6_2", # 1353 "P_2c6_2′", # 1354 "P6_4", # 1355 "P6_41′", # 1356 "P6_4′", # 1357 "P_2c6_4", # 1358 "P_2c6_4′", # 1359 "P6_3", # 1360 "P6_31′", # 1361 "P6_3′", # 1362 "P-6", # 1363 "P-61′", # 1364 "P-6′", # 1365 "P_2c-6", # 1366 "P6/m", # 1367 "P6/m1′", # 1368 "P6′/m", # 1369 "P6/m′", # 1370 "P6′/m′", # 1371 "P_2c6/m", # 1372 "P_2c6′/m", # 1373 "P6_3/m", # 1374 "P6_3/m1′", # 1375 "P6_3′/m", # 1376 "P6_3/m′", # 1377 "P6_3′/m′", # 1378 "P622", # 1379 "P6221′", # 1380 "P6′2′2", # 1381 "P6′22′", # 1382 "P62′2′", # 1383 "P_2c622", # 1384 "P_2c6′22′", # 1385 "P6_122", # 1386 "P6_1221′", # 1387 "P6_1′2′2", # 1388 "P6_1′22′", # 1389 "P6_12′2′", # 1390 "P6_522", # 1391 "P6_5221′", # 1392 "P6_5′2′2", # 1393 "P6_5′22′", # 1394 "P6_52′2′", # 1395 "P6_222", # 1396 "P6_2221′", # 1397 "P6_2′2′2", # 1398 "P6_2′22′", # 1399 "P6_22′2′", # 1400 "P_2c6_222′", # 1401 "P_2c6_2′22", # 1402 "P6_422", # 1403 "P6_4221′", # 1404 "P6_4′2′2", # 1405 "P6_4′22′", # 1406 "P6_42′2′", # 1407 "P_2c6_422′", # 1408 "P_2c6_4′2′2′", # 1409 "P6_322", # 1410 "P6_3221′", # 1411 "P6_3′2′2", # 1412 "P6_3′22′", # 1413 "P6_32′2′", # 1414 "P6mm", # 1415 "P6mm1′", # 1416 "P6′m′m", # 1417 "P6′mm′", # 1418 "P6m′m′", # 1419 "P_2c6mm", # 1420 "P_2c6′m′m", # 1421 "P_2c6′mm′", # 1422 "P_2c6m′m′", # 1423 "P6cc", # 1424 "P6cc1′", # 1425 "P6′c′c", # 1426 "P6′cc′", # 1427 "P6c′c′", # 1428 "P6_3cm", # 1429 "P6_3cm1′", # 1430 "P6_3′c′m", # 1431 "P6_3′cm′", # 1432 "P6_3c′m′", # 1433 "P6_3mc", # 1434 "P6_3mc1′", # 1435 "P6_3′m′c", # 1436 "P6_3′mc′", # 1437 "P6_3m′c′", # 1438 "P-6m2", # 1439 "P-6m21′", # 1440 "P-6′m′2", # 1441 "P-6′m2′", # 1442 "P-6m′2′", # 1443 "P_2c-6m2", # 1444 "P_2c-6′m′2", # 1445 "P-6c2", # 1446 "P-6c21′", # 1447 "P-6′c′2", # 1448 "P-6′c2′", # 1449 "P-6c′2′", # 1450 "P-62m", # 1451 "P-62m1′", # 1452 "P-6′2′m", # 1453 "P-6′2m′", # 1454 "P-62′m′", # 1455 "P_2c-62m", # 1456 "P_2c-6′2m′", # 1457 "P-62c", # 1458 "P-62c1′", # 1459 "P-6′2′c", # 1460 "P-6′2c′", # 1461 "P-62′c′", # 1462 "P6/mmm", # 1463 "P6/mmm1′", # 1464 "P6/m′mm", # 1465 "P6′/mm′m", # 1466 "P6′/mmm′", # 1467 "P6′/m′m′m", # 1468 "P6′/m′mm′", # 1469 "P6/mm′m′", # 1470 "P6/m′m′m′", # 1471 "P_2c6/mmm", # 1472 "P_2c6′/mm′m", # 1473 "P_2c6′/mmm′", # 1474 "P_2c6/mm′m′", # 1475 "P6/mcc", # 1476 "P6/mcc1′", # 1477 "P6/m′cc", # 1478 "P6′/mc′c", # 1479 "P6′/mcc′", # 1480 "P6′/m′c′c", # 1481 "P6′/m′cc′", # 1482 "P6/mc′c′", # 1483 "P6/m′c′c′", # 1484 "P6_3/mcm", # 1485 "P6_3/mcm1′", # 1486 "P6_3/m′cm", # 1487 "P6_3′/mc′m", # 1488 "P6_3′/mcm′", # 1489 "P6_3′/m′c′m", # 1490 "P6_3′/m′cm′", # 1491 "P6_3/mc′m′", # 1492 "P6_3/m′c′m′", # 1493 "P6_3/mmc", # 1494 "P6_3/mmc1′", # 1495 "P6_3/m′mc", # 1496 "P6_3′/mm′c", # 1497 "P6_3′/mmc′", # 1498 "P6_3′/m′m′c", # 1499 "P6_3′/m′mc′", # 1500 "P6_3/mm′c′", # 1501 "P6_3/m′m′c′", # 1502 "P23", # 1503 "P231′", # 1504 "P_F23", # 1505 "F23", # 1506 "F231′", # 1507 "I23", # 1508 "I231′", # 1509 "I_P23", # 1510 "P2_13", # 1511 "P2_131′", # 1512 "I2_13", # 1513 "I2_131′", # 1514 "I_P2_13", # 1515 "Pm-3", # 1516 "Pm-31′", # 1517 "Pm′-3′", # 1518 "P_Fm-3", # 1519 "Pn-3", # 1520 "Pn-31′", # 1521 "Pn′-3′", # 1522 "P_Fn-3", # 1523 "Fm-3", # 1524 "Fm-31′", # 1525 "Fm′-3′", # 1526 "Fd-3", # 1527 "Fd-31′", # 1528 "Fd′-3′", # 1529 "Im-3", # 1530 "Im-31′", # 1531 "Im′-3′", # 1532 "I_Pm-3", # 1533 "I_Pm′-3′", # 1534 "Pa-3", # 1535 "Pa-31′", # 1536 "Pa′-3′", # 1537 "Ia-3", # 1538 "Ia-31′", # 1539 "Ia′-3′", # 1540 "I_Pa-3′", # 1541 "P432", # 1542 "P4321′", # 1543 "P4′32′", # 1544 "P_F432", # 1545 "P4_232", # 1546 "P4_2321′", # 1547 "P4_2′32′", # 1548 "P_F4_232", # 1549 "F432", # 1550 "F4321′", # 1551 "F4′32′", # 1552 "F4_132", # 1553 "F4_1321′", # 1554 "F4_1′32′", # 1555 "I432", # 1556 "I4321′", # 1557 "I4′32′", # 1558 "I_P432", # 1559 "I_P4′32′", # 1560 "P4_332", # 1561 "P4_3321′", # 1562 "P4_3′32′", # 1563 "P4_132", # 1564 "P4_1321′", # 1565 "P4_1′32′", # 1566 "I4_132", # 1567 "I4_1321′", # 1568 "I4_1′32′", # 1569 "I_P4_132", # 1570 "I_P4_1′32′", # 1571 "P-43m", # 1572 "P-43m1′", # 1573 "P-4′3m′", # 1574 "P_F-43m", # 1575 "P_F-4′3m′", # 1576 "F-43m", # 1577 "F-43m1′", # 1578 "F-4′3m′", # 1579 "I-43m", # 1580 "I-43m1′", # 1581 "I-4′3m′", # 1582 "I_P-43m", # 1583 "I_P-4′3m′", # 1584 "P-43n", # 1585 "P-43n1′", # 1586 "P-4′3n′", # 1587 "F-43c", # 1588 "F-43c1′", # 1589 "F-4′3c′", # 1590 "I-43d", # 1591 "I-43d1′", # 1592 "I-4′3d′", # 1593 "Pm-3m", # 1594 "Pm-3m1′", # 1595 "Pm′-3′m", # 1596 "Pm-3m′", # 1597 "Pm′-3′m′", # 1598 "P_Fm-3m", # 1599 "P_Fm-3m′", # 1600 "Pn-3n", # 1601 "Pn-3n1′", # 1602 "Pn′-3′n", # 1603 "Pn-3n′", # 1604 "Pn′-3′n′", # 1605 "Pm-3n", # 1606 "Pm-3n1′", # 1607 "Pm′-3′n", # 1608 "Pm-3n′", # 1609 "Pm′-3′n′", # 1610 "Pn-3m", # 1611 "Pn-3m1′", # 1612 "Pn′-3′m", # 1613 "Pn-3m′", # 1614 "Pn′-3′m′", # 1615 "P_Fn-3m", # 1616 "P_Fn-3m′", # 1617 "Fm-3m", # 1618 "Fm-3m1′", # 1619 "Fm′-3′m", # 1620 "Fm-3m′", # 1621 "Fm′-3′m′", # 1622 "Fm-3c", # 1623 "Fm-3c1′", # 1624 "Fm′-3′c", # 1625 "Fm-3c′", # 1626 "Fm′-3′c′", # 1627 "Fd-3m", # 1628 "Fd-3m1′", # 1629 "Fd′-3′m", # 1630 "Fd-3m′", # 1631 "Fd′-3′m′", # 1632 "Fd-3c", # 1633 "Fd-3c1′", # 1634 "Fd′-3′c", # 1635 "Fd-3c′", # 1636 "Fd′-3′c′", # 1637 "Im-3m", # 1638 "Im-3m1′", # 1639 "Im′-3′m", # 1640 "Im-3m′", # 1641 "Im′-3′m′", # 1642 "I_Pm-3m", # 1643 "I_Pm′-3′m", # 1644 "I_Pm-3m′", # 1645 "I_Pm′-3′m′", # 1646 "Ia-3d", # 1647 "Ia-3d1′", # 1648 "Ia′-3′d", # 1649 "Ia-3d′", # 1650 "Ia′-3′d′" # 1651 ] # mapping from BNS numbering N₁ᴮᴺˢ.N₂ᴮᴺˢ to OG numbering N₁ᴼᴳ.N₂ᴼᴳ.N₃ᴼᴳ const MSG_BNS2OG_NUMs_D = Dict{Tuple{Int, Int}, Tuple{Int, Int, Int}}( #(N₁ᴮᴺˢ, N₂ᴮᴺˢ) => (N₁ᴼᴳ, N₂ᴼᴳ, N₃ᴼᴳ) (1, 1) => (1, 1, 1), (1, 2) => (1, 2, 2), (1, 3) => (1, 3, 3), (2, 4) => (2, 1, 4), (2, 5) => (2, 2, 5), (2, 6) => (2, 3, 6), (2, 7) => (2, 4, 7), (3, 1) => (3, 1, 8), (3, 2) => (3, 2, 9), (3, 3) => (3, 3, 10), (3, 4) => (3, 4, 11), (3, 5) => (3, 5, 12), (3, 6) => (5, 5, 23), (4, 7) => (4, 1, 15), (4, 8) => (4, 2, 16), (4, 9) => (4, 3, 17), (4, 10) => (4, 4, 18), (4, 11) => (3, 7, 14), (4, 12) => (5, 6, 24), (5, 13) => (5, 1, 19), (5, 14) => (5, 2, 20), (5, 15) => (5, 3, 21), (5, 16) => (5, 4, 22), (5, 17) => (3, 6, 13), (6, 18) => (6, 1, 25), (6, 19) => (6, 2, 26), (6, 20) => (6, 3, 27), (6, 21) => (6, 4, 28), (6, 22) => (6, 5, 29), (6, 23) => (8, 5, 42), (7, 24) => (7, 1, 32), (7, 25) => (7, 2, 33), (7, 26) => (7, 3, 34), (7, 27) => (7, 4, 35), (7, 28) => (6, 7, 31), (7, 29) => (7, 5, 36), (7, 30) => (9, 4, 48), (7, 31) => (8, 7, 44), (8, 32) => (8, 1, 38), (8, 33) => (8, 2, 39), (8, 34) => (8, 3, 40), (8, 35) => (8, 4, 41), (8, 36) => (6, 6, 30), (9, 37) => (9, 1, 45), (9, 38) => (9, 2, 46), (9, 39) => (9, 3, 47), (9, 40) => (8, 6, 43), (9, 41) => (7, 6, 37), (10, 42) => (10, 1, 49), (10, 43) => (10, 2, 50), (10, 44) => (10, 3, 51), (10, 45) => (10, 4, 52), (10, 46) => (10, 5, 53), (10, 47) => (10, 6, 54), (10, 48) => (10, 7, 55), (10, 49) => (12, 7, 72), (11, 50) => (11, 1, 59), (11, 51) => (11, 2, 60), (11, 52) => (11, 3, 61), (11, 53) => (11, 4, 62), (11, 54) => (11, 5, 63), (11, 55) => (11, 6, 64), (11, 56) => (10, 9, 57), (11, 57) => (12, 9, 74), (12, 58) => (12, 1, 66), (12, 59) => (12, 2, 67), (12, 60) => (12, 3, 68), (12, 61) => (12, 4, 69), (12, 62) => (12, 5, 70), (12, 63) => (12, 6, 71), (12, 64) => (10, 8, 56), (13, 65) => (13, 1, 77), (13, 66) => (13, 2, 78), (13, 67) => (13, 3, 79), (13, 68) => (13, 4, 80), (13, 69) => (13, 5, 81), (13, 70) => (13, 6, 82), (13, 71) => (13, 7, 83), (13, 72) => (10, 10, 58), (13, 73) => (12, 10, 75), (13, 74) => (15, 6, 97), (14, 75) => (14, 1, 86), (14, 76) => (14, 2, 87), (14, 77) => (14, 3, 88), (14, 78) => (14, 4, 89), (14, 79) => (14, 5, 90), (14, 80) => (14, 6, 91), (14, 81) => (13, 9, 85), (14, 82) => (11, 7, 65), (14, 83) => (12, 11, 76), (14, 84) => (15, 7, 98), (15, 85) => (15, 1, 92), (15, 86) => (15, 2, 93), (15, 87) => (15, 3, 94), (15, 88) => (15, 4, 95), (15, 89) => (15, 5, 96), (15, 90) => (12, 8, 73), (15, 91) => (13, 8, 84), (16, 1) => (16, 1, 99), (16, 2) => (16, 2, 100), (16, 3) => (16, 3, 101), (16, 4) => (16, 4, 102), (16, 5) => (21, 6, 134), (16, 6) => (23, 4, 148), (17, 7) => (17, 1, 106), (17, 8) => (17, 2, 107), (17, 9) => (17, 3, 108), (17, 10) => (17, 4, 109), (17, 11) => (17, 5, 110), (17, 12) => (16, 7, 105), (17, 13) => (21, 10, 138), (17, 14) => (20, 5, 126), (17, 15) => (24, 5, 154), (18, 16) => (18, 1, 113), (18, 17) => (18, 2, 114), (18, 18) => (18, 3, 115), (18, 19) => (18, 4, 116), (18, 20) => (17, 7, 112), (18, 21) => (18, 5, 117), (18, 22) => (20, 7, 128), (18, 23) => (21, 9, 137), (18, 24) => (23, 5, 149), (19, 25) => (19, 1, 119), (19, 26) => (19, 2, 120), (19, 27) => (19, 3, 121), (19, 28) => (18, 6, 118), (19, 29) => (20, 6, 127), (19, 30) => (24, 4, 153), (20, 31) => (20, 1, 122), (20, 32) => (20, 2, 123), (20, 33) => (20, 3, 124), (20, 34) => (20, 4, 125), (20, 35) => (21, 8, 136), (20, 36) => (17, 6, 111), (20, 37) => (22, 5, 144), (21, 38) => (21, 1, 129), (21, 39) => (21, 2, 130), (21, 40) => (21, 3, 131), (21, 41) => (21, 4, 132), (21, 42) => (21, 5, 133), (21, 43) => (16, 5, 103), (21, 44) => (22, 4, 143), (22, 45) => (22, 1, 140), (22, 46) => (22, 2, 141), (22, 47) => (22, 3, 142), (22, 48) => (16, 6, 104), (23, 49) => (23, 1, 145), (23, 50) => (23, 2, 146), (23, 51) => (23, 3, 147), (23, 52) => (21, 7, 135), (24, 53) => (24, 1, 150), (24, 54) => (24, 2, 151), (24, 55) => (24, 3, 152), (24, 56) => (21, 11, 139), (25, 57) => (25, 1, 155), (25, 58) => (25, 2, 156), (25, 59) => (25, 3, 157), (25, 60) => (25, 4, 158), (25, 61) => (25, 5, 159), (25, 62) => (25, 6, 160), (25, 63) => (35, 6, 241), (25, 64) => (38, 7, 271), (25, 65) => (44, 5, 328), (26, 66) => (26, 1, 168), (26, 67) => (26, 2, 169), (26, 68) => (26, 3, 170), (26, 69) => (26, 4, 171), (26, 70) => (26, 5, 172), (26, 71) => (26, 6, 173), (26, 72) => (26, 7, 174), (26, 73) => (25, 10, 164), (26, 74) => (38, 11, 275), (26, 75) => (39, 10, 287), (26, 76) => (36, 6, 254), (26, 77) => (46, 8, 345), (27, 78) => (27, 1, 178), (27, 79) => (27, 2, 179), (27, 80) => (27, 3, 180), (27, 81) => (27, 4, 181), (27, 82) => (25, 11, 165), (27, 83) => (27, 5, 182), (27, 84) => (37, 5, 262), (27, 85) => (39, 12, 289), (27, 86) => (45, 5, 335), (28, 87) => (28, 1, 185), (28, 88) => (28, 2, 186), (28, 89) => (28, 3, 187), (28, 90) => (28, 4, 188), (28, 91) => (28, 5, 189), (28, 92) => (25, 12, 166), (28, 93) => (28, 6, 190), (28, 94) => (28, 7, 191), (28, 95) => (40, 6, 296), (28, 96) => (39, 7, 284), (28, 97) => (35, 10, 245), (28, 98) => (46, 6, 343), (29, 99) => (29, 1, 198), (29, 100) => (29, 2, 199), (29, 101) => (29, 3, 200), (29, 102) => (29, 4, 201), (29, 103) => (29, 5, 202), (29, 104) => (26, 10, 177), (29, 105) => (29, 6, 203), (29, 106) => (28, 10, 194), (29, 107) => (41, 7, 306), (29, 108) => (39, 11, 288), (29, 109) => (36, 7, 255), (29, 110) => (45, 6, 336), (30, 111) => (30, 1, 205), (30, 112) => (30, 2, 206), (30, 113) => (30, 3, 207), (30, 114) => (30, 4, 208), (30, 115) => (30, 5, 209), (30, 116) => (30, 6, 210), (30, 117) => (27, 7, 184), (30, 118) => (28, 12, 196), (30, 119) => (38, 12, 276), (30, 120) => (41, 9, 308), (30, 121) => (37, 6, 263), (30, 122) => (46, 9, 346), (31, 123) => (31, 1, 212), (31, 124) => (31, 2, 213), (31, 125) => (31, 3, 214), (31, 126) => (31, 4, 215), (31, 127) => (31, 5, 216), (31, 128) => (26, 9, 176), (31, 129) => (31, 6, 217), (31, 130) => (28, 11, 195), (31, 131) => (40, 8, 298), (31, 132) => (38, 10, 274), (31, 133) => (36, 8, 256), (31, 134) => (44, 6, 329), (32, 135) => (32, 1, 219), (32, 136) => (32, 2, 220), (32, 137) => (32, 3, 221), (32, 138) => (32, 4, 222), (32, 139) => (32, 5, 223), (32, 140) => (28, 9, 193), (32, 141) => (35, 11, 246), (32, 142) => (41, 6, 305), (32, 143) => (45, 7, 337), (33, 144) => (33, 1, 226), (33, 145) => (33, 2, 227), (33, 146) => (33, 3, 228), (33, 147) => (33, 4, 229), (33, 148) => (33, 5, 230), (33, 149) => (31, 7, 218), (33, 150) => (29, 7, 204), (33, 151) => (32, 6, 224), (33, 152) => (40, 7, 297), (33, 153) => (41, 8, 307), (33, 154) => (36, 9, 257), (33, 155) => (46, 7, 344), (34, 156) => (34, 1, 231), (34, 157) => (34, 2, 232), (34, 158) => (34, 3, 233), (34, 159) => (34, 4, 234), (34, 160) => (30, 7, 211), (34, 161) => (32, 7, 225), (34, 162) => (40, 9, 299), (34, 163) => (37, 7, 264), (34, 164) => (44, 7, 330), (35, 165) => (35, 1, 236), (35, 166) => (35, 2, 237), (35, 167) => (35, 3, 238), (35, 168) => (35, 4, 239), (35, 169) => (35, 5, 240), (35, 170) => (25, 7, 161), (35, 171) => (42, 5, 313), (36, 172) => (36, 1, 249), (36, 173) => (36, 2, 250), (36, 174) => (36, 3, 251), (36, 175) => (36, 4, 252), (36, 176) => (36, 5, 253), (36, 177) => (35, 8, 243), (36, 178) => (26, 8, 175), (36, 179) => (42, 7, 315), (37, 180) => (37, 1, 258), (37, 181) => (37, 2, 259), (37, 182) => (37, 3, 260), (37, 183) => (37, 4, 261), (37, 184) => (35, 9, 244), (37, 185) => (27, 6, 183), (37, 186) => (42, 8, 316), (38, 187) => (38, 1, 265), (38, 188) => (38, 2, 266), (38, 189) => (38, 3, 267), (38, 190) => (38, 4, 268), (38, 191) => (38, 5, 269), (38, 192) => (38, 6, 270), (38, 193) => (25, 8, 162), (38, 194) => (42, 6, 314), (39, 195) => (39, 1, 278), (39, 196) => (39, 2, 279), (39, 197) => (39, 3, 280), (39, 198) => (39, 4, 281), (39, 199) => (39, 5, 282), (39, 200) => (39, 6, 283), (39, 201) => (25, 13, 167), (39, 202) => (42, 9, 317), (40, 203) => (40, 1, 291), (40, 204) => (40, 2, 292), (40, 205) => (40, 3, 293), (40, 206) => (40, 4, 294), (40, 207) => (40, 5, 295), (40, 208) => (38, 9, 273), (40, 209) => (28, 8, 192), (40, 210) => (42, 10, 318), (41, 211) => (41, 1, 300), (41, 212) => (41, 2, 301), (41, 213) => (41, 3, 302), (41, 214) => (41, 4, 303), (41, 215) => (41, 5, 304), (41, 216) => (39, 9, 286), (41, 217) => (28, 13, 197), (41, 218) => (42, 11, 319), (42, 219) => (42, 1, 309), (42, 220) => (42, 2, 310), (42, 221) => (42, 3, 311), (42, 222) => (42, 4, 312), (42, 223) => (25, 9, 163), (43, 224) => (43, 1, 320), (43, 225) => (43, 2, 321), (43, 226) => (43, 3, 322), (43, 227) => (43, 4, 323), (43, 228) => (34, 5, 235), (44, 229) => (44, 1, 324), (44, 230) => (44, 2, 325), (44, 231) => (44, 3, 326), (44, 232) => (44, 4, 327), (44, 233) => (35, 7, 242), (44, 234) => (38, 8, 272), (45, 235) => (45, 1, 331), (45, 236) => (45, 2, 332), (45, 237) => (45, 3, 333), (45, 238) => (45, 4, 334), (45, 239) => (35, 13, 248), (45, 240) => (39, 13, 290), (46, 241) => (46, 1, 338), (46, 242) => (46, 2, 339), (46, 243) => (46, 3, 340), (46, 244) => (46, 4, 341), (46, 245) => (46, 5, 342), (46, 246) => (35, 12, 247), (46, 247) => (38, 13, 277), (46, 248) => (39, 8, 285), (47, 249) => (47, 1, 347), (47, 250) => (47, 2, 348), (47, 251) => (47, 3, 349), (47, 252) => (47, 4, 350), (47, 253) => (47, 5, 351), (47, 254) => (47, 6, 352), (47, 255) => (65, 9, 553), (47, 256) => (71, 6, 626), (48, 257) => (48, 1, 358), (48, 258) => (48, 2, 359), (48, 259) => (48, 3, 360), (48, 260) => (48, 4, 361), (48, 261) => (48, 5, 362), (48, 262) => (50, 10, 386), (48, 263) => (66, 13, 576), (48, 264) => (71, 9, 629), (49, 265) => (49, 1, 364), (49, 266) => (49, 2, 365), (49, 267) => (49, 3, 366), (49, 268) => (49, 4, 367), (49, 269) => (49, 5, 368), (49, 270) => (49, 6, 369), (49, 271) => (49, 7, 370), (49, 272) => (49, 8, 371), (49, 273) => (47, 10, 356), (49, 274) => (67, 9, 585), (49, 275) => (66, 8, 571), (49, 276) => (72, 8, 637), (50, 277) => (50, 1, 377), (50, 278) => (50, 2, 378), (50, 279) => (50, 3, 379), (50, 280) => (50, 4, 380), (50, 281) => (50, 5, 381), (50, 282) => (50, 6, 382), (50, 283) => (50, 7, 383), (50, 284) => (49, 12, 375), (50, 285) => (50, 8, 384), (50, 286) => (68, 8, 601), (50, 287) => (65, 17, 561), (50, 288) => (72, 13, 642), (51, 289) => (51, 1, 387), (51, 290) => (51, 2, 388), (51, 291) => (51, 3, 389), (51, 292) => (51, 4, 390), (51, 293) => (51, 5, 391), (51, 294) => (51, 6, 392), (51, 295) => (51, 7, 393), (51, 296) => (51, 8, 394), (51, 297) => (51, 9, 395), (51, 298) => (47, 9, 355), (51, 299) => (51, 10, 396), (51, 300) => (51, 11, 397), (51, 301) => (63, 10, 520), (51, 302) => (65, 13, 557), (51, 303) => (67, 14, 590), (51, 304) => (74, 8, 657), (52, 305) => (52, 1, 406), (52, 306) => (52, 2, 407), (52, 307) => (52, 3, 408), (52, 308) => (52, 4, 409), (52, 309) => (52, 5, 410), (52, 310) => (52, 6, 411), (52, 311) => (52, 7, 412), (52, 312) => (52, 8, 413), (52, 313) => (52, 9, 414), (52, 314) => (53, 13, 427), (52, 315) => (50, 9, 385), (52, 316) => (54, 13, 440), (52, 317) => (66, 12, 575), (52, 318) => (63, 17, 527), (52, 319) => (68, 11, 604), (52, 320) => (74, 9, 658), (53, 321) => (53, 1, 415), (53, 322) => (53, 2, 416), (53, 323) => (53, 3, 417), (53, 324) => (53, 4, 418), (53, 325) => (53, 5, 419), (53, 326) => (53, 6, 420), (53, 327) => (53, 7, 421), (53, 328) => (53, 8, 422), (53, 329) => (53, 9, 423), (53, 330) => (51, 15, 401), (53, 331) => (53, 10, 424), (53, 332) => (49, 11, 374), (53, 333) => (66, 9, 572), (53, 334) => (65, 16, 560), (53, 335) => (64, 15, 542), (53, 336) => (74, 10, 659), (54, 337) => (54, 1, 428), (54, 338) => (54, 2, 429), (54, 339) => (54, 3, 430), (54, 340) => (54, 4, 431), (54, 341) => (54, 5, 432), (54, 342) => (54, 6, 433), (54, 343) => (54, 7, 434), (54, 344) => (54, 8, 435), (54, 345) => (54, 9, 436), (54, 346) => (49, 10, 373), (54, 347) => (54, 10, 437), (54, 348) => (51, 18, 404), (54, 349) => (64, 11, 538), (54, 350) => (67, 13, 589), (54, 351) => (68, 9, 602), (54, 352) => (73, 7, 649), (55, 353) => (55, 1, 441), (55, 354) => (55, 2, 442), (55, 355) => (55, 3, 443), (55, 356) => (55, 4, 444), (55, 357) => (55, 5, 445), (55, 358) => (55, 6, 446), (55, 359) => (55, 7, 447), (55, 360) => (51, 16, 402), (55, 361) => (55, 8, 448), (55, 362) => (64, 10, 537), (55, 363) => (65, 15, 559), (55, 364) => (72, 11, 640), (56, 365) => (56, 1, 451), (56, 366) => (56, 2, 452), (56, 367) => (56, 3, 453), (56, 368) => (56, 4, 454), (56, 369) => (56, 5, 455), (56, 370) => (56, 6, 456), (56, 371) => (56, 7, 457), (56, 372) => (54, 12, 439), (56, 373) => (59, 10, 487), (56, 374) => (64, 14, 541), (56, 375) => (66, 10, 573), (56, 376) => (72, 10, 639), (57, 377) => (57, 1, 458), (57, 378) => (57, 2, 459), (57, 379) => (57, 3, 460), (57, 380) => (57, 4, 461), (57, 381) => (57, 5, 462), (57, 382) => (57, 6, 463), (57, 383) => (57, 7, 464), (57, 384) => (57, 8, 465), (57, 385) => (57, 9, 466), (57, 386) => (57, 10, 467), (57, 387) => (51, 17, 403), (57, 388) => (51, 13, 399), (57, 389) => (67, 15, 591), (57, 390) => (64, 13, 540), (57, 391) => (63, 11, 521), (57, 392) => (72, 9, 638), (58, 393) => (58, 1, 471), (58, 394) => (58, 2, 472), (58, 395) => (58, 3, 473), (58, 396) => (58, 4, 474), (58, 397) => (58, 5, 475), (58, 398) => (58, 6, 476), (58, 399) => (58, 7, 477), (58, 400) => (53, 12, 426), (58, 401) => (55, 10, 450), (58, 402) => (63, 15, 525), (58, 403) => (66, 11, 574), (58, 404) => (71, 8, 628), (59, 405) => (59, 1, 478), (59, 406) => (59, 2, 479), (59, 407) => (59, 3, 480), (59, 408) => (59, 4, 481), (59, 409) => (59, 5, 482), (59, 410) => (59, 6, 483), (59, 411) => (59, 7, 484), (59, 412) => (51, 14, 400), (59, 413) => (59, 8, 485), (59, 414) => (63, 12, 522), (59, 415) => (65, 14, 558), (59, 416) => (71, 7, 627), (60, 417) => (60, 1, 488), (60, 418) => (60, 2, 489), (60, 419) => (60, 3, 490), (60, 420) => (60, 4, 491), (60, 421) => (60, 5, 492), (60, 422) => (60, 6, 493), (60, 423) => (60, 7, 494), (60, 424) => (60, 8, 495), (60, 425) => (60, 9, 496), (60, 426) => (54, 11, 438), (60, 427) => (57, 13, 470), (60, 428) => (53, 11, 425), (60, 429) => (64, 17, 544), (60, 430) => (68, 10, 603), (60, 431) => (63, 16, 526), (60, 432) => (72, 12, 641), (61, 433) => (61, 1, 497), (61, 434) => (61, 2, 498), (61, 435) => (61, 3, 499), (61, 436) => (61, 4, 500), (61, 437) => (61, 5, 501), (61, 438) => (57, 12, 469), (61, 439) => (64, 16, 543), (61, 440) => (73, 6, 648), (62, 441) => (62, 1, 502), (62, 442) => (62, 2, 503), (62, 443) => (62, 3, 504), (62, 444) => (62, 4, 505), (62, 445) => (62, 5, 506), (62, 446) => (62, 6, 507), (62, 447) => (62, 7, 508), (62, 448) => (62, 8, 509), (62, 449) => (62, 9, 510), (62, 450) => (59, 9, 486), (62, 451) => (55, 9, 449), (62, 452) => (57, 11, 468), (62, 453) => (63, 13, 523), (62, 454) => (63, 14, 524), (62, 455) => (64, 12, 539), (62, 456) => (74, 11, 660), (63, 457) => (63, 1, 511), (63, 458) => (63, 2, 512), (63, 459) => (63, 3, 513), (63, 460) => (63, 4, 514), (63, 461) => (63, 5, 515), (63, 462) => (63, 6, 516), (63, 463) => (63, 7, 517), (63, 464) => (63, 8, 518), (63, 465) => (63, 9, 519), (63, 466) => (65, 12, 556), (63, 467) => (51, 12, 398), (63, 468) => (69, 7, 611), (64, 469) => (64, 1, 528), (64, 470) => (64, 2, 529), (64, 471) => (64, 3, 530), (64, 472) => (64, 4, 531), (64, 473) => (64, 5, 532), (64, 474) => (64, 6, 533), (64, 475) => (64, 7, 534), (64, 476) => (64, 8, 535), (64, 477) => (64, 9, 536), (64, 478) => (67, 11, 587), (64, 479) => (51, 19, 405), (64, 480) => (69, 10, 614), (65, 481) => (65, 1, 545), (65, 482) => (65, 2, 546), (65, 483) => (65, 3, 547), (65, 484) => (65, 4, 548), (65, 485) => (65, 5, 549), (65, 486) => (65, 6, 550), (65, 487) => (65, 7, 551), (65, 488) => (65, 8, 552), (65, 489) => (47, 7, 353), (65, 490) => (69, 6, 610), (66, 491) => (66, 1, 564), (66, 492) => (66, 2, 565), (66, 493) => (66, 3, 566), (66, 494) => (66, 4, 567), (66, 495) => (66, 5, 568), (66, 496) => (66, 6, 569), (66, 497) => (66, 7, 570), (66, 498) => (65, 11, 555), (66, 499) => (49, 9, 372), (66, 500) => (69, 9, 613), (67, 501) => (67, 1, 577), (67, 502) => (67, 2, 578), (67, 503) => (67, 3, 579), (67, 504) => (67, 4, 580), (67, 505) => (67, 5, 581), (67, 506) => (67, 6, 582), (67, 507) => (67, 7, 583), (67, 508) => (67, 8, 584), (67, 509) => (47, 11, 357), (67, 510) => (69, 8, 612), (68, 511) => (68, 1, 594), (68, 512) => (68, 2, 595), (68, 513) => (68, 3, 596), (68, 514) => (68, 4, 597), (68, 515) => (68, 5, 598), (68, 516) => (68, 6, 599), (68, 517) => (68, 7, 600), (68, 518) => (67, 12, 588), (68, 519) => (49, 13, 376), (68, 520) => (69, 11, 615), (69, 521) => (69, 1, 605), (69, 522) => (69, 2, 606), (69, 523) => (69, 3, 607), (69, 524) => (69, 4, 608), (69, 525) => (69, 5, 609), (69, 526) => (47, 8, 354), (70, 527) => (70, 1, 616), (70, 528) => (70, 2, 617), (70, 529) => (70, 3, 618), (70, 530) => (70, 4, 619), (70, 531) => (70, 5, 620), (70, 532) => (48, 6, 363), (71, 533) => (71, 1, 621), (71, 534) => (71, 2, 622), (71, 535) => (71, 3, 623), (71, 536) => (71, 4, 624), (71, 537) => (71, 5, 625), (71, 538) => (65, 10, 554), (72, 539) => (72, 1, 630), (72, 540) => (72, 2, 631), (72, 541) => (72, 3, 632), (72, 542) => (72, 4, 633), (72, 543) => (72, 5, 634), (72, 544) => (72, 6, 635), (72, 545) => (72, 7, 636), (72, 546) => (65, 19, 563), (72, 547) => (67, 10, 586), (73, 548) => (73, 1, 643), (73, 549) => (73, 2, 644), (73, 550) => (73, 3, 645), (73, 551) => (73, 4, 646), (73, 552) => (73, 5, 647), (73, 553) => (67, 17, 593), (74, 554) => (74, 1, 650), (74, 555) => (74, 2, 651), (74, 556) => (74, 3, 652), (74, 557) => (74, 4, 653), (74, 558) => (74, 5, 654), (74, 559) => (74, 6, 655), (74, 560) => (74, 7, 656), (74, 561) => (67, 16, 592), (74, 562) => (65, 18, 562), (75, 1) => (75, 1, 661), (75, 2) => (75, 2, 662), (75, 3) => (75, 3, 663), (75, 4) => (75, 4, 664), (75, 5) => (75, 5, 665), (75, 6) => (79, 4, 686), (76, 7) => (76, 1, 668), (76, 8) => (76, 2, 669), (76, 9) => (76, 3, 670), (76, 10) => (77, 4, 675), (76, 11) => (76, 4, 671), (76, 12) => (80, 4, 691), (77, 13) => (77, 1, 672), (77, 14) => (77, 2, 673), (77, 15) => (77, 3, 674), (77, 16) => (75, 7, 667), (77, 17) => (77, 5, 676), (77, 18) => (79, 5, 687), (78, 19) => (78, 1, 679), (78, 20) => (78, 2, 680), (78, 21) => (78, 3, 681), (78, 22) => (77, 7, 678), (78, 23) => (78, 4, 682), (78, 24) => (80, 5, 692), (79, 25) => (79, 1, 683), (79, 26) => (79, 2, 684), (79, 27) => (79, 3, 685), (79, 28) => (75, 6, 666), (80, 29) => (80, 1, 688), (80, 30) => (80, 2, 689), (80, 31) => (80, 3, 690), (80, 32) => (77, 6, 677), (81, 33) => (81, 1, 693), (81, 34) => (81, 2, 694), (81, 35) => (81, 3, 695), (81, 36) => (81, 4, 696), (81, 37) => (81, 5, 697), (81, 38) => (82, 4, 702), (82, 39) => (82, 1, 699), (82, 40) => (82, 2, 700), (82, 41) => (82, 3, 701), (82, 42) => (81, 6, 698), (83, 43) => (83, 1, 703), (83, 44) => (83, 2, 704), (83, 45) => (83, 3, 705), (83, 46) => (83, 4, 706), (83, 47) => (83, 5, 707), (83, 48) => (83, 6, 708), (83, 49) => (83, 7, 709), (83, 50) => (87, 6, 738), (84, 51) => (84, 1, 713), (84, 52) => (84, 2, 714), (84, 53) => (84, 3, 715), (84, 54) => (84, 4, 716), (84, 55) => (84, 5, 717), (84, 56) => (83, 9, 711), (84, 57) => (84, 6, 718), (84, 58) => (87, 7, 739), (85, 59) => (85, 1, 720), (85, 60) => (85, 2, 721), (85, 61) => (85, 3, 722), (85, 62) => (85, 4, 723), (85, 63) => (85, 5, 724), (85, 64) => (85, 6, 725), (85, 65) => (83, 10, 712), (85, 66) => (87, 8, 740), (86, 67) => (86, 1, 727), (86, 68) => (86, 2, 728), (86, 69) => (86, 3, 729), (86, 70) => (86, 4, 730), (86, 71) => (86, 5, 731), (86, 72) => (85, 7, 726), (86, 73) => (84, 7, 719), (86, 74) => (87, 9, 741), (87, 75) => (87, 1, 733), (87, 76) => (87, 2, 734), (87, 77) => (87, 3, 735), (87, 78) => (87, 4, 736), (87, 79) => (87, 5, 737), (87, 80) => (83, 8, 710), (88, 81) => (88, 1, 742), (88, 82) => (88, 2, 743), (88, 83) => (88, 3, 744), (88, 84) => (88, 4, 745), (88, 85) => (88, 5, 746), (88, 86) => (86, 6, 732), (89, 87) => (89, 1, 747), (89, 88) => (89, 2, 748), (89, 89) => (89, 3, 749), (89, 90) => (89, 4, 750), (89, 91) => (89, 5, 751), (89, 92) => (89, 6, 752), (89, 93) => (89, 7, 753), (89, 94) => (97, 6, 810), (90, 95) => (90, 1, 757), (90, 96) => (90, 2, 758), (90, 97) => (90, 3, 759), (90, 98) => (90, 4, 760), (90, 99) => (90, 5, 761), (90, 100) => (90, 6, 762), (90, 101) => (89, 10, 756), (90, 102) => (97, 8, 812), (91, 103) => (91, 1, 764), (91, 104) => (91, 2, 765), (91, 105) => (91, 3, 766), (91, 106) => (91, 4, 767), (91, 107) => (91, 5, 768), (91, 108) => (93, 6, 781), (91, 109) => (91, 6, 769), (91, 110) => (98, 6, 819), (92, 111) => (92, 1, 771), (92, 112) => (92, 2, 772), (92, 113) => (92, 3, 773), (92, 114) => (92, 4, 774), (92, 115) => (92, 5, 775), (92, 116) => (94, 6, 791), (92, 117) => (91, 7, 770), (92, 118) => (98, 8, 821), (93, 119) => (93, 1, 776), (93, 120) => (93, 2, 777), (93, 121) => (93, 3, 778), (93, 122) => (93, 4, 779), (93, 123) => (93, 5, 780), (93, 124) => (89, 9, 755), (93, 125) => (93, 7, 782), (93, 126) => (97, 7, 811), (94, 127) => (94, 1, 786), (94, 128) => (94, 2, 787), (94, 129) => (94, 3, 788), (94, 130) => (94, 4, 789), (94, 131) => (94, 5, 790), (94, 132) => (90, 7, 763), (94, 133) => (93, 10, 785), (94, 134) => (97, 9, 813), (95, 135) => (95, 1, 793), (95, 136) => (95, 2, 794), (95, 137) => (95, 3, 795), (95, 138) => (95, 4, 796), (95, 139) => (95, 5, 797), (95, 140) => (93, 9, 784), (95, 141) => (95, 6, 798), (95, 142) => (98, 7, 820), (96, 143) => (96, 1, 800), (96, 144) => (96, 2, 801), (96, 145) => (96, 3, 802), (96, 146) => (96, 4, 803), (96, 147) => (96, 5, 804), (96, 148) => (94, 7, 792), (96, 149) => (95, 7, 799), (96, 150) => (98, 9, 822), (97, 151) => (97, 1, 805), (97, 152) => (97, 2, 806), (97, 153) => (97, 3, 807), (97, 154) => (97, 4, 808), (97, 155) => (97, 5, 809), (97, 156) => (89, 8, 754), (98, 157) => (98, 1, 814), (98, 158) => (98, 2, 815), (98, 159) => (98, 3, 816), (98, 160) => (98, 4, 817), (98, 161) => (98, 5, 818), (98, 162) => (93, 8, 783), (99, 163) => (99, 1, 823), (99, 164) => (99, 2, 824), (99, 165) => (99, 3, 825), (99, 166) => (99, 4, 826), (99, 167) => (99, 5, 827), (99, 168) => (99, 6, 828), (99, 169) => (99, 7, 829), (99, 170) => (107, 6, 888), (100, 171) => (100, 1, 836), (100, 172) => (100, 2, 837), (100, 173) => (100, 3, 838), (100, 174) => (100, 4, 839), (100, 175) => (100, 5, 840), (100, 176) => (100, 6, 841), (100, 177) => (99, 12, 834), (100, 178) => (108, 6, 897), (101, 179) => (101, 1, 845), (101, 180) => (101, 2, 846), (101, 181) => (101, 3, 847), (101, 182) => (101, 4, 848), (101, 183) => (101, 5, 849), (101, 184) => (99, 9, 831), (101, 185) => (105, 6, 876), (101, 186) => (108, 7, 898), (102, 187) => (102, 1, 852), (102, 188) => (102, 2, 853), (102, 189) => (102, 3, 854), (102, 190) => (102, 4, 855), (102, 191) => (102, 5, 856), (102, 192) => (100, 7, 842), (102, 193) => (105, 7, 877), (102, 194) => (107, 7, 889), (103, 195) => (103, 1, 859), (103, 196) => (103, 2, 860), (103, 197) => (103, 3, 861), (103, 198) => (103, 4, 862), (103, 199) => (103, 5, 863), (103, 200) => (99, 11, 833), (103, 201) => (103, 6, 864), (103, 202) => (108, 9, 900), (104, 203) => (104, 1, 866), (104, 204) => (104, 2, 867), (104, 205) => (104, 3, 868), (104, 206) => (104, 4, 869), (104, 207) => (104, 5, 870), (104, 208) => (100, 9, 844), (104, 209) => (103, 7, 865), (104, 210) => (107, 9, 891), (105, 211) => (105, 1, 871), (105, 212) => (105, 2, 872), (105, 213) => (105, 3, 873), (105, 214) => (105, 4, 874), (105, 215) => (105, 5, 875), (105, 216) => (99, 10, 832), (105, 217) => (101, 6, 850), (105, 218) => (107, 8, 890), (106, 219) => (106, 1, 878), (106, 220) => (106, 2, 879), (106, 221) => (106, 3, 880), (106, 222) => (106, 4, 881), (106, 223) => (106, 5, 882), (106, 224) => (100, 8, 843), (106, 225) => (101, 7, 851), (106, 226) => (108, 8, 899), (107, 227) => (107, 1, 883), (107, 228) => (107, 2, 884), (107, 229) => (107, 3, 885), (107, 230) => (107, 4, 886), (107, 231) => (107, 5, 887), (107, 232) => (99, 8, 830), (108, 233) => (108, 1, 892), (108, 234) => (108, 2, 893), (108, 235) => (108, 3, 894), (108, 236) => (108, 4, 895), (108, 237) => (108, 5, 896), (108, 238) => (99, 13, 835), (109, 239) => (109, 1, 901), (109, 240) => (109, 2, 902), (109, 241) => (109, 3, 903), (109, 242) => (109, 4, 904), (109, 243) => (109, 5, 905), (109, 244) => (102, 6, 857), (110, 245) => (110, 1, 906), (110, 246) => (110, 2, 907), (110, 247) => (110, 3, 908), (110, 248) => (110, 4, 909), (110, 249) => (110, 5, 910), (110, 250) => (102, 7, 858), (111, 251) => (111, 1, 911), (111, 252) => (111, 2, 912), (111, 253) => (111, 3, 913), (111, 254) => (111, 4, 914), (111, 255) => (111, 5, 915), (111, 256) => (111, 6, 916), (111, 257) => (115, 7, 947), (111, 258) => (121, 6, 990), (112, 259) => (112, 1, 922), (112, 260) => (112, 2, 923), (112, 261) => (112, 3, 924), (112, 262) => (112, 4, 925), (112, 263) => (112, 5, 926), (112, 264) => (111, 9, 919), (112, 265) => (116, 6, 956), (112, 266) => (121, 8, 992), (113, 267) => (113, 1, 929), (113, 268) => (113, 2, 930), (113, 269) => (113, 3, 931), (113, 270) => (113, 4, 932), (113, 271) => (113, 5, 933), (113, 272) => (113, 6, 934), (113, 273) => (115, 10, 950), (113, 274) => (121, 7, 991), (114, 275) => (114, 1, 936), (114, 276) => (114, 2, 937), (114, 277) => (114, 3, 938), (114, 278) => (114, 4, 939), (114, 279) => (114, 5, 940), (114, 280) => (113, 7, 935), (114, 281) => (116, 7, 957), (114, 282) => (121, 9, 993), (115, 283) => (115, 1, 941), (115, 284) => (115, 2, 942), (115, 285) => (115, 3, 943), (115, 286) => (115, 4, 944), (115, 287) => (115, 5, 945), (115, 288) => (115, 6, 946), (115, 289) => (111, 7, 917), (115, 290) => (119, 6, 976), (116, 291) => (116, 1, 951), (116, 292) => (116, 2, 952), (116, 293) => (116, 3, 953), (116, 294) => (116, 4, 954), (116, 295) => (116, 5, 955), (116, 296) => (115, 9, 949), (116, 297) => (112, 6, 927), (116, 298) => (120, 6, 983), (117, 299) => (117, 1, 958), (117, 300) => (117, 2, 959), (117, 301) => (117, 3, 960), (117, 302) => (117, 4, 961), (117, 303) => (117, 5, 962), (117, 304) => (117, 6, 963), (117, 305) => (111, 10, 920), (117, 306) => (120, 7, 984), (118, 307) => (118, 1, 965), (118, 308) => (118, 2, 966), (118, 309) => (118, 3, 967), (118, 310) => (118, 4, 968), (118, 311) => (118, 5, 969), (118, 312) => (117, 7, 964), (118, 313) => (112, 7, 928), (118, 314) => (119, 7, 977), (119, 315) => (119, 1, 971), (119, 316) => (119, 2, 972), (119, 317) => (119, 3, 973), (119, 318) => (119, 4, 974), (119, 319) => (119, 5, 975), (119, 320) => (111, 8, 918), (120, 321) => (120, 1, 978), (120, 322) => (120, 2, 979), (120, 323) => (120, 3, 980), (120, 324) => (120, 4, 981), (120, 325) => (120, 5, 982), (120, 326) => (111, 11, 921), (121, 327) => (121, 1, 985), (121, 328) => (121, 2, 986), (121, 329) => (121, 3, 987), (121, 330) => (121, 4, 988), (121, 331) => (121, 5, 989), (121, 332) => (115, 8, 948), (122, 333) => (122, 1, 994), (122, 334) => (122, 2, 995), (122, 335) => (122, 3, 996), (122, 336) => (122, 4, 997), (122, 337) => (122, 5, 998), (122, 338) => (118, 6, 970), (123, 339) => (123, 1, 999), (123, 340) => (123, 2, 1000), (123, 341) => (123, 3, 1001), (123, 342) => (123, 4, 1002), (123, 343) => (123, 5, 1003), (123, 344) => (123, 6, 1004), (123, 345) => (123, 7, 1005), (123, 346) => (123, 8, 1006), (123, 347) => (123, 9, 1007), (123, 348) => (123, 10, 1008), (123, 349) => (123, 11, 1009), (123, 350) => (139, 10, 1188), (124, 351) => (124, 1, 1018), (124, 352) => (124, 2, 1019), (124, 353) => (124, 3, 1020), (124, 354) => (124, 4, 1021), (124, 355) => (124, 5, 1022), (124, 356) => (124, 6, 1023), (124, 357) => (124, 7, 1024), (124, 358) => (124, 8, 1025), (124, 359) => (124, 9, 1026), (124, 360) => (123, 15, 1013), (124, 361) => (124, 10, 1027), (124, 362) => (140, 10, 1205), (125, 363) => (125, 1, 1031), (125, 364) => (125, 2, 1032), (125, 365) => (125, 3, 1033), (125, 366) => (125, 4, 1034), (125, 367) => (125, 5, 1035), (125, 368) => (125, 6, 1036), (125, 369) => (125, 7, 1037), (125, 370) => (125, 8, 1038), (125, 371) => (125, 9, 1039), (125, 372) => (125, 10, 1040), (125, 373) => (123, 18, 1016), (125, 374) => (140, 17, 1212), (126, 375) => (126, 1, 1044), (126, 376) => (126, 2, 1045), (126, 377) => (126, 3, 1046), (126, 378) => (126, 4, 1047), (126, 379) => (126, 5, 1048), (126, 380) => (126, 6, 1049), (126, 381) => (126, 7, 1050), (126, 382) => (126, 8, 1051), (126, 383) => (126, 9, 1052), (126, 384) => (125, 13, 1043), (126, 385) => (124, 13, 1030), (126, 386) => (139, 17, 1195), (127, 387) => (127, 1, 1053), (127, 388) => (127, 2, 1054), (127, 389) => (127, 3, 1055), (127, 390) => (127, 4, 1056), (127, 391) => (127, 5, 1057), (127, 392) => (127, 6, 1058), (127, 393) => (127, 7, 1059), (127, 394) => (127, 8, 1060), (127, 395) => (127, 9, 1061), (127, 396) => (127, 10, 1062), (127, 397) => (123, 17, 1015), (127, 398) => (140, 15, 1210), (128, 399) => (128, 1, 1066), (128, 400) => (128, 2, 1067), (128, 401) => (128, 3, 1068), (128, 402) => (128, 4, 1069), (128, 403) => (128, 5, 1070), (128, 404) => (128, 6, 1071), (128, 405) => (128, 7, 1072), (128, 406) => (128, 8, 1073), (128, 407) => (128, 9, 1074), (128, 408) => (127, 13, 1065), (128, 409) => (124, 12, 1029), (128, 410) => (139, 15, 1193), (129, 411) => (129, 1, 1075), (129, 412) => (129, 2, 1076), (129, 413) => (129, 3, 1077), (129, 414) => (129, 4, 1078), (129, 415) => (129, 5, 1079), (129, 416) => (129, 6, 1080), (129, 417) => (129, 7, 1081), (129, 418) => (129, 8, 1082), (129, 419) => (129, 9, 1083), (129, 420) => (129, 10, 1084), (129, 421) => (123, 16, 1014), (129, 422) => (139, 11, 1189), (130, 423) => (130, 1, 1088), (130, 424) => (130, 2, 1089), (130, 425) => (130, 3, 1090), (130, 426) => (130, 4, 1091), (130, 427) => (130, 5, 1092), (130, 428) => (130, 6, 1093), (130, 429) => (130, 7, 1094), (130, 430) => (130, 8, 1095), (130, 431) => (130, 9, 1096), (130, 432) => (129, 13, 1087), (130, 433) => (124, 11, 1028), (130, 434) => (140, 11, 1206), (131, 435) => (131, 1, 1097), (131, 436) => (131, 2, 1098), (131, 437) => (131, 3, 1099), (131, 438) => (131, 4, 1100), (131, 439) => (131, 5, 1101), (131, 440) => (131, 6, 1102), (131, 441) => (131, 7, 1103), (131, 442) => (131, 8, 1104), (131, 443) => (131, 9, 1105), (131, 444) => (123, 14, 1012), (131, 445) => (132, 10, 1119), (131, 446) => (139, 13, 1191), (132, 447) => (132, 1, 1110), (132, 448) => (132, 2, 1111), (132, 449) => (132, 3, 1112), (132, 450) => (132, 4, 1113), (132, 451) => (132, 5, 1114), (132, 452) => (132, 6, 1115), (132, 453) => (132, 7, 1116), (132, 454) => (132, 8, 1117), (132, 455) => (132, 9, 1118), (132, 456) => (123, 13, 1011), (132, 457) => (131, 10, 1106), (132, 458) => (140, 13, 1208), (133, 459) => (133, 1, 1123), (133, 460) => (133, 2, 1124), (133, 461) => (133, 3, 1125), (133, 462) => (133, 4, 1126), (133, 463) => (133, 5, 1127), (133, 464) => (133, 6, 1128), (133, 465) => (133, 7, 1129), (133, 466) => (133, 8, 1130), (133, 467) => (133, 9, 1131), (133, 468) => (125, 12, 1042), (133, 469) => (132, 13, 1122), (133, 470) => (140, 14, 1209), (134, 471) => (134, 1, 1132), (134, 472) => (134, 2, 1133), (134, 473) => (134, 3, 1134), (134, 474) => (134, 4, 1135), (134, 475) => (134, 5, 1136), (134, 476) => (134, 6, 1137), (134, 477) => (134, 7, 1138), (134, 478) => (134, 8, 1139), (134, 479) => (134, 9, 1140), (134, 480) => (125, 11, 1041), (134, 481) => (131, 13, 1109), (134, 482) => (139, 14, 1192), (135, 483) => (135, 1, 1143), (135, 484) => (135, 2, 1144), (135, 485) => (135, 3, 1145), (135, 486) => (135, 4, 1146), (135, 487) => (135, 5, 1147), (135, 488) => (135, 6, 1148), (135, 489) => (135, 7, 1149), (135, 490) => (135, 8, 1150), (135, 491) => (135, 9, 1151), (135, 492) => (127, 12, 1064), (135, 493) => (132, 12, 1121), (135, 494) => (140, 12, 1207), (136, 495) => (136, 1, 1152), (136, 496) => (136, 2, 1153), (136, 497) => (136, 3, 1154), (136, 498) => (136, 4, 1155), (136, 499) => (136, 5, 1156), (136, 500) => (136, 6, 1157), (136, 501) => (136, 7, 1158), (136, 502) => (136, 8, 1159), (136, 503) => (136, 9, 1160), (136, 504) => (127, 11, 1063), (136, 505) => (131, 12, 1108), (136, 506) => (139, 12, 1190), (137, 507) => (137, 1, 1161), (137, 508) => (137, 2, 1162), (137, 509) => (137, 3, 1163), (137, 510) => (137, 4, 1164), (137, 511) => (137, 5, 1165), (137, 512) => (137, 6, 1166), (137, 513) => (137, 7, 1167), (137, 514) => (137, 8, 1168), (137, 515) => (137, 9, 1169), (137, 516) => (129, 12, 1086), (137, 517) => (132, 11, 1120), (137, 518) => (139, 16, 1194), (138, 519) => (138, 1, 1170), (138, 520) => (138, 2, 1171), (138, 521) => (138, 3, 1172), (138, 522) => (138, 4, 1173), (138, 523) => (138, 5, 1174), (138, 524) => (138, 6, 1175), (138, 525) => (138, 7, 1176), (138, 526) => (138, 8, 1177), (138, 527) => (138, 9, 1178), (138, 528) => (129, 11, 1085), (138, 529) => (131, 11, 1107), (138, 530) => (140, 16, 1211), (139, 531) => (139, 1, 1179), (139, 532) => (139, 2, 1180), (139, 533) => (139, 3, 1181), (139, 534) => (139, 4, 1182), (139, 535) => (139, 5, 1183), (139, 536) => (139, 6, 1184), (139, 537) => (139, 7, 1185), (139, 538) => (139, 8, 1186), (139, 539) => (139, 9, 1187), (139, 540) => (123, 12, 1010), (140, 541) => (140, 1, 1196), (140, 542) => (140, 2, 1197), (140, 543) => (140, 3, 1198), (140, 544) => (140, 4, 1199), (140, 545) => (140, 5, 1200), (140, 546) => (140, 6, 1201), (140, 547) => (140, 7, 1202), (140, 548) => (140, 8, 1203), (140, 549) => (140, 9, 1204), (140, 550) => (123, 19, 1017), (141, 551) => (141, 1, 1213), (141, 552) => (141, 2, 1214), (141, 553) => (141, 3, 1215), (141, 554) => (141, 4, 1216), (141, 555) => (141, 5, 1217), (141, 556) => (141, 6, 1218), (141, 557) => (141, 7, 1219), (141, 558) => (141, 8, 1220), (141, 559) => (141, 9, 1221), (141, 560) => (134, 10, 1141), (142, 561) => (142, 1, 1222), (142, 562) => (142, 2, 1223), (142, 563) => (142, 3, 1224), (142, 564) => (142, 4, 1225), (142, 565) => (142, 5, 1226), (142, 566) => (142, 6, 1227), (142, 567) => (142, 7, 1228), (142, 568) => (142, 8, 1229), (142, 569) => (142, 9, 1230), (142, 570) => (134, 11, 1142), (143, 1) => (143, 1, 1231), (143, 2) => (143, 2, 1232), (143, 3) => (143, 3, 1233), (144, 4) => (144, 1, 1234), (144, 5) => (144, 2, 1235), (144, 6) => (145, 3, 1239), (145, 7) => (145, 1, 1237), (145, 8) => (145, 2, 1238), (145, 9) => (144, 3, 1236), (146, 10) => (146, 1, 1240), (146, 11) => (146, 2, 1241), (146, 12) => (146, 3, 1242), (147, 13) => (147, 1, 1243), (147, 14) => (147, 2, 1244), (147, 15) => (147, 3, 1245), (147, 16) => (147, 4, 1246), (148, 17) => (148, 1, 1247), (148, 18) => (148, 2, 1248), (148, 19) => (148, 3, 1249), (148, 20) => (148, 4, 1250), (149, 21) => (149, 1, 1251), (149, 22) => (149, 2, 1252), (149, 23) => (149, 3, 1253), (149, 24) => (149, 4, 1254), (150, 25) => (150, 1, 1255), (150, 26) => (150, 2, 1256), (150, 27) => (150, 3, 1257), (150, 28) => (150, 4, 1258), (151, 29) => (151, 1, 1259), (151, 30) => (151, 2, 1260), (151, 31) => (151, 3, 1261), (151, 32) => (153, 4, 1270), (152, 33) => (152, 1, 1263), (152, 34) => (152, 2, 1264), (152, 35) => (152, 3, 1265), (152, 36) => (154, 4, 1274), (153, 37) => (153, 1, 1267), (153, 38) => (153, 2, 1268), (153, 39) => (153, 3, 1269), (153, 40) => (151, 4, 1262), (154, 41) => (154, 1, 1271), (154, 42) => (154, 2, 1272), (154, 43) => (154, 3, 1273), (154, 44) => (152, 4, 1266), (155, 45) => (155, 1, 1275), (155, 46) => (155, 2, 1276), (155, 47) => (155, 3, 1277), (155, 48) => (155, 4, 1278), (156, 49) => (156, 1, 1279), (156, 50) => (156, 2, 1280), (156, 51) => (156, 3, 1281), (156, 52) => (156, 4, 1282), (157, 53) => (157, 1, 1284), (157, 54) => (157, 2, 1285), (157, 55) => (157, 3, 1286), (157, 56) => (157, 4, 1287), (158, 57) => (158, 1, 1289), (158, 58) => (158, 2, 1290), (158, 59) => (158, 3, 1291), (158, 60) => (156, 5, 1283), (159, 61) => (159, 1, 1292), (159, 62) => (159, 2, 1293), (159, 63) => (159, 3, 1294), (159, 64) => (157, 5, 1288), (160, 65) => (160, 1, 1295), (160, 66) => (160, 2, 1296), (160, 67) => (160, 3, 1297), (160, 68) => (160, 4, 1298), (161, 69) => (161, 1, 1300), (161, 70) => (161, 2, 1301), (161, 71) => (161, 3, 1302), (161, 72) => (160, 5, 1299), (162, 73) => (162, 1, 1303), (162, 74) => (162, 2, 1304), (162, 75) => (162, 3, 1305), (162, 76) => (162, 4, 1306), (162, 77) => (162, 5, 1307), (162, 78) => (162, 6, 1308), (163, 79) => (163, 1, 1310), (163, 80) => (163, 2, 1311), (163, 81) => (163, 3, 1312), (163, 82) => (163, 4, 1313), (163, 83) => (163, 5, 1314), (163, 84) => (162, 7, 1309), (164, 85) => (164, 1, 1315), (164, 86) => (164, 2, 1316), (164, 87) => (164, 3, 1317), (164, 88) => (164, 4, 1318), (164, 89) => (164, 5, 1319), (164, 90) => (164, 6, 1320), (165, 91) => (165, 1, 1322), (165, 92) => (165, 2, 1323), (165, 93) => (165, 3, 1324), (165, 94) => (165, 4, 1325), (165, 95) => (165, 5, 1326), (165, 96) => (164, 7, 1321), (166, 97) => (166, 1, 1327), (166, 98) => (166, 2, 1328), (166, 99) => (166, 3, 1329), (166, 100) => (166, 4, 1330), (166, 101) => (166, 5, 1331), (166, 102) => (166, 6, 1332), (167, 103) => (167, 1, 1334), (167, 104) => (167, 2, 1335), (167, 105) => (167, 3, 1336), (167, 106) => (167, 4, 1337), (167, 107) => (167, 5, 1338), (167, 108) => (166, 7, 1333), (168, 109) => (168, 1, 1339), (168, 110) => (168, 2, 1340), (168, 111) => (168, 3, 1341), (168, 112) => (168, 4, 1342), (169, 113) => (169, 1, 1344), (169, 114) => (169, 2, 1345), (169, 115) => (169, 3, 1346), (169, 116) => (171, 4, 1353), (170, 117) => (170, 1, 1347), (170, 118) => (170, 2, 1348), (170, 119) => (170, 3, 1349), (170, 120) => (172, 5, 1359), (171, 121) => (171, 1, 1350), (171, 122) => (171, 2, 1351), (171, 123) => (171, 3, 1352), (171, 124) => (172, 4, 1358), (172, 125) => (172, 1, 1355), (172, 126) => (172, 2, 1356), (172, 127) => (172, 3, 1357), (172, 128) => (171, 5, 1354), (173, 129) => (173, 1, 1360), (173, 130) => (173, 2, 1361), (173, 131) => (173, 3, 1362), (173, 132) => (168, 5, 1343), (174, 133) => (174, 1, 1363), (174, 134) => (174, 2, 1364), (174, 135) => (174, 3, 1365), (174, 136) => (174, 4, 1366), (175, 137) => (175, 1, 1367), (175, 138) => (175, 2, 1368), (175, 139) => (175, 3, 1369), (175, 140) => (175, 4, 1370), (175, 141) => (175, 5, 1371), (175, 142) => (175, 6, 1372), (176, 143) => (176, 1, 1374), (176, 144) => (176, 2, 1375), (176, 145) => (176, 3, 1376), (176, 146) => (176, 4, 1377), (176, 147) => (176, 5, 1378), (176, 148) => (175, 7, 1373), (177, 149) => (177, 1, 1379), (177, 150) => (177, 2, 1380), (177, 151) => (177, 3, 1381), (177, 152) => (177, 4, 1382), (177, 153) => (177, 5, 1383), (177, 154) => (177, 6, 1384), (178, 155) => (178, 1, 1386), (178, 156) => (178, 2, 1387), (178, 157) => (178, 3, 1388), (178, 158) => (178, 4, 1389), (178, 159) => (178, 5, 1390), (178, 160) => (180, 6, 1401), (179, 161) => (179, 1, 1391), (179, 162) => (179, 2, 1392), (179, 163) => (179, 3, 1393), (179, 164) => (179, 4, 1394), (179, 165) => (179, 5, 1395), (179, 166) => (181, 7, 1409), (180, 167) => (180, 1, 1396), (180, 168) => (180, 2, 1397), (180, 169) => (180, 3, 1398), (180, 170) => (180, 4, 1399), (180, 171) => (180, 5, 1400), (180, 172) => (181, 6, 1408), (181, 173) => (181, 1, 1403), (181, 174) => (181, 2, 1404), (181, 175) => (181, 3, 1405), (181, 176) => (181, 4, 1406), (181, 177) => (181, 5, 1407), (181, 178) => (180, 7, 1402), (182, 179) => (182, 1, 1410), (182, 180) => (182, 2, 1411), (182, 181) => (182, 3, 1412), (182, 182) => (182, 4, 1413), (182, 183) => (182, 5, 1414), (182, 184) => (177, 7, 1385), (183, 185) => (183, 1, 1415), (183, 186) => (183, 2, 1416), (183, 187) => (183, 3, 1417), (183, 188) => (183, 4, 1418), (183, 189) => (183, 5, 1419), (183, 190) => (183, 6, 1420), (184, 191) => (184, 1, 1424), (184, 192) => (184, 2, 1425), (184, 193) => (184, 3, 1426), (184, 194) => (184, 4, 1427), (184, 195) => (184, 5, 1428), (184, 196) => (183, 9, 1423), (185, 197) => (185, 1, 1429), (185, 198) => (185, 2, 1430), (185, 199) => (185, 3, 1431), (185, 200) => (185, 4, 1432), (185, 201) => (185, 5, 1433), (185, 202) => (183, 7, 1421), (186, 203) => (186, 1, 1434), (186, 204) => (186, 2, 1435), (186, 205) => (186, 3, 1436), (186, 206) => (186, 4, 1437), (186, 207) => (186, 5, 1438), (186, 208) => (183, 8, 1422), (187, 209) => (187, 1, 1439), (187, 210) => (187, 2, 1440), (187, 211) => (187, 3, 1441), (187, 212) => (187, 4, 1442), (187, 213) => (187, 5, 1443), (187, 214) => (187, 6, 1444), (188, 215) => (188, 1, 1446), (188, 216) => (188, 2, 1447), (188, 217) => (188, 3, 1448), (188, 218) => (188, 4, 1449), (188, 219) => (188, 5, 1450), (188, 220) => (187, 7, 1445), (189, 221) => (189, 1, 1451), (189, 222) => (189, 2, 1452), (189, 223) => (189, 3, 1453), (189, 224) => (189, 4, 1454), (189, 225) => (189, 5, 1455), (189, 226) => (189, 6, 1456), (190, 227) => (190, 1, 1458), (190, 228) => (190, 2, 1459), (190, 229) => (190, 3, 1460), (190, 230) => (190, 4, 1461), (190, 231) => (190, 5, 1462), (190, 232) => (189, 7, 1457), (191, 233) => (191, 1, 1463), (191, 234) => (191, 2, 1464), (191, 235) => (191, 3, 1465), (191, 236) => (191, 4, 1466), (191, 237) => (191, 5, 1467), (191, 238) => (191, 6, 1468), (191, 239) => (191, 7, 1469), (191, 240) => (191, 8, 1470), (191, 241) => (191, 9, 1471), (191, 242) => (191, 10, 1472), (192, 243) => (192, 1, 1476), (192, 244) => (192, 2, 1477), (192, 245) => (192, 3, 1478), (192, 246) => (192, 4, 1479), (192, 247) => (192, 5, 1480), (192, 248) => (192, 6, 1481), (192, 249) => (192, 7, 1482), (192, 250) => (192, 8, 1483), (192, 251) => (192, 9, 1484), (192, 252) => (191, 13, 1475), (193, 253) => (193, 1, 1485), (193, 254) => (193, 2, 1486), (193, 255) => (193, 3, 1487), (193, 256) => (193, 4, 1488), (193, 257) => (193, 5, 1489), (193, 258) => (193, 6, 1490), (193, 259) => (193, 7, 1491), (193, 260) => (193, 8, 1492), (193, 261) => (193, 9, 1493), (193, 262) => (191, 11, 1473), (194, 263) => (194, 1, 1494), (194, 264) => (194, 2, 1495), (194, 265) => (194, 3, 1496), (194, 266) => (194, 4, 1497), (194, 267) => (194, 5, 1498), (194, 268) => (194, 6, 1499), (194, 269) => (194, 7, 1500), (194, 270) => (194, 8, 1501), (194, 271) => (194, 9, 1502), (194, 272) => (191, 12, 1474), (195, 1) => (195, 1, 1503), (195, 2) => (195, 2, 1504), (195, 3) => (197, 3, 1510), (196, 4) => (196, 1, 1506), (196, 5) => (196, 2, 1507), (196, 6) => (195, 3, 1505), (197, 7) => (197, 1, 1508), (197, 8) => (197, 2, 1509), (198, 9) => (198, 1, 1511), (198, 10) => (198, 2, 1512), (198, 11) => (199, 3, 1515), (199, 12) => (199, 1, 1513), (199, 13) => (199, 2, 1514), (200, 14) => (200, 1, 1516), (200, 15) => (200, 2, 1517), (200, 16) => (200, 3, 1518), (200, 17) => (204, 4, 1533), (201, 18) => (201, 1, 1520), (201, 19) => (201, 2, 1521), (201, 20) => (201, 3, 1522), (201, 21) => (204, 5, 1534), (202, 22) => (202, 1, 1524), (202, 23) => (202, 2, 1525), (202, 24) => (202, 3, 1526), (202, 25) => (200, 4, 1519), (203, 26) => (203, 1, 1527), (203, 27) => (203, 2, 1528), (203, 28) => (203, 3, 1529), (203, 29) => (201, 4, 1523), (204, 30) => (204, 1, 1530), (204, 31) => (204, 2, 1531), (204, 32) => (204, 3, 1532), (205, 33) => (205, 1, 1535), (205, 34) => (205, 2, 1536), (205, 35) => (205, 3, 1537), (205, 36) => (206, 4, 1541), (206, 37) => (206, 1, 1538), (206, 38) => (206, 2, 1539), (206, 39) => (206, 3, 1540), (207, 40) => (207, 1, 1542), (207, 41) => (207, 2, 1543), (207, 42) => (207, 3, 1544), (207, 43) => (211, 4, 1559), (208, 44) => (208, 1, 1546), (208, 45) => (208, 2, 1547), (208, 46) => (208, 3, 1548), (208, 47) => (211, 5, 1560), (209, 48) => (209, 1, 1550), (209, 49) => (209, 2, 1551), (209, 50) => (209, 3, 1552), (209, 51) => (207, 4, 1545), (210, 52) => (210, 1, 1553), (210, 53) => (210, 2, 1554), (210, 54) => (210, 3, 1555), (210, 55) => (208, 4, 1549), (211, 56) => (211, 1, 1556), (211, 57) => (211, 2, 1557), (211, 58) => (211, 3, 1558), (212, 59) => (212, 1, 1561), (212, 60) => (212, 2, 1562), (212, 61) => (212, 3, 1563), (212, 62) => (214, 4, 1570), (213, 63) => (213, 1, 1564), (213, 64) => (213, 2, 1565), (213, 65) => (213, 3, 1566), (213, 66) => (214, 5, 1571), (214, 67) => (214, 1, 1567), (214, 68) => (214, 2, 1568), (214, 69) => (214, 3, 1569), (215, 70) => (215, 1, 1572), (215, 71) => (215, 2, 1573), (215, 72) => (215, 3, 1574), (215, 73) => (217, 4, 1583), (216, 74) => (216, 1, 1577), (216, 75) => (216, 2, 1578), (216, 76) => (216, 3, 1579), (216, 77) => (215, 4, 1575), (217, 78) => (217, 1, 1580), (217, 79) => (217, 2, 1581), (217, 80) => (217, 3, 1582), (218, 81) => (218, 1, 1585), (218, 82) => (218, 2, 1586), (218, 83) => (218, 3, 1587), (218, 84) => (217, 5, 1584), (219, 85) => (219, 1, 1588), (219, 86) => (219, 2, 1589), (219, 87) => (219, 3, 1590), (219, 88) => (215, 5, 1576), (220, 89) => (220, 1, 1591), (220, 90) => (220, 2, 1592), (220, 91) => (220, 3, 1593), (221, 92) => (221, 1, 1594), (221, 93) => (221, 2, 1595), (221, 94) => (221, 3, 1596), (221, 95) => (221, 4, 1597), (221, 96) => (221, 5, 1598), (221, 97) => (229, 6, 1643), (222, 98) => (222, 1, 1601), (222, 99) => (222, 2, 1602), (222, 100) => (222, 3, 1603), (222, 101) => (222, 4, 1604), (222, 102) => (222, 5, 1605), (222, 103) => (229, 9, 1646), (223, 104) => (223, 1, 1606), (223, 105) => (223, 2, 1607), (223, 106) => (223, 3, 1608), (223, 107) => (223, 4, 1609), (223, 108) => (223, 5, 1610), (223, 109) => (229, 8, 1645), (224, 110) => (224, 1, 1611), (224, 111) => (224, 2, 1612), (224, 112) => (224, 3, 1613), (224, 113) => (224, 4, 1614), (224, 114) => (224, 5, 1615), (224, 115) => (229, 7, 1644), (225, 116) => (225, 1, 1618), (225, 117) => (225, 2, 1619), (225, 118) => (225, 3, 1620), (225, 119) => (225, 4, 1621), (225, 120) => (225, 5, 1622), (225, 121) => (221, 6, 1599), (226, 122) => (226, 1, 1623), (226, 123) => (226, 2, 1624), (226, 124) => (226, 3, 1625), (226, 125) => (226, 4, 1626), (226, 126) => (226, 5, 1627), (226, 127) => (221, 7, 1600), (227, 128) => (227, 1, 1628), (227, 129) => (227, 2, 1629), (227, 130) => (227, 3, 1630), (227, 131) => (227, 4, 1631), (227, 132) => (227, 5, 1632), (227, 133) => (224, 6, 1616), (228, 134) => (228, 1, 1633), (228, 135) => (228, 2, 1634), (228, 136) => (228, 3, 1635), (228, 137) => (228, 4, 1636), (228, 138) => (228, 5, 1637), (228, 139) => (224, 7, 1617), (229, 140) => (229, 1, 1638), (229, 141) => (229, 2, 1639), (229, 142) => (229, 3, 1640), (229, 143) => (229, 4, 1641), (229, 144) => (229, 5, 1642), (230, 145) => (230, 1, 1647), (230, 146) => (230, 2, 1648), (230, 147) => (230, 3, 1649), (230, 148) => (230, 4, 1650), (230, 149) => (230, 5, 1651), ) const MSG_OG₃2BNS_NUMs_V = let d = Dict(v[3]=>k for (k,v) in Crystalline.MSG_BNS2OG_NUMs_D) [d[OG₃] for OG₃ in 1:1651] end const SG2MSG_NUMs_D = [ # label conventions differ between space groups and BNS symbols for SGs 39, 41, 64, 67, 68; # I have verified that this difference also exists on the Bilbao crystallographic server (1, 1), (2, 4), (3, 1), (4, 7), (5, 13), (6, 18), (7, 24), (8, 32), (9, 37), (10, 42), (11, 50), (12, 58), (13, 65), (14, 75), (15, 85), (16, 1), (17, 7), (18, 16), (19, 25), (20, 31), (21, 38), (22, 45), (23, 49), (24, 53), (25, 57), (26, 66), (27, 78), (28, 87), (29, 99), (30, 111), (31, 123), (32, 135), (33, 144), (34, 156), (35, 165), (36, 172), (37, 180), (38, 187), (39, 195), # label conventions differ! (Aem2 vs Abm2) (40, 203), (41, 211), # label conventions differ! (Aea2 vs Aba2) (42, 219), (43, 224), (44, 229), (45, 235), (46, 241), (47, 249), (48, 257), (49, 265), (50, 277), (51, 289), (52, 305), (53, 321), (54, 337), (55, 353), (56, 365), (57, 377), (58, 393), (59, 405), (60, 417), (61, 433), (62, 441), (63, 457), (64, 469), # label conventions differ! (Cmce vs Cmca) (65, 481), (66, 491), (67, 501), # label conventions differ! (Cmme vs Cmma) (68, 511), # label conventions differ! (Ccce vs Ccca) (69, 521), (70, 527), (71, 533), (72, 539), (73, 548), (74, 554), (75, 1), (76, 7), (77, 13), (78, 19), (79, 25), (80, 29), (81, 33), (82, 39), (83, 43), (84, 51), (85, 59), (86, 67), (87, 75), (88, 81), (89, 87), (90, 95), (91, 103), (92, 111), (93, 119), (94, 127), (95, 135), (96, 143), (97, 151), (98, 157), (99, 163), (100, 171), (101, 179), (102, 187), (103, 195), (104, 203), (105, 211), (106, 219), (107, 227), (108, 233), (109, 239), (110, 245), (111, 251), (112, 259), (113, 267), (114, 275), (115, 283), (116, 291), (117, 299), (118, 307), (119, 315), (120, 321), (121, 327), (122, 333), (123, 339), (124, 351), (125, 363), (126, 375), (127, 387), (128, 399), (129, 411), (130, 423), (131, 435), (132, 447), (133, 459), (134, 471), (135, 483), (136, 495), (137, 507), (138, 519), (139, 531), (140, 541), (141, 551), (142, 561), (143, 1), (144, 4), (145, 7), (146, 10), (147, 13), (148, 17), (149, 21), (150, 25), (151, 29), (152, 33), (153, 37), (154, 41), (155, 45), (156, 49), (157, 53), (158, 57), (159, 61), (160, 65), (161, 69), (162, 73), (163, 79), (164, 85), (165, 91), (166, 97), (167, 103), (168, 109), (169, 113), (170, 117), (171, 121), (172, 125), (173, 129), (174, 133), (175, 137), (176, 143), (177, 149), (178, 155), (179, 161), (180, 167), (181, 173), (182, 179), (183, 185), (184, 191), (185, 197), (186, 203), (187, 209), (188, 215), (189, 221), (190, 227), (191, 233), (192, 243), (193, 253), (194, 263), (195, 1), (196, 4), (197, 7), (198, 9), (199, 12), (200, 14), (201, 18), (202, 22), (203, 26), (204, 30), (205, 33), (206, 37), (207, 40), (208, 44), (209, 48), (210, 52), (211, 56), (212, 59), (213, 63), (214, 67), (215, 70), (216, 74), (217, 78), (218, 81), (219, 85), (220, 89), (221, 92), (222, 98), (223, 104), (224, 110), (225, 116), (226, 122), (227, 128), (228, 134), (229, 140), (230, 145) ]
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
1534
# --- MSymOperation --- """ $(TYPEDEF)$(TYPEDFIELDS) """ struct MSymOperation{D} <: AbstractOperation{D} op :: SymOperation{D} tr :: Bool end SymOperation{D}(mop::MSymOperation{D}) where D = mop.op timereversal(mop::MSymOperation) = mop.tr seitz(mop::MSymOperation) = (s = seitz(mop.op); (mop.tr ? s : s * "′")) xyzt(mop::MSymOperation) = xyzt(mop.op) # does not feature time-reversal! function compose( mop₁ :: MSymOperation{D}, mop₂ :: MSymOperation{D}, modτ :: Bool=true) where D return MSymOperation{D}(compose(mop₁.op, mop₂.op, modτ), xor(mop₁.tr, mop₂.tr)) end Base.:*(mop₁::MSymOperation{D}, mop₂::MSymOperation{D}) where D = compose(mop₁, mop₂) function Base.isapprox( mop₁ :: MSymOperation{D}, mop₂ :: MSymOperation{D}, vs...; kws...) where D return mop₁.tr == mop₂.tr && isapprox(mop₁.op, mop₂.op, vs...; kws...) end # --- MSpaceGroup --- # Notation: there two "main" notations and settings: # - BNS (Belov, Neronova, & Smirnova) # - OG (Opechowski & Guccione) # We use the BNS setting (and notation), not OG (see Sec. 4, Acta Cryst. A78, 99 (2022)). # The `num` field of `MSpaceGroup` gives the the two BNS numbers: # - `num[1]`: F space-group associated number # - `num[2]`: crystal-system sequential number """ $(TYPEDEF)$(TYPEDFIELDS) """ struct MSpaceGroup{D} <: AbstractGroup{D, MSymOperation{D}} num :: Tuple{Int, Int} operations :: Vector{MSymOperation{D}} end label(msg::MSpaceGroup) = MSG_BNS_LABELs_D[msg.num]::String
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
7072
get_indexed_rotation(n::Integer, Dᵛ::Val{3}) = ROTATIONS_3D[n] get_indexed_rotation(n::Integer, Dᵛ::Val{2}) = ROTATIONS_2D[n] get_indexed_rotation(n::Integer, Dᵛ::Val{1}) = ROTATIONS_1D[n] get_indexed_translation(n::Integer, Dᵛ::Val{3}) = TRANSLATIONS_3D[n] get_indexed_translation(n::Integer, Dᵛ::Val{2}) = TRANSLATIONS_2D[n] get_indexed_translation(n::Integer, Dᵛ::Val{1}) = TRANSLATIONS_1D[n] const ROTATIONS_3D = [ # needed for Litvin magnetic space group data, ISOTROPY space group data, and point # group data SqSMatrix{3,Float64}([1 0 0 ; 0 1 0 ; 0 0 1 ]), SqSMatrix{3,Float64}([-1 0 0; 0 -1 0; 0 0 -1]), SqSMatrix{3,Float64}([-1 0 0; 0 1 0 ; 0 0 -1]), SqSMatrix{3,Float64}([1 0 0 ; 0 -1 0; 0 0 1 ]), SqSMatrix{3,Float64}([1 0 0 ; 0 -1 0; 0 0 -1]), SqSMatrix{3,Float64}([-1 0 0; 0 -1 0; 0 0 1 ]), SqSMatrix{3,Float64}([-1 0 0; 0 1 0 ; 0 0 1 ]), SqSMatrix{3,Float64}([1 0 0 ; 0 1 0 ; 0 0 -1]), SqSMatrix{3,Float64}([0 -1 0; 1 0 0 ; 0 0 1 ]), SqSMatrix{3,Float64}([0 1 0 ; -1 0 0; 0 0 1 ]), SqSMatrix{3,Float64}([0 1 0 ; -1 0 0; 0 0 -1]), SqSMatrix{3,Float64}([0 -1 0; 1 0 0 ; 0 0 -1]), SqSMatrix{3,Float64}([0 1 0 ; 1 0 0 ; 0 0 -1]), SqSMatrix{3,Float64}([0 -1 0; -1 0 0; 0 0 -1]), SqSMatrix{3,Float64}([0 -1 0; -1 0 0; 0 0 1 ]), SqSMatrix{3,Float64}([0 1 0 ; 1 0 0 ; 0 0 1 ]), SqSMatrix{3,Float64}([0 -1 0; 1 -1 0; 0 0 1 ]), SqSMatrix{3,Float64}([-1 1 0; -1 0 0; 0 0 1 ]), SqSMatrix{3,Float64}([0 1 0 ; -1 1 0; 0 0 -1]), SqSMatrix{3,Float64}([1 -1 0; 1 0 0 ; 0 0 -1]), SqSMatrix{3,Float64}([1 0 0 ; 1 -1 0; 0 0 -1]), SqSMatrix{3,Float64}([-1 1 0; 0 1 0 ; 0 0 -1]), SqSMatrix{3,Float64}([1 -1 0; 0 -1 0; 0 0 -1]), SqSMatrix{3,Float64}([-1 0 0; -1 1 0; 0 0 -1]), SqSMatrix{3,Float64}([-1 1 0; 0 1 0 ; 0 0 1 ]), SqSMatrix{3,Float64}([1 0 0 ; 1 -1 0; 0 0 1 ]), SqSMatrix{3,Float64}([-1 0 0; -1 1 0; 0 0 1 ]), SqSMatrix{3,Float64}([1 -1 0; 0 -1 0; 0 0 1 ]), SqSMatrix{3,Float64}([1 -1 0; 1 0 0 ; 0 0 1 ]), SqSMatrix{3,Float64}([0 1 0 ; -1 1 0; 0 0 1 ]), SqSMatrix{3,Float64}([-1 1 0; -1 0 0; 0 0 -1]), SqSMatrix{3,Float64}([0 -1 0; 1 -1 0; 0 0 -1]), SqSMatrix{3,Float64}([0 0 1 ; 1 0 0 ; 0 1 0 ]), SqSMatrix{3,Float64}([0 1 0 ; 0 0 1 ; 1 0 0 ]), SqSMatrix{3,Float64}([0 -1 0; 0 0 1 ; -1 0 0]), SqSMatrix{3,Float64}([0 0 -1; -1 0 0; 0 1 0 ]), SqSMatrix{3,Float64}([0 -1 0; 0 0 -1; 1 0 0 ]), SqSMatrix{3,Float64}([0 0 1 ; -1 0 0; 0 -1 0]), SqSMatrix{3,Float64}([0 1 0 ; 0 0 -1; -1 0 0]), SqSMatrix{3,Float64}([0 0 -1; 1 0 0 ; 0 -1 0]), SqSMatrix{3,Float64}([0 0 -1; -1 0 0; 0 -1 0]), SqSMatrix{3,Float64}([0 -1 0; 0 0 -1; -1 0 0]), SqSMatrix{3,Float64}([0 1 0 ; 0 0 -1; 1 0 0 ]), SqSMatrix{3,Float64}([0 0 1 ; 1 0 0 ; 0 -1 0]), SqSMatrix{3,Float64}([0 1 0 ; 0 0 1 ; -1 0 0]), SqSMatrix{3,Float64}([0 0 -1; 1 0 0 ; 0 1 0 ]), SqSMatrix{3,Float64}([0 -1 0; 0 0 1 ; 1 0 0 ]), SqSMatrix{3,Float64}([0 0 1 ; -1 0 0; 0 1 0 ]), SqSMatrix{3,Float64}([1 0 0 ; 0 0 -1; 0 1 0 ]), SqSMatrix{3,Float64}([1 0 0 ; 0 0 1 ; 0 -1 0]), SqSMatrix{3,Float64}([0 0 1 ; 0 1 0 ; -1 0 0]), SqSMatrix{3,Float64}([0 0 -1; 0 1 0 ; 1 0 0 ]), SqSMatrix{3,Float64}([-1 0 0; 0 0 1 ; 0 1 0 ]), SqSMatrix{3,Float64}([-1 0 0; 0 0 -1; 0 -1 0]), SqSMatrix{3,Float64}([0 0 1 ; 0 -1 0; 1 0 0 ]), SqSMatrix{3,Float64}([0 0 -1; 0 -1 0; -1 0 0]), SqSMatrix{3,Float64}([-1 0 0; 0 0 1 ; 0 -1 0]), SqSMatrix{3,Float64}([-1 0 0; 0 0 -1; 0 1 0 ]), SqSMatrix{3,Float64}([0 0 -1; 0 -1 0; 1 0 0 ]), SqSMatrix{3,Float64}([0 0 1 ; 0 -1 0; -1 0 0]), SqSMatrix{3,Float64}([1 0 0 ; 0 0 -1; 0 -1 0]), SqSMatrix{3,Float64}([1 0 0 ; 0 0 1 ; 0 1 0 ]), SqSMatrix{3,Float64}([0 0 -1; 0 1 0 ; -1 0 0]), SqSMatrix{3,Float64}([0 0 1 ; 0 1 0 ; 1 0 0 ]), ] const TRANSLATIONS_3D = [ # needed for Litvin magnetic space group data SVector{3,Float64}(0, 0, 0), SVector{3,Float64}(0, 0, 0.5), SVector{3,Float64}(0.5, 0, 0), SVector{3,Float64}(0, 0.5, 0), SVector{3,Float64}(0.5, 0.5, 0), SVector{3,Float64}(0.5, 0, 0.5), SVector{3,Float64}(0, 0.5, 0.5), SVector{3,Float64}(0.5, 0.5, 0.5), SVector{3,Float64}(0.25, 0.25, 0.25), SVector{3,Float64}(0.75, 0.75, 0.75), SVector{3,Float64}(0, 0.75, 0.75), SVector{3,Float64}(0.75, 0, 0.75), SVector{3,Float64}(0.75, 0.75, 0), SVector{3,Float64}(0, 0.25, 0.25), SVector{3,Float64}(0.25, 0, 0.25), SVector{3,Float64}(0.25, 0.25, 0), SVector{3,Float64}(0.5, 0.25, 0.25), SVector{3,Float64}(0.25, 0.5, 0.25), SVector{3,Float64}(0.25, 0.25, 0.5), SVector{3,Float64}(0.5, 0.75, 0.75), SVector{3,Float64}(0.75, 0.5, 0.75), SVector{3,Float64}(0.75, 0.75, 0.5), SVector{3,Float64}(0, 0, 0.25), SVector{3,Float64}(0, 0, 0.75), SVector{3,Float64}(0.5, 0.5, 0.25), SVector{3,Float64}(0.5, 0.5, 0.75), SVector{3,Float64}(0, 0.5, 0.25), SVector{3,Float64}(0.5, 0, 0.25), SVector{3,Float64}(0.75, 0.25, 0.25), SVector{3,Float64}(0.25, 0.75, 0.75), SVector{3,Float64}(0.25, 0.75, 0.25), SVector{3,Float64}(0.75, 0.75, 0.25), SVector{3,Float64}(0.75, 0.25, 0.75), SVector{3,Float64}(0.25, 0.25, 0.75), SVector{3,Float64}(0, 0, 1/3), SVector{3,Float64}(0, 0, 2/3), SVector{3,Float64}(0, 0, 5/6), SVector{3,Float64}(0, 0, 1/6), # extra entries for ISOTROPY space group data SVector{3,Float64}(0.5, 0, 0.75), SVector{3,Float64}(0, 0.5, 0.75), SVector{3,Float64}(0.75, 0.25, 0.5), SVector{3,Float64}(0.25, 0.5, 0.75), SVector{3,Float64}(0.5, 0.75, 0.25), SVector{3,Float64}(0.25, 0.75, 0.5), SVector{3,Float64}(0.75, 0.5, 0.25), SVector{3,Float64}(0.5, 0.25, 0.75), SVector{3,Float64}(0.75, 0.25, 0), SVector{3,Float64}(0.25, 0, 0.75), SVector{3,Float64}(0, 0.75, 0.25), SVector{3,Float64}(0.25, 0.75, 0), SVector{3,Float64}(0.75, 0, 0.25), SVector{3,Float64}(0, 0.25, 0.75), # extra entries for `generators` data SVector{3,Float64}(2/3, 1/3, 1/3), ] const ROTATIONS_2D = [ SqSMatrix{2,Float64}([1 0 ; 0 1]), SqSMatrix{2,Float64}([-1 0; 0 -1]), SqSMatrix{2,Float64}([-1 0; 0 1]), SqSMatrix{2,Float64}([1 0 ; 0 -1]), SqSMatrix{2,Float64}([0 -1; 1 0]), SqSMatrix{2,Float64}([0 1 ; -1 0]), SqSMatrix{2,Float64}([0 1 ; 1 0]), SqSMatrix{2,Float64}([0 -1; -1 0]), SqSMatrix{2,Float64}([0 -1; 1 -1]), SqSMatrix{2,Float64}([-1 1; -1 0]), SqSMatrix{2,Float64}([-1 1; 0 1]), SqSMatrix{2,Float64}([1 0 ; 1 -1]), SqSMatrix{2,Float64}([1 -1; 0 -1]), SqSMatrix{2,Float64}([-1 0; -1 1]), SqSMatrix{2,Float64}([0 1 ; -1 1]), SqSMatrix{2,Float64}([1 -1; 1 0]), ] const TRANSLATIONS_2D = [ SVector{2,Float64}(0, 0), SVector{2,Float64}(0, 0.5), SVector{2,Float64}(0.5, 0.5), SVector{2,Float64}(0.5, 0), ] const ROTATIONS_1D = [ SqSMatrix{1,Float64}([1;;]), SqSMatrix{1,Float64}([-1;;]), ] const TRANSLATIONS_1D = [ SVector{1,Float64}(0), ]
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2068
# generated from original `xyzt`-based data via: # begin # io = stdout # println(io, "PG_GENS_CODES_Ds = (") # for D in 1:3 # pglabs = Crystalline.PG_IUCs[D] # gensv = generators_from_xyzt.(pglabs, PointGroup{D}) # ROTATIONS = D == 3 ? Crystalline.ROTATIONS_3D : # D == 2 ? Crystalline.ROTATIONS_2D : # D == 1 ? Crystalline.ROTATIONS_1D : error() # println(io, "# PointGroup{", D, "}") # println(io, "Dict{String,Vector{Int8}}(") # for (pglab, gens) in zip(pglabs, gensv) # Nops = length(gens) # pg_codes = Vector{Int8}(undef, Nops) # idx = 0 # for (n,op) in enumerate(gens) # r = rotation(op) # r_idx = Int8(something(findfirst(==(r), ROTATIONS))) # pg_codes[idx+=1] = r_idx # end # print(io, "\"", pglab, "\" => [") # join(io, pg_codes, ",") # println(io, "],") # end # println(io, "),") # end # println(io, ")") # end const PG_GENS_CODES_Ds = ( # PointGroup{1} Dict{String,Vector{Int8}}( "1" => [1], "m" => [2], ), # PointGroup{2} Dict{String,Vector{Int8}}( "1" => [1], "2" => [2], "m" => [3], "mm2" => [2,3], "4" => [2,5], "4mm" => [2,5,3], "3" => [9], "3m1" => [9,8], "31m" => [9,7], "6" => [9,2], "6mm" => [9,2,8], ), # PointGroup{3} Dict{String,Vector{Int8}}( "1" => [1], "-1" => [2], "2" => [3], "m" => [4], "2/m" => [3,2], "222" => [6,3], "mm2" => [6,4], "mmm" => [6,3,2], "4" => [6,9], "-4" => [6,11], "4/m" => [6,9,2], "422" => [6,9,3], "4mm" => [6,9,4], "-42m" => [6,11,3], "-4m2" => [6,11,4], "4/mmm" => [6,9,3,2], "3" => [17], "-3" => [17,2], "312" => [17,14], "321" => [17,13], "3m1" => [17,15], "31m" => [17,16], "-31m" => [17,14,2], "-3m1" => [17,13,2], "6" => [17,6], "-6" => [17,8], "6/m" => [17,6,2], "622" => [17,6,13], "6mm" => [17,6,15], "-62m" => [17,8,13], "-6m2" => [17,8,15], "6/mmm" => [17,6,13,2], "23" => [6,3,33], "m-3" => [6,3,33,2], "432" => [6,3,33,13], "-43m" => [6,3,33,16], "m-3m" => [6,3,33,13,2], ) )
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
9319
# generated from original `xyzt`-based data via: # io = stdout # println(io, "SG_GENS_CODES_Ds = (") # for D in 1:3 # sgnums = 1:MAX_SGNUM[D] # gensv = generators_from_xyzt.(sgnums, SpaceGroup{D}) # ROTATIONS = D == 3 ? Crystalline.ROTATIONS_3D : # D == 2 ? Crystalline.ROTATIONS_2D : # D == 1 ? Crystalline.ROTATIONS_1D : error() # TRANSLATIONS = D == 3 ? Crystalline.TRANSLATIONS_3D : # D == 2 ? Crystalline.TRANSLATIONS_2D : # D == 1 ? Crystalline.TRANSLATIONS_1D : error() # println(io, "# ", SpaceGroup{D}) # println(io, "Vector{Tuple{Int8,Int8}}[") # for (sgnum, gens) in zip(sgnums, gensv) # Nops = length(gens) # pg_codes = Vector{Tuple{Int8, Int8}}(undef, Nops) # idx = 0 # for (n,op) in enumerate(gens) # r, t = rotation(op), translation(op) # r_idx = Int8(@something findfirst(==(r), ROTATIONS) error("could not find r = $r")) # t_idx = Int8(@something findfirst(==(t), TRANSLATIONS) error("could not find t = $t")) # pg_codes[idx+=1] = (r_idx, t_idx) # end # print(io, "#=", sgnum, "=# [") # for (idx, pg_code) in enumerate(pg_codes) # print(io, "(") # join(io, pg_code, ",") # print(io, ")") # idx ≠ length(pg_codes) && print(io, ",") # end # println(io, "],") # end # println(io, "],") # end # println(io, ")") SG_GENS_CODES_Vs = ( # SpaceGroup{1} Vector{Tuple{Int8,Int8}}[ #=1=# [(1,1)], #=2=# [(2,1)], ], # SpaceGroup{2} Vector{Tuple{Int8,Int8}}[ #=1=# [(1,1)], #=2=# [(2,1)], #=3=# [(3,1)], #=4=# [(3,2)], #=5=# [(3,1),(1,3)], #=6=# [(2,1),(3,1)], #=7=# [(2,1),(3,4)], #=8=# [(2,1),(3,3)], #=9=# [(2,1),(3,1),(1,3)], #=10=# [(2,1),(5,1)], #=11=# [(2,1),(5,1),(3,1)], #=12=# [(2,1),(5,1),(3,3)], #=13=# [(9,1)], #=14=# [(9,1),(8,1)], #=15=# [(9,1),(7,1)], #=16=# [(9,1),(2,1)], #=17=# [(9,1),(2,1),(8,1)], ], # SpaceGroup{3} Vector{Tuple{Int8,Int8}}[ #=1=# [(1,1)], #=2=# [(2,1)], #=3=# [(3,1)], #=4=# [(3,4)], #=5=# [(3,1),(1,5)], #=6=# [(4,1)], #=7=# [(4,2)], #=8=# [(4,1),(1,5)], #=9=# [(4,2),(1,5)], #=10=# [(3,1),(2,1)], #=11=# [(3,4),(2,1)], #=12=# [(3,1),(2,1),(1,5)], #=13=# [(3,2),(2,1)], #=14=# [(3,7),(2,1)], #=15=# [(3,2),(2,1),(1,5)], #=16=# [(6,1),(3,1)], #=17=# [(6,2),(3,2)], #=18=# [(6,1),(3,5)], #=19=# [(6,6),(3,7)], #=20=# [(6,2),(3,2),(1,5)], #=21=# [(6,1),(3,1),(1,5)], #=22=# [(6,1),(3,1),(1,7),(1,6)], #=23=# [(6,1),(3,1),(1,8)], #=24=# [(6,6),(3,7),(1,8)], #=25=# [(6,1),(4,1)], #=26=# [(6,2),(4,2)], #=27=# [(6,1),(4,2)], #=28=# [(6,1),(4,3)], #=29=# [(6,2),(4,3)], #=30=# [(6,1),(4,7)], #=31=# [(6,6),(4,6)], #=32=# [(6,1),(4,5)], #=33=# [(6,2),(4,5)], #=34=# [(6,1),(4,8)], #=35=# [(6,1),(4,1),(1,5)], #=36=# [(6,2),(4,2),(1,5)], #=37=# [(6,1),(4,2),(1,5)], #=38=# [(6,1),(4,1),(1,7)], #=39=# [(6,1),(4,4),(1,7)], #=40=# [(6,1),(4,3),(1,7)], #=41=# [(6,1),(4,5),(1,7)], #=42=# [(6,1),(4,1),(1,7),(1,6)], #=43=# [(6,1),(4,9),(1,7),(1,6)], #=44=# [(6,1),(4,1),(1,8)], #=45=# [(6,1),(4,5),(1,8)], #=46=# [(6,1),(4,3),(1,8)], #=47=# [(6,1),(3,1),(2,1)], #=48=# [(6,5),(3,6),(2,1)], #=49=# [(6,1),(3,2),(2,1)], #=50=# [(6,5),(3,3),(2,1)], #=51=# [(6,3),(3,1),(2,1)], #=52=# [(6,3),(3,8),(2,1)], #=53=# [(6,6),(3,6),(2,1)], #=54=# [(6,3),(3,2),(2,1)], #=55=# [(6,1),(3,5),(2,1)], #=56=# [(6,5),(3,7),(2,1)], #=57=# [(6,2),(3,7),(2,1)], #=58=# [(6,1),(3,8),(2,1)], #=59=# [(6,5),(3,4),(2,1)], #=60=# [(6,8),(3,2),(2,1)], #=61=# [(6,6),(3,7),(2,1)], #=62=# [(6,6),(3,4),(2,1)], #=63=# [(6,2),(3,2),(2,1),(1,5)], #=64=# [(6,7),(3,7),(2,1),(1,5)], #=65=# [(6,1),(3,1),(2,1),(1,5)], #=66=# [(6,1),(3,2),(2,1),(1,5)], #=67=# [(6,4),(3,4),(2,1),(1,5)], #=68=# [(6,3),(3,2),(2,1),(1,5)], #=69=# [(6,1),(3,1),(2,1),(1,7),(1,6)], #=70=# [(6,13),(3,12),(2,1),(1,7),(1,6)], #=71=# [(6,1),(3,1),(2,1),(1,8)], #=72=# [(6,1),(3,5),(2,1),(1,8)], #=73=# [(6,6),(3,7),(2,1),(1,8)], #=74=# [(6,4),(3,4),(2,1),(1,8)], #=75=# [(6,1),(9,1)], #=76=# [(6,2),(9,23)], #=77=# [(6,1),(9,2)], #=78=# [(6,2),(9,24)], #=79=# [(6,1),(9,1),(1,8)], #=80=# [(6,8),(9,27),(1,8)], #=81=# [(6,1),(11,1)], #=82=# [(6,1),(11,1),(1,8)], #=83=# [(6,1),(9,1),(2,1)], #=84=# [(6,1),(9,2),(2,1)], #=85=# [(6,5),(9,3),(2,1)], #=86=# [(6,5),(9,7),(2,1)], #=87=# [(6,1),(9,1),(2,1),(1,8)], #=88=# [(6,6),(9,29),(2,1),(1,8)], #=89=# [(6,1),(9,1),(3,1)], #=90=# [(6,1),(9,5),(3,5)], #=91=# [(6,2),(9,23),(3,1)], #=92=# [(6,2),(9,25),(3,25)], #=93=# [(6,1),(9,2),(3,1)], #=94=# [(6,1),(9,8),(3,8)], #=95=# [(6,2),(9,24),(3,1)], #=96=# [(6,2),(9,26),(3,26)], #=97=# [(6,1),(9,1),(3,1),(1,8)], #=98=# [(6,8),(9,27),(3,39),(1,8)], #=99=# [(6,1),(9,1),(4,1)], #=100=# [(6,1),(9,1),(4,5)], #=101=# [(6,1),(9,2),(4,2)], #=102=# [(6,1),(9,8),(4,8)], #=103=# [(6,1),(9,1),(4,2)], #=104=# [(6,1),(9,1),(4,8)], #=105=# [(6,1),(9,2),(4,1)], #=106=# [(6,1),(9,2),(4,5)], #=107=# [(6,1),(9,1),(4,1),(1,8)], #=108=# [(6,1),(9,1),(4,2),(1,8)], #=109=# [(6,8),(9,27),(4,1),(1,8)], #=110=# [(6,8),(9,27),(4,2),(1,8)], #=111=# [(6,1),(11,1),(3,1)], #=112=# [(6,1),(11,1),(3,2)], #=113=# [(6,1),(11,1),(3,5)], #=114=# [(6,1),(11,1),(3,8)], #=115=# [(6,1),(11,1),(4,1)], #=116=# [(6,1),(11,1),(4,2)], #=117=# [(6,1),(11,1),(4,5)], #=118=# [(6,1),(11,1),(4,8)], #=119=# [(6,1),(11,1),(4,1),(1,8)], #=120=# [(6,1),(11,1),(4,2),(1,8)], #=121=# [(6,1),(11,1),(3,1),(1,8)], #=122=# [(6,1),(11,1),(3,39),(1,8)], #=123=# [(6,1),(9,1),(3,1),(2,1)], #=124=# [(6,1),(9,1),(3,2),(2,1)], #=125=# [(6,5),(9,3),(3,3),(2,1)], #=126=# [(6,5),(9,3),(3,6),(2,1)], #=127=# [(6,1),(9,1),(3,5),(2,1)], #=128=# [(6,1),(9,1),(3,8),(2,1)], #=129=# [(6,5),(9,3),(3,4),(2,1)], #=130=# [(6,5),(9,3),(3,7),(2,1)], #=131=# [(6,1),(9,2),(3,1),(2,1)], #=132=# [(6,1),(9,2),(3,2),(2,1)], #=133=# [(6,5),(9,6),(3,3),(2,1)], #=134=# [(6,5),(9,6),(3,6),(2,1)], #=135=# [(6,1),(9,2),(3,5),(2,1)], #=136=# [(6,1),(9,8),(3,8),(2,1)], #=137=# [(6,5),(9,6),(3,4),(2,1)], #=138=# [(6,5),(9,6),(3,7),(2,1)], #=139=# [(6,1),(9,1),(3,1),(2,1),(1,8)], #=140=# [(6,1),(9,1),(3,2),(2,1),(1,8)], #=141=# [(6,6),(9,31),(3,6),(2,1),(1,8)], #=142=# [(6,6),(9,31),(3,3),(2,1),(1,8)], #=143=# [(17,1)], #=144=# [(17,35)], #=145=# [(17,36)], #=146=# [(17,1),(1,53)], #=147=# [(17,1),(2,1)], #=148=# [(17,1),(2,1),(1,53)], #=149=# [(17,1),(14,1)], #=150=# [(17,1),(13,1)], #=151=# [(17,35),(14,36)], #=152=# [(17,35),(13,1)], #=153=# [(17,36),(14,35)], #=154=# [(17,36),(13,1)], #=155=# [(17,1),(13,1),(1,53)], #=156=# [(17,1),(15,1)], #=157=# [(17,1),(16,1)], #=158=# [(17,1),(15,2)], #=159=# [(17,1),(16,2)], #=160=# [(17,1),(15,1),(1,53)], #=161=# [(17,1),(15,2),(1,53)], #=162=# [(17,1),(14,1),(2,1)], #=163=# [(17,1),(14,2),(2,1)], #=164=# [(17,1),(13,1),(2,1)], #=165=# [(17,1),(13,2),(2,1)], #=166=# [(17,1),(13,1),(2,1),(1,53)], #=167=# [(17,1),(13,2),(2,1),(1,53)], #=168=# [(17,1),(6,1)], #=169=# [(17,35),(6,2)], #=170=# [(17,36),(6,2)], #=171=# [(17,36),(6,1)], #=172=# [(17,35),(6,1)], #=173=# [(17,1),(6,2)], #=174=# [(17,1),(8,1)], #=175=# [(17,1),(6,1),(2,1)], #=176=# [(17,1),(6,2),(2,1)], #=177=# [(17,1),(6,1),(13,1)], #=178=# [(17,35),(6,2),(13,35)], #=179=# [(17,36),(6,2),(13,36)], #=180=# [(17,36),(6,1),(13,36)], #=181=# [(17,35),(6,1),(13,35)], #=182=# [(17,1),(6,2),(13,1)], #=183=# [(17,1),(6,1),(15,1)], #=184=# [(17,1),(6,1),(15,2)], #=185=# [(17,1),(6,2),(15,2)], #=186=# [(17,1),(6,2),(15,1)], #=187=# [(17,1),(8,1),(15,1)], #=188=# [(17,1),(8,2),(15,2)], #=189=# [(17,1),(8,1),(13,1)], #=190=# [(17,1),(8,2),(13,1)], #=191=# [(17,1),(6,1),(13,1),(2,1)], #=192=# [(17,1),(6,1),(13,2),(2,1)], #=193=# [(17,1),(6,2),(13,2),(2,1)], #=194=# [(17,1),(6,2),(13,1),(2,1)], #=195=# [(6,1),(3,1),(33,1)], #=196=# [(6,1),(3,1),(33,1),(1,7),(1,6)], #=197=# [(6,1),(3,1),(33,1),(1,8)], #=198=# [(6,6),(3,7),(33,1)], #=199=# [(6,6),(3,7),(33,1),(1,8)], #=200=# [(6,1),(3,1),(33,1),(2,1)], #=201=# [(6,5),(3,6),(33,1),(2,1)], #=202=# [(6,1),(3,1),(33,1),(2,1),(1,7),(1,6)], #=203=# [(6,13),(3,12),(33,1),(2,1),(1,7),(1,6)], #=204=# [(6,1),(3,1),(33,1),(2,1),(1,8)], #=205=# [(6,6),(3,7),(33,1),(2,1)], #=206=# [(6,6),(3,7),(33,1),(2,1),(1,8)], #=207=# [(6,1),(3,1),(33,1),(13,1)], #=208=# [(6,1),(3,1),(33,1),(13,8)], #=209=# [(6,1),(3,1),(33,1),(13,1),(1,7),(1,6)], #=210=# [(6,7),(3,5),(33,1),(13,33),(1,7),(1,6)], #=211=# [(6,1),(3,1),(33,1),(13,1),(1,8)], #=212=# [(6,6),(3,7),(33,1),(13,30)], #=213=# [(6,6),(3,7),(33,1),(13,29)], #=214=# [(6,6),(3,7),(33,1),(13,29),(1,8)], #=215=# [(6,1),(3,1),(33,1),(16,1)], #=216=# [(6,1),(3,1),(33,1),(16,1),(1,7),(1,6)], #=217=# [(6,1),(3,1),(33,1),(16,1),(1,8)], #=218=# [(6,1),(3,1),(33,1),(16,8)], #=219=# [(6,1),(3,1),(33,1),(16,8),(1,7),(1,6)], #=220=# [(6,6),(3,7),(33,1),(16,9),(1,8)], #=221=# [(6,1),(3,1),(33,1),(13,1),(2,1)], #=222=# [(6,5),(3,6),(33,1),(13,2),(2,1)], #=223=# [(6,1),(3,1),(33,1),(13,8),(2,1)], #=224=# [(6,5),(3,6),(33,1),(13,5),(2,1)], #=225=# [(6,1),(3,1),(33,1),(13,1),(2,1),(1,7),(1,6)], #=226=# [(6,1),(3,1),(33,1),(13,8),(2,1),(1,7),(1,6)], #=227=# [(6,41),(3,42),(33,1),(13,41),(2,1),(1,7),(1,6)], #=228=# [(6,44),(3,45),(33,1),(13,47),(2,1),(1,7),(1,6)], #=229=# [(6,1),(3,1),(33,1),(13,1),(2,1),(1,8)], #=230=# [(6,6),(3,7),(33,1),(13,29),(2,1),(1,8)], ], )
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
5898
# generated from original `xyzt`-based data via: # io = stdout # println(io, "SUBG_GENS_CODES_Ds = ImmutableDict(") # for (D,P) in ((3,2), (3,1), (2,1)) # sgnums = 1:MAX_SUBGNUM[(D,P)] # gensv = generators_from_xyzt.(sgnums, SubperiodicGroup{D,P}) # ROTATIONS = D == 3 ? Crystalline.ROTATIONS_3D : # D == 2 ? Crystalline.ROTATIONS_2D : # D == 1 ? Crystalline.ROTATIONS_1D : error() # TRANSLATIONS = D == 3 ? Crystalline.TRANSLATIONS_3D : # D == 2 ? Crystalline.TRANSLATIONS_2D : # D == 1 ? Crystalline.TRANSLATIONS_1D : error() # println(io, "# ", SubperiodicGroup{D, P}) # println(io, (D,P), " => Vector{Tuple{Int8,Int8}}[") # for (sgnum, gens) in zip(sgnums, gensv) # Nops = length(gens) # pg_codes = Vector{Tuple{Int8, Int8}}(undef, Nops) # idx = 0 # for (n, op) in enumerate(gens) # r, t = rotation(op), translation(op) # r_idx = Int8(@something findfirst(==(r), ROTATIONS) error("could not find r = $r")) # t_idx = Int8(@something findfirst(==(t), TRANSLATIONS) error("could not find t = $t")) # pg_codes[idx+=1] = (r_idx, t_idx) # end # print(io, "#=", sgnum, "=# [") # for (idx, pg_code) in enumerate(pg_codes) # print(io, "(") # join(io, pg_code, ",") # print(io, ")") # idx ≠ length(pg_codes) && print(io, ",") # end # println(io, "],") # end # println(io, "],") # end # println(io, ")") SUBG_GENS_CODES_Vs = Base.ImmutableDict( # SubperiodicGroup{3, 2} (3, 2) => Vector{Tuple{Int8,Int8}}[ #=1=# [(1,1)], #=2=# [(2,1)], #=3=# [(6,1)], #=4=# [(8,1)], #=5=# [(8,3)], #=6=# [(6,1),(2,1)], #=7=# [(6,3),(2,1)], #=8=# [(5,1)], #=9=# [(5,3)], #=10=# [(5,1),(1,5)], #=11=# [(7,1)], #=12=# [(7,4)], #=13=# [(7,1),(1,5)], #=14=# [(5,1),(2,1)], #=15=# [(5,3),(2,1)], #=16=# [(5,4),(2,1)], #=17=# [(5,5),(2,1)], #=18=# [(5,1),(2,1),(1,5)], #=19=# [(6,1),(3,1)], #=20=# [(5,3),(3,3)], #=21=# [(6,1),(3,5)], #=22=# [(6,1),(3,1),(1,5)], #=23=# [(6,1),(4,1)], #=24=# [(6,1),(4,3)], #=25=# [(6,1),(4,5)], #=26=# [(6,1),(4,1),(1,5)], #=27=# [(3,1),(7,1)], #=28=# [(3,4),(8,4)], #=29=# [(3,4),(7,4)], #=30=# [(3,1),(8,4)], #=31=# [(3,1),(8,3)], #=32=# [(3,5),(8,5)], #=33=# [(3,4),(8,3)], #=34=# [(3,1),(7,5)], #=35=# [(3,1),(7,1),(1,5)], #=36=# [(3,1),(7,3),(1,5)], #=37=# [(6,1),(3,1),(2,1)], #=38=# [(5,1),(6,3),(2,1)], #=39=# [(6,5),(3,3),(2,1)], #=40=# [(3,3),(6,1),(2,1)], #=41=# [(6,3),(3,1),(2,1)], #=42=# [(3,5),(6,5),(2,1)], #=43=# [(5,4),(6,3),(2,1)], #=44=# [(6,1),(3,5),(2,1)], #=45=# [(3,4),(5,5),(2,1)], #=46=# [(6,5),(3,4),(2,1)], #=47=# [(6,1),(3,1),(2,1),(1,5)], #=48=# [(6,4),(3,4),(2,1),(1,5)], #=49=# [(6,1),(9,1)], #=50=# [(6,1),(11,1)], #=51=# [(6,1),(9,1),(2,1)], #=52=# [(6,5),(9,3),(2,1)], #=53=# [(6,1),(9,1),(3,1)], #=54=# [(6,1),(9,1),(3,5)], #=55=# [(6,1),(9,1),(4,1)], #=56=# [(6,1),(9,1),(4,5)], #=57=# [(6,1),(11,1),(3,1)], #=58=# [(6,1),(11,1),(3,5)], #=59=# [(6,1),(11,1),(4,1)], #=60=# [(6,1),(11,1),(4,5)], #=61=# [(6,1),(9,1),(3,1),(2,1)], #=62=# [(6,5),(9,3),(3,3),(2,1)], #=63=# [(6,1),(9,1),(3,5),(2,1)], #=64=# [(6,5),(9,3),(3,4),(2,1)], #=65=# [(17,1)], #=66=# [(17,1),(2,1)], #=67=# [(17,1),(14,1)], #=68=# [(17,1),(13,1)], #=69=# [(17,1),(15,1)], #=70=# [(17,1),(16,1)], #=71=# [(17,1),(14,1),(2,1)], #=72=# [(17,1),(13,1),(2,1)], #=73=# [(17,1),(6,1)], #=74=# [(17,1),(8,1)], #=75=# [(17,1),(6,1),(2,1)], #=76=# [(17,1),(6,1),(13,1)], #=77=# [(17,1),(6,1),(15,1)], #=78=# [(17,1),(8,1),(15,1)], #=79=# [(17,1),(8,1),(13,1)], #=80=# [(17,1),(6,1),(13,1),(2,1)], ], # SubperiodicGroup{3, 1} (3, 1) => Vector{Tuple{Int8,Int8}}[ #=1=# [(1,1)], #=2=# [(2,1)], #=3=# [(5,1)], #=4=# [(7,1)], #=5=# [(7,2)], #=6=# [(5,1),(2,1)], #=7=# [(5,2),(2,1)], #=8=# [(6,1)], #=9=# [(6,2)], #=10=# [(8,1)], #=11=# [(6,1),(2,1)], #=12=# [(6,2),(2,1)], #=13=# [(6,1),(3,1)], #=14=# [(6,2),(3,2)], #=15=# [(6,1),(4,1)], #=16=# [(6,1),(4,2)], #=17=# [(6,2),(4,2)], #=18=# [(5,1),(8,1)], #=19=# [(5,1),(4,2)], #=20=# [(6,1),(3,1),(2,1)], #=21=# [(6,1),(3,2),(2,1)], #=22=# [(3,2),(5,1),(2,1)], #=23=# [(6,1),(9,1)], #=24=# [(6,2),(9,23)], #=25=# [(6,1),(9,2)], #=26=# [(6,2),(9,24)], #=27=# [(6,1),(11,1)], #=28=# [(6,1),(9,1),(2,1)], #=29=# [(6,1),(9,2),(2,1)], #=30=# [(6,1),(9,1),(3,1)], #=31=# [(6,2),(9,23),(5,1)], #=32=# [(6,1),(9,2),(3,1)], #=33=# [(6,2),(9,24),(5,1)], #=34=# [(6,1),(9,1),(4,1)], #=35=# [(6,1),(9,2),(4,2)], #=36=# [(6,1),(9,1),(4,2)], #=37=# [(6,1),(11,1),(3,1)], #=38=# [(6,1),(11,1),(3,2)], #=39=# [(6,1),(9,1),(3,1),(2,1)], #=40=# [(6,1),(9,1),(3,2),(2,1)], #=41=# [(6,1),(9,2),(3,1),(2,1)], #=42=# [(17,1)], #=43=# [(17,35)], #=44=# [(17,36)], #=45=# [(17,1),(2,1)], #=46=# [(17,1),(14,1)], #=47=# [(17,35),(14,36)], #=48=# [(17,36),(14,35)], #=49=# [(17,1),(15,1)], #=50=# [(17,1),(15,2)], #=51=# [(17,1),(14,1),(2,1)], #=52=# [(17,1),(14,2),(2,1)], #=53=# [(17,1),(6,1)], #=54=# [(17,35),(6,2)], #=55=# [(17,36),(6,1)], #=56=# [(17,1),(6,2)], #=57=# [(17,35),(6,1)], #=58=# [(17,36),(6,2)], #=59=# [(17,1),(8,1)], #=60=# [(17,1),(6,1),(2,1)], #=61=# [(17,1),(6,2),(2,1)], #=62=# [(17,1),(6,1),(13,1)], #=63=# [(17,35),(6,2),(13,35)], #=64=# [(17,36),(6,1),(13,36)], #=65=# [(17,1),(6,2),(13,1)], #=66=# [(17,35),(6,1),(13,35)], #=67=# [(17,36),(6,2),(13,36)], #=68=# [(17,1),(6,1),(15,1)], #=69=# [(17,1),(6,1),(15,2)], #=70=# [(17,1),(6,2),(15,1)], #=71=# [(17,1),(8,1),(15,1)], #=72=# [(17,1),(8,1),(15,2)], #=73=# [(17,1),(6,1),(13,1),(2,1)], #=74=# [(17,1),(6,1),(13,2),(2,1)], #=75=# [(17,1),(6,2),(13,1),(2,1)], ], # SubperiodicGroup{2, 1} (2, 1) => Vector{Tuple{Int8,Int8}}[ #=1=# [(1,1)], #=2=# [(2,1)], #=3=# [(3,1)], #=4=# [(4,1)], #=5=# [(4,4)], #=6=# [(2,1),(3,1)], #=7=# [(2,1),(3,4)], ], )
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
240239
#= MSG_CODES_D = Dict{Tuple{Int, Int}, Vector{Tuple{Int8, Int8, Bool}}}() for msg in msgs msg_codes = Vector{Tuple{Int8, Int8, Bool}}(undef, length(msg)-1) for (n, mop) in enumerate(msg) op = mop.op tr = mop.op isone(op) && !tr && continue # skip identity (trivially in group): no need to list r, t = rotation(op), translation(op) r_idx = Int8(something(findfirst(==(r), ROTATIONS_3D))) t_idx = Int8(something(findfirst(==(t), TRANSLATIONS_3D))) msg_codes[n] = (r_idx, t_idx, tr) end MSG_CODES_D[msg.num] = msg_codes end =# const MOP_CODE = Tuple{Int8, Int8, Bool} const MSG_CODES_D = Dict{Tuple{Int, Int}, Vector{Tuple{Int8, Int8, Bool}}}( (1,1) => MOP_CODE[], (1,2) => MOP_CODE[(1,1,1)], (1,3) => MOP_CODE[(1,2,1)], (2,4) => MOP_CODE[(2,1,0)], (2,5) => MOP_CODE[(2,1,0),(1,1,1),(2,1,1)], (2,6) => MOP_CODE[(2,1,1)], (2,7) => MOP_CODE[(2,1,0),(1,2,1),(2,2,1)], (3,1) => MOP_CODE[(3,1,0)], (3,2) => MOP_CODE[(3,1,0),(1,1,1),(3,1,1)], (3,3) => MOP_CODE[(3,1,1)], (3,4) => MOP_CODE[(3,1,0),(1,3,1),(3,3,1)], (3,5) => MOP_CODE[(3,1,0),(1,4,1),(3,4,1)], (3,6) => MOP_CODE[(3,1,0),(1,5,1),(3,5,1)], (4,7) => MOP_CODE[(3,4,0)], (4,8) => MOP_CODE[(3,4,0),(1,1,1),(3,4,1)], (4,9) => MOP_CODE[(3,4,1)], (4,10) => MOP_CODE[(3,4,0),(1,3,1),(3,5,1)], (4,11) => MOP_CODE[(3,4,0),(1,4,1),(3,1,1)], (4,12) => MOP_CODE[(3,4,0),(1,5,1),(3,3,1)], (5,13) => MOP_CODE[(3,1,0)], (5,14) => MOP_CODE[(3,1,0),(1,1,1),(3,1,1)], (5,15) => MOP_CODE[(3,1,1)], (5,16) => MOP_CODE[(3,1,0),(1,2,1),(3,2,1)], (5,17) => MOP_CODE[(3,1,0),(1,3,1),(3,4,1)], (6,18) => MOP_CODE[(4,1,0)], (6,19) => MOP_CODE[(4,1,0),(1,1,1),(4,1,1)], (6,20) => MOP_CODE[(4,1,1)], (6,21) => MOP_CODE[(4,1,0),(1,3,1),(4,3,1)], (6,22) => MOP_CODE[(4,1,0),(1,4,1),(4,4,1)], (6,23) => MOP_CODE[(4,1,0),(1,5,1),(4,5,1)], (7,24) => MOP_CODE[(4,2,0)], (7,25) => MOP_CODE[(4,2,0),(1,1,1),(4,2,1)], (7,26) => MOP_CODE[(4,2,1)], (7,27) => MOP_CODE[(4,2,0),(1,3,1),(4,6,1)], (7,28) => MOP_CODE[(4,2,0),(1,2,1),(4,1,1)], (7,29) => MOP_CODE[(4,2,0),(1,4,1),(4,7,1)], (7,30) => MOP_CODE[(4,2,0),(1,5,1),(4,8,1)], (7,31) => MOP_CODE[(4,2,0),(1,7,1),(4,4,1)], (8,32) => MOP_CODE[(4,1,0)], (8,33) => MOP_CODE[(4,1,0),(1,1,1),(4,1,1)], (8,34) => MOP_CODE[(4,1,1)], (8,35) => MOP_CODE[(4,1,0),(1,2,1),(4,2,1)], (8,36) => MOP_CODE[(4,1,0),(1,3,1),(4,4,1)], (9,37) => MOP_CODE[(4,2,0)], (9,38) => MOP_CODE[(4,2,0),(1,1,1),(4,2,1)], (9,39) => MOP_CODE[(4,2,1)], (9,40) => MOP_CODE[(4,2,0),(1,2,1),(4,1,1)], (9,41) => MOP_CODE[(4,2,0),(1,3,1),(4,7,1)], (10,42) => MOP_CODE[(3,1,0),(2,1,0),(4,1,0)], (10,43) => MOP_CODE[(3,1,0),(2,1,0),(4,1,0),(1,1,1),(3,1,1),(2,1,1),(4,1,1)], (10,44) => MOP_CODE[(3,1,1),(2,1,1),(4,1,0)], (10,45) => MOP_CODE[(3,1,0),(2,1,1),(4,1,1)], (10,46) => MOP_CODE[(3,1,1),(2,1,0),(4,1,1)], (10,47) => MOP_CODE[(3,1,0),(2,1,0),(4,1,0),(1,3,1),(3,3,1),(2,3,1),(4,3,1)], (10,48) => MOP_CODE[(3,1,0),(2,1,0),(4,1,0),(1,4,1),(3,4,1),(2,4,1),(4,4,1)], (10,49) => MOP_CODE[(3,1,0),(2,1,0),(4,1,0),(1,5,1),(3,5,1),(2,5,1),(4,5,1)], (11,50) => MOP_CODE[(3,4,0),(2,1,0),(4,4,0)], (11,51) => MOP_CODE[(3,4,0),(2,1,0),(4,4,0),(1,1,1),(3,4,1),(2,1,1),(4,4,1)], (11,52) => MOP_CODE[(3,4,1),(2,1,1),(4,4,0)], (11,53) => MOP_CODE[(3,4,0),(2,1,1),(4,4,1)], (11,54) => MOP_CODE[(3,4,1),(2,1,0),(4,4,1)], (11,55) => MOP_CODE[(3,4,0),(2,1,0),(4,4,0),(1,3,1),(3,5,1),(2,3,1),(4,5,1)], (11,56) => MOP_CODE[(3,4,0),(2,1,0),(4,4,0),(1,4,1),(3,1,1),(2,4,1),(4,1,1)], (11,57) => MOP_CODE[(3,4,0),(2,1,0),(4,4,0),(1,5,1),(3,3,1),(2,5,1),(4,3,1)], (12,58) => MOP_CODE[(3,1,0),(2,1,0),(4,1,0)], (12,59) => MOP_CODE[(3,1,0),(2,1,0),(4,1,0),(1,1,1),(3,1,1),(2,1,1),(4,1,1)], (12,60) => MOP_CODE[(3,1,1),(2,1,1),(4,1,0)], (12,61) => MOP_CODE[(3,1,0),(2,1,1),(4,1,1)], (12,62) => MOP_CODE[(3,1,1),(2,1,0),(4,1,1)], (12,63) => MOP_CODE[(3,1,0),(2,1,0),(4,1,0),(1,2,1),(3,2,1),(2,2,1),(4,2,1)], (12,64) => MOP_CODE[(3,1,0),(2,1,0),(4,1,0),(1,3,1),(3,4,1),(2,4,1),(4,4,1)], (13,65) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0)], (13,66) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0),(1,1,1),(3,2,1),(2,1,1),(4,2,1)], (13,67) => MOP_CODE[(3,2,1),(2,1,1),(4,2,0)], (13,68) => MOP_CODE[(3,2,0),(2,1,1),(4,2,1)], (13,69) => MOP_CODE[(3,2,1),(2,1,0),(4,2,1)], (13,70) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0),(1,3,1),(3,6,1),(2,3,1),(4,6,1)], (13,71) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0),(1,4,1),(3,7,1),(2,4,1),(4,7,1)], (13,72) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0),(1,2,1),(3,1,1),(2,2,1),(4,1,1)], (13,73) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0),(1,7,1),(3,4,1),(2,7,1),(4,4,1)], (13,74) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0),(1,5,1),(3,8,1),(2,5,1),(4,8,1)], (14,75) => MOP_CODE[(3,7,0),(2,1,0),(4,7,0)], (14,76) => MOP_CODE[(3,7,0),(2,1,0),(4,7,0),(1,1,1),(3,7,1),(2,1,1),(4,7,1)], (14,77) => MOP_CODE[(3,7,1),(2,1,1),(4,7,0)], (14,78) => MOP_CODE[(3,7,0),(2,1,1),(4,7,1)], (14,79) => MOP_CODE[(3,7,1),(2,1,0),(4,7,1)], (14,80) => MOP_CODE[(3,7,0),(2,1,0),(4,7,0),(1,3,1),(3,8,1),(2,3,1),(4,8,1)], (14,81) => MOP_CODE[(3,7,0),(2,1,0),(4,7,0),(1,4,1),(3,2,1),(2,4,1),(4,2,1)], (14,82) => MOP_CODE[(3,7,0),(2,1,0),(4,7,0),(1,2,1),(3,4,1),(2,2,1),(4,4,1)], (14,83) => MOP_CODE[(3,7,0),(2,1,0),(4,7,0),(1,7,1),(3,1,1),(2,7,1),(4,1,1)], (14,84) => MOP_CODE[(3,7,0),(2,1,0),(4,7,0),(1,5,1),(3,6,1),(2,5,1),(4,6,1)], (15,85) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0)], (15,86) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0),(1,1,1),(3,2,1),(2,1,1),(4,2,1)], (15,87) => MOP_CODE[(3,2,1),(2,1,1),(4,2,0)], (15,88) => MOP_CODE[(3,2,0),(2,1,1),(4,2,1)], (15,89) => MOP_CODE[(3,2,1),(2,1,0),(4,2,1)], (15,90) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0),(1,2,1),(3,1,1),(2,2,1),(4,1,1)], (15,91) => MOP_CODE[(3,2,0),(2,1,0),(4,2,0),(1,3,1),(3,7,1),(2,4,1),(4,7,1)], (16,1) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0)], (16,2) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1)], (16,3) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0)], (16,4) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,3,1),(5,3,1),(3,3,1),(6,3,1)], (16,5) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,5,1),(5,5,1),(3,5,1),(6,5,1)], (16,6) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,8,1),(5,8,1),(3,8,1),(6,8,1)], (17,7) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0)], (17,8) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,1,1),(5,1,1),(3,2,1),(6,2,1)], (17,9) => MOP_CODE[(5,1,1),(3,2,1),(6,2,0)], (17,10) => MOP_CODE[(5,1,0),(3,2,1),(6,2,1)], (17,11) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,3,1),(5,3,1),(3,6,1),(6,6,1)], (17,12) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,2,1),(5,2,1),(3,1,1),(6,1,1)], (17,13) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,6,1),(5,6,1),(3,3,1),(6,3,1)], (17,14) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,5,1),(5,5,1),(3,8,1),(6,8,1)], (17,15) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,8,1),(5,8,1),(3,5,1),(6,5,1)], (18,16) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0)], (18,17) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(1,1,1),(5,5,1),(3,5,1),(6,1,1)], (18,18) => MOP_CODE[(5,5,1),(3,5,1),(6,1,0)], (18,19) => MOP_CODE[(5,5,0),(3,5,1),(6,1,1)], (18,20) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(1,4,1),(5,3,1),(3,3,1),(6,4,1)], (18,21) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(1,2,1),(5,8,1),(3,8,1),(6,2,1)], (18,22) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(1,6,1),(5,7,1),(3,7,1),(6,6,1)], (18,23) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(1,5,1),(5,1,1),(3,1,1),(6,5,1)], (18,24) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(1,8,1),(5,2,1),(3,2,1),(6,8,1)], (19,25) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0)], (19,26) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(1,1,1),(5,5,1),(3,7,1),(6,6,1)], (19,27) => MOP_CODE[(5,5,1),(3,7,1),(6,6,0)], (19,28) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(1,2,1),(5,8,1),(3,4,1),(6,3,1)], (19,29) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(1,5,1),(5,1,1),(3,6,1),(6,7,1)], (19,30) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(1,8,1),(5,2,1),(3,3,1),(6,4,1)], (20,31) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0)], (20,32) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,1,1),(5,1,1),(3,2,1),(6,2,1)], (20,33) => MOP_CODE[(5,1,1),(3,2,1),(6,2,0)], (20,34) => MOP_CODE[(5,1,0),(3,2,1),(6,2,1)], (20,35) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,2,1),(5,2,1),(3,1,1),(6,1,1)], (20,36) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,3,1),(5,3,1),(3,6,1),(6,6,1)], (20,37) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(1,7,1),(5,6,1),(3,3,1),(6,3,1)], (21,38) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0)], (21,39) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1)], (21,40) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0)], (21,41) => MOP_CODE[(5,1,0),(3,1,1),(6,1,1)], (21,42) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,2,1),(5,2,1),(3,2,1),(6,2,1)], (21,43) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,3,1),(5,3,1),(3,3,1),(6,3,1)], (21,44) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,7,1),(5,6,1),(3,6,1),(6,6,1)], (22,45) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0)], (22,46) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1)], (22,47) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0)], (22,48) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,2,1),(5,8,1),(3,8,1),(6,8,1)], (23,49) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0)], (23,50) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1)], (23,51) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0)], (23,52) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(1,2,1),(5,2,1),(3,2,1),(6,2,1)], (24,53) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0)], (24,54) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(1,1,1),(5,2,1),(3,3,1),(6,4,1)], (24,55) => MOP_CODE[(5,2,1),(3,3,1),(6,4,0)], (24,56) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(1,2,1),(5,1,1),(3,4,1),(6,3,1)], (25,57) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0)], (25,58) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,1,1),(6,1,1),(7,1,1),(4,1,1)], (25,59) => MOP_CODE[(6,1,1),(7,1,1),(4,1,0)], (25,60) => MOP_CODE[(6,1,0),(7,1,1),(4,1,1)], (25,61) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,2,1),(6,2,1),(7,2,1),(4,2,1)], (25,62) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,3,1),(6,3,1),(7,3,1),(4,3,1)], (25,63) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,5,1),(6,5,1),(7,5,1),(4,5,1)], (25,64) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,7,1),(6,7,1),(7,7,1),(4,7,1)], (25,65) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,8,1),(6,8,1),(7,8,1),(4,8,1)], (26,66) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0)], (26,67) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,1,1),(6,2,1),(7,1,1),(4,2,1)], (26,68) => MOP_CODE[(6,2,1),(7,1,1),(4,2,0)], (26,69) => MOP_CODE[(6,2,1),(7,1,0),(4,2,1)], (26,70) => MOP_CODE[(6,2,0),(7,1,1),(4,2,1)], (26,71) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,3,1),(6,6,1),(7,3,1),(4,6,1)], (26,72) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,4,1),(6,7,1),(7,4,1),(4,7,1)], (26,73) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,2,1),(6,1,1),(7,2,1),(4,1,1)], (26,74) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,7,1),(6,4,1),(7,7,1),(4,4,1)], (26,75) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,6,1),(6,3,1),(7,6,1),(4,3,1)], (26,76) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,5,1),(6,8,1),(7,5,1),(4,8,1)], (26,77) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,8,1),(6,5,1),(7,8,1),(4,5,1)], (27,78) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0)], (27,79) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,1,1),(6,1,1),(7,2,1),(4,2,1)], (27,80) => MOP_CODE[(6,1,1),(7,2,1),(4,2,0)], (27,81) => MOP_CODE[(6,1,0),(7,2,1),(4,2,1)], (27,82) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,2,1),(6,2,1),(7,1,1),(4,1,1)], (27,83) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,3,1),(6,3,1),(7,6,1),(4,6,1)], (27,84) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,5,1),(6,5,1),(7,8,1),(4,8,1)], (27,85) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,7,1),(6,7,1),(7,4,1),(4,4,1)], (27,86) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,8,1),(6,8,1),(7,5,1),(4,5,1)], (28,87) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0)], (28,88) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,1,1),(6,1,1),(7,3,1),(4,3,1)], (28,89) => MOP_CODE[(6,1,1),(7,3,1),(4,3,0)], (28,90) => MOP_CODE[(6,1,1),(7,3,0),(4,3,1)], (28,91) => MOP_CODE[(6,1,0),(7,3,1),(4,3,1)], (28,92) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,3,1),(6,3,1),(7,1,1),(4,1,1)], (28,93) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,4,1),(6,4,1),(7,5,1),(4,5,1)], (28,94) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,2,1),(6,2,1),(7,6,1),(4,6,1)], (28,95) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,7,1),(6,7,1),(7,8,1),(4,8,1)], (28,96) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,6,1),(6,6,1),(7,2,1),(4,2,1)], (28,97) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,5,1),(6,5,1),(7,4,1),(4,4,1)], (28,98) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,8,1),(6,8,1),(7,7,1),(4,7,1)], (29,99) => MOP_CODE[(6,2,0),(7,6,0),(4,3,0)], (29,100) => MOP_CODE[(6,2,0),(7,6,0),(4,3,0),(1,1,1),(6,2,1),(7,6,1),(4,3,1)], (29,101) => MOP_CODE[(6,2,1),(7,6,1),(4,3,0)], (29,102) => MOP_CODE[(6,2,1),(7,6,0),(4,3,1)], (29,103) => MOP_CODE[(6,2,0),(7,6,1),(4,3,1)], (29,104) => MOP_CODE[(6,2,0),(7,6,0),(4,3,0),(1,3,1),(6,6,1),(7,2,1),(4,1,1)], (29,105) => MOP_CODE[(6,2,0),(7,6,0),(4,3,0),(1,4,1),(6,7,1),(7,8,1),(4,5,1)], (29,106) => MOP_CODE[(6,2,0),(7,6,0),(4,3,0),(1,2,1),(6,1,1),(7,3,1),(4,6,1)], (29,107) => MOP_CODE[(6,2,0),(7,6,0),(4,3,0),(1,7,1),(6,4,1),(7,5,1),(4,8,1)], (29,108) => MOP_CODE[(6,2,0),(7,6,0),(4,3,0),(1,6,1),(6,3,1),(7,1,1),(4,2,1)], (29,109) => MOP_CODE[(6,2,0),(7,6,0),(4,3,0),(1,5,1),(6,8,1),(7,7,1),(4,4,1)], (29,110) => MOP_CODE[(6,2,0),(7,6,0),(4,3,0),(1,8,1),(6,5,1),(7,4,1),(4,7,1)], (30,111) => MOP_CODE[(6,1,0),(7,7,0),(4,7,0)], (30,112) => MOP_CODE[(6,1,0),(7,7,0),(4,7,0),(1,1,1),(6,1,1),(7,7,1),(4,7,1)], (30,113) => MOP_CODE[(6,1,1),(7,7,1),(4,7,0)], (30,114) => MOP_CODE[(6,1,1),(7,7,0),(4,7,1)], (30,115) => MOP_CODE[(6,1,0),(7,7,1),(4,7,1)], (30,116) => MOP_CODE[(6,1,0),(7,7,0),(4,7,0),(1,3,1),(6,3,1),(7,8,1),(4,8,1)], (30,117) => MOP_CODE[(6,1,0),(7,7,0),(4,7,0),(1,4,1),(6,4,1),(7,2,1),(4,2,1)], (30,118) => MOP_CODE[(6,1,0),(7,7,0),(4,7,0),(1,2,1),(6,2,1),(7,4,1),(4,4,1)], (30,119) => MOP_CODE[(6,1,0),(7,7,0),(4,7,0),(1,7,1),(6,7,1),(7,1,1),(4,1,1)], (30,120) => MOP_CODE[(6,1,0),(7,7,0),(4,7,0),(1,6,1),(6,6,1),(7,5,1),(4,5,1)], (30,121) => MOP_CODE[(6,1,0),(7,7,0),(4,7,0),(1,5,1),(6,5,1),(7,6,1),(4,6,1)], (30,122) => MOP_CODE[(6,1,0),(7,7,0),(4,7,0),(1,8,1),(6,8,1),(7,3,1),(4,3,1)], (31,123) => MOP_CODE[(6,6,0),(7,1,0),(4,6,0)], (31,124) => MOP_CODE[(6,6,0),(7,1,0),(4,6,0),(1,1,1),(6,6,1),(7,1,1),(4,6,1)], (31,125) => MOP_CODE[(6,6,1),(7,1,1),(4,6,0)], (31,126) => MOP_CODE[(6,6,1),(7,1,0),(4,6,1)], (31,127) => MOP_CODE[(6,6,0),(7,1,1),(4,6,1)], (31,128) => MOP_CODE[(6,6,0),(7,1,0),(4,6,0),(1,3,1),(6,2,1),(7,3,1),(4,2,1)], (31,129) => MOP_CODE[(6,6,0),(7,1,0),(4,6,0),(1,4,1),(6,8,1),(7,4,1),(4,8,1)], (31,130) => MOP_CODE[(6,6,0),(7,1,0),(4,6,0),(1,2,1),(6,3,1),(7,2,1),(4,3,1)], (31,131) => MOP_CODE[(6,6,0),(7,1,0),(4,6,0),(1,7,1),(6,5,1),(7,7,1),(4,5,1)], (31,132) => MOP_CODE[(6,6,0),(7,1,0),(4,6,0),(1,6,1),(6,1,1),(7,6,1),(4,1,1)], (31,133) => MOP_CODE[(6,6,0),(7,1,0),(4,6,0),(1,5,1),(6,7,1),(7,5,1),(4,7,1)], (31,134) => MOP_CODE[(6,6,0),(7,1,0),(4,6,0),(1,8,1),(6,4,1),(7,8,1),(4,4,1)], (32,135) => MOP_CODE[(6,1,0),(7,5,0),(4,5,0)], (32,136) => MOP_CODE[(6,1,0),(7,5,0),(4,5,0),(1,1,1),(6,1,1),(7,5,1),(4,5,1)], (32,137) => MOP_CODE[(6,1,1),(7,5,1),(4,5,0)], (32,138) => MOP_CODE[(6,1,0),(7,5,1),(4,5,1)], (32,139) => MOP_CODE[(6,1,0),(7,5,0),(4,5,0),(1,2,1),(6,2,1),(7,8,1),(4,8,1)], (32,140) => MOP_CODE[(6,1,0),(7,5,0),(4,5,0),(1,4,1),(6,4,1),(7,3,1),(4,3,1)], (32,141) => MOP_CODE[(6,1,0),(7,5,0),(4,5,0),(1,5,1),(6,5,1),(7,1,1),(4,1,1)], (32,142) => MOP_CODE[(6,1,0),(7,5,0),(4,5,0),(1,7,1),(6,7,1),(7,6,1),(4,6,1)], (32,143) => MOP_CODE[(6,1,0),(7,5,0),(4,5,0),(1,8,1),(6,8,1),(7,2,1),(4,2,1)], (33,144) => MOP_CODE[(6,2,0),(7,8,0),(4,5,0)], (33,145) => MOP_CODE[(6,2,0),(7,8,0),(4,5,0),(1,1,1),(6,2,1),(7,8,1),(4,5,1)], (33,146) => MOP_CODE[(6,2,1),(7,8,1),(4,5,0)], (33,147) => MOP_CODE[(6,2,1),(7,8,0),(4,5,1)], (33,148) => MOP_CODE[(6,2,0),(7,8,1),(4,5,1)], (33,149) => MOP_CODE[(6,2,0),(7,8,0),(4,5,0),(1,3,1),(6,6,1),(7,7,1),(4,4,1)], (33,150) => MOP_CODE[(6,2,0),(7,8,0),(4,5,0),(1,4,1),(6,7,1),(7,6,1),(4,3,1)], (33,151) => MOP_CODE[(6,2,0),(7,8,0),(4,5,0),(1,2,1),(6,1,1),(7,5,1),(4,8,1)], (33,152) => MOP_CODE[(6,2,0),(7,8,0),(4,5,0),(1,7,1),(6,4,1),(7,3,1),(4,6,1)], (33,153) => MOP_CODE[(6,2,0),(7,8,0),(4,5,0),(1,6,1),(6,3,1),(7,4,1),(4,7,1)], (33,154) => MOP_CODE[(6,2,0),(7,8,0),(4,5,0),(1,5,1),(6,8,1),(7,2,1),(4,1,1)], (33,155) => MOP_CODE[(6,2,0),(7,8,0),(4,5,0),(1,8,1),(6,5,1),(7,1,1),(4,2,1)], (34,156) => MOP_CODE[(6,1,0),(7,8,0),(4,8,0)], (34,157) => MOP_CODE[(6,1,0),(7,8,0),(4,8,0),(1,1,1),(6,1,1),(7,8,1),(4,8,1)], (34,158) => MOP_CODE[(6,1,1),(7,8,1),(4,8,0)], (34,159) => MOP_CODE[(6,1,0),(7,8,1),(4,8,1)], (34,160) => MOP_CODE[(6,1,0),(7,8,0),(4,8,0),(1,3,1),(6,3,1),(7,7,1),(4,7,1)], (34,161) => MOP_CODE[(6,1,0),(7,8,0),(4,8,0),(1,2,1),(6,2,1),(7,5,1),(4,5,1)], (34,162) => MOP_CODE[(6,1,0),(7,8,0),(4,8,0),(1,7,1),(6,7,1),(7,3,1),(4,3,1)], (34,163) => MOP_CODE[(6,1,0),(7,8,0),(4,8,0),(1,5,1),(6,5,1),(7,2,1),(4,2,1)], (34,164) => MOP_CODE[(6,1,0),(7,8,0),(4,8,0),(1,8,1),(6,8,1),(7,1,1),(4,1,1)], (35,165) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0)], (35,166) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,1,1),(6,1,1),(7,1,1),(4,1,1)], (35,167) => MOP_CODE[(6,1,1),(7,1,1),(4,1,0)], (35,168) => MOP_CODE[(6,1,0),(7,1,1),(4,1,1)], (35,169) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,2,1),(6,2,1),(7,2,1),(4,2,1)], (35,170) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,3,1),(6,3,1),(7,3,1),(4,3,1)], (35,171) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,7,1),(6,6,1),(7,6,1),(4,6,1)], (36,172) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0)], (36,173) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,1,1),(6,2,1),(7,1,1),(4,2,1)], (36,174) => MOP_CODE[(6,2,1),(7,1,1),(4,2,0)], (36,175) => MOP_CODE[(6,2,1),(7,1,0),(4,2,1)], (36,176) => MOP_CODE[(6,2,0),(7,1,1),(4,2,1)], (36,177) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,2,1),(6,1,1),(7,2,1),(4,1,1)], (36,178) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,3,1),(6,6,1),(7,3,1),(4,6,1)], (36,179) => MOP_CODE[(6,2,0),(7,1,0),(4,2,0),(1,7,1),(6,3,1),(7,6,1),(4,3,1)], (37,180) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0)], (37,181) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,1,1),(6,1,1),(7,2,1),(4,2,1)], (37,182) => MOP_CODE[(6,1,1),(7,2,1),(4,2,0)], (37,183) => MOP_CODE[(6,1,0),(7,2,1),(4,2,1)], (37,184) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,2,1),(6,2,1),(7,1,1),(4,1,1)], (37,185) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,3,1),(6,3,1),(7,6,1),(4,6,1)], (37,186) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,7,1),(6,6,1),(7,3,1),(4,3,1)], (38,187) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0)], (38,188) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,1,1),(6,1,1),(7,1,1),(4,1,1)], (38,189) => MOP_CODE[(6,1,1),(7,1,1),(4,1,0)], (38,190) => MOP_CODE[(6,1,1),(7,1,0),(4,1,1)], (38,191) => MOP_CODE[(6,1,0),(7,1,1),(4,1,1)], (38,192) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,3,1),(6,3,1),(7,3,1),(4,3,1)], (38,193) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,2,1),(6,2,1),(7,2,1),(4,2,1)], (38,194) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,5,1),(6,6,1),(7,6,1),(4,6,1)], (39,195) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0)], (39,196) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,1,1),(6,1,1),(7,2,1),(4,2,1)], (39,197) => MOP_CODE[(6,1,1),(7,2,1),(4,2,0)], (39,198) => MOP_CODE[(6,1,1),(7,2,0),(4,2,1)], (39,199) => MOP_CODE[(6,1,0),(7,2,1),(4,2,1)], (39,200) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,3,1),(6,3,1),(7,6,1),(4,6,1)], (39,201) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,2,1),(6,2,1),(7,1,1),(4,1,1)], (39,202) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,5,1),(6,6,1),(7,3,1),(4,3,1)], (40,203) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0)], (40,204) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,1,1),(6,1,1),(7,3,1),(4,3,1)], (40,205) => MOP_CODE[(6,1,1),(7,3,1),(4,3,0)], (40,206) => MOP_CODE[(6,1,1),(7,3,0),(4,3,1)], (40,207) => MOP_CODE[(6,1,0),(7,3,1),(4,3,1)], (40,208) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,3,1),(6,3,1),(7,1,1),(4,1,1)], (40,209) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,2,1),(6,2,1),(7,6,1),(4,6,1)], (40,210) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,5,1),(6,6,1),(7,2,1),(4,2,1)], (41,211) => MOP_CODE[(6,1,0),(7,6,0),(4,6,0)], (41,212) => MOP_CODE[(6,1,0),(7,6,0),(4,6,0),(1,1,1),(6,1,1),(7,6,1),(4,6,1)], (41,213) => MOP_CODE[(6,1,1),(7,6,1),(4,6,0)], (41,214) => MOP_CODE[(6,1,1),(7,6,0),(4,6,1)], (41,215) => MOP_CODE[(6,1,0),(7,6,1),(4,6,1)], (41,216) => MOP_CODE[(6,1,0),(7,6,0),(4,6,0),(1,3,1),(6,3,1),(7,2,1),(4,2,1)], (41,217) => MOP_CODE[(6,1,0),(7,6,0),(4,6,0),(1,2,1),(6,2,1),(7,3,1),(4,3,1)], (41,218) => MOP_CODE[(6,1,0),(7,6,0),(4,6,0),(1,5,1),(6,6,1),(7,1,1),(4,1,1)], (42,219) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0)], (42,220) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,1,1),(6,1,1),(7,1,1),(4,1,1)], (42,221) => MOP_CODE[(6,1,1),(7,1,1),(4,1,0)], (42,222) => MOP_CODE[(6,1,0),(7,1,1),(4,1,1)], (42,223) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,2,1),(6,8,1),(7,8,1),(4,8,1)], (43,224) => MOP_CODE[(6,1,0),(7,9,0),(4,9,0)], (43,225) => MOP_CODE[(6,1,0),(7,9,0),(4,9,0),(1,1,1),(6,1,1),(7,9,1),(4,9,1)], (43,226) => MOP_CODE[(6,1,1),(7,9,1),(4,9,0)], (43,227) => MOP_CODE[(6,1,0),(7,9,1),(4,9,1)], (43,228) => MOP_CODE[(6,1,0),(7,9,0),(4,9,0),(1,2,1),(6,8,1),(7,10,1),(4,10,1)], (44,229) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0)], (44,230) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,1,1),(6,1,1),(7,1,1),(4,1,1)], (44,231) => MOP_CODE[(6,1,1),(7,1,1),(4,1,0)], (44,232) => MOP_CODE[(6,1,0),(7,1,1),(4,1,1)], (44,233) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,2,1),(6,2,1),(7,2,1),(4,2,1)], (44,234) => MOP_CODE[(6,1,0),(7,1,0),(4,1,0),(1,3,1),(6,3,1),(7,3,1),(4,3,1)], (45,235) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0)], (45,236) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,1,1),(6,1,1),(7,2,1),(4,2,1)], (45,237) => MOP_CODE[(6,1,1),(7,2,1),(4,2,0)], (45,238) => MOP_CODE[(6,1,0),(7,2,1),(4,2,1)], (45,239) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,2,1),(6,2,1),(7,1,1),(4,1,1)], (45,240) => MOP_CODE[(6,1,0),(7,2,0),(4,2,0),(1,3,1),(6,3,1),(7,4,1),(4,4,1)], (46,241) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0)], (46,242) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,1,1),(6,1,1),(7,3,1),(4,3,1)], (46,243) => MOP_CODE[(6,1,1),(7,3,1),(4,3,0)], (46,244) => MOP_CODE[(6,1,1),(7,3,0),(4,3,1)], (46,245) => MOP_CODE[(6,1,0),(7,3,1),(4,3,1)], (46,246) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,2,1),(6,2,1),(7,4,1),(4,4,1)], (46,247) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,3,1),(6,3,1),(7,1,1),(4,1,1)], (46,248) => MOP_CODE[(6,1,0),(7,3,0),(4,3,0),(1,4,1),(6,4,1),(7,2,1),(4,2,1)], (47,249) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0)], (47,250) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(2,1,1),(7,1,1),(4,1,1),(8,1,1)], (47,251) => MOP_CODE[(5,1,0),(3,1,1),(6,1,1),(2,1,1),(7,1,1),(4,1,0),(8,1,0)], (47,252) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0),(2,1,0),(7,1,1),(4,1,1),(8,1,0)], (47,253) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,1),(7,1,1),(4,1,1),(8,1,1)], (47,254) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,3,1),(5,3,1),(3,3,1),(6,3,1),(2,3,1),(7,3,1),(4,3,1),(8,3,1)], (47,255) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,5,1),(5,5,1),(3,5,1),(6,5,1),(2,5,1),(7,5,1),(4,5,1),(8,5,1)], (47,256) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,8,1),(5,8,1),(3,8,1),(6,8,1),(2,8,1),(7,8,1),(4,8,1),(8,8,1)], (48,257) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(2,1,0),(7,7,0),(4,6,0),(8,5,0)], (48,258) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(2,1,0),(7,7,0),(4,6,0),(8,5,0),(1,1,1),(5,7,1),(3,6,1),(6,5,1),(2,1,1),(7,7,1),(4,6,1),(8,5,1)], (48,259) => MOP_CODE[(5,7,0),(3,6,1),(6,5,1),(2,1,1),(7,7,1),(4,6,0),(8,5,0)], (48,260) => MOP_CODE[(5,7,1),(3,6,1),(6,5,0),(2,1,0),(7,7,1),(4,6,1),(8,5,0)], (48,261) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(2,1,1),(7,7,1),(4,6,1),(8,5,1)], (48,262) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(2,1,0),(7,7,0),(4,6,0),(8,5,0),(1,2,1),(5,4,1),(3,3,1),(6,8,1),(2,2,1),(7,4,1),(4,3,1),(8,8,1)], (48,263) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(2,1,0),(7,7,0),(4,6,0),(8,5,0),(1,5,1),(5,6,1),(3,7,1),(6,1,1),(2,5,1),(7,6,1),(4,7,1),(8,1,1)], (48,264) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(2,1,0),(7,7,0),(4,6,0),(8,5,0),(1,8,1),(5,3,1),(3,4,1),(6,2,1),(2,8,1),(7,3,1),(4,4,1),(8,2,1)], (49,265) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0)], (49,266) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,1,1),(5,2,1),(3,2,1),(6,1,1),(2,1,1),(7,2,1),(4,2,1),(8,1,1)], (49,267) => MOP_CODE[(5,2,0),(3,2,1),(6,1,1),(2,1,1),(7,2,1),(4,2,0),(8,1,0)], (49,268) => MOP_CODE[(5,2,1),(3,2,1),(6,1,0),(2,1,1),(7,2,0),(4,2,0),(8,1,1)], (49,269) => MOP_CODE[(5,2,1),(3,2,1),(6,1,0),(2,1,0),(7,2,1),(4,2,1),(8,1,0)], (49,270) => MOP_CODE[(5,2,1),(3,2,0),(6,1,1),(2,1,0),(7,2,1),(4,2,0),(8,1,1)], (49,271) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,1),(7,2,1),(4,2,1),(8,1,1)], (49,272) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,3,1),(5,6,1),(3,6,1),(6,3,1),(2,3,1),(7,6,1),(4,6,1),(8,3,1)], (49,273) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,2,1),(5,1,1),(3,1,1),(6,2,1),(2,2,1),(7,1,1),(4,1,1),(8,2,1)], (49,274) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,6,1),(5,3,1),(3,3,1),(6,6,1),(2,6,1),(7,3,1),(4,3,1),(8,6,1)], (49,275) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,5,1),(5,8,1),(3,8,1),(6,5,1),(2,5,1),(7,8,1),(4,8,1),(8,5,1)], (49,276) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,8,1),(5,5,1),(3,5,1),(6,8,1),(2,8,1),(7,5,1),(4,5,1),(8,8,1)], (50,277) => MOP_CODE[(5,4,0),(3,3,0),(6,5,0),(2,1,0),(7,4,0),(4,3,0),(8,5,0)], (50,278) => MOP_CODE[(5,4,0),(3,3,0),(6,5,0),(2,1,0),(7,4,0),(4,3,0),(8,5,0),(1,1,1),(5,4,1),(3,3,1),(6,5,1),(2,1,1),(7,4,1),(4,3,1),(8,5,1)], (50,279) => MOP_CODE[(5,4,0),(3,3,1),(6,5,1),(2,1,1),(7,4,1),(4,3,0),(8,5,0)], (50,280) => MOP_CODE[(5,4,1),(3,3,1),(6,5,0),(2,1,1),(7,4,0),(4,3,0),(8,5,1)], (50,281) => MOP_CODE[(5,4,1),(3,3,1),(6,5,0),(2,1,0),(7,4,1),(4,3,1),(8,5,0)], (50,282) => MOP_CODE[(5,4,1),(3,3,0),(6,5,1),(2,1,0),(7,4,1),(4,3,0),(8,5,1)], (50,283) => MOP_CODE[(5,4,0),(3,3,0),(6,5,0),(2,1,1),(7,4,1),(4,3,1),(8,5,1)], (50,284) => MOP_CODE[(5,4,0),(3,3,0),(6,5,0),(2,1,0),(7,4,0),(4,3,0),(8,5,0),(1,3,1),(5,5,1),(3,1,1),(6,4,1),(2,3,1),(7,5,1),(4,1,1),(8,4,1)], (50,285) => MOP_CODE[(5,4,0),(3,3,0),(6,5,0),(2,1,0),(7,4,0),(4,3,0),(8,5,0),(1,2,1),(5,7,1),(3,6,1),(6,8,1),(2,2,1),(7,7,1),(4,6,1),(8,8,1)], (50,286) => MOP_CODE[(5,4,0),(3,3,0),(6,5,0),(2,1,0),(7,4,0),(4,3,0),(8,5,0),(1,7,1),(5,2,1),(3,8,1),(6,6,1),(2,7,1),(7,2,1),(4,8,1),(8,6,1)], (50,287) => MOP_CODE[(5,4,0),(3,3,0),(6,5,0),(2,1,0),(7,4,0),(4,3,0),(8,5,0),(1,5,1),(5,3,1),(3,4,1),(6,1,1),(2,5,1),(7,3,1),(4,4,1),(8,1,1)], (50,288) => MOP_CODE[(5,4,0),(3,3,0),(6,5,0),(2,1,0),(7,4,0),(4,3,0),(8,5,0),(1,8,1),(5,6,1),(3,7,1),(6,2,1),(2,8,1),(7,6,1),(4,7,1),(8,2,1)], (51,289) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,0),(7,3,0),(4,1,0),(8,3,0)], (51,290) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,0),(7,3,0),(4,1,0),(8,3,0),(1,1,1),(5,3,1),(3,1,1),(6,3,1),(2,1,1),(7,3,1),(4,1,1),(8,3,1)], (51,291) => MOP_CODE[(5,3,0),(3,1,1),(6,3,1),(2,1,1),(7,3,1),(4,1,0),(8,3,0)], (51,292) => MOP_CODE[(5,3,1),(3,1,0),(6,3,1),(2,1,1),(7,3,0),(4,1,1),(8,3,0)], (51,293) => MOP_CODE[(5,3,1),(3,1,1),(6,3,0),(2,1,1),(7,3,0),(4,1,0),(8,3,1)], (51,294) => MOP_CODE[(5,3,1),(3,1,1),(6,3,0),(2,1,0),(7,3,1),(4,1,1),(8,3,0)], (51,295) => MOP_CODE[(5,3,0),(3,1,1),(6,3,1),(2,1,0),(7,3,0),(4,1,1),(8,3,1)], (51,296) => MOP_CODE[(5,3,1),(3,1,0),(6,3,1),(2,1,0),(7,3,1),(4,1,0),(8,3,1)], (51,297) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,1),(7,3,1),(4,1,1),(8,3,1)], (51,298) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,0),(7,3,0),(4,1,0),(8,3,0),(1,3,1),(5,1,1),(3,3,1),(6,1,1),(2,3,1),(7,1,1),(4,3,1),(8,1,1)], (51,299) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,0),(7,3,0),(4,1,0),(8,3,0),(1,4,1),(5,5,1),(3,4,1),(6,5,1),(2,4,1),(7,5,1),(4,4,1),(8,5,1)], (51,300) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,0),(7,3,0),(4,1,0),(8,3,0),(1,2,1),(5,6,1),(3,2,1),(6,6,1),(2,2,1),(7,6,1),(4,2,1),(8,6,1)], (51,301) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,0),(7,3,0),(4,1,0),(8,3,0),(1,7,1),(5,8,1),(3,7,1),(6,8,1),(2,7,1),(7,8,1),(4,7,1),(8,8,1)], (51,302) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,0),(7,3,0),(4,1,0),(8,3,0),(1,6,1),(5,2,1),(3,6,1),(6,2,1),(2,6,1),(7,2,1),(4,6,1),(8,2,1)], (51,303) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,0),(7,3,0),(4,1,0),(8,3,0),(1,5,1),(5,4,1),(3,5,1),(6,4,1),(2,5,1),(7,4,1),(4,5,1),(8,4,1)], (51,304) => MOP_CODE[(5,3,0),(3,1,0),(6,3,0),(2,1,0),(7,3,0),(4,1,0),(8,3,0),(1,8,1),(5,7,1),(3,8,1),(6,7,1),(2,8,1),(7,7,1),(4,8,1),(8,7,1)], (52,305) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,0),(7,7,0),(4,8,0),(8,3,0)], (52,306) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,0),(7,7,0),(4,8,0),(8,3,0),(1,1,1),(5,7,1),(3,8,1),(6,3,1),(2,1,1),(7,7,1),(4,8,1),(8,3,1)], (52,307) => MOP_CODE[(5,7,0),(3,8,1),(6,3,1),(2,1,1),(7,7,1),(4,8,0),(8,3,0)], (52,308) => MOP_CODE[(5,7,1),(3,8,0),(6,3,1),(2,1,1),(7,7,0),(4,8,1),(8,3,0)], (52,309) => MOP_CODE[(5,7,1),(3,8,1),(6,3,0),(2,1,1),(7,7,0),(4,8,0),(8,3,1)], (52,310) => MOP_CODE[(5,7,1),(3,8,1),(6,3,0),(2,1,0),(7,7,1),(4,8,1),(8,3,0)], (52,311) => MOP_CODE[(5,7,0),(3,8,1),(6,3,1),(2,1,0),(7,7,0),(4,8,1),(8,3,1)], (52,312) => MOP_CODE[(5,7,1),(3,8,0),(6,3,1),(2,1,0),(7,7,1),(4,8,0),(8,3,1)], (52,313) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,1),(7,7,1),(4,8,1),(8,3,1)], (52,314) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,0),(7,7,0),(4,8,0),(8,3,0),(1,3,1),(5,8,1),(3,7,1),(6,1,1),(2,3,1),(7,8,1),(4,7,1),(8,1,1)], (52,315) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,0),(7,7,0),(4,8,0),(8,3,0),(1,4,1),(5,2,1),(3,6,1),(6,5,1),(2,4,1),(7,2,1),(4,6,1),(8,5,1)], (52,316) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,0),(7,7,0),(4,8,0),(8,3,0),(1,2,1),(5,4,1),(3,5,1),(6,6,1),(2,2,1),(7,4,1),(4,5,1),(8,6,1)], (52,317) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,0),(7,7,0),(4,8,0),(8,3,0),(1,7,1),(5,1,1),(3,3,1),(6,8,1),(2,7,1),(7,1,1),(4,3,1),(8,8,1)], (52,318) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,0),(7,7,0),(4,8,0),(8,3,0),(1,6,1),(5,5,1),(3,4,1),(6,2,1),(2,6,1),(7,5,1),(4,4,1),(8,2,1)], (52,319) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,0),(7,7,0),(4,8,0),(8,3,0),(1,5,1),(5,6,1),(3,2,1),(6,4,1),(2,5,1),(7,6,1),(4,2,1),(8,4,1)], (52,320) => MOP_CODE[(5,7,0),(3,8,0),(6,3,0),(2,1,0),(7,7,0),(4,8,0),(8,3,0),(1,8,1),(5,3,1),(3,1,1),(6,7,1),(2,8,1),(7,3,1),(4,1,1),(8,7,1)], (53,321) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0)], (53,322) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,1,1),(5,1,1),(3,6,1),(6,6,1),(2,1,1),(7,1,1),(4,6,1),(8,6,1)], (53,323) => MOP_CODE[(5,1,0),(3,6,1),(6,6,1),(2,1,1),(7,1,1),(4,6,0),(8,6,0)], (53,324) => MOP_CODE[(5,1,1),(3,6,0),(6,6,1),(2,1,1),(7,1,0),(4,6,1),(8,6,0)], (53,325) => MOP_CODE[(5,1,1),(3,6,1),(6,6,0),(2,1,1),(7,1,0),(4,6,0),(8,6,1)], (53,326) => MOP_CODE[(5,1,1),(3,6,1),(6,6,0),(2,1,0),(7,1,1),(4,6,1),(8,6,0)], (53,327) => MOP_CODE[(5,1,0),(3,6,1),(6,6,1),(2,1,0),(7,1,0),(4,6,1),(8,6,1)], (53,328) => MOP_CODE[(5,1,1),(3,6,0),(6,6,1),(2,1,0),(7,1,1),(4,6,0),(8,6,1)], (53,329) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,1),(7,1,1),(4,6,1),(8,6,1)], (53,330) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,3,1),(5,3,1),(3,2,1),(6,2,1),(2,3,1),(7,3,1),(4,2,1),(8,2,1)], (53,331) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,4,1),(5,4,1),(3,8,1),(6,8,1),(2,4,1),(7,4,1),(4,8,1),(8,8,1)], (53,332) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,2,1),(5,2,1),(3,3,1),(6,3,1),(2,2,1),(7,2,1),(4,3,1),(8,3,1)], (53,333) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,7,1),(5,7,1),(3,5,1),(6,5,1),(2,7,1),(7,7,1),(4,5,1),(8,5,1)], (53,334) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,6,1),(5,6,1),(3,1,1),(6,1,1),(2,6,1),(7,6,1),(4,1,1),(8,1,1)], (53,335) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,5,1),(5,5,1),(3,7,1),(6,7,1),(2,5,1),(7,5,1),(4,7,1),(8,7,1)], (53,336) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,8,1),(5,8,1),(3,4,1),(6,4,1),(2,8,1),(7,8,1),(4,4,1),(8,4,1)], (54,337) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,0),(7,6,0),(4,2,0),(8,3,0)], (54,338) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,0),(7,6,0),(4,2,0),(8,3,0),(1,1,1),(5,6,1),(3,2,1),(6,3,1),(2,1,1),(7,6,1),(4,2,1),(8,3,1)], (54,339) => MOP_CODE[(5,6,0),(3,2,1),(6,3,1),(2,1,1),(7,6,1),(4,2,0),(8,3,0)], (54,340) => MOP_CODE[(5,6,1),(3,2,0),(6,3,1),(2,1,1),(7,6,0),(4,2,1),(8,3,0)], (54,341) => MOP_CODE[(5,6,1),(3,2,1),(6,3,0),(2,1,1),(7,6,0),(4,2,0),(8,3,1)], (54,342) => MOP_CODE[(5,6,1),(3,2,1),(6,3,0),(2,1,0),(7,6,1),(4,2,1),(8,3,0)], (54,343) => MOP_CODE[(5,6,0),(3,2,1),(6,3,1),(2,1,0),(7,6,0),(4,2,1),(8,3,1)], (54,344) => MOP_CODE[(5,6,1),(3,2,0),(6,3,1),(2,1,0),(7,6,1),(4,2,0),(8,3,1)], (54,345) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,1),(7,6,1),(4,2,1),(8,3,1)], (54,346) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,0),(7,6,0),(4,2,0),(8,3,0),(1,3,1),(5,2,1),(3,6,1),(6,1,1),(2,3,1),(7,2,1),(4,6,1),(8,1,1)], (54,347) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,0),(7,6,0),(4,2,0),(8,3,0),(1,4,1),(5,8,1),(3,7,1),(6,5,1),(2,4,1),(7,8,1),(4,7,1),(8,5,1)], (54,348) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,0),(7,6,0),(4,2,0),(8,3,0),(1,2,1),(5,3,1),(3,1,1),(6,6,1),(2,2,1),(7,3,1),(4,1,1),(8,6,1)], (54,349) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,0),(7,6,0),(4,2,0),(8,3,0),(1,7,1),(5,5,1),(3,4,1),(6,8,1),(2,7,1),(7,5,1),(4,4,1),(8,8,1)], (54,350) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,0),(7,6,0),(4,2,0),(8,3,0),(1,6,1),(5,1,1),(3,3,1),(6,2,1),(2,6,1),(7,1,1),(4,3,1),(8,2,1)], (54,351) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,0),(7,6,0),(4,2,0),(8,3,0),(1,5,1),(5,7,1),(3,8,1),(6,4,1),(2,5,1),(7,7,1),(4,8,1),(8,4,1)], (54,352) => MOP_CODE[(5,6,0),(3,2,0),(6,3,0),(2,1,0),(7,6,0),(4,2,0),(8,3,0),(1,8,1),(5,4,1),(3,5,1),(6,7,1),(2,8,1),(7,4,1),(4,5,1),(8,7,1)], (55,353) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(2,1,0),(7,5,0),(4,5,0),(8,1,0)], (55,354) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(2,1,0),(7,5,0),(4,5,0),(8,1,0),(1,1,1),(5,5,1),(3,5,1),(6,1,1),(2,1,1),(7,5,1),(4,5,1),(8,1,1)], (55,355) => MOP_CODE[(5,5,0),(3,5,1),(6,1,1),(2,1,1),(7,5,1),(4,5,0),(8,1,0)], (55,356) => MOP_CODE[(5,5,1),(3,5,1),(6,1,0),(2,1,1),(7,5,0),(4,5,0),(8,1,1)], (55,357) => MOP_CODE[(5,5,1),(3,5,1),(6,1,0),(2,1,0),(7,5,1),(4,5,1),(8,1,0)], (55,358) => MOP_CODE[(5,5,1),(3,5,0),(6,1,1),(2,1,0),(7,5,1),(4,5,0),(8,1,1)], (55,359) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(2,1,1),(7,5,1),(4,5,1),(8,1,1)], (55,360) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(2,1,0),(7,5,0),(4,5,0),(8,1,0),(1,3,1),(5,4,1),(3,4,1),(6,3,1),(2,3,1),(7,4,1),(4,4,1),(8,3,1)], (55,361) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(2,1,0),(7,5,0),(4,5,0),(8,1,0),(1,2,1),(5,8,1),(3,8,1),(6,2,1),(2,2,1),(7,8,1),(4,8,1),(8,2,1)], (55,362) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(2,1,0),(7,5,0),(4,5,0),(8,1,0),(1,7,1),(5,6,1),(3,6,1),(6,7,1),(2,7,1),(7,6,1),(4,6,1),(8,7,1)], (55,363) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(2,1,0),(7,5,0),(4,5,0),(8,1,0),(1,5,1),(5,1,1),(3,1,1),(6,5,1),(2,5,1),(7,1,1),(4,1,1),(8,5,1)], (55,364) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(2,1,0),(7,5,0),(4,5,0),(8,1,0),(1,8,1),(5,2,1),(3,2,1),(6,8,1),(2,8,1),(7,2,1),(4,2,1),(8,8,1)], (56,365) => MOP_CODE[(5,6,0),(3,7,0),(6,5,0),(2,1,0),(7,6,0),(4,7,0),(8,5,0)], (56,366) => MOP_CODE[(5,6,0),(3,7,0),(6,5,0),(2,1,0),(7,6,0),(4,7,0),(8,5,0),(1,1,1),(5,6,1),(3,7,1),(6,5,1),(2,1,1),(7,6,1),(4,7,1),(8,5,1)], (56,367) => MOP_CODE[(5,6,0),(3,7,1),(6,5,1),(2,1,1),(7,6,1),(4,7,0),(8,5,0)], (56,368) => MOP_CODE[(5,6,1),(3,7,1),(6,5,0),(2,1,1),(7,6,0),(4,7,0),(8,5,1)], (56,369) => MOP_CODE[(5,6,1),(3,7,1),(6,5,0),(2,1,0),(7,6,1),(4,7,1),(8,5,0)], (56,370) => MOP_CODE[(5,6,1),(3,7,0),(6,5,1),(2,1,0),(7,6,1),(4,7,0),(8,5,1)], (56,371) => MOP_CODE[(5,6,0),(3,7,0),(6,5,0),(2,1,1),(7,6,1),(4,7,1),(8,5,1)], (56,372) => MOP_CODE[(5,6,0),(3,7,0),(6,5,0),(2,1,0),(7,6,0),(4,7,0),(8,5,0),(1,4,1),(5,8,1),(3,2,1),(6,3,1),(2,4,1),(7,8,1),(4,2,1),(8,3,1)], (56,373) => MOP_CODE[(5,6,0),(3,7,0),(6,5,0),(2,1,0),(7,6,0),(4,7,0),(8,5,0),(1,2,1),(5,3,1),(3,4,1),(6,8,1),(2,2,1),(7,3,1),(4,4,1),(8,8,1)], (56,374) => MOP_CODE[(5,6,0),(3,7,0),(6,5,0),(2,1,0),(7,6,0),(4,7,0),(8,5,0),(1,7,1),(5,5,1),(3,1,1),(6,6,1),(2,7,1),(7,5,1),(4,1,1),(8,6,1)], (56,375) => MOP_CODE[(5,6,0),(3,7,0),(6,5,0),(2,1,0),(7,6,0),(4,7,0),(8,5,0),(1,5,1),(5,7,1),(3,6,1),(6,1,1),(2,5,1),(7,7,1),(4,6,1),(8,1,1)], (56,376) => MOP_CODE[(5,6,0),(3,7,0),(6,5,0),(2,1,0),(7,6,0),(4,7,0),(8,5,0),(1,8,1),(5,4,1),(3,3,1),(6,2,1),(2,8,1),(7,4,1),(4,3,1),(8,2,1)], (57,377) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,0),(7,4,0),(4,7,0),(8,2,0)], (57,378) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,0),(7,4,0),(4,7,0),(8,2,0),(1,1,1),(5,4,1),(3,7,1),(6,2,1),(2,1,1),(7,4,1),(4,7,1),(8,2,1)], (57,379) => MOP_CODE[(5,4,0),(3,7,1),(6,2,1),(2,1,1),(7,4,1),(4,7,0),(8,2,0)], (57,380) => MOP_CODE[(5,4,1),(3,7,0),(6,2,1),(2,1,1),(7,4,0),(4,7,1),(8,2,0)], (57,381) => MOP_CODE[(5,4,1),(3,7,1),(6,2,0),(2,1,1),(7,4,0),(4,7,0),(8,2,1)], (57,382) => MOP_CODE[(5,4,1),(3,7,1),(6,2,0),(2,1,0),(7,4,1),(4,7,1),(8,2,0)], (57,383) => MOP_CODE[(5,4,0),(3,7,1),(6,2,1),(2,1,0),(7,4,0),(4,7,1),(8,2,1)], (57,384) => MOP_CODE[(5,4,1),(3,7,0),(6,2,1),(2,1,0),(7,4,1),(4,7,0),(8,2,1)], (57,385) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,1),(7,4,1),(4,7,1),(8,2,1)], (57,386) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,0),(7,4,0),(4,7,0),(8,2,0),(1,3,1),(5,5,1),(3,8,1),(6,6,1),(2,3,1),(7,5,1),(4,8,1),(8,6,1)], (57,387) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,0),(7,4,0),(4,7,0),(8,2,0),(1,4,1),(5,1,1),(3,2,1),(6,7,1),(2,4,1),(7,1,1),(4,2,1),(8,7,1)], (57,388) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,0),(7,4,0),(4,7,0),(8,2,0),(1,2,1),(5,7,1),(3,4,1),(6,1,1),(2,2,1),(7,7,1),(4,4,1),(8,1,1)], (57,389) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,0),(7,4,0),(4,7,0),(8,2,0),(1,7,1),(5,2,1),(3,1,1),(6,4,1),(2,7,1),(7,2,1),(4,1,1),(8,4,1)], (57,390) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,0),(7,4,0),(4,7,0),(8,2,0),(1,6,1),(5,8,1),(3,5,1),(6,3,1),(2,6,1),(7,8,1),(4,5,1),(8,3,1)], (57,391) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,0),(7,4,0),(4,7,0),(8,2,0),(1,5,1),(5,3,1),(3,6,1),(6,8,1),(2,5,1),(7,3,1),(4,6,1),(8,8,1)], (57,392) => MOP_CODE[(5,4,0),(3,7,0),(6,2,0),(2,1,0),(7,4,0),(4,7,0),(8,2,0),(1,8,1),(5,6,1),(3,3,1),(6,5,1),(2,8,1),(7,6,1),(4,3,1),(8,5,1)], (58,393) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(2,1,0),(7,8,0),(4,8,0),(8,1,0)], (58,394) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(2,1,0),(7,8,0),(4,8,0),(8,1,0),(1,1,1),(5,8,1),(3,8,1),(6,1,1),(2,1,1),(7,8,1),(4,8,1),(8,1,1)], (58,395) => MOP_CODE[(5,8,0),(3,8,1),(6,1,1),(2,1,1),(7,8,1),(4,8,0),(8,1,0)], (58,396) => MOP_CODE[(5,8,1),(3,8,1),(6,1,0),(2,1,1),(7,8,0),(4,8,0),(8,1,1)], (58,397) => MOP_CODE[(5,8,1),(3,8,1),(6,1,0),(2,1,0),(7,8,1),(4,8,1),(8,1,0)], (58,398) => MOP_CODE[(5,8,0),(3,8,1),(6,1,1),(2,1,0),(7,8,0),(4,8,1),(8,1,1)], (58,399) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(2,1,1),(7,8,1),(4,8,1),(8,1,1)], (58,400) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(2,1,0),(7,8,0),(4,8,0),(8,1,0),(1,3,1),(5,7,1),(3,7,1),(6,3,1),(2,3,1),(7,7,1),(4,7,1),(8,3,1)], (58,401) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(2,1,0),(7,8,0),(4,8,0),(8,1,0),(1,2,1),(5,5,1),(3,5,1),(6,2,1),(2,2,1),(7,5,1),(4,5,1),(8,2,1)], (58,402) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(2,1,0),(7,8,0),(4,8,0),(8,1,0),(1,6,1),(5,4,1),(3,4,1),(6,6,1),(2,6,1),(7,4,1),(4,4,1),(8,6,1)], (58,403) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(2,1,0),(7,8,0),(4,8,0),(8,1,0),(1,5,1),(5,2,1),(3,2,1),(6,5,1),(2,5,1),(7,2,1),(4,2,1),(8,5,1)], (58,404) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(2,1,0),(7,8,0),(4,8,0),(8,1,0),(1,8,1),(5,1,1),(3,1,1),(6,8,1),(2,8,1),(7,1,1),(4,1,1),(8,8,1)], (59,405) => MOP_CODE[(5,3,0),(3,4,0),(6,5,0),(2,1,0),(7,3,0),(4,4,0),(8,5,0)], (59,406) => MOP_CODE[(5,3,0),(3,4,0),(6,5,0),(2,1,0),(7,3,0),(4,4,0),(8,5,0),(1,1,1),(5,3,1),(3,4,1),(6,5,1),(2,1,1),(7,3,1),(4,4,1),(8,5,1)], (59,407) => MOP_CODE[(5,3,0),(3,4,1),(6,5,1),(2,1,1),(7,3,1),(4,4,0),(8,5,0)], (59,408) => MOP_CODE[(5,3,1),(3,4,1),(6,5,0),(2,1,1),(7,3,0),(4,4,0),(8,5,1)], (59,409) => MOP_CODE[(5,3,1),(3,4,1),(6,5,0),(2,1,0),(7,3,1),(4,4,1),(8,5,0)], (59,410) => MOP_CODE[(5,3,0),(3,4,1),(6,5,1),(2,1,0),(7,3,0),(4,4,1),(8,5,1)], (59,411) => MOP_CODE[(5,3,0),(3,4,0),(6,5,0),(2,1,1),(7,3,1),(4,4,1),(8,5,1)], (59,412) => MOP_CODE[(5,3,0),(3,4,0),(6,5,0),(2,1,0),(7,3,0),(4,4,0),(8,5,0),(1,4,1),(5,5,1),(3,1,1),(6,3,1),(2,4,1),(7,5,1),(4,1,1),(8,3,1)], (59,413) => MOP_CODE[(5,3,0),(3,4,0),(6,5,0),(2,1,0),(7,3,0),(4,4,0),(8,5,0),(1,2,1),(5,6,1),(3,7,1),(6,8,1),(2,2,1),(7,6,1),(4,7,1),(8,8,1)], (59,414) => MOP_CODE[(5,3,0),(3,4,0),(6,5,0),(2,1,0),(7,3,0),(4,4,0),(8,5,0),(1,6,1),(5,2,1),(3,8,1),(6,7,1),(2,6,1),(7,2,1),(4,8,1),(8,7,1)], (59,415) => MOP_CODE[(5,3,0),(3,4,0),(6,5,0),(2,1,0),(7,3,0),(4,4,0),(8,5,0),(1,5,1),(5,4,1),(3,3,1),(6,1,1),(2,5,1),(7,4,1),(4,3,1),(8,1,1)], (59,416) => MOP_CODE[(5,3,0),(3,4,0),(6,5,0),(2,1,0),(7,3,0),(4,4,0),(8,5,0),(1,8,1),(5,7,1),(3,6,1),(6,2,1),(2,8,1),(7,7,1),(4,6,1),(8,2,1)], (60,417) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,0),(7,5,0),(4,2,0),(8,8,0)], (60,418) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,0),(7,5,0),(4,2,0),(8,8,0),(1,1,1),(5,5,1),(3,2,1),(6,8,1),(2,1,1),(7,5,1),(4,2,1),(8,8,1)], (60,419) => MOP_CODE[(5,5,0),(3,2,1),(6,8,1),(2,1,1),(7,5,1),(4,2,0),(8,8,0)], (60,420) => MOP_CODE[(5,5,1),(3,2,0),(6,8,1),(2,1,1),(7,5,0),(4,2,1),(8,8,0)], (60,421) => MOP_CODE[(5,5,1),(3,2,1),(6,8,0),(2,1,1),(7,5,0),(4,2,0),(8,8,1)], (60,422) => MOP_CODE[(5,5,1),(3,2,1),(6,8,0),(2,1,0),(7,5,1),(4,2,1),(8,8,0)], (60,423) => MOP_CODE[(5,5,0),(3,2,1),(6,8,1),(2,1,0),(7,5,0),(4,2,1),(8,8,1)], (60,424) => MOP_CODE[(5,5,1),(3,2,0),(6,8,1),(2,1,0),(7,5,1),(4,2,0),(8,8,1)], (60,425) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,1),(7,5,1),(4,2,1),(8,8,1)], (60,426) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,0),(7,5,0),(4,2,0),(8,8,0),(1,3,1),(5,4,1),(3,6,1),(6,7,1),(2,3,1),(7,4,1),(4,6,1),(8,7,1)], (60,427) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,0),(7,5,0),(4,2,0),(8,8,0),(1,4,1),(5,3,1),(3,7,1),(6,6,1),(2,4,1),(7,3,1),(4,7,1),(8,6,1)], (60,428) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,0),(7,5,0),(4,2,0),(8,8,0),(1,2,1),(5,8,1),(3,1,1),(6,5,1),(2,2,1),(7,8,1),(4,1,1),(8,5,1)], (60,429) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,0),(7,5,0),(4,2,0),(8,8,0),(1,7,1),(5,6,1),(3,4,1),(6,3,1),(2,7,1),(7,6,1),(4,4,1),(8,3,1)], (60,430) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,0),(7,5,0),(4,2,0),(8,8,0),(1,6,1),(5,7,1),(3,3,1),(6,4,1),(2,6,1),(7,7,1),(4,3,1),(8,4,1)], (60,431) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,0),(7,5,0),(4,2,0),(8,8,0),(1,5,1),(5,1,1),(3,8,1),(6,2,1),(2,5,1),(7,1,1),(4,8,1),(8,2,1)], (60,432) => MOP_CODE[(5,5,0),(3,2,0),(6,8,0),(2,1,0),(7,5,0),(4,2,0),(8,8,0),(1,8,1),(5,2,1),(3,5,1),(6,1,1),(2,8,1),(7,2,1),(4,5,1),(8,1,1)], (61,433) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(2,1,0),(7,5,0),(4,7,0),(8,6,0)], (61,434) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(2,1,0),(7,5,0),(4,7,0),(8,6,0),(1,1,1),(5,5,1),(3,7,1),(6,6,1),(2,1,1),(7,5,1),(4,7,1),(8,6,1)], (61,435) => MOP_CODE[(5,5,0),(3,7,1),(6,6,1),(2,1,1),(7,5,1),(4,7,0),(8,6,0)], (61,436) => MOP_CODE[(5,5,1),(3,7,1),(6,6,0),(2,1,0),(7,5,1),(4,7,1),(8,6,0)], (61,437) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(2,1,1),(7,5,1),(4,7,1),(8,6,1)], (61,438) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(2,1,0),(7,5,0),(4,7,0),(8,6,0),(1,3,1),(5,4,1),(3,8,1),(6,2,1),(2,3,1),(7,4,1),(4,8,1),(8,2,1)], (61,439) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(2,1,0),(7,5,0),(4,7,0),(8,6,0),(1,5,1),(5,1,1),(3,6,1),(6,7,1),(2,5,1),(7,1,1),(4,6,1),(8,7,1)], (61,440) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(2,1,0),(7,5,0),(4,7,0),(8,6,0),(1,8,1),(5,2,1),(3,3,1),(6,4,1),(2,8,1),(7,2,1),(4,3,1),(8,4,1)], (62,441) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,0),(7,8,0),(4,4,0),(8,6,0)], (62,442) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,0),(7,8,0),(4,4,0),(8,6,0),(1,1,1),(5,8,1),(3,4,1),(6,6,1),(2,1,1),(7,8,1),(4,4,1),(8,6,1)], (62,443) => MOP_CODE[(5,8,0),(3,4,1),(6,6,1),(2,1,1),(7,8,1),(4,4,0),(8,6,0)], (62,444) => MOP_CODE[(5,8,1),(3,4,0),(6,6,1),(2,1,1),(7,8,0),(4,4,1),(8,6,0)], (62,445) => MOP_CODE[(5,8,1),(3,4,1),(6,6,0),(2,1,1),(7,8,0),(4,4,0),(8,6,1)], (62,446) => MOP_CODE[(5,8,1),(3,4,1),(6,6,0),(2,1,0),(7,8,1),(4,4,1),(8,6,0)], (62,447) => MOP_CODE[(5,8,0),(3,4,1),(6,6,1),(2,1,0),(7,8,0),(4,4,1),(8,6,1)], (62,448) => MOP_CODE[(5,8,1),(3,4,0),(6,6,1),(2,1,0),(7,8,1),(4,4,0),(8,6,1)], (62,449) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,1),(7,8,1),(4,4,1),(8,6,1)], (62,450) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,0),(7,8,0),(4,4,0),(8,6,0),(1,3,1),(5,7,1),(3,5,1),(6,2,1),(2,3,1),(7,7,1),(4,5,1),(8,2,1)], (62,451) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,0),(7,8,0),(4,4,0),(8,6,0),(1,4,1),(5,6,1),(3,1,1),(6,8,1),(2,4,1),(7,6,1),(4,1,1),(8,8,1)], (62,452) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,0),(7,8,0),(4,4,0),(8,6,0),(1,2,1),(5,5,1),(3,7,1),(6,3,1),(2,2,1),(7,5,1),(4,7,1),(8,3,1)], (62,453) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,0),(7,8,0),(4,4,0),(8,6,0),(1,7,1),(5,3,1),(3,2,1),(6,5,1),(2,7,1),(7,3,1),(4,2,1),(8,5,1)], (62,454) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,0),(7,8,0),(4,4,0),(8,6,0),(1,6,1),(5,4,1),(3,8,1),(6,1,1),(2,6,1),(7,4,1),(4,8,1),(8,1,1)], (62,455) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,0),(7,8,0),(4,4,0),(8,6,0),(1,5,1),(5,2,1),(3,3,1),(6,7,1),(2,5,1),(7,2,1),(4,3,1),(8,7,1)], (62,456) => MOP_CODE[(5,8,0),(3,4,0),(6,6,0),(2,1,0),(7,8,0),(4,4,0),(8,6,0),(1,8,1),(5,1,1),(3,6,1),(6,4,1),(2,8,1),(7,1,1),(4,6,1),(8,4,1)], (63,457) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(2,1,0),(7,1,0),(4,2,0),(8,2,0)], (63,458) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(2,1,0),(7,1,0),(4,2,0),(8,2,0),(1,1,1),(5,1,1),(3,2,1),(6,2,1),(2,1,1),(7,1,1),(4,2,1),(8,2,1)], (63,459) => MOP_CODE[(5,1,0),(3,2,1),(6,2,1),(2,1,1),(7,1,1),(4,2,0),(8,2,0)], (63,460) => MOP_CODE[(5,1,1),(3,2,0),(6,2,1),(2,1,1),(7,1,0),(4,2,1),(8,2,0)], (63,461) => MOP_CODE[(5,1,1),(3,2,1),(6,2,0),(2,1,1),(7,1,0),(4,2,0),(8,2,1)], (63,462) => MOP_CODE[(5,1,1),(3,2,1),(6,2,0),(2,1,0),(7,1,1),(4,2,1),(8,2,0)], (63,463) => MOP_CODE[(5,1,0),(3,2,1),(6,2,1),(2,1,0),(7,1,0),(4,2,1),(8,2,1)], (63,464) => MOP_CODE[(5,1,1),(3,2,0),(6,2,1),(2,1,0),(7,1,1),(4,2,0),(8,2,1)], (63,465) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(2,1,1),(7,1,1),(4,2,1),(8,2,1)], (63,466) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(2,1,0),(7,1,0),(4,2,0),(8,2,0),(1,2,1),(5,2,1),(3,1,1),(6,1,1),(2,2,1),(7,2,1),(4,1,1),(8,1,1)], (63,467) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(2,1,0),(7,1,0),(4,2,0),(8,2,0),(1,3,1),(5,3,1),(3,6,1),(6,6,1),(2,3,1),(7,3,1),(4,6,1),(8,6,1)], (63,468) => MOP_CODE[(5,1,0),(3,2,0),(6,2,0),(2,1,0),(7,1,0),(4,2,0),(8,2,0),(1,7,1),(5,6,1),(3,3,1),(6,3,1),(2,6,1),(7,6,1),(4,3,1),(8,3,1)], (64,469) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0)], (64,470) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,1,1),(5,1,1),(3,6,1),(6,6,1),(2,1,1),(7,1,1),(4,6,1),(8,6,1)], (64,471) => MOP_CODE[(5,1,0),(3,6,1),(6,6,1),(2,1,1),(7,1,1),(4,6,0),(8,6,0)], (64,472) => MOP_CODE[(5,1,1),(3,6,0),(6,6,1),(2,1,1),(7,1,0),(4,6,1),(8,6,0)], (64,473) => MOP_CODE[(5,1,1),(3,6,1),(6,6,0),(2,1,1),(7,1,0),(4,6,0),(8,6,1)], (64,474) => MOP_CODE[(5,1,1),(3,6,1),(6,6,0),(2,1,0),(7,1,1),(4,6,1),(8,6,0)], (64,475) => MOP_CODE[(5,1,0),(3,6,1),(6,6,1),(2,1,0),(7,1,0),(4,6,1),(8,6,1)], (64,476) => MOP_CODE[(5,1,1),(3,6,0),(6,6,1),(2,1,0),(7,1,1),(4,6,0),(8,6,1)], (64,477) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,1),(7,1,1),(4,6,1),(8,6,1)], (64,478) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,2,1),(5,2,1),(3,3,1),(6,3,1),(2,2,1),(7,2,1),(4,3,1),(8,3,1)], (64,479) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,3,1),(5,3,1),(3,2,1),(6,2,1),(2,3,1),(7,3,1),(4,2,1),(8,2,1)], (64,480) => MOP_CODE[(5,1,0),(3,6,0),(6,6,0),(2,1,0),(7,1,0),(4,6,0),(8,6,0),(1,7,1),(5,6,1),(3,1,1),(6,1,1),(2,6,1),(7,6,1),(4,1,1),(8,1,1)], (65,481) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0)], (65,482) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(2,1,1),(7,1,1),(4,1,1),(8,1,1)], (65,483) => MOP_CODE[(5,1,0),(3,1,1),(6,1,1),(2,1,1),(7,1,1),(4,1,0),(8,1,0)], (65,484) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0),(2,1,1),(7,1,0),(4,1,0),(8,1,1)], (65,485) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0),(2,1,0),(7,1,1),(4,1,1),(8,1,0)], (65,486) => MOP_CODE[(5,1,0),(3,1,1),(6,1,1),(2,1,0),(7,1,0),(4,1,1),(8,1,1)], (65,487) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,1),(7,1,1),(4,1,1),(8,1,1)], (65,488) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,2,1),(5,2,1),(3,2,1),(6,2,1),(2,2,1),(7,2,1),(4,2,1),(8,2,1)], (65,489) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,3,1),(5,3,1),(3,3,1),(6,3,1),(2,3,1),(7,3,1),(4,3,1),(8,3,1)], (65,490) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,7,1),(5,6,1),(3,6,1),(6,6,1),(2,6,1),(7,6,1),(4,6,1),(8,6,1)], (66,491) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0)], (66,492) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,1,1),(5,2,1),(3,2,1),(6,1,1),(2,1,1),(7,2,1),(4,2,1),(8,1,1)], (66,493) => MOP_CODE[(5,2,0),(3,2,1),(6,1,1),(2,1,1),(7,2,1),(4,2,0),(8,1,0)], (66,494) => MOP_CODE[(5,2,1),(3,2,1),(6,1,0),(2,1,1),(7,2,0),(4,2,0),(8,1,1)], (66,495) => MOP_CODE[(5,2,1),(3,2,1),(6,1,0),(2,1,0),(7,2,1),(4,2,1),(8,1,0)], (66,496) => MOP_CODE[(5,2,0),(3,2,1),(6,1,1),(2,1,0),(7,2,0),(4,2,1),(8,1,1)], (66,497) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,1),(7,2,1),(4,2,1),(8,1,1)], (66,498) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,2,1),(5,1,1),(3,1,1),(6,2,1),(2,2,1),(7,1,1),(4,1,1),(8,2,1)], (66,499) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,3,1),(5,6,1),(3,6,1),(6,3,1),(2,3,1),(7,6,1),(4,6,1),(8,3,1)], (66,500) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,7,1),(5,3,1),(3,3,1),(6,6,1),(2,6,1),(7,3,1),(4,3,1),(8,6,1)], (67,501) => MOP_CODE[(5,1,0),(3,3,0),(6,3,0),(2,1,0),(7,1,0),(4,3,0),(8,3,0)], (67,502) => MOP_CODE[(5,1,0),(3,3,0),(6,3,0),(2,1,0),(7,1,0),(4,3,0),(8,3,0),(1,1,1),(5,1,1),(3,3,1),(6,3,1),(2,1,1),(7,1,1),(4,3,1),(8,3,1)], (67,503) => MOP_CODE[(5,1,0),(3,3,1),(6,3,1),(2,1,1),(7,1,1),(4,3,0),(8,3,0)], (67,504) => MOP_CODE[(5,1,1),(3,3,1),(6,3,0),(2,1,1),(7,1,0),(4,3,0),(8,3,1)], (67,505) => MOP_CODE[(5,1,1),(3,3,1),(6,3,0),(2,1,0),(7,1,1),(4,3,1),(8,3,0)], (67,506) => MOP_CODE[(5,1,0),(3,3,1),(6,3,1),(2,1,0),(7,1,0),(4,3,1),(8,3,1)], (67,507) => MOP_CODE[(5,1,0),(3,3,0),(6,3,0),(2,1,1),(7,1,1),(4,3,1),(8,3,1)], (67,508) => MOP_CODE[(5,1,0),(3,3,0),(6,3,0),(2,1,0),(7,1,0),(4,3,0),(8,3,0),(1,2,1),(5,2,1),(3,6,1),(6,6,1),(2,2,1),(7,2,1),(4,6,1),(8,6,1)], (67,509) => MOP_CODE[(5,1,0),(3,3,0),(6,3,0),(2,1,0),(7,1,0),(4,3,0),(8,3,0),(1,3,1),(5,3,1),(3,1,1),(6,1,1),(2,3,1),(7,3,1),(4,1,1),(8,1,1)], (67,510) => MOP_CODE[(5,1,0),(3,3,0),(6,3,0),(2,1,0),(7,1,0),(4,3,0),(8,3,0),(1,7,1),(5,6,1),(3,2,1),(6,2,1),(2,6,1),(7,6,1),(4,2,1),(8,2,1)], (68,511) => MOP_CODE[(5,7,0),(3,2,0),(6,4,0),(2,5,0),(7,6,0),(4,8,0),(8,3,0)], (68,512) => MOP_CODE[(5,7,0),(3,2,0),(6,4,0),(2,5,0),(7,6,0),(4,8,0),(8,3,0),(1,1,1),(5,7,1),(3,2,1),(6,4,1),(2,5,1),(7,6,1),(4,8,1),(8,3,1)], (68,513) => MOP_CODE[(5,7,0),(3,2,1),(6,4,1),(2,5,1),(7,6,1),(4,8,0),(8,3,0)], (68,514) => MOP_CODE[(5,7,1),(3,2,1),(6,4,0),(2,5,1),(7,6,0),(4,8,0),(8,3,1)], (68,515) => MOP_CODE[(5,7,1),(3,2,1),(6,4,0),(2,5,0),(7,6,1),(4,8,1),(8,3,0)], (68,516) => MOP_CODE[(5,7,0),(3,2,1),(6,4,1),(2,5,0),(7,6,0),(4,8,1),(8,3,1)], (68,517) => MOP_CODE[(5,7,0),(3,2,0),(6,4,0),(2,5,1),(7,6,1),(4,8,1),(8,3,1)], (68,518) => MOP_CODE[(5,7,0),(3,2,0),(6,4,0),(2,5,0),(7,6,0),(4,8,0),(8,3,0),(1,2,1),(5,4,1),(3,1,1),(6,7,1),(2,8,1),(7,3,1),(4,5,1),(8,6,1)], (68,519) => MOP_CODE[(5,7,0),(3,2,0),(6,4,0),(2,5,0),(7,6,0),(4,8,0),(8,3,0),(1,3,1),(5,8,1),(3,6,1),(6,5,1),(2,4,1),(7,2,1),(4,7,1),(8,1,1)], (68,520) => MOP_CODE[(5,7,0),(3,2,0),(6,4,0),(2,5,0),(7,6,0),(4,8,0),(8,3,0),(1,7,1),(5,5,1),(3,3,1),(6,8,1),(2,7,1),(7,1,1),(4,4,1),(8,2,1)], (69,521) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0)], (69,522) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(2,1,1),(7,1,1),(4,1,1),(8,1,1)], (69,523) => MOP_CODE[(5,1,0),(3,1,1),(6,1,1),(2,1,1),(7,1,1),(4,1,0),(8,1,0)], (69,524) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0),(2,1,0),(7,1,1),(4,1,1),(8,1,0)], (69,525) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,1),(7,1,1),(4,1,1),(8,1,1)], (69,526) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,2,1),(5,8,1),(3,8,1),(6,8,1),(2,8,1),(7,8,1),(4,8,1),(8,8,1)], (70,527) => MOP_CODE[(5,11,0),(3,12,0),(6,13,0),(2,1,0),(7,14,0),(4,15,0),(8,16,0)], (70,528) => MOP_CODE[(5,11,0),(3,12,0),(6,13,0),(2,1,0),(7,14,0),(4,15,0),(8,16,0),(1,1,1),(5,11,1),(3,12,1),(6,13,1),(2,1,1),(7,14,1),(4,15,1),(8,16,1)], (70,529) => MOP_CODE[(5,11,0),(3,12,1),(6,13,1),(2,1,1),(7,14,1),(4,15,0),(8,16,0)], (70,530) => MOP_CODE[(5,11,1),(3,12,1),(6,13,0),(2,1,0),(7,14,1),(4,15,1),(8,16,0)], (70,531) => MOP_CODE[(5,11,0),(3,12,0),(6,13,0),(2,1,1),(7,14,1),(4,15,1),(8,16,1)], (70,532) => MOP_CODE[(5,11,0),(3,12,0),(6,13,0),(2,1,0),(7,14,0),(4,15,0),(8,16,0),(1,2,1),(5,17,1),(3,18,1),(6,19,1),(2,8,1),(7,20,1),(4,21,1),(8,22,1)], (71,533) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0)], (71,534) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(2,1,1),(7,1,1),(4,1,1),(8,1,1)], (71,535) => MOP_CODE[(5,1,0),(3,1,1),(6,1,1),(2,1,1),(7,1,1),(4,1,0),(8,1,0)], (71,536) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0),(2,1,0),(7,1,1),(4,1,1),(8,1,0)], (71,537) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,1),(7,1,1),(4,1,1),(8,1,1)], (71,538) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(1,2,1),(5,2,1),(3,2,1),(6,2,1),(2,2,1),(7,2,1),(4,2,1),(8,2,1)], (72,539) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0)], (72,540) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,1,1),(5,2,1),(3,2,1),(6,1,1),(2,1,1),(7,2,1),(4,2,1),(8,1,1)], (72,541) => MOP_CODE[(5,2,0),(3,2,1),(6,1,1),(2,1,1),(7,2,1),(4,2,0),(8,1,0)], (72,542) => MOP_CODE[(5,2,1),(3,2,1),(6,1,0),(2,1,1),(7,2,0),(4,2,0),(8,1,1)], (72,543) => MOP_CODE[(5,2,1),(3,2,1),(6,1,0),(2,1,0),(7,2,1),(4,2,1),(8,1,0)], (72,544) => MOP_CODE[(5,2,0),(3,2,1),(6,1,1),(2,1,0),(7,2,0),(4,2,1),(8,1,1)], (72,545) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,1),(7,2,1),(4,2,1),(8,1,1)], (72,546) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,2,1),(5,1,1),(3,1,1),(6,2,1),(2,2,1),(7,1,1),(4,1,1),(8,2,1)], (72,547) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(2,1,0),(7,2,0),(4,2,0),(8,1,0),(1,4,1),(5,3,1),(3,3,1),(6,4,1),(2,4,1),(7,3,1),(4,3,1),(8,4,1)], (73,548) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(2,1,0),(7,2,0),(4,3,0),(8,4,0)], (73,549) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(2,1,0),(7,2,0),(4,3,0),(8,4,0),(1,1,1),(5,2,1),(3,3,1),(6,4,1),(2,1,1),(7,2,1),(4,3,1),(8,4,1)], (73,550) => MOP_CODE[(5,2,0),(3,3,1),(6,4,1),(2,1,1),(7,2,1),(4,3,0),(8,4,0)], (73,551) => MOP_CODE[(5,2,1),(3,3,1),(6,4,0),(2,1,0),(7,2,1),(4,3,1),(8,4,0)], (73,552) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(2,1,1),(7,2,1),(4,3,1),(8,4,1)], (73,553) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(2,1,0),(7,2,0),(4,3,0),(8,4,0),(1,2,1),(5,1,1),(3,4,1),(6,3,1),(2,2,1),(7,1,1),(4,4,1),(8,3,1)], (74,554) => MOP_CODE[(5,1,0),(3,4,0),(6,4,0),(2,1,0),(7,1,0),(4,4,0),(8,4,0)], (74,555) => MOP_CODE[(5,1,0),(3,4,0),(6,4,0),(2,1,0),(7,1,0),(4,4,0),(8,4,0),(1,1,1),(5,1,1),(3,4,1),(6,4,1),(2,1,1),(7,1,1),(4,4,1),(8,4,1)], (74,556) => MOP_CODE[(5,1,0),(3,4,1),(6,4,1),(2,1,1),(7,1,1),(4,4,0),(8,4,0)], (74,557) => MOP_CODE[(5,1,1),(3,4,1),(6,4,0),(2,1,1),(7,1,0),(4,4,0),(8,4,1)], (74,558) => MOP_CODE[(5,1,1),(3,4,1),(6,4,0),(2,1,0),(7,1,1),(4,4,1),(8,4,0)], (74,559) => MOP_CODE[(5,1,0),(3,4,1),(6,4,1),(2,1,0),(7,1,0),(4,4,1),(8,4,1)], (74,560) => MOP_CODE[(5,1,0),(3,4,0),(6,4,0),(2,1,1),(7,1,1),(4,4,1),(8,4,1)], (74,561) => MOP_CODE[(5,1,0),(3,4,0),(6,4,0),(2,1,0),(7,1,0),(4,4,0),(8,4,0),(1,2,1),(5,2,1),(3,3,1),(6,3,1),(2,2,1),(7,2,1),(4,3,1),(8,3,1)], (74,562) => MOP_CODE[(5,1,0),(3,4,0),(6,4,0),(2,1,0),(7,1,0),(4,4,0),(8,4,0),(1,4,1),(5,4,1),(3,1,1),(6,1,1),(2,4,1),(7,4,1),(4,1,1),(8,1,1)], (75,1) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0)], (75,2) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1)], (75,3) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0)], (75,4) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1)], (75,5) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(1,5,1),(9,5,1),(10,5,1),(6,5,1)], (75,6) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(1,8,1),(9,8,1),(10,8,1),(6,8,1)], (76,7) => MOP_CODE[(9,23,0),(10,24,0),(6,2,0)], (76,8) => MOP_CODE[(9,23,0),(10,24,0),(6,2,0),(1,1,1),(9,23,1),(10,24,1),(6,2,1)], (76,9) => MOP_CODE[(9,23,1),(10,24,1),(6,2,0)], (76,10) => MOP_CODE[(9,23,0),(10,24,0),(6,2,0),(1,2,1),(9,24,1),(10,23,1),(6,1,1)], (76,11) => MOP_CODE[(9,23,0),(10,24,0),(6,2,0),(1,5,1),(9,25,1),(10,26,1),(6,8,1)], (76,12) => MOP_CODE[(9,23,0),(10,24,0),(6,2,0),(1,8,1),(9,26,1),(10,25,1),(6,5,1)], (77,13) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0)], (77,14) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(1,1,1),(9,2,1),(10,2,1),(6,1,1)], (77,15) => MOP_CODE[(9,2,1),(10,2,1),(6,1,0)], (77,16) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(1,2,1),(9,1,1),(10,1,1),(6,2,1)], (77,17) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(1,5,1),(9,8,1),(10,8,1),(6,5,1)], (77,18) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(1,8,1),(9,5,1),(10,5,1),(6,8,1)], (78,19) => MOP_CODE[(9,24,0),(10,23,0),(6,2,0)], (78,20) => MOP_CODE[(9,24,0),(10,23,0),(6,2,0),(1,1,1),(9,24,1),(10,23,1),(6,2,1)], (78,21) => MOP_CODE[(9,24,1),(10,23,1),(6,2,0)], (78,22) => MOP_CODE[(9,24,0),(10,23,0),(6,2,0),(1,2,1),(9,23,1),(10,24,1),(6,1,1)], (78,23) => MOP_CODE[(9,24,0),(10,23,0),(6,2,0),(1,5,1),(9,26,1),(10,25,1),(6,8,1)], (78,24) => MOP_CODE[(9,24,0),(10,23,0),(6,2,0),(1,8,1),(9,25,1),(10,26,1),(6,5,1)], (79,25) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0)], (79,26) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1)], (79,27) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0)], (79,28) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1)], (80,29) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0)], (80,30) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(1,1,1),(9,27,1),(10,27,1),(6,1,1)], (80,31) => MOP_CODE[(9,27,1),(10,27,1),(6,1,0)], (80,32) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(1,2,1),(9,28,1),(10,28,1),(6,2,1)], (81,33) => MOP_CODE[(6,1,0),(11,1,0),(12,1,0)], (81,34) => MOP_CODE[(6,1,0),(11,1,0),(12,1,0),(1,1,1),(6,1,1),(11,1,1),(12,1,1)], (81,35) => MOP_CODE[(6,1,0),(11,1,1),(12,1,1)], (81,36) => MOP_CODE[(6,1,0),(11,1,0),(12,1,0),(1,2,1),(6,2,1),(11,2,1),(12,2,1)], (81,37) => MOP_CODE[(6,1,0),(11,1,0),(12,1,0),(1,5,1),(6,5,1),(11,5,1),(12,5,1)], (81,38) => MOP_CODE[(6,1,0),(11,1,0),(12,1,0),(1,8,1),(6,8,1),(11,8,1),(12,8,1)], (82,39) => MOP_CODE[(6,1,0),(11,1,0),(12,1,0)], (82,40) => MOP_CODE[(6,1,0),(11,1,0),(12,1,0),(1,1,1),(6,1,1),(11,1,1),(12,1,1)], (82,41) => MOP_CODE[(6,1,0),(11,1,1),(12,1,1)], (82,42) => MOP_CODE[(6,1,0),(11,1,0),(12,1,0),(1,2,1),(6,2,1),(11,2,1),(12,2,1)], (83,43) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,0),(11,1,0),(12,1,0),(8,1,0)], (83,44) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,0),(11,1,0),(12,1,0),(8,1,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1),(2,1,1),(11,1,1),(12,1,1),(8,1,1)], (83,45) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(2,1,0),(11,1,1),(12,1,1),(8,1,0)], (83,46) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,1),(11,1,1),(12,1,1),(8,1,1)], (83,47) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(2,1,1),(11,1,0),(12,1,0),(8,1,1)], (83,48) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,0),(11,1,0),(12,1,0),(8,1,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1),(2,2,1),(11,2,1),(12,2,1),(8,2,1)], (83,49) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,0),(11,1,0),(12,1,0),(8,1,0),(1,5,1),(9,5,1),(10,5,1),(6,5,1),(2,5,1),(11,5,1),(12,5,1),(8,5,1)], (83,50) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,0),(11,1,0),(12,1,0),(8,1,0),(1,8,1),(9,8,1),(10,8,1),(6,8,1),(2,8,1),(11,8,1),(12,8,1),(8,8,1)], (84,51) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(2,1,0),(11,2,0),(12,2,0),(8,1,0)], (84,52) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(2,1,0),(11,2,0),(12,2,0),(8,1,0),(1,1,1),(9,2,1),(10,2,1),(6,1,1),(2,1,1),(11,2,1),(12,2,1),(8,1,1)], (84,53) => MOP_CODE[(9,2,1),(10,2,1),(6,1,0),(2,1,0),(11,2,1),(12,2,1),(8,1,0)], (84,54) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(2,1,1),(11,2,1),(12,2,1),(8,1,1)], (84,55) => MOP_CODE[(9,2,1),(10,2,1),(6,1,0),(2,1,1),(11,2,0),(12,2,0),(8,1,1)], (84,56) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(2,1,0),(11,2,0),(12,2,0),(8,1,0),(1,2,1),(9,1,1),(10,1,1),(6,2,1),(2,2,1),(11,1,1),(12,1,1),(8,2,1)], (84,57) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(2,1,0),(11,2,0),(12,2,0),(8,1,0),(1,5,1),(9,8,1),(10,8,1),(6,5,1),(2,5,1),(11,8,1),(12,8,1),(8,5,1)], (84,58) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(2,1,0),(11,2,0),(12,2,0),(8,1,0),(1,8,1),(9,5,1),(10,5,1),(6,8,1),(2,8,1),(11,5,1),(12,5,1),(8,8,1)], (85,59) => MOP_CODE[(9,3,0),(10,4,0),(6,5,0),(2,1,0),(11,3,0),(12,4,0),(8,5,0)], (85,60) => MOP_CODE[(9,3,0),(10,4,0),(6,5,0),(2,1,0),(11,3,0),(12,4,0),(8,5,0),(1,1,1),(9,3,1),(10,4,1),(6,5,1),(2,1,1),(11,3,1),(12,4,1),(8,5,1)], (85,61) => MOP_CODE[(9,3,1),(10,4,1),(6,5,0),(2,1,0),(11,3,1),(12,4,1),(8,5,0)], (85,62) => MOP_CODE[(9,3,0),(10,4,0),(6,5,0),(2,1,1),(11,3,1),(12,4,1),(8,5,1)], (85,63) => MOP_CODE[(9,3,1),(10,4,1),(6,5,0),(2,1,1),(11,3,0),(12,4,0),(8,5,1)], (85,64) => MOP_CODE[(9,3,0),(10,4,0),(6,5,0),(2,1,0),(11,3,0),(12,4,0),(8,5,0),(1,2,1),(9,6,1),(10,7,1),(6,8,1),(2,2,1),(11,6,1),(12,7,1),(8,8,1)], (85,65) => MOP_CODE[(9,3,0),(10,4,0),(6,5,0),(2,1,0),(11,3,0),(12,4,0),(8,5,0),(1,5,1),(9,4,1),(10,3,1),(6,1,1),(2,5,1),(11,4,1),(12,3,1),(8,1,1)], (85,66) => MOP_CODE[(9,3,0),(10,4,0),(6,5,0),(2,1,0),(11,3,0),(12,4,0),(8,5,0),(1,8,1),(9,7,1),(10,6,1),(6,2,1),(2,8,1),(11,7,1),(12,6,1),(8,2,1)], (86,67) => MOP_CODE[(9,7,0),(10,6,0),(6,5,0),(2,1,0),(11,7,0),(12,6,0),(8,5,0)], (86,68) => MOP_CODE[(9,7,0),(10,6,0),(6,5,0),(2,1,0),(11,7,0),(12,6,0),(8,5,0),(1,1,1),(9,7,1),(10,6,1),(6,5,1),(2,1,1),(11,7,1),(12,6,1),(8,5,1)], (86,69) => MOP_CODE[(9,7,1),(10,6,1),(6,5,0),(2,1,0),(11,7,1),(12,6,1),(8,5,0)], (86,70) => MOP_CODE[(9,7,0),(10,6,0),(6,5,0),(2,1,1),(11,7,1),(12,6,1),(8,5,1)], (86,71) => MOP_CODE[(9,7,1),(10,6,1),(6,5,0),(2,1,1),(11,7,0),(12,6,0),(8,5,1)], (86,72) => MOP_CODE[(9,7,0),(10,6,0),(6,5,0),(2,1,0),(11,7,0),(12,6,0),(8,5,0),(1,2,1),(9,4,1),(10,3,1),(6,8,1),(2,2,1),(11,4,1),(12,3,1),(8,8,1)], (86,73) => MOP_CODE[(9,7,0),(10,6,0),(6,5,0),(2,1,0),(11,7,0),(12,6,0),(8,5,0),(1,5,1),(9,6,1),(10,7,1),(6,1,1),(2,5,1),(11,6,1),(12,7,1),(8,1,1)], (86,74) => MOP_CODE[(9,7,0),(10,6,0),(6,5,0),(2,1,0),(11,7,0),(12,6,0),(8,5,0),(1,8,1),(9,3,1),(10,4,1),(6,2,1),(2,8,1),(11,3,1),(12,4,1),(8,2,1)], (87,75) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,0),(11,1,0),(12,1,0),(8,1,0)], (87,76) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,0),(11,1,0),(12,1,0),(8,1,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1),(2,1,1),(11,1,1),(12,1,1),(8,1,1)], (87,77) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(2,1,0),(11,1,1),(12,1,1),(8,1,0)], (87,78) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,1),(11,1,1),(12,1,1),(8,1,1)], (87,79) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(2,1,1),(11,1,0),(12,1,0),(8,1,1)], (87,80) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(2,1,0),(11,1,0),(12,1,0),(8,1,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1),(2,2,1),(11,2,1),(12,2,1),(8,2,1)], (88,81) => MOP_CODE[(9,29,0),(10,9,0),(6,4,0),(2,1,0),(11,30,0),(12,10,0),(8,4,0)], (88,82) => MOP_CODE[(9,29,0),(10,9,0),(6,4,0),(2,1,0),(11,30,0),(12,10,0),(8,4,0),(1,1,1),(9,29,1),(10,9,1),(6,4,1),(2,1,1),(11,30,1),(12,10,1),(8,4,1)], (88,83) => MOP_CODE[(9,29,1),(10,9,1),(6,4,0),(2,1,0),(11,30,1),(12,10,1),(8,4,0)], (88,84) => MOP_CODE[(9,29,0),(10,9,0),(6,4,0),(2,1,1),(11,30,1),(12,10,1),(8,4,1)], (88,85) => MOP_CODE[(9,29,1),(10,9,1),(6,4,0),(2,1,1),(11,30,0),(12,10,0),(8,4,1)], (88,86) => MOP_CODE[(9,29,0),(10,9,0),(6,4,0),(2,1,0),(11,30,0),(12,10,0),(8,4,0),(1,2,1),(9,31,1),(10,32,1),(6,7,1),(2,5,1),(11,31,1),(12,32,1),(8,3,1)], (89,87) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0)], (89,88) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(1,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1)], (89,89) => MOP_CODE[(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1)], (89,90) => MOP_CODE[(9,1,0),(10,1,0),(5,1,1),(3,1,1),(6,1,0),(13,1,1),(14,1,1)], (89,91) => MOP_CODE[(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,0),(13,1,0),(14,1,0)], (89,92) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(1,2,1),(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,2,1),(13,2,1),(14,2,1)], (89,93) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(1,5,1),(9,5,1),(10,5,1),(5,5,1),(3,5,1),(6,5,1),(13,5,1),(14,5,1)], (89,94) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(1,8,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,8,1),(13,8,1),(14,8,1)], (90,95) => MOP_CODE[(9,5,0),(10,5,0),(5,5,0),(3,5,0),(6,1,0),(13,1,0),(14,1,0)], (90,96) => MOP_CODE[(9,5,0),(10,5,0),(5,5,0),(3,5,0),(6,1,0),(13,1,0),(14,1,0),(1,1,1),(9,5,1),(10,5,1),(5,5,1),(3,5,1),(6,1,1),(13,1,1),(14,1,1)], (90,97) => MOP_CODE[(9,5,1),(10,5,1),(5,5,0),(3,5,0),(6,1,0),(13,1,1),(14,1,1)], (90,98) => MOP_CODE[(9,5,0),(10,5,0),(5,5,1),(3,5,1),(6,1,0),(13,1,1),(14,1,1)], (90,99) => MOP_CODE[(9,5,1),(10,5,1),(5,5,1),(3,5,1),(6,1,0),(13,1,0),(14,1,0)], (90,100) => MOP_CODE[(9,5,0),(10,5,0),(5,5,0),(3,5,0),(6,1,0),(13,1,0),(14,1,0),(1,2,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,2,1),(13,2,1),(14,2,1)], (90,101) => MOP_CODE[(9,5,0),(10,5,0),(5,5,0),(3,5,0),(6,1,0),(13,1,0),(14,1,0),(1,5,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,5,1),(13,5,1),(14,5,1)], (90,102) => MOP_CODE[(9,5,0),(10,5,0),(5,5,0),(3,5,0),(6,1,0),(13,1,0),(14,1,0),(1,8,1),(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,8,1),(13,8,1),(14,8,1)], (91,103) => MOP_CODE[(9,23,0),(10,24,0),(5,2,0),(3,1,0),(6,2,0),(13,24,0),(14,23,0)], (91,104) => MOP_CODE[(9,23,0),(10,24,0),(5,2,0),(3,1,0),(6,2,0),(13,24,0),(14,23,0),(1,1,1),(9,23,1),(10,24,1),(5,2,1),(3,1,1),(6,2,1),(13,24,1),(14,23,1)], (91,105) => MOP_CODE[(9,23,1),(10,24,1),(5,2,0),(3,1,0),(6,2,0),(13,24,1),(14,23,1)], (91,106) => MOP_CODE[(9,23,0),(10,24,0),(5,2,1),(3,1,1),(6,2,0),(13,24,1),(14,23,1)], (91,107) => MOP_CODE[(9,23,1),(10,24,1),(5,2,1),(3,1,1),(6,2,0),(13,24,0),(14,23,0)], (91,108) => MOP_CODE[(9,23,0),(10,24,0),(5,2,0),(3,1,0),(6,2,0),(13,24,0),(14,23,0),(1,2,1),(9,24,1),(10,23,1),(5,1,1),(3,2,1),(6,1,1),(13,23,1),(14,24,1)], (91,109) => MOP_CODE[(9,23,0),(10,24,0),(5,2,0),(3,1,0),(6,2,0),(13,24,0),(14,23,0),(1,5,1),(9,25,1),(10,26,1),(5,8,1),(3,5,1),(6,8,1),(13,26,1),(14,25,1)], (91,110) => MOP_CODE[(9,23,0),(10,24,0),(5,2,0),(3,1,0),(6,2,0),(13,24,0),(14,23,0),(1,8,1),(9,26,1),(10,25,1),(5,5,1),(3,8,1),(6,5,1),(13,25,1),(14,26,1)], (92,111) => MOP_CODE[(9,25,0),(10,26,0),(5,26,0),(3,25,0),(6,2,0),(13,1,0),(14,2,0)], (92,112) => MOP_CODE[(9,25,0),(10,26,0),(5,26,0),(3,25,0),(6,2,0),(13,1,0),(14,2,0),(1,1,1),(9,25,1),(10,26,1),(5,26,1),(3,25,1),(6,2,1),(13,1,1),(14,2,1)], (92,113) => MOP_CODE[(9,25,1),(10,26,1),(5,26,0),(3,25,0),(6,2,0),(13,1,1),(14,2,1)], (92,114) => MOP_CODE[(9,25,0),(10,26,0),(5,26,1),(3,25,1),(6,2,0),(13,1,1),(14,2,1)], (92,115) => MOP_CODE[(9,25,1),(10,26,1),(5,26,1),(3,25,1),(6,2,0),(13,1,0),(14,2,0)], (92,116) => MOP_CODE[(9,25,0),(10,26,0),(5,26,0),(3,25,0),(6,2,0),(13,1,0),(14,2,0),(1,2,1),(9,26,1),(10,25,1),(5,25,1),(3,26,1),(6,1,1),(13,2,1),(14,1,1)], (92,117) => MOP_CODE[(9,25,0),(10,26,0),(5,26,0),(3,25,0),(6,2,0),(13,1,0),(14,2,0),(1,5,1),(9,23,1),(10,24,1),(5,24,1),(3,23,1),(6,8,1),(13,5,1),(14,8,1)], (92,118) => MOP_CODE[(9,25,0),(10,26,0),(5,26,0),(3,25,0),(6,2,0),(13,1,0),(14,2,0),(1,8,1),(9,24,1),(10,23,1),(5,23,1),(3,24,1),(6,5,1),(13,8,1),(14,5,1)], (93,119) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0)], (93,120) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(1,1,1),(9,2,1),(10,2,1),(5,1,1),(3,1,1),(6,1,1),(13,2,1),(14,2,1)], (93,121) => MOP_CODE[(9,2,1),(10,2,1),(5,1,0),(3,1,0),(6,1,0),(13,2,1),(14,2,1)], (93,122) => MOP_CODE[(9,2,0),(10,2,0),(5,1,1),(3,1,1),(6,1,0),(13,2,1),(14,2,1)], (93,123) => MOP_CODE[(9,2,1),(10,2,1),(5,1,1),(3,1,1),(6,1,0),(13,2,0),(14,2,0)], (93,124) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(1,2,1),(9,1,1),(10,1,1),(5,2,1),(3,2,1),(6,2,1),(13,1,1),(14,1,1)], (93,125) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(1,5,1),(9,8,1),(10,8,1),(5,5,1),(3,5,1),(6,5,1),(13,8,1),(14,8,1)], (93,126) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(1,8,1),(9,5,1),(10,5,1),(5,8,1),(3,8,1),(6,8,1),(13,5,1),(14,5,1)], (94,127) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0)], (94,128) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(1,1,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,1,1),(13,1,1),(14,1,1)], (94,129) => MOP_CODE[(9,8,1),(10,8,1),(5,8,0),(3,8,0),(6,1,0),(13,1,1),(14,1,1)], (94,130) => MOP_CODE[(9,8,0),(10,8,0),(5,8,1),(3,8,1),(6,1,0),(13,1,1),(14,1,1)], (94,131) => MOP_CODE[(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,1,0),(13,1,0),(14,1,0)], (94,132) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(1,2,1),(9,5,1),(10,5,1),(5,5,1),(3,5,1),(6,2,1),(13,2,1),(14,2,1)], (94,133) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(1,5,1),(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,5,1),(13,5,1),(14,5,1)], (94,134) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(1,8,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,8,1),(13,8,1),(14,8,1)], (95,135) => MOP_CODE[(9,24,0),(10,23,0),(5,2,0),(3,1,0),(6,2,0),(13,23,0),(14,24,0)], (95,136) => MOP_CODE[(9,24,0),(10,23,0),(5,2,0),(3,1,0),(6,2,0),(13,23,0),(14,24,0),(1,1,1),(9,24,1),(10,23,1),(5,2,1),(3,1,1),(6,2,1),(13,23,1),(14,24,1)], (95,137) => MOP_CODE[(9,24,1),(10,23,1),(5,2,0),(3,1,0),(6,2,0),(13,23,1),(14,24,1)], (95,138) => MOP_CODE[(9,24,0),(10,23,0),(5,2,1),(3,1,1),(6,2,0),(13,23,1),(14,24,1)], (95,139) => MOP_CODE[(9,24,1),(10,23,1),(5,2,1),(3,1,1),(6,2,0),(13,23,0),(14,24,0)], (95,140) => MOP_CODE[(9,24,0),(10,23,0),(5,2,0),(3,1,0),(6,2,0),(13,23,0),(14,24,0),(1,2,1),(9,23,1),(10,24,1),(5,1,1),(3,2,1),(6,1,1),(13,24,1),(14,23,1)], (95,141) => MOP_CODE[(9,24,0),(10,23,0),(5,2,0),(3,1,0),(6,2,0),(13,23,0),(14,24,0),(1,5,1),(9,26,1),(10,25,1),(5,8,1),(3,5,1),(6,8,1),(13,25,1),(14,26,1)], (95,142) => MOP_CODE[(9,24,0),(10,23,0),(5,2,0),(3,1,0),(6,2,0),(13,23,0),(14,24,0),(1,8,1),(9,25,1),(10,26,1),(5,5,1),(3,8,1),(6,5,1),(13,26,1),(14,25,1)], (96,143) => MOP_CODE[(9,26,0),(10,25,0),(5,25,0),(3,26,0),(6,2,0),(13,1,0),(14,2,0)], (96,144) => MOP_CODE[(9,26,0),(10,25,0),(5,25,0),(3,26,0),(6,2,0),(13,1,0),(14,2,0),(1,1,1),(9,26,1),(10,25,1),(5,25,1),(3,26,1),(6,2,1),(13,1,1),(14,2,1)], (96,145) => MOP_CODE[(9,26,1),(10,25,1),(5,25,0),(3,26,0),(6,2,0),(13,1,1),(14,2,1)], (96,146) => MOP_CODE[(9,26,0),(10,25,0),(5,25,1),(3,26,1),(6,2,0),(13,1,1),(14,2,1)], (96,147) => MOP_CODE[(9,26,1),(10,25,1),(5,25,1),(3,26,1),(6,2,0),(13,1,0),(14,2,0)], (96,148) => MOP_CODE[(9,26,0),(10,25,0),(5,25,0),(3,26,0),(6,2,0),(13,1,0),(14,2,0),(1,2,1),(9,25,1),(10,26,1),(5,26,1),(3,25,1),(6,1,1),(13,2,1),(14,1,1)], (96,149) => MOP_CODE[(9,26,0),(10,25,0),(5,25,0),(3,26,0),(6,2,0),(13,1,0),(14,2,0),(1,5,1),(9,24,1),(10,23,1),(5,23,1),(3,24,1),(6,8,1),(13,5,1),(14,8,1)], (96,150) => MOP_CODE[(9,26,0),(10,25,0),(5,25,0),(3,26,0),(6,2,0),(13,1,0),(14,2,0),(1,8,1),(9,23,1),(10,24,1),(5,24,1),(3,23,1),(6,5,1),(13,8,1),(14,5,1)], (97,151) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0)], (97,152) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(1,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1)], (97,153) => MOP_CODE[(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1)], (97,154) => MOP_CODE[(9,1,0),(10,1,0),(5,1,1),(3,1,1),(6,1,0),(13,1,1),(14,1,1)], (97,155) => MOP_CODE[(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,0),(13,1,0),(14,1,0)], (97,156) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(1,2,1),(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,2,1),(13,2,1),(14,2,1)], (98,157) => MOP_CODE[(9,27,0),(10,27,0),(5,27,0),(3,27,0),(6,1,0),(13,1,0),(14,1,0)], (98,158) => MOP_CODE[(9,27,0),(10,27,0),(5,27,0),(3,27,0),(6,1,0),(13,1,0),(14,1,0),(1,1,1),(9,27,1),(10,27,1),(5,27,1),(3,27,1),(6,1,1),(13,1,1),(14,1,1)], (98,159) => MOP_CODE[(9,27,1),(10,27,1),(5,27,0),(3,27,0),(6,1,0),(13,1,1),(14,1,1)], (98,160) => MOP_CODE[(9,27,0),(10,27,0),(5,27,1),(3,27,1),(6,1,0),(13,1,1),(14,1,1)], (98,161) => MOP_CODE[(9,27,1),(10,27,1),(5,27,1),(3,27,1),(6,1,0),(13,1,0),(14,1,0)], (98,162) => MOP_CODE[(9,27,0),(10,27,0),(5,27,0),(3,27,0),(6,1,0),(13,1,0),(14,1,0),(1,2,1),(9,28,1),(10,28,1),(5,28,1),(3,28,1),(6,2,1),(13,2,1),(14,2,1)], (99,163) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,0),(4,1,0),(15,1,0),(16,1,0)], (99,164) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,0),(4,1,0),(15,1,0),(16,1,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1),(7,1,1),(4,1,1),(15,1,1),(16,1,1)], (99,165) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,1,1),(4,1,1),(15,1,0),(16,1,0)], (99,166) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,1,0),(4,1,0),(15,1,1),(16,1,1)], (99,167) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,1),(4,1,1),(15,1,1),(16,1,1)], (99,168) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,0),(4,1,0),(15,1,0),(16,1,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1),(7,2,1),(4,2,1),(15,2,1),(16,2,1)], (99,169) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,0),(4,1,0),(15,1,0),(16,1,0),(1,5,1),(9,5,1),(10,5,1),(6,5,1),(7,5,1),(4,5,1),(15,5,1),(16,5,1)], (99,170) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,0),(4,1,0),(15,1,0),(16,1,0),(1,8,1),(9,8,1),(10,8,1),(6,8,1),(7,8,1),(4,8,1),(15,8,1),(16,8,1)], (100,171) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,5,0),(4,5,0),(15,5,0),(16,5,0)], (100,172) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,5,0),(4,5,0),(15,5,0),(16,5,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1),(7,5,1),(4,5,1),(15,5,1),(16,5,1)], (100,173) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,5,1),(4,5,1),(15,5,0),(16,5,0)], (100,174) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,5,0),(4,5,0),(15,5,1),(16,5,1)], (100,175) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,5,1),(4,5,1),(15,5,1),(16,5,1)], (100,176) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,5,0),(4,5,0),(15,5,0),(16,5,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1),(7,8,1),(4,8,1),(15,8,1),(16,8,1)], (100,177) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,5,0),(4,5,0),(15,5,0),(16,5,0),(1,5,1),(9,5,1),(10,5,1),(6,5,1),(7,1,1),(4,1,1),(15,1,1),(16,1,1)], (100,178) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,5,0),(4,5,0),(15,5,0),(16,5,0),(1,8,1),(9,8,1),(10,8,1),(6,8,1),(7,2,1),(4,2,1),(15,2,1),(16,2,1)], (101,179) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,2,0),(4,2,0),(15,1,0),(16,1,0)], (101,180) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,2,0),(4,2,0),(15,1,0),(16,1,0),(1,1,1),(9,2,1),(10,2,1),(6,1,1),(7,2,1),(4,2,1),(15,1,1),(16,1,1)], (101,181) => MOP_CODE[(9,2,1),(10,2,1),(6,1,0),(7,2,1),(4,2,1),(15,1,0),(16,1,0)], (101,182) => MOP_CODE[(9,2,1),(10,2,1),(6,1,0),(7,2,0),(4,2,0),(15,1,1),(16,1,1)], (101,183) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,2,1),(4,2,1),(15,1,1),(16,1,1)], (101,184) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,2,0),(4,2,0),(15,1,0),(16,1,0),(1,2,1),(9,1,1),(10,1,1),(6,2,1),(7,1,1),(4,1,1),(15,2,1),(16,2,1)], (101,185) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,2,0),(4,2,0),(15,1,0),(16,1,0),(1,5,1),(9,8,1),(10,8,1),(6,5,1),(7,8,1),(4,8,1),(15,5,1),(16,5,1)], (101,186) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,2,0),(4,2,0),(15,1,0),(16,1,0),(1,8,1),(9,5,1),(10,5,1),(6,8,1),(7,5,1),(4,5,1),(15,8,1),(16,8,1)], (102,187) => MOP_CODE[(9,8,0),(10,8,0),(6,1,0),(7,8,0),(4,8,0),(15,1,0),(16,1,0)], (102,188) => MOP_CODE[(9,8,0),(10,8,0),(6,1,0),(7,8,0),(4,8,0),(15,1,0),(16,1,0),(1,1,1),(9,8,1),(10,8,1),(6,1,1),(7,8,1),(4,8,1),(15,1,1),(16,1,1)], (102,189) => MOP_CODE[(9,8,1),(10,8,1),(6,1,0),(7,8,1),(4,8,1),(15,1,0),(16,1,0)], (102,190) => MOP_CODE[(9,8,1),(10,8,1),(6,1,0),(7,8,0),(4,8,0),(15,1,1),(16,1,1)], (102,191) => MOP_CODE[(9,8,0),(10,8,0),(6,1,0),(7,8,1),(4,8,1),(15,1,1),(16,1,1)], (102,192) => MOP_CODE[(9,8,0),(10,8,0),(6,1,0),(7,8,0),(4,8,0),(15,1,0),(16,1,0),(1,2,1),(9,5,1),(10,5,1),(6,2,1),(7,5,1),(4,5,1),(15,2,1),(16,2,1)], (102,193) => MOP_CODE[(9,8,0),(10,8,0),(6,1,0),(7,8,0),(4,8,0),(15,1,0),(16,1,0),(1,5,1),(9,2,1),(10,2,1),(6,5,1),(7,2,1),(4,2,1),(15,5,1),(16,5,1)], (102,194) => MOP_CODE[(9,8,0),(10,8,0),(6,1,0),(7,8,0),(4,8,0),(15,1,0),(16,1,0),(1,8,1),(9,1,1),(10,1,1),(6,8,1),(7,1,1),(4,1,1),(15,8,1),(16,8,1)], (103,195) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,0),(4,2,0),(15,2,0),(16,2,0)], (103,196) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,0),(4,2,0),(15,2,0),(16,2,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1),(7,2,1),(4,2,1),(15,2,1),(16,2,1)], (103,197) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,2,1),(4,2,1),(15,2,0),(16,2,0)], (103,198) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,2,0),(4,2,0),(15,2,1),(16,2,1)], (103,199) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,1),(4,2,1),(15,2,1),(16,2,1)], (103,200) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,0),(4,2,0),(15,2,0),(16,2,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1),(7,1,1),(4,1,1),(15,1,1),(16,1,1)], (103,201) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,0),(4,2,0),(15,2,0),(16,2,0),(1,5,1),(9,5,1),(10,5,1),(6,5,1),(7,8,1),(4,8,1),(15,8,1),(16,8,1)], (103,202) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,0),(4,2,0),(15,2,0),(16,2,0),(1,8,1),(9,8,1),(10,8,1),(6,8,1),(7,5,1),(4,5,1),(15,5,1),(16,5,1)], (104,203) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,8,0),(4,8,0),(15,8,0),(16,8,0)], (104,204) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,8,0),(4,8,0),(15,8,0),(16,8,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1),(7,8,1),(4,8,1),(15,8,1),(16,8,1)], (104,205) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,8,1),(4,8,1),(15,8,0),(16,8,0)], (104,206) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,8,0),(4,8,0),(15,8,1),(16,8,1)], (104,207) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,8,1),(4,8,1),(15,8,1),(16,8,1)], (104,208) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,8,0),(4,8,0),(15,8,0),(16,8,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1),(7,5,1),(4,5,1),(15,5,1),(16,5,1)], (104,209) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,8,0),(4,8,0),(15,8,0),(16,8,0),(1,5,1),(9,5,1),(10,5,1),(6,5,1),(7,2,1),(4,2,1),(15,2,1),(16,2,1)], (104,210) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,8,0),(4,8,0),(15,8,0),(16,8,0),(1,8,1),(9,8,1),(10,8,1),(6,8,1),(7,1,1),(4,1,1),(15,1,1),(16,1,1)], (105,211) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,1,0),(4,1,0),(15,2,0),(16,2,0)], (105,212) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,1,0),(4,1,0),(15,2,0),(16,2,0),(1,1,1),(9,2,1),(10,2,1),(6,1,1),(7,1,1),(4,1,1),(15,2,1),(16,2,1)], (105,213) => MOP_CODE[(9,2,1),(10,2,1),(6,1,0),(7,1,1),(4,1,1),(15,2,0),(16,2,0)], (105,214) => MOP_CODE[(9,2,1),(10,2,1),(6,1,0),(7,1,0),(4,1,0),(15,2,1),(16,2,1)], (105,215) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,1,1),(4,1,1),(15,2,1),(16,2,1)], (105,216) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,1,0),(4,1,0),(15,2,0),(16,2,0),(1,2,1),(9,1,1),(10,1,1),(6,2,1),(7,2,1),(4,2,1),(15,1,1),(16,1,1)], (105,217) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,1,0),(4,1,0),(15,2,0),(16,2,0),(1,5,1),(9,8,1),(10,8,1),(6,5,1),(7,5,1),(4,5,1),(15,8,1),(16,8,1)], (105,218) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,1,0),(4,1,0),(15,2,0),(16,2,0),(1,8,1),(9,5,1),(10,5,1),(6,8,1),(7,8,1),(4,8,1),(15,5,1),(16,5,1)], (106,219) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,5,0),(4,5,0),(15,8,0),(16,8,0)], (106,220) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,5,0),(4,5,0),(15,8,0),(16,8,0),(1,1,1),(9,2,1),(10,2,1),(6,1,1),(7,5,1),(4,5,1),(15,8,1),(16,8,1)], (106,221) => MOP_CODE[(9,2,1),(10,2,1),(6,1,0),(7,5,1),(4,5,1),(15,8,0),(16,8,0)], (106,222) => MOP_CODE[(9,2,1),(10,2,1),(6,1,0),(7,5,0),(4,5,0),(15,8,1),(16,8,1)], (106,223) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,5,1),(4,5,1),(15,8,1),(16,8,1)], (106,224) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,5,0),(4,5,0),(15,8,0),(16,8,0),(1,2,1),(9,1,1),(10,1,1),(6,2,1),(7,8,1),(4,8,1),(15,5,1),(16,5,1)], (106,225) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,5,0),(4,5,0),(15,8,0),(16,8,0),(1,5,1),(9,8,1),(10,8,1),(6,5,1),(7,1,1),(4,1,1),(15,2,1),(16,2,1)], (106,226) => MOP_CODE[(9,2,0),(10,2,0),(6,1,0),(7,5,0),(4,5,0),(15,8,0),(16,8,0),(1,8,1),(9,5,1),(10,5,1),(6,8,1),(7,2,1),(4,2,1),(15,1,1),(16,1,1)], (107,227) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,0),(4,1,0),(15,1,0),(16,1,0)], (107,228) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,0),(4,1,0),(15,1,0),(16,1,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1),(7,1,1),(4,1,1),(15,1,1),(16,1,1)], (107,229) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,1,1),(4,1,1),(15,1,0),(16,1,0)], (107,230) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,1,0),(4,1,0),(15,1,1),(16,1,1)], (107,231) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,1),(4,1,1),(15,1,1),(16,1,1)], (107,232) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,1,0),(4,1,0),(15,1,0),(16,1,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1),(7,2,1),(4,2,1),(15,2,1),(16,2,1)], (108,233) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,0),(4,2,0),(15,2,0),(16,2,0)], (108,234) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,0),(4,2,0),(15,2,0),(16,2,0),(1,1,1),(9,1,1),(10,1,1),(6,1,1),(7,2,1),(4,2,1),(15,2,1),(16,2,1)], (108,235) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,2,1),(4,2,1),(15,2,0),(16,2,0)], (108,236) => MOP_CODE[(9,1,1),(10,1,1),(6,1,0),(7,2,0),(4,2,0),(15,2,1),(16,2,1)], (108,237) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,1),(4,2,1),(15,2,1),(16,2,1)], (108,238) => MOP_CODE[(9,1,0),(10,1,0),(6,1,0),(7,2,0),(4,2,0),(15,2,0),(16,2,0),(1,2,1),(9,2,1),(10,2,1),(6,2,1),(7,1,1),(4,1,1),(15,1,1),(16,1,1)], (109,239) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(7,1,0),(4,1,0),(15,27,0),(16,27,0)], (109,240) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(7,1,0),(4,1,0),(15,27,0),(16,27,0),(1,1,1),(9,27,1),(10,27,1),(6,1,1),(7,1,1),(4,1,1),(15,27,1),(16,27,1)], (109,241) => MOP_CODE[(9,27,1),(10,27,1),(6,1,0),(7,1,1),(4,1,1),(15,27,0),(16,27,0)], (109,242) => MOP_CODE[(9,27,1),(10,27,1),(6,1,0),(7,1,0),(4,1,0),(15,27,1),(16,27,1)], (109,243) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(7,1,1),(4,1,1),(15,27,1),(16,27,1)], (109,244) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(7,1,0),(4,1,0),(15,27,0),(16,27,0),(1,2,1),(9,28,1),(10,28,1),(6,2,1),(7,2,1),(4,2,1),(15,28,1),(16,28,1)], (110,245) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(7,2,0),(4,2,0),(15,28,0),(16,28,0)], (110,246) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(7,2,0),(4,2,0),(15,28,0),(16,28,0),(1,1,1),(9,27,1),(10,27,1),(6,1,1),(7,2,1),(4,2,1),(15,28,1),(16,28,1)], (110,247) => MOP_CODE[(9,27,1),(10,27,1),(6,1,0),(7,2,1),(4,2,1),(15,28,0),(16,28,0)], (110,248) => MOP_CODE[(9,27,1),(10,27,1),(6,1,0),(7,2,0),(4,2,0),(15,28,1),(16,28,1)], (110,249) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(7,2,1),(4,2,1),(15,28,1),(16,28,1)], (110,250) => MOP_CODE[(9,27,0),(10,27,0),(6,1,0),(7,2,0),(4,2,0),(15,28,0),(16,28,0),(1,2,1),(9,28,1),(10,28,1),(6,2,1),(7,1,1),(4,1,1),(15,27,1),(16,27,1)], (111,251) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0)], (111,252) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1)], (111,253) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0),(11,1,1),(12,1,1),(15,1,0),(16,1,0)], (111,254) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,1),(12,1,1),(15,1,1),(16,1,1)], (111,255) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0),(11,1,0),(12,1,0),(15,1,1),(16,1,1)], (111,256) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(1,2,1),(5,2,1),(3,2,1),(6,2,1),(11,2,1),(12,2,1),(15,2,1),(16,2,1)], (111,257) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(1,5,1),(5,5,1),(3,5,1),(6,5,1),(11,5,1),(12,5,1),(15,5,1),(16,5,1)], (111,258) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(1,8,1),(5,8,1),(3,8,1),(6,8,1),(11,8,1),(12,8,1),(15,8,1),(16,8,1)], (112,259) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(11,1,0),(12,1,0),(15,2,0),(16,2,0)], (112,260) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(11,1,0),(12,1,0),(15,2,0),(16,2,0),(1,1,1),(5,2,1),(3,2,1),(6,1,1),(11,1,1),(12,1,1),(15,2,1),(16,2,1)], (112,261) => MOP_CODE[(5,2,1),(3,2,1),(6,1,0),(11,1,1),(12,1,1),(15,2,0),(16,2,0)], (112,262) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(11,1,1),(12,1,1),(15,2,1),(16,2,1)], (112,263) => MOP_CODE[(5,2,1),(3,2,1),(6,1,0),(11,1,0),(12,1,0),(15,2,1),(16,2,1)], (112,264) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(11,1,0),(12,1,0),(15,2,0),(16,2,0),(1,2,1),(5,1,1),(3,1,1),(6,2,1),(11,2,1),(12,2,1),(15,1,1),(16,1,1)], (112,265) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(11,1,0),(12,1,0),(15,2,0),(16,2,0),(1,5,1),(5,8,1),(3,8,1),(6,5,1),(11,5,1),(12,5,1),(15,8,1),(16,8,1)], (112,266) => MOP_CODE[(5,2,0),(3,2,0),(6,1,0),(11,1,0),(12,1,0),(15,2,0),(16,2,0),(1,8,1),(5,5,1),(3,5,1),(6,8,1),(11,8,1),(12,8,1),(15,5,1),(16,5,1)], (113,267) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(11,1,0),(12,1,0),(15,5,0),(16,5,0)], (113,268) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(11,1,0),(12,1,0),(15,5,0),(16,5,0),(1,1,1),(5,5,1),(3,5,1),(6,1,1),(11,1,1),(12,1,1),(15,5,1),(16,5,1)], (113,269) => MOP_CODE[(5,5,1),(3,5,1),(6,1,0),(11,1,1),(12,1,1),(15,5,0),(16,5,0)], (113,270) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(11,1,1),(12,1,1),(15,5,1),(16,5,1)], (113,271) => MOP_CODE[(5,5,1),(3,5,1),(6,1,0),(11,1,0),(12,1,0),(15,5,1),(16,5,1)], (113,272) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(11,1,0),(12,1,0),(15,5,0),(16,5,0),(1,2,1),(5,8,1),(3,8,1),(6,2,1),(11,2,1),(12,2,1),(15,8,1),(16,8,1)], (113,273) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(11,1,0),(12,1,0),(15,5,0),(16,5,0),(1,5,1),(5,1,1),(3,1,1),(6,5,1),(11,5,1),(12,5,1),(15,1,1),(16,1,1)], (113,274) => MOP_CODE[(5,5,0),(3,5,0),(6,1,0),(11,1,0),(12,1,0),(15,5,0),(16,5,0),(1,8,1),(5,2,1),(3,2,1),(6,8,1),(11,8,1),(12,8,1),(15,2,1),(16,2,1)], (114,275) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(11,1,0),(12,1,0),(15,8,0),(16,8,0)], (114,276) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(11,1,0),(12,1,0),(15,8,0),(16,8,0),(1,1,1),(5,8,1),(3,8,1),(6,1,1),(11,1,1),(12,1,1),(15,8,1),(16,8,1)], (114,277) => MOP_CODE[(5,8,1),(3,8,1),(6,1,0),(11,1,1),(12,1,1),(15,8,0),(16,8,0)], (114,278) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(11,1,1),(12,1,1),(15,8,1),(16,8,1)], (114,279) => MOP_CODE[(5,8,1),(3,8,1),(6,1,0),(11,1,0),(12,1,0),(15,8,1),(16,8,1)], (114,280) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(11,1,0),(12,1,0),(15,8,0),(16,8,0),(1,2,1),(5,5,1),(3,5,1),(6,2,1),(11,2,1),(12,2,1),(15,5,1),(16,5,1)], (114,281) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(11,1,0),(12,1,0),(15,8,0),(16,8,0),(1,5,1),(5,2,1),(3,2,1),(6,5,1),(11,5,1),(12,5,1),(15,2,1),(16,2,1)], (114,282) => MOP_CODE[(5,8,0),(3,8,0),(6,1,0),(11,1,0),(12,1,0),(15,8,0),(16,8,0),(1,8,1),(5,1,1),(3,1,1),(6,8,1),(11,8,1),(12,8,1),(15,1,1),(16,1,1)], (115,283) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0)], (115,284) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(1,1,1),(6,1,1),(13,1,1),(14,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1)], (115,285) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,1),(12,1,1),(7,1,1),(4,1,1)], (115,286) => MOP_CODE[(6,1,0),(13,1,1),(14,1,1),(11,1,1),(12,1,1),(7,1,0),(4,1,0)], (115,287) => MOP_CODE[(6,1,0),(13,1,1),(14,1,1),(11,1,0),(12,1,0),(7,1,1),(4,1,1)], (115,288) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(1,2,1),(6,2,1),(13,2,1),(14,2,1),(11,2,1),(12,2,1),(7,2,1),(4,2,1)], (115,289) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(1,5,1),(6,5,1),(13,5,1),(14,5,1),(11,5,1),(12,5,1),(7,5,1),(4,5,1)], (115,290) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(1,8,1),(6,8,1),(13,8,1),(14,8,1),(11,8,1),(12,8,1),(7,8,1),(4,8,1)], (116,291) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0)], (116,292) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(1,1,1),(6,1,1),(13,2,1),(14,2,1),(11,1,1),(12,1,1),(7,2,1),(4,2,1)], (116,293) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,1),(12,1,1),(7,2,1),(4,2,1)], (116,294) => MOP_CODE[(6,1,0),(13,2,1),(14,2,1),(11,1,1),(12,1,1),(7,2,0),(4,2,0)], (116,295) => MOP_CODE[(6,1,0),(13,2,1),(14,2,1),(11,1,0),(12,1,0),(7,2,1),(4,2,1)], (116,296) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(1,2,1),(6,2,1),(13,1,1),(14,1,1),(11,2,1),(12,2,1),(7,1,1),(4,1,1)], (116,297) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(1,5,1),(6,5,1),(13,8,1),(14,8,1),(11,5,1),(12,5,1),(7,8,1),(4,8,1)], (116,298) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(1,8,1),(6,8,1),(13,5,1),(14,5,1),(11,8,1),(12,8,1),(7,5,1),(4,5,1)], (117,299) => MOP_CODE[(6,1,0),(13,5,0),(14,5,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0)], (117,300) => MOP_CODE[(6,1,0),(13,5,0),(14,5,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(1,1,1),(6,1,1),(13,5,1),(14,5,1),(11,1,1),(12,1,1),(7,5,1),(4,5,1)], (117,301) => MOP_CODE[(6,1,0),(13,5,0),(14,5,0),(11,1,1),(12,1,1),(7,5,1),(4,5,1)], (117,302) => MOP_CODE[(6,1,0),(13,5,1),(14,5,1),(11,1,1),(12,1,1),(7,5,0),(4,5,0)], (117,303) => MOP_CODE[(6,1,0),(13,5,1),(14,5,1),(11,1,0),(12,1,0),(7,5,1),(4,5,1)], (117,304) => MOP_CODE[(6,1,0),(13,5,0),(14,5,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(1,2,1),(6,2,1),(13,8,1),(14,8,1),(11,2,1),(12,2,1),(7,8,1),(4,8,1)], (117,305) => MOP_CODE[(6,1,0),(13,5,0),(14,5,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(1,5,1),(6,5,1),(13,1,1),(14,1,1),(11,5,1),(12,5,1),(7,1,1),(4,1,1)], (117,306) => MOP_CODE[(6,1,0),(13,5,0),(14,5,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(1,8,1),(6,8,1),(13,2,1),(14,2,1),(11,8,1),(12,8,1),(7,2,1),(4,2,1)], (118,307) => MOP_CODE[(6,1,0),(13,8,0),(14,8,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0)], (118,308) => MOP_CODE[(6,1,0),(13,8,0),(14,8,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(1,1,1),(6,1,1),(13,8,1),(14,8,1),(11,1,1),(12,1,1),(7,8,1),(4,8,1)], (118,309) => MOP_CODE[(6,1,0),(13,8,0),(14,8,0),(11,1,1),(12,1,1),(7,8,1),(4,8,1)], (118,310) => MOP_CODE[(6,1,0),(13,8,1),(14,8,1),(11,1,1),(12,1,1),(7,8,0),(4,8,0)], (118,311) => MOP_CODE[(6,1,0),(13,8,1),(14,8,1),(11,1,0),(12,1,0),(7,8,1),(4,8,1)], (118,312) => MOP_CODE[(6,1,0),(13,8,0),(14,8,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(1,2,1),(6,2,1),(13,5,1),(14,5,1),(11,2,1),(12,2,1),(7,5,1),(4,5,1)], (118,313) => MOP_CODE[(6,1,0),(13,8,0),(14,8,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(1,5,1),(6,5,1),(13,2,1),(14,2,1),(11,5,1),(12,5,1),(7,2,1),(4,2,1)], (118,314) => MOP_CODE[(6,1,0),(13,8,0),(14,8,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(1,8,1),(6,8,1),(13,1,1),(14,1,1),(11,8,1),(12,8,1),(7,1,1),(4,1,1)], (119,315) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0)], (119,316) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(1,1,1),(6,1,1),(13,1,1),(14,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1)], (119,317) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,1),(12,1,1),(7,1,1),(4,1,1)], (119,318) => MOP_CODE[(6,1,0),(13,1,1),(14,1,1),(11,1,1),(12,1,1),(7,1,0),(4,1,0)], (119,319) => MOP_CODE[(6,1,0),(13,1,1),(14,1,1),(11,1,0),(12,1,0),(7,1,1),(4,1,1)], (119,320) => MOP_CODE[(6,1,0),(13,1,0),(14,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(1,2,1),(6,2,1),(13,2,1),(14,2,1),(11,2,1),(12,2,1),(7,2,1),(4,2,1)], (120,321) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0)], (120,322) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(1,1,1),(6,1,1),(13,2,1),(14,2,1),(11,1,1),(12,1,1),(7,2,1),(4,2,1)], (120,323) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,1),(12,1,1),(7,2,1),(4,2,1)], (120,324) => MOP_CODE[(6,1,0),(13,2,1),(14,2,1),(11,1,1),(12,1,1),(7,2,0),(4,2,0)], (120,325) => MOP_CODE[(6,1,0),(13,2,1),(14,2,1),(11,1,0),(12,1,0),(7,2,1),(4,2,1)], (120,326) => MOP_CODE[(6,1,0),(13,2,0),(14,2,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(1,2,1),(6,2,1),(13,1,1),(14,1,1),(11,2,1),(12,2,1),(7,1,1),(4,1,1)], (121,327) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0)], (121,328) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1)], (121,329) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0),(11,1,1),(12,1,1),(15,1,0),(16,1,0)], (121,330) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,1),(12,1,1),(15,1,1),(16,1,1)], (121,331) => MOP_CODE[(5,1,1),(3,1,1),(6,1,0),(11,1,0),(12,1,0),(15,1,1),(16,1,1)], (121,332) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(1,2,1),(5,2,1),(3,2,1),(6,2,1),(11,2,1),(12,2,1),(15,2,1),(16,2,1)], (122,333) => MOP_CODE[(5,27,0),(3,27,0),(6,1,0),(11,1,0),(12,1,0),(15,27,0),(16,27,0)], (122,334) => MOP_CODE[(5,27,0),(3,27,0),(6,1,0),(11,1,0),(12,1,0),(15,27,0),(16,27,0),(1,1,1),(5,27,1),(3,27,1),(6,1,1),(11,1,1),(12,1,1),(15,27,1),(16,27,1)], (122,335) => MOP_CODE[(5,27,1),(3,27,1),(6,1,0),(11,1,1),(12,1,1),(15,27,0),(16,27,0)], (122,336) => MOP_CODE[(5,27,0),(3,27,0),(6,1,0),(11,1,1),(12,1,1),(15,27,1),(16,27,1)], (122,337) => MOP_CODE[(5,27,1),(3,27,1),(6,1,0),(11,1,0),(12,1,0),(15,27,1),(16,27,1)], (122,338) => MOP_CODE[(5,27,0),(3,27,0),(6,1,0),(11,1,0),(12,1,0),(15,27,0),(16,27,0),(1,2,1),(5,28,1),(3,28,1),(6,2,1),(11,2,1),(12,2,1),(15,28,1),(16,28,1)], (123,339) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0)], (123,340) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(1,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1),(2,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1)], (123,341) => MOP_CODE[(9,1,0),(10,1,0),(5,1,1),(3,1,1),(6,1,0),(13,1,1),(14,1,1),(2,1,1),(11,1,1),(12,1,1),(7,1,0),(4,1,0),(8,1,1),(15,1,0),(16,1,0)], (123,342) => MOP_CODE[(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,0),(15,1,0),(16,1,0)], (123,343) => MOP_CODE[(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(2,1,0),(11,1,1),(12,1,1),(7,1,0),(4,1,0),(8,1,0),(15,1,1),(16,1,1)], (123,344) => MOP_CODE[(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(2,1,1),(11,1,0),(12,1,0),(7,1,1),(4,1,1),(8,1,1),(15,1,0),(16,1,0)], (123,345) => MOP_CODE[(9,1,0),(10,1,0),(5,1,1),(3,1,1),(6,1,0),(13,1,1),(14,1,1),(2,1,0),(11,1,0),(12,1,0),(7,1,1),(4,1,1),(8,1,0),(15,1,1),(16,1,1)], (123,346) => MOP_CODE[(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,0),(13,1,0),(14,1,0),(2,1,1),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,1),(15,1,1),(16,1,1)], (123,347) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1)], (123,348) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(1,2,1),(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,2,1),(13,2,1),(14,2,1),(2,2,1),(11,2,1),(12,2,1),(7,2,1),(4,2,1),(8,2,1),(15,2,1),(16,2,1)], (123,349) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(1,5,1),(9,5,1),(10,5,1),(5,5,1),(3,5,1),(6,5,1),(13,5,1),(14,5,1),(2,5,1),(11,5,1),(12,5,1),(7,5,1),(4,5,1),(8,5,1),(15,5,1),(16,5,1)], (123,350) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(1,8,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,8,1),(13,8,1),(14,8,1),(2,8,1),(11,8,1),(12,8,1),(7,8,1),(4,8,1),(8,8,1),(15,8,1),(16,8,1)], (124,351) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,0),(15,2,0),(16,2,0)], (124,352) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,0),(15,2,0),(16,2,0),(1,1,1),(9,1,1),(10,1,1),(5,2,1),(3,2,1),(6,1,1),(13,2,1),(14,2,1),(2,1,1),(11,1,1),(12,1,1),(7,2,1),(4,2,1),(8,1,1),(15,2,1),(16,2,1)], (124,353) => MOP_CODE[(9,1,0),(10,1,0),(5,2,1),(3,2,1),(6,1,0),(13,2,1),(14,2,1),(2,1,1),(11,1,1),(12,1,1),(7,2,0),(4,2,0),(8,1,1),(15,2,0),(16,2,0)], (124,354) => MOP_CODE[(9,1,1),(10,1,1),(5,2,1),(3,2,1),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,1),(12,1,1),(7,2,1),(4,2,1),(8,1,0),(15,2,0),(16,2,0)], (124,355) => MOP_CODE[(9,1,1),(10,1,1),(5,2,0),(3,2,0),(6,1,0),(13,2,1),(14,2,1),(2,1,0),(11,1,1),(12,1,1),(7,2,0),(4,2,0),(8,1,0),(15,2,1),(16,2,1)], (124,356) => MOP_CODE[(9,1,1),(10,1,1),(5,2,0),(3,2,0),(6,1,0),(13,2,1),(14,2,1),(2,1,1),(11,1,0),(12,1,0),(7,2,1),(4,2,1),(8,1,1),(15,2,0),(16,2,0)], (124,357) => MOP_CODE[(9,1,0),(10,1,0),(5,2,1),(3,2,1),(6,1,0),(13,2,1),(14,2,1),(2,1,0),(11,1,0),(12,1,0),(7,2,1),(4,2,1),(8,1,0),(15,2,1),(16,2,1)], (124,358) => MOP_CODE[(9,1,1),(10,1,1),(5,2,1),(3,2,1),(6,1,0),(13,2,0),(14,2,0),(2,1,1),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,1),(15,2,1),(16,2,1)], (124,359) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,1),(11,1,1),(12,1,1),(7,2,1),(4,2,1),(8,1,1),(15,2,1),(16,2,1)], (124,360) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,0),(15,2,0),(16,2,0),(1,2,1),(9,2,1),(10,2,1),(5,1,1),(3,1,1),(6,2,1),(13,1,1),(14,1,1),(2,2,1),(11,2,1),(12,2,1),(7,1,1),(4,1,1),(8,2,1),(15,1,1),(16,1,1)], (124,361) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,0),(15,2,0),(16,2,0),(1,5,1),(9,5,1),(10,5,1),(5,8,1),(3,8,1),(6,5,1),(13,8,1),(14,8,1),(2,5,1),(11,5,1),(12,5,1),(7,8,1),(4,8,1),(8,5,1),(15,8,1),(16,8,1)], (124,362) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,0),(15,2,0),(16,2,0),(1,8,1),(9,8,1),(10,8,1),(5,5,1),(3,5,1),(6,8,1),(13,5,1),(14,5,1),(2,8,1),(11,8,1),(12,8,1),(7,5,1),(4,5,1),(8,8,1),(15,5,1),(16,5,1)], (125,363) => MOP_CODE[(9,3,0),(10,4,0),(5,4,0),(3,3,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,3,0),(12,4,0),(7,4,0),(4,3,0),(8,5,0),(15,1,0),(16,5,0)], (125,364) => MOP_CODE[(9,3,0),(10,4,0),(5,4,0),(3,3,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,3,0),(12,4,0),(7,4,0),(4,3,0),(8,5,0),(15,1,0),(16,5,0),(1,1,1),(9,3,1),(10,4,1),(5,4,1),(3,3,1),(6,5,1),(13,1,1),(14,5,1),(2,1,1),(11,3,1),(12,4,1),(7,4,1),(4,3,1),(8,5,1),(15,1,1),(16,5,1)], (125,365) => MOP_CODE[(9,3,0),(10,4,0),(5,4,1),(3,3,1),(6,5,0),(13,1,1),(14,5,1),(2,1,1),(11,3,1),(12,4,1),(7,4,0),(4,3,0),(8,5,1),(15,1,0),(16,5,0)], (125,366) => MOP_CODE[(9,3,1),(10,4,1),(5,4,1),(3,3,1),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,3,1),(12,4,1),(7,4,1),(4,3,1),(8,5,0),(15,1,0),(16,5,0)], (125,367) => MOP_CODE[(9,3,1),(10,4,1),(5,4,0),(3,3,0),(6,5,0),(13,1,1),(14,5,1),(2,1,0),(11,3,1),(12,4,1),(7,4,0),(4,3,0),(8,5,0),(15,1,1),(16,5,1)], (125,368) => MOP_CODE[(9,3,1),(10,4,1),(5,4,0),(3,3,0),(6,5,0),(13,1,1),(14,5,1),(2,1,1),(11,3,0),(12,4,0),(7,4,1),(4,3,1),(8,5,1),(15,1,0),(16,5,0)], (125,369) => MOP_CODE[(9,3,0),(10,4,0),(5,4,1),(3,3,1),(6,5,0),(13,1,1),(14,5,1),(2,1,0),(11,3,0),(12,4,0),(7,4,1),(4,3,1),(8,5,0),(15,1,1),(16,5,1)], (125,370) => MOP_CODE[(9,3,1),(10,4,1),(5,4,1),(3,3,1),(6,5,0),(13,1,0),(14,5,0),(2,1,1),(11,3,0),(12,4,0),(7,4,0),(4,3,0),(8,5,1),(15,1,1),(16,5,1)], (125,371) => MOP_CODE[(9,3,0),(10,4,0),(5,4,0),(3,3,0),(6,5,0),(13,1,0),(14,5,0),(2,1,1),(11,3,1),(12,4,1),(7,4,1),(4,3,1),(8,5,1),(15,1,1),(16,5,1)], (125,372) => MOP_CODE[(9,3,0),(10,4,0),(5,4,0),(3,3,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,3,0),(12,4,0),(7,4,0),(4,3,0),(8,5,0),(15,1,0),(16,5,0),(1,2,1),(9,6,1),(10,7,1),(5,7,1),(3,6,1),(6,8,1),(13,2,1),(14,8,1),(2,2,1),(11,6,1),(12,7,1),(7,7,1),(4,6,1),(8,8,1),(15,2,1),(16,8,1)], (125,373) => MOP_CODE[(9,3,0),(10,4,0),(5,4,0),(3,3,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,3,0),(12,4,0),(7,4,0),(4,3,0),(8,5,0),(15,1,0),(16,5,0),(1,5,1),(9,4,1),(10,3,1),(5,3,1),(3,4,1),(6,1,1),(13,5,1),(14,1,1),(2,5,1),(11,4,1),(12,3,1),(7,3,1),(4,4,1),(8,1,1),(15,5,1),(16,1,1)], (125,374) => MOP_CODE[(9,3,0),(10,4,0),(5,4,0),(3,3,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,3,0),(12,4,0),(7,4,0),(4,3,0),(8,5,0),(15,1,0),(16,5,0),(1,8,1),(9,7,1),(10,6,1),(5,6,1),(3,7,1),(6,2,1),(13,8,1),(14,2,1),(2,8,1),(11,7,1),(12,6,1),(7,6,1),(4,7,1),(8,2,1),(15,8,1),(16,2,1)], (126,375) => MOP_CODE[(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,3,0),(12,4,0),(7,7,0),(4,6,0),(8,5,0),(15,2,0),(16,8,0)], (126,376) => MOP_CODE[(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,3,0),(12,4,0),(7,7,0),(4,6,0),(8,5,0),(15,2,0),(16,8,0),(1,1,1),(9,3,1),(10,4,1),(5,7,1),(3,6,1),(6,5,1),(13,2,1),(14,8,1),(2,1,1),(11,3,1),(12,4,1),(7,7,1),(4,6,1),(8,5,1),(15,2,1),(16,8,1)], (126,377) => MOP_CODE[(9,3,0),(10,4,0),(5,7,1),(3,6,1),(6,5,0),(13,2,1),(14,8,1),(2,1,1),(11,3,1),(12,4,1),(7,7,0),(4,6,0),(8,5,1),(15,2,0),(16,8,0)], (126,378) => MOP_CODE[(9,3,1),(10,4,1),(5,7,1),(3,6,1),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,3,1),(12,4,1),(7,7,1),(4,6,1),(8,5,0),(15,2,0),(16,8,0)], (126,379) => MOP_CODE[(9,3,1),(10,4,1),(5,7,0),(3,6,0),(6,5,0),(13,2,1),(14,8,1),(2,1,0),(11,3,1),(12,4,1),(7,7,0),(4,6,0),(8,5,0),(15,2,1),(16,8,1)], (126,380) => MOP_CODE[(9,3,1),(10,4,1),(5,7,0),(3,6,0),(6,5,0),(13,2,1),(14,8,1),(2,1,1),(11,3,0),(12,4,0),(7,7,1),(4,6,1),(8,5,1),(15,2,0),(16,8,0)], (126,381) => MOP_CODE[(9,3,0),(10,4,0),(5,7,1),(3,6,1),(6,5,0),(13,2,1),(14,8,1),(2,1,0),(11,3,0),(12,4,0),(7,7,1),(4,6,1),(8,5,0),(15,2,1),(16,8,1)], (126,382) => MOP_CODE[(9,3,1),(10,4,1),(5,7,1),(3,6,1),(6,5,0),(13,2,0),(14,8,0),(2,1,1),(11,3,0),(12,4,0),(7,7,0),(4,6,0),(8,5,1),(15,2,1),(16,8,1)], (126,383) => MOP_CODE[(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(2,1,1),(11,3,1),(12,4,1),(7,7,1),(4,6,1),(8,5,1),(15,2,1),(16,8,1)], (126,384) => MOP_CODE[(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,3,0),(12,4,0),(7,7,0),(4,6,0),(8,5,0),(15,2,0),(16,8,0),(1,2,1),(9,6,1),(10,7,1),(5,4,1),(3,3,1),(6,8,1),(13,1,1),(14,5,1),(2,2,1),(11,6,1),(12,7,1),(7,4,1),(4,3,1),(8,8,1),(15,1,1),(16,5,1)], (126,385) => MOP_CODE[(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,3,0),(12,4,0),(7,7,0),(4,6,0),(8,5,0),(15,2,0),(16,8,0),(1,5,1),(9,4,1),(10,3,1),(5,6,1),(3,7,1),(6,1,1),(13,8,1),(14,2,1),(2,5,1),(11,4,1),(12,3,1),(7,6,1),(4,7,1),(8,1,1),(15,8,1),(16,2,1)], (126,386) => MOP_CODE[(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,3,0),(12,4,0),(7,7,0),(4,6,0),(8,5,0),(15,2,0),(16,8,0),(1,8,1),(9,7,1),(10,6,1),(5,3,1),(3,4,1),(6,2,1),(13,5,1),(14,1,1),(2,8,1),(11,7,1),(12,6,1),(7,3,1),(4,4,1),(8,2,1),(15,5,1),(16,1,1)], (127,387) => MOP_CODE[(9,1,0),(10,1,0),(5,5,0),(3,5,0),(6,1,0),(13,5,0),(14,5,0),(2,1,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(8,1,0),(15,5,0),(16,5,0)], (127,388) => MOP_CODE[(9,1,0),(10,1,0),(5,5,0),(3,5,0),(6,1,0),(13,5,0),(14,5,0),(2,1,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(8,1,0),(15,5,0),(16,5,0),(1,1,1),(9,1,1),(10,1,1),(5,5,1),(3,5,1),(6,1,1),(13,5,1),(14,5,1),(2,1,1),(11,1,1),(12,1,1),(7,5,1),(4,5,1),(8,1,1),(15,5,1),(16,5,1)], (127,389) => MOP_CODE[(9,1,0),(10,1,0),(5,5,1),(3,5,1),(6,1,0),(13,5,1),(14,5,1),(2,1,1),(11,1,1),(12,1,1),(7,5,0),(4,5,0),(8,1,1),(15,5,0),(16,5,0)], (127,390) => MOP_CODE[(9,1,1),(10,1,1),(5,5,1),(3,5,1),(6,1,0),(13,5,0),(14,5,0),(2,1,0),(11,1,1),(12,1,1),(7,5,1),(4,5,1),(8,1,0),(15,5,0),(16,5,0)], (127,391) => MOP_CODE[(9,1,1),(10,1,1),(5,5,0),(3,5,0),(6,1,0),(13,5,1),(14,5,1),(2,1,0),(11,1,1),(12,1,1),(7,5,0),(4,5,0),(8,1,0),(15,5,1),(16,5,1)], (127,392) => MOP_CODE[(9,1,1),(10,1,1),(5,5,0),(3,5,0),(6,1,0),(13,5,1),(14,5,1),(2,1,1),(11,1,0),(12,1,0),(7,5,1),(4,5,1),(8,1,1),(15,5,0),(16,5,0)], (127,393) => MOP_CODE[(9,1,0),(10,1,0),(5,5,1),(3,5,1),(6,1,0),(13,5,1),(14,5,1),(2,1,0),(11,1,0),(12,1,0),(7,5,1),(4,5,1),(8,1,0),(15,5,1),(16,5,1)], (127,394) => MOP_CODE[(9,1,1),(10,1,1),(5,5,1),(3,5,1),(6,1,0),(13,5,0),(14,5,0),(2,1,1),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(8,1,1),(15,5,1),(16,5,1)], (127,395) => MOP_CODE[(9,1,0),(10,1,0),(5,5,0),(3,5,0),(6,1,0),(13,5,0),(14,5,0),(2,1,1),(11,1,1),(12,1,1),(7,5,1),(4,5,1),(8,1,1),(15,5,1),(16,5,1)], (127,396) => MOP_CODE[(9,1,0),(10,1,0),(5,5,0),(3,5,0),(6,1,0),(13,5,0),(14,5,0),(2,1,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(8,1,0),(15,5,0),(16,5,0),(1,2,1),(9,2,1),(10,2,1),(5,8,1),(3,8,1),(6,2,1),(13,8,1),(14,8,1),(2,2,1),(11,2,1),(12,2,1),(7,8,1),(4,8,1),(8,2,1),(15,8,1),(16,8,1)], (127,397) => MOP_CODE[(9,1,0),(10,1,0),(5,5,0),(3,5,0),(6,1,0),(13,5,0),(14,5,0),(2,1,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(8,1,0),(15,5,0),(16,5,0),(1,5,1),(9,5,1),(10,5,1),(5,1,1),(3,1,1),(6,5,1),(13,1,1),(14,1,1),(2,5,1),(11,5,1),(12,5,1),(7,1,1),(4,1,1),(8,5,1),(15,1,1),(16,1,1)], (127,398) => MOP_CODE[(9,1,0),(10,1,0),(5,5,0),(3,5,0),(6,1,0),(13,5,0),(14,5,0),(2,1,0),(11,1,0),(12,1,0),(7,5,0),(4,5,0),(8,1,0),(15,5,0),(16,5,0),(1,8,1),(9,8,1),(10,8,1),(5,2,1),(3,2,1),(6,8,1),(13,2,1),(14,2,1),(2,8,1),(11,8,1),(12,8,1),(7,2,1),(4,2,1),(8,8,1),(15,2,1),(16,2,1)], (128,399) => MOP_CODE[(9,1,0),(10,1,0),(5,8,0),(3,8,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(8,1,0),(15,8,0),(16,8,0)], (128,400) => MOP_CODE[(9,1,0),(10,1,0),(5,8,0),(3,8,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(8,1,0),(15,8,0),(16,8,0),(1,1,1),(9,1,1),(10,1,1),(5,8,1),(3,8,1),(6,1,1),(13,8,1),(14,8,1),(2,1,1),(11,1,1),(12,1,1),(7,8,1),(4,8,1),(8,1,1),(15,8,1),(16,8,1)], (128,401) => MOP_CODE[(9,1,0),(10,1,0),(5,8,1),(3,8,1),(6,1,0),(13,8,1),(14,8,1),(2,1,1),(11,1,1),(12,1,1),(7,8,0),(4,8,0),(8,1,1),(15,8,0),(16,8,0)], (128,402) => MOP_CODE[(9,1,1),(10,1,1),(5,8,1),(3,8,1),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,1,1),(12,1,1),(7,8,1),(4,8,1),(8,1,0),(15,8,0),(16,8,0)], (128,403) => MOP_CODE[(9,1,1),(10,1,1),(5,8,0),(3,8,0),(6,1,0),(13,8,1),(14,8,1),(2,1,0),(11,1,1),(12,1,1),(7,8,0),(4,8,0),(8,1,0),(15,8,1),(16,8,1)], (128,404) => MOP_CODE[(9,1,1),(10,1,1),(5,8,0),(3,8,0),(6,1,0),(13,8,1),(14,8,1),(2,1,1),(11,1,0),(12,1,0),(7,8,1),(4,8,1),(8,1,1),(15,8,0),(16,8,0)], (128,405) => MOP_CODE[(9,1,0),(10,1,0),(5,8,1),(3,8,1),(6,1,0),(13,8,1),(14,8,1),(2,1,0),(11,1,0),(12,1,0),(7,8,1),(4,8,1),(8,1,0),(15,8,1),(16,8,1)], (128,406) => MOP_CODE[(9,1,1),(10,1,1),(5,8,1),(3,8,1),(6,1,0),(13,8,0),(14,8,0),(2,1,1),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(8,1,1),(15,8,1),(16,8,1)], (128,407) => MOP_CODE[(9,1,0),(10,1,0),(5,8,0),(3,8,0),(6,1,0),(13,8,0),(14,8,0),(2,1,1),(11,1,1),(12,1,1),(7,8,1),(4,8,1),(8,1,1),(15,8,1),(16,8,1)], (128,408) => MOP_CODE[(9,1,0),(10,1,0),(5,8,0),(3,8,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(8,1,0),(15,8,0),(16,8,0),(1,2,1),(9,2,1),(10,2,1),(5,5,1),(3,5,1),(6,2,1),(13,5,1),(14,5,1),(2,2,1),(11,2,1),(12,2,1),(7,5,1),(4,5,1),(8,2,1),(15,5,1),(16,5,1)], (128,409) => MOP_CODE[(9,1,0),(10,1,0),(5,8,0),(3,8,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(8,1,0),(15,8,0),(16,8,0),(1,5,1),(9,5,1),(10,5,1),(5,2,1),(3,2,1),(6,5,1),(13,2,1),(14,2,1),(2,5,1),(11,5,1),(12,5,1),(7,2,1),(4,2,1),(8,5,1),(15,2,1),(16,2,1)], (128,410) => MOP_CODE[(9,1,0),(10,1,0),(5,8,0),(3,8,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,1,0),(12,1,0),(7,8,0),(4,8,0),(8,1,0),(15,8,0),(16,8,0),(1,8,1),(9,8,1),(10,8,1),(5,1,1),(3,1,1),(6,8,1),(13,1,1),(14,1,1),(2,8,1),(11,8,1),(12,8,1),(7,1,1),(4,1,1),(8,8,1),(15,1,1),(16,1,1)], (129,411) => MOP_CODE[(9,3,0),(10,4,0),(5,3,0),(3,4,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,3,0),(12,4,0),(7,3,0),(4,4,0),(8,5,0),(15,5,0),(16,1,0)], (129,412) => MOP_CODE[(9,3,0),(10,4,0),(5,3,0),(3,4,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,3,0),(12,4,0),(7,3,0),(4,4,0),(8,5,0),(15,5,0),(16,1,0),(1,1,1),(9,3,1),(10,4,1),(5,3,1),(3,4,1),(6,5,1),(13,5,1),(14,1,1),(2,1,1),(11,3,1),(12,4,1),(7,3,1),(4,4,1),(8,5,1),(15,5,1),(16,1,1)], (129,413) => MOP_CODE[(9,3,0),(10,4,0),(5,3,1),(3,4,1),(6,5,0),(13,5,1),(14,1,1),(2,1,1),(11,3,1),(12,4,1),(7,3,0),(4,4,0),(8,5,1),(15,5,0),(16,1,0)], (129,414) => MOP_CODE[(9,3,1),(10,4,1),(5,3,1),(3,4,1),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,3,1),(12,4,1),(7,3,1),(4,4,1),(8,5,0),(15,5,0),(16,1,0)], (129,415) => MOP_CODE[(9,3,1),(10,4,1),(5,3,0),(3,4,0),(6,5,0),(13,5,1),(14,1,1),(2,1,0),(11,3,1),(12,4,1),(7,3,0),(4,4,0),(8,5,0),(15,5,1),(16,1,1)], (129,416) => MOP_CODE[(9,3,1),(10,4,1),(5,3,0),(3,4,0),(6,5,0),(13,5,1),(14,1,1),(2,1,1),(11,3,0),(12,4,0),(7,3,1),(4,4,1),(8,5,1),(15,5,0),(16,1,0)], (129,417) => MOP_CODE[(9,3,0),(10,4,0),(5,3,1),(3,4,1),(6,5,0),(13,5,1),(14,1,1),(2,1,0),(11,3,0),(12,4,0),(7,3,1),(4,4,1),(8,5,0),(15,5,1),(16,1,1)], (129,418) => MOP_CODE[(9,3,1),(10,4,1),(5,3,1),(3,4,1),(6,5,0),(13,5,0),(14,1,0),(2,1,1),(11,3,0),(12,4,0),(7,3,0),(4,4,0),(8,5,1),(15,5,1),(16,1,1)], (129,419) => MOP_CODE[(9,3,0),(10,4,0),(5,3,0),(3,4,0),(6,5,0),(13,5,0),(14,1,0),(2,1,1),(11,3,1),(12,4,1),(7,3,1),(4,4,1),(8,5,1),(15,5,1),(16,1,1)], (129,420) => MOP_CODE[(9,3,0),(10,4,0),(5,3,0),(3,4,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,3,0),(12,4,0),(7,3,0),(4,4,0),(8,5,0),(15,5,0),(16,1,0),(1,2,1),(9,6,1),(10,7,1),(5,6,1),(3,7,1),(6,8,1),(13,8,1),(14,2,1),(2,2,1),(11,6,1),(12,7,1),(7,6,1),(4,7,1),(8,8,1),(15,8,1),(16,2,1)], (129,421) => MOP_CODE[(9,3,0),(10,4,0),(5,3,0),(3,4,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,3,0),(12,4,0),(7,3,0),(4,4,0),(8,5,0),(15,5,0),(16,1,0),(1,5,1),(9,4,1),(10,3,1),(5,4,1),(3,3,1),(6,1,1),(13,1,1),(14,5,1),(2,5,1),(11,4,1),(12,3,1),(7,4,1),(4,3,1),(8,1,1),(15,1,1),(16,5,1)], (129,422) => MOP_CODE[(9,3,0),(10,4,0),(5,3,0),(3,4,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,3,0),(12,4,0),(7,3,0),(4,4,0),(8,5,0),(15,5,0),(16,1,0),(1,8,1),(9,7,1),(10,6,1),(5,7,1),(3,6,1),(6,2,1),(13,2,1),(14,8,1),(2,8,1),(11,7,1),(12,6,1),(7,7,1),(4,6,1),(8,2,1),(15,2,1),(16,8,1)], (130,423) => MOP_CODE[(9,3,0),(10,4,0),(5,6,0),(3,7,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,3,0),(12,4,0),(7,6,0),(4,7,0),(8,5,0),(15,8,0),(16,2,0)], (130,424) => MOP_CODE[(9,3,0),(10,4,0),(5,6,0),(3,7,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,3,0),(12,4,0),(7,6,0),(4,7,0),(8,5,0),(15,8,0),(16,2,0),(1,1,1),(9,3,1),(10,4,1),(5,6,1),(3,7,1),(6,5,1),(13,8,1),(14,2,1),(2,1,1),(11,3,1),(12,4,1),(7,6,1),(4,7,1),(8,5,1),(15,8,1),(16,2,1)], (130,425) => MOP_CODE[(9,3,0),(10,4,0),(5,6,1),(3,7,1),(6,5,0),(13,8,1),(14,2,1),(2,1,1),(11,3,1),(12,4,1),(7,6,0),(4,7,0),(8,5,1),(15,8,0),(16,2,0)], (130,426) => MOP_CODE[(9,3,1),(10,4,1),(5,6,1),(3,7,1),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,3,1),(12,4,1),(7,6,1),(4,7,1),(8,5,0),(15,8,0),(16,2,0)], (130,427) => MOP_CODE[(9,3,1),(10,4,1),(5,6,0),(3,7,0),(6,5,0),(13,8,1),(14,2,1),(2,1,0),(11,3,1),(12,4,1),(7,6,0),(4,7,0),(8,5,0),(15,8,1),(16,2,1)], (130,428) => MOP_CODE[(9,3,1),(10,4,1),(5,6,0),(3,7,0),(6,5,0),(13,8,1),(14,2,1),(2,1,1),(11,3,0),(12,4,0),(7,6,1),(4,7,1),(8,5,1),(15,8,0),(16,2,0)], (130,429) => MOP_CODE[(9,3,0),(10,4,0),(5,6,1),(3,7,1),(6,5,0),(13,8,1),(14,2,1),(2,1,0),(11,3,0),(12,4,0),(7,6,1),(4,7,1),(8,5,0),(15,8,1),(16,2,1)], (130,430) => MOP_CODE[(9,3,1),(10,4,1),(5,6,1),(3,7,1),(6,5,0),(13,8,0),(14,2,0),(2,1,1),(11,3,0),(12,4,0),(7,6,0),(4,7,0),(8,5,1),(15,8,1),(16,2,1)], (130,431) => MOP_CODE[(9,3,0),(10,4,0),(5,6,0),(3,7,0),(6,5,0),(13,8,0),(14,2,0),(2,1,1),(11,3,1),(12,4,1),(7,6,1),(4,7,1),(8,5,1),(15,8,1),(16,2,1)], (130,432) => MOP_CODE[(9,3,0),(10,4,0),(5,6,0),(3,7,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,3,0),(12,4,0),(7,6,0),(4,7,0),(8,5,0),(15,8,0),(16,2,0),(1,2,1),(9,6,1),(10,7,1),(5,3,1),(3,4,1),(6,8,1),(13,5,1),(14,1,1),(2,2,1),(11,6,1),(12,7,1),(7,3,1),(4,4,1),(8,8,1),(15,5,1),(16,1,1)], (130,433) => MOP_CODE[(9,3,0),(10,4,0),(5,6,0),(3,7,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,3,0),(12,4,0),(7,6,0),(4,7,0),(8,5,0),(15,8,0),(16,2,0),(1,5,1),(9,4,1),(10,3,1),(5,7,1),(3,6,1),(6,1,1),(13,2,1),(14,8,1),(2,5,1),(11,4,1),(12,3,1),(7,7,1),(4,6,1),(8,1,1),(15,2,1),(16,8,1)], (130,434) => MOP_CODE[(9,3,0),(10,4,0),(5,6,0),(3,7,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,3,0),(12,4,0),(7,6,0),(4,7,0),(8,5,0),(15,8,0),(16,2,0),(1,8,1),(9,7,1),(10,6,1),(5,4,1),(3,3,1),(6,2,1),(13,1,1),(14,5,1),(2,8,1),(11,7,1),(12,6,1),(7,4,1),(4,3,1),(8,2,1),(15,1,1),(16,5,1)], (131,435) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,2,0),(12,2,0),(7,1,0),(4,1,0),(8,1,0),(15,2,0),(16,2,0)], (131,436) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,2,0),(12,2,0),(7,1,0),(4,1,0),(8,1,0),(15,2,0),(16,2,0),(1,1,1),(9,2,1),(10,2,1),(5,1,1),(3,1,1),(6,1,1),(13,2,1),(14,2,1),(2,1,1),(11,2,1),(12,2,1),(7,1,1),(4,1,1),(8,1,1),(15,2,1),(16,2,1)], (131,437) => MOP_CODE[(9,2,0),(10,2,0),(5,1,1),(3,1,1),(6,1,0),(13,2,1),(14,2,1),(2,1,1),(11,2,1),(12,2,1),(7,1,0),(4,1,0),(8,1,1),(15,2,0),(16,2,0)], (131,438) => MOP_CODE[(9,2,1),(10,2,1),(5,1,1),(3,1,1),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,2,1),(12,2,1),(7,1,1),(4,1,1),(8,1,0),(15,2,0),(16,2,0)], (131,439) => MOP_CODE[(9,2,1),(10,2,1),(5,1,0),(3,1,0),(6,1,0),(13,2,1),(14,2,1),(2,1,0),(11,2,1),(12,2,1),(7,1,0),(4,1,0),(8,1,0),(15,2,1),(16,2,1)], (131,440) => MOP_CODE[(9,2,1),(10,2,1),(5,1,0),(3,1,0),(6,1,0),(13,2,1),(14,2,1),(2,1,1),(11,2,0),(12,2,0),(7,1,1),(4,1,1),(8,1,1),(15,2,0),(16,2,0)], (131,441) => MOP_CODE[(9,2,0),(10,2,0),(5,1,1),(3,1,1),(6,1,0),(13,2,1),(14,2,1),(2,1,0),(11,2,0),(12,2,0),(7,1,1),(4,1,1),(8,1,0),(15,2,1),(16,2,1)], (131,442) => MOP_CODE[(9,2,1),(10,2,1),(5,1,1),(3,1,1),(6,1,0),(13,2,0),(14,2,0),(2,1,1),(11,2,0),(12,2,0),(7,1,0),(4,1,0),(8,1,1),(15,2,1),(16,2,1)], (131,443) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(2,1,1),(11,2,1),(12,2,1),(7,1,1),(4,1,1),(8,1,1),(15,2,1),(16,2,1)], (131,444) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,2,0),(12,2,0),(7,1,0),(4,1,0),(8,1,0),(15,2,0),(16,2,0),(1,2,1),(9,1,1),(10,1,1),(5,2,1),(3,2,1),(6,2,1),(13,1,1),(14,1,1),(2,2,1),(11,1,1),(12,1,1),(7,2,1),(4,2,1),(8,2,1),(15,1,1),(16,1,1)], (131,445) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,2,0),(12,2,0),(7,1,0),(4,1,0),(8,1,0),(15,2,0),(16,2,0),(1,5,1),(9,8,1),(10,8,1),(5,5,1),(3,5,1),(6,5,1),(13,8,1),(14,8,1),(2,5,1),(11,8,1),(12,8,1),(7,5,1),(4,5,1),(8,5,1),(15,8,1),(16,8,1)], (131,446) => MOP_CODE[(9,2,0),(10,2,0),(5,1,0),(3,1,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,2,0),(12,2,0),(7,1,0),(4,1,0),(8,1,0),(15,2,0),(16,2,0),(1,8,1),(9,5,1),(10,5,1),(5,8,1),(3,8,1),(6,8,1),(13,5,1),(14,5,1),(2,8,1),(11,5,1),(12,5,1),(7,8,1),(4,8,1),(8,8,1),(15,5,1),(16,5,1)], (132,447) => MOP_CODE[(9,2,0),(10,2,0),(5,2,0),(3,2,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,2,0),(12,2,0),(7,2,0),(4,2,0),(8,1,0),(15,1,0),(16,1,0)], (132,448) => MOP_CODE[(9,2,0),(10,2,0),(5,2,0),(3,2,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,2,0),(12,2,0),(7,2,0),(4,2,0),(8,1,0),(15,1,0),(16,1,0),(1,1,1),(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,1,1),(13,1,1),(14,1,1),(2,1,1),(11,2,1),(12,2,1),(7,2,1),(4,2,1),(8,1,1),(15,1,1),(16,1,1)], (132,449) => MOP_CODE[(9,2,0),(10,2,0),(5,2,1),(3,2,1),(6,1,0),(13,1,1),(14,1,1),(2,1,1),(11,2,1),(12,2,1),(7,2,0),(4,2,0),(8,1,1),(15,1,0),(16,1,0)], (132,450) => MOP_CODE[(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,2,1),(12,2,1),(7,2,1),(4,2,1),(8,1,0),(15,1,0),(16,1,0)], (132,451) => MOP_CODE[(9,2,1),(10,2,1),(5,2,0),(3,2,0),(6,1,0),(13,1,1),(14,1,1),(2,1,0),(11,2,1),(12,2,1),(7,2,0),(4,2,0),(8,1,0),(15,1,1),(16,1,1)], (132,452) => MOP_CODE[(9,2,1),(10,2,1),(5,2,0),(3,2,0),(6,1,0),(13,1,1),(14,1,1),(2,1,1),(11,2,0),(12,2,0),(7,2,1),(4,2,1),(8,1,1),(15,1,0),(16,1,0)], (132,453) => MOP_CODE[(9,2,0),(10,2,0),(5,2,1),(3,2,1),(6,1,0),(13,1,1),(14,1,1),(2,1,0),(11,2,0),(12,2,0),(7,2,1),(4,2,1),(8,1,0),(15,1,1),(16,1,1)], (132,454) => MOP_CODE[(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,1,0),(13,1,0),(14,1,0),(2,1,1),(11,2,0),(12,2,0),(7,2,0),(4,2,0),(8,1,1),(15,1,1),(16,1,1)], (132,455) => MOP_CODE[(9,2,0),(10,2,0),(5,2,0),(3,2,0),(6,1,0),(13,1,0),(14,1,0),(2,1,1),(11,2,1),(12,2,1),(7,2,1),(4,2,1),(8,1,1),(15,1,1),(16,1,1)], (132,456) => MOP_CODE[(9,2,0),(10,2,0),(5,2,0),(3,2,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,2,0),(12,2,0),(7,2,0),(4,2,0),(8,1,0),(15,1,0),(16,1,0),(1,2,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,2,1),(13,2,1),(14,2,1),(2,2,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,2,1),(15,2,1),(16,2,1)], (132,457) => MOP_CODE[(9,2,0),(10,2,0),(5,2,0),(3,2,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,2,0),(12,2,0),(7,2,0),(4,2,0),(8,1,0),(15,1,0),(16,1,0),(1,5,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,5,1),(13,5,1),(14,5,1),(2,5,1),(11,8,1),(12,8,1),(7,8,1),(4,8,1),(8,5,1),(15,5,1),(16,5,1)], (132,458) => MOP_CODE[(9,2,0),(10,2,0),(5,2,0),(3,2,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,2,0),(12,2,0),(7,2,0),(4,2,0),(8,1,0),(15,1,0),(16,1,0),(1,8,1),(9,5,1),(10,5,1),(5,5,1),(3,5,1),(6,8,1),(13,8,1),(14,8,1),(2,8,1),(11,5,1),(12,5,1),(7,5,1),(4,5,1),(8,8,1),(15,8,1),(16,8,1)], (133,459) => MOP_CODE[(9,6,0),(10,7,0),(5,4,0),(3,3,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,6,0),(12,7,0),(7,4,0),(4,3,0),(8,5,0),(15,2,0),(16,8,0)], (133,460) => MOP_CODE[(9,6,0),(10,7,0),(5,4,0),(3,3,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,6,0),(12,7,0),(7,4,0),(4,3,0),(8,5,0),(15,2,0),(16,8,0),(1,1,1),(9,6,1),(10,7,1),(5,4,1),(3,3,1),(6,5,1),(13,2,1),(14,8,1),(2,1,1),(11,6,1),(12,7,1),(7,4,1),(4,3,1),(8,5,1),(15,2,1),(16,8,1)], (133,461) => MOP_CODE[(9,6,0),(10,7,0),(5,4,1),(3,3,1),(6,5,0),(13,2,1),(14,8,1),(2,1,1),(11,6,1),(12,7,1),(7,4,0),(4,3,0),(8,5,1),(15,2,0),(16,8,0)], (133,462) => MOP_CODE[(9,6,1),(10,7,1),(5,4,1),(3,3,1),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,6,1),(12,7,1),(7,4,1),(4,3,1),(8,5,0),(15,2,0),(16,8,0)], (133,463) => MOP_CODE[(9,6,1),(10,7,1),(5,4,0),(3,3,0),(6,5,0),(13,2,1),(14,8,1),(2,1,0),(11,6,1),(12,7,1),(7,4,0),(4,3,0),(8,5,0),(15,2,1),(16,8,1)], (133,464) => MOP_CODE[(9,6,1),(10,7,1),(5,4,0),(3,3,0),(6,5,0),(13,2,1),(14,8,1),(2,1,1),(11,6,0),(12,7,0),(7,4,1),(4,3,1),(8,5,1),(15,2,0),(16,8,0)], (133,465) => MOP_CODE[(9,6,0),(10,7,0),(5,4,1),(3,3,1),(6,5,0),(13,2,1),(14,8,1),(2,1,0),(11,6,0),(12,7,0),(7,4,1),(4,3,1),(8,5,0),(15,2,1),(16,8,1)], (133,466) => MOP_CODE[(9,6,1),(10,7,1),(5,4,1),(3,3,1),(6,5,0),(13,2,0),(14,8,0),(2,1,1),(11,6,0),(12,7,0),(7,4,0),(4,3,0),(8,5,1),(15,2,1),(16,8,1)], (133,467) => MOP_CODE[(9,6,0),(10,7,0),(5,4,0),(3,3,0),(6,5,0),(13,2,0),(14,8,0),(2,1,1),(11,6,1),(12,7,1),(7,4,1),(4,3,1),(8,5,1),(15,2,1),(16,8,1)], (133,468) => MOP_CODE[(9,6,0),(10,7,0),(5,4,0),(3,3,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,6,0),(12,7,0),(7,4,0),(4,3,0),(8,5,0),(15,2,0),(16,8,0),(1,2,1),(9,3,1),(10,4,1),(5,7,1),(3,6,1),(6,8,1),(13,1,1),(14,5,1),(2,2,1),(11,3,1),(12,4,1),(7,7,1),(4,6,1),(8,8,1),(15,1,1),(16,5,1)], (133,469) => MOP_CODE[(9,6,0),(10,7,0),(5,4,0),(3,3,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,6,0),(12,7,0),(7,4,0),(4,3,0),(8,5,0),(15,2,0),(16,8,0),(1,5,1),(9,7,1),(10,6,1),(5,3,1),(3,4,1),(6,1,1),(13,8,1),(14,2,1),(2,5,1),(11,7,1),(12,6,1),(7,3,1),(4,4,1),(8,1,1),(15,8,1),(16,2,1)], (133,470) => MOP_CODE[(9,6,0),(10,7,0),(5,4,0),(3,3,0),(6,5,0),(13,2,0),(14,8,0),(2,1,0),(11,6,0),(12,7,0),(7,4,0),(4,3,0),(8,5,0),(15,2,0),(16,8,0),(1,8,1),(9,4,1),(10,3,1),(5,6,1),(3,7,1),(6,2,1),(13,5,1),(14,1,1),(2,8,1),(11,4,1),(12,3,1),(7,6,1),(4,7,1),(8,2,1),(15,5,1),(16,1,1)], (134,471) => MOP_CODE[(9,6,0),(10,7,0),(5,7,0),(3,6,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,6,0),(12,7,0),(7,7,0),(4,6,0),(8,5,0),(15,1,0),(16,5,0)], (134,472) => MOP_CODE[(9,6,0),(10,7,0),(5,7,0),(3,6,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,6,0),(12,7,0),(7,7,0),(4,6,0),(8,5,0),(15,1,0),(16,5,0),(1,1,1),(9,6,1),(10,7,1),(5,7,1),(3,6,1),(6,5,1),(13,1,1),(14,5,1),(2,1,1),(11,6,1),(12,7,1),(7,7,1),(4,6,1),(8,5,1),(15,1,1),(16,5,1)], (134,473) => MOP_CODE[(9,6,0),(10,7,0),(5,7,1),(3,6,1),(6,5,0),(13,1,1),(14,5,1),(2,1,1),(11,6,1),(12,7,1),(7,7,0),(4,6,0),(8,5,1),(15,1,0),(16,5,0)], (134,474) => MOP_CODE[(9,6,1),(10,7,1),(5,7,1),(3,6,1),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,6,1),(12,7,1),(7,7,1),(4,6,1),(8,5,0),(15,1,0),(16,5,0)], (134,475) => MOP_CODE[(9,6,1),(10,7,1),(5,7,0),(3,6,0),(6,5,0),(13,1,1),(14,5,1),(2,1,0),(11,6,1),(12,7,1),(7,7,0),(4,6,0),(8,5,0),(15,1,1),(16,5,1)], (134,476) => MOP_CODE[(9,6,1),(10,7,1),(5,7,0),(3,6,0),(6,5,0),(13,1,1),(14,5,1),(2,1,1),(11,6,0),(12,7,0),(7,7,1),(4,6,1),(8,5,1),(15,1,0),(16,5,0)], (134,477) => MOP_CODE[(9,6,0),(10,7,0),(5,7,1),(3,6,1),(6,5,0),(13,1,1),(14,5,1),(2,1,0),(11,6,0),(12,7,0),(7,7,1),(4,6,1),(8,5,0),(15,1,1),(16,5,1)], (134,478) => MOP_CODE[(9,6,1),(10,7,1),(5,7,1),(3,6,1),(6,5,0),(13,1,0),(14,5,0),(2,1,1),(11,6,0),(12,7,0),(7,7,0),(4,6,0),(8,5,1),(15,1,1),(16,5,1)], (134,479) => MOP_CODE[(9,6,0),(10,7,0),(5,7,0),(3,6,0),(6,5,0),(13,1,0),(14,5,0),(2,1,1),(11,6,1),(12,7,1),(7,7,1),(4,6,1),(8,5,1),(15,1,1),(16,5,1)], (134,480) => MOP_CODE[(9,6,0),(10,7,0),(5,7,0),(3,6,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,6,0),(12,7,0),(7,7,0),(4,6,0),(8,5,0),(15,1,0),(16,5,0),(1,2,1),(9,3,1),(10,4,1),(5,4,1),(3,3,1),(6,8,1),(13,2,1),(14,8,1),(2,2,1),(11,3,1),(12,4,1),(7,4,1),(4,3,1),(8,8,1),(15,2,1),(16,8,1)], (134,481) => MOP_CODE[(9,6,0),(10,7,0),(5,7,0),(3,6,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,6,0),(12,7,0),(7,7,0),(4,6,0),(8,5,0),(15,1,0),(16,5,0),(1,5,1),(9,7,1),(10,6,1),(5,6,1),(3,7,1),(6,1,1),(13,5,1),(14,1,1),(2,5,1),(11,7,1),(12,6,1),(7,6,1),(4,7,1),(8,1,1),(15,5,1),(16,1,1)], (134,482) => MOP_CODE[(9,6,0),(10,7,0),(5,7,0),(3,6,0),(6,5,0),(13,1,0),(14,5,0),(2,1,0),(11,6,0),(12,7,0),(7,7,0),(4,6,0),(8,5,0),(15,1,0),(16,5,0),(1,8,1),(9,4,1),(10,3,1),(5,3,1),(3,4,1),(6,2,1),(13,8,1),(14,2,1),(2,8,1),(11,4,1),(12,3,1),(7,3,1),(4,4,1),(8,2,1),(15,8,1),(16,2,1)], (135,483) => MOP_CODE[(9,2,0),(10,2,0),(5,5,0),(3,5,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,2,0),(12,2,0),(7,5,0),(4,5,0),(8,1,0),(15,8,0),(16,8,0)], (135,484) => MOP_CODE[(9,2,0),(10,2,0),(5,5,0),(3,5,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,2,0),(12,2,0),(7,5,0),(4,5,0),(8,1,0),(15,8,0),(16,8,0),(1,1,1),(9,2,1),(10,2,1),(5,5,1),(3,5,1),(6,1,1),(13,8,1),(14,8,1),(2,1,1),(11,2,1),(12,2,1),(7,5,1),(4,5,1),(8,1,1),(15,8,1),(16,8,1)], (135,485) => MOP_CODE[(9,2,0),(10,2,0),(5,5,1),(3,5,1),(6,1,0),(13,8,1),(14,8,1),(2,1,1),(11,2,1),(12,2,1),(7,5,0),(4,5,0),(8,1,1),(15,8,0),(16,8,0)], (135,486) => MOP_CODE[(9,2,1),(10,2,1),(5,5,1),(3,5,1),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,2,1),(12,2,1),(7,5,1),(4,5,1),(8,1,0),(15,8,0),(16,8,0)], (135,487) => MOP_CODE[(9,2,1),(10,2,1),(5,5,0),(3,5,0),(6,1,0),(13,8,1),(14,8,1),(2,1,0),(11,2,1),(12,2,1),(7,5,0),(4,5,0),(8,1,0),(15,8,1),(16,8,1)], (135,488) => MOP_CODE[(9,2,1),(10,2,1),(5,5,0),(3,5,0),(6,1,0),(13,8,1),(14,8,1),(2,1,1),(11,2,0),(12,2,0),(7,5,1),(4,5,1),(8,1,1),(15,8,0),(16,8,0)], (135,489) => MOP_CODE[(9,2,0),(10,2,0),(5,5,1),(3,5,1),(6,1,0),(13,8,1),(14,8,1),(2,1,0),(11,2,0),(12,2,0),(7,5,1),(4,5,1),(8,1,0),(15,8,1),(16,8,1)], (135,490) => MOP_CODE[(9,2,1),(10,2,1),(5,5,1),(3,5,1),(6,1,0),(13,8,0),(14,8,0),(2,1,1),(11,2,0),(12,2,0),(7,5,0),(4,5,0),(8,1,1),(15,8,1),(16,8,1)], (135,491) => MOP_CODE[(9,2,0),(10,2,0),(5,5,0),(3,5,0),(6,1,0),(13,8,0),(14,8,0),(2,1,1),(11,2,1),(12,2,1),(7,5,1),(4,5,1),(8,1,1),(15,8,1),(16,8,1)], (135,492) => MOP_CODE[(9,2,0),(10,2,0),(5,5,0),(3,5,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,2,0),(12,2,0),(7,5,0),(4,5,0),(8,1,0),(15,8,0),(16,8,0),(1,2,1),(9,1,1),(10,1,1),(5,8,1),(3,8,1),(6,2,1),(13,5,1),(14,5,1),(2,2,1),(11,1,1),(12,1,1),(7,8,1),(4,8,1),(8,2,1),(15,5,1),(16,5,1)], (135,493) => MOP_CODE[(9,2,0),(10,2,0),(5,5,0),(3,5,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,2,0),(12,2,0),(7,5,0),(4,5,0),(8,1,0),(15,8,0),(16,8,0),(1,5,1),(9,8,1),(10,8,1),(5,1,1),(3,1,1),(6,5,1),(13,2,1),(14,2,1),(2,5,1),(11,8,1),(12,8,1),(7,1,1),(4,1,1),(8,5,1),(15,2,1),(16,2,1)], (135,494) => MOP_CODE[(9,2,0),(10,2,0),(5,5,0),(3,5,0),(6,1,0),(13,8,0),(14,8,0),(2,1,0),(11,2,0),(12,2,0),(7,5,0),(4,5,0),(8,1,0),(15,8,0),(16,8,0),(1,8,1),(9,5,1),(10,5,1),(5,2,1),(3,2,1),(6,8,1),(13,1,1),(14,1,1),(2,8,1),(11,5,1),(12,5,1),(7,2,1),(4,2,1),(8,8,1),(15,1,1),(16,1,1)], (136,495) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,8,0),(12,8,0),(7,8,0),(4,8,0),(8,1,0),(15,1,0),(16,1,0)], (136,496) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,8,0),(12,8,0),(7,8,0),(4,8,0),(8,1,0),(15,1,0),(16,1,0),(1,1,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,1,1),(13,1,1),(14,1,1),(2,1,1),(11,8,1),(12,8,1),(7,8,1),(4,8,1),(8,1,1),(15,1,1),(16,1,1)], (136,497) => MOP_CODE[(9,8,0),(10,8,0),(5,8,1),(3,8,1),(6,1,0),(13,1,1),(14,1,1),(2,1,1),(11,8,1),(12,8,1),(7,8,0),(4,8,0),(8,1,1),(15,1,0),(16,1,0)], (136,498) => MOP_CODE[(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,8,1),(12,8,1),(7,8,1),(4,8,1),(8,1,0),(15,1,0),(16,1,0)], (136,499) => MOP_CODE[(9,8,1),(10,8,1),(5,8,0),(3,8,0),(6,1,0),(13,1,1),(14,1,1),(2,1,0),(11,8,1),(12,8,1),(7,8,0),(4,8,0),(8,1,0),(15,1,1),(16,1,1)], (136,500) => MOP_CODE[(9,8,1),(10,8,1),(5,8,0),(3,8,0),(6,1,0),(13,1,1),(14,1,1),(2,1,1),(11,8,0),(12,8,0),(7,8,1),(4,8,1),(8,1,1),(15,1,0),(16,1,0)], (136,501) => MOP_CODE[(9,8,0),(10,8,0),(5,8,1),(3,8,1),(6,1,0),(13,1,1),(14,1,1),(2,1,0),(11,8,0),(12,8,0),(7,8,1),(4,8,1),(8,1,0),(15,1,1),(16,1,1)], (136,502) => MOP_CODE[(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,1,0),(13,1,0),(14,1,0),(2,1,1),(11,8,0),(12,8,0),(7,8,0),(4,8,0),(8,1,1),(15,1,1),(16,1,1)], (136,503) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(2,1,1),(11,8,1),(12,8,1),(7,8,1),(4,8,1),(8,1,1),(15,1,1),(16,1,1)], (136,504) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,8,0),(12,8,0),(7,8,0),(4,8,0),(8,1,0),(15,1,0),(16,1,0),(1,2,1),(9,5,1),(10,5,1),(5,5,1),(3,5,1),(6,2,1),(13,2,1),(14,2,1),(2,2,1),(11,5,1),(12,5,1),(7,5,1),(4,5,1),(8,2,1),(15,2,1),(16,2,1)], (136,505) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,8,0),(12,8,0),(7,8,0),(4,8,0),(8,1,0),(15,1,0),(16,1,0),(1,5,1),(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,5,1),(13,5,1),(14,5,1),(2,5,1),(11,2,1),(12,2,1),(7,2,1),(4,2,1),(8,5,1),(15,5,1),(16,5,1)], (136,506) => MOP_CODE[(9,8,0),(10,8,0),(5,8,0),(3,8,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,8,0),(12,8,0),(7,8,0),(4,8,0),(8,1,0),(15,1,0),(16,1,0),(1,8,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,8,1),(13,8,1),(14,8,1),(2,8,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,8,1),(15,8,1),(16,8,1)], (137,507) => MOP_CODE[(9,6,0),(10,7,0),(5,3,0),(3,4,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,6,0),(12,7,0),(7,3,0),(4,4,0),(8,5,0),(15,8,0),(16,2,0)], (137,508) => MOP_CODE[(9,6,0),(10,7,0),(5,3,0),(3,4,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,6,0),(12,7,0),(7,3,0),(4,4,0),(8,5,0),(15,8,0),(16,2,0),(1,1,1),(9,6,1),(10,7,1),(5,3,1),(3,4,1),(6,5,1),(13,8,1),(14,2,1),(2,1,1),(11,6,1),(12,7,1),(7,3,1),(4,4,1),(8,5,1),(15,8,1),(16,2,1)], (137,509) => MOP_CODE[(9,6,0),(10,7,0),(5,3,1),(3,4,1),(6,5,0),(13,8,1),(14,2,1),(2,1,1),(11,6,1),(12,7,1),(7,3,0),(4,4,0),(8,5,1),(15,8,0),(16,2,0)], (137,510) => MOP_CODE[(9,6,1),(10,7,1),(5,3,1),(3,4,1),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,6,1),(12,7,1),(7,3,1),(4,4,1),(8,5,0),(15,8,0),(16,2,0)], (137,511) => MOP_CODE[(9,6,1),(10,7,1),(5,3,0),(3,4,0),(6,5,0),(13,8,1),(14,2,1),(2,1,0),(11,6,1),(12,7,1),(7,3,0),(4,4,0),(8,5,0),(15,8,1),(16,2,1)], (137,512) => MOP_CODE[(9,6,1),(10,7,1),(5,3,0),(3,4,0),(6,5,0),(13,8,1),(14,2,1),(2,1,1),(11,6,0),(12,7,0),(7,3,1),(4,4,1),(8,5,1),(15,8,0),(16,2,0)], (137,513) => MOP_CODE[(9,6,0),(10,7,0),(5,3,1),(3,4,1),(6,5,0),(13,8,1),(14,2,1),(2,1,0),(11,6,0),(12,7,0),(7,3,1),(4,4,1),(8,5,0),(15,8,1),(16,2,1)], (137,514) => MOP_CODE[(9,6,1),(10,7,1),(5,3,1),(3,4,1),(6,5,0),(13,8,0),(14,2,0),(2,1,1),(11,6,0),(12,7,0),(7,3,0),(4,4,0),(8,5,1),(15,8,1),(16,2,1)], (137,515) => MOP_CODE[(9,6,0),(10,7,0),(5,3,0),(3,4,0),(6,5,0),(13,8,0),(14,2,0),(2,1,1),(11,6,1),(12,7,1),(7,3,1),(4,4,1),(8,5,1),(15,8,1),(16,2,1)], (137,516) => MOP_CODE[(9,6,0),(10,7,0),(5,3,0),(3,4,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,6,0),(12,7,0),(7,3,0),(4,4,0),(8,5,0),(15,8,0),(16,2,0),(1,2,1),(9,3,1),(10,4,1),(5,6,1),(3,7,1),(6,8,1),(13,5,1),(14,1,1),(2,2,1),(11,3,1),(12,4,1),(7,6,1),(4,7,1),(8,8,1),(15,5,1),(16,1,1)], (137,517) => MOP_CODE[(9,6,0),(10,7,0),(5,3,0),(3,4,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,6,0),(12,7,0),(7,3,0),(4,4,0),(8,5,0),(15,8,0),(16,2,0),(1,5,1),(9,7,1),(10,6,1),(5,4,1),(3,3,1),(6,1,1),(13,2,1),(14,8,1),(2,5,1),(11,7,1),(12,6,1),(7,4,1),(4,3,1),(8,1,1),(15,2,1),(16,8,1)], (137,518) => MOP_CODE[(9,6,0),(10,7,0),(5,3,0),(3,4,0),(6,5,0),(13,8,0),(14,2,0),(2,1,0),(11,6,0),(12,7,0),(7,3,0),(4,4,0),(8,5,0),(15,8,0),(16,2,0),(1,8,1),(9,4,1),(10,3,1),(5,7,1),(3,6,1),(6,2,1),(13,1,1),(14,5,1),(2,8,1),(11,4,1),(12,3,1),(7,7,1),(4,6,1),(8,2,1),(15,1,1),(16,5,1)], (138,519) => MOP_CODE[(9,6,0),(10,7,0),(5,6,0),(3,7,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,6,0),(12,7,0),(7,6,0),(4,7,0),(8,5,0),(15,5,0),(16,1,0)], (138,520) => MOP_CODE[(9,6,0),(10,7,0),(5,6,0),(3,7,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,6,0),(12,7,0),(7,6,0),(4,7,0),(8,5,0),(15,5,0),(16,1,0),(1,1,1),(9,6,1),(10,7,1),(5,6,1),(3,7,1),(6,5,1),(13,5,1),(14,1,1),(2,1,1),(11,6,1),(12,7,1),(7,6,1),(4,7,1),(8,5,1),(15,5,1),(16,1,1)], (138,521) => MOP_CODE[(9,6,0),(10,7,0),(5,6,1),(3,7,1),(6,5,0),(13,5,1),(14,1,1),(2,1,1),(11,6,1),(12,7,1),(7,6,0),(4,7,0),(8,5,1),(15,5,0),(16,1,0)], (138,522) => MOP_CODE[(9,6,1),(10,7,1),(5,6,1),(3,7,1),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,6,1),(12,7,1),(7,6,1),(4,7,1),(8,5,0),(15,5,0),(16,1,0)], (138,523) => MOP_CODE[(9,6,1),(10,7,1),(5,6,0),(3,7,0),(6,5,0),(13,5,1),(14,1,1),(2,1,0),(11,6,1),(12,7,1),(7,6,0),(4,7,0),(8,5,0),(15,5,1),(16,1,1)], (138,524) => MOP_CODE[(9,6,1),(10,7,1),(5,6,0),(3,7,0),(6,5,0),(13,5,1),(14,1,1),(2,1,1),(11,6,0),(12,7,0),(7,6,1),(4,7,1),(8,5,1),(15,5,0),(16,1,0)], (138,525) => MOP_CODE[(9,6,0),(10,7,0),(5,6,1),(3,7,1),(6,5,0),(13,5,1),(14,1,1),(2,1,0),(11,6,0),(12,7,0),(7,6,1),(4,7,1),(8,5,0),(15,5,1),(16,1,1)], (138,526) => MOP_CODE[(9,6,1),(10,7,1),(5,6,1),(3,7,1),(6,5,0),(13,5,0),(14,1,0),(2,1,1),(11,6,0),(12,7,0),(7,6,0),(4,7,0),(8,5,1),(15,5,1),(16,1,1)], (138,527) => MOP_CODE[(9,6,0),(10,7,0),(5,6,0),(3,7,0),(6,5,0),(13,5,0),(14,1,0),(2,1,1),(11,6,1),(12,7,1),(7,6,1),(4,7,1),(8,5,1),(15,5,1),(16,1,1)], (138,528) => MOP_CODE[(9,6,0),(10,7,0),(5,6,0),(3,7,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,6,0),(12,7,0),(7,6,0),(4,7,0),(8,5,0),(15,5,0),(16,1,0),(1,2,1),(9,3,1),(10,4,1),(5,3,1),(3,4,1),(6,8,1),(13,8,1),(14,2,1),(2,2,1),(11,3,1),(12,4,1),(7,3,1),(4,4,1),(8,8,1),(15,8,1),(16,2,1)], (138,529) => MOP_CODE[(9,6,0),(10,7,0),(5,6,0),(3,7,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,6,0),(12,7,0),(7,6,0),(4,7,0),(8,5,0),(15,5,0),(16,1,0),(1,5,1),(9,7,1),(10,6,1),(5,7,1),(3,6,1),(6,1,1),(13,1,1),(14,5,1),(2,5,1),(11,7,1),(12,6,1),(7,7,1),(4,6,1),(8,1,1),(15,1,1),(16,5,1)], (138,530) => MOP_CODE[(9,6,0),(10,7,0),(5,6,0),(3,7,0),(6,5,0),(13,5,0),(14,1,0),(2,1,0),(11,6,0),(12,7,0),(7,6,0),(4,7,0),(8,5,0),(15,5,0),(16,1,0),(1,8,1),(9,4,1),(10,3,1),(5,4,1),(3,3,1),(6,2,1),(13,2,1),(14,8,1),(2,8,1),(11,4,1),(12,3,1),(7,4,1),(4,3,1),(8,2,1),(15,2,1),(16,8,1)], (139,531) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0)], (139,532) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(1,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1),(2,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1)], (139,533) => MOP_CODE[(9,1,0),(10,1,0),(5,1,1),(3,1,1),(6,1,0),(13,1,1),(14,1,1),(2,1,1),(11,1,1),(12,1,1),(7,1,0),(4,1,0),(8,1,1),(15,1,0),(16,1,0)], (139,534) => MOP_CODE[(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,0),(15,1,0),(16,1,0)], (139,535) => MOP_CODE[(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(2,1,0),(11,1,1),(12,1,1),(7,1,0),(4,1,0),(8,1,0),(15,1,1),(16,1,1)], (139,536) => MOP_CODE[(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(2,1,1),(11,1,0),(12,1,0),(7,1,1),(4,1,1),(8,1,1),(15,1,0),(16,1,0)], (139,537) => MOP_CODE[(9,1,0),(10,1,0),(5,1,1),(3,1,1),(6,1,0),(13,1,1),(14,1,1),(2,1,0),(11,1,0),(12,1,0),(7,1,1),(4,1,1),(8,1,0),(15,1,1),(16,1,1)], (139,538) => MOP_CODE[(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,0),(13,1,0),(14,1,0),(2,1,1),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,1),(15,1,1),(16,1,1)], (139,539) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1)], (139,540) => MOP_CODE[(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(2,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(1,2,1),(9,2,1),(10,2,1),(5,2,1),(3,2,1),(6,2,1),(13,2,1),(14,2,1),(2,2,1),(11,2,1),(12,2,1),(7,2,1),(4,2,1),(8,2,1),(15,2,1),(16,2,1)], (140,541) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,0),(15,2,0),(16,2,0)], (140,542) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,0),(15,2,0),(16,2,0),(1,1,1),(9,1,1),(10,1,1),(5,2,1),(3,2,1),(6,1,1),(13,2,1),(14,2,1),(2,1,1),(11,1,1),(12,1,1),(7,2,1),(4,2,1),(8,1,1),(15,2,1),(16,2,1)], (140,543) => MOP_CODE[(9,1,0),(10,1,0),(5,2,1),(3,2,1),(6,1,0),(13,2,1),(14,2,1),(2,1,1),(11,1,1),(12,1,1),(7,2,0),(4,2,0),(8,1,1),(15,2,0),(16,2,0)], (140,544) => MOP_CODE[(9,1,1),(10,1,1),(5,2,1),(3,2,1),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,1),(12,1,1),(7,2,1),(4,2,1),(8,1,0),(15,2,0),(16,2,0)], (140,545) => MOP_CODE[(9,1,1),(10,1,1),(5,2,0),(3,2,0),(6,1,0),(13,2,1),(14,2,1),(2,1,0),(11,1,1),(12,1,1),(7,2,0),(4,2,0),(8,1,0),(15,2,1),(16,2,1)], (140,546) => MOP_CODE[(9,1,1),(10,1,1),(5,2,0),(3,2,0),(6,1,0),(13,2,1),(14,2,1),(2,1,1),(11,1,0),(12,1,0),(7,2,1),(4,2,1),(8,1,1),(15,2,0),(16,2,0)], (140,547) => MOP_CODE[(9,1,0),(10,1,0),(5,2,1),(3,2,1),(6,1,0),(13,2,1),(14,2,1),(2,1,0),(11,1,0),(12,1,0),(7,2,1),(4,2,1),(8,1,0),(15,2,1),(16,2,1)], (140,548) => MOP_CODE[(9,1,1),(10,1,1),(5,2,1),(3,2,1),(6,1,0),(13,2,0),(14,2,0),(2,1,1),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,1),(15,2,1),(16,2,1)], (140,549) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,1),(11,1,1),(12,1,1),(7,2,1),(4,2,1),(8,1,1),(15,2,1),(16,2,1)], (140,550) => MOP_CODE[(9,1,0),(10,1,0),(5,2,0),(3,2,0),(6,1,0),(13,2,0),(14,2,0),(2,1,0),(11,1,0),(12,1,0),(7,2,0),(4,2,0),(8,1,0),(15,2,0),(16,2,0),(1,2,1),(9,2,1),(10,2,1),(5,1,1),(3,1,1),(6,2,1),(13,1,1),(14,1,1),(2,2,1),(11,2,1),(12,2,1),(7,1,1),(4,1,1),(8,2,1),(15,1,1),(16,1,1)], (141,551) => MOP_CODE[(9,31,0),(10,32,0),(5,1,0),(3,4,0),(6,4,0),(13,33,0),(14,34,0),(2,1,0),(11,33,0),(12,34,0),(7,1,0),(4,4,0),(8,4,0),(15,31,0),(16,32,0)], (141,552) => MOP_CODE[(9,31,0),(10,32,0),(5,1,0),(3,4,0),(6,4,0),(13,33,0),(14,34,0),(2,1,0),(11,33,0),(12,34,0),(7,1,0),(4,4,0),(8,4,0),(15,31,0),(16,32,0),(1,1,1),(9,31,1),(10,32,1),(5,1,1),(3,4,1),(6,4,1),(13,33,1),(14,34,1),(2,1,1),(11,33,1),(12,34,1),(7,1,1),(4,4,1),(8,4,1),(15,31,1),(16,32,1)], (141,553) => MOP_CODE[(9,31,0),(10,32,0),(5,1,1),(3,4,1),(6,4,0),(13,33,1),(14,34,1),(2,1,1),(11,33,1),(12,34,1),(7,1,0),(4,4,0),(8,4,1),(15,31,0),(16,32,0)], (141,554) => MOP_CODE[(9,31,1),(10,32,1),(5,1,1),(3,4,1),(6,4,0),(13,33,0),(14,34,0),(2,1,0),(11,33,1),(12,34,1),(7,1,1),(4,4,1),(8,4,0),(15,31,0),(16,32,0)], (141,555) => MOP_CODE[(9,31,1),(10,32,1),(5,1,0),(3,4,0),(6,4,0),(13,33,1),(14,34,1),(2,1,0),(11,33,1),(12,34,1),(7,1,0),(4,4,0),(8,4,0),(15,31,1),(16,32,1)], (141,556) => MOP_CODE[(9,31,1),(10,32,1),(5,1,0),(3,4,0),(6,4,0),(13,33,1),(14,34,1),(2,1,1),(11,33,0),(12,34,0),(7,1,1),(4,4,1),(8,4,1),(15,31,0),(16,32,0)], (141,557) => MOP_CODE[(9,31,0),(10,32,0),(5,1,1),(3,4,1),(6,4,0),(13,33,1),(14,34,1),(2,1,0),(11,33,0),(12,34,0),(7,1,1),(4,4,1),(8,4,0),(15,31,1),(16,32,1)], (141,558) => MOP_CODE[(9,31,1),(10,32,1),(5,1,1),(3,4,1),(6,4,0),(13,33,0),(14,34,0),(2,1,1),(11,33,0),(12,34,0),(7,1,0),(4,4,0),(8,4,1),(15,31,1),(16,32,1)], (141,559) => MOP_CODE[(9,31,0),(10,32,0),(5,1,0),(3,4,0),(6,4,0),(13,33,0),(14,34,0),(2,1,1),(11,33,1),(12,34,1),(7,1,1),(4,4,1),(8,4,1),(15,31,1),(16,32,1)], (141,560) => MOP_CODE[(9,31,0),(10,32,0),(5,1,0),(3,4,0),(6,4,0),(13,33,0),(14,34,0),(2,1,0),(11,33,0),(12,34,0),(7,1,0),(4,4,0),(8,4,0),(15,31,0),(16,32,0),(1,2,1),(9,29,1),(10,9,1),(5,5,1),(3,3,1),(6,7,1),(13,29,1),(14,9,1),(2,5,1),(11,29,1),(12,9,1),(7,2,1),(4,7,1),(8,3,1),(15,29,1),(16,9,1)], (142,561) => MOP_CODE[(9,31,0),(10,32,0),(5,5,0),(3,3,0),(6,4,0),(13,29,0),(14,9,0),(2,1,0),(11,33,0),(12,34,0),(7,2,0),(4,7,0),(8,4,0),(15,29,0),(16,9,0)], (142,562) => MOP_CODE[(9,31,0),(10,32,0),(5,5,0),(3,3,0),(6,4,0),(13,29,0),(14,9,0),(2,1,0),(11,33,0),(12,34,0),(7,2,0),(4,7,0),(8,4,0),(15,29,0),(16,9,0),(1,1,1),(9,31,1),(10,32,1),(5,5,1),(3,3,1),(6,4,1),(13,29,1),(14,9,1),(2,1,1),(11,33,1),(12,34,1),(7,2,1),(4,7,1),(8,4,1),(15,29,1),(16,9,1)], (142,563) => MOP_CODE[(9,31,0),(10,32,0),(5,5,1),(3,3,1),(6,4,0),(13,29,1),(14,9,1),(2,1,1),(11,33,1),(12,34,1),(7,2,0),(4,7,0),(8,4,1),(15,29,0),(16,9,0)], (142,564) => MOP_CODE[(9,31,1),(10,32,1),(5,5,1),(3,3,1),(6,4,0),(13,29,0),(14,9,0),(2,1,0),(11,33,1),(12,34,1),(7,2,1),(4,7,1),(8,4,0),(15,29,0),(16,9,0)], (142,565) => MOP_CODE[(9,31,1),(10,32,1),(5,5,0),(3,3,0),(6,4,0),(13,29,1),(14,9,1),(2,1,0),(11,33,1),(12,34,1),(7,2,0),(4,7,0),(8,4,0),(15,29,1),(16,9,1)], (142,566) => MOP_CODE[(9,31,1),(10,32,1),(5,5,0),(3,3,0),(6,4,0),(13,29,1),(14,9,1),(2,1,1),(11,33,0),(12,34,0),(7,2,1),(4,7,1),(8,4,1),(15,29,0),(16,9,0)], (142,567) => MOP_CODE[(9,31,0),(10,32,0),(5,5,1),(3,3,1),(6,4,0),(13,29,1),(14,9,1),(2,1,0),(11,33,0),(12,34,0),(7,2,1),(4,7,1),(8,4,0),(15,29,1),(16,9,1)], (142,568) => MOP_CODE[(9,31,1),(10,32,1),(5,5,1),(3,3,1),(6,4,0),(13,29,0),(14,9,0),(2,1,1),(11,33,0),(12,34,0),(7,2,0),(4,7,0),(8,4,1),(15,29,1),(16,9,1)], (142,569) => MOP_CODE[(9,31,0),(10,32,0),(5,5,0),(3,3,0),(6,4,0),(13,29,0),(14,9,0),(2,1,1),(11,33,1),(12,34,1),(7,2,1),(4,7,1),(8,4,1),(15,29,1),(16,9,1)], (142,570) => MOP_CODE[(9,31,0),(10,32,0),(5,5,0),(3,3,0),(6,4,0),(13,29,0),(14,9,0),(2,1,0),(11,33,0),(12,34,0),(7,2,0),(4,7,0),(8,4,0),(15,29,0),(16,9,0),(1,2,1),(9,29,1),(10,9,1),(5,1,1),(3,4,1),(6,7,1),(13,33,1),(14,34,1),(2,5,1),(11,29,1),(12,9,1),(7,1,1),(4,4,1),(8,3,1),(15,31,1),(16,32,1)], (143,1) => MOP_CODE[(17,1,0),(18,1,0)], (143,2) => MOP_CODE[(17,1,0),(18,1,0),(1,1,1),(17,1,1),(18,1,1)], (143,3) => MOP_CODE[(17,1,0),(18,1,0),(1,2,1),(17,2,1),(18,2,1)], (144,4) => MOP_CODE[(17,35,0),(18,36,0)], (144,5) => MOP_CODE[(17,35,0),(18,36,0),(1,1,1),(17,35,1),(18,36,1)], (144,6) => MOP_CODE[(17,35,0),(18,36,0),(1,2,1),(17,37,1),(18,38,1)], (145,7) => MOP_CODE[(17,36,0),(18,35,0)], (145,8) => MOP_CODE[(17,36,0),(18,35,0),(1,1,1),(17,36,1),(18,35,1)], (145,9) => MOP_CODE[(17,36,0),(18,35,0),(1,2,1),(17,38,1),(18,37,1)], (146,10) => MOP_CODE[(17,1,0),(18,1,0)], (146,11) => MOP_CODE[(17,1,0),(18,1,0),(1,1,1),(17,1,1),(18,1,1)], (146,12) => MOP_CODE[(17,1,0),(18,1,0),(1,2,1),(17,2,1),(18,2,1)], (147,13) => MOP_CODE[(17,1,0),(18,1,0),(2,1,0),(19,1,0),(20,1,0)], (147,14) => MOP_CODE[(17,1,0),(18,1,0),(2,1,0),(19,1,0),(20,1,0),(1,1,1),(17,1,1),(18,1,1),(2,1,1),(19,1,1),(20,1,1)], (147,15) => MOP_CODE[(17,1,0),(18,1,0),(2,1,1),(19,1,1),(20,1,1)], (147,16) => MOP_CODE[(17,1,0),(18,1,0),(2,1,0),(19,1,0),(20,1,0),(1,2,1),(17,2,1),(18,2,1),(2,2,1),(19,2,1),(20,2,1)], (148,17) => MOP_CODE[(17,1,0),(18,1,0),(2,1,0),(19,1,0),(20,1,0)], (148,18) => MOP_CODE[(17,1,0),(18,1,0),(2,1,0),(19,1,0),(20,1,0),(1,1,1),(17,1,1),(18,1,1),(2,1,1),(19,1,1),(20,1,1)], (148,19) => MOP_CODE[(17,1,0),(18,1,0),(2,1,1),(19,1,1),(20,1,1)], (148,20) => MOP_CODE[(17,1,0),(18,1,0),(2,1,0),(19,1,0),(20,1,0),(1,2,1),(17,2,1),(18,2,1),(2,2,1),(19,2,1),(20,2,1)], (149,21) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0)], (149,22) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(1,1,1),(17,1,1),(18,1,1),(21,1,1),(22,1,1),(14,1,1)], (149,23) => MOP_CODE[(17,1,0),(18,1,0),(21,1,1),(22,1,1),(14,1,1)], (149,24) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(1,2,1),(17,2,1),(18,2,1),(21,2,1),(22,2,1),(14,2,1)], (150,25) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0)], (150,26) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(1,1,1),(17,1,1),(18,1,1),(23,1,1),(13,1,1),(24,1,1)], (150,27) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1)], (150,28) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(1,2,1),(17,2,1),(18,2,1),(23,2,1),(13,2,1),(24,2,1)], (151,29) => MOP_CODE[(17,35,0),(18,36,0),(21,1,0),(22,35,0),(14,36,0)], (151,30) => MOP_CODE[(17,35,0),(18,36,0),(21,1,0),(22,35,0),(14,36,0),(1,1,1),(17,35,1),(18,36,1),(21,1,1),(22,35,1),(14,36,1)], (151,31) => MOP_CODE[(17,35,0),(18,36,0),(21,1,1),(22,35,1),(14,36,1)], (151,32) => MOP_CODE[(17,35,0),(18,36,0),(21,1,0),(22,35,0),(14,36,0),(1,2,1),(17,37,1),(18,38,1),(21,2,1),(22,37,1),(14,38,1)], (152,33) => MOP_CODE[(17,35,0),(18,36,0),(23,36,0),(13,1,0),(24,35,0)], (152,34) => MOP_CODE[(17,35,0),(18,36,0),(23,36,0),(13,1,0),(24,35,0),(1,1,1),(17,35,1),(18,36,1),(23,36,1),(13,1,1),(24,35,1)], (152,35) => MOP_CODE[(17,35,0),(18,36,0),(23,36,1),(13,1,1),(24,35,1)], (152,36) => MOP_CODE[(17,35,0),(18,36,0),(23,36,0),(13,1,0),(24,35,0),(1,2,1),(17,37,1),(18,38,1),(23,38,1),(13,2,1),(24,37,1)], (153,37) => MOP_CODE[(17,36,0),(18,35,0),(21,1,0),(22,36,0),(14,35,0)], (153,38) => MOP_CODE[(17,36,0),(18,35,0),(21,1,0),(22,36,0),(14,35,0),(1,1,1),(17,36,1),(18,35,1),(21,1,1),(22,36,1),(14,35,1)], (153,39) => MOP_CODE[(17,36,0),(18,35,0),(21,1,1),(22,36,1),(14,35,1)], (153,40) => MOP_CODE[(17,36,0),(18,35,0),(21,1,0),(22,36,0),(14,35,0),(1,2,1),(17,38,1),(18,37,1),(21,2,1),(22,38,1),(14,37,1)], (154,41) => MOP_CODE[(17,36,0),(18,35,0),(23,35,0),(13,1,0),(24,36,0)], (154,42) => MOP_CODE[(17,36,0),(18,35,0),(23,35,0),(13,1,0),(24,36,0),(1,1,1),(17,36,1),(18,35,1),(23,35,1),(13,1,1),(24,36,1)], (154,43) => MOP_CODE[(17,36,0),(18,35,0),(23,35,1),(13,1,1),(24,36,1)], (154,44) => MOP_CODE[(17,36,0),(18,35,0),(23,35,0),(13,1,0),(24,36,0),(1,2,1),(17,38,1),(18,37,1),(23,37,1),(13,2,1),(24,38,1)], (155,45) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0)], (155,46) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(1,1,1),(17,1,1),(18,1,1),(23,1,1),(13,1,1),(24,1,1)], (155,47) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1)], (155,48) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(1,2,1),(17,2,1),(18,2,1),(23,2,1),(13,2,1),(24,2,1)], (156,49) => MOP_CODE[(17,1,0),(18,1,0),(25,1,0),(15,1,0),(26,1,0)], (156,50) => MOP_CODE[(17,1,0),(18,1,0),(25,1,0),(15,1,0),(26,1,0),(1,1,1),(17,1,1),(18,1,1),(25,1,1),(15,1,1),(26,1,1)], (156,51) => MOP_CODE[(17,1,0),(18,1,0),(25,1,1),(15,1,1),(26,1,1)], (156,52) => MOP_CODE[(17,1,0),(18,1,0),(25,1,0),(15,1,0),(26,1,0),(1,2,1),(17,2,1),(18,2,1),(25,2,1),(15,2,1),(26,2,1)], (157,53) => MOP_CODE[(17,1,0),(18,1,0),(27,1,0),(28,1,0),(16,1,0)], (157,54) => MOP_CODE[(17,1,0),(18,1,0),(27,1,0),(28,1,0),(16,1,0),(1,1,1),(17,1,1),(18,1,1),(27,1,1),(28,1,1),(16,1,1)], (157,55) => MOP_CODE[(17,1,0),(18,1,0),(27,1,1),(28,1,1),(16,1,1)], (157,56) => MOP_CODE[(17,1,0),(18,1,0),(27,1,0),(28,1,0),(16,1,0),(1,2,1),(17,2,1),(18,2,1),(27,2,1),(28,2,1),(16,2,1)], (158,57) => MOP_CODE[(17,1,0),(18,1,0),(25,2,0),(15,2,0),(26,2,0)], (158,58) => MOP_CODE[(17,1,0),(18,1,0),(25,2,0),(15,2,0),(26,2,0),(1,1,1),(17,1,1),(18,1,1),(25,2,1),(15,2,1),(26,2,1)], (158,59) => MOP_CODE[(17,1,0),(18,1,0),(25,2,1),(15,2,1),(26,2,1)], (158,60) => MOP_CODE[(17,1,0),(18,1,0),(25,2,0),(15,2,0),(26,2,0),(1,2,1),(17,2,1),(18,2,1),(25,1,1),(15,1,1),(26,1,1)], (159,61) => MOP_CODE[(17,1,0),(18,1,0),(27,2,0),(28,2,0),(16,2,0)], (159,62) => MOP_CODE[(17,1,0),(18,1,0),(27,2,0),(28,2,0),(16,2,0),(1,1,1),(17,1,1),(18,1,1),(27,2,1),(28,2,1),(16,2,1)], (159,63) => MOP_CODE[(17,1,0),(18,1,0),(27,2,1),(28,2,1),(16,2,1)], (159,64) => MOP_CODE[(17,1,0),(18,1,0),(27,2,0),(28,2,0),(16,2,0),(1,2,1),(17,2,1),(18,2,1),(27,1,1),(28,1,1),(16,1,1)], (160,65) => MOP_CODE[(17,1,0),(18,1,0),(25,1,0),(15,1,0),(26,1,0)], (160,66) => MOP_CODE[(17,1,0),(18,1,0),(25,1,0),(15,1,0),(26,1,0),(1,1,1),(17,1,1),(18,1,1),(25,1,1),(15,1,1),(26,1,1)], (160,67) => MOP_CODE[(17,1,0),(18,1,0),(25,1,1),(15,1,1),(26,1,1)], (160,68) => MOP_CODE[(17,1,0),(18,1,0),(25,1,0),(15,1,0),(26,1,0),(1,2,1),(17,2,1),(18,2,1),(25,2,1),(15,2,1),(26,2,1)], (161,69) => MOP_CODE[(17,1,0),(18,1,0),(25,2,0),(15,2,0),(26,2,0)], (161,70) => MOP_CODE[(17,1,0),(18,1,0),(25,2,0),(15,2,0),(26,2,0),(1,1,1),(17,1,1),(18,1,1),(25,2,1),(15,2,1),(26,2,1)], (161,71) => MOP_CODE[(17,1,0),(18,1,0),(25,2,1),(15,2,1),(26,2,1)], (161,72) => MOP_CODE[(17,1,0),(18,1,0),(25,2,0),(15,2,0),(26,2,0),(1,2,1),(17,2,1),(18,2,1),(25,1,1),(15,1,1),(26,1,1)], (162,73) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(19,1,0),(20,1,0),(27,1,0),(28,1,0),(16,1,0)], (162,74) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(19,1,0),(20,1,0),(27,1,0),(28,1,0),(16,1,0),(1,1,1),(17,1,1),(18,1,1),(21,1,1),(22,1,1),(14,1,1),(2,1,1),(19,1,1),(20,1,1),(27,1,1),(28,1,1),(16,1,1)], (162,75) => MOP_CODE[(17,1,0),(18,1,0),(21,1,1),(22,1,1),(14,1,1),(2,1,1),(19,1,1),(20,1,1),(27,1,0),(28,1,0),(16,1,0)], (162,76) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(2,1,1),(19,1,1),(20,1,1),(27,1,1),(28,1,1),(16,1,1)], (162,77) => MOP_CODE[(17,1,0),(18,1,0),(21,1,1),(22,1,1),(14,1,1),(2,1,0),(19,1,0),(20,1,0),(27,1,1),(28,1,1),(16,1,1)], (162,78) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(19,1,0),(20,1,0),(27,1,0),(28,1,0),(16,1,0),(1,2,1),(17,2,1),(18,2,1),(21,2,1),(22,2,1),(14,2,1),(2,2,1),(19,2,1),(20,2,1),(27,2,1),(28,2,1),(16,2,1)], (163,79) => MOP_CODE[(17,1,0),(18,1,0),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(19,1,0),(20,1,0),(27,2,0),(28,2,0),(16,2,0)], (163,80) => MOP_CODE[(17,1,0),(18,1,0),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(19,1,0),(20,1,0),(27,2,0),(28,2,0),(16,2,0),(1,1,1),(17,1,1),(18,1,1),(21,2,1),(22,2,1),(14,2,1),(2,1,1),(19,1,1),(20,1,1),(27,2,1),(28,2,1),(16,2,1)], (163,81) => MOP_CODE[(17,1,0),(18,1,0),(21,2,1),(22,2,1),(14,2,1),(2,1,1),(19,1,1),(20,1,1),(27,2,0),(28,2,0),(16,2,0)], (163,82) => MOP_CODE[(17,1,0),(18,1,0),(21,2,0),(22,2,0),(14,2,0),(2,1,1),(19,1,1),(20,1,1),(27,2,1),(28,2,1),(16,2,1)], (163,83) => MOP_CODE[(17,1,0),(18,1,0),(21,2,1),(22,2,1),(14,2,1),(2,1,0),(19,1,0),(20,1,0),(27,2,1),(28,2,1),(16,2,1)], (163,84) => MOP_CODE[(17,1,0),(18,1,0),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(19,1,0),(20,1,0),(27,2,0),(28,2,0),(16,2,0),(1,2,1),(17,2,1),(18,2,1),(21,1,1),(22,1,1),(14,1,1),(2,2,1),(19,2,1),(20,2,1),(27,1,1),(28,1,1),(16,1,1)], (164,85) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(2,1,0),(19,1,0),(20,1,0),(25,1,0),(15,1,0),(26,1,0)], (164,86) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(2,1,0),(19,1,0),(20,1,0),(25,1,0),(15,1,0),(26,1,0),(1,1,1),(17,1,1),(18,1,1),(23,1,1),(13,1,1),(24,1,1),(2,1,1),(19,1,1),(20,1,1),(25,1,1),(15,1,1),(26,1,1)], (164,87) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1),(2,1,1),(19,1,1),(20,1,1),(25,1,0),(15,1,0),(26,1,0)], (164,88) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(2,1,1),(19,1,1),(20,1,1),(25,1,1),(15,1,1),(26,1,1)], (164,89) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1),(2,1,0),(19,1,0),(20,1,0),(25,1,1),(15,1,1),(26,1,1)], (164,90) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(2,1,0),(19,1,0),(20,1,0),(25,1,0),(15,1,0),(26,1,0),(1,2,1),(17,2,1),(18,2,1),(23,2,1),(13,2,1),(24,2,1),(2,2,1),(19,2,1),(20,2,1),(25,2,1),(15,2,1),(26,2,1)], (165,91) => MOP_CODE[(17,1,0),(18,1,0),(23,2,0),(13,2,0),(24,2,0),(2,1,0),(19,1,0),(20,1,0),(25,2,0),(15,2,0),(26,2,0)], (165,92) => MOP_CODE[(17,1,0),(18,1,0),(23,2,0),(13,2,0),(24,2,0),(2,1,0),(19,1,0),(20,1,0),(25,2,0),(15,2,0),(26,2,0),(1,1,1),(17,1,1),(18,1,1),(23,2,1),(13,2,1),(24,2,1),(2,1,1),(19,1,1),(20,1,1),(25,2,1),(15,2,1),(26,2,1)], (165,93) => MOP_CODE[(17,1,0),(18,1,0),(23,2,1),(13,2,1),(24,2,1),(2,1,1),(19,1,1),(20,1,1),(25,2,0),(15,2,0),(26,2,0)], (165,94) => MOP_CODE[(17,1,0),(18,1,0),(23,2,0),(13,2,0),(24,2,0),(2,1,1),(19,1,1),(20,1,1),(25,2,1),(15,2,1),(26,2,1)], (165,95) => MOP_CODE[(17,1,0),(18,1,0),(23,2,1),(13,2,1),(24,2,1),(2,1,0),(19,1,0),(20,1,0),(25,2,1),(15,2,1),(26,2,1)], (165,96) => MOP_CODE[(17,1,0),(18,1,0),(23,2,0),(13,2,0),(24,2,0),(2,1,0),(19,1,0),(20,1,0),(25,2,0),(15,2,0),(26,2,0),(1,2,1),(17,2,1),(18,2,1),(23,1,1),(13,1,1),(24,1,1),(2,2,1),(19,2,1),(20,2,1),(25,1,1),(15,1,1),(26,1,1)], (166,97) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(2,1,0),(19,1,0),(20,1,0),(25,1,0),(15,1,0),(26,1,0)], (166,98) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(2,1,0),(19,1,0),(20,1,0),(25,1,0),(15,1,0),(26,1,0),(1,1,1),(17,1,1),(18,1,1),(23,1,1),(13,1,1),(24,1,1),(2,1,1),(19,1,1),(20,1,1),(25,1,1),(15,1,1),(26,1,1)], (166,99) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1),(2,1,1),(19,1,1),(20,1,1),(25,1,0),(15,1,0),(26,1,0)], (166,100) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(2,1,1),(19,1,1),(20,1,1),(25,1,1),(15,1,1),(26,1,1)], (166,101) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1),(2,1,0),(19,1,0),(20,1,0),(25,1,1),(15,1,1),(26,1,1)], (166,102) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(2,1,0),(19,1,0),(20,1,0),(25,1,0),(15,1,0),(26,1,0),(1,2,1),(17,2,1),(18,2,1),(23,2,1),(13,2,1),(24,2,1),(2,2,1),(19,2,1),(20,2,1),(25,2,1),(15,2,1),(26,2,1)], (167,103) => MOP_CODE[(17,1,0),(18,1,0),(23,2,0),(13,2,0),(24,2,0),(2,1,0),(19,1,0),(20,1,0),(25,2,0),(15,2,0),(26,2,0)], (167,104) => MOP_CODE[(17,1,0),(18,1,0),(23,2,0),(13,2,0),(24,2,0),(2,1,0),(19,1,0),(20,1,0),(25,2,0),(15,2,0),(26,2,0),(1,1,1),(17,1,1),(18,1,1),(23,2,1),(13,2,1),(24,2,1),(2,1,1),(19,1,1),(20,1,1),(25,2,1),(15,2,1),(26,2,1)], (167,105) => MOP_CODE[(17,1,0),(18,1,0),(23,2,1),(13,2,1),(24,2,1),(2,1,1),(19,1,1),(20,1,1),(25,2,0),(15,2,0),(26,2,0)], (167,106) => MOP_CODE[(17,1,0),(18,1,0),(23,2,0),(13,2,0),(24,2,0),(2,1,1),(19,1,1),(20,1,1),(25,2,1),(15,2,1),(26,2,1)], (167,107) => MOP_CODE[(17,1,0),(18,1,0),(23,2,1),(13,2,1),(24,2,1),(2,1,0),(19,1,0),(20,1,0),(25,2,1),(15,2,1),(26,2,1)], (167,108) => MOP_CODE[(17,1,0),(18,1,0),(23,2,0),(13,2,0),(24,2,0),(2,1,0),(19,1,0),(20,1,0),(25,2,0),(15,2,0),(26,2,0),(1,2,1),(17,2,1),(18,2,1),(23,1,1),(13,1,1),(24,1,1),(2,2,1),(19,2,1),(20,2,1),(25,1,1),(15,1,1),(26,1,1)], (168,109) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0)], (168,110) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(1,1,1),(29,1,1),(17,1,1),(6,1,1),(18,1,1),(30,1,1)], (168,111) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1)], (168,112) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(1,2,1),(29,2,1),(17,2,1),(6,2,1),(18,2,1),(30,2,1)], (169,113) => MOP_CODE[(29,38,0),(17,35,0),(6,2,0),(18,36,0),(30,37,0)], (169,114) => MOP_CODE[(29,38,0),(17,35,0),(6,2,0),(18,36,0),(30,37,0),(1,1,1),(29,38,1),(17,35,1),(6,2,1),(18,36,1),(30,37,1)], (169,115) => MOP_CODE[(29,38,1),(17,35,0),(6,2,1),(18,36,0),(30,37,1)], (169,116) => MOP_CODE[(29,38,0),(17,35,0),(6,2,0),(18,36,0),(30,37,0),(1,2,1),(29,36,1),(17,37,1),(6,1,1),(18,38,1),(30,35,1)], (170,117) => MOP_CODE[(29,37,0),(17,36,0),(6,2,0),(18,35,0),(30,38,0)], (170,118) => MOP_CODE[(29,37,0),(17,36,0),(6,2,0),(18,35,0),(30,38,0),(1,1,1),(29,37,1),(17,36,1),(6,2,1),(18,35,1),(30,38,1)], (170,119) => MOP_CODE[(29,37,1),(17,36,0),(6,2,1),(18,35,0),(30,38,1)], (170,120) => MOP_CODE[(29,37,0),(17,36,0),(6,2,0),(18,35,0),(30,38,0),(1,2,1),(29,35,1),(17,38,1),(6,1,1),(18,37,1),(30,36,1)], (171,121) => MOP_CODE[(29,35,0),(17,36,0),(6,1,0),(18,35,0),(30,36,0)], (171,122) => MOP_CODE[(29,35,0),(17,36,0),(6,1,0),(18,35,0),(30,36,0),(1,1,1),(29,35,1),(17,36,1),(6,1,1),(18,35,1),(30,36,1)], (171,123) => MOP_CODE[(29,35,1),(17,36,0),(6,1,1),(18,35,0),(30,36,1)], (171,124) => MOP_CODE[(29,35,0),(17,36,0),(6,1,0),(18,35,0),(30,36,0),(1,2,1),(29,37,1),(17,38,1),(6,2,1),(18,37,1),(30,38,1)], (172,125) => MOP_CODE[(29,36,0),(17,35,0),(6,1,0),(18,36,0),(30,35,0)], (172,126) => MOP_CODE[(29,36,0),(17,35,0),(6,1,0),(18,36,0),(30,35,0),(1,1,1),(29,36,1),(17,35,1),(6,1,1),(18,36,1),(30,35,1)], (172,127) => MOP_CODE[(29,36,1),(17,35,0),(6,1,1),(18,36,0),(30,35,1)], (172,128) => MOP_CODE[(29,36,0),(17,35,0),(6,1,0),(18,36,0),(30,35,0),(1,2,1),(29,38,1),(17,37,1),(6,2,1),(18,38,1),(30,37,1)], (173,129) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0)], (173,130) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(1,1,1),(29,2,1),(17,1,1),(6,2,1),(18,1,1),(30,2,1)], (173,131) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1)], (173,132) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(1,2,1),(29,1,1),(17,2,1),(6,1,1),(18,2,1),(30,1,1)], (174,133) => MOP_CODE[(17,1,0),(18,1,0),(31,1,0),(8,1,0),(32,1,0)], (174,134) => MOP_CODE[(17,1,0),(18,1,0),(31,1,0),(8,1,0),(32,1,0),(1,1,1),(17,1,1),(18,1,1),(31,1,1),(8,1,1),(32,1,1)], (174,135) => MOP_CODE[(17,1,0),(18,1,0),(31,1,1),(8,1,1),(32,1,1)], (174,136) => MOP_CODE[(17,1,0),(18,1,0),(31,1,0),(8,1,0),(32,1,0),(1,2,1),(17,2,1),(18,2,1),(31,2,1),(8,2,1),(32,2,1)], (175,137) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0)], (175,138) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(1,1,1),(29,1,1),(17,1,1),(6,1,1),(18,1,1),(30,1,1),(2,1,1),(31,1,1),(19,1,1),(8,1,1),(20,1,1),(32,1,1)], (175,139) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(2,1,1),(31,1,0),(19,1,1),(8,1,0),(20,1,1),(32,1,0)], (175,140) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(2,1,1),(31,1,1),(19,1,1),(8,1,1),(20,1,1),(32,1,1)], (175,141) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(2,1,0),(31,1,1),(19,1,0),(8,1,1),(20,1,0),(32,1,1)], (175,142) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(1,2,1),(29,2,1),(17,2,1),(6,2,1),(18,2,1),(30,2,1),(2,2,1),(31,2,1),(19,2,1),(8,2,1),(20,2,1),(32,2,1)], (176,143) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0)], (176,144) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(1,1,1),(29,2,1),(17,1,1),(6,2,1),(18,1,1),(30,2,1),(2,1,1),(31,2,1),(19,1,1),(8,2,1),(20,1,1),(32,2,1)], (176,145) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(2,1,1),(31,2,0),(19,1,1),(8,2,0),(20,1,1),(32,2,0)], (176,146) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(2,1,1),(31,2,1),(19,1,1),(8,2,1),(20,1,1),(32,2,1)], (176,147) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(2,1,0),(31,2,1),(19,1,0),(8,2,1),(20,1,0),(32,2,1)], (176,148) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(1,2,1),(29,1,1),(17,2,1),(6,1,1),(18,2,1),(30,1,1),(2,2,1),(31,1,1),(19,2,1),(8,1,1),(20,2,1),(32,1,1)], (177,149) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,0),(13,1,0),(24,1,0),(21,1,0),(22,1,0),(14,1,0)], (177,150) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,0),(13,1,0),(24,1,0),(21,1,0),(22,1,0),(14,1,0),(1,1,1),(29,1,1),(17,1,1),(6,1,1),(18,1,1),(30,1,1),(23,1,1),(13,1,1),(24,1,1),(21,1,1),(22,1,1),(14,1,1)], (177,151) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,1,1),(13,1,1),(24,1,1),(21,1,0),(22,1,0),(14,1,0)], (177,152) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,1,0),(13,1,0),(24,1,0),(21,1,1),(22,1,1),(14,1,1)], (177,153) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,1),(13,1,1),(24,1,1),(21,1,1),(22,1,1),(14,1,1)], (177,154) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,0),(13,1,0),(24,1,0),(21,1,0),(22,1,0),(14,1,0),(1,2,1),(29,2,1),(17,2,1),(6,2,1),(18,2,1),(30,2,1),(23,2,1),(13,2,1),(24,2,1),(21,2,1),(22,2,1),(14,2,1)], (178,155) => MOP_CODE[(29,38,0),(17,35,0),(6,2,0),(18,36,0),(30,37,0),(23,1,0),(13,35,0),(24,36,0),(21,38,0),(22,2,0),(14,37,0)], (178,156) => MOP_CODE[(29,38,0),(17,35,0),(6,2,0),(18,36,0),(30,37,0),(23,1,0),(13,35,0),(24,36,0),(21,38,0),(22,2,0),(14,37,0),(1,1,1),(29,38,1),(17,35,1),(6,2,1),(18,36,1),(30,37,1),(23,1,1),(13,35,1),(24,36,1),(21,38,1),(22,2,1),(14,37,1)], (178,157) => MOP_CODE[(29,38,1),(17,35,0),(6,2,1),(18,36,0),(30,37,1),(23,1,1),(13,35,1),(24,36,1),(21,38,0),(22,2,0),(14,37,0)], (178,158) => MOP_CODE[(29,38,1),(17,35,0),(6,2,1),(18,36,0),(30,37,1),(23,1,0),(13,35,0),(24,36,0),(21,38,1),(22,2,1),(14,37,1)], (178,159) => MOP_CODE[(29,38,0),(17,35,0),(6,2,0),(18,36,0),(30,37,0),(23,1,1),(13,35,1),(24,36,1),(21,38,1),(22,2,1),(14,37,1)], (178,160) => MOP_CODE[(29,38,0),(17,35,0),(6,2,0),(18,36,0),(30,37,0),(23,1,0),(13,35,0),(24,36,0),(21,38,0),(22,2,0),(14,37,0),(1,2,1),(29,36,1),(17,37,1),(6,1,1),(18,38,1),(30,35,1),(23,2,1),(13,37,1),(24,38,1),(21,36,1),(22,1,1),(14,35,1)], (179,161) => MOP_CODE[(29,37,0),(17,36,0),(6,2,0),(18,35,0),(30,38,0),(23,1,0),(13,36,0),(24,35,0),(21,37,0),(22,2,0),(14,38,0)], (179,162) => MOP_CODE[(29,37,0),(17,36,0),(6,2,0),(18,35,0),(30,38,0),(23,1,0),(13,36,0),(24,35,0),(21,37,0),(22,2,0),(14,38,0),(1,1,1),(29,37,1),(17,36,1),(6,2,1),(18,35,1),(30,38,1),(23,1,1),(13,36,1),(24,35,1),(21,37,1),(22,2,1),(14,38,1)], (179,163) => MOP_CODE[(29,37,1),(17,36,0),(6,2,1),(18,35,0),(30,38,1),(23,1,1),(13,36,1),(24,35,1),(21,37,0),(22,2,0),(14,38,0)], (179,164) => MOP_CODE[(29,37,1),(17,36,0),(6,2,1),(18,35,0),(30,38,1),(23,1,0),(13,36,0),(24,35,0),(21,37,1),(22,2,1),(14,38,1)], (179,165) => MOP_CODE[(29,37,0),(17,36,0),(6,2,0),(18,35,0),(30,38,0),(23,1,1),(13,36,1),(24,35,1),(21,37,1),(22,2,1),(14,38,1)], (179,166) => MOP_CODE[(29,37,0),(17,36,0),(6,2,0),(18,35,0),(30,38,0),(23,1,0),(13,36,0),(24,35,0),(21,37,0),(22,2,0),(14,38,0),(1,2,1),(29,35,1),(17,38,1),(6,1,1),(18,37,1),(30,36,1),(23,2,1),(13,38,1),(24,37,1),(21,35,1),(22,1,1),(14,36,1)], (180,167) => MOP_CODE[(29,35,0),(17,36,0),(6,1,0),(18,35,0),(30,36,0),(23,1,0),(13,36,0),(24,35,0),(21,35,0),(22,1,0),(14,36,0)], (180,168) => MOP_CODE[(29,35,0),(17,36,0),(6,1,0),(18,35,0),(30,36,0),(23,1,0),(13,36,0),(24,35,0),(21,35,0),(22,1,0),(14,36,0),(1,1,1),(29,35,1),(17,36,1),(6,1,1),(18,35,1),(30,36,1),(23,1,1),(13,36,1),(24,35,1),(21,35,1),(22,1,1),(14,36,1)], (180,169) => MOP_CODE[(29,35,1),(17,36,0),(6,1,1),(18,35,0),(30,36,1),(23,1,1),(13,36,1),(24,35,1),(21,35,0),(22,1,0),(14,36,0)], (180,170) => MOP_CODE[(29,35,1),(17,36,0),(6,1,1),(18,35,0),(30,36,1),(23,1,0),(13,36,0),(24,35,0),(21,35,1),(22,1,1),(14,36,1)], (180,171) => MOP_CODE[(29,35,0),(17,36,0),(6,1,0),(18,35,0),(30,36,0),(23,1,1),(13,36,1),(24,35,1),(21,35,1),(22,1,1),(14,36,1)], (180,172) => MOP_CODE[(29,35,0),(17,36,0),(6,1,0),(18,35,0),(30,36,0),(23,1,0),(13,36,0),(24,35,0),(21,35,0),(22,1,0),(14,36,0),(1,2,1),(29,37,1),(17,38,1),(6,2,1),(18,37,1),(30,38,1),(23,2,1),(13,38,1),(24,37,1),(21,37,1),(22,2,1),(14,38,1)], (181,173) => MOP_CODE[(29,36,0),(17,35,0),(6,1,0),(18,36,0),(30,35,0),(23,1,0),(13,35,0),(24,36,0),(21,36,0),(22,1,0),(14,35,0)], (181,174) => MOP_CODE[(29,36,0),(17,35,0),(6,1,0),(18,36,0),(30,35,0),(23,1,0),(13,35,0),(24,36,0),(21,36,0),(22,1,0),(14,35,0),(1,1,1),(29,36,1),(17,35,1),(6,1,1),(18,36,1),(30,35,1),(23,1,1),(13,35,1),(24,36,1),(21,36,1),(22,1,1),(14,35,1)], (181,175) => MOP_CODE[(29,36,1),(17,35,0),(6,1,1),(18,36,0),(30,35,1),(23,1,1),(13,35,1),(24,36,1),(21,36,0),(22,1,0),(14,35,0)], (181,176) => MOP_CODE[(29,36,1),(17,35,0),(6,1,1),(18,36,0),(30,35,1),(23,1,0),(13,35,0),(24,36,0),(21,36,1),(22,1,1),(14,35,1)], (181,177) => MOP_CODE[(29,36,0),(17,35,0),(6,1,0),(18,36,0),(30,35,0),(23,1,1),(13,35,1),(24,36,1),(21,36,1),(22,1,1),(14,35,1)], (181,178) => MOP_CODE[(29,36,0),(17,35,0),(6,1,0),(18,36,0),(30,35,0),(23,1,0),(13,35,0),(24,36,0),(21,36,0),(22,1,0),(14,35,0),(1,2,1),(29,38,1),(17,37,1),(6,2,1),(18,38,1),(30,37,1),(23,2,1),(13,37,1),(24,38,1),(21,38,1),(22,2,1),(14,37,1)], (182,179) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,0),(13,1,0),(24,1,0),(21,2,0),(22,2,0),(14,2,0)], (182,180) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,0),(13,1,0),(24,1,0),(21,2,0),(22,2,0),(14,2,0),(1,1,1),(29,2,1),(17,1,1),(6,2,1),(18,1,1),(30,2,1),(23,1,1),(13,1,1),(24,1,1),(21,2,1),(22,2,1),(14,2,1)], (182,181) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,1,1),(13,1,1),(24,1,1),(21,2,0),(22,2,0),(14,2,0)], (182,182) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,1,0),(13,1,0),(24,1,0),(21,2,1),(22,2,1),(14,2,1)], (182,183) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,1),(13,1,1),(24,1,1),(21,2,1),(22,2,1),(14,2,1)], (182,184) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,0),(13,1,0),(24,1,0),(21,2,0),(22,2,0),(14,2,0),(1,2,1),(29,1,1),(17,2,1),(6,1,1),(18,2,1),(30,1,1),(23,2,1),(13,2,1),(24,2,1),(21,1,1),(22,1,1),(14,1,1)], (183,185) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(25,1,0),(15,1,0),(26,1,0),(27,1,0),(28,1,0),(16,1,0)], (183,186) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(25,1,0),(15,1,0),(26,1,0),(27,1,0),(28,1,0),(16,1,0),(1,1,1),(29,1,1),(17,1,1),(6,1,1),(18,1,1),(30,1,1),(25,1,1),(15,1,1),(26,1,1),(27,1,1),(28,1,1),(16,1,1)], (183,187) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(25,1,1),(15,1,1),(26,1,1),(27,1,0),(28,1,0),(16,1,0)], (183,188) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(25,1,0),(15,1,0),(26,1,0),(27,1,1),(28,1,1),(16,1,1)], (183,189) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(25,1,1),(15,1,1),(26,1,1),(27,1,1),(28,1,1),(16,1,1)], (183,190) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(25,1,0),(15,1,0),(26,1,0),(27,1,0),(28,1,0),(16,1,0),(1,2,1),(29,2,1),(17,2,1),(6,2,1),(18,2,1),(30,2,1),(25,2,1),(15,2,1),(26,2,1),(27,2,1),(28,2,1),(16,2,1)], (184,191) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(25,2,0),(15,2,0),(26,2,0),(27,2,0),(28,2,0),(16,2,0)], (184,192) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(25,2,0),(15,2,0),(26,2,0),(27,2,0),(28,2,0),(16,2,0),(1,1,1),(29,1,1),(17,1,1),(6,1,1),(18,1,1),(30,1,1),(25,2,1),(15,2,1),(26,2,1),(27,2,1),(28,2,1),(16,2,1)], (184,193) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(25,2,1),(15,2,1),(26,2,1),(27,2,0),(28,2,0),(16,2,0)], (184,194) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(25,2,0),(15,2,0),(26,2,0),(27,2,1),(28,2,1),(16,2,1)], (184,195) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(25,2,1),(15,2,1),(26,2,1),(27,2,1),(28,2,1),(16,2,1)], (184,196) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(25,2,0),(15,2,0),(26,2,0),(27,2,0),(28,2,0),(16,2,0),(1,2,1),(29,2,1),(17,2,1),(6,2,1),(18,2,1),(30,2,1),(25,1,1),(15,1,1),(26,1,1),(27,1,1),(28,1,1),(16,1,1)], (185,197) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(25,2,0),(15,2,0),(26,2,0),(27,1,0),(28,1,0),(16,1,0)], (185,198) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(25,2,0),(15,2,0),(26,2,0),(27,1,0),(28,1,0),(16,1,0),(1,1,1),(29,2,1),(17,1,1),(6,2,1),(18,1,1),(30,2,1),(25,2,1),(15,2,1),(26,2,1),(27,1,1),(28,1,1),(16,1,1)], (185,199) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(25,2,1),(15,2,1),(26,2,1),(27,1,0),(28,1,0),(16,1,0)], (185,200) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(25,2,0),(15,2,0),(26,2,0),(27,1,1),(28,1,1),(16,1,1)], (185,201) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(25,2,1),(15,2,1),(26,2,1),(27,1,1),(28,1,1),(16,1,1)], (185,202) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(25,2,0),(15,2,0),(26,2,0),(27,1,0),(28,1,0),(16,1,0),(1,2,1),(29,1,1),(17,2,1),(6,1,1),(18,2,1),(30,1,1),(25,1,1),(15,1,1),(26,1,1),(27,2,1),(28,2,1),(16,2,1)], (186,203) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(25,1,0),(15,1,0),(26,1,0),(27,2,0),(28,2,0),(16,2,0)], (186,204) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(25,1,0),(15,1,0),(26,1,0),(27,2,0),(28,2,0),(16,2,0),(1,1,1),(29,2,1),(17,1,1),(6,2,1),(18,1,1),(30,2,1),(25,1,1),(15,1,1),(26,1,1),(27,2,1),(28,2,1),(16,2,1)], (186,205) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(25,1,1),(15,1,1),(26,1,1),(27,2,0),(28,2,0),(16,2,0)], (186,206) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(25,1,0),(15,1,0),(26,1,0),(27,2,1),(28,2,1),(16,2,1)], (186,207) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(25,1,1),(15,1,1),(26,1,1),(27,2,1),(28,2,1),(16,2,1)], (186,208) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(25,1,0),(15,1,0),(26,1,0),(27,2,0),(28,2,0),(16,2,0),(1,2,1),(29,1,1),(17,2,1),(6,1,1),(18,2,1),(30,1,1),(25,2,1),(15,2,1),(26,2,1),(27,1,1),(28,1,1),(16,1,1)], (187,209) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(31,1,0),(8,1,0),(32,1,0),(25,1,0),(15,1,0),(26,1,0)], (187,210) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(31,1,0),(8,1,0),(32,1,0),(25,1,0),(15,1,0),(26,1,0),(1,1,1),(17,1,1),(18,1,1),(21,1,1),(22,1,1),(14,1,1),(31,1,1),(8,1,1),(32,1,1),(25,1,1),(15,1,1),(26,1,1)], (187,211) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(31,1,1),(8,1,1),(32,1,1),(25,1,1),(15,1,1),(26,1,1)], (187,212) => MOP_CODE[(17,1,0),(18,1,0),(21,1,1),(22,1,1),(14,1,1),(31,1,1),(8,1,1),(32,1,1),(25,1,0),(15,1,0),(26,1,0)], (187,213) => MOP_CODE[(17,1,0),(18,1,0),(21,1,1),(22,1,1),(14,1,1),(31,1,0),(8,1,0),(32,1,0),(25,1,1),(15,1,1),(26,1,1)], (187,214) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(31,1,0),(8,1,0),(32,1,0),(25,1,0),(15,1,0),(26,1,0),(1,2,1),(17,2,1),(18,2,1),(21,2,1),(22,2,1),(14,2,1),(31,2,1),(8,2,1),(32,2,1),(25,2,1),(15,2,1),(26,2,1)], (188,215) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(31,2,0),(8,2,0),(32,2,0),(25,2,0),(15,2,0),(26,2,0)], (188,216) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(31,2,0),(8,2,0),(32,2,0),(25,2,0),(15,2,0),(26,2,0),(1,1,1),(17,1,1),(18,1,1),(21,1,1),(22,1,1),(14,1,1),(31,2,1),(8,2,1),(32,2,1),(25,2,1),(15,2,1),(26,2,1)], (188,217) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(31,2,1),(8,2,1),(32,2,1),(25,2,1),(15,2,1),(26,2,1)], (188,218) => MOP_CODE[(17,1,0),(18,1,0),(21,1,1),(22,1,1),(14,1,1),(31,2,1),(8,2,1),(32,2,1),(25,2,0),(15,2,0),(26,2,0)], (188,219) => MOP_CODE[(17,1,0),(18,1,0),(21,1,1),(22,1,1),(14,1,1),(31,2,0),(8,2,0),(32,2,0),(25,2,1),(15,2,1),(26,2,1)], (188,220) => MOP_CODE[(17,1,0),(18,1,0),(21,1,0),(22,1,0),(14,1,0),(31,2,0),(8,2,0),(32,2,0),(25,2,0),(15,2,0),(26,2,0),(1,2,1),(17,2,1),(18,2,1),(21,2,1),(22,2,1),(14,2,1),(31,1,1),(8,1,1),(32,1,1),(25,1,1),(15,1,1),(26,1,1)], (189,221) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(31,1,0),(8,1,0),(32,1,0),(27,1,0),(28,1,0),(16,1,0)], (189,222) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(31,1,0),(8,1,0),(32,1,0),(27,1,0),(28,1,0),(16,1,0),(1,1,1),(17,1,1),(18,1,1),(23,1,1),(13,1,1),(24,1,1),(31,1,1),(8,1,1),(32,1,1),(27,1,1),(28,1,1),(16,1,1)], (189,223) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1),(31,1,1),(8,1,1),(32,1,1),(27,1,0),(28,1,0),(16,1,0)], (189,224) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(31,1,1),(8,1,1),(32,1,1),(27,1,1),(28,1,1),(16,1,1)], (189,225) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1),(31,1,0),(8,1,0),(32,1,0),(27,1,1),(28,1,1),(16,1,1)], (189,226) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(31,1,0),(8,1,0),(32,1,0),(27,1,0),(28,1,0),(16,1,0),(1,2,1),(17,2,1),(18,2,1),(23,2,1),(13,2,1),(24,2,1),(31,2,1),(8,2,1),(32,2,1),(27,2,1),(28,2,1),(16,2,1)], (190,227) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(31,2,0),(8,2,0),(32,2,0),(27,2,0),(28,2,0),(16,2,0)], (190,228) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(31,2,0),(8,2,0),(32,2,0),(27,2,0),(28,2,0),(16,2,0),(1,1,1),(17,1,1),(18,1,1),(23,1,1),(13,1,1),(24,1,1),(31,2,1),(8,2,1),(32,2,1),(27,2,1),(28,2,1),(16,2,1)], (190,229) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1),(31,2,1),(8,2,1),(32,2,1),(27,2,0),(28,2,0),(16,2,0)], (190,230) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(31,2,1),(8,2,1),(32,2,1),(27,2,1),(28,2,1),(16,2,1)], (190,231) => MOP_CODE[(17,1,0),(18,1,0),(23,1,1),(13,1,1),(24,1,1),(31,2,0),(8,2,0),(32,2,0),(27,2,1),(28,2,1),(16,2,1)], (190,232) => MOP_CODE[(17,1,0),(18,1,0),(23,1,0),(13,1,0),(24,1,0),(31,2,0),(8,2,0),(32,2,0),(27,2,0),(28,2,0),(16,2,0),(1,2,1),(17,2,1),(18,2,1),(23,2,1),(13,2,1),(24,2,1),(31,1,1),(8,1,1),(32,1,1),(27,1,1),(28,1,1),(16,1,1)], (191,233) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,0),(13,1,0),(24,1,0),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(25,1,0),(15,1,0),(26,1,0),(27,1,0),(28,1,0),(16,1,0)], (191,234) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,0),(13,1,0),(24,1,0),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(25,1,0),(15,1,0),(26,1,0),(27,1,0),(28,1,0),(16,1,0),(1,1,1),(29,1,1),(17,1,1),(6,1,1),(18,1,1),(30,1,1),(23,1,1),(13,1,1),(24,1,1),(21,1,1),(22,1,1),(14,1,1),(2,1,1),(31,1,1),(19,1,1),(8,1,1),(20,1,1),(32,1,1),(25,1,1),(15,1,1),(26,1,1),(27,1,1),(28,1,1),(16,1,1)], (191,235) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,1),(13,1,1),(24,1,1),(21,1,1),(22,1,1),(14,1,1),(2,1,1),(31,1,1),(19,1,1),(8,1,1),(20,1,1),(32,1,1),(25,1,0),(15,1,0),(26,1,0),(27,1,0),(28,1,0),(16,1,0)], (191,236) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,1,0),(13,1,0),(24,1,0),(21,1,1),(22,1,1),(14,1,1),(2,1,1),(31,1,0),(19,1,1),(8,1,0),(20,1,1),(32,1,0),(25,1,1),(15,1,1),(26,1,1),(27,1,0),(28,1,0),(16,1,0)], (191,237) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,1,1),(13,1,1),(24,1,1),(21,1,0),(22,1,0),(14,1,0),(2,1,1),(31,1,0),(19,1,1),(8,1,0),(20,1,1),(32,1,0),(25,1,0),(15,1,0),(26,1,0),(27,1,1),(28,1,1),(16,1,1)], (191,238) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,1,1),(13,1,1),(24,1,1),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(31,1,1),(19,1,0),(8,1,1),(20,1,0),(32,1,1),(25,1,1),(15,1,1),(26,1,1),(27,1,0),(28,1,0),(16,1,0)], (191,239) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,1,0),(13,1,0),(24,1,0),(21,1,1),(22,1,1),(14,1,1),(2,1,0),(31,1,1),(19,1,0),(8,1,1),(20,1,0),(32,1,1),(25,1,0),(15,1,0),(26,1,0),(27,1,1),(28,1,1),(16,1,1)], (191,240) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,1),(13,1,1),(24,1,1),(21,1,1),(22,1,1),(14,1,1),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(25,1,1),(15,1,1),(26,1,1),(27,1,1),(28,1,1),(16,1,1)], (191,241) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,0),(13,1,0),(24,1,0),(21,1,0),(22,1,0),(14,1,0),(2,1,1),(31,1,1),(19,1,1),(8,1,1),(20,1,1),(32,1,1),(25,1,1),(15,1,1),(26,1,1),(27,1,1),(28,1,1),(16,1,1)], (191,242) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,1,0),(13,1,0),(24,1,0),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(25,1,0),(15,1,0),(26,1,0),(27,1,0),(28,1,0),(16,1,0),(1,2,1),(29,2,1),(17,2,1),(6,2,1),(18,2,1),(30,2,1),(23,2,1),(13,2,1),(24,2,1),(21,2,1),(22,2,1),(14,2,1),(2,2,1),(31,2,1),(19,2,1),(8,2,1),(20,2,1),(32,2,1),(25,2,1),(15,2,1),(26,2,1),(27,2,1),(28,2,1),(16,2,1)], (192,243) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,2,0),(13,2,0),(24,2,0),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(25,2,0),(15,2,0),(26,2,0),(27,2,0),(28,2,0),(16,2,0)], (192,244) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,2,0),(13,2,0),(24,2,0),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(25,2,0),(15,2,0),(26,2,0),(27,2,0),(28,2,0),(16,2,0),(1,1,1),(29,1,1),(17,1,1),(6,1,1),(18,1,1),(30,1,1),(23,2,1),(13,2,1),(24,2,1),(21,2,1),(22,2,1),(14,2,1),(2,1,1),(31,1,1),(19,1,1),(8,1,1),(20,1,1),(32,1,1),(25,2,1),(15,2,1),(26,2,1),(27,2,1),(28,2,1),(16,2,1)], (192,245) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,2,1),(13,2,1),(24,2,1),(21,2,1),(22,2,1),(14,2,1),(2,1,1),(31,1,1),(19,1,1),(8,1,1),(20,1,1),(32,1,1),(25,2,0),(15,2,0),(26,2,0),(27,2,0),(28,2,0),(16,2,0)], (192,246) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,2,0),(13,2,0),(24,2,0),(21,2,1),(22,2,1),(14,2,1),(2,1,1),(31,1,0),(19,1,1),(8,1,0),(20,1,1),(32,1,0),(25,2,1),(15,2,1),(26,2,1),(27,2,0),(28,2,0),(16,2,0)], (192,247) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,2,1),(13,2,1),(24,2,1),(21,2,0),(22,2,0),(14,2,0),(2,1,1),(31,1,0),(19,1,1),(8,1,0),(20,1,1),(32,1,0),(25,2,0),(15,2,0),(26,2,0),(27,2,1),(28,2,1),(16,2,1)], (192,248) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,2,1),(13,2,1),(24,2,1),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(31,1,1),(19,1,0),(8,1,1),(20,1,0),(32,1,1),(25,2,1),(15,2,1),(26,2,1),(27,2,0),(28,2,0),(16,2,0)], (192,249) => MOP_CODE[(29,1,1),(17,1,0),(6,1,1),(18,1,0),(30,1,1),(23,2,0),(13,2,0),(24,2,0),(21,2,1),(22,2,1),(14,2,1),(2,1,0),(31,1,1),(19,1,0),(8,1,1),(20,1,0),(32,1,1),(25,2,0),(15,2,0),(26,2,0),(27,2,1),(28,2,1),(16,2,1)], (192,250) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,2,1),(13,2,1),(24,2,1),(21,2,1),(22,2,1),(14,2,1),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(25,2,1),(15,2,1),(26,2,1),(27,2,1),(28,2,1),(16,2,1)], (192,251) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,2,0),(13,2,0),(24,2,0),(21,2,0),(22,2,0),(14,2,0),(2,1,1),(31,1,1),(19,1,1),(8,1,1),(20,1,1),(32,1,1),(25,2,1),(15,2,1),(26,2,1),(27,2,1),(28,2,1),(16,2,1)], (192,252) => MOP_CODE[(29,1,0),(17,1,0),(6,1,0),(18,1,0),(30,1,0),(23,2,0),(13,2,0),(24,2,0),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(31,1,0),(19,1,0),(8,1,0),(20,1,0),(32,1,0),(25,2,0),(15,2,0),(26,2,0),(27,2,0),(28,2,0),(16,2,0),(1,2,1),(29,2,1),(17,2,1),(6,2,1),(18,2,1),(30,2,1),(23,1,1),(13,1,1),(24,1,1),(21,1,1),(22,1,1),(14,1,1),(2,2,1),(31,2,1),(19,2,1),(8,2,1),(20,2,1),(32,2,1),(25,1,1),(15,1,1),(26,1,1),(27,1,1),(28,1,1),(16,1,1)], (193,253) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,2,0),(13,2,0),(24,2,0),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(25,2,0),(15,2,0),(26,2,0),(27,1,0),(28,1,0),(16,1,0)], (193,254) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,2,0),(13,2,0),(24,2,0),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(25,2,0),(15,2,0),(26,2,0),(27,1,0),(28,1,0),(16,1,0),(1,1,1),(29,2,1),(17,1,1),(6,2,1),(18,1,1),(30,2,1),(23,2,1),(13,2,1),(24,2,1),(21,1,1),(22,1,1),(14,1,1),(2,1,1),(31,2,1),(19,1,1),(8,2,1),(20,1,1),(32,2,1),(25,2,1),(15,2,1),(26,2,1),(27,1,1),(28,1,1),(16,1,1)], (193,255) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,2,1),(13,2,1),(24,2,1),(21,1,1),(22,1,1),(14,1,1),(2,1,1),(31,2,1),(19,1,1),(8,2,1),(20,1,1),(32,2,1),(25,2,0),(15,2,0),(26,2,0),(27,1,0),(28,1,0),(16,1,0)], (193,256) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,2,0),(13,2,0),(24,2,0),(21,1,1),(22,1,1),(14,1,1),(2,1,1),(31,2,0),(19,1,1),(8,2,0),(20,1,1),(32,2,0),(25,2,1),(15,2,1),(26,2,1),(27,1,0),(28,1,0),(16,1,0)], (193,257) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,2,1),(13,2,1),(24,2,1),(21,1,0),(22,1,0),(14,1,0),(2,1,1),(31,2,0),(19,1,1),(8,2,0),(20,1,1),(32,2,0),(25,2,0),(15,2,0),(26,2,0),(27,1,1),(28,1,1),(16,1,1)], (193,258) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,2,1),(13,2,1),(24,2,1),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(31,2,1),(19,1,0),(8,2,1),(20,1,0),(32,2,1),(25,2,1),(15,2,1),(26,2,1),(27,1,0),(28,1,0),(16,1,0)], (193,259) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,2,0),(13,2,0),(24,2,0),(21,1,1),(22,1,1),(14,1,1),(2,1,0),(31,2,1),(19,1,0),(8,2,1),(20,1,0),(32,2,1),(25,2,0),(15,2,0),(26,2,0),(27,1,1),(28,1,1),(16,1,1)], (193,260) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,2,1),(13,2,1),(24,2,1),(21,1,1),(22,1,1),(14,1,1),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(25,2,1),(15,2,1),(26,2,1),(27,1,1),(28,1,1),(16,1,1)], (193,261) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,2,0),(13,2,0),(24,2,0),(21,1,0),(22,1,0),(14,1,0),(2,1,1),(31,2,1),(19,1,1),(8,2,1),(20,1,1),(32,2,1),(25,2,1),(15,2,1),(26,2,1),(27,1,1),(28,1,1),(16,1,1)], (193,262) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,2,0),(13,2,0),(24,2,0),(21,1,0),(22,1,0),(14,1,0),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(25,2,0),(15,2,0),(26,2,0),(27,1,0),(28,1,0),(16,1,0),(1,2,1),(29,1,1),(17,2,1),(6,1,1),(18,2,1),(30,1,1),(23,1,1),(13,1,1),(24,1,1),(21,2,1),(22,2,1),(14,2,1),(2,2,1),(31,1,1),(19,2,1),(8,1,1),(20,2,1),(32,1,1),(25,1,1),(15,1,1),(26,1,1),(27,2,1),(28,2,1),(16,2,1)], (194,263) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,0),(13,1,0),(24,1,0),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(25,1,0),(15,1,0),(26,1,0),(27,2,0),(28,2,0),(16,2,0)], (194,264) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,0),(13,1,0),(24,1,0),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(25,1,0),(15,1,0),(26,1,0),(27,2,0),(28,2,0),(16,2,0),(1,1,1),(29,2,1),(17,1,1),(6,2,1),(18,1,1),(30,2,1),(23,1,1),(13,1,1),(24,1,1),(21,2,1),(22,2,1),(14,2,1),(2,1,1),(31,2,1),(19,1,1),(8,2,1),(20,1,1),(32,2,1),(25,1,1),(15,1,1),(26,1,1),(27,2,1),(28,2,1),(16,2,1)], (194,265) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,1),(13,1,1),(24,1,1),(21,2,1),(22,2,1),(14,2,1),(2,1,1),(31,2,1),(19,1,1),(8,2,1),(20,1,1),(32,2,1),(25,1,0),(15,1,0),(26,1,0),(27,2,0),(28,2,0),(16,2,0)], (194,266) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,1,0),(13,1,0),(24,1,0),(21,2,1),(22,2,1),(14,2,1),(2,1,1),(31,2,0),(19,1,1),(8,2,0),(20,1,1),(32,2,0),(25,1,1),(15,1,1),(26,1,1),(27,2,0),(28,2,0),(16,2,0)], (194,267) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,1,1),(13,1,1),(24,1,1),(21,2,0),(22,2,0),(14,2,0),(2,1,1),(31,2,0),(19,1,1),(8,2,0),(20,1,1),(32,2,0),(25,1,0),(15,1,0),(26,1,0),(27,2,1),(28,2,1),(16,2,1)], (194,268) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,1,1),(13,1,1),(24,1,1),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(31,2,1),(19,1,0),(8,2,1),(20,1,0),(32,2,1),(25,1,1),(15,1,1),(26,1,1),(27,2,0),(28,2,0),(16,2,0)], (194,269) => MOP_CODE[(29,2,1),(17,1,0),(6,2,1),(18,1,0),(30,2,1),(23,1,0),(13,1,0),(24,1,0),(21,2,1),(22,2,1),(14,2,1),(2,1,0),(31,2,1),(19,1,0),(8,2,1),(20,1,0),(32,2,1),(25,1,0),(15,1,0),(26,1,0),(27,2,1),(28,2,1),(16,2,1)], (194,270) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,1),(13,1,1),(24,1,1),(21,2,1),(22,2,1),(14,2,1),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(25,1,1),(15,1,1),(26,1,1),(27,2,1),(28,2,1),(16,2,1)], (194,271) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,0),(13,1,0),(24,1,0),(21,2,0),(22,2,0),(14,2,0),(2,1,1),(31,2,1),(19,1,1),(8,2,1),(20,1,1),(32,2,1),(25,1,1),(15,1,1),(26,1,1),(27,2,1),(28,2,1),(16,2,1)], (194,272) => MOP_CODE[(29,2,0),(17,1,0),(6,2,0),(18,1,0),(30,2,0),(23,1,0),(13,1,0),(24,1,0),(21,2,0),(22,2,0),(14,2,0),(2,1,0),(31,2,0),(19,1,0),(8,2,0),(20,1,0),(32,2,0),(25,1,0),(15,1,0),(26,1,0),(27,2,0),(28,2,0),(16,2,0),(1,2,1),(29,1,1),(17,2,1),(6,1,1),(18,2,1),(30,1,1),(23,2,1),(13,2,1),(24,2,1),(21,1,1),(22,1,1),(14,1,1),(2,2,1),(31,1,1),(19,2,1),(8,1,1),(20,2,1),(32,1,1),(25,2,1),(15,2,1),(26,2,1),(27,1,1),(28,1,1),(16,1,1)], (195,1) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (195,2) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1)], (195,3) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,8,1),(5,8,1),(3,8,1),(6,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1)], (196,4) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (196,5) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1)], (196,6) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,2,1),(5,8,1),(3,8,1),(6,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1)], (197,7) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (197,8) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1)], (198,9) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0)], (198,10) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(1,1,1),(5,5,1),(3,7,1),(6,6,1),(33,1,1),(34,1,1),(35,7,1),(36,6,1),(37,6,1),(38,5,1),(39,5,1),(40,7,1)], (198,11) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(1,8,1),(5,2,1),(3,3,1),(6,4,1),(33,8,1),(34,8,1),(35,3,1),(36,4,1),(37,4,1),(38,2,1),(39,2,1),(40,3,1)], (199,12) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0)], (199,13) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(1,1,1),(5,2,1),(3,3,1),(6,4,1),(33,1,1),(34,1,1),(35,3,1),(36,4,1),(37,4,1),(38,2,1),(39,2,1),(40,3,1)], (200,14) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (200,15) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(2,1,1),(7,1,1),(4,1,1),(8,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (200,16) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(7,1,1),(4,1,1),(8,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (200,17) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,8,1),(5,8,1),(3,8,1),(6,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(2,8,1),(7,8,1),(4,8,1),(8,8,1),(41,8,1),(42,8,1),(43,8,1),(44,8,1),(45,8,1),(46,8,1),(47,8,1),(48,8,1)], (201,18) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(7,7,0),(4,6,0),(8,5,0),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0)], (201,19) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(7,7,0),(4,6,0),(8,5,0),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0),(1,1,1),(5,7,1),(3,6,1),(6,5,1),(33,1,1),(34,1,1),(35,6,1),(36,5,1),(37,5,1),(38,7,1),(39,7,1),(40,6,1),(2,1,1),(7,7,1),(4,6,1),(8,5,1),(41,1,1),(42,1,1),(43,6,1),(44,5,1),(45,5,1),(46,7,1),(47,7,1),(48,6,1)], (201,20) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,1),(7,7,1),(4,6,1),(8,5,1),(41,1,1),(42,1,1),(43,6,1),(44,5,1),(45,5,1),(46,7,1),(47,7,1),(48,6,1)], (201,21) => MOP_CODE[(5,7,0),(3,6,0),(6,5,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(7,7,0),(4,6,0),(8,5,0),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0),(1,8,1),(5,3,1),(3,4,1),(6,2,1),(33,8,1),(34,8,1),(35,4,1),(36,2,1),(37,2,1),(38,3,1),(39,3,1),(40,4,1),(2,8,1),(7,3,1),(4,4,1),(8,2,1),(41,8,1),(42,8,1),(43,4,1),(44,2,1),(45,2,1),(46,3,1),(47,3,1),(48,4,1)], (202,22) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (202,23) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(2,1,1),(7,1,1),(4,1,1),(8,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (202,24) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(7,1,1),(4,1,1),(8,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (202,25) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,2,1),(5,8,1),(3,8,1),(6,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(2,8,1),(7,8,1),(4,8,1),(8,8,1),(41,8,1),(42,8,1),(43,8,1),(44,8,1),(45,8,1),(46,8,1),(47,8,1),(48,8,1)], (203,26) => MOP_CODE[(5,11,0),(3,12,0),(6,13,0),(33,1,0),(34,1,0),(35,12,0),(36,13,0),(37,13,0),(38,11,0),(39,11,0),(40,12,0),(2,1,0),(7,14,0),(4,15,0),(8,16,0),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0)], (203,27) => MOP_CODE[(5,11,0),(3,12,0),(6,13,0),(33,1,0),(34,1,0),(35,12,0),(36,13,0),(37,13,0),(38,11,0),(39,11,0),(40,12,0),(2,1,0),(7,14,0),(4,15,0),(8,16,0),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0),(1,1,1),(5,11,1),(3,12,1),(6,13,1),(33,1,1),(34,1,1),(35,12,1),(36,13,1),(37,13,1),(38,11,1),(39,11,1),(40,12,1),(2,1,1),(7,14,1),(4,15,1),(8,16,1),(41,1,1),(42,1,1),(43,15,1),(44,16,1),(45,16,1),(46,14,1),(47,14,1),(48,15,1)], (203,28) => MOP_CODE[(5,11,0),(3,12,0),(6,13,0),(33,1,0),(34,1,0),(35,12,0),(36,13,0),(37,13,0),(38,11,0),(39,11,0),(40,12,0),(2,1,1),(7,14,1),(4,15,1),(8,16,1),(41,1,1),(42,1,1),(43,15,1),(44,16,1),(45,16,1),(46,14,1),(47,14,1),(48,15,1)], (203,29) => MOP_CODE[(5,11,0),(3,12,0),(6,13,0),(33,1,0),(34,1,0),(35,12,0),(36,13,0),(37,13,0),(38,11,0),(39,11,0),(40,12,0),(2,1,0),(7,14,0),(4,15,0),(8,16,0),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0),(1,2,1),(5,17,1),(3,18,1),(6,19,1),(33,8,1),(34,8,1),(35,18,1),(36,19,1),(37,19,1),(38,17,1),(39,17,1),(40,18,1),(2,8,1),(7,20,1),(4,21,1),(8,22,1),(41,8,1),(42,8,1),(43,21,1),(44,22,1),(45,22,1),(46,20,1),(47,20,1),(48,21,1)], (204,30) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (204,31) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(7,1,0),(4,1,0),(8,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(2,1,1),(7,1,1),(4,1,1),(8,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (204,32) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(7,1,1),(4,1,1),(8,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (205,33) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(2,1,0),(7,5,0),(4,7,0),(8,6,0),(41,1,0),(42,1,0),(43,7,0),(44,6,0),(45,6,0),(46,5,0),(47,5,0),(48,7,0)], (205,34) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(2,1,0),(7,5,0),(4,7,0),(8,6,0),(41,1,0),(42,1,0),(43,7,0),(44,6,0),(45,6,0),(46,5,0),(47,5,0),(48,7,0),(1,1,1),(5,5,1),(3,7,1),(6,6,1),(33,1,1),(34,1,1),(35,7,1),(36,6,1),(37,6,1),(38,5,1),(39,5,1),(40,7,1),(2,1,1),(7,5,1),(4,7,1),(8,6,1),(41,1,1),(42,1,1),(43,7,1),(44,6,1),(45,6,1),(46,5,1),(47,5,1),(48,7,1)], (205,35) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(2,1,1),(7,5,1),(4,7,1),(8,6,1),(41,1,1),(42,1,1),(43,7,1),(44,6,1),(45,6,1),(46,5,1),(47,5,1),(48,7,1)], (205,36) => MOP_CODE[(5,5,0),(3,7,0),(6,6,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(2,1,0),(7,5,0),(4,7,0),(8,6,0),(41,1,0),(42,1,0),(43,7,0),(44,6,0),(45,6,0),(46,5,0),(47,5,0),(48,7,0),(1,8,1),(5,2,1),(3,3,1),(6,4,1),(33,8,1),(34,8,1),(35,3,1),(36,4,1),(37,4,1),(38,2,1),(39,2,1),(40,3,1),(2,8,1),(7,2,1),(4,3,1),(8,4,1),(41,8,1),(42,8,1),(43,3,1),(44,4,1),(45,4,1),(46,2,1),(47,2,1),(48,3,1)], (206,37) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(2,1,0),(7,2,0),(4,3,0),(8,4,0),(41,1,0),(42,1,0),(43,3,0),(44,4,0),(45,4,0),(46,2,0),(47,2,0),(48,3,0)], (206,38) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(2,1,0),(7,2,0),(4,3,0),(8,4,0),(41,1,0),(42,1,0),(43,3,0),(44,4,0),(45,4,0),(46,2,0),(47,2,0),(48,3,0),(1,1,1),(5,2,1),(3,3,1),(6,4,1),(33,1,1),(34,1,1),(35,3,1),(36,4,1),(37,4,1),(38,2,1),(39,2,1),(40,3,1),(2,1,1),(7,2,1),(4,3,1),(8,4,1),(41,1,1),(42,1,1),(43,3,1),(44,4,1),(45,4,1),(46,2,1),(47,2,1),(48,3,1)], (206,39) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(2,1,1),(7,2,1),(4,3,1),(8,4,1),(41,1,1),(42,1,1),(43,3,1),(44,4,1),(45,4,1),(46,2,1),(47,2,1),(48,3,1)], (207,40) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (207,41) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,1,1),(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1)], (207,42) => MOP_CODE[(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (207,43) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,8,1),(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,8,1),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1)], (208,44) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (208,45) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,1,1),(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,1,1),(3,1,1),(6,1,1),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1)], (208,46) => MOP_CODE[(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,1,0),(3,1,0),(6,1,0),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (208,47) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,8,1),(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,8,1),(3,8,1),(6,8,1),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1)], (209,48) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (209,49) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,1,1),(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1)], (209,50) => MOP_CODE[(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (209,51) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,2,1),(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,8,1),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1)], (210,52) => MOP_CODE[(49,9,0),(50,9,0),(51,9,0),(52,9,0),(9,9,0),(10,9,0),(5,1,0),(3,1,0),(6,1,0),(13,9,0),(14,9,0),(53,9,0),(54,9,0),(55,9,0),(56,9,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (210,53) => MOP_CODE[(49,9,0),(50,9,0),(51,9,0),(52,9,0),(9,9,0),(10,9,0),(5,1,0),(3,1,0),(6,1,0),(13,9,0),(14,9,0),(53,9,0),(54,9,0),(55,9,0),(56,9,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,1,1),(49,9,1),(50,9,1),(51,9,1),(52,9,1),(9,9,1),(10,9,1),(5,1,1),(3,1,1),(6,1,1),(13,9,1),(14,9,1),(53,9,1),(54,9,1),(55,9,1),(56,9,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1)], (210,54) => MOP_CODE[(49,9,1),(50,9,1),(51,9,1),(52,9,1),(9,9,1),(10,9,1),(5,1,0),(3,1,0),(6,1,0),(13,9,1),(14,9,1),(53,9,1),(54,9,1),(55,9,1),(56,9,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (210,55) => MOP_CODE[(49,9,0),(50,9,0),(51,9,0),(52,9,0),(9,9,0),(10,9,0),(5,1,0),(3,1,0),(6,1,0),(13,9,0),(14,9,0),(53,9,0),(54,9,0),(55,9,0),(56,9,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,2,1),(49,10,1),(50,10,1),(51,10,1),(52,10,1),(9,10,1),(10,10,1),(5,8,1),(3,8,1),(6,8,1),(13,10,1),(14,10,1),(53,10,1),(54,10,1),(55,10,1),(56,10,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1)], (211,56) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (211,57) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(1,1,1),(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1)], (211,58) => MOP_CODE[(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0)], (212,59) => MOP_CODE[(49,32,0),(50,30,0),(51,30,0),(52,33,0),(9,33,0),(10,32,0),(5,5,0),(3,7,0),(6,6,0),(13,30,0),(14,9,0),(53,33,0),(54,9,0),(55,32,0),(56,9,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0)], (212,60) => MOP_CODE[(49,32,0),(50,30,0),(51,30,0),(52,33,0),(9,33,0),(10,32,0),(5,5,0),(3,7,0),(6,6,0),(13,30,0),(14,9,0),(53,33,0),(54,9,0),(55,32,0),(56,9,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(1,1,1),(49,32,1),(50,30,1),(51,30,1),(52,33,1),(9,33,1),(10,32,1),(5,5,1),(3,7,1),(6,6,1),(13,30,1),(14,9,1),(53,33,1),(54,9,1),(55,32,1),(56,9,1),(33,1,1),(34,1,1),(35,7,1),(36,6,1),(37,6,1),(38,5,1),(39,5,1),(40,7,1)], (212,61) => MOP_CODE[(49,32,1),(50,30,1),(51,30,1),(52,33,1),(9,33,1),(10,32,1),(5,5,0),(3,7,0),(6,6,0),(13,30,1),(14,9,1),(53,33,1),(54,9,1),(55,32,1),(56,9,1),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0)], (212,62) => MOP_CODE[(49,32,0),(50,30,0),(51,30,0),(52,33,0),(9,33,0),(10,32,0),(5,5,0),(3,7,0),(6,6,0),(13,30,0),(14,9,0),(53,33,0),(54,9,0),(55,32,0),(56,9,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(1,8,1),(49,34,1),(50,29,1),(51,29,1),(52,31,1),(9,31,1),(10,34,1),(5,2,1),(3,3,1),(6,4,1),(13,29,1),(14,10,1),(53,31,1),(54,10,1),(55,34,1),(56,10,1),(33,8,1),(34,8,1),(35,3,1),(36,4,1),(37,4,1),(38,2,1),(39,2,1),(40,3,1)], (213,63) => MOP_CODE[(49,34,0),(50,29,0),(51,29,0),(52,31,0),(9,31,0),(10,34,0),(5,5,0),(3,7,0),(6,6,0),(13,29,0),(14,10,0),(53,31,0),(54,10,0),(55,34,0),(56,10,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0)], (213,64) => MOP_CODE[(49,34,0),(50,29,0),(51,29,0),(52,31,0),(9,31,0),(10,34,0),(5,5,0),(3,7,0),(6,6,0),(13,29,0),(14,10,0),(53,31,0),(54,10,0),(55,34,0),(56,10,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(1,1,1),(49,34,1),(50,29,1),(51,29,1),(52,31,1),(9,31,1),(10,34,1),(5,5,1),(3,7,1),(6,6,1),(13,29,1),(14,10,1),(53,31,1),(54,10,1),(55,34,1),(56,10,1),(33,1,1),(34,1,1),(35,7,1),(36,6,1),(37,6,1),(38,5,1),(39,5,1),(40,7,1)], (213,65) => MOP_CODE[(49,34,1),(50,29,1),(51,29,1),(52,31,1),(9,31,1),(10,34,1),(5,5,0),(3,7,0),(6,6,0),(13,29,1),(14,10,1),(53,31,1),(54,10,1),(55,34,1),(56,10,1),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0)], (213,66) => MOP_CODE[(49,34,0),(50,29,0),(51,29,0),(52,31,0),(9,31,0),(10,34,0),(5,5,0),(3,7,0),(6,6,0),(13,29,0),(14,10,0),(53,31,0),(54,10,0),(55,34,0),(56,10,0),(33,1,0),(34,1,0),(35,7,0),(36,6,0),(37,6,0),(38,5,0),(39,5,0),(40,7,0),(1,8,1),(49,32,1),(50,30,1),(51,30,1),(52,33,1),(9,33,1),(10,32,1),(5,2,1),(3,3,1),(6,4,1),(13,30,1),(14,9,1),(53,33,1),(54,9,1),(55,32,1),(56,9,1),(33,8,1),(34,8,1),(35,3,1),(36,4,1),(37,4,1),(38,2,1),(39,2,1),(40,3,1)], (214,67) => MOP_CODE[(49,34,0),(50,29,0),(51,29,0),(52,31,0),(9,31,0),(10,34,0),(5,2,0),(3,3,0),(6,4,0),(13,29,0),(14,9,0),(53,31,0),(54,9,0),(55,34,0),(56,9,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0)], (214,68) => MOP_CODE[(49,34,0),(50,29,0),(51,29,0),(52,31,0),(9,31,0),(10,34,0),(5,2,0),(3,3,0),(6,4,0),(13,29,0),(14,9,0),(53,31,0),(54,9,0),(55,34,0),(56,9,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(1,1,1),(49,34,1),(50,29,1),(51,29,1),(52,31,1),(9,31,1),(10,34,1),(5,2,1),(3,3,1),(6,4,1),(13,29,1),(14,9,1),(53,31,1),(54,9,1),(55,34,1),(56,9,1),(33,1,1),(34,1,1),(35,3,1),(36,4,1),(37,4,1),(38,2,1),(39,2,1),(40,3,1)], (214,69) => MOP_CODE[(49,34,1),(50,29,1),(51,29,1),(52,31,1),(9,31,1),(10,34,1),(5,2,0),(3,3,0),(6,4,0),(13,29,1),(14,9,1),(53,31,1),(54,9,1),(55,34,1),(56,9,1),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0)], (215,70) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0)], (215,71) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1)], (215,72) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1)], (215,73) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(1,8,1),(5,8,1),(3,8,1),(6,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1)], (216,74) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0)], (216,75) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1)], (216,76) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1)], (216,77) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(1,2,1),(5,8,1),(3,8,1),(6,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1)], (217,78) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0)], (217,79) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1)], (217,80) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1)], (218,81) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0)], (218,82) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1)], (218,83) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1)], (218,84) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(1,8,1),(5,8,1),(3,8,1),(6,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1)], (219,85) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0)], (219,86) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(1,1,1),(5,1,1),(3,1,1),(6,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1)], (219,87) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1)], (219,88) => MOP_CODE[(5,1,0),(3,1,0),(6,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(1,2,1),(5,8,1),(3,8,1),(6,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1)], (220,89) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(57,34,0),(58,29,0),(59,29,0),(60,31,0),(11,31,0),(12,34,0),(15,29,0),(16,9,0),(61,31,0),(62,9,0),(63,34,0),(64,9,0)], (220,90) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(57,34,0),(58,29,0),(59,29,0),(60,31,0),(11,31,0),(12,34,0),(15,29,0),(16,9,0),(61,31,0),(62,9,0),(63,34,0),(64,9,0),(1,1,1),(5,2,1),(3,3,1),(6,4,1),(33,1,1),(34,1,1),(35,3,1),(36,4,1),(37,4,1),(38,2,1),(39,2,1),(40,3,1),(57,34,1),(58,29,1),(59,29,1),(60,31,1),(11,31,1),(12,34,1),(15,29,1),(16,9,1),(61,31,1),(62,9,1),(63,34,1),(64,9,1)], (220,91) => MOP_CODE[(5,2,0),(3,3,0),(6,4,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(57,34,1),(58,29,1),(59,29,1),(60,31,1),(11,31,1),(12,34,1),(15,29,1),(16,9,1),(61,31,1),(62,9,1),(63,34,1),(64,9,1)], (221,92) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (221,93) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,1,1),(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(2,1,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (221,94) => MOP_CODE[(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,1),(4,1,1),(8,1,1),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (221,95) => MOP_CODE[(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,1,0),(4,1,0),(8,1,0),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (221,96) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (221,97) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,8,1),(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,8,1),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(2,8,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(7,8,1),(4,8,1),(8,8,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1),(41,8,1),(42,8,1),(43,8,1),(44,8,1),(45,8,1),(46,8,1),(47,8,1),(48,8,1)], (222,98) => MOP_CODE[(49,4,0),(50,2,0),(51,2,0),(52,3,0),(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(53,3,0),(54,8,0),(55,4,0),(56,8,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(57,4,0),(58,2,0),(59,2,0),(60,3,0),(11,3,0),(12,4,0),(7,7,0),(4,6,0),(8,5,0),(15,2,0),(16,8,0),(61,3,0),(62,8,0),(63,4,0),(64,8,0),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0)], (222,99) => MOP_CODE[(49,4,0),(50,2,0),(51,2,0),(52,3,0),(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(53,3,0),(54,8,0),(55,4,0),(56,8,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(57,4,0),(58,2,0),(59,2,0),(60,3,0),(11,3,0),(12,4,0),(7,7,0),(4,6,0),(8,5,0),(15,2,0),(16,8,0),(61,3,0),(62,8,0),(63,4,0),(64,8,0),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0),(1,1,1),(49,4,1),(50,2,1),(51,2,1),(52,3,1),(9,3,1),(10,4,1),(5,7,1),(3,6,1),(6,5,1),(13,2,1),(14,8,1),(53,3,1),(54,8,1),(55,4,1),(56,8,1),(33,1,1),(34,1,1),(35,6,1),(36,5,1),(37,5,1),(38,7,1),(39,7,1),(40,6,1),(2,1,1),(57,4,1),(58,2,1),(59,2,1),(60,3,1),(11,3,1),(12,4,1),(7,7,1),(4,6,1),(8,5,1),(15,2,1),(16,8,1),(61,3,1),(62,8,1),(63,4,1),(64,8,1),(41,1,1),(42,1,1),(43,6,1),(44,5,1),(45,5,1),(46,7,1),(47,7,1),(48,6,1)], (222,100) => MOP_CODE[(49,4,1),(50,2,1),(51,2,1),(52,3,1),(9,3,1),(10,4,1),(5,7,0),(3,6,0),(6,5,0),(13,2,1),(14,8,1),(53,3,1),(54,8,1),(55,4,1),(56,8,1),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,1),(57,4,0),(58,2,0),(59,2,0),(60,3,0),(11,3,0),(12,4,0),(7,7,1),(4,6,1),(8,5,1),(15,2,0),(16,8,0),(61,3,0),(62,8,0),(63,4,0),(64,8,0),(41,1,1),(42,1,1),(43,6,1),(44,5,1),(45,5,1),(46,7,1),(47,7,1),(48,6,1)], (222,101) => MOP_CODE[(49,4,1),(50,2,1),(51,2,1),(52,3,1),(9,3,1),(10,4,1),(5,7,0),(3,6,0),(6,5,0),(13,2,1),(14,8,1),(53,3,1),(54,8,1),(55,4,1),(56,8,1),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(57,4,1),(58,2,1),(59,2,1),(60,3,1),(11,3,1),(12,4,1),(7,7,0),(4,6,0),(8,5,0),(15,2,1),(16,8,1),(61,3,1),(62,8,1),(63,4,1),(64,8,1),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0)], (222,102) => MOP_CODE[(49,4,0),(50,2,0),(51,2,0),(52,3,0),(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(53,3,0),(54,8,0),(55,4,0),(56,8,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,1),(57,4,1),(58,2,1),(59,2,1),(60,3,1),(11,3,1),(12,4,1),(7,7,1),(4,6,1),(8,5,1),(15,2,1),(16,8,1),(61,3,1),(62,8,1),(63,4,1),(64,8,1),(41,1,1),(42,1,1),(43,6,1),(44,5,1),(45,5,1),(46,7,1),(47,7,1),(48,6,1)], (222,103) => MOP_CODE[(49,4,0),(50,2,0),(51,2,0),(52,3,0),(9,3,0),(10,4,0),(5,7,0),(3,6,0),(6,5,0),(13,2,0),(14,8,0),(53,3,0),(54,8,0),(55,4,0),(56,8,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(57,4,0),(58,2,0),(59,2,0),(60,3,0),(11,3,0),(12,4,0),(7,7,0),(4,6,0),(8,5,0),(15,2,0),(16,8,0),(61,3,0),(62,8,0),(63,4,0),(64,8,0),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0),(1,8,1),(49,6,1),(50,5,1),(51,5,1),(52,7,1),(9,7,1),(10,6,1),(5,3,1),(3,4,1),(6,2,1),(13,5,1),(14,1,1),(53,7,1),(54,1,1),(55,6,1),(56,1,1),(33,8,1),(34,8,1),(35,4,1),(36,2,1),(37,2,1),(38,3,1),(39,3,1),(40,4,1),(2,8,1),(57,6,1),(58,5,1),(59,5,1),(60,7,1),(11,7,1),(12,6,1),(7,3,1),(4,4,1),(8,2,1),(15,5,1),(16,1,1),(61,7,1),(62,1,1),(63,6,1),(64,1,1),(41,8,1),(42,8,1),(43,4,1),(44,2,1),(45,2,1),(46,3,1),(47,3,1),(48,4,1)], (223,104) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(7,1,0),(4,1,0),(8,1,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (223,105) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(7,1,0),(4,1,0),(8,1,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,1,1),(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,1,1),(3,1,1),(6,1,1),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(2,1,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(7,1,1),(4,1,1),(8,1,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (223,106) => MOP_CODE[(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,1,0),(3,1,0),(6,1,0),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(7,1,1),(4,1,1),(8,1,1),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (223,107) => MOP_CODE[(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,1,0),(3,1,0),(6,1,0),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(7,1,0),(4,1,0),(8,1,0),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (223,108) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(7,1,1),(4,1,1),(8,1,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (223,109) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(7,1,0),(4,1,0),(8,1,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,8,1),(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,8,1),(3,8,1),(6,8,1),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(2,8,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,8,1),(4,8,1),(8,8,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,8,1),(42,8,1),(43,8,1),(44,8,1),(45,8,1),(46,8,1),(47,8,1),(48,8,1)], (224,110) => MOP_CODE[(49,6,0),(50,5,0),(51,5,0),(52,7,0),(9,7,0),(10,6,0),(5,7,0),(3,6,0),(6,5,0),(13,5,0),(14,1,0),(53,7,0),(54,1,0),(55,6,0),(56,1,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(57,6,0),(58,5,0),(59,5,0),(60,7,0),(11,7,0),(12,6,0),(7,7,0),(4,6,0),(8,5,0),(15,5,0),(16,1,0),(61,7,0),(62,1,0),(63,6,0),(64,1,0),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0)], (224,111) => MOP_CODE[(49,6,0),(50,5,0),(51,5,0),(52,7,0),(9,7,0),(10,6,0),(5,7,0),(3,6,0),(6,5,0),(13,5,0),(14,1,0),(53,7,0),(54,1,0),(55,6,0),(56,1,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(57,6,0),(58,5,0),(59,5,0),(60,7,0),(11,7,0),(12,6,0),(7,7,0),(4,6,0),(8,5,0),(15,5,0),(16,1,0),(61,7,0),(62,1,0),(63,6,0),(64,1,0),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0),(1,1,1),(49,6,1),(50,5,1),(51,5,1),(52,7,1),(9,7,1),(10,6,1),(5,7,1),(3,6,1),(6,5,1),(13,5,1),(14,1,1),(53,7,1),(54,1,1),(55,6,1),(56,1,1),(33,1,1),(34,1,1),(35,6,1),(36,5,1),(37,5,1),(38,7,1),(39,7,1),(40,6,1),(2,1,1),(57,6,1),(58,5,1),(59,5,1),(60,7,1),(11,7,1),(12,6,1),(7,7,1),(4,6,1),(8,5,1),(15,5,1),(16,1,1),(61,7,1),(62,1,1),(63,6,1),(64,1,1),(41,1,1),(42,1,1),(43,6,1),(44,5,1),(45,5,1),(46,7,1),(47,7,1),(48,6,1)], (224,112) => MOP_CODE[(49,6,1),(50,5,1),(51,5,1),(52,7,1),(9,7,1),(10,6,1),(5,7,0),(3,6,0),(6,5,0),(13,5,1),(14,1,1),(53,7,1),(54,1,1),(55,6,1),(56,1,1),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,1),(57,6,0),(58,5,0),(59,5,0),(60,7,0),(11,7,0),(12,6,0),(7,7,1),(4,6,1),(8,5,1),(15,5,0),(16,1,0),(61,7,0),(62,1,0),(63,6,0),(64,1,0),(41,1,1),(42,1,1),(43,6,1),(44,5,1),(45,5,1),(46,7,1),(47,7,1),(48,6,1)], (224,113) => MOP_CODE[(49,6,1),(50,5,1),(51,5,1),(52,7,1),(9,7,1),(10,6,1),(5,7,0),(3,6,0),(6,5,0),(13,5,1),(14,1,1),(53,7,1),(54,1,1),(55,6,1),(56,1,1),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(57,6,1),(58,5,1),(59,5,1),(60,7,1),(11,7,1),(12,6,1),(7,7,0),(4,6,0),(8,5,0),(15,5,1),(16,1,1),(61,7,1),(62,1,1),(63,6,1),(64,1,1),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0)], (224,114) => MOP_CODE[(49,6,0),(50,5,0),(51,5,0),(52,7,0),(9,7,0),(10,6,0),(5,7,0),(3,6,0),(6,5,0),(13,5,0),(14,1,0),(53,7,0),(54,1,0),(55,6,0),(56,1,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,1),(57,6,1),(58,5,1),(59,5,1),(60,7,1),(11,7,1),(12,6,1),(7,7,1),(4,6,1),(8,5,1),(15,5,1),(16,1,1),(61,7,1),(62,1,1),(63,6,1),(64,1,1),(41,1,1),(42,1,1),(43,6,1),(44,5,1),(45,5,1),(46,7,1),(47,7,1),(48,6,1)], (224,115) => MOP_CODE[(49,6,0),(50,5,0),(51,5,0),(52,7,0),(9,7,0),(10,6,0),(5,7,0),(3,6,0),(6,5,0),(13,5,0),(14,1,0),(53,7,0),(54,1,0),(55,6,0),(56,1,0),(33,1,0),(34,1,0),(35,6,0),(36,5,0),(37,5,0),(38,7,0),(39,7,0),(40,6,0),(2,1,0),(57,6,0),(58,5,0),(59,5,0),(60,7,0),(11,7,0),(12,6,0),(7,7,0),(4,6,0),(8,5,0),(15,5,0),(16,1,0),(61,7,0),(62,1,0),(63,6,0),(64,1,0),(41,1,0),(42,1,0),(43,6,0),(44,5,0),(45,5,0),(46,7,0),(47,7,0),(48,6,0),(1,8,1),(49,4,1),(50,2,1),(51,2,1),(52,3,1),(9,3,1),(10,4,1),(5,3,1),(3,4,1),(6,2,1),(13,2,1),(14,8,1),(53,3,1),(54,8,1),(55,4,1),(56,8,1),(33,8,1),(34,8,1),(35,4,1),(36,2,1),(37,2,1),(38,3,1),(39,3,1),(40,4,1),(2,8,1),(57,4,1),(58,2,1),(59,2,1),(60,3,1),(11,3,1),(12,4,1),(7,3,1),(4,4,1),(8,2,1),(15,2,1),(16,8,1),(61,3,1),(62,8,1),(63,4,1),(64,8,1),(41,8,1),(42,8,1),(43,4,1),(44,2,1),(45,2,1),(46,3,1),(47,3,1),(48,4,1)], (225,116) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (225,117) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,1,1),(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(2,1,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (225,118) => MOP_CODE[(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,1),(4,1,1),(8,1,1),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (225,119) => MOP_CODE[(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,1,0),(4,1,0),(8,1,0),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (225,120) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (225,121) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,2,1),(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,8,1),(3,8,1),(6,8,1),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(2,8,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(7,8,1),(4,8,1),(8,8,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1),(41,8,1),(42,8,1),(43,8,1),(44,8,1),(45,8,1),(46,8,1),(47,8,1),(48,8,1)], (226,122) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(7,1,0),(4,1,0),(8,1,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (226,123) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(7,1,0),(4,1,0),(8,1,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,1,1),(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,1,1),(3,1,1),(6,1,1),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(2,1,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(7,1,1),(4,1,1),(8,1,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (226,124) => MOP_CODE[(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,1,0),(3,1,0),(6,1,0),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(7,1,1),(4,1,1),(8,1,1),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (226,125) => MOP_CODE[(49,8,1),(50,8,1),(51,8,1),(52,8,1),(9,8,1),(10,8,1),(5,1,0),(3,1,0),(6,1,0),(13,8,1),(14,8,1),(53,8,1),(54,8,1),(55,8,1),(56,8,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(7,1,0),(4,1,0),(8,1,0),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (226,126) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,8,1),(58,8,1),(59,8,1),(60,8,1),(11,8,1),(12,8,1),(7,1,1),(4,1,1),(8,1,1),(15,8,1),(16,8,1),(61,8,1),(62,8,1),(63,8,1),(64,8,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (226,127) => MOP_CODE[(49,8,0),(50,8,0),(51,8,0),(52,8,0),(9,8,0),(10,8,0),(5,1,0),(3,1,0),(6,1,0),(13,8,0),(14,8,0),(53,8,0),(54,8,0),(55,8,0),(56,8,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,8,0),(58,8,0),(59,8,0),(60,8,0),(11,8,0),(12,8,0),(7,1,0),(4,1,0),(8,1,0),(15,8,0),(16,8,0),(61,8,0),(62,8,0),(63,8,0),(64,8,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,2,1),(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,8,1),(3,8,1),(6,8,1),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,8,1),(34,8,1),(35,8,1),(36,8,1),(37,8,1),(38,8,1),(39,8,1),(40,8,1),(2,8,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,8,1),(4,8,1),(8,8,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,8,1),(42,8,1),(43,8,1),(44,8,1),(45,8,1),(46,8,1),(47,8,1),(48,8,1)], (227,128) => MOP_CODE[(49,15,0),(50,16,0),(51,16,0),(52,14,0),(9,14,0),(10,15,0),(5,14,0),(3,15,0),(6,16,0),(13,16,0),(14,1,0),(53,14,0),(54,1,0),(55,15,0),(56,1,0),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,0),(57,15,0),(58,16,0),(59,16,0),(60,14,0),(11,14,0),(12,15,0),(7,14,0),(4,15,0),(8,16,0),(15,16,0),(16,1,0),(61,14,0),(62,1,0),(63,15,0),(64,1,0),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0)], (227,129) => MOP_CODE[(49,15,0),(50,16,0),(51,16,0),(52,14,0),(9,14,0),(10,15,0),(5,14,0),(3,15,0),(6,16,0),(13,16,0),(14,1,0),(53,14,0),(54,1,0),(55,15,0),(56,1,0),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,0),(57,15,0),(58,16,0),(59,16,0),(60,14,0),(11,14,0),(12,15,0),(7,14,0),(4,15,0),(8,16,0),(15,16,0),(16,1,0),(61,14,0),(62,1,0),(63,15,0),(64,1,0),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0),(1,1,1),(49,15,1),(50,16,1),(51,16,1),(52,14,1),(9,14,1),(10,15,1),(5,14,1),(3,15,1),(6,16,1),(13,16,1),(14,1,1),(53,14,1),(54,1,1),(55,15,1),(56,1,1),(33,1,1),(34,1,1),(35,15,1),(36,16,1),(37,16,1),(38,14,1),(39,14,1),(40,15,1),(2,1,1),(57,15,1),(58,16,1),(59,16,1),(60,14,1),(11,14,1),(12,15,1),(7,14,1),(4,15,1),(8,16,1),(15,16,1),(16,1,1),(61,14,1),(62,1,1),(63,15,1),(64,1,1),(41,1,1),(42,1,1),(43,15,1),(44,16,1),(45,16,1),(46,14,1),(47,14,1),(48,15,1)], (227,130) => MOP_CODE[(49,15,1),(50,16,1),(51,16,1),(52,14,1),(9,14,1),(10,15,1),(5,14,0),(3,15,0),(6,16,0),(13,16,1),(14,1,1),(53,14,1),(54,1,1),(55,15,1),(56,1,1),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,1),(57,15,0),(58,16,0),(59,16,0),(60,14,0),(11,14,0),(12,15,0),(7,14,1),(4,15,1),(8,16,1),(15,16,0),(16,1,0),(61,14,0),(62,1,0),(63,15,0),(64,1,0),(41,1,1),(42,1,1),(43,15,1),(44,16,1),(45,16,1),(46,14,1),(47,14,1),(48,15,1)], (227,131) => MOP_CODE[(49,15,1),(50,16,1),(51,16,1),(52,14,1),(9,14,1),(10,15,1),(5,14,0),(3,15,0),(6,16,0),(13,16,1),(14,1,1),(53,14,1),(54,1,1),(55,15,1),(56,1,1),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,0),(57,15,1),(58,16,1),(59,16,1),(60,14,1),(11,14,1),(12,15,1),(7,14,0),(4,15,0),(8,16,0),(15,16,1),(16,1,1),(61,14,1),(62,1,1),(63,15,1),(64,1,1),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0)], (227,132) => MOP_CODE[(49,15,0),(50,16,0),(51,16,0),(52,14,0),(9,14,0),(10,15,0),(5,14,0),(3,15,0),(6,16,0),(13,16,0),(14,1,0),(53,14,0),(54,1,0),(55,15,0),(56,1,0),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,1),(57,15,1),(58,16,1),(59,16,1),(60,14,1),(11,14,1),(12,15,1),(7,14,1),(4,15,1),(8,16,1),(15,16,1),(16,1,1),(61,14,1),(62,1,1),(63,15,1),(64,1,1),(41,1,1),(42,1,1),(43,15,1),(44,16,1),(45,16,1),(46,14,1),(47,14,1),(48,15,1)], (227,133) => MOP_CODE[(49,15,0),(50,16,0),(51,16,0),(52,14,0),(9,14,0),(10,15,0),(5,14,0),(3,15,0),(6,16,0),(13,16,0),(14,1,0),(53,14,0),(54,1,0),(55,15,0),(56,1,0),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,0),(57,15,0),(58,16,0),(59,16,0),(60,14,0),(11,14,0),(12,15,0),(7,14,0),(4,15,0),(8,16,0),(15,16,0),(16,1,0),(61,14,0),(62,1,0),(63,15,0),(64,1,0),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0),(1,2,1),(49,18,1),(50,19,1),(51,19,1),(52,17,1),(9,17,1),(10,18,1),(5,17,1),(3,18,1),(6,19,1),(13,19,1),(14,8,1),(53,17,1),(54,8,1),(55,18,1),(56,8,1),(33,8,1),(34,8,1),(35,18,1),(36,19,1),(37,19,1),(38,17,1),(39,17,1),(40,18,1),(2,8,1),(57,18,1),(58,19,1),(59,19,1),(60,17,1),(11,17,1),(12,18,1),(7,17,1),(4,18,1),(8,19,1),(15,19,1),(16,8,1),(61,17,1),(62,8,1),(63,18,1),(64,8,1),(41,8,1),(42,8,1),(43,18,1),(44,19,1),(45,19,1),(46,17,1),(47,17,1),(48,18,1)], (228,134) => MOP_CODE[(49,18,0),(50,19,0),(51,19,0),(52,17,0),(9,17,0),(10,18,0),(5,14,0),(3,15,0),(6,16,0),(13,19,0),(14,8,0),(53,17,0),(54,8,0),(55,18,0),(56,8,0),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,0),(57,18,0),(58,19,0),(59,19,0),(60,17,0),(11,17,0),(12,18,0),(7,14,0),(4,15,0),(8,16,0),(15,19,0),(16,8,0),(61,17,0),(62,8,0),(63,18,0),(64,8,0),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0)], (228,135) => MOP_CODE[(49,18,0),(50,19,0),(51,19,0),(52,17,0),(9,17,0),(10,18,0),(5,14,0),(3,15,0),(6,16,0),(13,19,0),(14,8,0),(53,17,0),(54,8,0),(55,18,0),(56,8,0),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,0),(57,18,0),(58,19,0),(59,19,0),(60,17,0),(11,17,0),(12,18,0),(7,14,0),(4,15,0),(8,16,0),(15,19,0),(16,8,0),(61,17,0),(62,8,0),(63,18,0),(64,8,0),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0),(1,1,1),(49,18,1),(50,19,1),(51,19,1),(52,17,1),(9,17,1),(10,18,1),(5,14,1),(3,15,1),(6,16,1),(13,19,1),(14,8,1),(53,17,1),(54,8,1),(55,18,1),(56,8,1),(33,1,1),(34,1,1),(35,15,1),(36,16,1),(37,16,1),(38,14,1),(39,14,1),(40,15,1),(2,1,1),(57,18,1),(58,19,1),(59,19,1),(60,17,1),(11,17,1),(12,18,1),(7,14,1),(4,15,1),(8,16,1),(15,19,1),(16,8,1),(61,17,1),(62,8,1),(63,18,1),(64,8,1),(41,1,1),(42,1,1),(43,15,1),(44,16,1),(45,16,1),(46,14,1),(47,14,1),(48,15,1)], (228,136) => MOP_CODE[(49,18,1),(50,19,1),(51,19,1),(52,17,1),(9,17,1),(10,18,1),(5,14,0),(3,15,0),(6,16,0),(13,19,1),(14,8,1),(53,17,1),(54,8,1),(55,18,1),(56,8,1),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,1),(57,18,0),(58,19,0),(59,19,0),(60,17,0),(11,17,0),(12,18,0),(7,14,1),(4,15,1),(8,16,1),(15,19,0),(16,8,0),(61,17,0),(62,8,0),(63,18,0),(64,8,0),(41,1,1),(42,1,1),(43,15,1),(44,16,1),(45,16,1),(46,14,1),(47,14,1),(48,15,1)], (228,137) => MOP_CODE[(49,18,1),(50,19,1),(51,19,1),(52,17,1),(9,17,1),(10,18,1),(5,14,0),(3,15,0),(6,16,0),(13,19,1),(14,8,1),(53,17,1),(54,8,1),(55,18,1),(56,8,1),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,0),(57,18,1),(58,19,1),(59,19,1),(60,17,1),(11,17,1),(12,18,1),(7,14,0),(4,15,0),(8,16,0),(15,19,1),(16,8,1),(61,17,1),(62,8,1),(63,18,1),(64,8,1),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0)], (228,138) => MOP_CODE[(49,18,0),(50,19,0),(51,19,0),(52,17,0),(9,17,0),(10,18,0),(5,14,0),(3,15,0),(6,16,0),(13,19,0),(14,8,0),(53,17,0),(54,8,0),(55,18,0),(56,8,0),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,1),(57,18,1),(58,19,1),(59,19,1),(60,17,1),(11,17,1),(12,18,1),(7,14,1),(4,15,1),(8,16,1),(15,19,1),(16,8,1),(61,17,1),(62,8,1),(63,18,1),(64,8,1),(41,1,1),(42,1,1),(43,15,1),(44,16,1),(45,16,1),(46,14,1),(47,14,1),(48,15,1)], (228,139) => MOP_CODE[(49,18,0),(50,19,0),(51,19,0),(52,17,0),(9,17,0),(10,18,0),(5,14,0),(3,15,0),(6,16,0),(13,19,0),(14,8,0),(53,17,0),(54,8,0),(55,18,0),(56,8,0),(33,1,0),(34,1,0),(35,15,0),(36,16,0),(37,16,0),(38,14,0),(39,14,0),(40,15,0),(2,1,0),(57,18,0),(58,19,0),(59,19,0),(60,17,0),(11,17,0),(12,18,0),(7,14,0),(4,15,0),(8,16,0),(15,19,0),(16,8,0),(61,17,0),(62,8,0),(63,18,0),(64,8,0),(41,1,0),(42,1,0),(43,15,0),(44,16,0),(45,16,0),(46,14,0),(47,14,0),(48,15,0),(1,2,1),(49,15,1),(50,16,1),(51,16,1),(52,14,1),(9,14,1),(10,15,1),(5,17,1),(3,18,1),(6,19,1),(13,16,1),(14,1,1),(53,14,1),(54,1,1),(55,15,1),(56,1,1),(33,8,1),(34,8,1),(35,18,1),(36,19,1),(37,19,1),(38,17,1),(39,17,1),(40,18,1),(2,8,1),(57,15,1),(58,16,1),(59,16,1),(60,14,1),(11,14,1),(12,15,1),(7,17,1),(4,18,1),(8,19,1),(15,16,1),(16,1,1),(61,14,1),(62,1,1),(63,15,1),(64,1,1),(41,8,1),(42,8,1),(43,18,1),(44,19,1),(45,19,1),(46,17,1),(47,17,1),(48,18,1)], (229,140) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (229,141) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,0),(4,1,0),(8,1,0),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0),(1,1,1),(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,1),(3,1,1),(6,1,1),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,1),(34,1,1),(35,1,1),(36,1,1),(37,1,1),(38,1,1),(39,1,1),(40,1,1),(2,1,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (229,142) => MOP_CODE[(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,1,0),(58,1,0),(59,1,0),(60,1,0),(11,1,0),(12,1,0),(7,1,1),(4,1,1),(8,1,1),(15,1,0),(16,1,0),(61,1,0),(62,1,0),(63,1,0),(64,1,0),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (229,143) => MOP_CODE[(49,1,1),(50,1,1),(51,1,1),(52,1,1),(9,1,1),(10,1,1),(5,1,0),(3,1,0),(6,1,0),(13,1,1),(14,1,1),(53,1,1),(54,1,1),(55,1,1),(56,1,1),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,0),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,1,0),(4,1,0),(8,1,0),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,1,0),(42,1,0),(43,1,0),(44,1,0),(45,1,0),(46,1,0),(47,1,0),(48,1,0)], (229,144) => MOP_CODE[(49,1,0),(50,1,0),(51,1,0),(52,1,0),(9,1,0),(10,1,0),(5,1,0),(3,1,0),(6,1,0),(13,1,0),(14,1,0),(53,1,0),(54,1,0),(55,1,0),(56,1,0),(33,1,0),(34,1,0),(35,1,0),(36,1,0),(37,1,0),(38,1,0),(39,1,0),(40,1,0),(2,1,1),(57,1,1),(58,1,1),(59,1,1),(60,1,1),(11,1,1),(12,1,1),(7,1,1),(4,1,1),(8,1,1),(15,1,1),(16,1,1),(61,1,1),(62,1,1),(63,1,1),(64,1,1),(41,1,1),(42,1,1),(43,1,1),(44,1,1),(45,1,1),(46,1,1),(47,1,1),(48,1,1)], (230,145) => MOP_CODE[(49,34,0),(50,29,0),(51,29,0),(52,31,0),(9,31,0),(10,34,0),(5,2,0),(3,3,0),(6,4,0),(13,29,0),(14,9,0),(53,31,0),(54,9,0),(55,34,0),(56,9,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(2,1,0),(57,34,0),(58,29,0),(59,29,0),(60,31,0),(11,31,0),(12,34,0),(7,2,0),(4,3,0),(8,4,0),(15,29,0),(16,9,0),(61,31,0),(62,9,0),(63,34,0),(64,9,0),(41,1,0),(42,1,0),(43,3,0),(44,4,0),(45,4,0),(46,2,0),(47,2,0),(48,3,0)], (230,146) => MOP_CODE[(49,34,0),(50,29,0),(51,29,0),(52,31,0),(9,31,0),(10,34,0),(5,2,0),(3,3,0),(6,4,0),(13,29,0),(14,9,0),(53,31,0),(54,9,0),(55,34,0),(56,9,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(2,1,0),(57,34,0),(58,29,0),(59,29,0),(60,31,0),(11,31,0),(12,34,0),(7,2,0),(4,3,0),(8,4,0),(15,29,0),(16,9,0),(61,31,0),(62,9,0),(63,34,0),(64,9,0),(41,1,0),(42,1,0),(43,3,0),(44,4,0),(45,4,0),(46,2,0),(47,2,0),(48,3,0),(1,1,1),(49,34,1),(50,29,1),(51,29,1),(52,31,1),(9,31,1),(10,34,1),(5,2,1),(3,3,1),(6,4,1),(13,29,1),(14,9,1),(53,31,1),(54,9,1),(55,34,1),(56,9,1),(33,1,1),(34,1,1),(35,3,1),(36,4,1),(37,4,1),(38,2,1),(39,2,1),(40,3,1),(2,1,1),(57,34,1),(58,29,1),(59,29,1),(60,31,1),(11,31,1),(12,34,1),(7,2,1),(4,3,1),(8,4,1),(15,29,1),(16,9,1),(61,31,1),(62,9,1),(63,34,1),(64,9,1),(41,1,1),(42,1,1),(43,3,1),(44,4,1),(45,4,1),(46,2,1),(47,2,1),(48,3,1)], (230,147) => MOP_CODE[(49,34,1),(50,29,1),(51,29,1),(52,31,1),(9,31,1),(10,34,1),(5,2,0),(3,3,0),(6,4,0),(13,29,1),(14,9,1),(53,31,1),(54,9,1),(55,34,1),(56,9,1),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(2,1,1),(57,34,0),(58,29,0),(59,29,0),(60,31,0),(11,31,0),(12,34,0),(7,2,1),(4,3,1),(8,4,1),(15,29,0),(16,9,0),(61,31,0),(62,9,0),(63,34,0),(64,9,0),(41,1,1),(42,1,1),(43,3,1),(44,4,1),(45,4,1),(46,2,1),(47,2,1),(48,3,1)], (230,148) => MOP_CODE[(49,34,1),(50,29,1),(51,29,1),(52,31,1),(9,31,1),(10,34,1),(5,2,0),(3,3,0),(6,4,0),(13,29,1),(14,9,1),(53,31,1),(54,9,1),(55,34,1),(56,9,1),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(2,1,0),(57,34,1),(58,29,1),(59,29,1),(60,31,1),(11,31,1),(12,34,1),(7,2,0),(4,3,0),(8,4,0),(15,29,1),(16,9,1),(61,31,1),(62,9,1),(63,34,1),(64,9,1),(41,1,0),(42,1,0),(43,3,0),(44,4,0),(45,4,0),(46,2,0),(47,2,0),(48,3,0)], (230,149) => MOP_CODE[(49,34,0),(50,29,0),(51,29,0),(52,31,0),(9,31,0),(10,34,0),(5,2,0),(3,3,0),(6,4,0),(13,29,0),(14,9,0),(53,31,0),(54,9,0),(55,34,0),(56,9,0),(33,1,0),(34,1,0),(35,3,0),(36,4,0),(37,4,0),(38,2,0),(39,2,0),(40,3,0),(2,1,1),(57,34,1),(58,29,1),(59,29,1),(60,31,1),(11,31,1),(12,34,1),(7,2,1),(4,3,1),(8,4,1),(15,29,1),(16,9,1),(61,31,1),(62,9,1),(63,34,1),(64,9,1),(41,1,1),(42,1,1),(43,3,1),(44,4,1),(45,4,1),(46,2,1),(47,2,1),(48,3,1)] )
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2613
# generated from original `xyzt`-based data via: # PG_CODES_3D_D = Dict{String,Vector{Int8}}() # pglabs = Crystalline.PG_IUCs[3] # pgs = pointgroup.(pglabs, Val(3)) # for pg in pgs # pglab = label(pg) # Nops = length(pg) # pg_codes = Vector{Int8}(undef, Nops-1) # idx = 0 # for (n,op) in enumerate(pg) # isone(op) && continue # skip identity (trivially in group): no need to list # r = rotation(op) # r_idx = Int8(something(findfirst(==(r), Crystalline.ROTATIONS_3D))) # pg_codes[idx+=1] = r_idx # end # PG_CODES_3D_D[pglab] = pg_codes # end # for pglab in pglabs # println(pglab => PG_CODES_3D_D[pglab], ",") # end const PG_CODES_Ds = ( # PointGroup{1} Dict{String, Vector{Int8}}( "1" => [], "m" => [2], ), # PointGroup{2} Dict{String, Vector{Int8}}( "1" => [], "2" => [2], "m" => [3], "mm2" => [2,4,3], "4" => [2,5,6], "4mm" => [2,5,6,4,3,8,7], "3" => [9,10], "3m1" => [9,10,8,11,12], "31m" => [9,10,7,13,14], "6" => [9,10,2,15,16], "6mm" => [9,10,2,15,16,8,11,12,7,13,14], ), # PointGroup{3} Dict{String, Vector{Int8}}( "1" => [], "-1" => [2], "2" => [3], "m" => [4], "2/m" => [3,2,4], "222" => [6,3,5], "mm2" => [6,4,7], "mmm" => [6,3,5,2,8,4,7], "4" => [6,9,10], "-4" => [6,11,12], "4/m" => [6,9,10,2,8,11,12], "422" => [6,9,10,3,5,13,14], "4mm" => [6,9,10,4,7,15,16], "-42m" => [6,11,12,3,5,15,16], "-4m2" => [6,11,12,4,7,13,14], "4/mmm" => [6,9,10,3,5,13,14,2,8,11,12,4,7,15,16], "3" => [17,18], "-3" => [17,18,2,19,20], "312" => [17,18,14,22,21], "321" => [17,18,13,23,24], "3m1" => [17,18,15,25,26], "31m" => [17,18,16,28,27], "-31m" => [17,18,14,22,21,2,19,20,16,28,27], "-3m1" => [17,18,13,23,24,2,19,20,15,25,26], "6" => [17,18,6,30,29], "-6" => [17,18,8,32,31], "6/m" => [17,18,6,30,29,2,19,20,8,32,31], "622" => [17,18,6,30,29,13,23,24,14,22,21], "6mm" => [17,18,6,30,29,15,25,26,16,28,27], "-62m" => [17,18,8,32,31,13,23,24,16,28,27], "-6m2" => [17,18,8,32,31,15,25,26,14,22,21], "6/mmm" => [17,18,6,30,29,13,23,24,14,22,21,2,19,20,8,32,31,15,25,26,16,28,27], "23" => [6,3,5,33,38,36,40,34,35,39,37], "m-3" => [6,3,5,33,38,36,40,34,35,39,37,2,8,4,7,41,46,44,48,42,43,47,45], "432" => [6,3,5,33,38,36,40,34,35,39,37,13,14,10,9,50,53,54,49,51,55,52,56], "-43m" => [6,3,5,33,38,36,40,34,35,39,37,16,15,11,12,62,57,58,61,64,60,63,59], "m-3m" => [6,3,5,33,38,36,40,34,35,39,37,13,14,10,9,50,53,54,49,51,55,52,56,2,8,4,7,41,46,44,48,42,43,47,45,15,16,12,11,58,61,62,57,59,63,60,64], ) )
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
20304
# generated from original `xyzt`-based data via: # D = 2 # SG_CODES_V = Vector{Vector{Tuple{Int8, Int8}}}(undef, MAX_SGNUM[D]) # ROTATIONS = Crystalline.ROTATIONS_2D # adjust for D # TRANSLATIONS = Crystalline.TRANSLATIONS_2D # adjust for D # sgs = spacegroup_from_xyzt.(1:MAX_SGNUM[D], Val(D)) # for sg in sgs # sgnum = num(sg) # Nprimops = length(sg) ÷ Bravais.centering_volume_fraction(centering(sgnum, D)) # sg_codes = Vector{Tuple{Int8, Int8}}(undef, Nprimops-1) # idx = 0 # for (n, op) in enumerate(sg) # isone(op) && continue # skip identity (trivially in group): no need to list # n > Nprimops && break # r, t = rotation(op), translation(op) # r_idx = Int8(something(findfirst(==(r), ROTATIONS))) # t_idx = Int8(something(findfirst(==(t), TRANSLATIONS))) # sg_codes[idx+=1] = (r_idx, t_idx) # end # SG_CODES_V[sgnum] = sg_codes # end const SG_CODES_Vs = ( # SpaceGroup{1} Vector{Tuple{Int8,Int8}}[ #=1=# [], #=2=# [(2,1)], ], # SpaceGroup{2} Vector{Tuple{Int8,Int8}}[ #=1=# [], #=2=# [(2,1)], #=3=# [(3,1)], #=4=# [(3,2)], #=5=# [(3,1)], #=6=# [(2,1),(3,1),(4,1)], #=7=# [(2,1),(3,4),(4,4)], #=8=# [(2,1),(3,3),(4,3)], #=9=# [(2,1),(3,1),(4,1)], #=10=# [(2,1),(5,1),(6,1)], #=11=# [(2,1),(5,1),(6,1),(3,1),(4,1),(7,1),(8,1)], #=12=# [(2,1),(5,1),(6,1),(3,3),(4,3),(7,3),(8,3)], #=13=# [(9,1),(10,1)], #=14=# [(9,1),(10,1),(8,1),(11,1),(12,1)], #=15=# [(9,1),(10,1),(7,1),(13,1),(14,1)], #=16=# [(9,1),(10,1),(2,1),(15,1),(16,1)], #=17=# [(9,1),(10,1),(2,1),(15,1),(16,1),(8,1),(11,1),(12,1),(7,1),(13,1),(14,1)], ], # SpaceGroup{3} Vector{Tuple{Int8,Int8}}[ #=1=# [], #=2=# [(2,1)], #=3=# [(3,1)], #=4=# [(3,4)], #=5=# [(3,1)], #=6=# [(4,1)], #=7=# [(4,2)], #=8=# [(4,1)], #=9=# [(4,2)], #=10=# [(3,1),(2,1),(4,1)], #=11=# [(3,4),(2,1),(4,4)], #=12=# [(3,1),(2,1),(4,1)], #=13=# [(3,2),(2,1),(4,2)], #=14=# [(3,7),(2,1),(4,7)], #=15=# [(3,2),(2,1),(4,2)], #=16=# [(6,1),(3,1),(5,1)], #=17=# [(6,2),(3,2),(5,1)], #=18=# [(6,1),(3,5),(5,5)], #=19=# [(6,6),(3,7),(5,5)], #=20=# [(6,2),(3,2),(5,1)], #=21=# [(6,1),(3,1),(5,1)], #=22=# [(6,1),(3,1),(5,1)], #=23=# [(6,1),(3,1),(5,1)], #=24=# [(6,6),(3,7),(5,5)], #=25=# [(6,1),(4,1),(7,1)], #=26=# [(6,2),(4,2),(7,1)], #=27=# [(6,1),(4,2),(7,2)], #=28=# [(6,1),(4,3),(7,3)], #=29=# [(6,2),(4,3),(7,6)], #=30=# [(6,1),(4,7),(7,7)], #=31=# [(6,6),(4,6),(7,1)], #=32=# [(6,1),(4,5),(7,5)], #=33=# [(6,2),(4,5),(7,8)], #=34=# [(6,1),(4,8),(7,8)], #=35=# [(6,1),(4,1),(7,1)], #=36=# [(6,2),(4,2),(7,1)], #=37=# [(6,1),(4,2),(7,2)], #=38=# [(6,1),(4,1),(7,1)], #=39=# [(6,1),(4,4),(7,4)], #=40=# [(6,1),(4,3),(7,3)], #=41=# [(6,1),(4,5),(7,5)], #=42=# [(6,1),(4,1),(7,1)], #=43=# [(6,1),(4,9),(7,9)], #=44=# [(6,1),(4,1),(7,1)], #=45=# [(6,1),(4,5),(7,5)], #=46=# [(6,1),(4,3),(7,3)], #=47=# [(6,1),(3,1),(5,1),(2,1),(8,1),(4,1),(7,1)], #=48=# [(6,5),(3,6),(5,7),(2,1),(8,5),(4,6),(7,7)], #=49=# [(6,1),(3,2),(5,2),(2,1),(8,1),(4,2),(7,2)], #=50=# [(6,5),(3,3),(5,4),(2,1),(8,5),(4,3),(7,4)], #=51=# [(6,3),(3,1),(5,3),(2,1),(8,3),(4,1),(7,3)], #=52=# [(6,3),(3,8),(5,7),(2,1),(8,3),(4,8),(7,7)], #=53=# [(6,6),(3,6),(5,1),(2,1),(8,6),(4,6),(7,1)], #=54=# [(6,3),(3,2),(5,6),(2,1),(8,3),(4,2),(7,6)], #=55=# [(6,1),(3,5),(5,5),(2,1),(8,1),(4,5),(7,5)], #=56=# [(6,5),(3,7),(5,6),(2,1),(8,5),(4,7),(7,6)], #=57=# [(6,2),(3,7),(5,4),(2,1),(8,2),(4,7),(7,4)], #=58=# [(6,1),(3,8),(5,8),(2,1),(8,1),(4,8),(7,8)], #=59=# [(6,5),(3,4),(5,3),(2,1),(8,5),(4,4),(7,3)], #=60=# [(6,8),(3,2),(5,5),(2,1),(8,8),(4,2),(7,5)], #=61=# [(6,6),(3,7),(5,5),(2,1),(8,6),(4,7),(7,5)], #=62=# [(6,6),(3,4),(5,8),(2,1),(8,6),(4,4),(7,8)], #=63=# [(6,2),(3,2),(5,1),(2,1),(8,2),(4,2),(7,1)], #=64=# [(6,7),(3,7),(5,1),(2,1),(8,7),(4,7),(7,1)], #=65=# [(6,1),(3,1),(5,1),(2,1),(8,1),(4,1),(7,1)], #=66=# [(6,1),(3,2),(5,2),(2,1),(8,1),(4,2),(7,2)], #=67=# [(6,4),(3,4),(5,1),(2,1),(8,4),(4,4),(7,1)], #=68=# [(6,3),(3,2),(5,6),(2,1),(8,3),(4,2),(7,6)], #=69=# [(6,1),(3,1),(5,1),(2,1),(8,1),(4,1),(7,1)], #=70=# [(6,13),(3,12),(5,11),(2,1),(8,16),(4,15),(7,14)], #=71=# [(6,1),(3,1),(5,1),(2,1),(8,1),(4,1),(7,1)], #=72=# [(6,1),(3,5),(5,5),(2,1),(8,1),(4,5),(7,5)], #=73=# [(6,6),(3,7),(5,5),(2,1),(8,6),(4,7),(7,5)], #=74=# [(6,4),(3,4),(5,1),(2,1),(8,4),(4,4),(7,1)], #=75=# [(6,1),(9,1),(10,1)], #=76=# [(6,2),(9,23),(10,24)], #=77=# [(6,1),(9,2),(10,2)], #=78=# [(6,2),(9,24),(10,23)], #=79=# [(6,1),(9,1),(10,1)], #=80=# [(6,8),(9,27),(10,39)], #=81=# [(6,1),(11,1),(12,1)], #=82=# [(6,1),(11,1),(12,1)], #=83=# [(6,1),(9,1),(10,1),(2,1),(8,1),(11,1),(12,1)], #=84=# [(6,1),(9,2),(10,2),(2,1),(8,1),(11,2),(12,2)], #=85=# [(6,5),(9,3),(10,4),(2,1),(8,5),(11,3),(12,4)], #=86=# [(6,5),(9,7),(10,6),(2,1),(8,5),(11,7),(12,6)], #=87=# [(6,1),(9,1),(10,1),(2,1),(8,1),(11,1),(12,1)], #=88=# [(6,6),(9,29),(10,10),(2,1),(8,6),(11,30),(12,9)], #=89=# [(6,1),(9,1),(10,1),(3,1),(5,1),(13,1),(14,1)], #=90=# [(6,1),(9,5),(10,5),(3,5),(5,5),(13,1),(14,1)], #=91=# [(6,2),(9,23),(10,24),(3,1),(5,2),(13,24),(14,23)], #=92=# [(6,2),(9,25),(10,26),(3,25),(5,26),(13,1),(14,2)], #=93=# [(6,1),(9,2),(10,2),(3,1),(5,1),(13,2),(14,2)], #=94=# [(6,1),(9,8),(10,8),(3,8),(5,8),(13,1),(14,1)], #=95=# [(6,2),(9,24),(10,23),(3,1),(5,2),(13,23),(14,24)], #=96=# [(6,2),(9,26),(10,25),(3,26),(5,25),(13,1),(14,2)], #=97=# [(6,1),(9,1),(10,1),(3,1),(5,1),(13,1),(14,1)], #=98=# [(6,8),(9,27),(10,39),(3,39),(5,27),(13,8),(14,1)], #=99=# [(6,1),(9,1),(10,1),(4,1),(7,1),(15,1),(16,1)], #=100=# [(6,1),(9,1),(10,1),(4,5),(7,5),(15,5),(16,5)], #=101=# [(6,1),(9,2),(10,2),(4,2),(7,2),(15,1),(16,1)], #=102=# [(6,1),(9,8),(10,8),(4,8),(7,8),(15,1),(16,1)], #=103=# [(6,1),(9,1),(10,1),(4,2),(7,2),(15,2),(16,2)], #=104=# [(6,1),(9,1),(10,1),(4,8),(7,8),(15,8),(16,8)], #=105=# [(6,1),(9,2),(10,2),(4,1),(7,1),(15,2),(16,2)], #=106=# [(6,1),(9,2),(10,2),(4,5),(7,5),(15,8),(16,8)], #=107=# [(6,1),(9,1),(10,1),(4,1),(7,1),(15,1),(16,1)], #=108=# [(6,1),(9,1),(10,1),(4,2),(7,2),(15,2),(16,2)], #=109=# [(6,8),(9,27),(10,39),(4,1),(7,8),(15,27),(16,39)], #=110=# [(6,8),(9,27),(10,39),(4,2),(7,5),(15,40),(16,28)], #=111=# [(6,1),(11,1),(12,1),(3,1),(5,1),(15,1),(16,1)], #=112=# [(6,1),(11,1),(12,1),(3,2),(5,2),(15,2),(16,2)], #=113=# [(6,1),(11,1),(12,1),(3,5),(5,5),(15,5),(16,5)], #=114=# [(6,1),(11,1),(12,1),(3,8),(5,8),(15,8),(16,8)], #=115=# [(6,1),(11,1),(12,1),(4,1),(7,1),(13,1),(14,1)], #=116=# [(6,1),(11,1),(12,1),(4,2),(7,2),(13,2),(14,2)], #=117=# [(6,1),(11,1),(12,1),(4,5),(7,5),(13,5),(14,5)], #=118=# [(6,1),(11,1),(12,1),(4,8),(7,8),(13,8),(14,8)], #=119=# [(6,1),(11,1),(12,1),(4,1),(7,1),(13,1),(14,1)], #=120=# [(6,1),(11,1),(12,1),(4,2),(7,2),(13,2),(14,2)], #=121=# [(6,1),(11,1),(12,1),(3,1),(5,1),(15,1),(16,1)], #=122=# [(6,1),(11,1),(12,1),(3,39),(5,39),(15,39),(16,39)], #=123=# [(6,1),(9,1),(10,1),(3,1),(5,1),(13,1),(14,1),(2,1),(8,1),(11,1),(12,1),(4,1),(7,1),(15,1),(16,1)], #=124=# [(6,1),(9,1),(10,1),(3,2),(5,2),(13,2),(14,2),(2,1),(8,1),(11,1),(12,1),(4,2),(7,2),(15,2),(16,2)], #=125=# [(6,5),(9,3),(10,4),(3,3),(5,4),(13,1),(14,5),(2,1),(8,5),(11,3),(12,4),(4,3),(7,4),(15,1),(16,5)], #=126=# [(6,5),(9,3),(10,4),(3,6),(5,7),(13,2),(14,8),(2,1),(8,5),(11,3),(12,4),(4,6),(7,7),(15,2),(16,8)], #=127=# [(6,1),(9,1),(10,1),(3,5),(5,5),(13,5),(14,5),(2,1),(8,1),(11,1),(12,1),(4,5),(7,5),(15,5),(16,5)], #=128=# [(6,1),(9,1),(10,1),(3,8),(5,8),(13,8),(14,8),(2,1),(8,1),(11,1),(12,1),(4,8),(7,8),(15,8),(16,8)], #=129=# [(6,5),(9,3),(10,4),(3,4),(5,3),(13,5),(14,1),(2,1),(8,5),(11,3),(12,4),(4,4),(7,3),(15,5),(16,1)], #=130=# [(6,5),(9,3),(10,4),(3,7),(5,6),(13,8),(14,2),(2,1),(8,5),(11,3),(12,4),(4,7),(7,6),(15,8),(16,2)], #=131=# [(6,1),(9,2),(10,2),(3,1),(5,1),(13,2),(14,2),(2,1),(8,1),(11,2),(12,2),(4,1),(7,1),(15,2),(16,2)], #=132=# [(6,1),(9,2),(10,2),(3,2),(5,2),(13,1),(14,1),(2,1),(8,1),(11,2),(12,2),(4,2),(7,2),(15,1),(16,1)], #=133=# [(6,5),(9,6),(10,7),(3,3),(5,4),(13,2),(14,8),(2,1),(8,5),(11,6),(12,7),(4,3),(7,4),(15,2),(16,8)], #=134=# [(6,5),(9,6),(10,7),(3,6),(5,7),(13,1),(14,5),(2,1),(8,5),(11,6),(12,7),(4,6),(7,7),(15,1),(16,5)], #=135=# [(6,1),(9,2),(10,2),(3,5),(5,5),(13,8),(14,8),(2,1),(8,1),(11,2),(12,2),(4,5),(7,5),(15,8),(16,8)], #=136=# [(6,1),(9,8),(10,8),(3,8),(5,8),(13,1),(14,1),(2,1),(8,1),(11,8),(12,8),(4,8),(7,8),(15,1),(16,1)], #=137=# [(6,5),(9,6),(10,7),(3,4),(5,3),(13,8),(14,2),(2,1),(8,5),(11,6),(12,7),(4,4),(7,3),(15,8),(16,2)], #=138=# [(6,5),(9,6),(10,7),(3,7),(5,6),(13,5),(14,1),(2,1),(8,5),(11,6),(12,7),(4,7),(7,6),(15,5),(16,1)], #=139=# [(6,1),(9,1),(10,1),(3,1),(5,1),(13,1),(14,1),(2,1),(8,1),(11,1),(12,1),(4,1),(7,1),(15,1),(16,1)], #=140=# [(6,1),(9,1),(10,1),(3,2),(5,2),(13,2),(14,2),(2,1),(8,1),(11,1),(12,1),(4,2),(7,2),(15,2),(16,2)], #=141=# [(6,6),(9,31),(10,34),(3,6),(5,1),(13,31),(14,34),(2,1),(8,6),(11,33),(12,32),(4,6),(7,1),(15,33),(16,32)], #=142=# [(6,6),(9,31),(10,34),(3,3),(5,2),(13,30),(14,9),(2,1),(8,6),(11,33),(12,32),(4,3),(7,2),(15,29),(16,10)], #=143=# [(17,1),(18,1)], #=144=# [(17,35),(18,36)], #=145=# [(17,36),(18,35)], #=146=# [(17,1),(18,1)], #=147=# [(17,1),(18,1),(2,1),(19,1),(20,1)], #=148=# [(17,1),(18,1),(2,1),(19,1),(20,1)], #=149=# [(17,1),(18,1),(14,1),(22,1),(21,1)], #=150=# [(17,1),(18,1),(13,1),(23,1),(24,1)], #=151=# [(17,35),(18,36),(14,36),(22,35),(21,1)], #=152=# [(17,35),(18,36),(13,1),(23,36),(24,35)], #=153=# [(17,36),(18,35),(14,35),(22,36),(21,1)], #=154=# [(17,36),(18,35),(13,1),(23,35),(24,36)], #=155=# [(17,1),(18,1),(13,1),(23,1),(24,1)], #=156=# [(17,1),(18,1),(15,1),(25,1),(26,1)], #=157=# [(17,1),(18,1),(16,1),(28,1),(27,1)], #=158=# [(17,1),(18,1),(15,2),(25,2),(26,2)], #=159=# [(17,1),(18,1),(16,2),(28,2),(27,2)], #=160=# [(17,1),(18,1),(15,1),(25,1),(26,1)], #=161=# [(17,1),(18,1),(15,2),(25,2),(26,2)], #=162=# [(17,1),(18,1),(14,1),(22,1),(21,1),(2,1),(19,1),(20,1),(16,1),(28,1),(27,1)], #=163=# [(17,1),(18,1),(14,2),(22,2),(21,2),(2,1),(19,1),(20,1),(16,2),(28,2),(27,2)], #=164=# [(17,1),(18,1),(13,1),(23,1),(24,1),(2,1),(19,1),(20,1),(15,1),(25,1),(26,1)], #=165=# [(17,1),(18,1),(13,2),(23,2),(24,2),(2,1),(19,1),(20,1),(15,2),(25,2),(26,2)], #=166=# [(17,1),(18,1),(13,1),(23,1),(24,1),(2,1),(19,1),(20,1),(15,1),(25,1),(26,1)], #=167=# [(17,1),(18,1),(13,2),(23,2),(24,2),(2,1),(19,1),(20,1),(15,2),(25,2),(26,2)], #=168=# [(17,1),(18,1),(6,1),(30,1),(29,1)], #=169=# [(17,35),(18,36),(6,2),(30,37),(29,38)], #=170=# [(17,36),(18,35),(6,2),(30,38),(29,37)], #=171=# [(17,36),(18,35),(6,1),(30,36),(29,35)], #=172=# [(17,35),(18,36),(6,1),(30,35),(29,36)], #=173=# [(17,1),(18,1),(6,2),(30,2),(29,2)], #=174=# [(17,1),(18,1),(8,1),(32,1),(31,1)], #=175=# [(17,1),(18,1),(6,1),(30,1),(29,1),(2,1),(19,1),(20,1),(8,1),(32,1),(31,1)], #=176=# [(17,1),(18,1),(6,2),(30,2),(29,2),(2,1),(19,1),(20,1),(8,2),(32,2),(31,2)], #=177=# [(17,1),(18,1),(6,1),(30,1),(29,1),(13,1),(23,1),(24,1),(14,1),(22,1),(21,1)], #=178=# [(17,35),(18,36),(6,2),(30,37),(29,38),(13,35),(23,1),(24,36),(14,37),(22,2),(21,38)], #=179=# [(17,36),(18,35),(6,2),(30,38),(29,37),(13,36),(23,1),(24,35),(14,38),(22,2),(21,37)], #=180=# [(17,36),(18,35),(6,1),(30,36),(29,35),(13,36),(23,1),(24,35),(14,36),(22,1),(21,35)], #=181=# [(17,35),(18,36),(6,1),(30,35),(29,36),(13,35),(23,1),(24,36),(14,35),(22,1),(21,36)], #=182=# [(17,1),(18,1),(6,2),(30,2),(29,2),(13,1),(23,1),(24,1),(14,2),(22,2),(21,2)], #=183=# [(17,1),(18,1),(6,1),(30,1),(29,1),(15,1),(25,1),(26,1),(16,1),(28,1),(27,1)], #=184=# [(17,1),(18,1),(6,1),(30,1),(29,1),(15,2),(25,2),(26,2),(16,2),(28,2),(27,2)], #=185=# [(17,1),(18,1),(6,2),(30,2),(29,2),(15,2),(25,2),(26,2),(16,1),(28,1),(27,1)], #=186=# [(17,1),(18,1),(6,2),(30,2),(29,2),(15,1),(25,1),(26,1),(16,2),(28,2),(27,2)], #=187=# [(17,1),(18,1),(8,1),(32,1),(31,1),(15,1),(25,1),(26,1),(14,1),(22,1),(21,1)], #=188=# [(17,1),(18,1),(8,2),(32,2),(31,2),(15,2),(25,2),(26,2),(14,1),(22,1),(21,1)], #=189=# [(17,1),(18,1),(8,1),(32,1),(31,1),(13,1),(23,1),(24,1),(16,1),(28,1),(27,1)], #=190=# [(17,1),(18,1),(8,2),(32,2),(31,2),(13,1),(23,1),(24,1),(16,2),(28,2),(27,2)], #=191=# [(17,1),(18,1),(6,1),(30,1),(29,1),(13,1),(23,1),(24,1),(14,1),(22,1),(21,1),(2,1),(19,1),(20,1),(8,1),(32,1),(31,1),(15,1),(25,1),(26,1),(16,1),(28,1),(27,1)], #=192=# [(17,1),(18,1),(6,1),(30,1),(29,1),(13,2),(23,2),(24,2),(14,2),(22,2),(21,2),(2,1),(19,1),(20,1),(8,1),(32,1),(31,1),(15,2),(25,2),(26,2),(16,2),(28,2),(27,2)], #=193=# [(17,1),(18,1),(6,2),(30,2),(29,2),(13,2),(23,2),(24,2),(14,1),(22,1),(21,1),(2,1),(19,1),(20,1),(8,2),(32,2),(31,2),(15,2),(25,2),(26,2),(16,1),(28,1),(27,1)], #=194=# [(17,1),(18,1),(6,2),(30,2),(29,2),(13,1),(23,1),(24,1),(14,2),(22,2),(21,2),(2,1),(19,1),(20,1),(8,2),(32,2),(31,2),(15,1),(25,1),(26,1),(16,2),(28,2),(27,2)], #=195=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1)], #=196=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1)], #=197=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1)], #=198=# [(6,6),(3,7),(5,5),(33,1),(38,5),(36,6),(40,7),(34,1),(35,7),(39,5),(37,6)], #=199=# [(6,6),(3,7),(5,5),(33,1),(38,5),(36,6),(40,7),(34,1),(35,7),(39,5),(37,6)], #=200=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(2,1),(8,1),(4,1),(7,1),(41,1),(46,1),(44,1),(48,1),(42,1),(43,1),(47,1),(45,1)], #=201=# [(6,5),(3,6),(5,7),(33,1),(38,7),(36,5),(40,6),(34,1),(35,6),(39,7),(37,5),(2,1),(8,5),(4,6),(7,7),(41,1),(46,7),(44,5),(48,6),(42,1),(43,6),(47,7),(45,5)], #=202=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(2,1),(8,1),(4,1),(7,1),(41,1),(46,1),(44,1),(48,1),(42,1),(43,1),(47,1),(45,1)], #=203=# [(6,13),(3,12),(5,11),(33,1),(38,11),(36,13),(40,12),(34,1),(35,12),(39,11),(37,13),(2,1),(8,16),(4,15),(7,14),(41,1),(46,14),(44,16),(48,15),(42,1),(43,15),(47,14),(45,16)], #=204=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(2,1),(8,1),(4,1),(7,1),(41,1),(46,1),(44,1),(48,1),(42,1),(43,1),(47,1),(45,1)], #=205=# [(6,6),(3,7),(5,5),(33,1),(38,5),(36,6),(40,7),(34,1),(35,7),(39,5),(37,6),(2,1),(8,6),(4,7),(7,5),(41,1),(46,5),(44,6),(48,7),(42,1),(43,7),(47,5),(45,6)], #=206=# [(6,6),(3,7),(5,5),(33,1),(38,5),(36,6),(40,7),(34,1),(35,7),(39,5),(37,6),(2,1),(8,6),(4,7),(7,5),(41,1),(46,5),(44,6),(48,7),(42,1),(43,7),(47,5),(45,6)], #=207=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(13,1),(14,1),(10,1),(9,1),(50,1),(53,1),(54,1),(49,1),(51,1),(55,1),(52,1),(56,1)], #=208=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(13,8),(14,8),(10,8),(9,8),(50,8),(53,8),(54,8),(49,8),(51,8),(55,8),(52,8),(56,8)], #=209=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(13,1),(14,1),(10,1),(9,1),(50,1),(53,1),(54,1),(49,1),(51,1),(55,1),(52,1),(56,1)], #=210=# [(6,7),(3,5),(5,6),(33,1),(38,6),(36,7),(40,5),(34,1),(35,5),(39,6),(37,7),(13,33),(14,9),(10,30),(9,32),(50,33),(53,32),(54,9),(49,30),(51,33),(55,30),(52,32),(56,9)], #=211=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(13,1),(14,1),(10,1),(9,1),(50,1),(53,1),(54,1),(49,1),(51,1),(55,1),(52,1),(56,1)], #=212=# [(6,6),(3,7),(5,5),(33,1),(38,5),(36,6),(40,7),(34,1),(35,7),(39,5),(37,6),(13,30),(14,9),(10,32),(9,33),(50,30),(53,33),(54,9),(49,32),(51,30),(55,32),(52,33),(56,9)], #=213=# [(6,6),(3,7),(5,5),(33,1),(38,5),(36,6),(40,7),(34,1),(35,7),(39,5),(37,6),(13,29),(14,10),(10,34),(9,31),(50,29),(53,31),(54,10),(49,34),(51,29),(55,34),(52,31),(56,10)], #=214=# [(6,6),(3,7),(5,5),(33,1),(38,5),(36,6),(40,7),(34,1),(35,7),(39,5),(37,6),(13,29),(14,10),(10,34),(9,31),(50,29),(53,31),(54,10),(49,34),(51,29),(55,34),(52,31),(56,10)], #=215=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(16,1),(15,1),(11,1),(12,1),(62,1),(57,1),(58,1),(61,1),(64,1),(60,1),(63,1),(59,1)], #=216=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(16,1),(15,1),(11,1),(12,1),(62,1),(57,1),(58,1),(61,1),(64,1),(60,1),(63,1),(59,1)], #=217=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(16,1),(15,1),(11,1),(12,1),(62,1),(57,1),(58,1),(61,1),(64,1),(60,1),(63,1),(59,1)], #=218=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(16,8),(15,8),(11,8),(12,8),(62,8),(57,8),(58,8),(61,8),(64,8),(60,8),(63,8),(59,8)], #=219=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(16,8),(15,8),(11,8),(12,8),(62,8),(57,8),(58,8),(61,8),(64,8),(60,8),(63,8),(59,8)], #=220=# [(6,6),(3,7),(5,5),(33,1),(38,5),(36,6),(40,7),(34,1),(35,7),(39,5),(37,6),(16,9),(15,30),(11,33),(12,32),(62,9),(57,32),(58,30),(61,33),(64,9),(60,33),(63,32),(59,30)], #=221=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(13,1),(14,1),(10,1),(9,1),(50,1),(53,1),(54,1),(49,1),(51,1),(55,1),(52,1),(56,1),(2,1),(8,1),(4,1),(7,1),(41,1),(46,1),(44,1),(48,1),(42,1),(43,1),(47,1),(45,1),(15,1),(16,1),(12,1),(11,1),(58,1),(61,1),(62,1),(57,1),(59,1),(63,1),(60,1),(64,1)], #=222=# [(6,5),(3,6),(5,7),(33,1),(38,7),(36,5),(40,6),(34,1),(35,6),(39,7),(37,5),(13,2),(14,8),(10,4),(9,3),(50,2),(53,3),(54,8),(49,4),(51,2),(55,4),(52,3),(56,8),(2,1),(8,5),(4,6),(7,7),(41,1),(46,7),(44,5),(48,6),(42,1),(43,6),(47,7),(45,5),(15,2),(16,8),(12,4),(11,3),(58,2),(61,3),(62,8),(57,4),(59,2),(63,4),(60,3),(64,8)], #=223=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(13,8),(14,8),(10,8),(9,8),(50,8),(53,8),(54,8),(49,8),(51,8),(55,8),(52,8),(56,8),(2,1),(8,1),(4,1),(7,1),(41,1),(46,1),(44,1),(48,1),(42,1),(43,1),(47,1),(45,1),(15,8),(16,8),(12,8),(11,8),(58,8),(61,8),(62,8),(57,8),(59,8),(63,8),(60,8),(64,8)], #=224=# [(6,5),(3,6),(5,7),(33,1),(38,7),(36,5),(40,6),(34,1),(35,6),(39,7),(37,5),(13,5),(14,1),(10,6),(9,7),(50,5),(53,7),(54,1),(49,6),(51,5),(55,6),(52,7),(56,1),(2,1),(8,5),(4,6),(7,7),(41,1),(46,7),(44,5),(48,6),(42,1),(43,6),(47,7),(45,5),(15,5),(16,1),(12,6),(11,7),(58,5),(61,7),(62,1),(57,6),(59,5),(63,6),(60,7),(64,1)], #=225=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(13,1),(14,1),(10,1),(9,1),(50,1),(53,1),(54,1),(49,1),(51,1),(55,1),(52,1),(56,1),(2,1),(8,1),(4,1),(7,1),(41,1),(46,1),(44,1),(48,1),(42,1),(43,1),(47,1),(45,1),(15,1),(16,1),(12,1),(11,1),(58,1),(61,1),(62,1),(57,1),(59,1),(63,1),(60,1),(64,1)], #=226=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(13,8),(14,8),(10,8),(9,8),(50,8),(53,8),(54,8),(49,8),(51,8),(55,8),(52,8),(56,8),(2,1),(8,1),(4,1),(7,1),(41,1),(46,1),(44,1),(48,1),(42,1),(43,1),(47,1),(45,1),(15,8),(16,8),(12,8),(11,8),(58,8),(61,8),(62,8),(57,8),(59,8),(63,8),(60,8),(64,8)], #=227=# [(6,41),(3,42),(5,43),(33,1),(38,43),(36,41),(40,42),(34,1),(35,42),(39,43),(37,41),(13,41),(14,1),(10,42),(9,43),(50,41),(53,43),(54,1),(49,42),(51,41),(55,42),(52,43),(56,1),(2,1),(8,44),(4,45),(7,46),(41,1),(46,46),(44,44),(48,45),(42,1),(43,45),(47,46),(45,44),(15,44),(16,1),(12,45),(11,46),(58,44),(61,46),(62,1),(57,45),(59,44),(63,45),(60,46),(64,1)], #=228=# [(6,44),(3,45),(5,46),(33,1),(38,46),(36,44),(40,45),(34,1),(35,45),(39,46),(37,44),(13,47),(14,8),(10,48),(9,49),(50,47),(53,49),(54,8),(49,48),(51,47),(55,48),(52,49),(56,8),(2,1),(8,41),(4,42),(7,43),(41,1),(46,43),(44,41),(48,42),(42,1),(43,42),(47,43),(45,41),(15,50),(16,8),(12,51),(11,52),(58,50),(61,52),(62,8),(57,51),(59,50),(63,51),(60,52),(64,8)], #=229=# [(6,1),(3,1),(5,1),(33,1),(38,1),(36,1),(40,1),(34,1),(35,1),(39,1),(37,1),(13,1),(14,1),(10,1),(9,1),(50,1),(53,1),(54,1),(49,1),(51,1),(55,1),(52,1),(56,1),(2,1),(8,1),(4,1),(7,1),(41,1),(46,1),(44,1),(48,1),(42,1),(43,1),(47,1),(45,1),(15,1),(16,1),(12,1),(11,1),(58,1),(61,1),(62,1),(57,1),(59,1),(63,1),(60,1),(64,1)], #=230=# [(6,6),(3,7),(5,5),(33,1),(38,5),(36,6),(40,7),(34,1),(35,7),(39,5),(37,6),(13,29),(14,10),(10,34),(9,31),(50,29),(53,31),(54,10),(49,34),(51,29),(55,34),(52,31),(56,10),(2,1),(8,6),(4,7),(7,5),(41,1),(46,5),(44,6),(48,7),(42,1),(43,7),(47,5),(45,6),(15,30),(16,9),(12,32),(11,33),(58,30),(61,33),(62,9),(57,32),(59,30),(63,32),(60,33),(64,9)], ] )
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
9335
# generated from original `xyzt`-based data via: # D, P = 3, 2 # SUBG_CODES_V = Vector{Vector{Tuple{Int8, Int8}}}(undef, MAX_SUBGNUM[(D,P)]) # ROTATIONS = Crystalline.ROTATIONS_3D # adjust for D # TRANSLATIONS = Crystalline.TRANSLATIONS_3D # adjust for D # subgs = subperiodicgroup.(1:MAX_SUBGNUM[(D,P)], Val(D), Val(P)) # for subg in subgs # sgnum = num(subg) # Nprimops = length(subg) ÷ Bravais.centering_volume_fraction(centering(subg), Val(D), Val(P)) # subg_codes = Vector{Tuple{Int8, Int8}}(undef, Nprimops-1) # idx = 0 # for (n, op) in enumerate(subg) # isone(op) && continue # skip identity (trivially in group): no need to list # n > Nprimops && break # r, t = rotation(op), translation(op) # r_idx = Int8(something(findfirst(==(r), ROTATIONS))) # t_idx = Int8(something(findfirst(==(t), TRANSLATIONS))) # subg_codes[idx+=1] = (r_idx, t_idx) # end # SUBG_CODES_V[sgnum] = subg_codes # end # for (subgnum, subg_codes) in enumerate(SUBG_CODES_V) # println("#=", subgnum, "=# ", subg_codes, ",") # end const SUBG_CODES_Vs = ImmutableDict( # SubperiodicGroup{3, 2} (3, 2) => Vector{Tuple{Int8,Int8}}[ #=1=# [], #=2=# [(2,1)], #=3=# [(6,1)], #=4=# [(8,1)], #=5=# [(8,3)], #=6=# [(6,1),(2,1),(8,1)], #=7=# [(6,3),(2,1),(8,3)], #=8=# [(5,1)], #=9=# [(5,3)], #=10=# [(5,1)], #=11=# [(7,1)], #=12=# [(7,4)], #=13=# [(7,1)], #=14=# [(5,1),(2,1),(7,1)], #=15=# [(5,3),(2,1),(7,3)], #=16=# [(5,4),(2,1),(7,4)], #=17=# [(5,5),(2,1),(7,5)], #=18=# [(5,1),(2,1),(7,1)], #=19=# [(6,1),(3,1),(5,1)], #=20=# [(5,3),(3,3),(6,1)], #=21=# [(6,1),(3,5),(5,5)], #=22=# [(6,1),(3,1),(5,1)], #=23=# [(6,1),(4,1),(7,1)], #=24=# [(6,1),(4,3),(7,3)], #=25=# [(6,1),(4,5),(7,5)], #=26=# [(6,1),(4,1),(7,1)], #=27=# [(3,1),(7,1),(8,1)], #=28=# [(3,4),(8,4),(7,1)], #=29=# [(3,4),(7,4),(8,1)], #=30=# [(3,1),(8,4),(7,4)], #=31=# [(3,1),(8,3),(7,3)], #=32=# [(3,5),(8,5),(7,1)], #=33=# [(3,4),(8,3),(7,5)], #=34=# [(3,1),(7,5),(8,5)], #=35=# [(3,1),(7,1),(8,1)], #=36=# [(3,1),(7,3),(8,3)], #=37=# [(6,1),(3,1),(5,1),(2,1),(8,1),(4,1),(7,1)], #=38=# [(5,1),(6,3),(3,3),(2,1),(7,1),(8,3),(4,3)], #=39=# [(6,5),(3,3),(5,4),(2,1),(8,5),(4,3),(7,4)], #=40=# [(3,3),(6,1),(5,3),(2,1),(4,3),(8,1),(7,3)], #=41=# [(6,3),(3,1),(5,3),(2,1),(8,3),(4,1),(7,3)], #=42=# [(3,5),(6,5),(5,1),(2,1),(4,5),(8,5),(7,1)], #=43=# [(5,4),(6,3),(3,5),(2,1),(7,4),(8,3),(4,5)], #=44=# [(6,1),(3,5),(5,5),(2,1),(8,1),(4,5),(7,5)], #=45=# [(3,4),(5,5),(6,3),(2,1),(4,4),(7,5),(8,3)], #=46=# [(6,5),(3,4),(5,3),(2,1),(8,5),(4,4),(7,3)], #=47=# [(6,1),(3,1),(5,1),(2,1),(8,1),(4,1),(7,1)], #=48=# [(6,4),(3,4),(5,1),(2,1),(8,4),(4,4),(7,1)], #=49=# [(6,1),(9,1),(10,1)], #=50=# [(6,1),(11,1),(12,1)], #=51=# [(6,1),(9,1),(10,1),(2,1),(8,1),(11,1),(12,1)], #=52=# [(6,5),(9,3),(10,4),(2,1),(8,5),(11,3),(12,4)], #=53=# [(6,1),(9,1),(10,1),(3,1),(5,1),(13,1),(14,1)], #=54=# [(6,1),(9,1),(10,1),(3,5),(5,5),(13,5),(14,5)], #=55=# [(6,1),(9,1),(10,1),(4,1),(7,1),(15,1),(16,1)], #=56=# [(6,1),(9,1),(10,1),(4,5),(7,5),(15,5),(16,5)], #=57=# [(6,1),(11,1),(12,1),(3,1),(5,1),(15,1),(16,1)], #=58=# [(6,1),(11,1),(12,1),(3,5),(5,5),(15,5),(16,5)], #=59=# [(6,1),(11,1),(12,1),(4,1),(7,1),(13,1),(14,1)], #=60=# [(6,1),(11,1),(12,1),(4,5),(7,5),(13,5),(14,5)], #=61=# [(6,1),(9,1),(10,1),(3,1),(5,1),(13,1),(14,1),(2,1),(8,1),(11,1),(12,1),(4,1),(7,1),(15,1),(16,1)], #=62=# [(6,5),(9,3),(10,4),(3,3),(5,4),(13,1),(14,5),(2,1),(8,5),(11,3),(12,4),(4,3),(7,4),(15,1),(16,5)], #=63=# [(6,1),(9,1),(10,1),(3,5),(5,5),(13,5),(14,5),(2,1),(8,1),(11,1),(12,1),(4,5),(7,5),(15,5),(16,5)], #=64=# [(6,5),(9,3),(10,4),(3,4),(5,3),(13,5),(14,1),(2,1),(8,5),(11,3),(12,4),(4,4),(7,3),(15,5),(16,1)], #=65=# [(17,1),(18,1)], #=66=# [(17,1),(18,1),(2,1),(19,1),(20,1)], #=67=# [(17,1),(18,1),(14,1),(22,1),(21,1)], #=68=# [(17,1),(18,1),(13,1),(23,1),(24,1)], #=69=# [(17,1),(18,1),(15,1),(25,1),(26,1)], #=70=# [(17,1),(18,1),(16,1),(28,1),(27,1)], #=71=# [(17,1),(18,1),(14,1),(22,1),(21,1),(2,1),(19,1),(20,1),(16,1),(28,1),(27,1)], #=72=# [(17,1),(18,1),(13,1),(23,1),(24,1),(2,1),(19,1),(20,1),(15,1),(25,1),(26,1)], #=73=# [(17,1),(18,1),(6,1),(30,1),(29,1)], #=74=# [(17,1),(18,1),(8,1),(32,1),(31,1)], #=75=# [(17,1),(18,1),(6,1),(30,1),(29,1),(2,1),(19,1),(20,1),(8,1),(32,1),(31,1)], #=76=# [(17,1),(18,1),(6,1),(30,1),(29,1),(13,1),(23,1),(24,1),(14,1),(22,1),(21,1)], #=77=# [(17,1),(18,1),(6,1),(30,1),(29,1),(15,1),(25,1),(26,1),(16,1),(28,1),(27,1)], #=78=# [(17,1),(18,1),(8,1),(32,1),(31,1),(15,1),(25,1),(26,1),(14,1),(22,1),(21,1)], #=79=# [(17,1),(18,1),(8,1),(32,1),(31,1),(13,1),(23,1),(24,1),(16,1),(28,1),(27,1)], #=80=# [(17,1),(18,1),(6,1),(30,1),(29,1),(13,1),(23,1),(24,1),(14,1),(22,1),(21,1),(2,1),(19,1),(20,1),(8,1),(32,1),(31,1),(15,1),(25,1),(26,1),(16,1),(28,1),(27,1)], ], # SubperiodicGroup{3, 1} (3, 1) => Vector{Tuple{Int8,Int8}}[ #=1=# [], #=2=# [(2,1)], #=3=# [(5,1)], #=4=# [(7,1)], #=5=# [(7,2)], #=6=# [(5,1),(2,1),(7,1)], #=7=# [(5,2),(2,1),(7,2)], #=8=# [(6,1)], #=9=# [(6,2)], #=10=# [(8,1)], #=11=# [(6,1),(2,1),(8,1)], #=12=# [(6,2),(2,1),(8,2)], #=13=# [(6,1),(3,1),(5,1)], #=14=# [(6,2),(3,2),(5,1)], #=15=# [(6,1),(4,1),(7,1)], #=16=# [(6,1),(4,2),(7,2)], #=17=# [(6,2),(4,2),(7,1)], #=18=# [(5,1),(8,1),(4,1)], #=19=# [(5,1),(4,2),(8,2)], #=20=# [(6,1),(3,1),(5,1),(2,1),(8,1),(4,1),(7,1)], #=21=# [(6,1),(3,2),(5,2),(2,1),(8,1),(4,2),(7,2)], #=22=# [(3,2),(5,1),(6,2),(2,1),(4,2),(7,1),(8,2)], #=23=# [(6,1),(9,1),(10,1)], #=24=# [(6,2),(9,23),(10,24)], #=25=# [(6,1),(9,2),(10,2)], #=26=# [(6,2),(9,24),(10,23)], #=27=# [(6,1),(11,1),(12,1)], #=28=# [(6,1),(9,1),(10,1),(2,1),(8,1),(11,1),(12,1)], #=29=# [(6,1),(9,2),(10,2),(2,1),(8,1),(11,2),(12,2)], #=30=# [(6,1),(9,1),(10,1),(3,1),(5,1),(13,1),(14,1)], #=31=# [(6,2),(9,23),(10,24),(5,1),(3,2),(13,23),(14,24)], #=32=# [(6,1),(9,2),(10,2),(3,1),(5,1),(13,2),(14,2)], #=33=# [(6,2),(9,24),(10,23),(5,1),(3,2),(13,24),(14,23)], #=34=# [(6,1),(9,1),(10,1),(4,1),(7,1),(15,1),(16,1)], #=35=# [(6,1),(9,2),(10,2),(4,2),(7,2),(15,1),(16,1)], #=36=# [(6,1),(9,1),(10,1),(4,2),(7,2),(15,2),(16,2)], #=37=# [(6,1),(11,1),(12,1),(3,1),(5,1),(15,1),(16,1)], #=38=# [(6,1),(11,1),(12,1),(3,2),(5,2),(15,2),(16,2)], #=39=# [(6,1),(9,1),(10,1),(3,1),(5,1),(13,1),(14,1),(2,1),(8,1),(11,1),(12,1),(4,1),(7,1),(15,1),(16,1)], #=40=# [(6,1),(9,1),(10,1),(3,2),(5,2),(13,2),(14,2),(2,1),(8,1),(11,1),(12,1),(4,2),(7,2),(15,2),(16,2)], #=41=# [(6,1),(9,2),(10,2),(3,1),(5,1),(13,2),(14,2),(2,1),(8,1),(11,2),(12,2),(4,1),(7,1),(15,2),(16,2)], #=42=# [(17,1),(18,1)], #=43=# [(17,35),(18,36)], #=44=# [(17,36),(18,35)], #=45=# [(17,1),(18,1),(2,1),(19,1),(20,1)], #=46=# [(17,1),(18,1),(14,1),(22,1),(21,1)], #=47=# [(17,35),(18,36),(14,36),(22,35),(21,1)], #=48=# [(17,36),(18,35),(14,35),(22,36),(21,1)], #=49=# [(17,1),(18,1),(15,1),(25,1),(26,1)], #=50=# [(17,1),(18,1),(15,2),(25,2),(26,2)], #=51=# [(17,1),(18,1),(14,1),(22,1),(21,1),(2,1),(19,1),(20,1),(16,1),(28,1),(27,1)], #=52=# [(17,1),(18,1),(14,2),(22,2),(21,2),(2,1),(19,1),(20,1),(16,2),(28,2),(27,2)], #=53=# [(17,1),(18,1),(6,1),(30,1),(29,1)], #=54=# [(17,35),(18,36),(6,2),(30,37),(29,38)], #=55=# [(17,36),(18,35),(6,1),(30,36),(29,35)], #=56=# [(17,1),(18,1),(6,2),(30,2),(29,2)], #=57=# [(17,35),(18,36),(6,1),(30,35),(29,36)], #=58=# [(17,36),(18,35),(6,2),(30,38),(29,37)], #=59=# [(17,1),(18,1),(8,1),(32,1),(31,1)], #=60=# [(17,1),(18,1),(6,1),(30,1),(29,1),(2,1),(19,1),(20,1),(8,1),(32,1),(31,1)], #=61=# [(17,1),(18,1),(6,2),(30,2),(29,2),(2,1),(19,1),(20,1),(8,2),(32,2),(31,2)], #=62=# [(17,1),(18,1),(6,1),(30,1),(29,1),(13,1),(23,1),(24,1),(14,1),(22,1),(21,1)], #=63=# [(17,35),(18,36),(6,2),(30,37),(29,38),(13,35),(23,1),(24,36),(14,37),(22,2),(21,38)], #=64=# [(17,36),(18,35),(6,1),(30,36),(29,35),(13,36),(23,1),(24,35),(14,36),(22,1),(21,35)], #=65=# [(17,1),(18,1),(6,2),(30,2),(29,2),(13,1),(23,1),(24,1),(14,2),(22,2),(21,2)], #=66=# [(17,35),(18,36),(6,1),(30,35),(29,36),(13,35),(23,1),(24,36),(14,35),(22,1),(21,36)], #=67=# [(17,36),(18,35),(6,2),(30,38),(29,37),(13,36),(23,1),(24,35),(14,38),(22,2),(21,37)], #=68=# [(17,1),(18,1),(6,1),(30,1),(29,1),(15,1),(25,1),(26,1),(16,1),(28,1),(27,1)], #=69=# [(17,1),(18,1),(6,1),(30,1),(29,1),(15,2),(25,2),(26,2),(16,2),(28,2),(27,2)], #=70=# [(17,1),(18,1),(6,2),(30,2),(29,2),(15,1),(25,1),(26,1),(16,2),(28,2),(27,2)], #=71=# [(17,1),(18,1),(8,1),(32,1),(31,1),(15,1),(25,1),(26,1),(14,1),(22,1),(21,1)], #=72=# [(17,1),(18,1),(8,1),(32,1),(31,1),(15,2),(25,2),(26,2),(14,2),(22,2),(21,2)], #=73=# [(17,1),(18,1),(6,1),(30,1),(29,1),(13,1),(23,1),(24,1),(14,1),(22,1),(21,1),(2,1),(19,1),(20,1),(8,1),(32,1),(31,1),(15,1),(25,1),(26,1),(16,1),(28,1),(27,1)], #=74=# [(17,1),(18,1),(6,1),(30,1),(29,1),(13,2),(23,2),(24,2),(14,2),(22,2),(21,2),(2,1),(19,1),(20,1),(8,1),(32,1),(31,1),(15,2),(25,2),(26,2),(16,2),(28,2),(27,2)], #=75=# [(17,1),(18,1),(6,2),(30,2),(29,2),(13,1),(23,1),(24,1),(14,2),(22,2),(21,2),(2,1),(19,1),(20,1),(8,2),(32,2),(31,2),(15,1),(25,1),(26,1),(16,2),(28,2),(27,2)], ], # SubperiodicGroup{2, 1} (2, 1) => Vector{Tuple{Int8,Int8}}[ #=1=# [], #=2=# [(2,1)], #=3=# [(3,1)], #=4=# [(4,1)], #=5=# [(4,4)], #=6=# [(2,1),(3,1),(4,1)], #=7=# [(2,1),(3,4),(4,4)], ] )
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
903
using StaticArrays using Crystalline using Crystalline.SquareStaticMatrices using Test @testset "SquareStaticMatrices" begin A = [1 2 3; 4 5 6; 7 8 9] SA = SMatrix{3,3}(A) SSA = SqSMatrix(SA) @test (@inferred SqSMatrix(SA)) === SSA @test SqSMatrix{3}(A) === SSA @test SqSMatrix(A) === SSA @test SSA[1] == SA[1] @test SSA[1,1] == SA[1,1] @test SSA == SA @test SSA[1:end] == SA[1:end] @test convert(typeof(A), SSA) isa typeof(A) @test convert(SqSMatrix{3, Int}, eachcol(SSA)) === SSA @test SqSMatrix{3,Int}(A) === SqSMatrix{3}(A) @test SqSMatrix{3,Int}(A) == A @test (@inferred SMatrix(SSA)) === SA @test SMatrix{3,3}(SSA) === SA @test SMatrix{3,3,Int}(SSA) === SA @test SqSMatrix(SSA) === SSA === SqSMatrix{3,Int}(SSA) A′ = [1 2; 3 4] @test SqSMatrix(A′) === SqSMatrix{2}(A′) @test zero(SSA) == zero(A) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3083
using Crystalline, Test if !isdefined(Main, :LGIRS) LGIRS = lgirreps.(1:MAX_SGNUM[3], Val(3)) # loaded from our saved .jld2 files end @testset "k-vectors required by BandRepSet analysis" begin allpaths = false spinful = false debug = false @testset "Complex (no TR) irreps" begin # --- test complex-form irreps (not assuming time-reversal symmetry) --- for (sgnum, lgirsd) in enumerate(LGIRS) brs = bandreps(sgnum, allpaths=allpaths, spinful=spinful, timereversal=false) irlabs_brs = irreplabels(brs) klabs_brs = klabels(brs) irlabs_ISO = [label(lgir) for lgirs in values(lgirsd) for lgir in lgirs] klabs_ISO = keys(lgirsd) for (iridx_brs, irlab_brs) in enumerate(irlabs_brs) klab = klabel(irlab_brs) @test irlab_brs ∈ irlabs_ISO if debug && irlab_brs ∉ irlabs_ISO @info "Cannot find complex irrep $(irlab_brs) in ISOTROPY dataset (sgnum = $sgnum)" end # test that ISOTROPY's labelling & representation of k-vectors agree with BCD kidx_brs = findfirst(==(klab), klabs_brs) @test brs.kvs[kidx_brs] == position(first(lgirsd[klab])) if debug && brs.kvs[kidx_brs] ≠ position(first(lgirsd[klab])) println("Different definitions of k-point labels in space group ", sgnum) println(" brs, ", klab, ": ",string(brs.kvs[kidx_brs])) println(" ISO, ", klab, ": ",string(position(first(lgirsd[klab]))), "\n") end end end end @testset "Physically irreducible irreps/co-reps (with TR)" begin # --- test physically irreducible irreps/co-reps (assuming time-reversal symmetry) --- for (sgnum, lgirsd) in enumerate(LGIRS) brs = bandreps(sgnum, allpaths=allpaths, spinful=spinful, timereversal=true) irlabs_brs = irreplabels(brs) klabs_brs = klabels(brs) irlabs_ISO = Vector{String}() realirlabs_ISO = Vector{String}() klabs_ISO = keys(lgirsd) klabs_ISO = Vector{String}(undef, length(lgirsd)) for lgirs in values(lgirsd) append!(irlabs_ISO, [label(lgir) for lgir in lgirs]) append!(realirlabs_ISO, label.(realify(lgirs))) end irlabs_ISO = irlabs_ISO realirlabs_ISO = realirlabs_ISO for (iridx_brs, irlab_brs) in enumerate(irlabs_brs) klab = klabel(irlab_brs) @test irlab_brs ∈ realirlabs_ISO if debug && irlab_brs ∉ realirlabs_ISO @info "Cannot find real irrep $(irlab_brs) in ISOTROPY dataset (sgnum = $sgnum)" end # test that ISOTROPY's labelling & representation of k-vectors agree with BCD kidx_brs = findfirst(==(klab), klabs_brs) @test brs.kvs[kidx_brs] == position(first(lgirsd[klab])) end end end end @testset "BandRepSet and BandRep" begin brs = bandreps(230) # iterated concatenation of vectors of `brs` should give `matrix` @test stack(brs) == stack(brs) == hcat(brs...) # length of BandRep as vectors should be = number of irreps + 1 (i.e. includes filling) @test length(brs[1]) == length(brs[1].irvec)+1 @test brs[1] == vcat(brs[1].irvec, dim(brs[1])) end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2889
using Crystalline, Test, LinearAlgebra, StaticArrays @testset "Basis vectors" begin @testset "Conventional bases" begin for D in 1:3 for sgnum in 1:MAX_SGNUM[D] Rs = directbasis(sgnum, D) Gs = reciprocalbasis(Rs) @test all(dot(Gs[i], Rs[i])≈2π for i in 1:D) end end end @test reciprocalbasis(([1,0.1], [0.1, 1])) == reciprocalbasis([[1, 0.1], [0.1, 1]]) @testset "Primitive bases" begin for D in 1:3 for sgnum in 1:MAX_SGNUM[D] cntr = centering(sgnum, D) Rs = directbasis(sgnum, D) Rs′ = primitivize(Rs, cntr) Gs = reciprocalbasis(Rs) Gs′ᵃ = primitivize(Gs, cntr) Gs′ᵇ = reciprocalbasis(Rs′) @test Gs′ᵃ ≈ Gs′ᵇ @test all(dot(Gs′ᵇ[i], Rs′[i]) ≈ 2π for i in 1:D) @test conventionalize(Rs′, cntr) ≈ Rs @test conventionalize(Gs′ᵃ, cntr) ≈ Gs end end end @testset "Mixed inputs for constructors" begin Rs = ([1.0, 0.0, 0.0], [-0.5, sqrt(3)/2, 0.0], [0, 0, 1.25]) Rs′ = DirectBasis{3}(Rs) @test Rs′ == DirectBasis(Rs) # NTuple{3, Vector{3, Float64}} Rsˢˢ = convert(SVector{3,SVector{3,Float64}}, Rs) # SVector{3, SVector{3, Float64}} @test Rs′ == DirectBasis{3}(Rsˢˢ) == DirectBasis(Rsˢˢ) Rsᵛ = [Rs...] # Vector{Vector{Float64}} @test Rs′ == DirectBasis{3}(Rsᵛ) == DirectBasis(Rsᵛ) Rsˢ = SVector{3,Float64}.(Rs) # NTuple{3, SVector{3, Float64}} @test Rs′ == DirectBasis{3}(Rsˢ) == DirectBasis(Rsˢ) Rsᵗ = ntuple(i->ntuple(j->Rs[i][j], Val(3)), Val(3)) # NTuple{3, NTuple{3, Float64}} @test Rs′ == DirectBasis{3}(Rsᵗ) == DirectBasis(Rsᵗ) @test Rs′ == DirectBasis(Rs[1], Rs[2], Rs[3]) == DirectBasis{3}(Rs[1], Rs[2], Rs[3]) # ↑ Varargs / splatting of Vector{Float64} @test Rs′ == DirectBasis(Rsˢ[1], Rsˢ[2], Rsˢ[3]) == DirectBasis{3}(Rsˢ[1], Rsˢ[2], Rsˢ[3]) # ↑ Varargs / splatting of SVector{3, Float64} end @testset "AbstractPoint" begin t = (.1,.2,.3) v = [.1,.2,.3] s = @SVector [.1,.2,.3] r = ReciprocalPoint(.1,.2,.3) # conversion @test r == convert(ReciprocalPoint{3}, v) # AbstractVector conversion @test r == convert(ReciprocalPoint{3}, s) # StaticVector conversion # construction @test r == ReciprocalPoint(s) == ReciprocalPoint{3}(s) @test r == ReciprocalPoint(t) == ReciprocalPoint{3}(t) @test r == ReciprocalPoint(v) == ReciprocalPoint{3}(v) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
7199
using Test using Crystalline using Crystalline: dlm2struct @testset "calc_bandreps" begin # defines `is_exceptional_br` to check if a BR induced by a maximal Wyckoff position is an # "exceptional" BR, i.e., is in fact not an elementary BR (EBR) # include("ebr_exceptions.jl") # TODO: currently unused - figure out if we need it or not & keep/delete accordingly # ---------------------------------------------------------------------------------------- # @testset "2D: `calc_bandreps` vs. (tabulated) `bandreps`" begin # test that `bandreps` agrees with `calc_bandreps` in 2D (since the former is generated # by the latter; basically check that the data behind the former is up-to-date) for sgnum in 1:17 for timereversal in (false, true) @test convert.(BandRep, calc_bandreps(sgnum, Val(2); timereversal, allpaths = false)) == bandreps(sgnum, 2; timereversal, allpaths = false) end end end @testset "3D: every reference EBR must have a match in a calculated BR" begin debug = false error_counts = Dict{String, Int}() for sgnum in 1:230 had_sg_error = false for timereversal in (false, true) had_tr_error = false _brsᶜ = calc_bandreps(sgnum, Val(3); timereversal, allpaths = false) brsᶜ = convert(BandRepSet, _brsᶜ) brsʳ = bandreps(sgnum, 3; timereversal, allpaths = false) # find a permutation of the irreps in `brsʳ` that matches `brsᶜ`'s sorting, s.t. # `brsʳ.irlabs[irʳ²ᶜ_perm] == brsᶜ.irlabs` irʳ²ᶜ_perm = [something(findfirst(==(irᶜ), brsʳ.irlabs)) for irᶜ in brsᶜ.irlabs] append!(irʳ²ᶜ_perm, length(brsᶜ.irlabs)+1) # append occupation number seen_wp = Dict{String, Bool}() for brʳ in brsʳ wpʳ = brʳ.wyckpos idx = findfirst(brᶜ -> brᶜ.wyckpos == wpʳ && brᶜ.label == brʳ.label, brsᶜ) haskey(seen_wp, wpʳ) || (seen_wp[wpʳ] = false) if isnothing(idx) # this can sometimes happen spuriously because Bilbao (i.e. `brsʳ`) # lists the EBRs with unabbreviated Mulliken labels (e.g., A₁ rather # than A or ¹E²E rather than E) even when it is possible to abbreviate # unambiguously (what `mulliken` does and what `brsᶜ` consequently # references); we account for that by doing a subsequent, slighly looser # check (below) idx = findfirst(brsᶜ) do brᶜ brʳ.wyckpos == brᶜ.wyckpos || return false labʳ = replace(brʳ.label, "↑G"=>"") labᶜ = replace(brᶜ.label, "↑G"=>"") length(labᶜ) == 1 && only(labᶜ) == first(labʳ) && return true # e.g., A ~ A₁ labʳ′ = replace(labʳ, "¹"=>"", "²"=>"") # e.g., ¹E²E ~ E labʳ′ = replace(labʳ′, "EE" => "E", "EgEg" => "Eg", "EᵤEᵤ" => "Eᵤ", "E₁E₁" => "E₁", "E₂E₂" => "E₂", "E′′E′′" => "E′′", "E′E′" => "E′", "E₁gE₁g" => "E₁g", "E₂gE₂g" => "E₂g", "E₁ᵤE₁ᵤ" => "E₁ᵤ", "E₂ᵤE₂ᵤ" => "E₂ᵤ") labʳ′ == labᶜ && return true end end @test idx !== nothing # test that an associated BR exists in brsʳ (it must) idx = something(idx) # there are a number of cases where it is impossible to test uniquely # against Bilbao, because the assignment of irrep label to the site symmetry # group is ambiguous (e.g., for site groups isomorphic to 222; but also for # mmm and mm2): in this case, the assignment of irreps depends on a choice # of coordinate system, which we cannot be uniquely determined but # so, for these cases, we cannot do a one-to-one comparison (but we can at # least test whether the reference Bilbao vector occurs in the set of # computed band representation vectors) if brʳ.sitesym ∉ ("222", "mmm", "mm2", "-4m2") brᶜ = brsᶜ[idx] @test Vector(brᶜ) == brʳ[irʳ²ᶜ_perm] @test dim(brᶜ) == dim(brʳ) elseif brʳ.sitesym == "-4m2" # this is a special case: in principle, it is possible to uniquely # assign the irrep labels, but we currently assign ones that are # different from those in Bilbao (see issue #59) # FIXME: remove this here and above once #59 is resolved @test brʳ[irʳ²ᶜ_perm] ∈ Vector.(brsᶜ) continue else # simply test that the reference Bilbao _vector_ is in the set of # computed EBRs @test brʳ[irʳ²ᶜ_perm] ∈ Vector.(brsᶜ) continue end if debug brᶜ = brsᶜ[idx] if !(Vector(brᶜ) == brʳ[irʳ²ᶜ_perm]) had_sg_error || (print("sgnum = $sgnum\n"); had_sg_error = true) had_tr_error || (println(" timereversal = $timereversal"); had_tr_error = true) if !seen_wp[wpʳ] print(" site = $wpʳ (") printstyled("$(brʳ.sitesym)"; color=:yellow) println(")") seen_wp[wpʳ] = true end println(" $(replace(brʳ.label, "↑G"=>""))") brʳ′ = deepcopy(brʳ) brʳ′.irvec .= brʳ.irvec[irʳ²ᶜ_perm[1:end-1]] brʳ′.irlabs .= brʳ.irlabs[irʳ²ᶜ_perm[1:end-1]] println(" ref = $brʳ′") println(" calc = $brᶜ") if haskey(error_counts, brʳ.sitesym) error_counts[brʳ.sitesym] += 1 else error_counts[brʳ.sitesym] = 1 end end end end end debug && had_sg_error && println() end end @testset "Plane groups vs. parent space groups" begin for (sgnum²ᴰ, sgnum³ᴰ) in enumerate(Crystalline.PLANE2SPACE_NUMS) for timereversal in (false, true) brs²ᴰ = bandreps(sgnum²ᴰ, 2; timereversal, allpaths = false) brs³ᴰ = bandreps(sgnum³ᴰ, 3; timereversal, allpaths = false) # dimensions @test sort!(dim.(brs²ᴰ)) == sort!(dim.(brs³ᴰ)) # topological classification @test classification(brs²ᴰ) == classification(brs³ᴰ) end end end end # @testset "calc_bandreps" begin
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
1882
using Crystalline, Test, LinearAlgebra if !isdefined(Main, :LGIRSDIM) LGIRSDIM = Tuple(lgirreps.(1:MAX_SGNUM[D], Val(D)) for D in 1:3) end @testset "CharacterTable and orthogonality theorems" begin @testset "Little group irreps" begin for LGIRS in LGIRSDIM # ... D in 1:3 for lgirsd in LGIRS for lgirs in values(lgirsd) ct = characters(lgirs) χs = matrix(ct) # each column is a different representation Nₒₚ = length(operations(ct)) # 1ˢᵗ orthogonality theorem: ∑ᵢ|χᵢ⁽ᵃ⁾|² = Nₒₚ⁽ᵃ⁾ @test all(n->isapprox.(n, Nₒₚ, atol=1e-14), sum(abs2, χs, dims=1)) # 2ⁿᵈ orthogonality theorem: ∑ᵢχᵢ⁽ᵃ⁾*χᵢ⁽ᵝ⁾ = δₐᵦNₒₚ⁽ᵃ⁾ @test χs'*χs ≈ Nₒₚ*I end end end # for LGIRS in LGIRSDIM end # @testset "Little group irreps" @testset "Point group irreps" begin for D in 1:3 for pgiuc in PG_IUCs[D] pgirs = pgirreps(pgiuc, Val(D)) ct = characters(pgirs) χs = matrix(ct) # each column is a different representation Nₒₚ = length(operations(ct)) # 1ˢᵗ orthogonality theorem: ∑ᵢ|χᵢ⁽ᵃ⁾|² = Nₒₚ⁽ᵃ⁾ @test all(n->isapprox.(n, Nₒₚ, atol=2e-14), sum(abs2, χs, dims=1)) # 2ⁿᵈ orthogonality theorem: ∑ᵢχᵢ⁽ᵃ⁾*χᵢ⁽ᵝ⁾ = δₐᵦNₒₚ⁽ᵃ⁾ @test χs'*χs ≈ Nₒₚ*I end end end @testset "Indexing" begin pgirs = pgirreps("m-3m", Val(3)) ct = characters(pgirs) χs = matrix(ct) @test ct[3] == χs[3] @test ct[:,3] == χs[:,3] @test ct[2,:] == χs[2,:] @test ct' == χs' @test ct'*ct ≈ χs'*χs # may differ since one dispatches to generic matmul, the other to BLAS @test size(ct) == size(χs) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3159
using Crystalline, Test @testset "Band representations" begin allpaths = false spinful = false # Check classification of spinless, time-reversal invariant band representations # using Table 4 of Po, Watanabe, & Vishwanath Nature Commun 8, 50 (2017). # Z₂: 3, 11, 14, 27, 37, 48, 49, 50, 52, 53, 54, 56, 58, 60, 66, # 68, 70, 75, 77, 82, 85, 86, 88, 103, 124, 128, 130, 162, # 163, 164, 165, 166, 167, 168, 171, 172, 176, 184, 192, # 201, 203 # Z₂×Z₂: 12, 13, 15, 81, 84, 87 # Z₂×Z₄: 147, 148 # Z₂×Z₂×Z₂: 10, 83, 175 # Z₂×Z₂×Z₂×Z₄: 2 @testset "Classification (TR invar., spinless)" begin table4 = ["Z₁" for _=1:230] table4[[3, 11, 14, 27, 37, 48, 49, 50, 52, 53, 54, 56, 58, 60, 66, 68, 70, 75, 77, 82, 85, 86, 88, 103, 124, 128, 130, 162, 163, 164, 165, 166, 167, 168, 171, 172, 176, 184, 192, 201, 203]] .= "Z₂" table4[[12, 13, 15, 81, 84, 87]] .= "Z₂×Z₂" table4[[147, 148]] .= "Z₂×Z₄" table4[[10, 83, 175]] .= "Z₂×Z₂×Z₂" table4[2] = "Z₂×Z₂×Z₂×Z₄" for sgnum = 1:230 brs = bandreps(sgnum, allpaths=allpaths, spinful=spinful, timereversal=true) @test classification(brs) == table4[sgnum] end end # Check basis dimension of spinless, time-reversal invariant band representations # using Table 2 of Po, Watanabe, & Vishwanath Nature Commun 8, 50 (2017). @testset "Band structure dimension (TR invar., spinless)" begin table4 = Vector{Int}(undef, 230) table4[[1, 4, 7, 9, 19, 29, 33, 76, 78, 144, 145, 169, 170]] .= 1 table4[[8, 31, 36, 41, 43, 80, 92, 96, 110, 146, 161, 198]] .= 2 table4[[5, 6, 18, 20, 26, 30, 32, 34, 40, 45, 46, 61, 106, 109, 151, 152, 153, 154, 159, 160, 171, 172, 173, 178, 179, 199, 212, 213]] .= 3 table4[[24, 28, 37, 39, 60, 62, 77, 79, 91, 95, 102, 104, 143, 155, 157, 158, 185, 186, 196, 197, 210]] .= 4 table4[[3, 14, 17, 27, 42, 44, 52, 56, 57, 94, 98, 100, 101, 108, 114, 122, 150, 156, 182, 214, 220]] .= 5 table4[[11, 15, 35, 38, 54, 70, 73, 75, 88, 90, 103, 105, 107, 113, 142, 149, 167, 168, 184, 195, 205, 219]] .= 6 table4[[13, 22, 23, 59, 64, 68, 82, 86, 117, 118, 120, 130, 163, 165, 180, 181, 203, 206, 208, 209, 211, 218, 228, 230]] .= 7 table4[[21, 58, 63, 81, 85, 97, 116, 133, 135, 137, 148, 183, 190, 201, 217]] .= 8 table4[[2, 25, 48, 50, 53, 55, 72, 99, 121, 126, 138, 141, 147, 188, 207, 216, 222]] .= 9 table4[[12, 74, 93, 112, 119, 176, 177, 202, 204, 215]] .= 10 table4[[66, 84, 128, 136, 166, 227]] .= 11 table4[[51, 87, 89, 115, 129, 134, 162, 164, 174, 189, 193, 223, 226]] .= 12 table4[[16, 67, 111, 125, 194, 224]] .= 13 table4[[49, 140, 192, 200]] .= 14 table4[[10, 69, 71, 124, 127, 132, 187]] .= 15 table4[[225, 229]] .= 17 table4[[65, 83, 131, 139, 175]] .= 18 table4[221] = 22 table4[191] = 24 table4[[47, 123]] .= 27 for sgnum = 1:230 brs = bandreps(sgnum, allpaths=allpaths, spinful=spinful, timereversal=true) @test basisdim(brs) == table4[sgnum] end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
1464
using Test, Crystalline, StaticArrays @testset "Compatibility" begin @testset "Subduction" begin lgirsd = lgirreps(218) Rᵢ²¹⁸ = realify(lgirsd["R"]) # 2D, 4D, & 6D irreps R₁R₂, R₃R₃, & R₄R₅ at R = [½,½,½] Λᵢ²¹⁸ = realify(lgirsd["Λ"]) # 1D, 1D, & 2D irreps Λ₁, Λ₂, Λ₃ at Λ = [α,α,α] # --- point to line subduction (R → Λ) --- # R₁R₂ → Λ₁+Λ₂ | R₃R₃ → 2Λ₃ | R₄R₅ → Λ₁+Λ₂+2Λ₃ @test [[subduction_count(Rᵢ, Λᵢ) for Λᵢ in Λᵢ²¹⁸] for Rᵢ in Rᵢ²¹⁸] == [[1,1,0],[0,0,2],[1,1,2]] # --- corep-specifics --- R₄R₅²¹⁸ = Rᵢ²¹⁸[end] # test that complex corep subduces to itself @test subduction_count(R₄R₅²¹⁸, R₄R₅²¹⁸) == 1 # test that physically real corep subduces to its complex components Rᵢ²¹⁸_notr = lgirsd["R"] @test [subduction_count(R₄R₅²¹⁸, Rᵢ_notr) for Rᵢ_notr in Rᵢ²¹⁸_notr] == [0,0,0,1,1] # --- sub-groups --- # test that two distinct coreps in different groups decompose consistently R₄²²² = realify(lgirreps(222)["R"])[end]; # 6D irrep R₄R₅²¹⁸′ = deepcopy(R₄R₅²¹⁸) # 6D irrep # SG 218 is a subgroup of 222, but in a different setting - so convert the little group # of 218 to that of 222 lg_ops = operations(group(R₄R₅²¹⁸′)) lg_ops .= transform.(lg_ops, Ref(one(SMatrix{3,3})), Ref((@SVector [1,1,1])/4)) # check that R₄²²² subduces into R₄R₅²¹⁸ @test subduction_count(R₄²²², R₄R₅²¹⁸′) == 1 end # @testset "Subduction" end # @testset "Compatibility"
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
5607
using Crystalline, Test @testset "Conjugacy classes" begin @testset "Identical number of conjugacy classes and irreps" begin # The number of conjugacy classes should equal the number of inequivalent irreps # (see e.g. Inui, Section 4.6.1 or Bradley & Cracknel, Theorem 1.3.10) for "linear" # or ordinary irreps (i.e. not ray/projective irreps) @testset "Point groups" begin for Dᵛ in (Val(1), Val(2), Val(3)) D = typeof(Dᵛ).parameters[1] for pgiuc in Crystalline.PG_IUCs[D] pg = pointgroup(pgiuc, Dᵛ) conj_classes = classes(pg) pgirs = pgirreps(pgiuc, Dᵛ) @test length(pgirs) == length(conj_classes) end end end @testset "Little groups" begin for Dᵛ in (Val(1), Val(2), Val(3)) D = typeof(Dᵛ).parameters[1] for sgnum in 1:MAX_SGNUM[D] lgirsd = lgirreps(sgnum, Dᵛ) for (klab, lgirs) in lgirsd lg = group(first(lgirs)) includes_ray_reps = any(lgir->Crystalline.israyrep(lgir)[1], lgirs) if !includes_ray_reps # the number of conjugacy classes is not generally equal to the # number of inequivalent irreps if the irreps include ray (also # called projective) representations as discussed by Inui, Sec. 5.4 # (instead, the number of "ray classes" is equal to the number of # inequivalent irreps); so we only test if there are no ray reps conj_classes = classes(lg) @test length(lgirs) == length(conj_classes) end end end end end end @testset "Primitive/conventional setting vs. conjugacy classes" begin # The number of conjugacy classes should be invariant of whether we choose to compute it # in a primitive or conventional setting (provided we specify the `cntr` argument # correctly to `classes`): for Dᵛ in (Val(1), Val(2), Val(3)) D = typeof(Dᵛ).parameters[1] for sgnum in 1:MAX_SGNUM[D] # space groups sgᶜ = spacegroup(sgnum, Dᵛ) # conventional setting sgᵖ = primitivize(sgᶜ) # primitive setting @test length(classes(sgᶜ)) == length(classes(sgᵖ, nothing)) # little groups lgsᶜ = littlegroups(sgnum, Dᵛ) for lgᶜ in values(lgsᶜ) lgᵖ = primitivize(lgᶜ) @test length(classes(lgᶜ)) == length(classes(lgᵖ, nothing)) end end end end @testset "`SiteGroup` conjugacy classes" begin # `SiteGroup` operations must multiply with `modτ = false`, which must be propagated to # `classes`; check that we keep doing this correctly by comparing with a worked example sgnum = 141 sg = spacegroup(sgnum, Val(3)) wp = wyckoffs(sgnum, Val(3))[end] # 4a position siteg = sitegroup(sg, wp) conj_classes = classes(siteg) conj_classes_reference = [ SymOperation{3}.(["x,y,z"]), SymOperation{3}.(["y-3/4,x+3/4,-z+1/4", "-y+3/4,-x+3/4,-z+1/4"]), SymOperation{3}.(["-y+3/4,x+3/4,-z+1/4", "y-3/4,-x+3/4,-z+1/4"]), SymOperation{3}.(["-x,y,z", "x,-y+3/2,z"]), SymOperation{3}.(["-x,-y+3/2,z"]) ] @test Set(conj_classes) == Set(conj_classes_reference) @test length(conj_classes) == 5 == length(classes(pointgroup("-4m2"))) end # @testset "`SiteGroup` conjugacy classes" @testset "`sitegroups` accessor" begin sgnum = 141 sg = spacegroup(sgnum, Val(3)) wps = wyckoffs(sgnum, Val(3)) sitegs_1 = sitegroups(sg) @test Set(position.(sitegs_1)) == Set(wps) @test sitegroups(sg) == sitegroups(sgnum, 3) == sitegroups(sgnum, Val(3)) end # TODO # @testset "Conjugacy classes and characters" begin # the characters of elements in the same conjugacy class must be identical for ordinary # (non-ray) irreps. I.e., for two conjugate elements ``a`` and ``b`` in ``G``, there # exists a ``g ∈ G`` s.t. ``gag⁻¹ = b``. As a consequence: ``χ(b) = χ(gag⁻¹) = # Tr(D(gag⁻¹)) = Tr(D(g)D(a)D(g⁻¹)) = Tr(D(a)D(g⁻¹)D(g)) = Tr(D(a)) = χ(a)``. # end end # @testset "Conjugacy classes" @testset "Abelian groups" begin # Abelian groups only have one-dimensional irreps (unless there are ray-irreps, then the # rule doesn't hold in general) @testset "Point groups" begin for Dᵛ in (Val(1), Val(2), Val(3)) D = typeof(Dᵛ).parameters[1] for pgiuc in Crystalline.PG_IUCs[D] pg = pointgroup(pgiuc, Dᵛ) if is_abelian(pg) pgirs = pgirreps(pgiuc, Dᵛ) @test all(pgir -> Crystalline.irdim(pgir) == 1, pgirs) end end end end @testset "Little groups" begin for Dᵛ in (Val(1), Val(2), Val(3)) D = typeof(Dᵛ).parameters[1] for sgnum in 1:MAX_SGNUM[D] lgirsd = lgirreps(sgnum, Dᵛ) for (klab, lgirs) in lgirsd lg = group(first(lgirs)) if is_abelian(lg) includes_ray_reps = any(lgir->Crystalline.israyrep(lgir)[1], lgirs) if !includes_ray_reps @test all(lgir -> Crystalline.irdim(lgir) == 1, lgirs) end end end end end end end # @testset "Abelian groups"
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2564
# general exceptions (Table 3 of https://doi.org/10.1103/PhysRevB.97.035139) const ebr_exceptions = Dict{Int, Tuple{Bool, String, Vector{String}}}( # sgnum => (applies_with_tr, site group (Schoenflies notation), irreps (Mulliken notation)) ([163, 165, 167, 228, 230, 223, 211, 208, 210, 228, 188, 190, 192, 193] .=> Ref((false, "D₃" #=312/321=#, ["E"] #=Γ₃=#))) ..., 192 => ((false, "D₆" #=622=#, ["E₁", "E₂"] #=Γ₅, Γ₆=#)), ([207, 211, 222, 124, 140] .=> Ref((false, "D₄" #=422=#, ["E"] #=Γ₅=#))) ..., ([229, 226, 215, 217, 224, 131, 132, 139, 140, 223] .=> Ref((true, "D₂d" #=-42m/-4m2=#, ["E"] #=Γ₅=#))) ... ) # time-reversal exceptions (Table 2 of https://doi.org/10.1103/PhysRevB.97.035139) # always associated with site group S₄ (-4) and site irrep E (Γ₃Γ₄) const ebr_tr_exceptions = (84, 87, 135, 136, 112, 116, 120, 121, 126, 130, 133, 138, 142, 218, 230, 222, 217, 219, 228) # ---------------------------------------------------------------------------------------- # function is_exceptional_br(sgnum::Integer, br::BandRep; timereversal::Bool=true) # first check (Table 2): a composite physically real complex bandrep ("realified" rep)? (timereversal && is_exceptional_tr_br(sgnum, br)) && return true # second check (Table 3) haskey(ebr_exceptions, sgnum) || return false except_applies_with_tr, except_sitesym, except_siteirlabs = ebr_exceptions[sgnum] # if we have TR, table 3 entries only apply if `except_applies_with_tr = true` timereversal && (except_applies_with_tr || return false) # check if site symmetry group matches br_sitesym_iuc = br.sitesym == "32" ? "321" : br.sitesym br_sitesym_schoenflies = Crystalline.PG_IUC2SCHOENFLIES[br_sitesym_iuc] except_sitesym == br_sitesym_schoenflies || return false # didn't match # check if site irrep matches br_siteirlab = replace(br.label, "↑G"=>"") br_siteirlab ∈ except_siteirlabs || return false # didn't match return true end function is_exceptional_tr_br(sgnum::Integer, br::BandRep) sgnum ∈ ebr_tr_exceptions || return false # check if site symmetry group is S₄ br_sitesym_iuc = br.sitesym == "32" ? "321" : br.sitesym br_sitesym_schoenflies = Crystalline.PG_IUC2SCHOENFLIES[br_sitesym_iuc] br_sitesym_schoenflies == "S₄" || return false # check if site irrep is E br_siteirlab = replace(br.label, "↑G"=>"") br_siteirlab == "E" || return false return true end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
4525
# ---------------------------------------------------------------------------------------- # module CrystallineTestGeneratorsXYZT # Module with functionality to load generators from stored xyzt-data .csv files # (this was how the data was loaded in Crystalline ≤v0.4.22) using Crystalline using Crystalline: _unmangle_pgiuclab, pointgroup_num2iuc, # point groups _check_valid_sgnum_and_dim, # space group _subperiodic_kind, _check_valid_subperiodic_num_and_dim, # subperiodic groups _throw_invalid_dim # general export generators_from_xyzt const XYZT_GEN_DATA_DIR = joinpath(@__DIR__, "data", "xyzt", "generators") # ---------------------------------------------------------------------------------------- # # Point groups # ---------------------------------------------------------------------------------------- # function read_pggens_xyzt(iuclab::String, D::Integer) @boundscheck D ∉ (1,2,3) && _throw_invalid_dim(D) @boundscheck iuclab ∉ PG_IUCs[D] && throw(DomainError(iuclab, "iuc label not found in database (see possible labels in PG_IUCs[D])")) filepath = joinpath(XYZT_GEN_DATA_DIR, "pgs/"*string(D)*"d/"*_unmangle_pgiuclab(iuclab)*".csv") return readlines(filepath) end function generators_from_xyzt(iuclab::String, ::Type{PointGroup{D}}=PointGroup{3}) where D ops_str = read_pggens_xyzt(iuclab, D) return SymOperation{D}.(ops_str) end function generators_from_xyzt(pgnum::Integer, ::Type{PointGroup{D}}, setting::Integer=1) where D iuclab = pointgroup_num2iuc(pgnum, Val(D), setting) return generators_from_xyzt(iuclab, PointGroup{D}) end # ---------------------------------------------------------------------------------------- # # Space groups # ---------------------------------------------------------------------------------------- # function generators_from_xyzt(sgnum::Integer, ::Type{SpaceGroup{D}}=SpaceGroup{3}) where D ops_str = read_sggens_xyzt(sgnum, D) return SymOperation{D}.(ops_str) end function read_sggens_xyzt(sgnum::Integer, D::Integer) @boundscheck _check_valid_sgnum_and_dim(sgnum, D) filepath = joinpath(XYZT_GEN_DATA_DIR, "sgs/"*string(D)*"d/"*string(sgnum)*".csv") return readlines(filepath) end # ---------------------------------------------------------------------------------------- # # Subperiodic groups # ---------------------------------------------------------------------------------------- # function generators_from_xyzt(num::Integer, ::Type{SubperiodicGroup{D,P}}) where {D,P} ops_str = read_subperiodic_gens_xyzt(num, D, P) return SymOperation{D}.(ops_str) end function read_subperiodic_gens_xyzt(num::Integer, D::Integer, P::Integer) @boundscheck _check_valid_subperiodic_num_and_dim(num, D, P) kind = _subperiodic_kind(D, P) filepath = joinpath(XYZT_GEN_DATA_DIR, "subperiodic/"*kind*"/"*string(num)*".csv") return readlines(filepath) end end # module CrystallineTestGeneratorsXYZT # ---------------------------------------------------------------------------------------- # using Crystalline, Test using .CrystallineTestGeneratorsXYZT @testset "Agreement between \"coded\" group generators and xyzt-data" begin @testset "Point groups" begin for D in 1:3 Dᵛ = Val(D) for (pgnum, pgiucs) in enumerate(Crystalline.PG_NUM2IUC[D]) for (setting, pgiuc) in enumerate(pgiucs) pg_gens = generators(pgiuc, PointGroup{D}) pg_gens_from_xyzt = generators_from_xyzt(pgiuc, PointGroup{D}) pg_gens′ = generators(pgnum, PointGroup{D}, setting) @test pg_gens ≈ pg_gens_from_xyzt @test pg_gens == pg_gens′ end end end end @testset "Space groups" begin for D in 1:3 Dᵛ = Val(D) for sgnum in 1:MAX_SGNUM[D] sg_gens = generators(sgnum, SpaceGroup{D}) sg_gens_from_xyzt = generators_from_xyzt(sgnum, SpaceGroup{D}) @test sg_gens ≈ sg_gens_from_xyzt end end end @testset "Subperiodic groups" begin for (D,P) in ((3, 2), (3, 1), (2, 1)) Dᵛ, Pᵛ = Val(D), Val(P) for num in 1:MAX_SUBGNUM[(D,P)] subg_gens = generators(num, SubperiodicGroup{D,P}) subg_gens_from_xyzt = generators_from_xyzt(num, SubperiodicGroup{D,P}) @test subg_gens ≈ subg_gens_from_xyzt end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
4854
# ---------------------------------------------------------------------------------------- # module CrystallineTestXYZT # Module with functionality to load `SymOperation`s from stored xyzt-data .csv files # (this was how the data was loaded in Crystalline ≤v0.4.22) using Crystalline using Crystalline: _unmangle_pgiuclab, pointgroup_iuc2num, # point groups _check_valid_sgnum_and_dim, # space group _subperiodic_kind, _check_valid_subperiodic_num_and_dim, # subperiodic groups _throw_invalid_dim # general export pointgroup_from_xyzt, spacegroup_from_xyzt, subperiodicgroup_from_xyzt const XYZT_DATA_DIR = joinpath(@__DIR__, "data", "xyzt", "groups") # ---------------------------------------------------------------------------------------- # # Point groups # ---------------------------------------------------------------------------------------- # @inline function pointgroup_from_xyzt(iuclab::String, ::Val{D}=Val(3)) where D pgnum = pointgroup_iuc2num(iuclab, D) # this is not generally a particularly well-established numbering ops_str = read_pgops_xyzt(iuclab, D) return PointGroup{D}(pgnum, iuclab, SymOperation{D}.(ops_str)) end # Here, and below for space groups and subperiodic groups, we obtain the symmetry operations # via a set of stored .csv files listing the operations in xyzt format for each group: the # data is stored in `test/data/xyzt-operations/` function read_pgops_xyzt(iuclab::String, D::Integer) @boundscheck D ∉ (1,2,3) && _throw_invalid_dim(D) @boundscheck iuclab ∉ PG_IUCs[D] && throw(DomainError(iuclab, "iuc label not found in database (see possible labels in PG_IUCs[D])")) filepath = joinpath(XYZT_DATA_DIR, "pgs/"*string(D)*"d/"*_unmangle_pgiuclab(iuclab)*".csv") return readlines(filepath) end # ---------------------------------------------------------------------------------------- # # Space groups # ---------------------------------------------------------------------------------------- # function spacegroup_from_xyzt(sgnum::Integer, ::Val{D}=Val(3)) where D ops_str = read_sgops_xyzt(sgnum, D) ops = SymOperation{D}.(ops_str) return SpaceGroup{D}(sgnum, ops) end function read_sgops_xyzt(sgnum::Integer, D::Integer) @boundscheck _check_valid_sgnum_and_dim(sgnum, D) filepath = joinpath(XYZT_DATA_DIR, "sgs/"*string(D)*"d/"*string(sgnum)*".csv") return readlines(filepath) end # ---------------------------------------------------------------------------------------- # # Subperiodic groups # ---------------------------------------------------------------------------------------- # function subperiodicgroup_from_xyzt(num::Integer, ::Val{D}=Val(3), ::Val{P}=Val(2)) where {D,P} ops_str = read_subperiodic_ops_xyzt(num, D, P) ops = SymOperation{D}.(ops_str) return SubperiodicGroup{D,P}(num, ops) end function read_subperiodic_ops_xyzt(num::Integer, D::Integer, P::Integer) @boundscheck _check_valid_subperiodic_num_and_dim(num, D, P) kind = _subperiodic_kind(D, P) filepath = joinpath(XYZT_DATA_DIR, "subperiodic/"*kind*"/"*string(num)*".csv") return readlines(filepath) end # ---------------------------------------------------------------------------------------- # # Magnetic space groups # ---------------------------------------------------------------------------------------- # # Maybe TODO end # module CrystallineTestXYZT # ---------------------------------------------------------------------------------------- # using Crystalline, Test using .CrystallineTestXYZT @testset "Agreement between \"coded\" group operations and xyzt-data" begin @testset "Point groups" begin for D in 1:3 Dᵛ = Val(D) for (pgnum, pgiucs) in enumerate(Crystalline.PG_NUM2IUC[D]) for (setting, pgiuc) in enumerate(pgiucs) pg = pointgroup(pgiuc, Dᵛ) pg_from_xyzt = pointgroup_from_xyzt(pgiuc, Dᵛ) pg′ = pointgroup(pgnum, Dᵛ, setting) @test pg ≈ pg_from_xyzt @test pg == pg′ end end end end @testset "Space groups" begin for D in 1:3 Dᵛ = Val(D) for sgnum in 1:MAX_SGNUM[D] sg = spacegroup(sgnum, Dᵛ) sg_from_xyzt = spacegroup_from_xyzt(sgnum, Dᵛ) @test sg ≈ sg_from_xyzt end end end @testset "Subperiodic groups" begin for (D,P) in ((3, 2), (3, 1), (2, 1)) Dᵛ, Pᵛ = Val(D), Val(P) for num in 1:MAX_SUBGNUM[(D,P)] subg = subperiodicgroup(num, Dᵛ, Pᵛ) subg_from_xyzt = subperiodicgroup_from_xyzt(num, Dᵛ, Pᵛ) @test subg ≈ subg_from_xyzt end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
8008
using Crystalline, Test, LinearAlgebra # TODO: Cannot pass unless src/special_representation_domain_kpoints.jl is reincluded in # src/Crystalline.jl. Currently disabled due to compilation time concerns. @testset "Representation vs basic domain BZ" begin # disable if src/special_representation_domain_kpoints.jl is reincluded if (@test_broken false) isa Test.Broken println("Skipping tests of src/special_representation_domain_kpoints.jl") else @testset "Identification of holosymmetric space groups" begin # Check that our cached values of the holosymmetric space group numbers # (stored in Crystalline.HOLOSYMMETRIC_SGNUMS) agree with the results of # Crystalline._find_holosymmetric_sgnums(D) recalc_holosgnums = Tuple(tuple(Crystalline._find_holosymmetric_sgnums(D)...) for D = 1:3) @test recalc_holosgnums == Crystalline.HOLOSYMMETRIC_SGNUMS # Compare our calculation of the holosymmetric space groups with Table 3.10 # of CDML: that table lists the `sgnum`s of every _symmorphic_ nonholosymmetric # group in 3D, allowing us a sanity check on _find_holosymmetric_sgnums(D::Integer). holo_sgnums = Crystalline._find_holosymmetric_sgnums(3) nonholo_sgnums = filter(sgnum->sgnum∉holo_sgnums, 1:MAX_SGNUM[3]) symmorph_nonholo_sgnums = filter(issymmorph, nonholo_sgnums) symmorph_nonholo_sgnums_CDML = ( 1,3,6,5,8,16,25,21,35,38,22,42,23,44,75,81,83,89,99,111,115,79,82,87, 97,107,119,121,195,200,207,215,196,202,209,216,197,204,211,217,146, 148,155,160,143,147,150,157,168,149,156,162,164,177,183,174,175,189,187) @test symmorph_nonholo_sgnums == sort([symmorph_nonholo_sgnums_CDML...]) # Check that our cached values for ARITH_PARTNER_GROUPS remain computed correctly: (avoid bit-rotting) arith_partner_groups′ = Tuple(tuple(getindex.(Crystalline._find_arithmetic_partner.(1:MAX_SGNUM[D], D), 2)...) for D in 1:3) @test Crystalline.ARITH_PARTNER_GROUPS == arith_partner_groups′ end # Test the corner cases noted for the method `_find_holosymmetric_sgnums` @testset "Cornercases and transformations for _find_holosymmetric_sgnums" begin for (sgnum, info) in zip(keys(Crystalline.CORNERCASES_SUBSUPER_NORMAL_SGS), values(Crystalline.CORNERCASES_SUBSUPER_NORMAL_SGS)) sgnum₀ = info[1] # supergroup number P, p = info[2:3] # transformation pair (P,p) cntr = centering(sgnum, 3) G = operations(spacegroup(sgnum, 3)) # G in conventional basis of sgnum Gᵖ = reduce_ops(G, cntr, false) # G in primitive basis of sgnum G₀ = operations(spacegroup(sgnum₀, 3)) # G₀ in conventional basis of sgnum₀ G₀′ = transform.(G₀, Ref(P), Ref(p)) # G₀ in conventional basis of sgnum G₀′ᵖ = reduce_ops(G₀′, cntr, false) # G₀ in primitive basis of sgnum # verify that the G₀′ is indeed a normal, holosymmetric supergroup of G @test issubgroup(G₀′ᵖ, Gᵖ) && issubgroup(G₀′, G) # test for both conventional @test isnormal(G₀′ᵖ, Gᵖ) && isnormal(G₀′, G) # **and** primitive bases @test Crystalline.is_holosymmetric(sgnum₀, 3) end end @testset "Finding holosymmetric, normal supergroups (\"parent group\")" begin holosym_parents = Crystalline.find_holosymmetric_parent.(1:MAX_SGNUM[3],3) # We know that there should be 24 orphans, as tabulated in CDML. # Verify that these are the cases "missed" by find_holosymmetric_parent holosym_parents_orphans = findall(isnothing, holosym_parents) @test holosym_parents_orphans == sort(collect(Iterators.flatten(Crystalline.ORPHAN_SGNUMS))) end @testset "Test find_holosymmetric_superpointgroup" begin # the minimal super point group P₀ of a holosymmetric space group G₀ should equal its isogonal/arithmetic point group F₀ for D in 1:3 for sgnum₀ in Crystalline.HOLOSYMMETRIC_SGNUMS[D] G₀ = spacegroup(sgnum₀, D) F₀ = pointgroup(G₀) # isogonal/arithmetic point group of G₀ P₀ = operations(Crystalline.find_holosymmetric_superpointgroup(G₀)) # minimal holosymmetric super point group of G₀ @test sort(xyzt.(F₀)) == sort(xyzt.(P₀)) end end # every space group should have a holosymmetric super point group (i.e. never return nothing) for D = 1:3 @test !any(sgnum->isnothing(Crystalline.find_holosymmetric_superpointgroup(sgnum, D)), 1:MAX_SGNUM[D]) end end @testset "Compare find_new_kvecs(sgnum, D) to \"new\" kvecs from CDML" begin D = 3 # check that all holosymmetric sgs get no new k-vecs (trivial) @test all(sgnum-> Crystalline.find_new_kvecs(sgnum, 3) === nothing, Crystalline.HOLOSYMMETRIC_SGNUMS[D]) # check that the new k-vecs from find_new_kvecs(...) agree with those of CDML # for the case of nonholosymmetric sgs [TEST_BROKEN] verbose_debug = false # toggle to inspect disagreements between CDML and find_new_kvecs if verbose_debug; more, fewer = Int[], Int[]; end for sgnum in Base.OneTo(MAX_SGNUM[D]) Crystalline.is_holosymmetric(sgnum, D) && continue # only check holosymmetric sgs # look for new k-vectors (and mapping) in CDML data; if nothing is there, return an # empty array of Crystalline.KVecMapping arith_partner_sgnum = Crystalline.find_arithmetic_partner(sgnum, D) kvmaps_CDML = get(Crystalline.ΦNOTΩ_KVECS_AND_MAPS, arith_partner_sgnum, Crystalline.KVecMapping[]) newklabs_CDML = [getfield.(kvmaps_CDML, :kᴮlab)...] # look for new k-vectors using our own search implementation _, _, _, newklabs = Crystalline.find_new_kvecs(sgnum, D) newklabs = collect(Iterators.flatten(newklabs)) # flatten array of array structure newklabs .= rstrip.(newklabs, '′') # strip "′" from newklabs # compare the set of labels sort!(newklabs_CDML) sort!(newklabs) @test_skip newklabs == newklabs_CDML # this is broken at present: toggle verbose_debug to inspect issue more clearly # TODO: Make these tests pass (low priority; find_new_kvecs is not used anywhere) if verbose_debug && (newklabs != newklabs_CDML) bt = bravaistype(sgnum, 3) if length(newklabs_CDML) > length(newklabs) @info "More KVecs in CDML:" sgnum bt setdiff(newklabs_CDML, newklabs) push!(more, sgnum) elseif length(newklabs) > length(newklabs_CDML) @info "Fewer KVecs in CDML:" sgnum bt setdiff(newklabs, newklabs_CDML) push!(fewer, sgnum) else @info "Distinct KVecs from CDML:" sgnum bt newklabs newklabs_CDML end end end if verbose_debug && (!isempty(fewer) || !isempty(more)) println("\n$(length(more)+length(fewer)) disagreements were found relative to CDML's listing of new KVecs:") print(" More KVecs in CDML:\n "); join(stdout, more, ' '); println() print(" Fewer KVecs in CDML:\n "); join(stdout, fewer, ' '); println() end end @testset "Tabulated orphan parent groups are indeed normal supergroups" begin Pᴵ = Matrix{Float64}(I, 3, 3) # trivial transformation rotation (only translation may be nontrivial here) for (sgnum, (parent_sgnum, p)) in pairs(Crystalline.ORPHAN_AB_SUPERPARENT_SGNUMS) G = operations(spacegroup(sgnum, 3)) G′ = operations(spacegroup(parent_sgnum, 3)) # basis setting may differ from G (sgs 151-154) # G′ in conventional basis of G if !iszero(p) G′ .= transform.(G′, Ref(Pᴵ), Ref(p)) # Note: we don't have to bother with going to the primitive lattice since # all the group/supergroup pairs have the same bravais type. end # test that G◁G′ @test issubgroup(G′, G) @test isnormal(G′, G) end end end # @test_broken if end # outer @testset
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
7070
using Crystalline, Test, LinearAlgebra if !isdefined(Main, :LGIRSDIM) LGIRSDIM = Tuple(lgirreps.(1:MAX_SGNUM[D], Val(D)) for D in 1:3) end #foreach(LGIRS->Crystalline.add_ΦnotΩ_lgirs!.(LGIRS), LGIRSDIM) αβγs = Crystalline.TEST_αβγs # to evaluate line/plane irreps at non-special points @testset "Irrep orthogonality (complex little groups)" begin ## 1ˢᵗ orthogonality theorem (characters): # ∑ᵢ|χᵢ⁽ᵃ⁾|² = Nₒₚ⁽ᵃ⁾ # for each irrep Dᵢ⁽ᵃ⁾ with i running over the Nₒₚ elements of the little group @testset "1ˢᵗ orthogonality theorem" begin for (D, LGIRS) in enumerate(LGIRSDIM) for lgirsd in LGIRS # loop over space groups: lgirsd contains _all_ little groups and their irreps for lgirs in values(lgirsd) # loop over little group: lgirs contains all the associated irreps Nₒₚ = order(first(lgirs)) # number of elements in little group for lgir in lgirs # specific irrep {Dᵢ⁽ᵃ⁾} of the little group χ = characters(lgir, αβγs[D]) # characters χᵢ⁽ᵃ⁾ of every operation @test sum(abs2, χ) ≈ Nₒₚ # check ∑ᵢ|χᵢ⁽ᵃ⁾|² = Nₒₚ⁽ᵃ⁾ end end end end end # testset ## 2ⁿᵈ orthogonality theorem (characters): # ∑ᵢχᵢ⁽ᵃ⁾*χᵢ⁽ᵝ⁾ = δₐᵦNₒₚ⁽ᵃ⁾ # for irreps Dᵢ⁽ᵃ⁾ and Dᵢ⁽ᵝ⁾ in the same little group (with i running over the # Nₒₚ = Nₒₚ⁽ᵃ⁾ = Nₒₚ⁽ᵝ⁾ elements) @testset "2ⁿᵈ orthogonality theorem" begin for (D, LGIRS) in enumerate(LGIRSDIM) for lgirsd in LGIRS # lgirsd: dict of little group irrep collections for lgirs in values(lgirsd) # lgirs: vector of distinct little group irreps Nₒₚ = order(first(lgirs)) for (a, lgir⁽ᵃ⁾) in enumerate(lgirs) χ⁽ᵃ⁾ = characters(lgir⁽ᵃ⁾, αβγs[D]) for (β, lgir⁽ᵝ⁾) in enumerate(lgirs) χ⁽ᵝ⁾ = characters(lgir⁽ᵝ⁾, αβγs[D]) orthog2nd = dot(χ⁽ᵃ⁾, χ⁽ᵝ⁾) # dot conjugates the first vector automatically, # i.e. this is just ∑ᵢχᵢ⁽ᵃ⁾*χᵢ⁽ᵝ⁾ @test (orthog2nd ≈ (a==β)*Nₒₚ) atol=1e-12 end end end end end end # testset ## Great orthogonality theorem of irreps: # ∑ᵢ[Dᵢ⁽ᵃ⁾]ₙₘ*[Dᵢ⁽ᵝ⁾]ⱼₖ = δₐᵦδₙⱼδₘₖNₒₚ⁽ᵃ⁾/dim(D⁽ᵃ⁾) # for irreps Dᵢ⁽ᵃ⁾ and Dᵢ⁽ᵝ⁾ in the same little group (with # i running over the Nₒₚ = Nₒₚ⁽ᵃ⁾ = Nₒₚ⁽ᵝ⁾ elements) @testset "Great orthogonality theorem (little group irreps)" begin debug = false# true count = total = 0 # counters for (D, LGIRS) in enumerate(LGIRSDIM) for lgirsd in LGIRS # lgirsd: dict of little group irrep collections for lgirs in values(lgirsd) # lgirs: vector of distinct little group irreps Nₒₚ = order(first(lgirs)) for (a, lgir⁽ᵃ⁾) in enumerate(lgirs) D⁽ᵃ⁾ = lgir⁽ᵃ⁾(αβγs[D]) # vector of irreps in (a) dim⁽ᵃ⁾ = size(first(D⁽ᵃ⁾),1) for (β, lgir⁽ᵝ⁾) in enumerate(lgirs) D⁽ᵝ⁾ = lgir⁽ᵝ⁾(αβγs[D]) # vector of irreps in (β) dim⁽ᵝ⁾ = size(first(D⁽ᵝ⁾),1) δₐᵦ = (a==β) if a == β && debug display(label(lgir⁽ᵃ⁾)) display(label(lgir⁽ᵝ⁾)) g_orthog_kron = sum(kron(conj.(D⁽ᵃ⁾[i]), D⁽ᵝ⁾[i]) for i in Base.OneTo(Nₒₚ)) display(g_orthog_kron) end for n in Base.OneTo(dim⁽ᵃ⁾), j in Base.OneTo(dim⁽ᵝ⁾) # rows of each irrep δₐᵦδₙⱼ = δₐᵦ*(n==j) for m in Base.OneTo(dim⁽ᵃ⁾), k in Base.OneTo(dim⁽ᵝ⁾) # cols of each irrep δₐᵦδₙⱼδₘₖ = δₐᵦδₙⱼ*(m==k) # compute ∑ᵢ[Dᵢ⁽ᵃ⁾]ₙₘ*[Dᵢ⁽ᵝ⁾]ⱼₖ g_orthog = sum(conj(D⁽ᵃ⁾[i][n,m])*D⁽ᵝ⁾[i][j,k] for i in Base.OneTo(Nₒₚ)) # test equality to δₐᵦδₙⱼδₘₖNₒₚ⁽ᵃ⁾/dim(D⁽ᵃ⁾) check_g_orthog = isapprox(g_orthog, δₐᵦδₙⱼδₘₖ*Nₒₚ/dim⁽ᵃ⁾, atol=1e-12) if !check_g_orthog if debug println("sgnum = $(num(lgir⁽ᵃ⁾)), ", "{α = $(label(lgir⁽ᵃ⁾)), β = $(label(lgir⁽ᵝ⁾))}, ", "(n,m) = ($n,$m), (j,k) = ($j,$k)" ) println(" $(g_orthog) vs. $(δₐᵦδₙⱼδₘₖ*Nₒₚ/dim⁽ᵃ⁾)") end count += 1 end total += 1 @test check_g_orthog end end end end end end # LGIRS end # LGIRSDIM if debug println("\n\n", count, "/", total, " errored", " (", round(100*count/total, digits=1), "%)\n") end end # testset end # "outer" testset if false println() ## Comparison with Bilbao's REPRES for P1 and P3 of sg 214 D°s = Dict( # polar representation (r,ϕ) with ϕ in degrees :P1 => [[(1.0, 0.0) (0.0, 0.0); (0.0, 0.0) (1.0, 0.0)], [(1.0, 90.0) (0.0, 0.0); (0.0, 0.0) (1.0, 270.0)], [(0.0, 0.0) (1.0, 180.0); (1.0, 0.0) (0.0, 0.0)], [(0.0, 0.0) (1.0, 90.0); (1.0, 90.0) (0.0, 0.0)], [(1/√2,255.0) (1/√2,345.0); (1/√2, 75.0) (1/√2,345.0)], [(1/√2,345.0) (1/√2,255.0); (1/√2,165.0) (1/√2,255.0)], [(1/√2,345.0) (1/√2, 75.0); (1/√2,345.0) (1/√2,255.0)], [(1/√2, 75.0) (1/√2,345.0); (1/√2, 75.0) (1/√2,165.0)], [(1/√2,105.0) (1/√2,285.0); (1/√2, 15.0) (1/√2, 15.0)], [(1/√2,195.0) (1/√2,195.0); (1/√2,105.0) (1/√2,285.0)], [(1/√2,285.0) (1/√2,285.0); (1/√2, 15.0) (1/√2,195.0)], [(1/√2, 15.0) (1/√2,195.0); (1/√2,105.0) (1/√2,105.0)]], :P3 => [[(1.0, 0.0) (0.0, 0.0); (0.0, 0.0) (1.0, 0.0)], [(1.0, 90.0) (0.0, 0.0); (0.0, 0.0) (1.0, 270.0)], [(0.0, 0.0) (1.0, 180.0); (1.0, 0.0) (0.0, 0.0)], [(0.0, 0.0) (1.0, 90.0); (1.0, 90.0) (0.0, 0.0)], [(1/√2, 15.0) (1/√2,105.0); (1/√2,195.0) (1/√2,105.0)], [(1/√2,105.0) (1/√2, 15.0); (1/√2,285.0) (1/√2, 15.0)], [(1/√2,105.0) (1/√2,195.0); (1/√2,105.0) (1/√2, 15.0)], [(1/√2,195.0) (1/√2,105.0); (1/√2,195.0) (1/√2,285.0)], [(1/√2,345.0) (1/√2,165.0); (1/√2,255.0) (1/√2,255.0)], [(1/√2, 75.0) (1/√2, 75.0); (1/√2,345.0) (1/√2,165.0)], [(1/√2,165.0) (1/√2,165.0); (1/√2,255.0) (1/√2, 75.0)], [(1/√2,255.0) (1/√2, 75.0); (1/√2,345.0) (1/√2,345.0)]] ) polar2complex(vs) = vs[1]*(cosd(vs[2])+1im*sind(vs[2])) Ds = Dict(label=>[polar2complex.(m) for m in D°] for (label, D°) in pairs(D°s)) for (label, D) in pairs(Ds) Nₒₚ = length(D) dimD = size(first(D),1) kroncheck = sum(kron(conj.(D[i]), D[i]) for i in Base.OneTo(Nₒₚ)) println("\nIrrep $(string(label)):") println(" |G|/l = $(Nₒₚ/dimD)") display(kroncheck) end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
4225
using Crystalline, Test, LinearAlgebra using Crystalline: iscorep, corep_orthogonality_factor using LinearAlgebra: dot if !isdefined(Main, :LGIRSDIM) LGIRSDIM = Tuple(lgirreps.(1:MAX_SGNUM[D], Val(D)) for D in 1:3) end αβγs = Crystalline.TEST_αβγs # to evaluate line/plane irreps at non-special points @testset "Coreps/physically real irreps" begin # Compare evaluation of the Herring criterion with the tabulated realities in ISOTROPY @testset "Herring criterion" begin #= error_count = 0 =# # for debugging for LGIRS in LGIRSDIM for (sgnum, lgirsd) in enumerate(LGIRS) sgops = operations(first(lgirsd["Γ"])) # this is important: we may _not_ use trivial repeated sets, i.e. spacegroup(..) would not work generally for lgirs in values(lgirsd) for lgir in lgirs iso_reality = reality(lgir) #= try =# # for debugging @test iso_reality == calc_reality(lgir, sgops) #= catch err # for debugging if true println(sgnum, ", ", Crystalline.subscriptify.(label(lgir)), ", ", centering(sgnum,3), ", ", issymmorph(sgnum)) end error_count += 1 println(err) end =# end end end end #= # for debugging if error_count>0 println(Crayon(foreground=:red, bold=true), "Outright errors: ", error_count) else println(Crayon(foreground=:green, bold=true), "No errors") end =# end # @testset "Herring criterion" @testset "Corep orthogonality" begin # compute all coreps (aka "physically real" irreps, i.e. incorporate time-reversal sym) via # the ordinary irreps and `realify` ## 2ⁿᵈ orthogonality theorem (characters) [automatically includes 1ˢᵗ orthog. theorem also]: # ∑ᵢχᵢ⁽ᵃ⁾*χᵢ⁽ᵝ⁾ = δₐᵦfNₒₚ⁽ᵃ⁾ # for irreps Dᵢ⁽ᵃ⁾ and Dᵢ⁽ᵝ⁾ in the same little group (with i running over the # Nₒₚ = Nₒₚ⁽ᵃ⁾ = Nₒₚ⁽ᵝ⁾ elements). `f` incorporates a multiplicative factor due to the # conversionn to "physically real" irreps; see `corep_orthogonality_factor(..)`. @testset "2ⁿᵈ orthogonality theorem" begin for (D, LGIRS) in enumerate(LGIRSDIM) for lgirsd in LGIRS # lgirsd: dict of little group irrep collections for lgirs in values(lgirsd) # lgirs: vector of distinct little group irreps Nₒₚ = order(first(lgirs)) # compute coreps (aka "physically real" irreps, i.e. incorporate time-reversal) lgcoreps = realify(lgirs) for (a, lgir⁽ᵃ⁾) in enumerate(lgcoreps) χ⁽ᵃ⁾ = characters(lgir⁽ᵃ⁾, αβγs[D]) f = corep_orthogonality_factor(lgir⁽ᵃ⁾) for (β, lgir⁽ᵝ⁾) in enumerate(lgcoreps) χ⁽ᵝ⁾ = characters(lgir⁽ᵝ⁾, αβγs[D]) orthog2nd = dot(χ⁽ᵃ⁾, χ⁽ᵝ⁾) # ∑ᵢχᵢ⁽ᵃ⁾*χᵢ⁽ᵝ⁾ @test (orthog2nd ≈ (a==β)*f*Nₒₚ) atol=1e-12 end end end end end end # @testset "2ⁿᵈ orthogonality theorem" # TODO: Great orthogonality theorem of coreps: # It's not immediately obvious how to do this properly. E.g., if we just try: # # ∑ᵢ[Dᵢ⁽ᵃ⁾]ₙₘ*[Dᵢ⁽ᵝ⁾]ⱼₖ = δₐᵦδₙⱼδₘₖNₒₚ⁽ᵃ⁾/dim(D⁽ᵃ⁾) # # with the sum only running over the unitary elements, then we run into trouble when # (nm) and (jk) are referencing different blocks in the block diagonal form of the # "realified" matrices. Of course, when they reference the same blocks, everything is # fine, since it's then just as if we had never "realified" them in the first place. # Introducing a multiplicative factor `f` as in the character orthogonality theorem # also isn't helpful here. # The issue probably is that we really do need to use the entire gray group here, i.e. # include the antiunitary elements in the i-sum. That's more bothersome, and we don't # have a use for the irreps of the antiunitary elements otherwise, so it doesn't seem # worthwhile... end # @testset "Corep orthogonality" end # @testset "Coreps/physically real irreps"
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
1235
using Crystalline using Test @testset "Site symmetry groups & parent point group identification" begin # here, we simply test that our identifications of the label associated with the site #symmetry group's isomorphic point group are consistent with those made in the # identification of the site symmetry group labels for band representations from the # Bilbao Crystallographic Server for sgnum in 1:MAX_SGNUM[3] brs = bandreps(sgnum, 3) sg = spacegroup(sgnum, Val(3)) sitegs = findmaximal(sitegroups(sg)) for siteg in sitegs # "our" label pg, _, _ = find_isomorphic_parent_pointgroup(siteg) pglab = label(pg) pglab = pglab ∈ ("312", "321") ? "32" : # normalize computed label (since pglab ∈ ("-31m", "-3m1") ? "-3m" : # Bilbao doesn't distinguish pglab ∈ ("31m", "3m1") ? "3m" : # between e.g., 312 and 321) pglab # Bilbao's label idx = something(findfirst(br->br.wyckpos == label(siteg.wp), brs)) pglab_bilbao = brs[idx].sitesym # compare @test pglab == pglab_bilbao end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2173
using Test, Crystalline, StaticArrays, LinearAlgebra @testset "KVec" begin @testset "Construction, parsing, and show" begin @test dim(KVec("u")) == 1 @test dim(KVec("0,0.5")) == 2 @test dim(KVec("0.3,0.2,.1")) == 3 @test parts(KVec("u,v,w")) == ([0,0,0], [1 0 0; 0 1 0; 0 0 1]) @test KVec{1}("-u") == KVec{1}("-α") == KVec(zeros(1), fill(-1,1,1)) == KVec(zero(SVector{1,Float64}), -one(SMatrix{1,1,Float64})) @test string(KVec{3}("u+1,0,0.5")) == string(KVec{3}("1.0+u,0,0.5")) == "[1+α, 0, 1/2]" @test string(KVec{3}("u+v,u,0")) == string(KVec{3}("α+β,α,0")) == "[α+β, α, 0]" @test string(KVec{3}("-0.3,0.2,-.1")) == "[-3/10, 1/5, -1/10]" @test string(KVec{3}("α, 2α, 0.0")) == string(KVec{3}("α, 2.0α, 0.0")) == "[α, 2α, 0]" @test string(KVec{3}("α, 2α+2, 0.0")) == string(KVec{3}("α, 2.0α+2.0, 0.0")) == "[α, 2+2α, 0]" @test string(KVec{3}("β, -2/3, -0.75")) == string(KVec{3}("v, -0.66666666666666667, -3/4")) == "[β, -2/3, -3/4]" @test KVec{3}("x,y,z")(0,1,2) == [0.0,1.0,2.0] @test KVec{2}("α,.5")() == KVec{2}("α,.5")(nothing) == [0,0.5] @test KVec{3}("u,v,0.5")([.7,.2,.3]) == [.7,.2,.5] @test KVec{3}("v,u,0.5")([.7,.2,.3]) == [.2,.7,.5] @test KVec([0.0,1//1,2]) == KVec{3}("0,1,2") @test zero(KVec{3}) == KVec{3}("0,0,0") == zero(KVec{3}("1,2,3")) end αβγ = Crystalline.TEST_αβγ @testset "Composition" begin @test SymOperation{2}("x,y") * KVec{2}("1,α") == KVec{2}("1,α") # 4⁺ rotation @test SymOperation{2}("-y,x") * KVec(.4,.3) == KVec(-.3,.4) # composition is associative for both `KVec`s and `RVec`s kv = KVec("α, -α") kv′ = KVec("α, 1/2-2β") g = S"-x+y,-x" # 3⁻ h = S"-x,-x+y" # m₂₁ @test h * (g * kv) == (h * g) * kv @test h * (g * kv′) == (h * g) * kv′ rv = RVec("α, -α") rv′ = RVec("1/4+α, 1/2-2β") g = S"-x+y,-x" # 3⁻ h = S"-x,-x+y+1/3" # m₂₁ @test h * (g * rv) == (h * g) * rv @test h * (g * rv′) == (h * g) * rv′ end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
869
using Test @testset "Fourier lattices" begin for (sgnum, D) in ((5,2), (110, 3)) # centering 'c' in 2D and 'I' in 3D (both body-centered) cntr = centering(sgnum, D) flat = levelsetlattice(sgnum, D) # Fourier lattice in basis of Rs (rectangular) flat = modulate(flat) # modulate the lattice coefficients flat′ = primitivize(flat, cntr) # Fourier lattice in basis of Rs′ (oblique) # test that a primitivize -> conventionalize cycle leaves the lattice unchanged @test flat ≈ conventionalize(flat′, cntr) end # convert-to-integer bug found by Ali (conversion to integer-vectors bugged for # ntuple(_->i, Val(3)) with i > 1) sgnum = 146 flat = levelsetlattice(sgnum, Val(3), ntuple(_->2, Val(3))) @test primitivize(flat, centering(sgnum)) isa typeof(flat) # = doesn't throw end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3671
using Crystalline, Test, LinearAlgebra if !isdefined(Main, :LGIRS) # load complex little groups, if not already loaded LGIRS = lgirreps.(1:MAX_SGNUM[3], Val(3)) end # this file tests the consistency between little group irreps at the Γ point and the # associated point group irreps of the isogonal point group (they should agree, up # basis change transformations of the irreps; i.e. their characters must agree) for lgirsd in LGIRS # grab the lgirreps at Γ point; then find associated point group of sgnum # [pgirreps are sorted by label; ISOTROPY is not (so we sort here)] lgirsΓ = sort(lgirsd["Γ"], by=label) lg = group(first(lgirsΓ)) sgnum = num(lg) pg = Crystalline.find_parent_pointgroup(lg) pgirs = pgirreps(label(pg), Val(3)) # the little group irreps at Γ should equal the irreps of the associated point group # (isogonal point group or little cogroup) of that space group because Γ implies k=0, # which in turn turns all the translation phases {E|t} = e^{-ikt}I = I trivial. In other # words, at Γ, the translation parts of the little group does not matter, only the # rotational parts - and the associated irreps are then just that of the point group # --- test that we get the same (formatted) labels --- @test label.(pgirs) == label.(lgirsΓ) # --- test that we get the same (point group) operations --- pgops = operations(pg) lgops = operations(lg) lgops_pgpart = SymOperation{3}.(hcat.(rotation.(lgops), Ref(zeros(3)))) pg_sortperm = sortperm(pgops, by=seitz) # make sure everything's sorted identically pgops = pgops[pg_sortperm] lg_sortperm = sortperm(lgops_pgpart, by=seitz) # (we sort by the _point group_ part) lgops = lgops[lg_sortperm] lgops_pgpart = lgops_pgpart[lg_sortperm] # --- test that pgops and lgops contain the same (point-group-part) operators --- @test seitz.(pgops) == seitz.(lgops_pgpart) # --- test that the character tables are the same --- # special casing for SGs 38:41 (see details under (*)): if sgnum ∈ 38:41 # overall, as it relates to our tests below, this effectively swaps the irreps of # the m₁₀₀ and m₀₁₀ operators m₁₀₀_idx = findfirst(op->seitz(op)=="m₁₀₀", lgops_pgpart) m₀₁₀_idx = findfirst(op->seitz(op)=="m₀₁₀", lgops_pgpart) a, b = lg_sortperm[m₁₀₀_idx], lg_sortperm[m₀₁₀_idx] lg_sortperm[m₁₀₀_idx], lg_sortperm[m₀₁₀_idx] = b, a end for (lgir, pgir) in zip(lgirsΓ, pgirs) @test characters(pgir)[pg_sortperm] ≈ characters(lgir)[lg_sortperm] end end # (*) Special casing for SGs 38:41 w/ centering 'A': # These four space groups are the only one-face centered lattices with centering 'A', # and all have the isogonal point group mm2. There are several other SGs with isogonal # point group mm2 (18 others), but they don't need special casing. # For these four SGs, it seems the CDML irrep-labelling convention is to swap Γ₃ and Γ₄ # relative to the point group convention, or, equivalently, to match up with a # differently oriented point group that has m₁₀₀ and m₀₁₀ swapped. I imagine that this # is motivated by the fact that 'A' centered space groups in principle could be recast # as 'C' centered groups by a basis change. Long story short, we just swap m₁₀₀ and m₀₁₀ # for the little group irreps here, just to get by. I checked the LGIrreps extracted from # ISOTROPY indeed match those of Bilbao's (REPRES and REPRESENTATIONS SG), which they do: # they also have this "odd" difference between the Γ-point irreps for SGs 38:41, versus all # the other irreps with isogonal point group mm2 (e.g. 37).
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3764
using Crystalline, Test if !isdefined(Main, :LGIRSDIM) LGIRSDIM = Tuple(lgirreps.(1:MAX_SGNUM[D], Val(D)) for D in 1:3) end @testset "Little group order" begin # see e.g. Bradley & Cracknell p. 151(bottom)-152(top) @testset "Decomposition, order[star{k}]*order[G₀ᵏ] = order[G₀]" begin for (D, LGIRS) in enumerate(LGIRSDIM) for (sgnum, lgirsd) in enumerate(LGIRS) cntr = centering(sgnum, D) # the "macroscopic" order is defined simply as the length of the # point group associated with the space group sgops = operations(spacegroup(sgnum, D)) # from crawling Bilbao order_macroscopic = length(pointgroup(sgops)) for lgirs in values(lgirsd) kv = position(first(lgirs)) for lgir in lgirs # number of k-vectors in the star of k order_kstar = length(orbit(sgops, kv, cntr)) # number of operations in the little group of k order_pointgroupofk = length(pointgroup(operations(lgir))) # test that q⋅b=h, where # q ≡ order[star{k}] # b ≡ order[G₀ᵏ] ≡ order of little co-group of k # h ≡ order[G₀] ≡ macroscopic order of G # and where G₀ denotes the point group derived from the space # group G, Gᵏ denotes the little group of k derived from G, # and G₀ᵏ denotes the point group derived from Gᵏ @test order_kstar*order_pointgroupofk == order_macroscopic end end end end # for (D, LGIRS) in enumerate(LGIRSDIM) end # @testset "Decomposition, ..." @testset "Macroscopic order, Bilbao vs. ISOTROPY" begin for (D, LGIRS) in enumerate(LGIRSDIM) for (sgnum, lgirsd) in enumerate(LGIRS) sgops_bilbao = operations(spacegroup(sgnum, D)) # from crawling Bilbao sgops_isotropy = operations(first(lgirsd["Γ"])) # from ISOTROPY's Γ-point LittleGroup # note that we don't have to worry about whether the operations # are represented in conventional or primitive bases, and whether # there are "repeated translation sets" in the former; taking the # point group automatically removes such sets order_macroscopic_bilbao = length(pointgroup(sgops_bilbao)) order_macroscopic_isotropy = length(pointgroup(sgops_isotropy)) @test order_macroscopic_bilbao == order_macroscopic_isotropy end end # for (D, LGIRS) in enumerate(LGIRSDIM) end # @testset "Macroscopic order, ..." end @testset "Little group data-consistency" begin for D in 1:3 for sgnum in 1:MAX_SGNUM[D] lgs = littlegroups(sgnum, D) sg = spacegroup(sgnum, Val(D)) sg = SpaceGroup{D}(sgnum, reduce_ops(sg)) for (klab, lg) in lgs kv = position(lg) lg′ = littlegroup(sg, kv) # we compare the primitive little groups; otherwise there can be spurious # differences relating to nonsymmorphic translations that "look" different # in the conventional basis but in fact are equal in the primitive basis. # an example is {m₀₁₀|0,½,½} (or S"x,-y+1/2,z+1/2") vs. {m₀₁₀|½,0,0} (or # "x+1/2,-y,z") in an 'I' centered space group; both are actually included # in `sg`, but when we reduce it, it may choose one or the other @test Set(xyzt.(primitivize(lg))) == Set(xyzt.(primitivize(lg′))) end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
397
using Crystalline, Test @testset "`spacegroup` vs `mspacegroup` agreement" begin for sgnum in 1:MAX_SGNUM[3] bns_num = Crystalline.SG2MSG_NUMs_D[sgnum] sg = spacegroup(sgnum) msg = Crystalline.mspacegroup(bns_num[1], bns_num[2]) sort_sg = sort(sg, by=seitz) sort_msg = sort(SymOperation.(msg), by=seitz) @test sort_sg ≈ sort_msg end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
4342
using Crystalline, Test if !isdefined(Main, :LGIRSDIM) LGIRSDIM = Tuple(lgirreps.(1:MAX_SGNUM[D], Val(D)) for D in 1:3) end @testset "Multiplication tables" begin # check that operations are sorted identically across distinct irreps for fixed sgnum, and k-label @testset "Space groups (consistent operator sorting order in ISOTROPY)" begin for LGIRS in LGIRSDIM # ... D in 1:3 for lgirsd in LGIRS for lgirs in values(lgirsd) ops = operations(first(lgirs)) for lgir in lgirs[2:end] # don't need to compare against itself ops′ = operations(lgir) @test all(ops.==ops′) # if !all(ops.==ops′) # println("sgnum = $(num(lgir)) at $(klabel(lgir))") # display(ops.==ops′) # display(ops) # display(ops′) # println('\n'^3) # end end end end end # for LGIRS in LGIRSDIM end # @testset "Space groups (consistent ..." @testset "Iterable inputs" begin sg = spacegroup(16) sg_iter = (op for op in sg) @test MultTable(sg) == MultTable(sg_iter) end @testset "Little groups: group property" begin for (D, LGIRS) in enumerate(LGIRSDIM) for lgirsd in LGIRS for lgirs in values(lgirsd) sgnum = num(first(lgirs)) cntr = centering(sgnum, D) ops = operations(first(lgirs)) # ops in conventional basis primitive_ops = primitivize.(ops, cntr) # ops in primitive basis # test that multiplication table can be computed @test MultTable(primitive_ops) isa MultTable end end end # for LGIRS in LGIRSDIM end # @testset "Little groups: ..." @testset "Broadcasting vs. MultTable indexing" begin @testset "Space groups" begin for D in 1:3 for sgnum in 1:MAX_SGNUM[D] # construct equivalent of MultTable as Matrix{SymOperation{D}} by using # broadcasting and check that this agrees with MultTable and indexing into it sg = spacegroup(sgnum, Val(D)) mt = MultTable(sg) mt′ = sg .* permutedims(sg) @test mt ≈ mt′ end end end @testset "Magnetic space groups" begin for msgnum in 1:MAX_MSGNUM[3] msg = mspacegroup(msgnum, Val(3)) mt = MultTable(msg) mt′ = msg .* permutedims(msg) @test mt ≈ mt′ end end end for D in 1:3 @testset "Space groups (Bilbao: $(D)D)" begin for sgnum in 1:MAX_SGNUM[D] cntr = centering(sgnum, D) ops = operations(spacegroup(sgnum, Val(D))) # ops in conventional basis primitive_ops = primitivize.(ops, cntr) # ops in primitive basis @test MultTable(primitive_ops) isa MultTable # test that it doesn't error end end end @testset "Complex LGIrreps" begin #failcount = 0 for (D, LGIRS) in enumerate(LGIRSDIM) for lgirsd in LGIRS for lgirs in values(lgirsd) sgnum = num(first(lgirs)) cntr = centering(sgnum, D) ops = operations(first(lgirs)) # ops in conventional basis primitive_ops = primitivize.(ops, cntr) # ops in primitive basis mt = MultTable(primitive_ops) for lgir in lgirs for αβγ in (nothing, Crystalline.TEST_αβγs[D]) # test finite and zero values of αβγ checkmt = Crystalline.check_multtable_vs_ir(mt, lgir, αβγ) @test all(checkmt) #if !all(checkmt); failcount += 1; end end end end end end # for LGIRS in LGIRSDIM #println("\nFails: $(failcount)\n\n") end # @testset "Complex LGIrreps" @testset "Complex PGIrreps" begin for D in 1:3 for pgiuc in PG_IUCs[D] pgirs = pgirreps(pgiuc, D) pg = group(first(pgirs)) for pgir in pgirs mt = MultTable(operations(pg)) @test mt isa MultTable checkmt = Crystalline.check_multtable_vs_ir(mt, pgir, nothing) @test all(checkmt) end end end end end # TODO: Test physically irreducible irreps (co-reps)
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
4709
using Crystalline # reexports Bravais' API using LinearAlgebra: norm using Test # Example from Krivy & Gruber [1](https://doi.org/10.1107/S0567739476000636): # NB: the example given by Krivy & Gruber first gives values for basis lengths & angles, # i.e., a,b,c,α,β,γ - and then give associated values for the niggli parameters A, B, C, ξ, # η, ζ. However, the values they give for the Niggli parameters are given with 0 significant # digits - and it appears they actually use these zero-significant-digit values in the # actual calculation they show afterwards. So here, we start from the provided values for # A, b, C, ξ, η, ζ, and then calculate associated values for a, b, c, α, β, γ; the latter # then deviates from those given in [1] due to their rounding, but are consistent with the # actual calculation that they do (although they appear to have done the calculation with # integers rather than floating points; and their evaluation of the associated angles is # ultimately also very imprecise; see large `atol` values below) # Starting from the a, b, c, α, β, γ values given in [1], rather than the Niggli parameters, # actually lead to a very different Niggli reduced cell, highlighting that the approach is # not terribly robust to imprecision / measurement errors. @testset "Niggli reduction" begin A, B, C, ξ, η, ζ = 9, 27, 4, -5, -4, -22 a, b, c = sqrt(A), sqrt(B), sqrt(C) α, β, γ = acos(ξ/(2b*c)), acos(η/(2c*a)), acos(ζ/(2a*b)) Rs = crystal(a, b, c, α, β, γ) Rs′, P = nigglibasis(Rs; rtol = 1e-5, max_iterations=100) abc = norm.(Rs′) αβγ = [(Bravais.angles(Rs′) .* (180/π))...] @test abc ≈ [2.0,3.0,3.0] atol=1e-3 # norm accuracy from [1] is low @test αβγ ≈ [60.0,75.31,70.32] atol=3e-1 # angle accuracy from [1] is _very_ low @test Rs′ ≈ transform(Rs, P) # the angles and lengths of the Niggli bases extracted from two equivalent lattice bases, # mutually related by an element of SL(3, ℤ), must be the same (Niggli cell is unique) P₁ = [1 2 3; 0 1 8; 0 0 1] P₂ = [1 0 0; -3 1 0; -9 2 1] P = P₂ * P₁ # random an element of SL(3, ℤ) (i.e., `det(P) == 1`) for sgnum in 1:MAX_SGNUM[3] Rs = directbasis(sgnum) Rs′ = transform(Rs, P) niggli_Rs = nigglibasis(Rs)[1] niggli_Rs′ = nigglibasis(Rs′)[1] abc = norm.(niggli_Rs) abc′ = norm.(niggli_Rs′) αβγ = [Bravais.angles(niggli_Rs)...] αβγ′ = [Bravais.angles(niggli_Rs′)...] @test abc ≈ abc′ @test αβγ ≈ αβγ′ @test sort(abc) ≈ abc # sorted by increasing norm ϵ_ϕ = 1e-10 # angle tolerance in comparisons below @test all(ϕ -> ϕ<π/2 + ϵ_ϕ, αβγ) || all(ϕ -> ϕ>π/2 - ϵ_ϕ, αβγ) @test isapprox(collect(Bravais.niggli_parameters(niggli_Rs)), # equivalent to checking collect(Bravais.niggli_parameters(niggli_Rs′))) # abc ≈ abc′ & αβγ ≈ αβγ′ # Idempotency of Niggli-reduced Niggli-parameters niggli_niggli_Rs = nigglibasis(niggli_Rs)[1] niggli_niggli_Rs′ = nigglibasis(niggli_Rs′)[1] @test isapprox(collect(Bravais.niggli_parameters(niggli_Rs)), collect(Bravais.niggli_parameters(niggli_niggli_Rs))) @test isapprox(collect(Bravais.niggli_parameters(niggli_Rs)), collect(Bravais.niggli_parameters(niggli_niggli_Rs′))) # the following tests are not guaranteed (i.e., the Niggli parameters (lengths & angles) # must be idempotent, but cannot guarantee exact choice of basis vectors `(...)Rs`) @test niggli_Rs ≈ niggli_niggli_Rs @test niggli_Rs′ ≈ niggli_niggli_Rs′ #@test niggli_Rs ≈ niggli_Rs′ # <-- in particular, this does not hold generally end # Niggli reduction of reciprocal lattice for sgnum in 1:MAX_SGNUM[3] Rs = directbasis(sgnum) Gs = reciprocalbasis(Rs) niggli_Rs, P_from_Rs = nigglibasis(Rs) niggli_Gs, P_from_Gs = nigglibasis(Gs) @test reciprocalbasis(niggli_Rs) ≈ niggli_Gs @test reciprocalbasis(niggli_Gs).vs ≈ niggli_Rs.vs # duality of Niggli reduction @test niggli_Gs ≈ transform(Gs, P_from_Gs) @test P_from_Rs ≈ P_from_Gs end # Niggli reduction of 2D lattice P₁²ᴰ = [1 4; 0 1] P₂²ᴰ = [1 0; -3 1] P²ᴰ = P₂²ᴰ * P₁²ᴰ # random an element of SL(2, ℤ) for sgnum in 1:MAX_SGNUM[2] Rs = directbasis(sgnum, Val(2)) niggli_Rs, niggli_P = nigglibasis(Rs) @test niggli_Rs ≈ transform(Rs, niggli_P) Rs′ = transform(Rs, P²ᴰ) niggli_Rs′ = nigglibasis(Rs′)[1] ab = norm.(niggli_Rs) ab′ = norm.(niggli_Rs′) α = only(Bravais.angles(niggli_Rs)) α′ = only(Bravais.angles(niggli_Rs′)) @test ab ≈ ab′ @test α ≈ α′ @test sort(ab) ≈ ab # sorted by increasing norm ϵ_ϕ = 1e-10 # angle tolerance in comparisons below @test α < π/2 + ϵ_ϕ || α > π/2 - ϵ_ϕ end end # @testset "Niggli reduction"
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
3801
using Crystalline, Test @testset "Notation" begin @testset "Mulliken notation" begin for D in 1:3 for pglab in PG_IUCs[D] pgirs′ = pgirreps(pglab, Val(D)) g = group(first(pgirs′)) # check both "ordinary" irreps and physically real irreps (coreps) for irtype in (identity, realify) pgirs = irtype(pgirs′) mlabs = mulliken.(pgirs) # Mulliken symbols for point group irreps # each irrep must be assigned a unique symbol @test allunique(mlabs) # check irrep dimension vs. label irDs = Crystalline.irdim.(pgirs) mlabs_main = getfield.(match.(Ref(r"A|B|¹E|²E|E|T"), mlabs), Ref(:match)) for (irD, mlab_main) in zip(irDs, mlabs_main) if irD == 1 @test mlab_main ∈ ("A", "B", "¹E", "²E") elseif irD == 2 @test mlab_main == "E" elseif irD == 3 @test mlab_main == "T" else error("Unexpectedly got point group irrep of dimension higher than 3") end end # check 'u' and 'g' subscripts for transformation under inversion for 3d # point group irreps (doesn't make complete sense for 2D and 1D, where # inversion is really an embedded" 2-fold rotation (2D) or a mirror (1D)) if D == 3 if (idx⁻¹ = findfirst(op -> seitz(op) == "-1", g)) !== nothing for (mlab, pgir) in zip(mlabs, pgirs) irD = Crystalline.irdim(pgir) χ⁻¹ = characters(pgir)[idx⁻¹] if χ⁻¹ ≈ -irD # antisymmetric under inversion => ungerade @test occursin('ᵤ', mlab) elseif χ⁻¹ ≈ +irD # symmetric under inversion => gerade @test occursin('g', mlab) else throw(DomainError(χ_inversion, "inversion character must be equal to ±(irrep dimension)")) end end else @test all(mlab -> !occursin('ᵤ', mlab) && !occursin('g', mlab), mlabs) end end end end end end @testset "PGIrreps in Mulliken notation" begin # 2D & 3D for D in (2,3) pgirs = pgirreps("6", Val(D); mulliken=false) pgirs_mulliken = pgirreps("6", Val(D); mulliken=true) @test label.(pgirs_mulliken) == mulliken.(pgirs) # we do some reductions of Mulliken labels during "realification"; check that # this works the same across `label.(realify(pgirreps(..; mulliken=true)))` # and `mulliken.(realify(pgirreps(..)))` pgirs′ = realify(pgirs) pgirs_mulliken′ = realify(pgirs_mulliken) @test label.(pgirs_mulliken′) == mulliken.(pgirs′) end # 1D @test label.(pgirreps("m", Val(1); mulliken=true)) == mulliken.(pgirreps("m", Val(1))) == ["A′", "A′′"] end @testset "Centering, Bravais types, & IUC" begin for D in 1:3 for sgnum in 1:MAX_SGNUM[D] @test first(iuc(sgnum, D)) == centering(sgnum, D) == last(bravaistype(sgnum, D; normalize=false)) end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
1266
using Test, Crystalline @testset "Cached orders:" begin @testset "Point groups" begin for (D,Dᵛ) in ((1,Val(1)), (2,Val(2)), (3,Val(3))) for iucs in Crystalline.PG_NUM2IUC[D] for iuc in iucs @test Crystalline.PG_ORDERs[iuc] == order(pointgroup(iuc, Dᵛ)) end end end end @testset "Space groups" begin for (D,Dᵛ) in ((1,Val(1)), (2,Val(2)), (3,Val(3))) for n in 1:MAX_SGNUM[D] sg = spacegroup(n, Dᵛ) psg = primitivize(sg) @test Crystalline.SG_ORDERs[D][n] == order(sg) @test Crystalline.SG_PRIMITIVE_ORDERs[D][n] == order(psg) end end end @testset "Subperiodic groups" begin subgind = Crystalline.subg_index for (D,P,Dᵛ,Pᵛ) in ((2,1,Val(2),Val(1)), (3,1,Val(3),Val(1)), (3,2,Val(3),Val(2))) for n in 1:MAX_SUBGNUM[(D,P)] subg = subperiodicgroup(n, Dᵛ, Pᵛ) psubg = primitivize(subg) @test Crystalline.SUBG_ORDERs[subgind(D,P)][n] == order(subg) @test Crystalline.SUBG_PRIMITIVE_ORDERs[subgind(D,P)][n] == order(psubg) end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git
[ "MIT" ]
0.6.4
b4ac59b6877535177e89e1fe1b0ff5d0c2e903de
code
2314
using Crystalline, Test if !isdefined(Main, :LGIRS′) include(joinpath(@__DIR__, "../build/ParseIsotropy.jl")) using .ParseIsotropy LGIRS′ = parselittlegroupirreps() # parsed explicitly from ISOTROPY's data (see ParseIsotropy) end if !isdefined(Main, :LGIRS) LGIRS = lgirreps.(1:MAX_SGNUM[3], Val(3)) # loaded from our saved .jld2 files end @testset "Test equivalence of parsed and loaded LGIrreps" begin addition_klabs = ("WA", "HA", "KA", "PA", "PC") for sgnum in 1:MAX_SGNUM[3] lgirsd′ = LGIRS′[sgnum] # parsed variant lgirsd = LGIRS[sgnum] # loaded variant; may contain more irreps than parsed ISOTROPY (cf. `manual_lgirrep_additions.jl`) # test we have same k-points in `lgirsd` and `lgirsd′` (or, possibly more in # k-points `lgirsd`, if it contains manual additions) klabs = sort!(collect(keys(lgirsd))) klabs′ = sort!(collect(keys(lgirsd′))) if klabs == klabs′ @test length(lgirsd) == length(lgirsd′) else # in case loaded irreps contain manually added 'xA'-type k-points (either "HA", # "HA", "KA", or "PA", see `addition_klabs`) from Φ-Ω extra_klabidxs = findall(klab -> klab ∉ klabs′, klabs)::Vector{Int} extra_klabs = klabs[extra_klabidxs] @test length(lgirsd) > length(lgirsd′) && all(∈(addition_klabs), extra_klabs) end for (kidx, (klab, lgirs)) in enumerate(lgirsd) if !haskey(lgirsd′, klab) && klab ∈ addition_klabs # `lgirs` is a manual addition that is not in ISOTROPY; nothing to compare continue end lgirs′ = lgirsd′[klab] @test length(lgirs) == length(lgirs′) for (iridx, lgir) in enumerate(lgirs) lgir′ = lgirs′[iridx] # test that labels agree @test label(lgir) == label(lgir′) # test that little groups agree @test position(lgir) ≈ position(lgir′) @test all(operations(lgir) .== operations(lgir′)) # test that irreps agree for αβγ in (nothing, Crystalline.TEST_αβγ) @test lgir(αβγ) == lgir′(αβγ) end end end end end
Crystalline
https://github.com/thchr/Crystalline.jl.git