unres Adam's changes
[unres.git] / source / unres / src-HCD-5D / elecont.f
index bf9056a..7c024ea 100644 (file)
@@ -9,7 +9,7 @@
       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
@@ -20,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/
@@ -55,7 +55,6 @@ c      data epp    / 0.3045d0, 0.3649d0, 0.3649d0, 0.5743d0/
         zmedi=zi+0.5*dzi
         call to_box(xmedi,ymedi,zmedi)
 c        write (iout,*) "i",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
@@ -74,11 +73,12 @@ c          write (iout,*) "i",i," j",j
           xj=c(1,j)+0.5*dxj
           yj=c(2,j)+0.5*dyj
           zj=c(3,j)+0.5*dzj
-c          write (iout,*) "j",xj,yj,zj
           call to_box(xj,yj,zj)
-          xj=boxshift(xj-xi,boxxsize)
-          yj=boxshift(yj-yi,boxysize)
-          zj=boxshift(zj-zi,boxzsize)
+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
           rrmij=1.0/(xj*xj+yj*yj+zj*zj)
           rmij=sqrt(rrmij)
@@ -105,7 +105,7 @@ c          write (iout,*) "j",xj,yj,zj
             econt(ncont)=eesij
           endif
           ees=ees+eesij
-c          write (iout,*) "i"," j",j," rij",dsqrt(rij)," eesij",eesij
+c          write (iout,*) "i",i," j",j," rij",dsqrt(rij)," eesij",eesij
     4   continue
     1 continue
       if (lprint) then
@@ -118,7 +118,7 @@ c          write (iout,*) "i"," j",j," rij",dsqrt(rij)," eesij",eesij
           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
@@ -204,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
@@ -267,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
@@ -442,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