code: public static double[] getMinMax(IAtomContainer container) {
          double maxX = -Double.MAX_VALUE;
          double maxY = -Double.MAX_VALUE;
          double minX = Double.MAX_VALUE;
          double minY = Double.MAX_VALUE;
          for (int i = 0; i < container.getAtomCount(); i++) {
              IAtom atom = container.getAtom(i);
              if (atom.getPoint2d() != null) {
                  if (atom.getPoint2d().x > maxX) {
                      maxX = atom.getPoint2d().x;
                  }
                  if (atom.getPoint2d().x < minX) {
                      minX = atom.getPoint2d().x;
                  }
                  if (atom.getPoint2d().y > maxY) {
                      maxY = atom.getPoint2d().y;
                  }
                  if (atom.getPoint2d().y < minY) {
                      minY = atom.getPoint2d().y;
                  }
              }
          }
          double[] minmax = new double[4];
          minmax[0] = minX;
          minmax[1] = minY;
          minmax[2] = maxX;
          minmax[3] = maxY;
          return minmax;
      }
docs: Returns the minimum and maximum X and Y coordinates of the atoms in the
  AtomContainer. The output is returned as: <pre>
  minmax[0] = minX;
  minmax[1] = minY;
  minmax[2] = maxX;
  minmax[3] = maxY;
  </pre>
  See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets
  
  @param  container  Description of the Parameter
  @return            An four int array as defined above.