1 implicit real*8 (a-h,o-z)
4 include 'COMMON.INTERACT'
5 include 'COMMON.SBRIDGE'
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,cntraj,citraj
15 logical oneletter, iblnk
20 if (iargc().lt.3) then
22 & "Usage: xdrf2pdb-m one/three seqfile cxfile [freq] [pdbfile] ",
26 call getarg(1,onethree)
27 onethree = ucase(onethree)
28 if (onethree.eq.'ONE') then
30 else if (onethree.eq.'THREE') then
33 print *,"ONE or THREE must be specified"
35 call getarg(2,seqfile)
36 open (1,file=seqfile,status='old')
38 read(1,'(80a1)',end=10,err=10) (sequenc(i)(1:1),i=1,maxres)
42 do while (.not.iblnk(sequenc(i+1)(1:1)))
43 c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0))
48 itype(i)=rescode(i,sequenc(i),1)
51 read(1,'(20(a3,1x))',end=11,err=11) (sequenc(i),i=1,maxres)
55 do while (.not.iblnk(sequenc(i+1)(1:1)))
56 c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0))
61 itype(i)=rescode(i,sequenc(i),0)
64 print '(a3,1x)',(sequenc(i),i=1,nres)
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
77 call getarg(5,pdbfile)
79 pdbfile=arg(:iext)//'.pdb'
81 if (iargc().gt.5) then
87 if (iargc().gt.6) then
93 print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj
96 if (itype(1).eq.21) nnt = 2
98 if (itype(nres).eq.21) nct = nres-1
99 print *,"nnt",nnt," nct",nct
100 call xdrfopen(ixdrf,arg, "r", iret)
103 call xdrffloat(ixdrf, time, iret)
106 call xdrffloat(ixdrf, potE, iret)
107 call xdrffloat(ixdrf, uconst, iret)
108 call xdrffloat(ixdrf, t_bath, iret)
109 print *,"potE",potE," uconst",uconst," t_bath",t_bath
111 call xdrffloat(ixdrf, uconst_back, iret)
113 print *,"uconst_back",uconst_back
114 call xdrfint(ixdrf, nss, iret)
116 call xdrfint(ixdrf, ihpb(j), iret)
117 call xdrfint(ixdrf, jhpb(j), iret)
119 call xdrfint(ixdrf, nfrag, iret)
121 call xdrffloat(ixdrf, qfrag(i), iret)
126 print *," call xdrf3coord"
127 call xdrf3dfcoord(ixdrf, coord, isize, prec, iret)
130 c write (*,'(e15.8,2e15.5,f12.5,$)') time,potE,uconst,t_bath
131 c write (*,'(i4,$)') nss,(ihpb(j),jhpb(j),j=1,nss)
132 c write (*,'(i4,20f7.4)') nfrag,(qfrag(i),i=1,nfrag)
133 c write (*,'(8f10.5)') ((coord(k,j),k=1,3),j=1,isize)
134 if (mod(kk/ntraj,ifreq).eq.0 .and. mod(kk,ntraj).eq.itraj) then
135 if (isize .ne. nres+nct-nnt+1) then
136 print *,"Error: inconsistent sizes",isize,nres+nct-nnt+1
147 c(j,i+nres)=coord(j,ii+nres)
151 write (tytul,'(a,i6)') "Structure",kk
152 call pdbout(etot,tytul,9)