X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fxdrfpdb%2Fsrc%2Fxdrf2pdb-m.F;h=199d23a6b41d26bfbd7222cc2070fb091e98d924;hb=90108059af40475602784720a7b8fa3dc6869696;hp=0016d40b037ee216637f20c60866a95198d3fb5a;hpb=478a9d9a1c99eb3f4bc4ca676ff3162bdd01d633;p=unres.git diff --git a/source/xdrfpdb/src/xdrf2pdb-m.F b/source/xdrfpdb/src/xdrf2pdb-m.F index 0016d40..199d23a 100644 --- a/source/xdrfpdb/src/xdrf2pdb-m.F +++ b/source/xdrfpdb/src/xdrf2pdb-m.F @@ -3,24 +3,25 @@ include 'COMMON.CHAIN' include 'COMMON.INTERACT' include 'COMMON.SBRIDGE' - real*4 coord(3,5000) + real*4 coord(3,2*maxres) real*4 prec,time,potE,uconst,t_bath,qfrag(100) real*8 etot character*80 arg,seqfile,pdbfile character*3 sequenc(maxres) character*50 tytul character*8 onethree,cfreq,cntraj,citraj + character*3 licz character*8 ucase external ucase - logical oneletter + logical oneletter,iblnk integer rescode external rescode ifreq=1 - if (iargc().lt.3) then + if (iargc().lt.5) then print '(2a)', - & "Usage: xdrf2pdb-m one/three seqfile cxfile [freq] [pdbfile] ", - & " [ntraj] [itraj]" + & "Usage: xdrf2pdb-m one/three seqfile cxfile ntraj itraj", + & " [pdbfile] [freq]" stop endif call getarg(1,onethree) @@ -40,6 +41,7 @@ nres=i i=0 do while (.not.iblnk(sequenc(i+1)(1:1))) +c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0)) i=i+1 enddo nres=i @@ -52,6 +54,7 @@ nres=i i=0 do while (.not.iblnk(sequenc(i+1)(1:1))) +c do while (.not.(iblnk(sequenc(i+1)(1:1)) == 0)) i=i+1 enddo nres=i @@ -59,7 +62,7 @@ itype(i)=rescode(i,sequenc(i),0) enddo print *,nres - print '(a3,1x)',(sequenc(i),i=1,nres) + print '(20(a3,1x))',(sequenc(i),i=1,nres) endif call getarg(3,arg) iext = index(arg,'.cx') - 1 @@ -67,28 +70,21 @@ print *,"Error - not a cx file" stop endif - if (iargc().gt.3) then - call getarg(4,cfreq) - read (cfreq,*) ifreq - endif - if (iargc().gt.4) then - call getarg(5,pdbfile) - else - pdbfile=arg(:iext)//'.pdb' - endif + call getarg(4,cntraj) + read (cntraj,*) ntraj + call getarg(5,citraj) + read (citraj,*) itraj if (iargc().gt.5) then - call getarg(6,cntraj) - read (cntraj,*) ntraj + call getarg(6,pdbfile) else - ntraj=1 + write(licz,'(bz,i3.3)') itraj + pdbfile=arg(:iext)//'_'//licz//'.pdb' endif if (iargc().gt.6) then - call getarg(7,citraj) - read (citraj,*) itraj - else - itraj=1 + call getarg(7,cfreq) + read (cfreq,*) ifreq endif - print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj +c print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj open(9,file=pdbfile) nnt = 1 if (itype(1).eq.21) nnt = 2 @@ -99,28 +95,38 @@ kk = 0 do while(.true.) call xdrffloat(ixdrf, time, iret) + print *,"time",time," iret",iret if(iret.eq.0) exit kk = kk + 1 call xdrffloat(ixdrf, potE, iret) call xdrffloat(ixdrf, uconst, iret) -#ifdef NEWUNRES - call xdrffloat(ixdrf, uconst_back, iret) -#endif call xdrffloat(ixdrf, t_bath, iret) + print *,"potE",potE," uconst",uconst," t_bath",t_bath +c +c uconst_back not written in MREMD.F code +c#ifdef NEWUNRES +c call xdrffloat(ixdrf, uconst_back, iret) +c print *,"uconst_back",uconst_back +c#endif call xdrfint(ixdrf, nss, iret) do j=1,nss call xdrfint(ixdrf, ihpb(j), iret) call xdrfint(ixdrf, jhpb(j), iret) enddo + print *,"nss",nss + print *," ",(ihpb(j),"-",jhpb(j),j=1,nss) call xdrfint(ixdrf, nfrag, iret) + call xdrfint(ixdrf, iset, iret) do i=1,nfrag call xdrffloat(ixdrf, qfrag(i), iret) enddo + print *,"nfrag",nfrag,"iset",iset prec=10000.0 isize=0 + print *," call xdrf3coord" call xdrf3dfcoord(ixdrf, coord, isize, prec, iret) - + print *,"isize",isize c write (*,'(e15.8,2e15.5,f12.5,$)') time,potE,uconst,t_bath c write (*,'(i4,$)') nss,(ihpb(j),jhpb(j),j=1,nss)