gxcart(j,nres-1)=gxcart(j,nres-1)-gloc_sc(3,nres-2,icg)
& *dtauangle(j,3,1,nres+1)
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(3,nres-2,icg)
& *dtauangle(j,3,2,nres+1)
endif
endif
gxcart(j,nres-1)=gxcart(j,nres-1)-gloc_sc(3,nres-2,icg)
& *dtauangle(j,3,1,nres+1)
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(3,nres-2,icg)
& *dtauangle(j,3,2,nres+1)
endif
endif