c &'evdw1',i,j,evdwij
c &,iteli,itelj,aaa,evdw1
- write (iout,'(a6,2i5,0pf7.3)') 'ees',i,j,eesij
-cd write(iout,'(2(2i3,2x),7(1pd12.4)/2(3(1pd12.4),5x)/)')
-cd & iteli,i,itelj,j,aaa,bbb,ael6i,ael3i,
-cd & 1.0D0/dsqrt(rrmij),evdwij,eesij,
-cd & xmedi,ymedi,zmedi,xj,yj,zj
+c write (iout,'(a6,2i5,0pf7.3)') 'ees',i,j,eesij
+c write(iout,'(2(2i3,2x),7(1pd12.4)/2(3(1pd12.4),5x)/)')
+c & iteli,i,itelj,j,aaa,bbb,ael6i,ael3i,
+c & 1.0D0/dsqrt(rrmij),evdwij,eesij,
+c & xmedi,ymedi,zmedi,xj,yj,zj
C
C Calculate contributions to the Cartesian gradient.
C
C Contribution to the local-electrostatic energy coming from the i-j pair
eel_loc_ij=a22*muij(1)+a23*muij(2)+a32*muij(3)
& +a33*muij(4)
-cd write (iout,*) 'i',i,' j',j,' eel_loc_ij',eel_loc_ij
-cd write (iout,*) a22,muij(1),a23,muij(2),a32,muij(3)
+c write (iout,*) 'i',i,' j',j,' eel_loc_ij',eel_loc_ij
+c write (iout,'(a6,2i5,0pf7.3)')
+c & 'eelloc',i,j,eel_loc_ij
+c write (iout,*) a22,muij(1),a23,muij(2),a32,muij(3)
eel_loc=eel_loc+eel_loc_ij
C Partial derivatives in virtual-bond dihedral angles gamma
if (calc_grad) then
y_prime(j) = (dc_norm(j,i) + dc_norm(j,i-1))*sinfac
enddo
do j = 1,3
- z_prime(j) = -uz(j,i-1)*dsign(1.0,dfloat(itype(i)))
+ z_prime(j) = -uz(j,i-1)*dsign(1.0d0,dfloat(itype(i)))
enddo
c write (2,*) "i",i
c write (2,*) "x_prime",(x_prime(j),j=1,3)
Cc diagnostics - remove later
xx1 = dcos(alph(2))
yy1 = dsin(alph(2))*dcos(omeg(2))
- zz1 = -dsign(1.0,itype(i))*dsin(alph(2))*dsin(omeg(2))
+ zz1 = -dsign(1.0d0,itype(i))*dsin(alph(2))*dsin(omeg(2))
write(2,'(3f8.1,3f9.3,1x,3f9.3)')
& alph(2)*rad2deg,omeg(2)*rad2deg,theta(3)*rad2deg,xx,yy,zz,
& xx1,yy1,zz1
c sumene = enesc(x,xx,yy,zz,cost2tab(i+1),sint2tab(i+1))
escloc = escloc + sumene
c write (2,*) "escloc",escloc
+c write (2,*) "i",i," escloc",sumene,escloc,it,itype(i),
+c & zz,xx,yy
if (.not. calc_grad) goto 1
#ifdef DEBUG
C
dZZ_Ci(k)=0.0d0
do j=1,3
dZZ_Ci(k)=dZZ_Ci(k)-uzgrad(j,k,2,i-1)
- & *dsign(1.0,dfloat(itype(i)))*dC_norm(j,i+nres)
+ & *dsign(1.0d0,dfloat(itype(i)))*dC_norm(j,i+nres)
dZZ_Ci1(k)=dZZ_Ci1(k)-uzgrad(j,k,1,i-1)
- & *dsign(1.0,dfloat(itype(i)))*dC_norm(j,i+nres)
+ & *dsign(1.0d0,dfloat(itype(i)))*dC_norm(j,i+nres)
enddo
dXX_XYZ(k)=vbld_inv(i+nres)*(x_prime(k)-xx*dC_norm(k,i+nres))
integer dimen1,dimen2,atom,indx
double precision buffer(dimen1,dimen2)
double precision zapas
- common /contacts_hb/ zapas(3,20,maxres,7),
- & facont_hb(20,maxres),ees0p(20,maxres),ees0m(20,maxres),
- & num_cont_hb(maxres),jcont_hb(20,maxres)
+ common /contacts_hb/ zapas(3,ntyp,maxres,7),
+ & facont_hb(ntyp,maxres),ees0p(ntyp,maxres),ees0m(ntyp,maxres),
+ & num_cont_hb(maxres),jcont_hb(ntyp,maxres)
num_kont=num_cont_hb(atom)
do i=1,num_kont
do k=1,7
integer dimen1,dimen2,atom,indx
double precision buffer(dimen1,dimen2)
double precision zapas
- common /contacts_hb/ zapas(3,20,maxres,7),
- & facont_hb(20,maxres),ees0p(20,maxres),ees0m(20,maxres),
- & num_cont_hb(maxres),jcont_hb(20,maxres)
+ common /contacts_hb/ zapas(3,ntyp,maxres,7),
+ & facont_hb(ntyp,maxres),ees0p(ntyp,maxres),
+ & ees0m(ntyp,maxres),
+ & num_cont_hb(maxres),jcont_hb(ntyp,maxres)
num_kont=buffer(1,indx+26)
num_kont_old=num_cont_hb(atom)
num_cont_hb(atom)=num_kont+num_kont_old