@ 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 ( ) ) ; }
This method calculate the number of bonds on the shortest path between two atoms .