      subroutine symchk (sym,exists)                                    SYMC001
c ----------------------------------------------------------------------SYMC002
c     looks, whether symbol sym of the decoded space group is valid     SYMC003
c ----------------------------------------------------------------------SYMC004
c     This program module is part of the PhysiSoft X-ray Library        SYMC005
c     and may not be sold or reproduced for commercial purposes.        SYMC006
c     Although it has been tested carefully, there is no warranty       SYMC007
c     regarding accuracy or freedom from side-effects.                  SYMC008
c                   (C) 1986-1990 Bernhard Rupp                         SYMC009
c ----------------------------------------------------------------------SYMC010
                                                                        SYMC011
      parameter (nsym = 37)                                             SYMC012
      character*4 sym, s(nsym)                                          SYMC013
      logical exists                                                    SYMC014
      exists=.false.                                                    SYMC015
                                                                        SYMC016
      data (s(i),i=1,nsym)/'1','2','3','4','6','M','N','A','B','C','D'  SYMC017
     &     ,'-1','-3','-4','-6'                                         SYMC018
     &     ,'21','31','32','41','42','43','61','62','63','64','65'      SYMC019
     &     ,'2/M','2/C','21/C','21/M'                                   SYMC020
     &     ,'4/M','4/N','41/A','42/N','42/M'                            SYMC021
     &     ,'6/M','63/M'/                                               SYMC022
                                                                        SYMC023
      do 0001 i=1,nsym                                                  SYMC024
         if (sym.eq.s(i)) then                                          SYMC025
            exists=.true.                                               SYMC026
            return                                                      SYMC027
         end if                                                         SYMC028
 0001 continue                                                          SYMC029
      return                                                            SYMC030
      end                                                               SYMC031
                                                                        SYMC032
