X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc-HCD-5D%2Felecont.f;h=7c024eaaec7fb96f5ea6ee6153495cefb94f99dd;hb=43dfdc33f5b338546258b5a882326f97a76b5bd4;hp=73325f2fa65e9a380e1e9406c1a826983c405528;hpb=48ae9e01d2dd6571fa2cca6c704dc04f86e5fd7b;p=unres.git diff --git a/source/unres/src-HCD-5D/elecont.f b/source/unres/src-HCD-5D/elecont.f index 73325f2..7c024ea 100644 --- a/source/unres/src-HCD-5D/elecont.f +++ b/source/unres/src-HCD-5D/elecont.f @@ -9,9 +9,10 @@ include 'COMMON.NAMES' logical lprint double precision elpp_6(2,2),elpp_3(2,2),ael6_(2,2),ael3_(2,2) - double precision app_(2,2),bpp_(2,2),rpp_(2,2) + double precision app_(2,2),bpp_(2,2),epp_(2,2),rpp_(2,2) integer ncont,icont(2,maxcont) double precision econt(maxcont) + double precision boxshift * * Load the constants of peptide bond - peptide bond interactions. * Type 1 - ordinary peptide bond, type 2 - alkylated peptide bond (e.g. @@ -19,7 +20,7 @@ * * as of 7/06/91. * -c data epp / 0.3045d0, 0.3649d0, 0.3649d0, 0.5743d0/ +c data epp_ / 0.3045d0, 0.3649d0, 0.3649d0, 0.5743d0/ data rpp_ / 4.5088d0, 4.5395d0, 4.5395d0, 4.4846d0/ data elpp_6 /-0.2379d0,-0.2056d0,-0.2056d0,-0.0610d0/ data elpp_3 / 0.0503d0, 0.0000d0, 0.0000d0, 0.0692d0/ @@ -52,13 +53,10 @@ c data epp / 0.3045d0, 0.3649d0, 0.3649d0, 0.5743d0/ xmedi=xi+0.5*dxi ymedi=yi+0.5*dyi zmedi=zi+0.5*dzi - xmedi=mod(xmedi,boxxsize) - if (xmedi.lt.0) xmedi=xmedi+boxxsize - ymedi=mod(ymedi,boxysize) - if (ymedi.lt.0) ymedi=ymedi+boxysize - zmedi=mod(zmedi,boxzsize) - if (zmedi.lt.0) zmedi=zmedi+boxzsize + call to_box(xmedi,ymedi,zmedi) +c write (iout,*) "i",xmedi,ymedi,zmedi do 4 j=i+2,nct-1 +c write (iout,*) "i",i," j",j if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1) goto 4 ind=ind+1 iteli=itel(i) @@ -75,46 +73,13 @@ c data epp / 0.3045d0, 0.3649d0, 0.3649d0, 0.5743d0/ xj=c(1,j)+0.5*dxj yj=c(2,j)+0.5*dyj zj=c(3,j)+0.5*dzj - xj=mod(xj,boxxsize) - if (xj.lt.0) xj=xj+boxxsize - yj=mod(yj,boxysize) - if (yj.lt.0) yj=yj+boxysize - zj=mod(zj,boxzsize) - if (zj.lt.0) zj=zj+boxzsize - dist_init=(xj-xi)**2+(yj-yi)**2+(zj-zi)**2 - xj_safe=xj - yj_safe=yj - zj_safe=zj - isubchap=0 - do xshift=-1,1 - do yshift=-1,1 - do zshift=-1,1 - xj=xj_safe+xshift*boxxsize - yj=yj_safe+yshift*boxysize - zj=zj_safe+zshift*boxzsize - dist_temp=(xj-xi)**2+(yj-yi)**2+(zj-zi)**2 - if(dist_temp.lt.dist_init) then - dist_init=dist_temp - xj_temp=xj - yj_temp=yj - zj_temp=zj - isubchap=1 - endif - enddo - enddo - enddo - if (isubchap.eq.1) then - xj=xj_temp-xmedi - yj=yj_temp-ymedi - zj=zj_temp-zmedi - else - xj=xj_safe-xmedi - yj=yj_safe-ymedi - zj=zj_safe-zmedi - endif + call to_box(xj,yj,zj) +c write (iout,*) "j",xj,yj,zj + xj=boxshift(xj-xmedi,boxxsize) + yj=boxshift(yj-ymedi,boxysize) + zj=boxshift(zj-zmedi,boxzsize) +c write (iout,*) "j",xj,yj,zj rij=xj*xj+yj*yj+zj*zj - sss=sscale(sqrt(rij)) - sssgrad=sscagrad(sqrt(rij)) rrmij=1.0/(xj*xj+yj*yj+zj*zj) rmij=sqrt(rrmij) r3ij=rrmij*rmij @@ -140,7 +105,7 @@ c data epp / 0.3045d0, 0.3649d0, 0.3649d0, 0.5743d0/ econt(ncont)=eesij endif ees=ees+eesij - evdw=evdw+evdwij*sss +c write (iout,*) "i",i," j",j," rij",dsqrt(rij)," eesij",eesij 4 continue 1 continue if (lprint) then @@ -153,7 +118,7 @@ c data epp / 0.3045d0, 0.3649d0, 0.3649d0, 0.5743d0/ i2=icont(2,i) it1=itype(i1) it2=itype(i2) - write (iout,'(i3,2x,a,i4,2x,a,i4,f10.5)') + write (iout,'(i7,2x,a,i6,2x,a,i6,f10.5)') & i,restyp(it1),i1,restyp(it2),i2,econt(i) enddo endif @@ -239,7 +204,7 @@ c enddo i2=icont(2,i) it1=itype(i1) it2=itype(i2) - write (iout,'(i3,2x,a,i4,2x,a,i4,f10.5)') + write (iout,'(i7,2x,a,i6,2x,a,i6,f10.5)') & i,restyp(it1),i1,restyp(it2),i2,econt(i) enddo endif @@ -251,7 +216,7 @@ c-------------------------------------------- include 'DIMENSIONS' include 'COMMON.CHAIN' include 'COMMON.IOUNITS' - include 'COMMON.DISTFIT' + include 'COMMON.FRAG' include 'COMMON.VAR' include 'COMMON.GEO' include 'COMMON.CONTROL' @@ -302,7 +267,7 @@ cd write (iout,*) i1,j1,not_done ii1=max0(ii1-1,1) jj1=max0(jj1-1,1) nbeta=nbeta+1 - if(lprint)write(iout,'(a,i3,4i4)')'parallel beta', + if(lprint)write(iout,'(a,i7,4i6)')'parallel beta', & nbeta,ii1,i1,jj1,j1 nbfrag=nbfrag+1 @@ -477,29 +442,29 @@ cd write (iout,*) i1,j1,not_done if (lprint) then - write (iout,'(a,i3,4i4)')'antiparallel beta', + write (iout,'(a,i3,4i6)')'antiparallel beta', & nbeta,ii1-1,i1,jj1,j1-1 nstrand=nstrand+1 if (nstrand.le.9) then - write(12,'(a18,i1,a9,i3,a2,i3,a1)') + write(12,'(a18,i1,a9,i6,a2,i6,a1)') & "DefPropRes 'strand",nstrand, & "' 'num = ",ii1-2,"..",i1-1,"'" else - write(12,'(a18,i2,a9,i3,a2,i3,a1)') + write(12,'(a18,i2,a9,i6,a2,i6,a1)') & "DefPropRes 'strand",nstrand, & "' 'num = ",ii1-2,"..",i1-1,"'" endif nstrand=nstrand+1 if (nstrand.le.9) then - write(12,'(a18,i1,a9,i3,a2,i3,a1)') + write(12,'(a18,i1,a9,i6,a2,i6,a1)') & "DefPropRes 'strand",nstrand, & "' 'num = ",j1-2,"..",jj1-1,"'" else - write(12,'(a18,i2,a9,i3,a2,i3,a1)') + write(12,'(a18,i2,a9,i6,a2,i6,a1)') & "DefPropRes 'strand",nstrand, & "' 'num = ",j1-2,"..",jj1-1,"'" endif - write(12,'(a8,4i4)') + write(12,'(a8,4i6)') & "SetNeigh",ii1-2,i1-1,jj1-1,j1-2 endif endif