Skip to content

Commit

Permalink
added logic to stop parser when end model is found
Browse files Browse the repository at this point in the history
  • Loading branch information
berylgithub committed Jan 16, 2020
1 parent 5c1bee1 commit a38dd70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pdb_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def get_chain_terminals(filepath):
for line in f:
if line.startswith('TER'):
idxes.append(idx)
elif line.startswith('ENDMDL'):
break
idx+=1
return idxes

Expand Down Expand Up @@ -93,12 +95,12 @@ def loader_zdock(filepath):

complex_files = list_files(path)
# test_file = path+'/'+complex_files[2]
test_file = path+'/1nez.ent.pdb'
test_file = path+'/2wy2.ent.pdb'
# test_file = path+'/complex.1.pdb'

# df_atoms = load_custom_pdb(test_file)
# terminal_idxes = get_chain_terminals(test_file)
# chains = get_sliced_chains(df_atoms, terminal_idxes, zdock=False)
chains = loader_pdbbind(test_file)
print(chains[0].T)
print(chains, len(chains))

0 comments on commit a38dd70

Please sign in to comment.