Merge branch 'devel' into AFM
[unres.git] / source / unres / src_MD-M / checkder_p.F
index b017e1c..135aab7 100644 (file)
@@ -272,16 +272,17 @@ C Check the gradient of the energy in Cartesian coordinates.
       integer uiparm(1)
       double precision urparm(1)
       external fdum
-      r_cut=2.0d0
-      rlambd=0.3d0
+c      r_cut=2.0d0
+c      rlambd=0.3d0
       icg=1
       nf=0
       nfl=0                
+      print *,"ATU 3"
       call intout
 c      call intcartderiv
 c      call checkintcartgrad
       call zerograd
-      aincr=10.0D-6
+      aincr=8.0D-6
       write(iout,*) 'Calling CHECK_ECARTINT.'
       nf=0
       icall=0
@@ -396,6 +397,7 @@ c            write (iout,*) "etot11",etot11," etot12",etot12
 c          write(iout,'(2i5,2(a,f15.10))')i,j," etot",etot," etot1",etot1
          dc(j,i)=ddc(j)-aincr
           call chainbuild_cart
+C          print *,c(j,i)
 c          call int_from_cart1(.false.)
           if (.not.split_ene) then
             call etotal(energia1(0))
@@ -507,8 +509,10 @@ c-------------------------------------------------------------------------
 #else
       do i=2,nres
 #endif
+C        print *,i
         dnorm1=dist(i-1,i)
-        dnorm2=dist(i,i+1) 
+        dnorm2=dist(i,i+1)
+C        print *,i,dnorm1,dnorm2 
        do j=1,3
          c(j,maxres2)=0.5D0*(2*c(j,i)+(c(j,i-1)-c(j,i))/dnorm1
      &     +(c(j,i+1)-c(j,i))/dnorm2)
@@ -529,11 +533,16 @@ c-------------------------------------------------------------------------
         endif
         endif
         omeg(i)=beta(nres+i,i,maxres2,i+1)
+C        print *,omeg(i)
         alph(i)=alpha(nres+i,i,maxres2)
+C        print *,alph(i)
         theta(i+1)=alpha(i-1,i,i+1)
         vbld(i)=dist(i-1,i)
+C        print *,vbld(i)
         vbld_inv(i)=1.0d0/vbld(i)
         vbld(nres+i)=dist(nres+i,i)
+C            print *,vbld(i+nres)
+
         if (itype(i).ne.10) then
           vbld_inv(nres+i)=1.0d0/vbld(nres+i)
         else