docs: def pdb_to_uniparc(pdb_ids, silent = True, cache_dir = None, manual_additions = {}):
      ''' Returns a mapping {PDB ID -> List(UniParcEntry)}
          The UniParcEntry objects have a to_dict() method which may be useful.
      '''
  
      # Map PDB IDs to UniProtKB AC
      if not silent:
          colortext.write("Retrieving PDB to UniProtKB AC mapping: ", 'cyan')
      pdb_ac_mapping = uniprot_map('PDB_ID', 'ACC', pdb_ids, cache_dir = cache_dir, silent = silent)
  
      for k, v in manual_additions.iteritems():
          if k in pdb_ids:
              if pdb_ac_mapping.get(k):
                  pdb_ac_mapping[k].extend(v)
                  pdb_ac_mapping[k] = list(set(pdb_ac_mapping[k]))
              else:
                  pdb_ac_mapping[k] = v
  
      if not silent:
          colortext.write("done\n", 'green')
  
      # Get a list of AC_IDs
      if not silent:
          colortext.write("Retrieving UniProtKB AC to UniProtKB ID mapping: ", 'cyan')
      AC_IDs = set()
      for k, v in pdb_ac_mapping.iteritems():
          AC_IDs = AC_IDs.union(set(v))
      AC_IDs = list(AC_IDs)
      if not silent:
          colortext.write("done\n", 'green')
  
      # Map UniProtKB ACs to UniParc IDs
      if not silent:
          colortext.write("Retrieving UniProtKB AC to UniParc ID mapping: ", 'cyan')
      ac_uniparc_mapping = uniprot_map('ACC', 'UPARC', AC_IDs, cache_dir = cache_dir, silent = silent)
      for k, v in ac_uniparc_mapping.iteritems():
          assert(len(v) == 1)
          ac_uniparc_mapping[k] = v[0]
      if not silent:
          colortext.write("done\n", 'green')
  
      # Map UniProtKB ACs to UniProtKB IDs
      ac_id_mapping = uniprot_map('ACC', 'ID', AC_IDs, cache_dir = cache_dir, silent = silent)
  
      for k, v in ac_id_mapping.iteritems():
          assert(len(v) == 1)
          ac_id_mapping[k] = v[0]
  
      # Create mapping from PDB IDs to UniParcEntry objects
      m = {}
      if not silent:
          colortext.message("\nRetrieving FASTA sequences for the %d PDB IDs." % len(pdb_ids))
      for pdb_id, ACs in pdb_ac_mapping.iteritems():
          if not silent:
              colortext.write("%s: " % pdb_id, "orange")
          m[pdb_id] = []
          for AC in ACs:
              entry = UniParcEntry(ac_uniparc_mapping[AC], [AC], [ac_id_mapping[AC]], cache_dir = cache_dir)
              m[pdb_id].append(entry)
              if not silent:
                  colortext.write(".", "green")
          if not silent:
              print("")
      return m