Built-in Parameters

The OpenPathSampling CLI comes with a number of parameters (i.e., options and arguments) that can be passed to your commands. Be very shy about adding new parameters; in general, it is best to re-use the parameters that already exist. This is because re-using these parameters provides important consistency in the user experience.

Here are the parameters that are pre-defined in the parameters.py file:

Built-In CLI Parameters

Parameter

Flags

get arguments

Help

APPEND_FILE

-a, --append-file

name

file to append to

CVS

--cv

storage, name

name of CV; may be used more than once

ENGINE

-e, --engine

storage, name

identifer for the engine

INIT_CONDS

-t, --init-conds

storage, name

identifier for initial conditions (sample set or trajectory); may be used more than once

INIT_SNAP

-f, --init-frame

storage, name

identifier for initial snapshot

INPUT_FILE

input_file

name

MULTI_CV

--cv

storage, name

name of CV; may be used more than once

MULTI_ENGINE

--engine

storage, name

name or index of engine; may be used more than once

MULTI_ENSEMBLE

--ensemble

storage, name

name of index of ensemble; may be used more than once

MULTI_NETWORK

--network

storage, name

name or index of network; may be used more than once

MULTI_SCHEME

--scheme

storage, name

name or index of move scheme; may be used more than once

MULTI_TAG

--tag

storage, name

tag for object; may be used more than once

MULTI_VOLUME

--volume

storage, name

name or index of volume; may be used more than once

N_STEPS_MC

-n, --nsteps

No get function

number of Monte Carlo trials to run

OUTPUT_FILE

-o, --output-file

name

output ncfile

SCHEME

-m, --scheme

storage, name

identifier for the move scheme

STATES

-s, --state

storage, name

name of state; may be used more than once

If you need a parameter that isn’t in that list, it could either be:

  • a one-off for just your command: just use click.

  • something to be reused: your should make an instance of a subclass of AbstractLoader, or duck-type something that behaves the same way. You need a method MYPARAMTER.clicked() that takes the an argument required and creates the click decorator, as well as a method get that extracts the correct form of the parameter you need.