modyfication for tube
[unres.git] / source / cluster / wham / src-M / probabl.F
index ec3fbff..67341dd 100644 (file)
@@ -42,8 +42,8 @@ c      enddo
       write (iout,*) me," indstart",indstart(me)," indend",indend(me)
       call daread_ccoords(indstart(me),indend(me))
 #endif
-      write (iout,*) "ncon",ncon
-      call flush(iout)
+C      write (iout,*) "ncon",ncon
+C      call flush(iout)
       temper=1.0d0/(beta_h(ib)*1.987D-3)
 c      write (iout,*) "ib",ib," beta_h",beta_h(ib)," temper",temper
 c      quot=1.0d0/(T0*beta_h(ib)*1.987D-3)
@@ -55,7 +55,7 @@ c        quotl=quotl*quot
 c        kfacl=kfacl*kfac
 c        fT(l)=kfacl/(kfacl-1.0d0+quotl)
 c      enddo
-#define DEBUG
+C#define DEBUG
             if (rescale_mode.eq.1) then
               quot=1.0d0/(T0*beta_h(ib)*1.987D-3)
               quotl=1.0d0
@@ -116,33 +116,33 @@ c      enddo
       do i=1,ncon
         ii=i
 #endif
-        write (iout,*) "i",i," ii",ii,"ib",ib,scount(me)
+C        write (iout,*) "i",i," ii",ii,"ib",ib,scount(me)
         call flush(iout)
         if (ib.eq.1) then
           do j=1,nres
             do k=1,3
               c(k,j)=allcart(k,j,i)
               c(k,j+nres)=allcart(k,j+nres,i)
-              write(iout,*) "coord",i,j,k,allcart(k,j,i),c(k,j),
-     &        c(k,j+nres),allcart(k,j+nres,i)
+C              write(iout,*) "coord",i,j,k,allcart(k,j,i),c(k,j),
+C     &        c(k,j+nres),allcart(k,j+nres,i)
             enddo
           enddo
-          write(iout,*) "out of j loop"
-          call flush(iout)
+C          write(iout,*) "out of j loop"
+C          call flush(iout)
           do k=1,3
             c(k,nres+1)=c(k,1)
             c(k,nres+nres)=c(k,nres)
           enddo
-          write(iout,*) "after nres+nres",nss_all(i)
-          call flush(iout)
+C          write(iout,*) "after nres+nres",nss_all(i)
+C          call flush(iout)
           nss=nss_all(i)
           do j=1,nss
             ihpb(j)=ihpb_all(j,i)
             jhpb(j)=jhpb_all(j,i)
           enddo 
           call int_from_cart1(.false.)
-          write(iout,*) "before etotal"
-          call flush(iout)
+C          write(iout,*) "before etotal"
+C          call flush(iout)
           call etotal(energia(0),fT)
           totfree(i)=energia(0)         
           totfree_buf(i)=totfree(i)
@@ -150,11 +150,13 @@ c          write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
 c          write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
 c          call enerprint(energia(0),fT)
 c          call pdbout(totfree(i),16,i)
+#define DEBUG
 #ifdef DEBUG
-          write (iout,*) i," energia",(energia(j),j=0,19)
+          write (iout,*) i," energia",(energia(j),j=0,max_ene)
           write (iout,*) "etot", etot
           write (iout,*) "ft(6)", ft(6)
 #endif
+#undef DEBUG
           do k=1,max_ene
             enetb(k,i)=energia(k)
           enddo
@@ -294,12 +296,13 @@ c        write (iout,*) "qfree",qfree
         write (iout,*) "ncon", ncon,maxstr_proc
         do i=1,min0(ncon,maxstr_proc)-1 
           sumprob=sumprob+exp(-fdimless(i)+fdimless(1))/qfree 
-#ifdef DEBUG
+C#ifdef DEBUG
+          write (iout,*) "tu szukaj ponizej 7"
           write (iout,*) i,ib,beta_h(ib),
      &     1.0d0/(1.987d-3*beta_h(ib)),list_conf(i),
      &     totfree(list_conf(i)),
      &     -entfac(list_conf(i)),fdimless(i),sumprob
-#endif
+C#endif
           if (sumprob.gt.prob_limit) goto 122
 c          if (sumprob.gt.1.00d0) goto 122
           nlist=nlist+1