def generate_unp_dictionary(uniprot_tab):
	"""
	Parse the Uniprot tab file containg all entries with models and resulting in
	 a dictionary of pdb_id -> [(Uniprot_id, protein_names)]
	"""
	uniprot = {}
	with open(uniprot_tab, 'r') as fr:
		next(fr) #Skip header
		for line in fr:
			line = line.strip()
			uniprot_id, pdb_list, protein_names = line.split('\t')
			pdb_list = pdb_list.split(';')[:-1]
			for pdb_id in pdb_list:
				pdb_id = pdb_id.lower()
				if pdb_id in uniprot:
					uniprot[pdb_id].append((uniprot_id, protein_names))
				else:
					uniprot[pdb_id] = [(uniprot_id, protein_names)]
	return uniprot