Adam's changes to wham and cluster following previous commit
[unres.git] / source / wham / src / energy_p_new.F
index a954783..81abea5 100644 (file)
@@ -3182,7 +3182,7 @@ c
       include 'COMMON.SETUP'
       include 'COMMON.NAMES'
 
-      do i=1,19
+      do i=1,max_template
         distancek(i)=9999999.9
       enddo
 
@@ -5261,11 +5261,9 @@ c   3 = SC...Ca...Ca...SCi
           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
@@ -5605,7 +5603,7 @@ C The system gains extra energy.
 #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.