1 subroutine cxread(icon,*)
4 include 'COMMON.CONTROL'
6 include 'COMMON.INTERACT'
8 include 'COMMON.IOUNITS'
9 include 'COMMON.HEADER'
10 include 'COMMON.SBRIDGE'
13 include 'COMMON.CLUSTER'
15 real*4 rtime,rpotE,ruconst,rt_bath,rprop(20)
18 real xoord(3,maxres2+2),prec
19 double precision cm(3)
25 c print *,"is",is," ie",ie," isampl",isampl
37 print *,"CXREAD: opening file ",
38 & cxfiles(ifile)(:ilen(cxfiles(ifile)))
39 write (iout,*) "CXREAD: opening file ",
40 & cxfiles(ifile)(:ilen(cxfiles(ifile)))
41 #if (defined(AIX) && !defined(JUBL))
42 call xdrfopen_(ixdrf,cxfiles(ifile), "r", iret)
44 call xdrfopen(ixdrf,cxfiles(ifile), "r", iret)
48 print *,"CXREAD: reading file ",
49 & cxfiles(ifile)(:ilen(cxfiles(ifile)))
50 write(iout,*) "CXREAD: reading file ",
51 & cxfiles(ifile)(:ilen(cxfiles(ifile)))
55 #if (defined(AIX) && !defined(JUBL))
56 call xdrffloat_(ixdrf, rtime, iret)
57 call xdrffloat_(ixdrf, rpotE, iret)
59 write (iout,*) "rtime",rtime," rpotE",rpotE," iret",iret
62 call xdrffloat_(ixdrf, ruconst, iret)
64 call xdrffloat(ixdrf, ruconst_back, iret)
65 c print *,"uconst_back",ruconst_back
67 call xdrffloat_(ixdrf, rt_bath, iret)
68 call xdrfint_(ixdrf, nss, iret)
70 write (iout,*) "ruconst",ruconst," rt_bath",rt_bath," nss",nss
73 call xdrfint_(ixdrf, ihpb(j), iret)
74 call xdrfint_(ixdrf, jhpb(j), iret)
76 call xdrfint_(ixdrf, nprop, iret)
78 call xdrffloat_(ixdrf, rprop(i), iret)
81 call xdrffloat(ixdrf, rtime, iret)
82 call xdrffloat(ixdrf, rpotE, iret)
84 write (iout,*) "rtime",rtime," rpotE",rpotE," iret",iret
87 call xdrffloat(ixdrf, ruconst, iret)
89 call xdrffloat(ixdrf, ruconst_back, iret)
90 c print *,"uconst_back",ruconst_back
92 call xdrffloat(ixdrf, rt_bath, iret)
93 call xdrfint(ixdrf, nss, iret)
95 write (iout,*) "ruconst",ruconst," rt_bath",rt_bath," nss",nss
98 call xdrfint(ixdrf, ihpb(j), iret)
99 call xdrfint(ixdrf, jhpb(j), iret)
101 call xdrfint(ixdrf, nprop, iret)
102 c write (iout,*) "nprop",nprop
103 if (it.gt.0 .and. nprop.ne.nprop_prev) then
104 write (iout,*) "Warning previous nprop",nprop_prev,
111 call xdrffloat(ixdrf, rprop(i), iret)
116 write (iout,*) rtime,rpotE,rt_bath,nss,
117 & (ihpb(j),jhpb(j),j=1,nss),(rprop(j),j=1,nprop)
118 write (iout,*) "nprop",nprop
124 #if (defined(AIX) && !defined(JUBL))
125 call xdrf3dfcoord_(ixdrf, xoord, itmp, prec, iret)
127 call xdrf3dfcoord(ixdrf, xoord, itmp, prec, iret)
130 write (iout,'(10f8.3)') ((xoord(j,i),j=1,3),i=1,itmp)
133 if (itmp .ne. nres + nct - nnt + 1) then
134 write (iout,*) "Error: inconsistent sizes",itmp,nres+nct-nnt+1
153 c(j,i+nres+nnt-1)=xoord(j,i+nres)
168 c(j,i+nres+nnt-1)=c(j,i+nres+nnt-1)-cm(j)
174 if (nstep.gt.ie .or. rtime.gt.te) return
176 if((nstep.ge.is.or.rtime.ge.ts) .and. mod(nstep,isampl).eq.0)then
180 write (iout,*) "conformation, record",nstep,icon
181 write (iout,*) "pote",rpotE," time",rtime
182 c write (iout,*) "nres",nres," nnt",nnt," nct",nct," nss",nss
183 c write (iout,*) "length",nres*4+(nct-nnt+1)*4+4+2*nss*4
191 ihpb_all(k,icon)=ihpb(k)
192 jhpb_all(k,icon)=jhpb(k)
197 allcart(l,k,icon)=c(l,k)
202 call int_from_cart(.true.,.false.)
203 write (iout,*) "Storing conformation, record",icon
204 write (iout,*) "Cartesian coordinates"
205 write (iout,'(8f10.5)') ((c(j,i),j=1,3),i=1,nres)
206 write (iout,'(8f10.5)') ((c(j,i+nres),j=1,3),i=nnt,nct)
207 write (iout,*) "Internal coordinates"
208 write (iout,'(8f10.4)') (dist(k-1,k),k=nnt+1,nct)
209 write (iout,'(8f10.4)') (dist(k,k+nres),k=nnt,nct)
210 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
211 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
212 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
213 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
214 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
215 c write (iout,'(8f10.5)') (rprop(j),j=1,nQ)
216 write (iout,'(16i5)') iscor
225 #if (defined(AIX) && !defined(JUBL))
226 call xdrfclose_(ixdrf, iret)
228 call xdrfclose(ixdrf, iret)
230 write (iout,*) nstep," conformations read so far file",
231 & cxfiles(ifile)(:ilen(cxfiles(ifile)))