code: public static double calculateAverageBondLength(IReactionSet reactionSet) {
          double averageBondModelLength = 0.0;
          for (IReaction reaction : reactionSet.reactions()) {
              averageBondModelLength += calculateAverageBondLength(reaction);
          }
          return averageBondModelLength / reactionSet.getReactionCount();
      }
docs: Calculate the average bond length for the bonds in a reaction set.
  @param reactionSet the reaction set to use
  @return the average bond length