docs: def write_mesa(self, mesa_isos_file='isos.txt',
                     add_excess_iso='fe56', outfile='xa_iniabu.dat',
                     header_string='initial abundances for a MESA run',
                     header_char='!'):
          '''
          Write initial abundance file, returns written abundances and
          mesa names.
  
          Parameters
          ----------
          mesa_isos_file : string, optional
              List with isos copied from mesa network definition file in
              mesa/data/net_data/nets.  The default is 'isos.txt'.
          add_excess_iso : string, optional
              Add 1.-sum(isos in mesa net) to this isotope.  The defualt
              is 'fe56'.
          outfile : string, optional
              name of output file.  The default file is 'xa_iniabu.dat'.
          header_string : string, optional
              Srting with header line.  The default is
              'initial abundances for a MESA run'.
          header_char : character, optional
              The default is '!'.
  
          Examples
          --------
  
          >>> from NuGridPy import utils
          >>> !ls ~/PPN/forum.astro.keele.ac.uk/frames/mppnp/USEEPP/   # find ppn initial abundance file
          >>> !cat ~/mesa/data/net_data/nets/agb.net                   # find isos needed in mesa net
          >>> !cat > isos.txt                                          # paste needed isos into file
          >>> help(utils.iniabu)                                       # check documentation of method
          >>> x=utils.iniabu('path_to_here/forum.astro.keele.ac.uk/frames/mppnp/USEEPP/iniab2.0E-02GN93.ppn')
          >>> x.write_mesa?
          >>> mnames,mabus = x.write_mesa(add_excess_iso='ne22',
          ...                header_string='mppnp/USEEPP/iniab2.0E-02GN93.ppn for mesa/agb.net',
          ...                outfile='xa_2.0E-02GN93.mesa')
  
          '''
  
  
          f=open('isos.txt')
          a=f.readlines()
          isos=[]
          for i in range(len(a)):
              isos.append(a[i].strip().rstrip(','))
  
          mesa_names=[]
          abus=[]
          for i in range(len(self.z)):
              b=self.names[i].split()
              a=''
              a=a.join(b)
              if a in isos:
                  mesa_names.append(a)
                  abus.append(self.abu[i])
              # mesa_names.append(elements_names[int(x.z[i])].lower()+str(int(x.a[i])))
  
          for i in range(len(isos)):
              if isos[i] not in mesa_names:
                  mesa_names.append(isos[i])
                  abus.append(0.0)
  
          excess=1.-np.sum(np.array(abus))
          abus=np.array(abus)
          abus[mesa_names.index(add_excess_iso)] += excess
  
          dcols=['','']
          data=[mesa_names,abus]
          hd=[header_string]
          att.write(outfile,hd,dcols,data,header_char=header_char)
          return mesa_names,abus