Page 395 - Handbook Of Multiphase Flow Assurance
P. 395

394                          10.  Research methods in flow assurance

                      integer*2 ncenter,ncenter2
                      COMMON /BDIST / xmax, ymax, xmaxh, ymaxh
                      COMMON /side / side, unitside
                      COMMON /diag / diag
                      COMMON /types / iatomtype(1000,2),nbondfound,natom,ngroups,ncall
                      COMMON /atoms / atomdata(1000,4),atomdata2(1000,4)
                      COMMON /chain / monodata(100,100),monocount(99),nbackbone
                      COMMON /bonds / ibonddata(1000,4),nbonds(1000)
                      COMMON /LJPAM / DD(6,1000), RR(6,1000), DHB(1000), RHB(1000)
                      COMMON /NATOMS/ Norgn, Nwatrs, M1, M2, M3, M4
                      COMMON /NHB  / nhb(100),nhbpoly,nhbcurr(100)
                      COMMON /NWPOS / xn(1000), yn(1000), zn(1000)
                      COMMON /POTPAM/ Casqof,Co,Rsqon,Rsqoff,Rcut,Pi, Tk,Temp
                      COMMON /WPOS / xw(6000,3), yw(6000,3), zw(6000,3), qw(3)
                      COMMON /SURF1 / a, ap
                      COMMON /center/ ncenter,ncenter2
                      COMMON /ESAVE / Eold,Epold,Epoly(99,99),Ep(99,99),Esurf(99),Es(99)
                      COMMON /ZSAVE / zrun(100),epolymer,Erun
                 C
                 C Move was a pivot - find intramolecular polymer energy for the moved segments
                      nhbpoly=0
                 C set the temporary array EP of segment interaction energies to accepted values
                      do 10 i=1,nbackbone-2
                      do 10 j=i+2,nbackbone
                   10  Ep(i,j)=Epoly(i,j)
                 C assign boundaries for loops over moved (ncenter), unmoved (ncenter2) segments
                      ni = ncenter
                      nii= ncenter2
                      if(ncenter.gt.nbackbone/2) then
                      ni = ncenter2
                      nii= ncenter
                      endif
                 C loops over moved and unmoved segments
                      do i = 1 , ni
                      do ii=nii, nbackbone
                 c  if the pair of groups is a neighboring pair in backbone, skip the pair
                      if(abs(i-ii).eq.1)goto 35
                      Ener = 0.D0
                      do j=1,monocount(i)
                      do jj=1,monocount(ii)
                      natom1 = monodata(i,j)
                      natom2 = monodata(ii,jj)
                      x =xn(natom1)
                      y =yn(natom1)
                      z =zn(natom1)
   390   391   392   393   394   395   396   397   398   399   400