Skip to content

Commit

Permalink
fix mmcif title suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Oct 18, 2023
1 parent 3fbf6b8 commit 222fd0b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions prody/proteins/ciffile.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ def parseMMCIFStream(stream, **kwargs):
.format(str(model)))
title_suffix = ''


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 subset:
try:
subset = _PDBSubsets[subset.lower()]
Expand All @@ -187,13 +195,6 @@ def parseMMCIFStream(stream, **kwargs):
.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')
Expand Down

0 comments on commit 222fd0b

Please sign in to comment.