docs: def GetRosettaResidueMap(self, ConvertMSEToAtom = False, RemoveIncompleteFinalResidues = False, RemoveIncompleteResidues = False):
          '''Note: This function ignores any DNA.'''
          raise Exception('This code looks to be deprecated. Use construct_pdb_to_rosetta_residue_map instead.')
          chain = None
          sequences = {}
          residue_map = {}
          resid_set = set()
          resid_list = []
  
          DNA_residues = set([' DA', ' DC', ' DG', ' DT'])
          chains = []
          self.RAW_ATOM_SEQUENCE = []
          essential_atoms_1 = set(['CA', 'C', 'N'])#, 'O'])
          essential_atoms_2 = set(['CA', 'C', 'N'])#, 'OG'])
          current_atoms = set()
          atoms_read = {}
          oldchainID = None
          removed_residue = {}
          for line in self.lines:
              if line[0:4] == 'ATOM' or (ConvertMSEToAtom and (line[0:6] == 'HETATM') and (line[17:20] == 'MSE')):
                  chainID = line[21]
                  if missing_chain_ids.get(self.pdb_id):
                      chainID = missing_chain_ids[self.pdb_id]
                  if chainID not in chains:
                      chains.append(chainID)
                  residue_longname = line[17:20]
                  if residue_longname in DNA_residues:
                      # Skip DNA
                      continue
                  if residue_longname == 'UNK':
                      # Skip unknown residues
                      continue
                  if residue_longname not in allowed_PDB_residues_types and not(ConvertMSEToAtom and residue_longname == 'MSE'):
                      if not self.strict:
                          # Skip unknown residues
                          continue
                      else:
                          raise NonCanonicalResidueException("Residue %s encountered: %s" % (line[17:20], line))
                  else:
                      resid = line[21:27]
                      #print(chainID, residue_longname, resid)
                      #print(line)
                      #print(resid_list)
                      if resid not in resid_set:
                          removed_residue[chainID] = False
                          add_residue = True
                          if current_atoms:
                              if RemoveIncompleteResidues and essential_atoms_1.intersection(current_atoms) != essential_atoms_1 and essential_atoms_2.intersection(current_atoms) != essential_atoms_2:
                                  oldChain = resid_list[-1][0]
                                  oldResidueID = resid_list[-1][1:]
                                  print("The last residue '%s', %s, in chain %s is missing these atoms: %s." % (resid_list[-1], residue_longname, oldChain, essential_atoms_1.difference(current_atoms) or essential_atoms_2.difference(current_atoms)))
                                  resid_set.remove(resid_list[-1])
                                  #print("".join(resid_list))
                                  resid_list = resid_list[:-1]
                                  if oldchainID:
                                      removed_residue[oldchainID] = True
                                  #print("".join(resid_list))
                                  #print(sequences[oldChain])
                                  if sequences.get(oldChain):
                                      sequences[oldChain] = sequences[oldChain][:-1]
  
                                  if residue_map.get(oldChain):
                                      residue_map[oldChain] = residue_map[oldChain][:-1]
  
                                  #print(sequences[oldChain]
                          else:
                              assert(not(resid_set))
                          current_atoms = set()
                          atoms_read[chainID] = set()
                          atoms_read[chainID].add(line[12:15].strip())
                          resid_set.add(resid)
                          resid_list.append(resid)
                          chainID = line[21]
  
                          sequences[chainID] = sequences.get(chainID, [])
                          if residue_longname in non_canonical_amino_acids:
                              sequences[chainID].append(non_canonical_amino_acids[residue_longname])
                          else:
                              sequences[chainID].append(residue_type_3to1_map[residue_longname])
  
                          residue_map[chainID] = residue_map.get(chainID, [])
                          if residue_longname in non_canonical_amino_acids:
                              residue_map[chainID].append((resid, non_canonical_amino_acids[residue_longname]))
                          else:
                              residue_map[chainID].append((resid, residue_type_3to1_map[residue_longname]))
  
                          oldchainID = chainID
                      else:
                          #atoms_read[chainID] = atoms_read.get(chainID, set())
                          atoms_read[chainID].add(line[12:15].strip())
                      current_atoms.add(line[12:15].strip())
          if RemoveIncompleteFinalResidues:
              # These are (probably) necessary for Rosetta to keep the residue. Rosetta does throw away residues where only the N atom is present if that residue is at the end of a chain.
              for chainID, sequence_list in sequences.iteritems():
                  if not(removed_residue[chainID]):
                      if essential_atoms_1.intersection(atoms_read[chainID]) != essential_atoms_1 and essential_atoms_2.intersection(atoms_read[chainID]) != essential_atoms_2:
                          print("The last residue %s of chain %s is missing these atoms: %s." % (sequence_list[-1], chainID, essential_atoms_1.difference(atoms_read[chainID]) or essential_atoms_2.difference(atoms_read[chainID])))
                          oldResidueID = sequence_list[-1][1:]
                          residue_map[chainID] = residue_map[chainID][0:-1]
                          sequences[chainID] = sequence_list[0:-1]
  
  
          for chainID, sequence_list in sequences.iteritems():
              sequences[chainID] = "".join(sequence_list)
              assert(sequences[chainID] == "".join([res_details[1] for res_details in residue_map[chainID]]))
          for chainID in chains:
              for a_acid in sequences.get(chainID, ""):
                  self.RAW_ATOM_SEQUENCE.append((chainID, a_acid))
  
          residue_objects = {}
          for chainID in residue_map.keys():
              residue_objects[chainID] = []
          for chainID, residue_list in residue_map.iteritems():
              for res_pair in residue_list:
                  resid = res_pair[0]
                  resaa = res_pair[1]
                  assert(resid[0] == chainID)
                  residue_objects[chainID].append((resid[1:].strip(), resaa))
  
          return sequences, residue_objects