Page 404 - Handbook Of Multiphase Flow Assurance
P. 404
Computer code (Makogon, 1994, 1997) 403
10 NHbs=nhbs+nhbcurr(i)
Deno = 1.D0/(kprint*3.D0)
Rave=dsqrt(zrun(4)*deno)
Eplmave=zrun(8)*deno
Esrfave=zrun(9)*deno
Ecurave=zrun(7)*deno
write(1,*)' Kcyc <Re-e> <Ecur> <Epol> <Esur> Xpos Ypos Zpos
&HBp HBs Epoly Esurf'
WRITE(1,90) Kcyc,rave,Eplmave,Esrfave,Ecurave,
& xms(Norgn),yms(Norgn),zms(Norgn),NHbpoly,NHBs,Epol,Eave
write(1,'(A20,99I2)')' Segments H bonds: ',(nhbcurr(i),i=1,nbb)
90 FORMAT(I7,F6.2,3F7.2,2F7.2,F6.2,I4,I4,2F7.2)
close(1)
RETURN
END
C
C-------------------------------------------------------------------
C
SUBROUTINE DECIDE(Ener, Iflag)
IMPLICIT REAL*8(A-H,O-Z)
real*4 ran
COMMON /ESAVE / Eold,Epold,Epoly(99,99),Ep(99,99),Esurf(99),Es(99)
COMMON /ZSAVE / zrun(100),epolymer,Erun
COMMON /PROPTY/ Bmax, Gmax, Rdel
COMMON /POTPAM/ Casqof,Co,Rsqon,Rsqoff,Rcut,Pi,Tk,Temp
COMMON /chain / monodata(100,100),monocount(99),nbackbone
C obtain a sum of intramolecular and intermolecular energies for MC check
Enerp=Epold
IF(Iflag.eq.2) CALL ENERGYP(Enerp)
Ener=Ener+Enerp
C MC check
IF (Ener .LT. Eold) THEN
CALL ACCEPT(Ener, Iflag)
CALL ZSAMPLE
RETURN
else
Delu = (Ener - Eold)/Tk
IF (Delu .LT. 75.D0) THEN
Ran=(roulet()+1.)*0.5
IF (DEXP(-Delu) .GT. Ran) THEN
CALL ACCEPT(Ener, Iflag)
CALL ZSAMPLE

