Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions continuousflex/protocols/utilities/pdb_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def m_inout_read_pdb(filename):
pdb_list = []
f = open(filename, 'r')
for line in f:
test_recd = line[0:5]
test_recd = line[:6]

# if test_recd.upper().strip() == "ATOM" or test_recd.upper() == "HETATM":
if ((test_recd.upper().strip() == "ATOM") or (test_recd.upper().strip() == "HETATM")):
Expand All @@ -98,33 +98,38 @@ def m_inout_read_pdb(filename):
except:
pass
try:
new_atom.type = line[12:14]
except:
pass
try:
new_atom.loc = line[14:16]
new_atom.type = line[11:15]
except:
pass
# try:
# new_atom.loc = line[14:16]
# except:
# pass
try:
new_atom.alt = line[16]
except:
pass
try:
new_atom.res = line[17:21]
new_atom.res = line[17:20]
except:
pass
try:
new_atom.chain = line[21]
except:
pass

try:
new_atom.seq = int(line[22:26])
new_atom.seq = int(line[23:27])
except:
pass
try:
new_atom.icode = line[26]
except:
pass
try:
new_atom.seq = int(line[23:26])
except:
pass
try:
new_atom.icode = line[26]
except:
pass

try:
new_atom.x = float(line[30:38])
except:
Expand Down