@@ -28,8 +28,8 @@ to develop plugins for the CLI, see its documentation. The CLI subcommands
2828are defined through a plugin system, which makes it very easy for developers
2929to create new subcommands.
3030
31- * CLI documentation:
32- * CLI code repository:
31+ * CLI documentation: https://openpathsampling-cli.readthedocs.io/
32+ * CLI code repository: https://github.com/openpathsampling/openpathsampling-cli/
3333
3434Workflow with the CLI
3535---------------------
@@ -41,6 +41,76 @@ files.
4141
4242To use it, you'll want to first set up
4343
44+
45+ Finding your way around the CLI
46+ -------------------------------
47+
48+ Like many command line tools, the OPS CLI has the options ``-h `` or
49+ ``--help `` to get help. If you run ``openpathsampling --help `` you should
50+ see something like this::
51+
52+ Usage: openpathsampling [OPTIONS] COMMAND [ARGS]...
53+
54+ OpenPathSampling is a Python library for path sampling simulations. This
55+ command line tool facilitates common tasks when working with
56+ OpenPathSampling. To use it, use one of the subcommands below. For
57+ example, you can get more information about the pathsampling tool with:
58+
59+ openpathsampling pathsampling --help
60+
61+ Options:
62+ --log PATH logging configuration file
63+ -h, --help Show this message and exit.
64+
65+ Simulation Commands:
66+ visit-all Run MD to generate initial trajectories
67+ equilibrate Run equilibration for path sampling
68+ pathsampling Run any path sampling simulation, including TIS variants
69+
70+ Miscellaneous Commands:
71+ contents list named objects from an OPS .nc file
72+ append add objects from INPUT_FILE to another file
73+
74+ The ``--log `` option takes a logging configuration file (e.g., `logging.conf
75+ <> `_, and sets that logging behavior. If you use it, it must come before the
76+ subcommand name.
77+
78+ You can find out more about each subcommand by putting ``--help `` *after *
79+ the subcommand name, e.g., ``openpathsampling pathsampling --help ``, which
80+ returns::
81+
82+ Usage: openpathsampling pathsampling [OPTIONS] INPUT_FILE
83+
84+ General path sampling, using setup in INPUT_FILE
85+
86+ Options:
87+ -o, --output-file PATH output ncfile [required]
88+ -m, --scheme TEXT identifier for the move scheme
89+ -t, --init-conds TEXT identifier for initial conditions (sample set or
90+ trajectory)
91+ -n, --nsteps INTEGER number of Monte Carlo trials to run
92+ -h, --help Show this message and exit.
93+
94+ Here you see the list of the options for the running a path sampling
95+ simulation. In general, path sampling requires an output
96+ file, a move scheme and initial conditions from some input file, and the
97+ number of steps to run. Note that only the output file is technically
98+ required: the CLI will default to running 0 steps (essentially, testing the
99+ validity of your setup), and it can try to guess the move scheme and initial
100+ conditions. In general, the way it guesses follows the following path:
101+
102+ 1. If there is only one object of the suitable type in the INPUT_FILE, use
103+ that.
104+ 2. If there are multiple objects of the correct type, but only one has a
105+ name, use the named object.
106+ 3. In special cases it looks for specific names, such as
107+ ``initial_conditions ``, and will use those.
108+
109+ Full details on how various CLI parameters search the storage can be seen in
110+ the `Parameter Interpretation
111+ <https://openpathsampling-cli.readthedocs.io/en/latest/interpretation.html> `_
112+ section of the CLI docs.
113+
44114Simulation Commands
45115-------------------
46116
@@ -68,9 +138,6 @@ Here are some of the simulation commands implemented in the OPS CLI:
68138 have been visited (works for MSTIS or any 2-state system); must provide
69139 states, engine, and initial snapshot on command line
70140
71- .. TODO figure showing how these all work -- what is needed for each, what
72- is implicit
73-
74141Miscellaneous Commands
75142----------------------
76143
@@ -79,10 +146,29 @@ foregoing the CLI tools to run simulations, some of the "miscellaneous"
79146commands are likely to be quite useful. Here are some that are available in
80147the CLI:
81148
82- * ``nclist ``: list all the named objects in an OPS storage, organized by
149+ * ``contents ``: list all the named objects in an OPS storage, organized by
83150 store (type); this is extremely useful to get the name of an object to use
84- as command-line input to one of the simulation scripts
85- * ``strip-snapshots ``: create a copy of the input storage file with the
151+
152+
153+ .. * ``strip-snapshots``: create a copy of the input storage file with the
86154 details (coordinates/velocities) of all snapshots removed; this allows you
87155 to make a much smaller copy (with results of CVs) to copy back to a local
88156 computer for analysis
157+
158+ * ``append `` : add an object from once OPS storage into another one; this is
159+ useful for getting everything into a single file before running a
160+ simulation
161+
162+ Customizing the CLI
163+ -------------------
164+
165+ The OPS CLI uses a flexible plugin system to enable users to easily add
166+ custom functionality. This way, you can create and distribute custom
167+ plugins, giving more functionality to other users who would benefit from it,
168+ without adding everything to the core package and thus overwhelming new
169+ users.
170+
171+ Installing a plugin is easy: just create the directory
172+ ``$HOME/.openpathsampling/cli-plugins/ ``, and copy the plugin Python script
173+ into there. For details on how to write a CLI plugin, see the `CLI
174+ development docs <https://openpathsampling-cli.readthedocs.io/> `_.
0 commit comments