LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Common Command-Line Options for Tools

Many LOOS tools use a common set of command-line options (through the OptionsFramework ). These options are organized into groups that tend to be used together. Not all tools will support all options. Options may also appear in two forms: a "long" form where the option is written out following two hyphens, or a "short" form that is a single character following a single hyphen. An option may also have a value associated with it, and it can be assigned either using an equals sign, e.g. --verbosity=3, or by just following the option with a space (optional with the short forms), e.g. --verbosity 3. Additionally, some options are "boolean" in that they turn on or off specific behavior. These options are turned on by assigning a 1 (true) to it, or a 0 (false), for example, --brief=1 turns on brief output.

Common Options

Long Name Short Name Description

Example

--fullhelp Give a lot more information about how the tool works and how to use it.

--fullhelp

--prefix -p Sets the prefix for files written out by the tool.

-p sim1

--verbosity -v Sets the output/logging level of a tool. Higher numbers means more verbose output.

-v 3

--selection -s Select atoms for the tool to operate on

-s backbone

--modeltype Specify the type of model file being used. LOOS will automatically assign a file-type based on the suffix for a filename (e.g. pdb, psf, ...). If you use a different convention, you may need to manually tell the tool what kind of file you are using. The tool's --fullhelp output will available types.

--modeltype pdb

--trajtype Specify the type of trajectory file being used. LOOS will automatically assign a file-type based on the suffix for a filename (e.g. dcd, xtc, ...). If you use a different convention, you may need to manually tell the tool what kind of file you are using. The tool's --fullhelp output will available types.

--trajtype dcd

--outtrajtype Specify the type of trajectory file being written. LOOS will automatically assign a file-type based on the suffix for a filename (e.g. dcd, xtc, ...). If you use a different convention, you may need to manually tell the tool what kind of file you are using. The tool's --fullhelp output will available types.

--trajtype xtc

--skip -k Skip the first N frames of the trajectory (or trajectories)

-k 50

--stride -i Read every ith frame from the trajectory (or trajectories)

-i 10

--range -r Specifies a range-list of frames to operate on from a trajectory. See below for more details. -r 50:10:

Specifying Ranges

The range option (through parseIndexRange() ) in LOOS tools is a versatile method of picking exactly what frames from a trajectory (or MultiTrajectory) you want the tool to use. A range-spec can be a frame number, a range of frames, or a range of frames with a stride. A range-spec can also be list of range-specs separated by commas. So, you can pick a single frame by giving the frame number. For example,

foo -r 9 model.pdb sim.dcd

foo will only use the 10th frame from sim.dcd. Remember, frame numbers are 0-based! Similarly,

foo -r 0,1,2,3,4 model.pdb sim.dcd

foo will only use the first 5 frames. Literal ranges of frames can be specified using an octave/matlab-like syntax of start:stop (inclusive),

foo -r 0:99 model.pdb sim.dcd

foo will use the first 100 frames, while

foo -r 100:199 model.pdb sim.dcd

will skip the first 100 frames, and use the next 100 frames.

A stride can also be given with the syntax of start:stride:stop,

foo -r 10:2:99 model.pdb sim.dcd

foo will now skip the first 10 frames, then take every other frame through the 100th frame.

You do not need to know how long a trajectory is in order to use the range notation to specify a skip and a stride (this was not true in older versions of LOOS). Simply leave off the end,

foo -r 10: model.pdb sim.dcd

Will use all but the first 10 frames of the trajectory. Note that you must have a colon after the number, otherwise you will be telling use to use only frame index 10 (i.e. the 11th frame).

You can also set a stride without knowing how long a trajectory is,

foo -r 10:2: model.pdb sim.dcd

Here, the first 10 frames a skipped and then every other frame is used for the rest of the trajectory.