Fized same buffer issue in gather and gatherv in wham and cluster and a minor issue...
[unres.git] / source / cluster / wham / src / initialize_p.F
index 06e7b0b..224cb21 100644 (file)
@@ -155,6 +155,9 @@ C Initialize the bridge arrays
        ihpb(i)=0
        jhpb(i)=0
       enddo
+      do i=1,maxres
+        dyn_ss_mask(i)=.false.
+      enddo
 C
 C Initialize timing.
 C
@@ -291,6 +294,7 @@ cd   &   (ihpb(i),jhpb(i),i=1,nss)
         do ii=1,nss
           if (ihpb(ii).eq.i+nres) then
             scheck=.true.
+            if (dyn_ss) go to 10
             jj=jhpb(ii)-nres
             goto 10
           endif
@@ -341,7 +345,7 @@ cd      write (iout,*) 'i=',i,' scheck=',scheck,' jj=',jj
           nint_gr(i)=1
           istart(i,1)=i+1
           iend(i,1)=nct
-          ind_scint=int_scint+nct-i
+          ind_scint=ind_scint+nct-i
 #endif
         endif
 #ifdef MPL
@@ -475,6 +479,9 @@ C Partition local interactions
       call int_bounds(nct-nnt-2,iphi_start,iphi_end) 
       iphi_start=iphi_start+nnt+2
       iphi_end=iphi_end+nnt+2
+      call int_bounds(nres-3,itau_start,itau_end)
+      itau_start=itau_start+3
+      itau_end=itau_end+3
       if (lprint) then 
         write (iout,*) 'Processor:',MyID,
      & ' loc_start',loc_start,' loc_end',loc_end,
@@ -498,6 +505,9 @@ C Partition local interactions
       ithet_end=nres
       iphi_start=nnt+3
       iphi_end=nct
+      itau_start=4
+      itau_end=nres
+
 #endif
       return
       end