Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug pdb_selaltloc.py #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions pdbtools/pdb_selaltloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def select_altloc(fhandle, selloc=None, byocc=False):

prev_altloc = ''
prev_resname = ''
prev_resnum = ''
prev_resnum = -float('inf')

# uses the same function names in the loop below. However, depending
# on the input options, the functions used are different. One is
Expand All @@ -170,7 +170,7 @@ def select_altloc(fhandle, selloc=None, byocc=False):
# captures the relevant parameters
altloc = line[16]
resname = line[17:20]
resnum = line[22:26].strip()
resnum = int(line[22:26].strip())

if is_another_altloc_group(
altloc, prev_altloc, resnum, prev_resnum,
Expand Down Expand Up @@ -219,14 +219,14 @@ def select_altloc(fhandle, selloc=None, byocc=False):

prev_altloc = ''
prev_resname = ''
prev_resnum = ''
prev_resnum = -float('inf')

yield line # the terminator line

else:
prev_altloc = ''
prev_resname = ''
prev_resnum = ''
prev_resnum = -float('inf')
yield line

# end of for loop
Expand Down