1 implicit real*8 (a-h,o-z)
4 include 'COMMON.INTERACT'
5 include 'COMMON.SBRIDGE'
9 real*4 prec,time,potE,uconst,t_bath,qfrag(100)
11 character*80 arg,seqfile,angfile
12 character*3 sequenc(maxres)
14 character*8 onethree,cfreq
21 pi = 4.0d0*datan(1.0d0)
26 if (iargc().lt.3) then
28 & "Usage: xdrf2pdb one/three seqfile cxfile [freq] [angfile]"
31 call getarg(1,onethree)
32 onethree = ucase(onethree)
33 if (onethree.eq.'ONE') then
35 else if (onethree.eq.'THREE') then
38 print *,"ONE or THREE must be specified"
40 call getarg(2,seqfile)
41 open (1,file=seqfile,status='old')
43 read(1,'(80a1)',end=10,err=10) (sequenc(i)(1:1),i=1,maxres)
47 do while (.not.iblnk(sequenc(i+1)(1:1)))
52 itype(i)=rescode(i,sequenc(i),1)
55 read(1,'(20(a3,1x))',end=11,err=11) (sequenc(i),i=1,maxres)
59 do while (.not.iblnk(sequenc(i+1)(1:1)))
64 itype(i)=rescode(i,sequenc(i),0)
68 iext = index(arg,'.cx') - 1
70 print *,"Error - not a cx file"
73 if (iargc().gt.3) then
77 if (iargc().gt.4) then
78 call getarg(5,angfile)
80 angfile=arg(:iext)//'.ang'
84 if (itype(1).eq.21) nnt = 2
86 if (itype(nres).eq.21) nct = nres-1
88 call xdrfopen(ixdrf,arg, "r", iret)
92 c call xdrfint(ixdrf, ic, iret)
94 call xdrffloat(ixdrf, time, iret)
97 call xdrffloat(ixdrf, potE, iret)
98 c call xdrffloat(ixdrf, uconst, iret)
99 call xdrffloat(ixdrf, uconst_back, iret)
100 call xdrffloat(ixdrf, t_bath, iret)
101 call xdrfint(ixdrf, nss, iret)
103 call xdrfint(ixdrf, ihpb(j), iret)
104 call xdrfint(ixdrf, jhpb(j), iret)
106 call xdrfint(ixdrf, nfrag, iret)
108 call xdrffloat(ixdrf, qfrag(i), iret)
113 call xdrf3dfcoord(ixdrf, coord, isize, prec, iret)
116 c write (*,'(i4,$)') nss,(ihpb(j),jhpb(j),j=1,nss)
117 c write (*,'(i4,20f7.4)') nfrag,(qfrag(i),i=1,nfrag)
118 c write (*,'(8f10.5)') ((coord(k,j),k=1,3),j=1,isize)
119 if (mod(kk,ifreq).eq.0) then
120 if (isize .ne. nres+nct-nnt+1) then
121 print *,"Error: inconsistent sizes",isize,nres+nct-nnt+1
123 write (9,'(i10,e15.8,2e15.5,f12.5)') kk,time,potE,uconst,t_bath
133 c(j,i+nres)=coord(j,ii+nres)
138 write (9,'(a3,1x,2f10.3)')
139 & restyp(itype(i)),alpha(i-1,i,i+1)*rad2deg,
140 & beta(i-1,i,i+1,i+2)*rad2deg
142 write (9,'(a3,1x,f10.3)')
143 & restyp(itype(nres-1)),alpha(nres-2,nres-1,nres)*rad2deg