      Subroutine Setsht(refpl, shtnum, shtcod, ssbond, seqlen)          SETS001
c                                                                       SETS002
c     finds the limits of the super sheet containing refpl and          SETS003
c     sets this to partially set                                        SETS004
c                                                                       SETS005
      include 'sstruc.par'                                              SETS006
      integer   refpl, shtnum, shtcod(maxres), seqlen                   SETS007
      character ssbond(nstruc,maxres)*1                                 SETS008
                                                                        SETS009
      integer   nxres, stsht, finsht                                    SETS010
                                                                        SETS011
      nxres = refpl                                                     SETS012
  200 continue                                                          SETS013
      if (ssbond(sheet,nxres) .ne. space) then                          SETS014
         nxres = nxres + 1                                              SETS015
         if (nxres .le. seqlen) go to 200                               SETS016
      end if                                                            SETS017
      finsht = nxres - 1                                                SETS018
      nxres = refpl                                                     SETS019
  400 continue                                                          SETS020
      if (ssbond(sheet,nxres) .ne. space) then                          SETS021
         nxres = nxres - 1                                              SETS022
         if (nxres .ge. 1) go to 400                                    SETS023
      end if                                                            SETS024
      stsht = nxres + 1                                                 SETS025
                                                                        SETS026
      do 800, nxres = stsht, finsht                                     SETS027
      shtcod(nxres) = -shtnum                                           SETS028
  800 continue                                                          SETS029
      END                                                               SETS030
