+ do i=1,nss
+ ici=ireschain(ihpb(i)-nres)
+ icj=ireschain(jhpb(i)-nres)
+ iri=ihpb(i)-chain_border(1,ici)+1-nres
+ irj=jhpb(i)-chain_border(1,icj)+1-nres
+c write (iout,*) ihpb(i),ici,iri,jhpb(i),icj,irj
+ write(ipdb,'(a6,i4,1x,a3,1x,a1,i5,4x,a3,1x,a1,i5,38x,f5.2)')
+ & 'SSBOND',i,'CYS',chainid(ici),iri,'CYS',chainid(icj),irj,
+ & dist(ihpb(i),jhpb(i))
+ enddo