X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;ds=inline;f=source%2Funres%2Fsrc_MD-M%2Fcheckder_p.F;h=80dd2136b78b21f7e5c30ee0f8b305966ae928b6;hb=00ff2d632b212c4d4a388e8f7f5394763b65e3bb;hp=4ebfd056881eefaf30632b486fdc1efc69395f8a;hpb=bf8b3ab324569ca7ae7bb9045ad9358f6826a150;p=unres.git diff --git a/source/unres/src_MD-M/checkder_p.F b/source/unres/src_MD-M/checkder_p.F index 4ebfd05..80dd213 100644 --- a/source/unres/src_MD-M/checkder_p.F +++ b/source/unres/src_MD-M/checkder_p.F @@ -2,6 +2,7 @@ C Check the gradient of Cartesian coordinates in internal coordinates. implicit real*8 (a-h,o-z) include 'DIMENSIONS' + include 'COMMON.CONTROL' include 'COMMON.IOUNITS' include 'COMMON.VAR' include 'COMMON.CHAIN' @@ -14,8 +15,9 @@ C Check the gradient of Cartesian coordinates in internal coordinates. * Check the gradient of the virtual-bond and SC vectors in the internal * coordinates. * - aincr=1.0d-7 - aincr2=5.0d-8 + print '("Calling CHECK_ECART",1pd12.3)',aincr + write (iout,'("Calling CHECK_ECART",1pd12.3)') aincr + aincr2=0.5d0*aincr call cartder write (iout,'(a)') '**************** dx/dalpha' write (iout,'(a)') @@ -175,6 +177,7 @@ C---------------------------------------------------------------------------- C Check the gradient of the energy in Cartesian coordinates. implicit real*8 (a-h,o-z) include 'DIMENSIONS' + include 'COMMON.CONTROL' include 'COMMON.CHAIN' include 'COMMON.DERIV' include 'COMMON.IOUNITS' @@ -191,8 +194,8 @@ C Check the gradient of the energy in Cartesian coordinates. nf=0 nfl=0 call zerograd - aincr=1.0D-7 - print '(a)','CG processor',me,' calling CHECK_CART.' + print '("Calling CHECK_ECART",1pd12.3)',aincr + write (iout,'("Calling CHECK_ECART",1pd12.3)') aincr nf=0 icall=0 call geom_to_var(nvar,x) @@ -272,8 +275,8 @@ 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 @@ -282,8 +285,10 @@ C Check the gradient of the energy in Cartesian coordinates. c call intcartderiv c call checkintcartgrad call zerograd - aincr=8.0D-6 - write(iout,*) 'Calling CHECK_ECARTINT.' +c aincr=8.0D-7 +c aincr=1.0D-7 + print '("Calling CHECK_ECARTINT",1pd12.3)',aincr + write (iout,'("Calling CHECK_ECARTINT",1pd12.3)') aincr nf=0 icall=0 call geom_to_var(nvar,x) @@ -298,8 +303,10 @@ c call checkintcartgrad write (iout,*) "exit cartgrad" call flush(iout) icall =1 + write (iout,*) "gcard and gxcart" do i=1,nres - write (iout,'(i5,3f10.5)') i,(gradxorr(j,i),j=1,3) + write (iout,'(i5,3f10.5,5x,3f10.5)') i,(gcart(j,i),j=1,3), + & (gxcart(j,i),j=1,3) enddo do j=1,3 grad_s(j,0)=gcart(j,0) @@ -397,6 +404,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)) @@ -627,6 +635,7 @@ c---------------------------------------------------------------------------- C Check the gradient of energy in internal coordinates. implicit real*8 (a-h,o-z) include 'DIMENSIONS' + include 'COMMON.CONTROL' include 'COMMON.CHAIN' include 'COMMON.DERIV' include 'COMMON.IOUNITS' @@ -641,8 +650,9 @@ C Check the gradient of energy in internal coordinates. character*6 key external fdum call zerograd - aincr=1.0D-7 - print '(a)','Calling CHECK_INT.' +c aincr=1.0D-7 + print '("Calling CHECK_INT",1pd12.3)',aincr + write (iout,'("Calling CHECK_INT",1pd12.3)') aincr nf=0 nfl=0 icg=1 @@ -673,12 +683,12 @@ cd write (iout,'(i3,1pe14.4)') (i,gana(i),i=1,nvar) xi=x(i) x(i)=xi-0.5D0*aincr call var_to_geom(nvar,x) - call chainbuild + call chainbuild_extconf call etotal(energia1(0)) etot1=energia1(0) x(i)=xi+0.5D0*aincr call var_to_geom(nvar,x) - call chainbuild + call chainbuild_extconf call etotal(energia2(0)) etot2=energia2(0) gg(i)=(etot2-etot1)/aincr