Skip to content

Commit

Permalink
Bond is always symmetry equivalent to its reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarros committed Jul 28, 2023
1 parent 7cd4d0d commit 0fb683c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Symmetry/SymmetryAnalysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ function all_symmetry_related_bonds_for_atom(cryst::Crystal, i::Int, b_ref::Bond
# identity. In this case, there are only two 'symmetry related couplings':
# `b_ref` itself and its reverse. Return early for performance.
if cryst.symops == [SymOp(Mat3(I), zero(Vec3))]
i == b_ref.i && return [b_ref]
i == b_ref.j && return [reverse(b_ref)]
return Bond[]
return i in (b_ref.i, b_ref.j) ? [b_ref, reverse(b_ref)] : Bond[]
end

bs = Bond[]
Expand Down

0 comments on commit 0fb683c

Please sign in to comment.