CLI Reference

The main end-user functionality in OLM is the comand line interface (CLI) provided by the olm Python utility. This section documents the various modes available.

Note

For documentation of the scale.olm Python package, see API Reference.

$ olm --help
Usage: olm [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  check    Run a sequence of checks on ORIGEN archives.
  create   Create ORIGEN reactor libraries!
  init     Initialize a new ORIGEN reactor library configuration.
  install  Install ORIGEN reactor libraries!
  link     Link custom ORIGEN reactor libraries to a SCALE calculation.
  schema   Emit the JSON schema corresponding to a particular _type.

olm init

Initialize a new ORIGEN reactor library configuration. f Args:

config_dir: Directory where configuration files should be written.

variant: Initialization variant to write.

list_: Just list available variants.

copy_files: Copy packaged template files into the initialized directory

and update the generated config to reference those local files.

olm init [OPTIONS] [CONFIG_DIR]

Options

-a, --variant <variant>

Name of model variant.

-l, --list

List all known variants and exit.

--copy

Copy packaged template files into the initialized directory.

Arguments

CONFIG_DIR

Optional argument

Usage

Choose from one of the variants when you pass the –list option.


$ olm init --list

Pass a directory name after the variant to choose a shorter local directory while still using the explicit packaged variant.


$ olm init --variant triton_pin_mox_quick mox_quick

Pass –copy to copy editable template files into the initialized directory.


$ olm init --variant triton_pin_mox_quick --copy mox_quick

olm create

Create ORIGEN reactor libraries!

The create command manages an entire ORIGEN reactor library creation sequence which goes through these stages.

  1. generate the various inputs that cover the desired input space

  2. run the inputs with SCALE and generate individual libraries for each point in space

  3. assemble the individual libraries into an ORIGEN reactor library that can interpolate throughout the space

  4. check the quality of the ORIGEN reactor library

  5. report the entire creation process in HTML or PDF

The linchpin of the process is a configuration file which must always be passed to the command. This file defines the input for each stage in JSON format.

olm create [OPTIONS] config.olm.json

Options

--generate, --nogenerate

Whether to perform input generation.

--run, --norun

Whether to perform runs.

--assemble, --noassemble

Whether to assemble the ORIGEN library.

--check, --nocheck

Whether to check the generated library.

--report, --noreport

Whether to create the report documentation.

-j, --nprocs <nprocs>

How many processes to use.

Arguments

config.olm.json

Required argument

Usage

Create a reactor library locally at uox_quick/_work/arpdata.txt.


$ olm init --variant triton_pin_uox_quick uox_quick
$ olm create -j6 uox_quick/config.olm.json

olm install

Install ORIGEN reactor libraries!

After creating a new ORIGEN reactor library, this command installs it to a dest on the file system. After this, the work directory can be deleted.

olm install [OPTIONS] [WORK_DIR]

Options

-d, --dest <dest>

Destination for the installation (defaults to $HOME/.olm).

-o, --overwrite

Allow overwriting of destination files.

Arguments

WORK_DIR

Optional argument

Usage

Install a reactor library to $HOME/.olm after using olm create.


$ olm install --overwrite uox_quick/_work
$ export SCALE_OLM_PATH=$HOME/.olm

olm check

Run a sequence of checks on ORIGEN archives.

olm check [OPTIONS] ARCHIVE_FILE

Options

-o, --output <my.arc.h5>

Output file where results are written.

-s, --sequence <'{"_type": "NAME", <OPTS>}'>

Run checking method NAME with options OPTS in JSON string format. The following checks are supported.

NAME=GridGradient, with <OPTS>
eps0 - minimum value (1e-20)
epsa - absolute epsilon (0.1)
epsr - relative epsilon (0.1)
target_q_ar - target for absolute-relative quality score (0.7)
target_q_r - target for relative quality score (0.5)
-j, --nprocs <INT>

How many processes to use.

Arguments

ARCHIVE_FILE

Required argument

Usage

Check a reactor library for quality.


$ olm init --variant triton_pin_uox_quick uox_quick
$ olm check -j6 -s '{"_type": "GridGradient", "eps0": 1e-6}' data/w17x17.arc.h5
$ cat check.json    # Default output file.