X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Fgen_rand_conf.F;h=6caa7184b409a61ce98e9a0e045cd22f8e25d57a;hb=7d64cc3ff0edffb6aa37e309e4375f58bd5875a2;hp=d870f5533e7d9ef81d5ace04fad759097d30273c;hpb=478a9d9a1c99eb3f4bc4ca676ff3162bdd01d633;p=unres.git diff --git a/source/unres/src_MD-M/gen_rand_conf.F b/source/unres/src_MD-M/gen_rand_conf.F index d870f55..6caa718 100644 --- a/source/unres/src_MD-M/gen_rand_conf.F +++ b/source/unres/src_MD-M/gen_rand_conf.F @@ -15,10 +15,10 @@ cd print *,' CG Processor',me,' maxgen=',maxgen maxsi=100 cd write (iout,*) 'Gen_Rand_conf: nstart=',nstart if (nstart.lt.5) then - it1=itype(2) - phi(4)=gen_phi(4,itype(2),itype(3)) + it1=iabs(itype(2)) + phi(4)=gen_phi(4,iabs(itype(2)),iabs(itype(3))) c write(iout,*)'phi(4)=',rad2deg*phi(4) - if (nstart.lt.3) theta(3)=gen_theta(itype(2),pi,phi(4)) + if (nstart.lt.3) theta(3)=gen_theta(iabs(itype(2)),pi,phi(4)) c write(iout,*)'theta(3)=',rad2deg*theta(3) if (it1.ne.10) then nsi=0 @@ -54,9 +54,9 @@ c write(iout,*)'theta(3)=',rad2deg*theta(3) endif return1 endif - it1=itype(i-1) - it2=itype(i-2) - it=itype(i) + it1=iabs(itype(i-1)) + it2=iabs(itype(i-2)) + it=iabs(itype(i)) c print *,'Gen_Rand_Conf: i=',i,' it=',it,' it1=',it1,' it2=',it2, c & ' nit=',nit,' niter=',niter,' maxgen=',maxgen phi(i+1)=gen_phi(i+1,it1,it) @@ -132,12 +132,12 @@ c------------------------------------------------------------------------- include 'COMMON.FFIELD' data redfac /0.5D0/ overlap=.false. - iti=itype(i) + iti=iabs(itype(i)) if (iti.gt.ntyp) return C Check for SC-SC overlaps. cd print *,'nnt=',nnt,' nct=',nct do j=nnt,i-1 - itj=itype(j) + itj=iabs(itype(j)) if (j.lt.i-1 .or. ipot.ne.4) then rcomp=sigmaii(iti,itj) else @@ -159,7 +159,7 @@ C SCs. c(j,maxres2+1)=0.5D0*(c(j,i)+c(j,i+1)) enddo do j=nnt,i-2 - itj=itype(j) + itj=iabs(itype(j)) cd print *,'overlap, p-Sc: i=',i,' j=',j, cd & ' dist=',dist(nres+j,maxres2+1) if (dist(nres+j,maxres2+1).lt.4.0D0*redfac) then @@ -238,7 +238,8 @@ c print *,'gen_theta: it=',it endif thet_pred_mean=a0thet(it) do k=1,2 - thet_pred_mean=thet_pred_mean+athet(k,it)*y(k)+bthet(k,it)*z(k) + thet_pred_mean=thet_pred_mean+athet(k,it,1,1)*y(k) + & +bthet(k,it,1,1)*z(k) enddo sig=polthet(3,it) do j=2,0,-1 @@ -779,7 +780,7 @@ c overlapping residues left, or false otherwise (success) do ires=1,ioverlap_last i=ioverlap(ires) - iti=itype(i) + iti=iabs(itype(i)) if (iti.ne.10) then nsi=0 fail=.true. @@ -839,8 +840,8 @@ C Check for SC-SC overlaps and mark residues c print *,'>>overlap_sc nnt=',nnt,' nct=',nct ind=0 do i=iatsc_s,iatsc_e - itypi=itype(i) - itypi1=itype(i+1) + itypi=iabs(itype(i)) + itypi1=iabs(itype(i+1)) xi=c(1,nres+i) yi=c(2,nres+i) zi=c(3,nres+i) @@ -852,7 +853,7 @@ c do iint=1,nint_gr(i) do j=istart(i,iint),iend(i,iint) ind=ind+1 - itypj=itype(j) + itypj=iabs(itype(j)) dscj_inv=dsc_inv(itypj) sig0ij=sigma(itypi,itypj) chi1=chi(itypi,itypj)