Page 401 - Handbook Of Multiphase Flow Assurance
P. 401

400                          10.  Research methods in flow assurance

                      COMMON /chain / monodata(100,100),monocount(99),nbackbone
                      COMMON /NATOMS/ Norgn, Nwatrs, M1, M2, M3, M4
                      COMMON /NRUN / Ncycle,Ndead,Kprint,Kdprnt,Kcyc,Neq
                      COMMON /WPOS / xw(6000,3), yw(6000,3), zw(6000,3),qw(3)
                      COMMON /SURF1 / a, ap
                      COMMON /NWPOS / xn(1000), yn(1000), zn(1000)
                      COMMON /BDIST / xmax, ymax, xmaxh, ymaxh
                      COMMON /ESAVE / Eold,Epold,Epoly(99,99),Ep(99,99),Esurf(99),Es(99)
                      COMMON /NHB / nhb(100),nhbpoly,nhbcurr(100)
                      COMMON /POTPAM/ Casqof,Co,Rsqon,Rsqoff,Rcut,Pi,Tk,Temp
                      COMMON /PROPTY/ Bmax, Gmax, Rdel
                      COMMON /STEPS / Deltrn, Delrot, Delpiv, Acctrn, Accrot, Accpiv
                      COMMON /ZSAVE / zrun(100),epolymer,Erun
                      COMMON /SPACE / xms(1000), yms(1000), zms(1000)
                      COMMON /RATIOS/ Ratiot, Ratior, Ratiop

                 C     set the name of the .POS file to a current MC move number
                      if(Kcyc.eq.0) then
                      ndig=1
                      else
                      ndig=int(log(dble(Kcyc))/log(10.D0))+1
                      endif
                      form='(I'//char(ndig+48)//')'
                      write(fname,form)Kcyc
                      fname = fname(1:ndig)//'.pos'
                      IF(Neq.eq.0)fname = fname(1:ndig)//'e.pos'
                      open(unit=1,file=fname,status='unknown')

                 C     coordinates for YX polymer
                      scale=240/ymax
                      write(1,'(F4.0)')scale
                      nxoff=60
                      nyoff=240
                      if(ap.eq.2)then
                       nxoff=160
                       nyoff=240
                      endif
                      write(1,'(3I4)')natom
                      do i=1,natom
                      ir=iatomtype(i,1)*scale/15
                      iix=int(yn(i)*scale)+nxoff
                      iiy=int(xn(i)*scale)+nyoff
                      write(1,'(5I4)')ir,iix,iiy,nbonds(i),iatomtype(i,1)
                      do j=1,nbonds(i)
                      ix=int(yn(ibonddata(i,j))*scale)+nxoff
   396   397   398   399   400   401   402   403   404   405   406