projects
/
unres.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkgrad_inc added to input for checkgrad cart
[unres.git]
/
source
/
unres
/
src_MD
/
checkder_p.F
diff --git
a/source/unres/src_MD/checkder_p.F
b/source/unres/src_MD/checkder_p.F
index
719770e
..
05ea860
100644
(file)
--- a/
source/unres/src_MD/checkder_p.F
+++ b/
source/unres/src_MD/checkder_p.F
@@
-8,6
+8,7
@@
C Check the gradient of Cartesian coordinates in internal coordinates.
include 'COMMON.GEO'
include 'COMMON.LOCAL'
include 'COMMON.DERIV'
include 'COMMON.GEO'
include 'COMMON.LOCAL'
include 'COMMON.DERIV'
+ include 'COMMON.SCCOR'
dimension temp(6,maxres),xx(3),gg(3)
indmat(i,j)=((2*(nres-2)-i)*(i-1))/2+j-1
*
dimension temp(6,maxres),xx(3),gg(3)
indmat(i,j)=((2*(nres-2)-i)*(i-1))/2+j-1
*
@@
-180,6
+181,7
@@
C Check the gradient of the energy in Cartesian coordinates.
include 'COMMON.IOUNITS'
include 'COMMON.VAR'
include 'COMMON.CONTACTS'
include 'COMMON.IOUNITS'
include 'COMMON.VAR'
include 'COMMON.CONTACTS'
+ include 'COMMON.SCCOR'
common /srutu/ icall
dimension ggg(6),cc(3),xx(3),ddc(3),ddx(3),x(maxvar),g(maxvar)
dimension grad_s(6,maxres)
common /srutu/ icall
dimension ggg(6),cc(3),xx(3),ddc(3),ddx(3),x(maxvar),g(maxvar)
dimension grad_s(6,maxres)
@@
-261,6
+263,7
@@
C Check the gradient of the energy in Cartesian coordinates.
include 'COMMON.MD'
include 'COMMON.LOCAL'
include 'COMMON.SPLITELE'
include 'COMMON.MD'
include 'COMMON.LOCAL'
include 'COMMON.SPLITELE'
+ include 'COMMON.SCCOR'
common /srutu/ icall
dimension ggg(6),ggg1(6),cc(3),xx(3),ddc(3),ddx(3),x(maxvar),
& g(maxvar)
common /srutu/ icall
dimension ggg(6),ggg1(6),cc(3),xx(3),ddc(3),ddx(3),x(maxvar),
& g(maxvar)
@@
-281,17
+284,24
@@
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-5
- write(iout,*) 'Calling CHECK_ECARTINT.'
+c aincr=1.0D-4
+ aincr=checkgrad_inc
+ write(iout,*) 'Calling CHECK_ECARTINT.',aincr
nf=0
icall=0
call geom_to_var(nvar,x)
if (.not.split_ene) then
call etotal(energia(0))
nf=0
icall=0
call geom_to_var(nvar,x)
if (.not.split_ene) then
call etotal(energia(0))
+c do i=1,nres
+c write (iout,*) "atu?", gloc_sc(1,i,icg),gloc(i,icg)
+c enddo
etot=energia(0)
call enerprint(energia(0))
call flush(iout)
write (iout,*) "enter cartgrad"
etot=energia(0)
call enerprint(energia(0))
call flush(iout)
write (iout,*) "enter cartgrad"
+c do i=1,nres
+c write (iout,*) gloc_sc(1,i,icg)
+c enddo
call flush(iout)
call cartgrad
write (iout,*) "exit cartgrad"
call flush(iout)
call cartgrad
write (iout,*) "exit cartgrad"
@@
-338,6
+348,9
@@
c call checkintcartgrad
call zerograd
call etotal_short(energia(0))
call enerprint(energia(0))
call zerograd
call etotal_short(energia(0))
call enerprint(energia(0))
+c do i=1,nres
+c write (iout,*) gloc_sc(1,i,icg)
+c enddo
call flush(iout)
write (iout,*) "enter cartgrad"
call flush(iout)
call flush(iout)
write (iout,*) "enter cartgrad"
call flush(iout)
@@
-383,6
+396,7
@@
c call int_from_cart1(.false.)
if (.not.split_ene) then
call etotal(energia1(0))
etot1=energia1(0)
if (.not.split_ene) then
call etotal(energia1(0))
etot1=energia1(0)
+c write (iout,*) "i",i," etot",etot," etot1",etot1
else
!- split gradient
call etotal_long(energia1(0))
else
!- split gradient
call etotal_long(energia1(0))
@@
-429,6
+443,7
@@
c write (iout,*)
if (.not.split_ene) then
call etotal(energia1(0))
etot1=energia1(0)
if (.not.split_ene) then
call etotal(energia1(0))
etot1=energia1(0)
+c write (iout,*) "i",i," etot",etot," etot1",etot1
else
!- split gradient
call etotal_long(energia1(0))
else
!- split gradient
call etotal_long(energia1(0))
@@
-515,7
+530,7
@@
c-------------------------------------------------------------------------
be=0.0D0
if (i.gt.2) then
if (i.le.nres) phi(i+1)=beta(i-2,i-1,i,i+1)
be=0.0D0
if (i.gt.2) then
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
+ 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
if (itype(i-1).ne.10) then
tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
endif
if (itype(i-1).ne.10) then
@@
-674,7
+689,7
@@
cd write (iout,'(i3,1pe14.4)') (i,gana(i),i=1,nvar)
call etotal(energia2(0))
etot2=energia2(0)
gg(i)=(etot2-etot1)/aincr
call etotal(energia2(0))
etot2=energia2(0)
gg(i)=(etot2-etot1)/aincr
- write (iout,*) i,etot1,etot2
+c write (iout,*) i,etot1,etot2
x(i)=xi
enddo
write (iout,'(/2a)')' Variable Numerical Analytical',
x(i)=xi
enddo
write (iout,'(/2a)')' Variable Numerical Analytical',