Skip to content

Commit

Permalink
search sorted to find atom in group
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq authored Mar 26, 2024
1 parent 9f1adc2 commit 821e4b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/updatecounters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function update_group_count!(group_count, ibin, iatom, frame_weight, sol::AtomSe
else
iat = sol.indices[iatom]
for (igroup, indices) in enumerate(sol.group_atom_indices)
if iat in indices
ifind = searchsortedfirst(iat, indices)
if ifind == iat
group_count[igroup][ibin] += frame_weight
end
end
Expand Down

0 comments on commit 821e4b3

Please sign in to comment.