if((itype(2).ne.10).and.(itype(2).ne.ntyp1)) then
if (itype(1).ne.10) gxcart(j,2)=gxcart(j,2)+
& gloc_sc(3,0,icg)*dtauangle(j,3,3,3)
- if ((itype(3).ne.10).and.(nres.ge.3).and.(itype(3).ne.ntyp1)) then
+ if ((itype(3).ne.10).and.(nres.ge.3).and.(itype(3).ne.ntyp1))
+ & then
gxcart(j,2)=gxcart(j,2)-gloc_sc(3,1,icg)*dtauangle(j,3,1,4)
cc the - above is due to different vector direction
gcart(j,2)=gcart(j,2)+gloc_sc(3,1,icg)*dtauangle(j,3,2,4)