docs: def _parse(self):
          """
          Parse atomic data of the XML file.
          """
          
          atom_counter = 0
          
          structure_build = self.structure_builder
          
          residues = self._extract_residues()
          
          cur_model = None
          cur_chain = None
          structure_build.init_seg(' ') # There is never a SEGID present
          
          for r in residues:
  
              # New model?
              if cur_model != r['model']:
                  cur_model = r['model']
                  try:
                      structure_build.init_model(cur_model)
                  except PDBConstructionException, message:
                      self._handle_builder_exception(message, r) 
              
              # New chain?
              if cur_chain != r['chain']:
                  cur_chain = r['chain']
                  try:
                      structure_build.init_chain(cur_chain)
                  except PDBConstructionException, message:
                      self._handle_builder_exception(message, r)
  
              # Create residue
              if r['name'] in AA_LIST: # Get residue type crudely since there is no HETATM / ATOM
                  hetero_flag = ' '
              elif r['name'] == 'WAT' or r['name'] == 'HOH':
                  hetero_flag = 'W'
              else:
                  hetero_flag = 'H'
              
              # Some terminal atoms are added at residue 0. This residue has a small number of atoms.
              # Protonated non-terminal glycine has 7 atoms. Any of these residues is smaller.
              # HETATMs have only a couple of atoms (3 for water for example) and they are ok.
              
              if (len(r['atoms']) >= 7) or (hetero_flag != " "):
                  try:
                      structure_build.init_residue(r['name'], hetero_flag, r['number'], r['icode'])
                  except PDBConstructionException, message:
                      self._handle_builder_exception(message, r)
              
                  # Create Atoms
                  for atom in r['atoms']:
                      a = self._parse_atom(atom)
  
                      if not sum(a['coord']): # e.g. HG of metal bound CYS coords are 0,0,0.
                          continue
                          
                      try:
                          atom_counter += 1
                          # fullname = name; altloc is empty;
                          structure_build.init_atom(a['name'], a['coord'], a['bfactor'], a['occupancy'], ' ',
                                                      a['name'], atom_counter, a['element'],  hetero_flag)
                      except PDBConstructionException, message:
                          self._handle_builder_exception(message, r)      
              
              elif len(r['atoms']) < 7: # Terminal Residues
                                  
                  for atom in r['atoms']:
                      
                      a = self._parse_atom(atom)
                      
                      if not sum(a['coord']): # e.g. HG of metal bound CYS coords are 0,0,0.
                          continue
  
                      atom_counter += 1                    
                      ter_atom = Atom(a['name'], a['coord'], a['bfactor'], a['occupancy'], ' ',
                                      a['name'], atom_counter, a['element'], hetero_flag)
                      
                      if a['name'] in N_TERMINAL_ATOMS:
                          
                          inc_struct = self.structure_builder.get_structure()
                          for model in inc_struct:
                              for chain in model:
                                  if chain.id == r['chain']:
                                      for residue in chain: # Find First residue matching name
                                          if residue.resname == r['name']:
                                              residue.add(ter_atom)
                                              break
                      
                      elif a['name'] in C_TERMINAL_ATOMS:
  
                          inc_struct = self.structure_builder.get_structure()
                          c_ter = None
                          for model in inc_struct:
                              for chain in model:
                                  if chain.id == r['chain']:
                                      for residue in chain: # Find Last residue matching name
                                          if residue.resname == r['name']:
                                              c_ter = residue
                                      if c_ter:
                                          c_ter.add(ter_atom)