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
16 logical oneletter, iblnk
21 if (iargc().lt.5) then
23 & "Usage: xdrf2pdb-m one/three seqfile cxfile ntraj itraj",
27 call getarg(1,onethree)
28 onethree = ucase(onethree)
29 if (onethree.eq.'ONE') then
31 else if (onethree.eq.'THREE') then
34 print *,"ONE or THREE must be specified"
36 call getarg(2,seqfile)
37 open (1,file=seqfile,status='old')
39 read(1,'(80a1)',end=10,err=10) (sequenc(i)(1:1),i=1,maxres)
43 c do while (.not.iblnk(sequenc(i+1)(1:1)))
44 do while (.not.(iblnk(sequenc(i+1)(1:1))==0) )
49 itype(i)=rescode(i,sequenc(i),1)
52 read(1,'(20(a3,1x))',end=11,err=11) (sequenc(i),i=1,maxres)
56 c do while (.not.iblnk(sequenc(i+1)(1:1)))
57 do while (.not.(iblnk(sequenc(i+1)(1:1))==0))
62 itype(i)=rescode(i,sequenc(i),0)
65 print '(20(a3,1x))',(sequenc(i),i=1,nres)
68 iext = index(arg,'.cx') - 1
70 print *,"Error - not a cx file"
77 if (iargc().gt.5) then
78 call getarg(6,pdbfile)
80 write(licz,'(bz,i3.3)') itraj
81 pdbfile=arg(:iext)//'_'//licz//'.pdb'
83 if (iargc().gt.6) then
87 c print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj
90 if (itype(1).eq.21) nnt = 2
92 if (itype(nres).eq.21) nct = nres-1
93 print *,"nnt",nnt," nct",nct
94 call xdrfopen(ixdrf,arg, "r", iret)
97 call xdrffloat(ixdrf, time, iret)
100 call xdrffloat(ixdrf, potE, iret)
101 call xdrffloat(ixdrf, uconst, iret)
103 call xdrffloat(ixdrf, uconst_back, iret)
105 call xdrffloat(ixdrf, t_bath, iret)
106 call xdrfint(ixdrf, nss, iret)
108 call xdrfint(ixdrf, ihpb(j), iret)
109 call xdrfint(ixdrf, jhpb(j), iret)
111 call xdrfint(ixdrf, nfrag, iret)
113 call xdrffloat(ixdrf, qfrag(i), iret)
118 call xdrf3dfcoord(ixdrf, coord, isize, prec, iret)
121 c write (*,'(e15.8,2e15.5,f12.5,$)') time,potE,uconst,t_bath
122 c write (*,'(i4,$)') nss,(ihpb(j),jhpb(j),j=1,nss)
123 c write (*,'(i4,20f7.4)') nfrag,(qfrag(i),i=1,nfrag)
124 c write (*,'(8f10.5)') ((coord(k,j),k=1,3),j=1,isize)
125 if (mod(kk/ntraj,ifreq).eq.0 .and. mod(kk,ntraj).eq.itraj) then
126 if (isize .ne. nres+nct-nnt+1) then
127 print *,"Error: inconsistent sizes",isize,nres+nct-nnt+1
138 c(j,i+nres)=coord(j,ii+nres)
142 write (tytul,'(a,i6)') "Structure",kk
143 call pdbout(etot,tytul,9)