+ else if (ndih_constr.lt.0) then
+ raw_psipred=.true.
+ call card_concat(controlcard,.true.)
+ call reada(controlcard,"PHIHEL",phihel,50.0D0)
+ call reada(controlcard,"PHIBET",phibet,180.0D0)
+ call reada(controlcard,"SIGMAHEL",sigmahel,30.0d0)
+ call reada(controlcard,"SIGMABET",sigmabet,40.0d0)
+ call reada(controlcard,"WDIHC",wdihc,0.591d0)
+ write (iout,*) "Weight of the dihedral restraint term",wdihc
+ read(inp,'(9x,3f7.3)')
+ & (secprob(1,i),secprob(2,i),secprob(3,i),i=nnt,nct)
+ write (iout,*) "The secprob array"
+ do i=nnt,nct
+ write (iout,'(i5,3f8.3)') i,(secprob(j,i),j=1,3)
+ enddo
+ ndih_constr=0
+ do i=nnt+3,nct
+ if (itype(i-3).ne.ntyp1 .and. itype(i-2).ne.ntyp1
+ & .and. itype(i-1).ne.ntyp1 .and. itype(i).ne.ntyp1) then
+ ndih_constr=ndih_constr+1
+ idih_constr(ndih_constr)=i
+ sumv=0.0d0
+ do j=1,3
+ vpsipred(j,ndih_constr)=secprob(j,i-1)*secprob(j,i-2)
+ sumv=sumv+vpsipred(j,ndih_constr)
+ enddo
+ do j=1,3
+ vpsipred(j,ndih_constr)=vpsipred(j,ndih_constr)/sumv
+ enddo
+ phibound(1,ndih_constr)=phihel*deg2rad
+ phibound(2,ndih_constr)=phibet*deg2rad
+ sdihed(1,ndih_constr)=sigmahel*deg2rad
+ sdihed(2,ndih_constr)=sigmabet*deg2rad
+ endif
+ enddo
+ write (iout,*)
+ & 'There are',ndih_constr,
+ & ' bimodal restraints on gamma angles.'
+ do i=1,ndih_constr
+ write(iout,'(i5,1x,a4,i5,1h-,a4,i5,4f8.3,3f10.5)') i,
+ & restyp(itype(idih_constr(i)-2)),idih_constr(i)-2,
+ & restyp(itype(idih_constr(i)-1)),idih_constr(i)-1,
+ & phibound(1,i)*rad2deg,sdihed(1,i)*rad2deg,
+ & phibound(2,i)*rad2deg,sdihed(2,i)*rad2deg,
+ & (vpsipred(j,i),j=1,3)
+ enddo