Skip to content

Commit

Permalink
Merge pull request #30 from jihunni/patch-1
Browse files Browse the repository at this point in the history
Update read_pdb.py
  • Loading branch information
Ruibin-Liu committed Jan 16, 2024
2 parents 0320c31 + 02ab364 commit cdb1453
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions moldf/read_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,8 @@ def read_pdb(
total_lines = 100000
n_record = 0
n_lines_till_atom_lines = 0
with pdb_file_handle:
line = pdb_file_handle.readline()
for line in pdb_file_handle:
with pdb_file_handle as lines:
for line in lines:
if line.startswith(all_atom_site_reads) and "_atom_site" in category_names:
if (not n_record) and line.startswith(("ATOM", "HETATM", "MODEL")):
array = np.zeros(
Expand Down

0 comments on commit cdb1453

Please sign in to comment.