Skip to content

Commit

Permalink
adhoc fix for 6uwi
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Nov 8, 2023
1 parent 27e38ba commit 96ba836
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion prody/proteins/ciffile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from collections import OrderedDict
import os.path
from numbers import Integral
import numpy as np

from prody.atomic import AtomGroup
Expand All @@ -19,6 +20,8 @@
from .cifheader import getCIFHeaderDict
from .header import buildBiomolecules, assignSecstr, isHelix, isSheet

from string import ascii_uppercase

__all__ = ['parseMMCIFStream', 'parseMMCIF', 'parseCIF']


Expand Down Expand Up @@ -300,6 +303,7 @@ def _parseMMCIFLines(atomgroup, lines, model, chain, subset,
doneAtomBlock = False
start = 0
stop = 0
warnedAltloc = False
while not doneAtomBlock:
line = lines[i]
if line[:11] == '_atom_site.':
Expand Down Expand Up @@ -432,7 +436,12 @@ def _parseMMCIFLines(atomgroup, lines, model, chain, subset,

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

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

0 comments on commit 96ba836

Please sign in to comment.