Skip to content

Commit

Permalink
more flexible XYZ reader
Browse files Browse the repository at this point in the history
  • Loading branch information
stefdoerr committed Dec 14, 2023
1 parent 3ceda3d commit 541da97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moleculekit/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,9 @@ def XYZread(filename, frame=None, topoloc=None):
import gzip
import re

natom_line = re.compile(r"^([0-9]+)$")
natom_line = re.compile(r"^([0-9]+)\s*$")
coord_line = re.compile(
r"^\w+\s+([-+]?[0-9]*\.?[0-9]+)\s+([-+]?[0-9]*\.?[0-9]+)\s+([-+]?[0-9]*\.?[0-9]+)$"
r"^\w+\s+([-+]?[0-9]*\.?[0-9]+)\s+([-+]?[0-9]*\.?[0-9]+)\s+([-+]?[0-9]*\.?[0-9]+)\s*$"
)
topo = Topology()

Expand Down

0 comments on commit 541da97

Please sign in to comment.