Calculates the path between 2 atoms
index of the first atom
index of the end atom
maximal length of the path
Calculates the path between 2 atoms