correction for homol_nset>1 and waga_homology(iset)=0 to prevent sigsegv
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 17 Feb 2016 11:52:09 +0000 (12:52 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 17 Feb 2016 11:52:09 +0000 (12:52 +0100)
source/unres/src_MD/MREMD.F
source/unres/src_MD/energy_p_new_barrier.F

index 1951bca..e443ec7 100644 (file)
@@ -1,4 +1,3 @@
-#define DEBUG
 #ifdef MPI
       subroutine MREMD
       implicit real*8 (a-h,o-z)
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)