Skip to content

Commit

Permalink
indexing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosanjose committed Oct 20, 2024
1 parent 6f99a50 commit 51b499d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -559,10 +559,9 @@ orbranges(cs::Union{CellOrbitalsGrouped, CellOrbitalsGroupedDict}) = Iterators.a

# range of orbital indices of dn cellorbs
function orbrange(cs::AnyOrbitalSlice, dn::SVector)
for (dn´, rng) in zip(cells(cs), orbranges(cs))
dn == dn´ && return rng
end
return 0:-1
offset = get(offsets(cs), dn, 0)
rng = offset+1:offset+norbitals(cs, dn)
return rng
end

Base.isempty(s::LatticeSlice) = isempty(s.cellsdict)
Expand Down

0 comments on commit 51b499d

Please sign in to comment.