      Subroutine Shtlab(ssbond, bridpt, shtcod, seqlen)                 SHTL001
c                                                                       SHTL002
c     label the sheets using numbers which are turned into              SHTL003
c     alphabetic symbols later                                          SHTL004
c                                                                       SHTL005
      include 'sstruc.par'                                              SHTL006
      character ssbond(nstruc,maxres)*1                                 SHTL007
      integer   bridpt(2,maxres), shtcod(maxres), seqlen                SHTL008
                                                                        SHTL009
      integer   nxres, stsht, finsht, shtnum, nxisht, nxpl              SHTL010
      logical   found                                                   SHTL011
                                                                        SHTL012
      do 100, nxres = 1, seqlen                                         SHTL013
      shtcod(maxres) = 0                                                SHTL014
  100 continue                                                          SHTL015
                                                                        SHTL016
      shtnum = 0                                                        SHTL017
      nxres = 1                                                         SHTL018
 1000 continue                                                          SHTL019
      call fdshus(nxres, ssbond, shtcod, stsht, finsht, seqlen)         SHTL020
      if (stsht .ne. 0) then                                            SHTL021
         shtnum = shtnum + 1                                            SHTL022
         do 1500, nxisht = stsht, finsht                                SHTL023
         shtcod(nxisht) = shtnum                                        SHTL024
         do 1400, nxpl = 1,2                                            SHTL025
         If (bridpt(nxpl,nxisht) .ne. 0) then                           SHTL026
            if (shtcod(bridpt(nxpl,nxisht)) .eq. 0)                     SHTL027
     &         call setsht(bridpt(nxpl,nxisht), shtnum, shtcod,         SHTL028
     &                     ssbond, seqlen)                              SHTL029
         end if                                                         SHTL030
 1400    continue                                                       SHTL031
 1500    continue                                                       SHTL032
                                                                        SHTL033
 2000    continue                                                       SHTL034
         call fdshps(finsht+1, shtnum, ssbond, shtcod, bridpt, found,   SHTL035
     &               seqlen)                                            SHTL036
         if (found) go to 2000                                          SHTL037
                                                                        SHTL038
         nxres = finsht + 1                                             SHTL039
         if (nxres .le. seqlen) go to 1000                              SHTL040
      end if                                                            SHTL041
      If (shtnum .gt. nstchs)                                           SHTL042
     &   Write(errfi,2100) shtnum                                       SHTL043
 2100 format('there are ',I3,' sheets. Labels have restarted')          SHTL044
      END                                                               SHTL045
