program kuk character*40 fn,s20 call getarg(1,fn) call getarg(2,s20) read(s20,*)ngeoms call getarg(3,s20) read(s20,*)al open(9,file=fn) do 1 ig=1,ngeoms read(9,*) read(9,*)nat do 2 ia=1,nat read(9,*)it,x,y,z if(it.eq.8)then if(ig.eq.1)then x1=x y1=y z1=z endif d=sqrt((x-x1)**2+(y-y1)**2+(z-z1)**2) if(d.gt.al)write(6,*)ig,' geometry strange, d:',d endif 2 continue 1 continue end