@Override
    public DescriptorValue calculate(IAtom atom, IAtomContainer container) {

        IAtom focus = container.getAtom(focusPosition);

        // could be cached
        int bondsToAtom = new ShortestPaths(container, atom).distanceTo(focus);

        return new DescriptorValue(getSpecification(), getParameterNames(), getParameters(), new IntegerResult(
                bondsToAtom), getDescriptorNames());

    }
@ Override public DescriptorValue calculate ( IAtom atom , IAtomContainer container ) { IAtom focus = container . getAtom ( focusPosition ) ; int bondsToAtom = new ShortestPaths ( container , atom ) . distanceTo ( focus ) ; return new DescriptorValue ( getSpecification ( ) , getParameterNames ( ) , getParameters ( ) , new IntegerResult ( bondsToAtom ) , getDescriptorNames ( ) ) ; }
This method calculate the number of bonds on the shortest path between two atoms.

@param  atom              The IAtom for which the DescriptorValue is requested
@param  container         Parameter is the atom container.
@return                   The number of bonds on the shortest path between two atoms