From: Adam Liwo Date: Sat, 18 Jul 2015 11:28:14 +0000 (+0200) Subject: Added putting secondary-structure information to the pdbfiles generated by xdrf2pdb... X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=918740c3903fb56553485ed83172a196d32c02cf;p=unres.git Added putting secondary-structure information to the pdbfiles generated by xdrf2pdb. Enabled by compling xdrf2pdb with -DSECONDARY --- diff --git a/bin/xdrfpdb/xdrf2pdb b/bin/xdrfpdb/xdrf2pdb index 2d2cb08..bf524ed 100755 Binary files a/bin/xdrfpdb/xdrf2pdb and b/bin/xdrfpdb/xdrf2pdb differ diff --git a/source/xdrfpdb/src/COMMON.DISTFIT b/source/xdrfpdb/src/COMMON.DISTFIT index bbc98ad..683228a 100644 --- a/source/xdrfpdb/src/COMMON.DISTFIT +++ b/source/xdrfpdb/src/COMMON.DISTFIT @@ -1,6 +1,14 @@ +c parameter (maxres22=maxres*(maxres+1)/2) + parameter (maxres22=1) + double precision w,d0,DRDG,DD,H,XX integer nbfrag,bfrag,nhfrag,hfrag,bvar_frag,hvar_frag,nhpb0, 1 lvar_frag,svar_frag,avar_frag COMMON /c_frag/ nbfrag,bfrag(4,maxres/3),nhfrag,hfrag(2,maxres/3) - COMMON /frag/ bvar_frag(mxio,6),hvar_frag(mxio,3), - 1 lvar_frag(mxio,3),svar_frag(mxio,3), - 2 avar_frag(mxio,5) +csa COMMON /frag/ bvar_frag(mxio,6),hvar_frag(mxio,3), +csa 1 lvar_frag(mxio,3),svar_frag(mxio,3), +csa 2 avar_frag(mxio,5) + COMMON /WAGI/ w(MAXRES22),d0(MAXRES22) + COMMON /POCHODNE/ NX,NY,DRDG(MAXRES22,MAXRES),DD(MAXRES22), + 1 H(MAXRES,MAXRES),XX(MAXRES) + COMMON /frozen/ mask(maxres) + COMMON /store0/ nhpb0 diff --git a/source/xdrfpdb/src/Makefile_ifort b/source/xdrfpdb/src/Makefile_ifort index a828e35..ed3051e 100644 --- a/source/xdrfpdb/src/Makefile_ifort +++ b/source/xdrfpdb/src/Makefile_ifort @@ -25,7 +25,7 @@ OPT = FFLAGS = -c ${OPT} -CPPFLAGS = -DNEWUNRES +CPPFLAGS = -DNEWUNRES -DSECONDARY M4 = m4 M4FILE = underscore.m4 @@ -38,8 +38,8 @@ M4FILE = underscore.m4 all:xdrf2pdb xdrf2pdb-m -xdrf2pdb: xdrf2pdb.o geomout.o misc.o rescode.o nazwy.o xdrf/libxdrf.a - ${FC} -Bstatic -o ${BINDIR}/xdrf2pdb xdrf2pdb.o geomout.o rescode.o misc.o nazwy.o xdrf/libxdrf.a +xdrf2pdb: xdrf2pdb.o elecont.o geomout.o misc.o rescode.o nazwy.o xdrf/libxdrf.a + ${FC} -Bstatic -o ${BINDIR}/xdrf2pdb xdrf2pdb.o elecont.o geomout.o rescode.o misc.o nazwy.o xdrf/libxdrf.a xdrf2pdb-m: xdrf2pdb-m.o geomout.o misc.o rescode.o nazwy.o xdrf/libxdrf.a ${FC} -Bstatic -o ${BINDIR}/xdrf2pdb-m xdrf2pdb-m.o geomout.o rescode.o misc.o nazwy.o xdrf/libxdrf.a diff --git a/source/xdrfpdb/src/geomout.F b/source/xdrfpdb/src/geomout.F index af7043b..07e344e 100644 --- a/source/xdrfpdb/src/geomout.F +++ b/source/xdrfpdb/src/geomout.F @@ -7,76 +7,77 @@ include 'COMMON.IOUNITS' include 'COMMON.HEADER' include 'COMMON.SBRIDGE' -c include 'COMMON.DISTFIT' + include 'COMMON.DISTFIT' c include 'COMMON.MD' character*50 tytul dimension ica(maxres) write (iunit,'(3a,1pe15.5)') 'REMARK ',tytul,' ENERGY ',etot +#ifdef SECONDARY cmodel write (iunit,'(a5,i6)') 'MODEL',1 -c if (nhfrag.gt.0) then -c do j=1,nhfrag -c iti=itype(hfrag(1,j)) -c itj=itype(hfrag(2,j)) -c if (j.lt.10) then -c write (iunit,'(a5,i5,1x,a1,i1,2x,a3,i7,2x,a3,i7,i3,t76,i5)') -c & 'HELIX',j,'H',j, -c & restyp(iti),hfrag(1,j)-1, -c & restyp(itj),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j) -c else -c write (iunit,'(a5,i5,1x,a1,i2,1x,a3,i7,2x,a3,i7,i3)') -c & 'HELIX',j,'H',j, -c & restyp(iti),hfrag(1,j)-1, -c & restyp(itj),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j) -c endif -c enddo -c endif + if (nhfrag.gt.0) then + do j=1,nhfrag + iti=itype(hfrag(1,j)) + itj=itype(hfrag(2,j)) + if (j.lt.10) then + write (iunit,'(a5,i5,1x,a1,i1,2x,a3,i7,2x,a3,i7,i3,t76,i5)') + & 'HELIX',j,'H',j, + & restyp(iti),hfrag(1,j)-1, + & restyp(itj),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j) + else + write (iunit,'(a5,i5,1x,a1,i2,1x,a3,i7,2x,a3,i7,i3)') + & 'HELIX',j,'H',j, + & restyp(iti),hfrag(1,j)-1, + & restyp(itj),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j) + endif + enddo + endif + + if (nbfrag.gt.0) then + + do j=1,nbfrag + + iti=itype(bfrag(1,j)) + itj=itype(bfrag(2,j)-1) + + write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3)') + & 'SHEET',1,'B',j,2, + & restyp(iti),bfrag(1,j)-1, + & restyp(itj),bfrag(2,j)-2,0 + + if (bfrag(3,j).gt.bfrag(4,j)) then + + itk=itype(bfrag(3,j)) + itl=itype(bfrag(4,j)+1) -c if (nbfrag.gt.0) then -c -c do j=1,nbfrag -c -c iti=itype(bfrag(1,j)) -c itj=itype(bfrag(2,j)-1) -c -c write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3)') -c & 'SHEET',1,'B',j,2, -c & restyp(iti),bfrag(1,j)-1, -c & restyp(itj),bfrag(2,j)-2,0 -c -c if (bfrag(3,j).gt.bfrag(4,j)) then -c -c itk=itype(bfrag(3,j)) -c itl=itype(bfrag(4,j)+1) -c -c write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3, -c & 2x,a1,2x,a3,i6,3x,a1,2x,a3,i6)') -c & 'SHEET',2,'B',j,2, -c & restyp(itl),bfrag(4,j), -c & restyp(itk),bfrag(3,j)-1,-1, -c & "N",restyp(itk),bfrag(3,j)-1, -c & "O",restyp(iti),bfrag(1,j)-1 -c -c else -c -c itk=itype(bfrag(3,j)) -c itl=itype(bfrag(4,j)-1) -c -c -c write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3, -c & 2x,a1,2x,a3,i6,3x,a1,2x,a3,i6)') -c & 'SHEET',2,'B',j,2, -c & restyp(itk),bfrag(3,j)-1, -c & restyp(itl),bfrag(4,j)-2,1, -c & "N",restyp(itk),bfrag(3,j)-1, -c & "O",restyp(iti),bfrag(1,j)-1 -c -c -c -c endif -c -c enddo -c endif + write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3, + & 2x,a1,2x,a3,i6,3x,a1,2x,a3,i6)') + & 'SHEET',2,'B',j,2, + & restyp(itl),bfrag(4,j), + & restyp(itk),bfrag(3,j)-1,-1, + & "N",restyp(itk),bfrag(3,j)-1, + & "O",restyp(iti),bfrag(1,j)-1 + else + + itk=itype(bfrag(3,j)) + itl=itype(bfrag(4,j)-1) + + + write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3, + & 2x,a1,2x,a3,i6,3x,a1,2x,a3,i6)') + & 'SHEET',2,'B',j,2, + & restyp(itk),bfrag(3,j)-1, + & restyp(itl),bfrag(4,j)-2,1, + & "N",restyp(itk),bfrag(3,j)-1, + & "O",restyp(iti),bfrag(1,j)-1 + + + + endif + + enddo + endif +#endif if (nss.gt.0) then do i=1,nss write(iunit,'(a6,i4,1x,a3,i7,4x,a3,i7)') diff --git a/source/xdrfpdb/src/xdrf2pdb.F b/source/xdrfpdb/src/xdrf2pdb.F index 592d552..1f7ce8e 100644 --- a/source/xdrfpdb/src/xdrf2pdb.F +++ b/source/xdrfpdb/src/xdrf2pdb.F @@ -3,6 +3,7 @@ include 'COMMON.CHAIN' include 'COMMON.INTERACT' include 'COMMON.SBRIDGE' + include 'COMMON.DISTFIT' real*4 coord(3,2*maxres) real*4 prec,time,potE,uconst,t_bath,qfrag(100) real*8 etot @@ -94,37 +95,44 @@ if (itype(nres).eq.21) nct = nres-1 print *,"nnt",nnt," nct",nct print *,"file",arg + do i=nnt,nct + if (itype(i).ne.20) then + itel(i)=1 + else + itel(i)=2 + endif + enddo call xdrfopen(ixdrf,arg, "r", iret) if (iret.eq.0) stop - print *,"iret",iret - print *,"is",is," ie",ie +c print *,"iret",iret +c print *,"is",is," ie",ie kk = 0 do while(is.eq.0 .or. kk.lt.ie) call xdrffloat(ixdrf, time, iret) - print *,"time",time," iret",iret +c print *,"time",time," iret",iret if(iret.eq.0) exit kk = kk + 1 call xdrffloat(ixdrf, potE, iret) call xdrffloat(ixdrf, uconst, iret) - print *,"potE",potE," uconst",uconst +c print *,"potE",potE," uconst",uconst #ifdef NEWUNRES call xdrffloat(ixdrf, uconst_back, iret) - print *,"uconst_back",uconst_back +c print *,"uconst_back",uconst_back #endif call xdrffloat(ixdrf, t_bath, iret) - print *,"t_bath",t_bath +c print *,"t_bath",t_bath 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) +c print *,"nss",nss +c print *," ",(ihpb(j),"-",jhpb(j),j=1,nss) call xdrfint(ixdrf, nfrag, iret) do i=1,nfrag call xdrffloat(ixdrf, qfrag(i), iret) enddo - print *,"nfrag",nfrag +c print *,"nfrag",nfrag prec=10000.0 isize=0 @@ -167,6 +175,9 @@ c Calculate the CM enddo etot=potE write (tytul,'(a,i6)') "Structure",kk +#ifdef SECONDARY + call secondary2(.false.) +#endif call pdbout(etot,tytul,9) endif enddo