Adam's update from okeanos
[unres.git] / source / unres / src-HCD-5D / moments.F
index bbc0f27..4f57331 100644 (file)
@@ -183,7 +183,8 @@ c   Resetting the velocities
 #ifdef FIVEDIAG
       do i=nnt,nct-1
         write (iout,*) itype(i+1),itype(i)
-        if (itype(i+1).ne.ntyp1 .and. itype(i).eq.ntyp1) cycle
+        if (itype(i+1).ne.ntyp1 .and. itype(i).eq.ntyp1 .or.
+     &      itype(i).ne.ntyp1 .and. itype(i+1).eq.ntyp1) cycle
         call vecpr(vrot(1),dc(1,i),vp)  
         do j=1,3
           d_t(j,i)=d_t(j,i)-vp(j)