C------------------------------------------------------------------------------
C
C  Peter Richter (prichter@princeton.edu)
C  Princeton Plasma Physics Laboratory
C  August 2000
C
C  icode_preact.for - Return integer code associated with a
C            particular reaction.
C
C------------------------------------------------------------------------------
C
      integer function icode_preact(tag)
C
      implicit none
      character*(*) tag
C
      if (tag.eq.'recombine') then
 
         icode_preact=0
 
      else if ((tag.eq.'H->H(cx)').or.(tag.eq.'H->H(ii)')
     >      .or.(tag.eq.'D->D(n)').or.(tag.eq.'C+6->H')
     >      .or.(tag.eq.'i:e->H0')) then
 
         icode_preact=1
 
      else if ((tag.eq.'H+->He0x').or.(tag.eq.'H+->He0i')
     >      .or.(tag.eq.'D->D(p)').or.(tag.eq.'C+6->He')
     >      .or.(tag.eq.'i:e->He0')) then
 
         icode_preact=2
 
      else if ((tag.eq.'He++>Hex').or.(tag.eq.'He++>H0i')
     >      .or.(tag.eq.'D->T')   .or.(tag.eq.'C+6->Li')
     >      .or.(tag.eq.'i:e->Li0')) then
 
         icode_preact=3
 
      else if ((tag.eq.'H+->Li0x').or.(tag.eq.'He++>Hei')
     >      .or.(tag.eq.'T->D')   .or.(tag.eq.'O+8->H')) then
 
         icode_preact=4
 
      else if ((tag.eq.'He++>Lix').or.(tag.eq.'H+->Li0i')
     >      .or.(tag.eq.'D->He3') .or.(tag.eq.'O+8->He'))  then
 
         icode_preact=5
 
      else if ((tag.eq.'Li+++>Lx').or.(tag.eq.'He++>Lii')
     >      .or.(tag.eq.'He3->D') .or.(tag.eq.'O+8->Li'))  then
 
         icode_preact=6
 
      else if ((tag.eq.'Li+++->H').or.(tag.eq.'T->T'))    then
 
         icode_preact=7
 
      else if ((tag.eq.'Li+++>He').or.(tag.eq.'T->He3'))  then
 
         icode_preact=8
 
      else if ((tag.eq.'Li+++>Li').or.(tag.eq.'He3->T'))  then
 
         icode_preact=9
 
      else if ((tag.eq.'Li+++->H').or.(tag.eq.'dpcT->T'))    then
 
         icode_preact=10
 
      else
         icode_preact=-1                 ! Error - invalid tag
      endif
C
      return
      end
C
C------------------------------------------------------------------------------
