From 9b9b97df86c7996e0158e69048a4d55924b0058f Mon Sep 17 00:00:00 2001 From: James Krieger Date: Fri, 8 Nov 2024 17:14:34 +0000 Subject: [PATCH] more fixes to _parsePDB for cif --- prody/proteins/pdbfile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/prody/proteins/pdbfile.py b/prody/proteins/pdbfile.py index a8127e72f..624ed11da 100644 --- a/prody/proteins/pdbfile.py +++ b/prody/proteins/pdbfile.py @@ -214,13 +214,15 @@ def _parsePDB(pdb, **kwargs): if filename is None: try: LOGGER.warn("Trying to parse mmCIF file instead") + chain = kwargs.pop('chain', chain) return parseMMCIF(pdb+chain, **kwargs) - except: + except OSError: try: LOGGER.warn("Trying to parse EMD file instead") + chain = kwargs.pop('chain', chain) return parseEMD(pdb+chain, **kwargs) except: - raise IOError('PDB file for {0} could not be downloaded.' + raise IOError('PDB file for {0} could not be parsed.' .format(pdb)) pdb = filename if title is None: