Skip to content

Commit

Permalink
put ascii in if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Nov 8, 2023
1 parent 2adbe8e commit f6baf7c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions prody/proteins/ciffile.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,8 @@ def _parseMMCIFLines(atomgroup, lines, model, chain, subset,
continue

alt = line.split()[fields['label_alt_id']]
if alt not in which_altlocs and which_altlocs != 'all':
try:
alt = ascii_uppercase[int(alt)-1]
except TypeError:
if not warnedAltloc:
LOGGER.warn('alt {0} not in which_altlocs {1}'.format(alt, which_altlocs))
continue
if not (alt in which_altlocs or ascii_uppercase[int(alt)-1] in which_altlocs) and which_altlocs != 'all':
continue

if alt == '.':
alt = ' '
Expand Down

0 comments on commit f6baf7c

Please sign in to comment.