      integer function ielect (elem2)                                   IELE001
c ----------------------------------------------------------------------IELE002
c     returns Z of the atomic symbol ityp, 0 if not found               IELE003
c ----------------------------------------------------------------------IELE004
c     This program module is part of the PhysiSoft X-ray Library        IELE005
c     and may not be sold or reproduced for commercial purposes.        IELE006
c     Although it has been tested carefully, there is no warranty       IELE007
c     regarding accuracy or freedom from side-effects.                  IELE008
c                   (C) 1986-1990 Bernhard Rupp                         IELE009
c ----------------------------------------------------------------------IELE010
                                                                        IELE011
      parameter (nel=105)                                               IELE012
      parameter (nl=17)                                                 IELE013
                                                                        IELE014
      character*2 i(nel),elem2,l(nl)                                    IELE015
                                                                        IELE016
c --- nel regular elements ---                                          IELE017
      data(i(k),k=1,nel)/'H','HE','LI','BE','B','C','N','O','F','NE'    IELE018
     *  ,'NA','MG','AL','SI','P','S','CL','AR','K','CA','SC','TI','V'   IELE019
     *  ,'CR','MN','FE','CO','NI','CU','ZN','GA','GE','AS','SE','BR'    IELE020
     *  ,'KR','RB','SR','Y','ZR','NB','MO','TC','RU','RH','PD','AG'     IELE021
     *  ,'CD','IN','SN','SB','TE','I','XE','CS','BA','LA','CE','PR'     IELE022
     *  ,'ND','PM','SM','EU','GD','TB','DY','HO','ER','TM','YB','LU'    IELE023
     *  ,'HF','TA','W' ,'RE','OS','IR','PT','AU','HG','TL','PB','BI'    IELE024
     *  ,'PO','AT','RN','FR','RA','AC','TH','PA','U', 'NP','PU','AM'    IELE025
     *  ,'CM','BK','CF','ES','FM','MD','NO','LR','RF','HA'/             IELE026
                                                                        IELE027
c --- Lazy Pulverix special elements ---                                IELE028
      data(l(k),k=1,nl)/'H.','C.','D.','F1','O2','O1','I1','H1','K1'    IELE029
     *  ,'U3','U4','U6','V2','V3','V5','W6','Y3'/                       IELE030
                                                                        IELE031
      ielect=0                                                          IELE032
      do 0001 k=1,nel                                                   IELE033
         if(i(k).eq.elem2) then                                         IELE034
            ielect=k                                                    IELE035
            return                                                      IELE036
         endif                                                          IELE037
 0001 continue                                                          IELE038
      do 0002 k=1,nl                                                    IELE039
         if(l(k).eq.elem2) then                                         IELE040
            ielect=200+k                                                IELE041
            return                                                      IELE042
         endif                                                          IELE043
 0002 continue                                                          IELE044
      return                                                            IELE045
      end                                                               IELE046
                                                                        IELE047
