code: @Override
      public void paint(IChemModel chemModel, IDrawVisitor drawVisitor, Rectangle2D bounds, boolean resetCenter) {
          // check for an empty model
          IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
          IReactionSet reactionSet = chemModel.getReactionSet();
  
          // nasty, but it seems that reactions can be read in as ChemModels
          // with BOTH a ReactionSet AND a MoleculeSet...
          if (moleculeSet == null || reactionSet != null) {
              if (reactionSet != null) {
                  reactionSetRenderer.paint(reactionSet, drawVisitor, bounds, resetCenter);
              }
              return;
          }
  
          // calculate the total bounding box
          Rectangle2D modelBounds = BoundsCalculator.calculateBounds(moleculeSet);
  
          this.setupTransformToFit(bounds, modelBounds,
                  AverageBondLengthCalculator.calculateAverageBondLength(chemModel), resetCenter);
  
          // generate the elements
          IRenderingElement diagram = moleculeSetRenderer.generateDiagram(moleculeSet);
  
          // paint it
          this.paint(drawVisitor, diagram);
      }
docs: Paint a ChemModel.
  
  @param chemModel
  @param drawVisitor the visitor that does the drawing
  @param bounds the bounds of the area to paint on.
  @param resetCenter
  if true, set the modelCenter to the center of the ChemModel's bounds.