X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Fenergy_p_new_barrier.F;fp=source%2Funres%2Fsrc_MD-M%2Fenergy_p_new_barrier.F;h=d4465f66e0b4275ec8035868073c6d6cd37c88ba;hb=a5f7d9f55e6e0f07be66dce4c30740db41b6461e;hp=af14adb6df0e6a6cfd2f8043f7241e2a57d6bd15;hpb=18010d3bb85a86b499dc4569225e21faffea9634;p=unres.git diff --git a/source/unres/src_MD-M/energy_p_new_barrier.F b/source/unres/src_MD-M/energy_p_new_barrier.F index af14adb..d4465f6 100644 --- a/source/unres/src_MD-M/energy_p_new_barrier.F +++ b/source/unres/src_MD-M/energy_p_new_barrier.F @@ -3064,6 +3064,10 @@ C C 14/01/2014 TURN3,TUNR4 does no go under periodic boundry condition do i=iturn3_start,iturn3_end 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 @@ -3091,6 +3095,10 @@ C 14/01/2014 TURN3,TUNR4 does no go under periodic boundry condition enddo do i=iturn4_start,iturn4_end 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 @@ -3154,6 +3162,10 @@ 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 (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 @@ -3207,6 +3219,10 @@ c write (iout,*) 'i',i,' ielstart',ielstart(i),' ielend',ielend(i) do j=ielstart(i),ielend(i) c write (iout,*) i,j,itype(i),itype(j) 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