From: Cezary Czaplewski Date: Thu, 4 Oct 2012 12:51:35 +0000 (+0200) Subject: MULTCONF for cx files X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?p=unres.git;a=commitdiff_plain;h=0e66b437e1a9f9b5633ec73189e6ed6d9a67f89e MULTCONF for cx files --- diff --git a/bin/unres/MD/unres_ifort_MPICH_GAB.exe b/bin/unres/MD/unres_ifort_MPICH_GAB.exe index 0ceb38c..7bd8416 100755 Binary files a/bin/unres/MD/unres_ifort_MPICH_GAB.exe and b/bin/unres/MD/unres_ifort_MPICH_GAB.exe differ diff --git a/source/unres/src_MD/cinfo.f b/source/unres/src_MD/cinfo.f index 9508491..ff77e62 100644 --- a/source/unres/src_MD/cinfo.f +++ b/source/unres/src_MD/cinfo.f @@ -1,10 +1,10 @@ C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C -C 3 1 9 +C 3 1 23 subroutine cinfo include 'COMMON.IOUNITS' write(iout,*)'++++ Compile info ++++' - write(iout,*)'Version 3.1 build 9' - write(iout,*)'compiled Mon Sep 24 13:56:56 2012' + write(iout,*)'Version 3.1 build 23' + write(iout,*)'compiled Thu Oct 4 14:48:56 2012' write(iout,*)'compiled by czarek@piasek3' write(iout,*)'OS name: Linux ' write(iout,*)'OS release: 2.6.32-42-generic ' diff --git a/source/unres/src_MD/geomout.F b/source/unres/src_MD/geomout.F index 69d7802..d26f57f 100644 --- a/source/unres/src_MD/geomout.F +++ b/source/unres/src_MD/geomout.F @@ -369,6 +369,124 @@ c----------------------------------------------------------------- #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) diff --git a/source/unres/src_MD/unres.F b/source/unres/src_MD/unres.F index b14c040..f5fd355 100644 --- a/source/unres/src_MD/unres.F +++ b/source/unres/src_MD/unres.F @@ -407,7 +407,16 @@ c--------------------------------------------------------------------------- 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 @@ -422,21 +431,15 @@ c--------------------------------------------------------------------------- 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)) @@ -467,14 +470,9 @@ c do n=1,nzsc 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) @@ -539,14 +537,9 @@ c if (minim) call briefout(it,etot) 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) @@ -639,11 +632,6 @@ c Broadcast the order to compute internal coordinates to the slaves. 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