diff --git a/prody/proteins/ciffile.py b/prody/proteins/ciffile.py index a9df3ecdb..2c5955202 100644 --- a/prody/proteins/ciffile.py +++ b/prody/proteins/ciffile.py @@ -194,7 +194,7 @@ def parseMMCIFStream(stream, **kwargs): if segment is not None: if not isinstance(segment, str): raise TypeError('segment must be a string') - elif len(chain) == 0: + elif len(segment) == 0: raise ValueError('segment must not be an empty string') title_suffix = '_' + segment + title_suffix diff --git a/prody/tests/proteins/test_ciffile.py b/prody/tests/proteins/test_ciffile.py index b302f3c7e..f81b7c907 100644 --- a/prody/tests/proteins/test_ciffile.py +++ b/prody/tests/proteins/test_ciffile.py @@ -159,7 +159,7 @@ def testUniteChainsAndBiomolArguments(self): 'parseMMCIF failed to parse correct numbers of chains ' 'with biomol True and unite_chain False') - bm_header = parseMMCIF(path, biomol=True)[0] + bm_header = parseMMCIF(path, biomol=True, header=True)[0] self.assertEqual(bm_header[0].numAtoms(), self.biomols['bm0_atoms'], 'parseMMCIF failed to parse correct number of atoms '