code: def parse_atoms(self, pdb):
      
      
      atomre = re.compile("ATOM")
      
      atomlines = [line for line in pdb.lines if atomre.match(line)]
      
      chainresnums = {}
      
      for line in atomlines:
        chain = line[21]
        resname = line[17:20]
        resnum = line[22:27]
        #print resnum
        chainresnums.setdefault(chain, [])
        
        if resnum in chainresnums[chain]:
          assert self[chain][chainresnums[chain].index(resnum)] == resname
        else:
          if resnum[-1] == ' ':
            self.setdefault(chain, [])
            self[chain] += [resname]
            chainresnums[chain] += [resnum]
      
      return chainresnums
docs: Parse the ATOM entries into the object