* Check the gradient of the virtual-bond and SC vectors in the internal
* coordinates.
*
- aincr=1.0d-7
- aincr2=5.0d-8
+ aincr=1.5d-7
+ aincr2=2.5d-8
call cartder
write (iout,'(a)') '**************** dx/dalpha'
write (iout,'(a)')
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=1.0D-5
+ aincr=8.0D-7
write(iout,*) 'Calling CHECK_ECARTINT.'
nf=0
icall=0
endif
write (iout,'(/a/)') 'Gradient in virtual-bond and SC vectors'
do i=0,nres
+ print *,i
do j=1,3
xx(j)=c(j,i+nres)
ddc(j)=dc(j,i)
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))
#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)
enddo
be=0.0D0
- if (i.gt.2) phi(i+1)=beta(i-2,i-1,i,i+1)
+ 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
+ tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
+ endif
+ if (itype(i-1).ne.10) then
+ tauangle(1,i+1)=beta(i-1+nres,i-1,i,i+1)
+ omicron(1,i)=alpha(i-2,i-1,i-1+nres)
+ omicron(2,i)=alpha(i-1+nres,i-1,i)
+ endif
+ if (itype(i).ne.10) then
+ tauangle(2,i+1)=beta(i-2,i-1,i,i+nres)
+ 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