From: Adam Sieradzan Date: Thu, 6 Aug 2015 07:01:16 +0000 (+0200) Subject: Merge branch 'AFM' into multichain X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?p=unres.git;a=commitdiff_plain;h=8df996bdc4bc56846b3799e9a2d47c24a9273125 Merge branch 'AFM' into multichain --- 8df996bdc4bc56846b3799e9a2d47c24a9273125 diff --cc source/unres/src_MD-M/energy_p_new_barrier.F index 439fb81,2208b17..3192819 --- a/source/unres/src_MD-M/energy_p_new_barrier.F +++ b/source/unres/src_MD-M/energy_p_new_barrier.F @@@ -3063,19 -3282,14 +3282,21 @@@ C Loop over i,i+2 and i,i+3 pairs of th C C 14/01/2014 TURN3,TUNR4 does no go under periodic boundry condition do i=iturn3_start,iturn3_end + if (i.le.1) cycle + C write(iout,*) "tu jest i",i if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1 +C changes suggested by Ana to avoid out of bounds + & .or.((i+4).gt.nres) + & .or.((i-1).le.0) +C end of changes by Ana & .or. itype(i+2).eq.ntyp1 - & .or. itype(i+3).eq.ntyp1 - & .or. itype(i-1).eq.ntyp1 - & .or. itype(i+4).eq.ntyp1 - & ) cycle + & .or. itype(i+3).eq.ntyp1) cycle + if(i.gt.1)then + if(itype(i-1).eq.ntyp1)cycle + end if + if(i.LT.nres-3)then + if (itype(i+4).eq.ntyp1) cycle + end if dxi=dc(1,i) dyi=dc(2,i) dzi=dc(3,i) @@@ -3097,11 -3311,8 +3318,12 @@@ num_cont_hb(i)=num_conti enddo do i=iturn4_start,iturn4_end + if (i.le.1) cycle if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1 +C changes suggested by Ana to avoid out of bounds + & .or.((i+5).gt.nres) + & .or.((i-1).le.0) +C end of changes suggested by Ana & .or. itype(i+3).eq.ntyp1 & .or. itype(i+4).eq.ntyp1 & .or. itype(i+5).eq.ntyp1 @@@ -3164,11 -3375,8 +3386,12 @@@ c Loop over all pairs of interacting peptide groups except i,i+2 and i,i+3 c do i=iatel_s,iatel_e + if (i.le.1) cycle if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1 +C changes suggested by Ana to avoid out of bounds + & .or.((i+2).gt.nres) + & .or.((i-1).le.0) +C end of changes by Ana & .or. itype(i+2).eq.ntyp1 & .or. itype(i-1).eq.ntyp1 & ) cycle @@@ -3220,12 -3428,9 +3443,13 @@@ c endi c write (iout,*) 'i',i,' ielstart',ielstart(i),' ielend',ielend(i) num_conti=num_cont_hb(i) do j=ielstart(i),ielend(i) - c write (iout,*) i,j,itype(i),itype(j) + C write (iout,*) i,j + if (j.le.1) cycle if (itype(j).eq.ntyp1.or. itype(j+1).eq.ntyp1 +C changes suggested by Ana to avoid out of bounds + & .or.((j+2).gt.nres) + & .or.((j-1).le.0) +C end of changes by Ana & .or.itype(j+2).eq.ntyp1 & .or.itype(j-1).eq.ntyp1 &) cycle