def parse_pdb(residue_id, pdbfile, residue_num = None):
    """ 
    Finds chain number/s and residue number/s for a given residue_id, and returns it as a set of tuples chain-residue
    """
    sel_chain_id = ""
    sel_residue_num = ""
    residues = set()
    with open(pdbfile, "r") as f:
        for line in f:
            if line.startswith("END"): 
                break
            if line.startswith("ATOM") or line.startswith("HETATM"):
                line_residue_id = line[17:21].strip()
                line_chain_id = line[21].strip()
                line_residue_num = line[22:26].strip()
                if residue_id == line_residue_id:
                    if ((residue_num is not None) and (residue_num == line_residue_num)) or residue_num is None:
                        sel_chain_id = line_chain_id
                        sel_residue_num = line_residue_num
                        residues.add((sel_chain_id, sel_residue_num))
    return(residues)