cost=dcos(theta(i))
sint=sqrt(1-cost*cost)
do j=1,3
+C if (itype(i-1).ne.21) then
dcostheta(j,1,i)=-(dc_norm(j,i-1)+cost*dc_norm(j,i-2))/
& vbld(i-1)
- if (itype(i-1).ne.21) dtheta(j,1,i)=-dcostheta(j,1,i)/sint
+ if (itype(i-1).ne.21) dtheta(j,1,i)=-dcostheta(j,1,i)/sint
dcostheta(j,2,i)=-(dc_norm(j,i-2)+cost*dc_norm(j,i-1))/
& vbld(i)
- if (itype(i-1).ne.21) dtheta(j,2,i)=-dcostheta(j,2,i)/sint
+ if (itype(i-1).ne.21) dtheta(j,2,i)=-dcostheta(j,2,i)/sint
+C endif
enddo
enddo
#if defined(MPI) && defined(PARINTDER)
write (iout,*)
& "Analytical (upper) and numerical (lower) gradient of alpha"
do i=2,nres-1
- if(itype(i).ne.10) then
+ if((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then
do j=1,3
dcji=dc(j,i-1)
dc(j,i-1)=dcji+aincr
write (iout,*)
& "Analytical (upper) and numerical (lower) gradient of omega"
do i=2,nres-1
- if(itype(i).ne.10) then
+ if((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then
do j=1,3
dcji=dc(j,i-1)
dc(j,i-1)=dcji+aincr