In UNRES: added read/write d_c(0,:) and d_t(0,:) in reading/writing MD restart
authorAdam Liwo <adam@piasek4.chem.univ.gda.pl>
Mon, 17 Apr 2017 10:57:21 +0000 (12:57 +0200)
committerAdam Liwo <adam@piasek4.chem.univ.gda.pl>
Mon, 17 Apr 2017 10:57:21 +0000 (12:57 +0200)
In WHAM removed histend and associated variables as per Adasko's bugfix in the AFM branch

source/unres/MD.f90
source/unres/cinfo.f90
source/unres/io_config.f90
source/wham/cinfo.f90
source/wham/wham_calc.f90

index fa7131d..15fdf68 100644 (file)
       integer :: i,j,k,iti
       real(kind=8) :: KEt_p,KEt_sc,KEr_p,KEr_sc,incr(3),&
        mag1,mag2,v(3) 
-       
+#ifdef DEBUG
+        write (iout,*) "Velocities, kietic"
+        do i=0,nres
+          write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_t(j,i),j=1,3),&
+            (d_t(j,i+nres),j=1,3)
+        enddo
+#endif       
       KEt_p=0.0d0
       KEt_sc=0.0d0
 !      write (iout,*) "ISC",(isc(itype(i)),i=1,nres)
         if (rstcount.eq.1000.or.itime.eq.n_timestep) then
            open(irest2,file=rest2name,status='unknown')
            write(irest2,*) totT,EK,potE,totE,t_bath
-           do i=1,2*nres
+! AL 4/17/17: Now writing d_t(0,:) too
+           do i=0,2*nres
             write (irest2,'(3e15.5)') (d_t(j,i),j=1,3)
            enddo
-           do i=1,2*nres
+! AL 4/17/17: Now writing d_c(0,:) too
+           do i=0,2*nres
             write (irest2,'(3e15.5)') (dc(j,i),j=1,3)
            enddo
           close(irest2)
index 22da975..0e022a0 100644 (file)
@@ -1,12 +1,12 @@
 ! DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-! 0 40376 71
+! 0 40376 77
       subroutine cinfo
 !      include 'COMMON.IOUNITS'
       use io_units
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 0.40376 build 71'
-      write(iout,*)'compiled Thu Apr 13 11:26:27 2017'
-      write(iout,*)'compiled by czarek@piasek4'
+      write(iout,*)'Version 0.40376 build 77'
+      write(iout,*)'compiled Mon Apr 17 12:44:50 2017'
+      write(iout,*)'compiled by adam@piasek4'
       write(iout,*)'OS name:    Linux '
       write(iout,*)'OS release: 3.2.0-124-generic '
       write(iout,*)'OS version:',&
index aedb3dd..19daec7 100644 (file)
 
       open(irest2,file=rest2name,status='unknown')
       read(irest2,*) totT,EK,potE,totE,t_bath
-      do i=1,2*nres
+!      do i=1,2*nres
+! AL 4/17/17: Now reading d_t(0,:) too
+      do i=0,2*nres
          read(irest2,'(3e15.5)') (d_t(j,i),j=1,3)
       enddo
-      do i=1,2*nres
+!      do i=1,2*nres
+! AL 4/17/17: Now reading d_c(0,:) too
+      do i=0,2*nres
          read(irest2,'(3e15.5)') (dc(j,i),j=1,3)
       enddo
       if(usampl) then
index b5814f0..46410f1 100644 (file)
@@ -1,16 +1,16 @@
 ! DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-! 0 0 1262
+! 0 0 1263
       subroutine cinfo
 !      include 'COMMON.IOUNITS'
       use IO_UNITS
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 0.0 build 1262'
-      write(iout,*)'compiled Fri Mar 10 14:57:31 2017'
-      write(iout,*)'compiled by emilial@piasek4'
+      write(iout,*)'Version 0.0 build 1263'
+      write(iout,*)'compiled Mon Apr 17 12:54:21 2017'
+      write(iout,*)'compiled by adam@piasek4'
       write(iout,*)'OS name:    Linux '
-      write(iout,*)'OS release: 3.2.0-111-generic '
+      write(iout,*)'OS release: 3.2.0-124-generic '
       write(iout,*)'OS version:',&
-       ' #153-Ubuntu SMP Wed Sep 21 21:23:31 UTC 2016 '
+       ' #167-Ubuntu SMP Fri Mar 3 15:25:36 UTC 2017 '
       write(iout,*)'flags:'
       write(iout,*)'INSTALL_DIR = /users/software/mpich2-1.4.1p1_in...'
       write(iout,*)'OPT = -mcmodel=medium -O3 -ip -w'
index 08e166c..b2d16eb 100644 (file)
       integer,parameter :: MaxPoint=MaxStr,&
               MaxPointProc=MaxStr_Proc
       real(kind=8),parameter :: finorm_max=1.0d0
-      real(kind=8) :: potfac,entmin,entmax,expfac,vf
+      real(kind=8) :: potfac,expfac,vf
+!      real(kind=8) :: potfac,entmin,entmax,expfac,vf
       integer :: islice
       integer :: i,ii,j,jj,k,kk,l,m,ind,iter,t,tmax,ient,ientmax,iln
       integer :: start,end,iharm,ib,iib,nbin1,nbin,nbin_rms,nbin_rgy,&
               nbin_rmsrgy,liczbaW,iparm,nFi,indrgy,indrms
-      integer :: htot(0:MaxHdim),histent(0:2000)
+! 4/17/17 AKS & AL: histent is obsolete
+      integer :: htot(0:MaxHdim)!,histent(0:2000)
       real(kind=8) :: v(MaxPointProc,MaxR,MaxT_h,nParmSet)  !(MaxPointProc,MaxR,MaxT_h,Max_Parm)
       real(kind=8) :: energia(0:n_ene)
 !el      real(kind=8) :: energia(0:max_ene)
@@ -78,8 +80,8 @@
               hfin_ent_p(0:MaxHdim),histE_p(0:maxindE),sumH,&
               hrmsrgy_p(0:MaxBinRgy,0:MaxBinRms,maxT_h)
       real(kind=8) :: rgymin_t,rmsmin_t,rgymax_t,rmsmax_t
-      real(kind=8) :: potEmin_t,entmin_p,entmax_p
-      integer :: histent_p(0:2000)
+      real(kind=8) :: potEmin_t!,entmin_p,entmax_p
+!      integer :: histent_p(0:2000)
       logical :: lprint=.true.
 #endif
       real(kind=8) :: delta_T=1.0d0,iientmax
       upindE=0
 #endif
 ! 8/26/05 entropy distribution
-#ifdef MPI
-      entmin_p=1.0d10
-      entmax_p=-1.0d10
-      do t=1,scount(me1)
-!        ent=-dlog(entfac(t))
-        ent=entfac(t)
-        if (ent.lt.entmin_p) entmin_p=ent
-        if (ent.gt.entmax_p) entmax_p=ent
-      enddo
-      write (iout,*) "entmin",entmin_p," entmax",entmax_p
+!#ifdef MPI
+!      entmin_p=1.0d10
+!      entmax_p=-1.0d10
+!      do t=1,scount(me1)
+!!        ent=-dlog(entfac(t))
+!        ent=entfac(t)
+!        if (ent.lt.entmin_p) entmin_p=ent
+!        if (ent.gt.entmax_p) entmax_p=ent
+!      enddo
+!      write (iout,*) "entmin",entmin_p," entmax",entmax_p
+!!      write (iout,*) "entmin_p",entmin_p," entmax_p",entmax_p
+!      call flush(iout)
+!      call MPI_Allreduce(entmin_p,entmin,1,MPI_DOUBLE_PRECISION,MPI_MIN,&
+!        WHAM_COMM,IERROR)
+!      call MPI_Allreduce(entmax_p,entmax,1,MPI_DOUBLE_PRECISION,MPI_MAX,&
+!        WHAM_COMM,IERROR)
+!      write (iout,*) "entmin",entmin," entmax",entmax
 !      write (iout,*) "entmin_p",entmin_p," entmax_p",entmax_p
-      call flush(iout)
-      call MPI_Allreduce(entmin_p,entmin,1,MPI_DOUBLE_PRECISION,MPI_MIN,&
-        WHAM_COMM,IERROR)
-      call MPI_Allreduce(entmax_p,entmax,1,MPI_DOUBLE_PRECISION,MPI_MAX,&
-        WHAM_COMM,IERROR)
-      write (iout,*) "entmin",entmin_p," entmax",entmax_p
-!      write (iout,*) "entmin_p",entmin_p," entmax_p",entmax_p
-      ientmax=entmax-entmin 
+!      ientmax=entmax-entmin 
 !iientmax=entmax-entmin !el
 !write (iout,*) "ientmax",ientmax,entmax,entmin 
 !write (iout,*) "iientmax",iientmax
-      if (ientmax.gt.2000) ientmax=2000
-      write (iout,*) "entmin",entmin," entmax",entmax," ientmax",ientmax
-      call flush(iout)
-      do t=1,scount(me1)
-!        ient=-dlog(entfac(t))-entmin
-        ient=entfac(t)-entmin
-        if (ient.le.2000) histent_p(ient)=histent_p(ient)+1
-      enddo
-      call MPI_Allreduce(histent_p(0),histent(0),ientmax+1,MPI_INTEGER,&
-        MPI_SUM,WHAM_COMM,IERROR)
-      if (me1.eq.Master) then
-        write (iout,*) "Entropy histogram"
-        do i=0,ientmax
-          write(iout,'(f15.4,i10)') entmin+i,histent(i)
-        enddo
-      endif
-#else
-      entmin=1.0d10
-      entmax=-1.0d10
-      do t=1,ntot(islice)
-        ent=entfac(t)
-        if (ent.lt.entmin) entmin=ent
-        if (ent.gt.entmax) entmax=ent
-      enddo
-      ientmax=-dlog(entmax)-entmin
-      if (ientmax.gt.2000) ientmax=2000
-      do t=1,ntot(islice)
-        ient=entfac(t)-entmin
-        if (ient.le.2000) histent(ient)=histent(ient)+1
-      enddo
-      write (iout,*) "Entropy histogram"
-      do i=0,ientmax
-        write(iout,'(2f15.4)') entmin+i,histent(i)
-      enddo
-#endif
+!      if (ientmax.gt.2000) ientmax=2000
+!      write (iout,*) "entmin",entmin," entmax",entmax," ientmax",ientmax
+!      call flush(iout)
+!      do t=1,scount(me1)
+!!        ient=-dlog(entfac(t))-entmin
+!        ient=entfac(t)-entmin
+!        if (ient.le.2000) histent_p(ient)=histent_p(ient)+1
+!      enddo
+!      call MPI_Allreduce(histent_p(0),histent(0),ientmax+1,MPI_INTEGER,&
+!        MPI_SUM,WHAM_COMM,IERROR)
+!      if (me1.eq.Master) then
+!        write (iout,*) "Entropy histogram"
+!        do i=0,ientmax
+!          write(iout,'(f15.4,i10)') entmin+i,histent(i)
+!        enddo
+!      endif
+!#else
+!      entmin=1.0d10
+!      entmax=-1.0d10
+!      do t=1,ntot(islice)
+!        ent=entfac(t)
+!        if (ent.lt.entmin) entmin=ent
+!        if (ent.gt.entmax) entmax=ent
+!      enddo
+!      ientmax=-dlog(entmax)-entmin
+!      if (ientmax.gt.2000) ientmax=2000
+!      do t=1,ntot(islice)
+!        ient=entfac(t)-entmin
+!        if (ient.le.2000) histent(ient)=histent(ient)+1
+!      enddo
+!      write (iout,*) "Entropy histogram"
+!      do i=0,ientmax
+!        write(iout,'(2f15.4)') entmin+i,histent(i)
+!      enddo
+!#endif
       
 #ifdef MPI
       write (iout,*) "me1",me1," scount",scount(me1) !d