Compare all files to each other
Welcome to Code Review!
Shellcheck
Use the amazing shellcheck utility to verify for common practices when writing bash/shell scripts. It reports missing shebang.
Loop using seq
Since you know the lower and upper bounds, and those are pure integers, use the seq command to iterate through them. You won't need to do custom increments and variable swaps.
Inner loop
Begin your inner loop with a value starting from current outer loop value + 1.
Variable
Using more descriptive variable names helps in understanding your code.
Parallelization
To achieve faster results, you can maybe use parallel to do the diff comparison for different files. If the set of files are small, you can also run the obabel tool in background, or disown the command from script entirely (depending on your requirements).

#!/bin/bash

LOWER_BOUND=0
UPPER_BOUND=2

for i in $(seq &quot;$LOWER_BOUND&quot; &quot;$UPPER_BOUND&quot;)
do
    ((INNER_START=i+1))
    for j in $(seq &quot;$INNER_START&quot; &quot;$UPPER_BOUND&quot;)
    do
        obabel &quot;filename${i}.xyz&quot; -oconfabreport -xf &quot;filename${j}.xyz&quot; -xr 0.2 &gt; &quot;Results.${i}.${j}&quot;
    done
done

I'll leave parallelization to your own implementation. You can refer this excellent demonstration of parallel command.