klapaucjusz update
[unres.git] / source / fragments / klapaucjusz-longest.f
index 8aa3f81..27fe808 100644 (file)
@@ -1,8 +1,8 @@
-      parameter (maxmodel=20) 
+      parameter (maxmodel=50) 
       parameter (maxres=1000)
       parameter (maxclust=1000)
       character*32 model(maxmodel)
-      integer imodel(maxmodel)
+      integer imodel(maxmodel),iindex(maxmodel)
       integer ifragpair(maxres,maxmodel,maxmodel),
      &    ifragpair_new(maxres,maxmodel,maxmodel),
      & iflag(maxres),isumfmax(maxmodel),kmax(maxmodel),
       do i=1,nmodel
         do j=1,nmodel
           if (i.eq.j) cycle
-          read(*,'(a32,33x,1000i1)')model(i),(ifragpair(k,i,j),k=1,nres)
+          print *,"i",i," j",j
+          read(*,'(a32,32x,1000i2)')model(i),(ifragpair(k,i,j),k=1,nres)
         enddo
       enddo
       do i=1,nmodel
         do j=i+1,nmodel
-          write(*,'(2a32,1000i1)')model(i),model(j),
+          write(*,'(2a32,1000i2)')model(i),model(j),
      &    (ifragpair(k,i,j),k=1,nres)
         enddo
       enddo
@@ -299,13 +300,19 @@ c            print *,k
       enddo
 c Write model information
       write(2,'(i5)') nmodel_out,nclust
+      ii=0
+      iindex=0
       do i=1,nmodel
-        if (imodelclust(i).eq.1) write(2,'(a32)') model(i)
+        if (imodelclust(i).eq.1) then
+          ii=ii+1
+          write(2,'(a32)') model(i)
+          iindex(i)=ii 
+        endif
       enddo
 c Write cluster information
       do i=1,nclust
         write(2,'(2i5)') ninclust(i),nlenclust(i)
-        write(2,'(16i5)') (icluster(k,i),k=1,ninclust(i))
+        write(2,'(16i5)') (iindex(icluster(k,i)),k=1,ninclust(i))
         write(2,'(16i5)') (ifrag(k,i),k=1,nlenclust(i))
       enddo
       end