       CHARACTER*(*) FUNCTION ELEMNT(NN,IW)                             
C
C MODULE TO RETURN ATOMIC SYMBOL WHEN GIVEN THE ATOMIC NUMBER
C         ODD SYMBOLS ARE ALSO ALLOWED (LIKE XX, X,Z, AND D )
C
c??       CHARACTER*5 ATSYM(110)                                           
       CHARACTER*6 ATSYMB
       COMMON /ATSYMB/ ATSYMB( 200)
        IF( NN .LE. 0 .OR. NN .GT. 200) THEN
            WRITE(IW,15) NN                                             
15          FORMAT(1X,'NO ATOMIC SYMBOL FOR ATOMIC NUMBER OF',I3/         
     +         1X,'00 SYMBOL ASSUMED'/                                  
     +         1X,'ERROR DETECTED IN SUBROUTINE ELEMNT')                
            ELEMNT='00'                                                 
            RETURN                                  
        END IF                                                          
        ELEMNT = ATSYMB(NN)                                                
        RETURN                                                           
        END                                                             
C*******************************************************************
       FUNCTION NUMELE(SYMBL)                                           
C                                                                       
C MODULE TO RETURN THE NUMBER ASSOCIATED WITH A SYMBOL.  IF A SYMBOL
C   IS NOT RECOGNIZED,  0 (ZERO) IS RETURNED             
C      note: NUMELE is the inverse of FUNCTION ELEMNT. If NUMELE is 
C            changed, ELEMNT must also be changed               
C                                                                       
       CHARACTER*(*) SYMBL
       CHARACTER*6 ATSYMB, UPSYMB
       COMMON /ATSYMB/ ATSYMB( 200)
       CHARACTER*80 UPCASE                                              
C                                                                       
        NUMELE = 0                                                      
        UPSYMB = UPCASE(SYMBL)                                         
        DO 100 I= 1, 200
           IF ( ATSYMB(I) .EQ. UPSYMB ) THEN
               NUMELE = I                                               
               RETURN
           ENDIF                                                       
100    CONTINUE                                                         
       RETURN
       END
