#endif
return
end
+c-----------------------------------------------
+ subroutine read_cx(ixdrf,*)
+c xdrfopen should be called before this subroutine
+ implicit real*8 (a-h,o-z)
+ include 'DIMENSIONS'
+#ifdef MPI
+ include 'mpif.h'
+ include 'COMMON.SETUP'
+#else
+ parameter (me=0)
+#endif
+ include 'COMMON.CHAIN'
+ include 'COMMON.INTERACT'
+ include 'COMMON.NAMES'
+ include 'COMMON.IOUNITS'
+ include 'COMMON.HEADER'
+ include 'COMMON.SBRIDGE'
+ include 'COMMON.DISTFIT'
+ include 'COMMON.MD'
+ include 'COMMON.LOCAL'
+ double precision time
+ integer iret,itmp
+ real xcoord(3,maxres2+2),prec
+ real r_time,r_potE,r_uconst,r_uconst_back,r_t_bath
+
+
+#ifdef AIX
+c call xdrfopen_(ixdrf,cartname, "r", iret)
+ call xdrffloat_(ixdrf, r_time, iret)
+ if(iret.eq.0) return1
+
+ call xdrffloat_(ixdrf, r_potE), iret)
+ call xdrffloat_(ixdrf, r_uconst), iret)
+ call xdrffloat_(ixdrf, r_uconst_back), iret)
+ call xdrffloat_(ixdrf, r_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+npair+3*nfrag_back, iret)
+ do i=1,nfrag
+ call xdrffloat_(ixdrf, real(qfrag(i)), iret)
+ enddo
+ do i=1,npair
+ call xdrffloat_(ixdrf, real(qpair(i)), iret)
+ enddo
+ do i=1,nfrag_back
+ call xdrffloat_(ixdrf, real(utheta(i)), iret)
+ call xdrffloat_(ixdrf, real(ugamma(i)), iret)
+ call xdrffloat_(ixdrf, real(uscdiff(i)), iret)
+ enddo
+#else
+c call xdrfopen(ixdrf,cartname, "r", iret)
+ call xdrffloat(ixdrf, r_time, iret)
+ if(iret.eq.0) return1
+
+ call xdrffloat(ixdrf, r_potE, iret)
+ call xdrffloat(ixdrf, r_uconst, iret)
+ call xdrffloat(ixdrf, r_uconst_back, iret)
+ call xdrffloat(ixdrf, r_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+npair+3*nfrag_back, iret)
+ do i=1,nfrag
+ call xdrffloat(ixdrf, real(qfrag(i)), iret)
+ enddo
+ do i=1,npair
+ call xdrffloat(ixdrf, real(qpair(i)), iret)
+ enddo
+ do i=1,nfrag_back
+ call xdrffloat(ixdrf, real(utheta(i)), iret)
+ call xdrffloat(ixdrf, real(ugamma(i)), iret)
+ call xdrffloat(ixdrf, real(uscdiff(i)), iret)
+ enddo
+#endif
+ prec=10000.0
+
+ itmp=nres+nct-nnt+1
+#ifdef AIX
+ call xdrf3dfcoord_(ixdrf, xcoord, itmp, prec, iret)
+c call xdrfclose_(ixdrf, iret)
+#else
+ call xdrf3dfcoord(ixdrf, xcoord, itmp, prec, iret)
+c call xdrfclose(ixdrf, iret)
+#endif
+
+ do i=1,nres
+ do j=1,3
+ c(j,i)=xcoord(j,i)
+ enddo
+ enddo
+ do i=nnt,nct
+ do j=1,3
+ c(j,i+nres)=xcoord(j,nres+i-nnt+1)
+ enddo
+ enddo
+
+ call int_from_cart1(.false.)
+
+ do i=1,nres-1
+ do j=1,3
+ dc(j,i)=c(j,i+1)-c(j,i)
+ dc_norm(j,i)=dc(j,i)*vbld_inv(i+1)
+ enddo
+ enddo
+ do i=2,nres-1
+ do j=1,3
+ dc(j,i+nres)=c(j,i+nres)-c(j,i)
+ dc_norm(j,i+nres)=dc(j,i+nres)*vbld_inv(i+nres)
+ enddo
+ enddo
+
+ return
+ end
#endif
c-----------------------------------------------------------------
subroutine statout(itime)
endif
close (intin)
- open(intin,file=intinname,status='old')
+ if (read_cart) then
+ iconf=0
+#ifdef AIX
+ call xdrfopen_(ixdrf,intinname, "r", iret)
+#else
+ call xdrfopen(ixdrf,intinname, "r", iret)
+#endif
+ else
+ open(intin,file=intinname,status='old')
+ endif
write (istat,'(a5,30a12)')"# ",
& (wname(print_order(i)),i=1,nprint_ene)
if (refstr) then
if (.not.minim) then
do while (.not. eof)
if (read_cart) then
- read (intin,'(e15.10,e15.5)',end=1100,err=1100) time,ene
- call read_x(intin,*11)
-#ifdef MPI
-c Broadcast the order to compute internal coordinates to the slaves.
- if (nfgtasks.gt.1)
- & call MPI_Bcast(6,1,MPI_INTEGER,king,FG_COMM,IERROR)
-#endif
- call int_from_cart1(.false.)
+ call read_cx(ixdrf,*1100)
+ iconf=iconf+1
else
read (intin,'(i5)',end=1100,err=1100) iconf
call read_angles(intin,*11)
call geom_to_var(nvar,varia)
call chainbuild
endif
- write (iout,'(a,i7)') 'Conformation #',iconf
+ write (iout,'(/a,i7)') 'Conformation #',iconf
call etotal(energy(0))
call briefout(iconf,energy(0))
call enerprint(energy(0))
mm=mm+1
if (mm.lt.nodes) then
if (read_cart) then
- read (intin,'(e15.10,e15.5)',end=11,err=11) time,ene
- call read_x(intin,*11)
-#ifdef MPI
-c Broadcast the order to compute internal coordinates to the slaves.
- if (nfgtasks.gt.1)
- & call MPI_Bcast(6,1,MPI_INTEGER,king,FG_COMM,IERROR)
-#endif
- call int_from_cart1(.false.)
+ call read_cx(ixdrf,*11)
+ iconf=iconf+1
+ call geom_to_var(nvar,varia)
else
read (intin,'(i5)',end=11,err=11) iconf
call read_angles(intin,*11)
imm=imm-1
if (read_cart) then
- read (intin,'(e15.10,e15.5)',end=11,err=11) time,ene
- call read_x(intin,*11)
-#ifdef MPI
-c Broadcast the order to compute internal coordinates to the slaves.
- if (nfgtasks.gt.1)
- & call MPI_Bcast(6,1,MPI_INTEGER,king,FG_COMM,IERROR)
-#endif
- call int_from_cart1(.false.)
+ call read_cx(ixdrf,*11)
+ iconf=iconf+1
+ call geom_to_var(nvar,varia)
else
read (intin,'(i5)',end=11,err=11) iconf
call read_angles(intin,*11)
if (read_cart) then
read (intin,'(e15.10,e15.5)',end=1100,err=1100) time,ene
call read_x(intin,*11)
-#ifdef MPI
-c Broadcast the order to compute internal coordinates to the slaves.
- if (nfgtasks.gt.1)
- & call MPI_Bcast(6,1,MPI_INTEGER,king,FG_COMM,IERROR)
-#endif
call int_from_cart1(.false.)
else
read (intin,'(i5)',end=1100,err=1100) iconf