include 'COMMON.SETUP'
include 'COMMON.NAMES'
- do i=1,19
+ do i=1,max_template
distancek(i)=9999999.9
enddo
cosphi=dcos(j*tauangle(intertyp,i))
sinphi=dsin(j*tauangle(intertyp,i))
esccor=esccor+v1ij*cosphi+v2ij*sinphi
-#define DEBUG
#ifdef DEBUG
esccor_ii=esccor_ii+v1ij*cosphi+v2ij*sinphi
#endif
-#undef DEBUG
gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
enddo
gloc_sc(intertyp,i-3,icg)=gloc_sc(intertyp,i-3,icg)+wsccor*gloci
#ifdef DEBUG
write (iout,*) "ecorr",i,j,i+1,j1,
& ehbcorr(i,j,i+1,j1,jj,kk,0.72D0,0.32D0)
-#undef DEBUG
+#endif
n_corr=n_corr+1
else if (j1.eq.j) then
C Contacts I-J and I-(J+1) occur simultaneously.