Skip to content

Commit

Permalink
Fix assign_oxygens!
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonOresten committed May 17, 2024
1 parent 8c16a1b commit fd69777
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/protein/oxygen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ end

function assign_oxygens!(chain::Chain)
for (i, residue) in enumerate(chain)
deleteat!(residue.atoms, findfirst(==("O") (atom -> atom.name), residue.atoms))
j = findfirst(==("O") (atom -> atom.name), residue.atoms)
isnothing(j) || deleteat!(residue.atoms, j)
insert!(residue.atoms, 4, Atom("O", estimate_oxygen_position(chain, i)))
end
return chain
Expand Down

0 comments on commit fd69777

Please sign in to comment.