thchr / Crystalline.jl

Tools for crystallographic symmetry analysis
Other
55 stars 8 forks source link

Centering argument for `generate` of non-primitive systems #33

Open thchr opened 2 years ago

thchr commented 2 years ago

If we add a two-fold rotation 2₁₀₀ = S"x,-y,-z" to space group 148, we should get space group 166. Instead, generate overflows:

julia> generate([spacegroup(148)..., S"x,-y,-z"]
ERROR: OverflowError: The provided set of generators overflowed Nmax distinct operations: generators may not form a finite group; otherwise, try increasing Nmax

Probably related to the centering translation of the rhombohedral lattice since the primitivized variant works correctly:

julia> generate([primitivize(spacegroup(148))..., primitivize(S"x,y,-z", 'R')])
GenericGroup{3} with 12 operations:
 1
 3₁₁₁⁺
 3₁₁₁⁻
 -1
 -3₁₁₁⁺
 -3₁₁₁⁻
 m₁₁₁
 -6₁₁₁⁻
 -6₁₁₁⁺
 2₁₁₁
 6₁₁₁⁻
 6₁₁₁⁺
thchr commented 2 years ago

Actually, scratch that. The problem was that I was not using the right operator. Should've been 2₀₀₁ not 2₁₀₀...

thchr commented 2 years ago

... Maybe generate should take an optional centering input argument though. Otherwise the modτ argument isn't really doing quite the right thing for non-primitive lattices.

thchr commented 2 years ago

Let's keep this open to investigate later.