Skip to content

Commit

Permalink
check segment and add it to title_suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Oct 12, 2023
1 parent fb4d2e8 commit 5c664b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions prody/proteins/ciffile.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def parseMMCIFStream(stream, **kwargs):
raise TypeError('model must be an integer, {0} is invalid'
.format(str(model)))
title_suffix = ''

if subset:
try:
subset = _PDBSubsets[subset.lower()]
Expand All @@ -185,13 +186,21 @@ def parseMMCIFStream(stream, **kwargs):
raise ValueError('{0} is not a valid subset'
.format(repr(subset)))
title_suffix = '_' + subset

if chain is not None:
if not isinstance(chain, str):
raise TypeError('chain must be a string')
elif len(chain) == 0:
raise ValueError('chain must not be an empty string')
title_suffix = '_' + chain + title_suffix

if segment is not None:
if not isinstance(segment, str):
raise TypeError('segment must be a string')
elif len(chain) == 0:
raise ValueError('segment must not be an empty string')
title_suffix = '_' + segment + title_suffix

ag = None
if 'ag' in kwargs:
ag = kwargs['ag']
Expand Down

0 comments on commit 5c664b3

Please sign in to comment.