Merge branch 'prerelease-3.2.1'
[unres.git] / source / cluster / wham / src-M / wrtclust.f
index f2f3eb7..3915ebc 100644 (file)
@@ -84,12 +84,16 @@ C 12/8/93 Estimation of "diameters" of the subsequent families.
       ave_dim=0.0
       amax_dim=0.0
 c      write (iout,*) "ecut",ecut
+      emin=totfree(nconf(igr,1))
+c      write (2,*) "emin",emin," ecut",ecut
       do i=2,licz(igr)
         ii=nconf(igr,i)
+c        write (2,*) " igr",igr," i",i," ii",ii," totfree",totfree(ii),
+c     &     " emin",emin," diff",totfree(ii)-emin," ecut",ecut
         if (totfree(ii)-emin .gt. ecut) goto 10
         do j=1,i-1
           jj=nconf(igr,j)
-          if (jj.eq.1) exit
+c          if (jj.eq.1) exit
           if (ii.lt.jj) then
             ind=ioffset(ncon,ii,jj)
           else
@@ -112,9 +116,12 @@ c     &      list_conf(jj),curr_dist
      & '; average distance in the family:',ave_dim 
       rmsave(igr)=0.0d0
       qpart=0.0d0
+      emin=totfree(nconf(igr,1))
       do i=1,licz(igr)
         icon=nconf(igr,i)
-        boltz=dexp(-totfree(icon))
+        boltz=dexp(-totfree(icon)+emin)
+c        write (2,*) "igr",igr," i",i," icon",icon," totfree",
+c     &     totfree(icon)," emin",emin," boltz",boltz," rms",rmstb(icon)
         rmsave(igr)=rmsave(igr)+boltz*rmstb(icon)
         qpart=qpart+boltz
       enddo
@@ -191,7 +198,7 @@ c Write conformations of the family i to PDB files
 c            write (iout,*) i,ncon_out,nconf(i,ncon_out),
 c     &        totfree(nconf(i,ncon_out)),emin1,ecut
           enddo
-          write (iout,*) "ncon_out",ncon_out
+c          write (iout,*) "ncon_out",ncon_out
           call flush(iout)
           do j=1,nres
             tempfac(1,j)=5.0d0