1 implicit real*8 (a-h,o-z)
4 include 'COMMON.INTERACT'
5 include 'COMMON.SBRIDGE'
6 real*4 coord(3,2*maxres)
7 real*4 prec,time,potE,uconst,t_bath,qfrag(100)
9 character*80 arg,seqfile,pdbfile
10 character*3 sequenc(maxres)
12 character*8 onethree,cfreq
24 if (iargc().lt.3) then
26 & "Usage: xdrf2pdb one/three seqfile cxfile [freq]",
27 & " [start] [end] [pdbfile]"
30 call getarg(1,onethree)
31 onethree = ucase(onethree)
32 if (onethree.eq.'ONE') then
34 else if (onethree.eq.'THREE') then
37 print *,"ONE or THREE must be specified"
39 call getarg(2,seqfile)
40 open (1,file=seqfile,status='old')
42 read(1,'(80a1)',end=10,err=10) (sequenc(i)(1:1),i=1,maxres)
46 do while (.not.iblnk(sequenc(i+1)(1:1)))
51 itype(i)=rescode(i,sequenc(i),1)
54 read(1,'(20(a3,1x))',end=11,err=11) (sequenc(i),i=1,maxres)
58 do while (.not.iblnk(sequenc(i+1)(1:1)))
63 itype(i)=rescode(i,sequenc(i),0)
67 iext = index(arg,'.cx') - 1
69 print *,"Error - not a cx file"
72 if (iargc().gt.3) then
76 if (iargc().gt.4) then
80 if (iargc().gt.5) then
84 if (iargc().gt.6) then
85 call getarg(7,pdbfile)
87 pdbfile=arg(:iext)//'.pdb'
91 if (itype(1).eq.21) nnt = 2
93 if (itype(nres).eq.21) nct = nres-1
94 print *,"nnt",nnt," nct",nct
96 call xdrfopen(ixdrf,arg, "r", iret)
99 print *,"is",is," ie",ie
101 do while(is.eq.0 .or. kk.lt.ie)
102 call xdrffloat(ixdrf, time, iret)
103 print *,"time",time," iret",iret
106 call xdrffloat(ixdrf, potE, iret)
107 call xdrffloat(ixdrf, uconst, iret)
108 print *,"potE",potE," uconst",uconst
109 call xdrffloat(ixdrf, t_bath, iret)
110 print *,"t_bath",t_bath
112 call xdrffloat(ixdrf, uconst_back, iret)
114 print *,"uconst_back",uconst_back
115 C call xdrffloat(ixdrf, t_bath, iret)
116 C print *,"t_bath",t_bath
117 call xdrfint(ixdrf, nss, iret)
119 call xdrfint(ixdrf, ihpb(j), iret)
120 call xdrfint(ixdrf, jhpb(j), iret)
123 C call xdrffloat(ixdrf, t_bath, iret)
124 C print *,"t_bath",t_bath
125 call xdrfint(ixdrf, nfrag, iret)
127 call xdrffloat(ixdrf, qfrag(i), iret)
129 print *,"nfrag",nfrag
133 call xdrf3dfcoord(ixdrf, coord, isize, prec, iret)
136 c write (*,'(e15.8,2e15.5,f12.5,$)') time,potE,uconst,t_bath
137 c write (*,'(i4,$)') nss,(ihpb(j),jhpb(j),j=1,nss)
138 c write (*,'(i4,20f7.4)') nfrag,(qfrag(i),i=1,nfrag)
139 c write (*,'(8f10.5)') ((coord(k,j),k=1,3),j=1,isize)
140 if (kk.ge.is .and. mod(kk,ifreq).eq.0) then
141 if (isize .ne. nres+nct-nnt+1) then
142 print *,"Error: inconsistent sizes",isize,nres+nct-nnt+1
153 c(j,i+nres)=coord(j,ii+nres)
157 write (tytul,'(a,i6,a,f8.3)') "Structure",kk,"Temp",t_bath
158 call pdbout(etot,tytul,9)