Skip to content

Command Line Interface

Jasmin B. Maglic edited this page Mar 10, 2022 · 3 revisions

MoloVol provides a command line interface (CLI). The CLI allows users to use MoloVol from the command line and can be used to automate workflows, conduct many calculations in succession, and communicate with other programs.

Examples shown on this page work on Mac, but syntax may differ slightly between operating systems.

Operating the CLI

The CLI can be "enabled" simply by calling the executable file from the command line, followed by any switch. To verify that the CLI is working you can, for instance, simply use the --version switch:

$ MoloVol --version

If the output displays the version, then the CLI works as intended. Each switch has a verbose and a short name. The verbose switch is preceded by two dash symbols, while the short name is preceded by one. The --version switch can therefore also be called like this:

$ MoloVol -v

To run a calculation three arguments are required at least: Probe radius -r, grid resolution -g, and structure file fs. An example command would look as such:

$ MoloVol -r 1.2 -g 0.2 -fs ./inputfiles/exampleC60.xyz

All file path arguments can be either absolute or relative to the place where the command is run. In the above case a relative path is used. All valid command line switches are listed in the table below.

Switch Verbose Description Argument
-h --help Display help for CLI none
-v --version Display the app version none
-r --radius (Small) probe radius Decimal number
-g --grid Spatial resolution of the underlying grid Integer
-fs --file-structure Path to the structure file Path
-fe --file-elements Path to the elements file Path
-do --dir-output Path to the directory output Path
-r2 --radius2 Large probe radius, also enables two-probe mode Decimal number
-d --depth Octree depth Integer
-ht --hetatm Include HETATM from pdb file none
-uc --unitcell Analyze unit cell none
-sf --surface Calculate surface areas none
-xr --export-report Export report (requires:-do) none
-xt --export-total Export total surface map (requires:-do) none
-xc --export-cavities Export surface maps for all cavities (requires:-do) none
-o --output Control what parts of the output to display (default:all) none
-q --quiet Silence progress resporting none
-un --unicode Allows unicode output (only works for some shells) none

Display options

You can suppress parts of the output. By default, the app will give updates on the calculation progress and display all results. If you would like to disable progress reporting you can use the --quiet switch. It is also possible to suppress parts, or all of the output by using the --output option followed by comma-separated arguments. For instance:

$ MoloVol -r 1.2 -g 0.2 -fs ./inputfiles/exampleC60.xyz -q -o time,vol

This command will only display the calculation time and the volume values. It is important to make sure that the list of arguments is only comma-separated, not separated by spaces.

A list of --output arguments is given in the table below. The bold entries group multiple options together.

Option Display
none Suppress all output
inputfile Display structure file path
resolution Display grid resolution
depth Display octree depth
radius_small Display (small) probe radius
radius_large Display large probe radius
input Display all user input parameters
hetatm Display "Include HETATM" option
unitcell Display "Analyze unit cell" option
probemode Display whether two-probe mode enabled
surface Display whether surface area calculation is enabled
options Display all binary user options
formula Display sum formula of molecule/structure
time Display calculation time
vol_vdw Display van der Waals volume
vol_inaccessible Display inaccessible volume
vol_core_s Display core volume of small probe
vol_shell_s Display shell volume of small probe
vol_core_l Display core volume of large probe
vol_shell_l Display shell volume of large probe
vol Display all volumes
surf_vdw Display van der Waals surface
surf_mol Display molecular surface
surf_excluded_s Display (small) probe excluded surface
surf_accessible_s Display (small) probe accessible surface
surf Display all surfaces
cavities Display cavity data
all Display all, default option
Clone this wiki locally