numerical gradient delta 10e-4
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 22 Feb 2017 04:43:56 +0000 (05:43 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 22 Feb 2017 04:43:56 +0000 (05:43 +0100)
source/unres/src_MD-M/energy_p_new_barrier.F
source/unres/src_MD/checkder_p.F

index dc71297..eef70b5 100644 (file)
@@ -2395,7 +2395,11 @@ c        if (i.gt. iatel_s+1 .and. i.lt.iatel_e+4) then
         do k=1,2
           mu(k,i-2)=Ub2(k,i-2)+b1(k,iti1)
         enddo
         do k=1,2
           mu(k,i-2)=Ub2(k,i-2)+b1(k,iti1)
         enddo
-cd        write (iout,*) 'mu ',mu(:,i-2)
+cd        write (iout,*) 'mu  ',mu(:,i-2),i-2
+cd        write (iout,*) 'b1  ',b1(:,iti1),i-2
+cd        write (iout,*) 'Ub2 ',Ub2(:,i-2),i-2
+cd        write (iout,*) 'Ug  ',Ug(:,:,i-2),i-2
+cd        write (iout,*) 'b2  ',b2(:,itortyp(itype(i))),i-2
 cd        write (iout,*) 'mu1',mu1(:,i-2)
 cd        write (iout,*) 'mu2',mu2(:,i-2)
         if (wcorr4.gt.0.0d0 .or. wcorr5.gt.0.0d0 .or.wcorr6.gt.0.0d0)
 cd        write (iout,*) 'mu1',mu1(:,i-2)
 cd        write (iout,*) 'mu2',mu2(:,i-2)
         if (wcorr4.gt.0.0d0 .or. wcorr5.gt.0.0d0 .or.wcorr6.gt.0.0d0)
@@ -4245,7 +4249,7 @@ c
      &       "estr1",i,gnmr1(vbld(i),-1.0d0,distchainmax)
         else
         diff = vbld(i)-vbldp0
      &       "estr1",i,gnmr1(vbld(i),-1.0d0,distchainmax)
         else
         diff = vbld(i)-vbldp0
-        if (energy_dec) write (iout,*) 
+        if (energy_dec) write (iout,'(a7,i5,4f7.3)') 
      &     "estr bb",i,vbld(i),vbldp0,diff,AKP*diff*diff
         estr=estr+diff*diff
         do j=1,3
      &     "estr bb",i,vbld(i),vbldp0,diff,AKP*diff*diff
         estr=estr+diff*diff
         do j=1,3
@@ -5146,6 +5150,8 @@ c     &   sumene4,
 c     &   dscp1,dscp2,sumene
 c        sumene = enesc(x,xx,yy,zz,cost2tab(i+1),sint2tab(i+1))
         escloc = escloc + sumene
 c     &   dscp1,dscp2,sumene
 c        sumene = enesc(x,xx,yy,zz,cost2tab(i+1),sint2tab(i+1))
         escloc = escloc + sumene
+        if (energy_dec) write (iout,'(a6,i5,0pf7.3)')
+     &     'escloc',i,sumene
 c        write (2,*) "i",i," escloc",sumene,escloc
 #ifdef DEBUG
 C
 c        write (2,*) "i",i," escloc",sumene,escloc
 #ifdef DEBUG
 C
index 08b7a32..fc11c2e 100644 (file)
@@ -284,7 +284,7 @@ C Check the gradient of the energy in Cartesian coordinates.
 c      call intcartderiv
 c      call checkintcartgrad
       call zerograd
 c      call intcartderiv
 c      call checkintcartgrad
       call zerograd
-      aincr=1.0D-6
+      aincr=1.0D-4
       write(iout,*) 'Calling CHECK_ECARTINT.'
       nf=0
       icall=0
       write(iout,*) 'Calling CHECK_ECARTINT.'
       nf=0
       icall=0