atoms = parsePDB(pdb)
chain_set = set(atoms.getChids())
// pdbId = "s001"
pdbId = ".".join(pdb.split(os.sep)[-1].split(".")[0:-1])
if not chain in chain_set:
raise ValueError("input PDB file does not have chain " + chain)
if len(chain_set) > 1:
After Change
filename = os.path.basename(pdb)
filename, ext = os.path.splitext(filename)
if ext.lower() == ".gz":
filename2, ext2 = os.path.splitext(filename)
if ext2.lower() == ".pdb":
filename = filename2
pdbId = filename
if not chain in chain_set: