character*3 seq,atom,res
character*80 card
dimension sccor(3,20)
+ double precision e1(3),e2(3),e3(3)
+ logical fail
integer rescode
ibeg=1
lsecondary=.false.
nres=nres+1
itype(nres)=21
if (unres_pdb) then
- c(1,nres)=c(1,nres-1)+3.8d0
- c(2,nres)=c(2,nres-1)
- c(3,nres)=c(3,nres-1)
+C 2/15/2013 by Adam: corrected insertion of the last dummy residue
+ call refsys(nres-3,nres-2,nres-1,e1,e2,e3,fail)
+ if (fail) then
+ e2(1)=0.0d0
+ e2(2)=1.0d0
+ e2(3)=0.0d0
+ endif
+ do j=1,3
+ c(j,nres)=c(j,nres-1)-3.8d0*e2(j)
+ enddo
else
do j=1,3
dcj=c(j,nres-2)-c(j,nres-3)
nsup=nsup-1
nstart_sup=2
if (unres_pdb) then
- c(1,1)=c(1,2)-3.8d0
- c(2,1)=c(2,2)
- c(3,1)=c(3,2)
+C 2/15/2013 by Adam: corrected insertion of the first dummy residue
+ call refsys(2,3,4,e1,e2,e3,fail)
+ if (fail) then
+ e2(1)=0.0d0
+ e2(2)=1.0d0
+ e2(3)=0.0d0
+ endif
+ do j=1,3
+ c(j,1)=c(j,2)-3.8d0*e2(j)
+ enddo
else
do j=1,3
dcj=c(j,4)-c(j,3)
vbld(i+1)=dist(i,i+1)
vbld_inv(i+1)=1.0d0/vbld(i+1)
if (i.gt.1) theta(i+1)=alpha(i-1,i,i+1)
- if (i.gt.2) phi(i+1)=beta(i-2,i-1,i,i+1)
+ if (i.gt.2) then
+ if (i.le.nres) phi(i+1)=beta(i-2,i-1,i,i+1)
+ if ((itype(i).ne.10).and.(itype(i-1).ne.10)) then
+ tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
+ endif
+ if (itype(i-1).ne.10) then
+ tauangle(1,i+1)=beta(i-1+nres,i-1,i,i+1)
+ omicron(1,i)=alpha(i-2,i-1,i-1+nres)
+ omicron(2,i)=alpha(i-1+nres,i-1,i)
+ endif
+ if (itype(i).ne.10) then
+ tauangle(2,i+1)=beta(i-2,i-1,i,i+nres)
+ endif
+ endif
enddo
c if (unres_pdb) then
c if (itype(1).eq.21) then
enddo
iti=itype(i)
di=dist(i,nres+i)
+C 9/29/12 Adam: Correction for zero SC-SC bond length
+ if (itype(i).ne.10 .and. itype(i).ne.21. and. di.eq.0.0d0)
+ & di=dsc(itype(i))
vbld(i+nres)=di
if (itype(i).ne.10) then
vbld_inv(i+nres)=1.0d0/di
enddo
return
end
-