X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Freadrtns_CSA.F;h=bcd749ff0a531c88ae2ff4575f0d4355a793cc72;hb=107ad1479c841e0b44ead7c961c78ca528be291c;hp=2a591cf2c797887884c71bf901a42aae3bb25ccd;hpb=0310c77d61ccd0c4852fea91bb14e3112bafaec0;p=unres.git diff --git a/source/unres/src_MD-M/readrtns_CSA.F b/source/unres/src_MD-M/readrtns_CSA.F index 2a591cf..bcd749f 100644 --- a/source/unres/src_MD-M/readrtns_CSA.F +++ b/source/unres/src_MD-M/readrtns_CSA.F @@ -2560,6 +2560,7 @@ c & sigma_odl_temp(maxres,maxres,max_template) logical lprn /.true./ integer ilen external ilen + logical liiflag c c FP - Nov. 2014 Temporary specifications for new vars c @@ -2874,22 +2875,29 @@ c shift data in all arrays c if (waga_dist.ne.0.0d0) then ii=0 + liiflag=.true. do i=nnt,nct-2 do j=i+2,nct ii=ii+1 - if (ii_in_use(ii).eq.0) then - do ki=ii,lim_odl-1 - ires_homo(ki)=ires_homo(ki+1) - jres_homo(ki)=jres_homo(ki+1) - ii_in_use(ki)=ii_in_use(ki+1) + if (ii_in_use(ii).eq.0.and.liiflag) then + liiflag=.false. + iistart=ii + endif + if (ii_in_use(ii).ne.0.and..not.liiflag) then + iishift=ii-iistart + liiflag=.true. + do ki=iistart,lim_odl-iishift + ires_homo(ki)=ires_homo(ki+iishift) + jres_homo(ki)=jres_homo(ki+iishift) + ii_in_use(ki)=ii_in_use(ki+iishift) do k=1,constr_homology - odl(k,ki)=odl(k,ki+1) - sigma_odl(k,ki)=sigma_odl(k,ki+1) - l_homo(k,ki)=l_homo(k,ki+1) + odl(k,ki)=odl(k,ki+iishift) + sigma_odl(k,ki)=sigma_odl(k,ki+iishift) + l_homo(k,ki)=l_homo(k,ki+iishift) enddo enddo - ii=ii-1 - lim_odl=lim_odl-1 + ii=ii-iishift + lim_odl=lim_odl-iishift endif enddo enddo