esccor=esccor+v1ij*cosphi+v2ij*sinphi
gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
enddo
- gloc_sc(intertyp,i-3,icg)=gloc_sc(i-3,icg)+wtor*gloci
+ gloc_sc(intertyp,i-3,icg)=gloc_sc(intertyp,i-3,icg)+wtor*gloci
if (lprn)
& write (iout,'(2(a3,2x,i3,2x),2i3,6f8.3/26x,6f8.3/)')
& restyp(itype(i-2)),i-2,restyp(itype(i-1)),i-1,itori,itori1,
do j=1,3
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)*
+ gxcart(j,1)=gxcart(j,1)-gloc_sc(1,0,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)
+ gcart(j,1)=gcart(j,1)+gloc_sc(1,0,icg)*
+ & dtauangle(j,1,2,3)
+ if (itype(2).ne.10) then
+ gxcart(j,1)= gxcart(j,1)
+ & -gloc_sc(3,0,icg)*dtauangle(j,3,1,3)
+ gcart(j,1)=gcart(j,1)+gloc_sc(3,0,icg)*
+ dtauangle(j,3,2,3)
+ endif
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
+ if (itype(3).ne.10) then
+ do j=1,3
+ gcart(j,1)=gcart(j,1)+
+ & gloc_sc(2,1,icg)*dtauangle(j,2,2,4)
+ enddo
c Calculating the remainder of dE/ddc2
do j=1,3
gcart(j,2)=gcart(j,2)+gloc(1,icg)*dphi(j,2,4)+