Skip to content

Commit

Permalink
seekstart of stream after reading
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Nov 8, 2023
1 parent e348340 commit 6a4a9a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/check_mmCIF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function _check_mmCIF(data::Union{IOStream, IOBuffer})
end
end
end
seekstart(data)
if mmCIF
if mmCIF_fields.name == 0 ||
mmCIF_fields.resname == 0 ||
Expand Down
1 change: 1 addition & 0 deletions src/readPDB.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ function _parse_pdb(
lastatom = atom
end
end
seekstart(pdbdata)
if natoms == 0
error(" Could not find any atom in PDB file matching the selection. ")
end
Expand Down

0 comments on commit 6a4a9a4

Please sign in to comment.