Adam's changes from nostromo to wham with homology
[unres.git] / source / unres / src_MD / energy_p_new_barrier.F
index 9803d93..dcdd311 100644 (file)
@@ -263,7 +263,7 @@ cd    print *,'nterm=',nterm
        edihcnstr=0
       endif
 
-      if (constr_homology.ge.1) then
+      if (constr_homology.ge.1.and.waga_homology(iset).ne.0d0) then
         call e_modeller(ehomology_constr)
 c        print *,'iset=',iset,'me=',me,ehomology_constr,
 c     &  'Processor',fg_rank,' CG group',kolor,
@@ -822,7 +822,7 @@ c      enddo
 #endif
         enddo
       enddo 
-      if (constr_homology.gt.0) then
+      if (constr_homology.gt.0.and.waga_homology(iset).ne.0d0) then
         do i=1,nct
           do j=1,3
             gradc(j,i,icg)=gradc(j,i,icg)+duscdiff(j,i)