Commit 84feb016 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed bug where CONECT records were being parsed incorrectly

parent b8e15090
......@@ -165,8 +165,8 @@ class PdbStructure(object):
elif (pdb_line.find("CRYST1") == 0):
self._unit_cell_dimensions = (float(pdb_line[6:15]), float(pdb_line[15:24]), float(pdb_line[24:33]))*unit.angstroms
elif (pdb_line.find("CONECT") == 0):
atoms = [int(pdb_line[7:12])]
for pos in (12,17,22,27):
atoms = [int(pdb_line[6:11])]
for pos in (11,16,21,26):
try:
atoms.append(int(pdb_line[pos:pos+5]))
except:
......
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