time00=MPI_Wtime()
#endif
icg=1
+#ifdef DEBUG
+ write (iout,*) "Before sum_gradient"
+ do i=1,nres-1
+ write (iout,*) i," gradc ",(gradc(j,i,icg),j=1,3)
+ write (iout,*) i," gradx ",(gradx(j,i,icg),j=1,3)
+ enddo
+#endif
call sum_gradient
#ifdef TIMING
#endif
#ifdef DEBUG
write (iout,*) "gcart, gxcart, gloc before int_to_cart"
#endif
- do i=1,nct
+ do i=0,nct
do j=1,3
gcart(j,i)=gradc(j,i,icg)
gxcart(j,i)=gradx(j,i,icg)
C
C Initialize Cartesian-coordinate gradient
C
- do i=1,nres
+ do i=-1,nres
do j=1,3
gvdwx(j,i)=0.0D0
gradx_scp(j,i)=0.0D0
gel_loc_long(j,i)=0.0d0
ghpbc(j,i)=0.0D0
ghpbx(j,i)=0.0D0
+ gsaxsc(j,i)=0.0D0
+ gsaxsx(j,i)=0.0D0
gcorr3_turn(j,i)=0.0d0
gcorr4_turn(j,i)=0.0d0
gradcorr(j,i)=0.0d0
gradx(j,i,icg)=0.0d0
gscloc(j,i)=0.0d0
gsclocx(j,i)=0.0d0
+ gliptranc(j,i)=0.0d0
+ gliptranx(j,i)=0.0d0
+ gradafm(j,i)=0.0d0
do intertyp=1,3
gloc_sc(intertyp,i,icg)=0.0d0
enddo
enddo
enddo
+c
+c Initialize the gradients of local restraints
+c
+ do i=1,nres
+ dutheta(i)=0.0d0
+ dugamma(i)=0.0d0
+ do j=1,3
+ duscdiff(j,i)=0.0d0
+ duscdiffx(j,i)=0.0d0
+ enddo
+ enddo
C
C Initialize the gradient of local energy terms.
C