Page 370 - Handbook Of Multiphase Flow Assurance
P. 370
Computer code (Makogon, 1994, 1997) 369
c *** C=O or CR1R2R3 are allowed|
c
c if O is present in backbone, it must be positioned before the C
c which is connected to a side group
c
c e.g. H3C − O − CH − CH2 − O − CH -----
c side side
c
c if O is present in side group and in backbone then backbone must have
c at least two carbons between backbone oxygens (as in figure above)
c and side group can't be -OH
c
C-----arrays info:-------
c nbonds(i) – number of covalent bonds found to atom (i)
c nrawatom– current MSI value of irawatom(i)
c n2atom – MSI number of atom bonded to nrawatom
c chain(i)– number of an atom in backbone
c listwait(i) – list of atoms waiting for side group search
c ibonddata(i,j) – number of atom bonded to atom i by bond j
c irawbond(i,j) – MSI numbers of atoms (j=1,2) bonded by bond (i)
c irawatom(i) – MSI number of atom (i) in a molecule
c iatomtype(i,j) – j=1:type of atom (i){H=1;C=2;O=3;N=4}; j=2:monomer #
c nbondfound – number of found bonds in molecule
c natom – number of found atoms in molecule
c ngroups – number of monomers
c atomdata(i,j) – j=1..4: X,Y,Z,charge for atom (i)
c monodata(i,j) – list of atoms (j) in monomer (i)
c monocount(i) – number of atoms in monomer (i); also contains info
about backbone
implicit real*8 (a–h,o–z)
implicit integer(i–n)
integer*2 nrawatom,n2atom,listwait(100),chain(100)
COMMON /bonds / ibonddata(1000,4),nbonds(1000)
COMMON /raw / irawbond(1000,2),irawatom(1000)
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
CALL READMSI
C calculate the total charge and number of oxygen atoms in molecule
c=0.D0
no=0
do i=1,natom
iatomtype(i,2)=0

