code: public static double getScaleFactor(IAtomContainer container, double bondLength) {
          double currentAverageBondLength = getBondLengthAverage(container);
          if (currentAverageBondLength == 0 || Double.isNaN(currentAverageBondLength)) return 1;
          return bondLength / currentAverageBondLength;
      }
docs: Determines the scale factor for displaying a structure loaded from disk in
  a frame. An average of all bond length values is produced and a scale
  factor is determined which would scale the given molecule such that its
  See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets
  
  @param  container          The AtomContainer for which the ScaleFactor is to be
  calculated
  @param  bondLength  The target bond length
  @return             The ScaleFactor with which the AtomContainer must be
  scaled to have the target bond length