Commit e4b38cce authored by Peter Eastman's avatar Peter Eastman
Browse files

Bug fixes

parent efa09228
...@@ -137,7 +137,7 @@ class GromacsGroFile(object): ...@@ -137,7 +137,7 @@ class GromacsGroFile(object):
xyz.append(Vec3(pos[0], pos[1], pos[2])) xyz.append(Vec3(pos[0], pos[1], pos[2]))
elif _is_gro_box(line) and ln == na + 2: elif _is_gro_box(line) and ln == na + 2:
sline = line.split() sline = line.split()
boxes.append([float(i) for i in sline]*nanometers) boxes.append(tuple([float(i) for i in sline])*nanometers)
xyzs.append(xyz*nanometers) xyzs.append(xyz*nanometers)
xyz = [] xyz = []
ln = -1 ln = -1
......
...@@ -263,7 +263,7 @@ class PDBFile(object): ...@@ -263,7 +263,7 @@ class PDBFile(object):
if modelIndex is not None: if modelIndex is not None:
print >>file, "MODEL %4d" % modelIndex print >>file, "MODEL %4d" % modelIndex
for (chainIndex, chain) in enumerate(topology.chains()): for (chainIndex, chain) in enumerate(topology.chains()):
chainName = chr(ord('A')+chainIndex) chainName = chr(ord('A')+chainIndex%26)
residues = list(chain.residues()) residues = list(chain.residues())
for (resIndex, res) in enumerate(residues): for (resIndex, res) in enumerate(residues):
if len(res.name) > 3: if len(res.name) > 3:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment