Page 377 - Handbook Of Multiphase Flow Assurance
P. 377
376 10. Research methods in flow assurance
26 n1=index(cc,'XYZ') +5
n2=index(cc,')') -1
nspace1=index(cc(n1:n2),' ')+n1-1
nspace2=index(cc(nspace1+1:n2),' ')+nspace1
ndot1=index(cc(n1:nspace1-1) ,'.')+n1-1
ndot2=index(cc(nspace1+1:nspace2-1),'.')+nspace1
ndot3=index(cc(nspace2+1:n2) ,'.')+nspace2
f1='(F15.11)'
f2='(F15.11)'
f3='(F15.11)'
aaa='2'
if(ndot1.eq.n1-1) then
write(f1,'(I2)')nspace1-n1
aaa=f1(2:2)
f1='(F'//aaa//'.0)'
endif
if(ndot2.eq.nspace1) then
write(f2,'(I2)')nspace2-nspace1-1
aaa=f2(2:2)
f2='(F'//aaa//'.0)'
endif
if(ndot3.eq.nspace2) then
write(f3,'(I2)')n2-nspace2
aaa=f3(2:2)
f3='(F'//aaa//'.0)'
endif
read(cc(n1:nspace1-1), f1)atomdata(natom,1)
read(cc(nspace1+1:nspace2-1),f2)atomdata(natom,2)
read(cc(nspace2+1:n2), f3)atomdata(natom,3)
nfound=nfound+1
goto 30
C get atom type
28 n1=index(cc,'FFType') +8
iatomtype(natom,1)=0
if(cc(16:16).eq.'H') iatomtype(natom,1)=1
if(cc(16:16).eq.'C') iatomtype(natom,1)=2
if(cc(16:16).eq.'O') iatomtype(natom,1)=3
if(cc(16:16).eq.'N') iatomtype(natom,1)=4
if(iatomtype(natom,1).eq.0) print *,'ERROR: Atom type unknown'
nfound=nfound+1
goto 30
C check if all atomic parameters were read
30 if(nfound.lt.3) goto 22
endif
endif
90 goto 10

