public static void scaleMolecule(IAtomContainer atomCon, Dimension areaDim, double fillFactor) {
        Dimension molDim = get2DDimension(atomCon);
        double widthFactor = (double) areaDim.width / (double) molDim.width;
        double heightFactor = (double) areaDim.height / (double) molDim.height;
        double scaleFactor = Math.min(widthFactor, heightFactor) * fillFactor;
        scaleMolecule(atomCon, scaleFactor);
    }
public static void scaleMolecule ( IAtomContainer atomCon , Dimension areaDim , double fillFactor ) { Dimension molDim = get2DDimension ( atomCon ) ; double widthFactor = ( double ) areaDim . width / ( double ) molDim . width ; double heightFactor = ( double ) areaDim . height / ( double ) molDim . height ; double scaleFactor = Math . min ( widthFactor , heightFactor ) * fillFactor ; scaleMolecule ( atomCon , scaleFactor ) ; }
Scales a molecule such that it fills a given percentage of a given
dimension.
See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets

@param  atomCon     The molecule to be scaled
@param  areaDim     The dimension to be filled
@param  fillFactor  The percentage of the dimension to be filled