time01=MPI_Wtime()
#endif
#if defined(PARINT) && defined(MPI)
- do i=iint_start,iint_end
+ do i=iint_start,iint_end+1
#else
do i=2,nres
#endif
enddo
be=0.0D0
if (i.gt.2) then
- phi(i+1)=beta(i-2,i-1,i,i+1)
+ if (i.le.nres) phi(i+1)=beta(i-2,i-1,i,i+1)
if (itype(i).ne.10).and.(itype(i-1).ne.10) then
tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
endif
vbld_inv(nres+i)=0.0d0
endif
enddo
+
#if defined(PARINT) && defined(MPI)
if (nfgtasks1.gt.1) then
cd write(iout,*) "iint_start",iint_start," iint_count",
c lprn=.true.
c write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor
esccor=0.0D0
- do i=iphi_start,iphi_end
+ do i=iphi_start-1,iphi_end+1
esccor_ii=0.0D0
isccori=isccortyp(itype(i-2))
isccori1=isccortyp(itype(i-1))
& (itype(i-1).eq.10))
& .or. ((intertyp.eq.1).and.(itype(i-2).ne.10))
& .or. ((intertyp.eq.2).and.(itype(i-1).ne.10))) cycle
+ if ((intertyp.eq.2).and.(i.eq.iphi_start-1)) cycle
+ if ((intertyp.eq.1).and.(i.eq.iphi_end+1)) cycle
do j=1,nterm_sccor(isccori,isccori1)
v1ij=v1sccor(j,intertyp,isccori,isccori1)
v2ij=v2sccor(j,intertyp,isccori,isccori1)
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
Calculate derivative of Tauangle
#ifdef PARINTDER
- do i=iphi1_start,iphi1_end
+ do i=iphi1_start-1,iphi1_end
#else
- do i=4,nres
+ do i=3,nres
#endif
+cc dtauangle(j,intertyp,dervityp,residue number)
cc INTERTYP=1 SC...Ca...Ca..Ca
c the conventional case
sint=dsin(theta(i))
CCC third case SC...Ca...Ca...SC
#ifdef PARINTDER
- do i=iphi1_start,iphi1_end
+ do i=iphi1_start-1,iphi1_end
#else
- do i=4,nres
+ do i=3,nres
#endif
c the conventional case
sint=dsin(omicron(1,i))