#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)