From d8b22fdfb7f0ece8bb6f1398fe77b06ed0adf6ca Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Wed, 17 Feb 2016 12:52:09 +0100 Subject: [PATCH] correction for homol_nset>1 and waga_homology(iset)=0 to prevent sigsegv --- source/unres/src_MD/MREMD.F | 1 - source/unres/src_MD/energy_p_new_barrier.F | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/unres/src_MD/MREMD.F b/source/unres/src_MD/MREMD.F index 1951bca..e443ec7 100644 --- a/source/unres/src_MD/MREMD.F +++ b/source/unres/src_MD/MREMD.F @@ -1,4 +1,3 @@ -#define DEBUG #ifdef MPI subroutine MREMD implicit real*8 (a-h,o-z) diff --git a/source/unres/src_MD/energy_p_new_barrier.F b/source/unres/src_MD/energy_p_new_barrier.F index 9803d93..dcdd311 100644 --- a/source/unres/src_MD/energy_p_new_barrier.F +++ b/source/unres/src_MD/energy_p_new_barrier.F @@ -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) -- 1.7.9.5