Page 363 - Handbook Of Multiphase Flow Assurance
P. 363
362 10. Research methods in flow assurance
nhb[i,2]:=abs(nhb[i,2]);
end;
CleanUp; {remove repeated and unconnected bonds}
writeln(ttyout,n,' bonds left');
for i:=1 to nmax do {clear the ring and rdist arrays}
begin
rdist[i]:=0;
bonds[i]:=0;
for j:=1 to ngrand do
ring[j,i]:=0;
end;
natom:=0; {determine the largest atom number}
for i:=1 to n do
begin
if nhb[i,1]>natom then
natom:=nhb[i,1];
if nhb[i,2]>natom then
natom:=nhb[i,2];
end;
for i:=1 to natom do {get order of connectivity for members}
begin
order[i]:=0;
for j:=1 to n do {search for atom of number i in bonds}
if (nhb[j,1]=i)or(nhb[j,2]=i)then
order[i]:=order[i]+1;
end;
for i:=1 to n−2 do {loop over all bonds, 1..n−2}
begin
{writeln(ttyout,'Counting rings for bond #',i);}
for j:=1 to nmax do
begin
rin[j]:=0;
bonds[j]:=0;
rinn[j]:=False; {reset next-pointers of tempor. ring}
rinm[j]:=0;
end;
nr:=1;
nbond:=i; {get number of currently studied bond}
rin[nr]:=nhb[nbond,1]; {start temporary chain}
bonds[nr]:=nbond; {modify list of bonds in ring}
nnext:=nhb[i,2];