-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
I've found that constructing a symmetry operation as described in README.md fails when any spaces are added to the string:
julia> using Crystalline
julia> op = S"x,y,z"
1 ──────────────────────────────── (x,y,z)
┌ 1 0 0 ╷ 0 ┐
│ 0 1 0 ┆ 0 │
└ 0 0 1 ╵ 0 ┘
julia> op = S"x, y, z"
Error showing value of type SymOperation{3}:
ERROR: DomainError with (1, 0):
trW = 1 for detW = 0 is not a valid symmetry operation; see ITA5 Vol A, Table 11.2.1.1
Stacktrace:
[1] _throw_seitzerror(trW::Int64, detW::Int64)
@ Crystalline ~/git/Crystalline.jl-0.3.9/src/notation.jl:399
[2] rotation_order_3d
@ ~/git/Crystalline.jl-0.3.9/src/notation.jl:315 [inlined]
[3] seitz(op::SymOperation{3})
@ Crystalline ~/git/Crystalline.jl-0.3.9/src/notation.jl:236
[4] show(io::IOContext{Base.TTY}, #unused#::MIME{Symbol("text/plain")}, op::SymOperation{3})
@ Crystalline ~/git/Crystalline.jl-0.3.9/src/show.jl:13
julia> op.rotation
3×3 Crystalline.SquareStaticMatrices.SqSMatrix{3, Float64} with indices SOneTo(3)×SOneTo(3):
1.0 0.0 0.0
0.0 0.0 0.0
0.0 0.0 0.0
Although the exception seems to be thrown by the show() method, it looks like the actual problem is that the rotation matrix of the symmetry operation is constructed incorrectly, as I would have expected the first REPL output shown above.
Tested with both the latest release (0.3.9) and the latest commit on Julia 1.6.1.
Metadata
Metadata
Assignees
Labels
No labels