Skip to content

Commit 2a2b1a0

Browse files
committed
fixed INPCRDread
1 parent 6d06082 commit 2a2b1a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

moleculekit/readers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2985,9 +2985,9 @@ def INPCRDread(filename, frame=None, topoloc=None, stride=None, atom_indices=Non
29852985
# Try to read box information if it exists
29862986
box = None
29872987
boxangles = None
2988-
line = f.readline().strip()
2988+
line = f.readline()
29892989
if line: # If there's an extra line, it contains box info
2990-
boxinfo = [float(line[i : i + 12]) for i in range(0, len(line), 12)]
2990+
boxinfo = [float(line[i : i + 12]) for i in range(0, len(line) - 1, 12)]
29912991
if len(boxinfo) == 6: # Should contain 3 lengths and 3 angles
29922992
box = np.array(boxinfo[:3])
29932993
boxangles = np.array(boxinfo[3:])

0 commit comments

Comments
 (0)