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.
olm init [OPTIONS] [CONFIG_DIR]
Options
- -a, --variant <variant>
Name of model variant.
- -l, --list
List all known variants and exit.
Arguments
- CONFIG_DIR
Optional argument
Usage
Choose from one of the variants when you pass the –list option.
$ olm init --list
By default creates a directory called mox_quick with the files.
$ olm init --variant mox_quick
olm create
Create ORIGEN reactor libraries!
The create command manages an entire ORIGEN reactor library creation sequence which goes through these stages.
generate the various inputs that cover the desired input space
run the inputs with SCALE and generate individual libraries for each point in space
assemble the individual libraries into an ORIGEN reactor library that can interpolate throughout the space
check the quality of the ORIGEN reactor library
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 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 link
Link custom ORIGEN reactor libraries to a SCALE calculation.
olm link [OPTIONS] NAME1 NAME2 ...
Options
- -p, --path <paths>
Path to prepend to SCALE_OLM_PATH.
- --env, --noenv
Whether to allow using the environment variable SCALE_OLM_PATH.
- -d, --dest <dest>
Destination directory (default: current).
- --show
Show all the known libraries.
- -o, --overwrite
Allow overwriting of destination files.
- --dry-run
Just emit commands without running them.
Arguments
- NAME1 NAME2 ...
Optional argument(s)
Usage
First create and install a reactor library to $HOME/.olm
$ olm init --variant uox_quick
$ olm create -j6 uox_quick/config.olm.json
$ olm install --overwrite uox_quick/_work
$ export SCALE_OLM_PATH=$HOME/.olm
In a SCALE input file, use a shell to link the library before the origami input. This will work with SCALE 6.2 and later:
=shell
olm link uox_quick
end
=origami
lib=[ uox_quick ]
...
end
With SCALE 6.3.2 and later, the SCALE_OLM_PATH is searched directly by ORIGAMI and the link is unnecessary.
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_q2 - target for quality score 2 (0.7)target_q1 - target for quality score 1 (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 uox_quick
$ olm check -j6 -s '{"_type": "GridGradient", "eps0": 1e-6}' data/w17x17.arc.h5
$ cat check.json # Default output file.