+ else if (ndih_constr.lt.0) then
+ raw_psipred=.true.
+ allocate(secprob(3,nres))
+ allocate(vpsipred(3,nres))
+ allocate(sdihed(2,nres))
+ call card_concat(weightcard,.true.)
+ call reada(weightcard,"PHIHEL",phihel,50.0D0)
+ call reada(weightcard,"PHIBET",phibet,180.0D0)
+ call reada(weightcard,"SIGMAHEL",sigmahel,30.0d0)
+ call reada(weightcard,"SIGMABET",sigmabet,40.0d0)
+ call reada(weightcard,"WDIHC",wdihc,0.591D0)
+ write (iout,*) "Weight of dihedral angle restraints",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,1).ne.ntyp1 .and. itype(i-2,1).ne.ntyp1 &
+ .and. itype(i-1,1).ne.ntyp1 .and. itype(i,1).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
+