this function maps the chain and res ids "A 234" to values from [1-N]

def get_residue_mapping(self):
        """this function maps the chain and res ids "A 234" to values from [1-N]"""

        resid_list = self.aa_resids()
        # resid_set  = set(resid_list)
        # resid_lst1 = list(resid_set)
        # resid_lst1.sort()
        map_res_id = {}

        x = 1
        for resid in resid_list:
            # map_res_id[ int(resid[1:].strip()) ] = x
            map_res_id[ resid ] = x
            x+=1
        return map_res_id