Skip to content

Output

The output block controls how results are written to disk.

Basic Form

output {
  formats=[tabdelim, hdf5],
  folder="results"
}

Formats

Supported output formats include:

  • tabdelim
  • hdf5
  • excel

Graphical Output

Plots can be requested directly from the output block by listing output objects from the normalized result tree. A dedicated internal plotter class maps each supported object to a default plotting recipe, so the user only declares what should be plotted and the code handles labels, filtering, and file naming.

output {
  formats=[tabdelim, hdf5],
  folder="results",
  plots=["aggregated/kinetics/derivatives"]
}

Plotting Procedure

The typical workflow is:

  1. Define the simulation runs and analyses that generate the data you care about.
  2. Add a plots=[...] list inside the output block.
  3. Put either:
  4. exact plot object names, when you know the precise object you want, or
  5. shorthands / wildcard patterns, when you want the code to collect a whole family of plots automatically.
  6. Run mkmcxx.
  7. Inspect the generated figures under plots/, which mirrors the result tree.

In practice, plotting is object-driven:

  • kinetics plots come from aggregated kinetics objects such as aggregated/kinetics/derivatives
  • sensitivity plots come from aggregated sensitivity objects such as aggregated/sensitivity/drc
  • transient semilog plots come from time-series objects such as timeseries/T_600_00/partial_pressure

The user does not need to configure titles, axes, colors, legend layout, or file formats for each figure. Those are handled internally by the plotter.

Currently supported plot features:

  • Cairo-backed default plots
  • one internally defined plotting recipe per supported output object
  • automatic png and pdf output per requested plot
  • automatic filtering for cases such as gas-phase derivatives
  • semilogarithmic x-axis support for time-series plots
  • plot file organization that mirrors the result tree under plots/
  • shorthand plot groups and wildcard plot selection

The plots list accepts both concrete object paths and shorthand selectors. Supported shorthands are:

  • all or full Expands to every plottable output object available in the current run.
  • kinetics Expands to aggregated/kinetics/*.
  • sensitivity Expands to aggregated/sensitivity/*.
  • timeseries Expands to timeseries/*.
  • selectivity Expands to aggregated/kinetics/selectivity_*.
  • dsc Expands to aggregated/sensitivity/dsc*.

Wildcard * matching is also supported directly in plot requests.

The wildcard rules are simple:

  • * matches any substring, including /
  • matching happens against the canonical plot object path
  • expansion only keeps plots that are actually available in the current run

That last point matters. For example:

  • aggregated/sensitivity/* only yields sensitivity plots that were actually generated by the selected analyses
  • timeseries/*/partial_pressure only yields partial-pressure time-series plots for temperatures that were actually simulated
  • aggregated/kinetics/selectivity_* only works when selectivity analyses were requested and produced output objects

Examples:

output {
  formats=[tabdelim, hdf5],
  folder="results",
  plots=[
    "kinetics",
    "aggregated/sensitivity/*",
    "timeseries/*/partial_pressure"
  ]
}
output {
  formats=[tabdelim, hdf5],
  folder="results",
  plots=[
    "sensitivity",
    "timeseries/*/partial_pressure"
  ]
}
output {
  formats=[tabdelim, hdf5],
  folder="results",
  plots=["full"]
}

The last form is the broadest one: it asks the plotter to render every plottable object available for the current simulation output.

The following objects are currently wired up:

  • aggregated/kinetics/derivatives This renders a default line plot of gas-phase derivatives versus temperature.
  • aggregated/kinetics/coverage This renders a default line plot of surface coverages versus temperature.
  • aggregated/kinetics/partial_pressure This renders a default line plot of gas-phase concentrations/partial pressures versus temperature.
  • aggregated/kinetics/rates This renders a default line plot of reaction rates versus temperature.
  • aggregated/sensitivity/orders This renders a default line plot of reaction orders versus temperature.
  • aggregated/sensitivity/orders_r2 This renders a default line plot of R2-filtered reaction orders versus temperature.
  • aggregated/sensitivity/eapp This renders a default line plot of apparent activation energy versus temperature.
  • aggregated/sensitivity/eapp_r2 This renders a default line plot of R2-filtered apparent activation energy versus temperature.
  • aggregated/sensitivity/drc This renders a default line plot of degree-of-rate-control coefficients versus temperature.
  • aggregated/sensitivity/drc_r2 This renders a default line plot of R2-filtered degree-of-rate-control coefficients versus temperature.
  • aggregated/sensitivity/tdrc This renders a default line plot of thermodynamic degree-of-rate-control coefficients versus temperature.
  • aggregated/sensitivity/tdrc_r2 This renders a default line plot of R2-filtered thermodynamic degree-of-rate-control coefficients versus temperature.
  • aggregated/kinetics/selectivity_* These render default line plots for selectivity result objects versus temperature.
  • aggregated/sensitivity/dsc* These render default line plots for DSC result objects versus temperature.
  • timeseries/T_xx_xx/concentration This renders a semilog-x concentration/coverage trace against time for one transient run.
  • timeseries/T_xx_xx/coverage This renders a semilog-x surface-coverage trace against time for one transient run.
  • timeseries/T_xx_xx/partial_pressure This renders a semilog-x gas-phase partial-pressure trace against time for one transient run.

Additional objects can be supported by extending the internal output-object plotter.

Plot files are organized to match the corresponding output object path. For example:

  • aggregated/sensitivity/drc becomes plots/aggregated/sensitivity/drc.png
  • aggregated/kinetics/derivatives becomes plots/aggregated/kinetics/derivatives_gas.png
  • timeseries/T_600_00/coverage becomes plots/timeseries/T_600_00/coverage_logx.png

For a complete example using wildcard selectors, see examples/plotting/ammonia-wildcards.mkx.

Output Folder

The folder key defines the root output directory.

If omitted, the default output directory is results.

Result Organization

Results may include:

  • concentrations
  • derivatives
  • rates
  • analysis results such as DRC, TDRC, Eapp, and orders

When multiple simulations are defined, results are grouped by simulation name.