From 6d557c58cfc1f9e959fe690f498eae842a53f16c Mon Sep 17 00:00:00 2001 From: ysyapa Date: Fri, 4 Aug 2023 00:12:42 +0000 Subject: [PATCH] Identifying A1 reduction --- irrep.jl | 25 +++++++++++++++++++++++++ rotations.csv | 24 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 irrep.jl create mode 100644 rotations.csv diff --git a/irrep.jl b/irrep.jl new file mode 100644 index 0000000..7ab53d1 --- /dev/null +++ b/irrep.jl @@ -0,0 +1,25 @@ +using DelimitedFiles +rotations = readdlm("rotations.csv", ',', Int, '\n') +rotations = reshape(rotations, (24, 3, 3)) + +N = 24 +ks = -N÷2:N÷2-1 +lattice = hcat((collect.(Iterators.product(ks, ks, ks)))...) +labels = reshape(collect(1:N^3), (N, N, N)) + +for r in 1:24 + rotated_lattice = Matrix(rotations[r, :, :]) * lattice + for index in 1:N^3 + rotated_lattice_point = rotated_lattice[:, index] + (i, j, k) = mod1.(rotated_lattice_point .+ (N÷2 + 1), N) + old_label = max(labels[index], labels[i, j, k]) + new_label = min(labels[index], labels[i, j, k]) + if old_label != new_label + for o in findall(isequal(old_label), labels) + labels[o] = new_label + end + end + end +end + +unique(labels) \ No newline at end of file diff --git a/rotations.csv b/rotations.csv new file mode 100644 index 0000000..cf9b066 --- /dev/null +++ b/rotations.csv @@ -0,0 +1,24 @@ +1,0,0,0,1,0,0,0,1 +1,0,0,0,0,-1,0,1,0 +0,0,1,0,1,0,-1,0,0 +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,0,1,0,-1,0 +0,0,-1,0,1,0,1,0,0 +0,1,0,-1,0,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 +0,1,0,1,0,0,0,0,-1 +0,-1,0,-1,0,0,0,0,-1 +0,0,1,0,-1,0,1,0,0 +0,0,-1,0,-1,0,-1,0,0 +-1,0,0,0,0,1,0,1,0 +-1,0,0,0,0,-1,0,-1,0