Skip to content

Commit

Permalink
empty lines in mol2
Browse files Browse the repository at this point in the history
Some mol2 files have empty lines between blocks. We need to remove them from the block content of the previous one.
  • Loading branch information
Ruibin-Liu authored Sep 19, 2023
1 parent 1eb121e commit df948c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion biopandas/mol2/pandas_mol2.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _get_atomsection(mol2_lst):
if s.startswith("@<TRIPOS>ATOM"):
first_idx = idx + 1
started = True
elif started and s.startswith("@<TRIPOS>"):
elif started and s.startswith("@<TRIPOS>") or not s.strip():
last_idx_plus1 = idx
break
if first_idx is None:
Expand Down

0 comments on commit df948c6

Please sign in to comment.