enddo
endif
enddo
+c----------------------------------------------------------------------
C INTERTYP=1 SC...Ca...Ca...Ca
+C INTERTYP=2 Ca...Ca...Ca...SC
+C INTERTYP=3 SC...Ca...Ca...SC
c calculating dE/ddc1
- intertyp=1
if (nres.lt.2) return
if ((nres.lt.3).and.(itype(1).eq.1)) return
if (itype(1).ne.10) then
do j=1,3
- gxcart(j,1)=gxcart(j,1)+gloc_sc(intertyp,1,icg)*
- & dtauangle(j,1,1,4)
-c As potetnial DO NOT
+cc Derviative was calculated for oposite vector of side chain therefore
+c there is "-" sign before gloc_sc
+ gxcart(j,1)=gxcart(j,1)-gloc_sc(1,1,icg)*
+ & dtauangle(j,1,1,3)
+ gcart(j,1)=gcart(j,1)+gloc_sc(1,1,icg)*
+ & dtauangle(j,
+ if (itype(2).ne.10) gxcart(j,1)=gxcart(j,1)
+ &-gloc_sc(3,1,icg)*dtauangle(j,3,1,3)
+c As potetnial DO NOT depend on omicron anlge their derivative is
+c ommited
c & +gloc_sc(intertyp,nres-2,icg)*dtheta(j,1,3)
enddo
endif