4.69 OEGetPathLength

unsigned int GetPathLength(const OEAtomBase *src, const OEAtomBase *dst,
                           unsigned int max=0)

This function returns the shortest path length between the `src' and `dst' atoms. If the `src' and `dst' atoms are the same OEAtomBase, or have different parent MolBases or are disconnected, this function returns the value zero.

The ``max'' parameter may be used to specify a maximum path length to consider before terminating the search. If this value is zero, the default, the is no upper bound on the returned path length. Otherwise, if the shortest patch between the two atoms is greater than ``max'' bonds, this function returns the value zero.