1 implicit real*8 (a-h,o-z)
4 include 'COMMON.INTERACT'
5 include 'COMMON.SBRIDGE'
8 real*4 coord(3,2*maxres)
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
18 logical oneletter,iblnk
20 logical oneletter, iblnk
21 >>>>>>> aebadf9023e437f497f92dfcf2303c16f60917c1
25 pi = 4.0d0*datan(1.0d0)
32 if (iargc().lt.3) then
34 & "Usage: xdrf2ang one/three seqfile cxfile [freq]",
35 & " [start] [end] [angfile]"
38 call getarg(1,onethree)
39 onethree = ucase(onethree)
40 if (onethree.eq.'ONE') then
42 else if (onethree.eq.'THREE') then
45 print *,"ONE or THREE must be specified"
47 call getarg(2,seqfile)
48 open (1,file=seqfile,status='old')
50 read(1,'(80a1)',end=10,err=10) (sequenc(i)(1:1),i=1,maxres)
54 do while (.not.iblnk(sequenc(i+1)(1:1)))
55 c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0) )
60 itype(i)=rescode(i,sequenc(i),1)
63 read(1,'(20(a3,1x))',end=11,err=11) (sequenc(i),i=1,maxres)
67 do while (.not.iblnk(sequenc(i+1)(1:1)))
68 c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0) )
73 itype(i)=rescode(i,sequenc(i),0)
77 iext = index(arg,'.cx') - 1
79 print *,"Error - not a cx file"
82 if (iargc().gt.3) then
86 if (iargc().gt.4) then
90 if (iargc().gt.5) then
94 if (iargc().gt.6) then
95 call getarg(7,angfile)
97 angfile=arg(:iext)//'.ang'
101 if (itype(1).eq.21) nnt = 2
103 if (itype(nres).eq.21) nct = nres-1
104 print *,"nnt",nnt," nct",nct
106 call xdrfopen(ixdrf,arg, "r", iret)
109 print *,"is",is," ie",ie
111 do while(is.eq.0 .or. kk.lt.ie)
112 c call xdrfint(ixdrf, ic, iret)
114 call xdrffloat(ixdrf, time, iret)
115 print *,"time",time," iret",iret
118 call xdrffloat(ixdrf, potE, iret)
119 call xdrffloat(ixdrf, uconst, iret)
120 call xdrffloat(ixdrf, uconst_back, iret)
121 c print *,"potE",potE," uconst",uconst," uconst_back",uconst_back
122 call xdrffloat(ixdrf, t_bath, iret)
123 c print *,"t_bath",t_bath
124 call xdrfint(ixdrf, nss, iret)
127 call xdrfint(ixdrf, ihpb(j), iret)
128 call xdrfint(ixdrf, jhpb(j), iret)
130 call xdrfint(ixdrf, nfrag, iret)
131 c print *,"nfrag",nfrag
133 call xdrffloat(ixdrf, qfrag(i), iret)
138 call xdrf3dfcoord(ixdrf, coord, isize, prec, iret)
141 c write (*,'(i4,$)') nss,(ihpb(j),jhpb(j),j=1,nss)
142 c write (*,'(i4,20f7.4)') nfrag,(qfrag(i),i=1,nfrag)
143 c write (*,'(8f10.5)') ((coord(k,j),k=1,3),j=1,isize)
144 if (mod(kk,ifreq).eq.0) then
145 if (isize .ne. nres+nct-nnt+1) then
146 print *,"Error: inconsistent sizes",isize,nres+nct-nnt+1
148 write (9,'(i10,e15.8,2e15.5,f12.5)') kk,time,potE,uconst,t_bath
158 c(j,i+nres)=coord(j,ii+nres)
163 write (9,'(a3,1x,2f10.3)')
164 & restyp(itype(i)),alpha(i-1,i,i+1)*rad2deg,
165 & beta(i-1,i,i+1,i+2)*rad2deg
167 write (9,'(a3,1x,f10.3)')
168 & restyp(itype(nres-1)),alpha(nres-2,nres-1,nres)*rad2deg