subroutine pdbout(etot,tytul,iunit) implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'COMMON.CHAIN' include 'COMMON.INTERACT' include 'COMMON.NAMES' include 'COMMON.IOUNITS' include 'COMMON.HEADER' include 'COMMON.SBRIDGE' c include 'COMMON.DISTFIT' c include 'COMMON.MD' character*50 tytul character*1 chainid(10) /'A','B','C','D','E','F','G','H','I','J'/ dimension ica(maxres) write (iunit,'(3a,1pe15.5)') 'REMARK ',tytul,' ENERGY ',etot 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 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 if (nss.gt.0) then do i=1,nss write(iunit,'(a6,i4,1x,a3,i7,4x,a3,i7)') & 'SSBOND',i,'CYS',ihpb(i)-1-nres, & 'CYS',jhpb(i)-1-nres enddo endif iatom=0 ichain=1 ires=0 do i=nnt,nct ires=i-nnt+1 iatom=iatom+1 ica(i)=iatom iti=itype(i) if (iti.eq.21) then ichain=ichain+1 ires=0 write (iunit,'(a)') 'TER' else ires=ires+1 iatom=iatom+1 ica(i)=iatom write (iunit,10) iatom,restyp(iti),chainid(ichain), & ires,(c(j,i),j=1,3)!,vtot(i) if (iti.ne.10) then iatom=iatom+1 write (iunit,20) iatom,restyp(iti),chainid(ichain), & ires,(c(j,nres+i),j=1,3)!, ! & vtot(i+nres) endif endif enddo write (iunit,'(a)') 'TER' do i=nnt,nct-1 if (itype(i).eq.21) cycle if (itype(i).eq.10 .and. itype(i+1).ne.21) then write (iunit,30) ica(i),ica(i+1) else if (itype(i).ne.10 .and. itype(i+1).ne.21) then write (iunit,30) ica(i),ica(i+1),ica(i)+1 else if (itype(i).ne.10 .and. itype(i+1).eq.21) then write (iunit,30) ica(i),ica(i)+1 endif enddo if (itype(nct).ne.10) then write (iunit,30) ica(nct),ica(nct)+1 endif do i=1,nss write (iunit,30) ica(ihpb(i)-nres)+1,ica(jhpb(i)-nres)+1 enddo write (iunit,'(a6)') 'ENDMDL' 10 FORMAT ('ATOM',I7,' CA ',A3,1X,A1,I4,4X,3F8.3,f15.3) 20 FORMAT ('ATOM',I7,' CB ',A3,1X,A1,I4,4X,3F8.3,f15.3) 30 FORMAT ('CONECT',8I5) return end c------------------------------------------------------------------------------ subroutine MOL2out(etot,tytul) C Prints the Cartesian coordinates of the alpha-carbons in the Tripos mol2 C format. implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'COMMON.CHAIN' include 'COMMON.INTERACT' include 'COMMON.NAMES' include 'COMMON.IOUNITS' include 'COMMON.HEADER' include 'COMMON.SBRIDGE' character*32 tytul,fd character*3 liczba character*6 res_num,pom,ucase #ifdef AIX call fdate_(fd) #elif (defined CRAY) call date(fd) #else call fdate(fd) #endif write (imol2,'(a)') '#' write (imol2,'(a)') & '# Creating user name: unres' write (imol2,'(2a)') '# Creation time: ', & fd write (imol2,'(/a)') '\@MOLECULE' write (imol2,'(a)') tytul write (imol2,'(5i5)') nct-nnt+1,nct-nnt+nss+1,nct-nnt+nss+1,0,0 write (imol2,'(a)') 'SMALL' write (imol2,'(a)') 'USER_CHARGES' write (imol2,'(a)') '\@ATOM' do i=nnt,nct write (liczba,'(i3)') i pom=ucase(restyp(itype(i))) res_num = pom(:3)//liczba(2:) write (imol2,10) i,(c(j,i),j=1,3),i,res_num,0.0 enddo write (imol2,'(a)') '\@BOND' do i=nnt,nct-1 write (imol2,'(i5,2i6,i2)') i-nnt+1,i-nnt+1,i-nnt+2,1 enddo do i=1,nss write (imol2,'(i5,2i6,i2)') nct-nnt+i,ihpb(i),jhpb(i),1 enddo write (imol2,'(a)') '\@SUBSTRUCTURE' do i=nnt,nct write (liczba,'(i3)') i pom = ucase(restyp(itype(i))) res_num = pom(:3)//liczba(2:) write (imol2,30) i-nnt+1,res_num,i-nnt+1,0 enddo 10 FORMAT (I7,' CA ',3F10.4,' C.3',I8,1X,A,F11.4,' ****') 30 FORMAT (I7,1x,A,I14,' RESIDUE',I13,' **** ****') return end c------------------------------------------------------------------------ subroutine briefout(it,ener) implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'COMMON.IOUNITS' include 'COMMON.CHAIN' include 'COMMON.VAR' include 'COMMON.LOCAL' include 'COMMON.INTERACT' include 'COMMON.NAMES' include 'COMMON.GEO' include 'COMMON.SBRIDGE' c print '(a,i5)',intname,igeom #if defined(AIX) || defined(PGI) open (igeom,file=intname,position='append') #else open (igeom,file=intname,access='append') #endif IF (NSS.LE.9) THEN WRITE (igeom,180) IT,ENER,NSS,(IHPB(I),JHPB(I),I=1,NSS) ELSE WRITE (igeom,180) IT,ENER,NSS,(IHPB(I),JHPB(I),I=1,9) WRITE (igeom,190) (IHPB(I),JHPB(I),I=10,NSS) ENDIF c IF (nvar.gt.nphi) WRITE (igeom,200) (RAD2DEG*THETA(I),I=3,NRES) WRITE (igeom,200) (RAD2DEG*THETA(I),I=3,NRES) WRITE (igeom,200) (RAD2DEG*PHI(I),I=4,NRES) c if (nvar.gt.nphi+ntheta) then write (igeom,200) (rad2deg*alph(i),i=2,nres-1) write (igeom,200) (rad2deg*omeg(i),i=2,nres-1) c endif close(igeom) 180 format (I5,F12.3,I2,9(1X,2I3)) 190 format (3X,11(1X,2I3)) 200 format (8F10.4) return end #ifdef WINIFL subroutine fdate(fd) character*32 fd write(fd,'(32x)') return end #endif c---------------------------------------------------------------- subroutine cartoutx(time,nfrag,qfrag) implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'COMMON.CHAIN' include 'COMMON.INTERACT' include 'COMMON.NAMES' include 'COMMON.IOUNITS' include 'COMMON.HEADER' include 'COMMON.SBRIDGE' include 'COMMON.DISTFIT' c include 'COMMON.MD' double precision time double precision qfrag(100) #if defined(AIX) || defined(PGI) open(icart,file=cartname,position="append") #else open(icart,file=cartname,access="append") #endif write (icart,'(e15.8,2e15.5,f12.5,$)') time,potE,uconst,t_bath write (icart,'(i4,$)') & nss,(ihpb(j),jhpb(j),j=1,nss) write (icart,'(i4,20f7.4)') nfrag, & (qfrag(i),i=1,nfrag) write (icart,'(8f10.5)') & ((c(k,j),k=1,3),j=1,nres), & ((c(k,j+nres),k=1,3),j=nnt,nct) close(icart) return end c----------------------------------------------------------------- subroutine cartout(time,nfrag,qfrag) implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'COMMON.CHAIN' include 'COMMON.INTERACT' include 'COMMON.NAMES' include 'COMMON.IOUNITS' include 'COMMON.HEADER' include 'COMMON.SBRIDGE' include 'COMMON.DISTFIT' c include 'COMMON.MD' double precision time integer iret,itmp double precision qfrag(100) real xcoord(3,maxres2+2),prec call xdrfopen(ixdrf,cartname, "w", iret) call xdrffloat(ixdrf, real(time), iret) call xdrffloat(ixdrf, real(potE), iret) call xdrffloat(ixdrf, real(uconst), iret) call xdrffloat(ixdrf, real(t_bath), iret) call xdrfint(ixdrf, nss, iret) do j=1,nss call xdrfint(ixdrf, ihpb(j), iret) call xdrfint(ixdrf, jhpb(j), iret) enddo call xdrfint(ixdrf, nfrag, iret) do i=1,nfrag call xdrffloat(ixdrf, real(qfrag(i)), iret) enddo prec=10000.0 do i=1,nres do j=1,3 xcoord(j,i)=c(j,i) enddo enddo do i=nnt,nct do j=1,3 xcoord(j,nres+i-nnt+1)=c(j,i+nres) enddo enddo itmp=nres+nct-nnt+1 call xdrf3dfcoord(ixdrf, xcoord, itmp, prec, iret) call xdrfclose(ixdrf, iret) return end