      subroutine fdshps(stpt, shtnum, ssbond, shtcod, bridpt, found,    FDSH001
     &                  seqlen)                                         FDSH002
c                                                                       FDSH003
c     find the next partially set sheet, if any (neg shtnum), set it    FDSH004
c     to fully set and then set its partners to partly set if not       FDSH005
c     already set                                                       FDSH006
c                                                                       FDSH007
      include 'sstruc.par'                                              FDSH008
      integer   stpt, shtnum, shtcod(maxres), bridpt(2,maxres), seqlen  FDSH009
      character ssbond(nstruc,maxres)                                   FDSH010
      logical   found                                                   FDSH011
                                                                        FDSH012
      integer   nxres, stsht, finsht, nxpl                              FDSH013
                                                                        FDSH014
      found = .false.                                                   FDSH015
      nxres = stpt                                                      FDSH016
 1000 continue                                                          FDSH017
      if (shtcod(nxres) .ne. - shtnum) then                             FDSH018
         nxres = nxres + 1                                              FDSH019
         if (nxres .gt. seqlen) goto 5000                               FDSH020
         goto 1000                                                      FDSH021
      end if                                                            FDSH022
      stsht = nxres                                                     FDSH023
      found = .true.                                                    FDSH024
 1500 continue                                                          FDSH025
      if (shtcod(nxres) .eq. -shtnum) then                              FDSH026
         nxres = nxres + 1                                              FDSH027
         if (nxres .le. seqlen) goto 1500                               FDSH028
      end if                                                            FDSH029
      finsht = nxres - 1                                                FDSH030
                                                                        FDSH031
      do 2000, nxres = stsht, finsht                                    FDSH032
      shtcod(nxres) = shtnum                                            FDSH033
      do 1900, nxpl = 1,2                                               FDSH034
      if (bridpt(nxpl,nxres) .ne. 0) then                               FDSH035
         if (shtcod(bridpt(nxpl,nxres)) .eq. 0)                         FDSH036
     &      call setsht(bridpt(nxpl,nxres), shtnum, shtcod, ssbond,     FDSH037
     &                  seqlen)                                         FDSH038
      end if                                                            FDSH039
 1900 continue                                                          FDSH040
 2000 continue                                                          FDSH041
 5000 continue                                                          FDSH042
      END                                                               FDSH043
