1 subroutine pdbout(etot,tytul,iunit)
2 implicit real*8 (a-h,o-z)
5 include 'COMMON.INTERACT'
7 include 'COMMON.IOUNITS'
8 include 'COMMON.HEADER'
9 include 'COMMON.SBRIDGE'
10 include 'COMMON.DISTFIT'
14 write (iunit,'(3a,1pe15.5)') 'REMARK ',tytul,' ENERGY ',etot
16 cmodel write (iunit,'(a5,i6)') 'MODEL',1
22 write (iunit,'(a5,i5,1x,a1,i1,2x,a3,i7,2x,a3,i7,i3,t76,i5)')
24 & restyp(iti),hfrag(1,j)-1,
25 & restyp(itj),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j)
27 write (iunit,'(a5,i5,1x,a1,i2,1x,a3,i7,2x,a3,i7,i3)')
29 & restyp(iti),hfrag(1,j)-1,
30 & restyp(itj),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j)
40 itj=itype(bfrag(2,j)-1)
42 write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3)')
44 & restyp(iti),bfrag(1,j)-1,
45 & restyp(itj),bfrag(2,j)-2,0
47 if (bfrag(3,j).gt.bfrag(4,j)) then
50 itl=itype(bfrag(4,j)+1)
52 write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3,
53 & 2x,a1,2x,a3,i6,3x,a1,2x,a3,i6)')
55 & restyp(itl),bfrag(4,j),
56 & restyp(itk),bfrag(3,j)-1,-1,
57 & "N",restyp(itk),bfrag(3,j)-1,
58 & "O",restyp(iti),bfrag(1,j)-1
63 itl=itype(bfrag(4,j)-1)
66 write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3,
67 & 2x,a1,2x,a3,i6,3x,a1,2x,a3,i6)')
69 & restyp(itk),bfrag(3,j)-1,
70 & restyp(itl),bfrag(4,j)-2,1,
71 & "N",restyp(itk),bfrag(3,j)-1,
72 & "O",restyp(iti),bfrag(1,j)-1
83 write(iunit,'(a6,i4,1x,a3,i7,4x,a3,i7)')
84 & 'SSBOND',i,'CYS',ihpb(i)-1-nres,
85 & 'CYS',jhpb(i)-1-nres
95 write (iunit,10) iatom,restyp(iti),ires,(c(j,i),j=1,3)!,vtot(i)
98 write (iunit,20) iatom,restyp(iti),ires,(c(j,nres+i),j=1,3)!,
102 write (iunit,'(a)') 'TER'
104 if (itype(i).eq.10) then
105 write (iunit,30) ica(i),ica(i+1)
107 write (iunit,30) ica(i),ica(i+1),ica(i)+1
110 if (itype(nct).ne.10) then
111 write (iunit,30) ica(nct),ica(nct)+1
114 write (iunit,30) ica(ihpb(i)-nres)+1,ica(jhpb(i)-nres)+1
116 write (iunit,'(a6)') 'ENDMDL'
117 10 FORMAT ('ATOM',I7,' CA ',A3,I6,4X,3F8.3,f15.3)
118 20 FORMAT ('ATOM',I7,' CB ',A3,I6,4X,3F8.3,f15.3)
119 30 FORMAT ('CONECT',8I5)
122 c------------------------------------------------------------------------------
123 subroutine MOL2out(etot,tytul)
124 C Prints the Cartesian coordinates of the alpha-carbons in the Tripos mol2
126 implicit real*8 (a-h,o-z)
128 include 'COMMON.CHAIN'
129 include 'COMMON.INTERACT'
130 include 'COMMON.NAMES'
131 include 'COMMON.IOUNITS'
132 include 'COMMON.HEADER'
133 include 'COMMON.SBRIDGE'
134 character*32 tytul,fd
136 character*6 res_num,pom,ucase
144 write (imol2,'(a)') '#'
146 & '# Creating user name: unres'
147 write (imol2,'(2a)') '# Creation time: ',
149 write (imol2,'(/a)') '\@<TRIPOS>MOLECULE'
150 write (imol2,'(a)') tytul
151 write (imol2,'(5i5)') nct-nnt+1,nct-nnt+nss+1,nct-nnt+nss+1,0,0
152 write (imol2,'(a)') 'SMALL'
153 write (imol2,'(a)') 'USER_CHARGES'
154 write (imol2,'(a)') '\@<TRIPOS>ATOM'
156 write (liczba,'(i3)') i
157 pom=ucase(restyp(itype(i)))
158 res_num = pom(:3)//liczba(2:)
159 write (imol2,10) i,(c(j,i),j=1,3),i,res_num,0.0
161 write (imol2,'(a)') '\@<TRIPOS>BOND'
163 write (imol2,'(i5,2i6,i2)') i-nnt+1,i-nnt+1,i-nnt+2,1
166 write (imol2,'(i5,2i6,i2)') nct-nnt+i,ihpb(i),jhpb(i),1
168 write (imol2,'(a)') '\@<TRIPOS>SUBSTRUCTURE'
170 write (liczba,'(i3)') i
171 pom = ucase(restyp(itype(i)))
172 res_num = pom(:3)//liczba(2:)
173 write (imol2,30) i-nnt+1,res_num,i-nnt+1,0
175 10 FORMAT (I7,' CA ',3F10.4,' C.3',I8,1X,A,F11.4,' ****')
176 30 FORMAT (I7,1x,A,I14,' RESIDUE',I13,' **** ****')
179 c------------------------------------------------------------------------
180 subroutine briefout(it,ener)
181 implicit real*8 (a-h,o-z)
183 include 'COMMON.IOUNITS'
184 include 'COMMON.CHAIN'
186 include 'COMMON.LOCAL'
187 include 'COMMON.INTERACT'
188 include 'COMMON.NAMES'
190 include 'COMMON.SBRIDGE'
191 c print '(a,i5)',intname,igeom
192 #if defined(AIX) || defined(PGI)
193 open (igeom,file=intname,position='append')
195 open (igeom,file=intname,access='append')
198 WRITE (igeom,180) IT,ENER,NSS,(IHPB(I),JHPB(I),I=1,NSS)
200 WRITE (igeom,180) IT,ENER,NSS,(IHPB(I),JHPB(I),I=1,9)
201 WRITE (igeom,190) (IHPB(I),JHPB(I),I=10,NSS)
203 c IF (nvar.gt.nphi) WRITE (igeom,200) (RAD2DEG*THETA(I),I=3,NRES)
204 WRITE (igeom,200) (RAD2DEG*THETA(I),I=3,NRES)
205 WRITE (igeom,200) (RAD2DEG*PHI(I),I=4,NRES)
206 c if (nvar.gt.nphi+ntheta) then
207 write (igeom,200) (rad2deg*alph(i),i=2,nres-1)
208 write (igeom,200) (rad2deg*omeg(i),i=2,nres-1)
211 180 format (I5,F12.3,I2,9(1X,2I3))
212 190 format (3X,11(1X,2I3))
223 c----------------------------------------------------------------
224 subroutine cartoutx(time,nfrag,qfrag)
225 implicit real*8 (a-h,o-z)
227 include 'COMMON.CHAIN'
228 include 'COMMON.INTERACT'
229 include 'COMMON.NAMES'
230 include 'COMMON.IOUNITS'
231 include 'COMMON.HEADER'
232 include 'COMMON.SBRIDGE'
233 include 'COMMON.DISTFIT'
234 c include 'COMMON.MD'
235 double precision time
236 double precision qfrag(100)
237 #if defined(AIX) || defined(PGI)
238 open(icart,file=cartname,position="append")
240 open(icart,file=cartname,access="append")
242 write (icart,'(e15.8,2e15.5,f12.5,$)') time,potE,uconst,t_bath
243 write (icart,'(i4,$)')
244 & nss,(ihpb(j),jhpb(j),j=1,nss)
245 write (icart,'(i4,20f7.4)') nfrag,
246 & (qfrag(i),i=1,nfrag)
247 write (icart,'(8f10.5)')
248 & ((c(k,j),k=1,3),j=1,nres),
249 & ((c(k,j+nres),k=1,3),j=nnt,nct)
253 c-----------------------------------------------------------------
254 subroutine cartout(time,nfrag,qfrag)
255 implicit real*8 (a-h,o-z)
257 include 'COMMON.CHAIN'
258 include 'COMMON.INTERACT'
259 include 'COMMON.NAMES'
260 include 'COMMON.IOUNITS'
261 include 'COMMON.HEADER'
262 include 'COMMON.SBRIDGE'
263 include 'COMMON.DISTFIT'
264 c include 'COMMON.MD'
265 double precision time
267 double precision qfrag(100)
268 real xcoord(3,maxres2+2),prec
270 call xdrfopen(ixdrf,cartname, "w", iret)
271 call xdrffloat(ixdrf, real(time), iret)
272 call xdrffloat(ixdrf, real(potE), iret)
273 call xdrffloat(ixdrf, real(uconst), iret)
274 call xdrffloat(ixdrf, real(t_bath), iret)
275 call xdrfint(ixdrf, nss, iret)
277 call xdrfint(ixdrf, ihpb(j), iret)
278 call xdrfint(ixdrf, jhpb(j), iret)
280 call xdrfint(ixdrf, nfrag, iret)
282 call xdrffloat(ixdrf, real(qfrag(i)), iret)
292 xcoord(j,nres+i-nnt+1)=c(j,i+nres)
297 call xdrf3dfcoord(ixdrf, xcoord, itmp, prec, iret)
298 call xdrfclose(ixdrf, iret)