X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fcompare.F90;h=45ed3e589959d3da2ce036b810388d2e7dcda151;hb=b08f823f78b13ba05149e7f3275306de581de1dd;hp=75a9bcea5ba364477580aea32ad59589d626c892;hpb=ae71f1947b5c88582ff30337921f4bee3d5d3038;p=unres4.git diff --git a/source/unres/compare.F90 b/source/unres/compare.F90 index 75a9bce..45ed3e5 100644 --- a/source/unres/compare.F90 +++ b/source/unres/compare.F90 @@ -41,14 +41,25 @@ logical :: lprint !el local variables real(kind=8) :: co,rcomp - integer :: kkk,i,j,i1,i2,it1,it2,iti,itj + integer :: kkk,i,j,i1,i2,it1,it2,iti,itj,inum,jnum ncont=0 kkk=3 do i=nnt+kkk,nct iti=iabs(itype(i,molnum(i))) + if (molnum(i).lt.3) then + inum=i+nres + else + inum=i + endif + do j=nnt,i-kkk itj=iabs(itype(j,molnum(i))) + if (molnum(j).lt.3) then + jnum=j+nres + else + jnum=j + endif if (ipot.ne.4) then ! rcomp=sigmaii(iti,itj)+1.0D0 rcomp=facont*sigmaii(iti,itj) @@ -58,7 +69,7 @@ endif ! rcomp=6.5D0 ! print *,'rcomp=',rcomp,' dist=',dist(nres+i,nres+j) - if (dist(nres+i,nres+j).lt.rcomp) then + if (dist(inum,jnum).lt.rcomp) then ncont=ncont+1 icont(1,ncont)=i icont(2,ncont)=j @@ -4185,7 +4196,7 @@ do i=nnt,nct if (itype(i,1).ne.10) then !d print *,'i=',i,' itype=',itype(i,1),' theta=',theta(i+1) - call gen_side(itype(i,1),theta(i+1),alph(i),omeg(i),fail) + call gen_side(itype(i,1),theta(i+1),alph(i),omeg(i),fail,1) endif enddo call chainbuild @@ -4201,7 +4212,7 @@ alph0=alph(ind_sc) omeg0=omeg(ind_sc) call gen_side(itype(ind_sc,1),theta(ind_sc+1),alph(ind_sc),& - omeg(ind_sc),fail) + omeg(ind_sc),fail,1) call chainbuild call etotal(energia) !d write (iout,'(a,i5,a,i4,2(a,f8.3),2(a,1pe14.5))')