pyMolDyn CLI Tutorial



Step 1: Creating a batch file

To compute cavities without using a graphical frontend, you can use the pyMolDyn command line interface. You need to create a batch file, consisting of a list of parameters and XYZ files for which the program should compute the cavities.

Such a batch file has the following format:

    RESOLUTION resolution
    ATOM_RADIUS radius  /  ATOM_RADII (followed by indented lines with the format "ELEMENT RADIUS")
    OUTPUT_DIRECTORY directory
    file-01.xyz
    file-02.xyz frame frame ...
.
.
.

RESOLUTION, ATOM_RADIUS and OUTPUT_DIRECTORY are optional and are overridden by the command line options (see step 2). OUTPUT_DIRECTORY can contain one or more asterisks. These are replaced with the subdirectory name(s) containing the input files.

Note: Because the cutoff radius is stored in the global configuration, it cannot yet be specified per calculation. Therefore the ATOM_RADIUS can only be specified on the command line.

Step 2: Running pyMolDyn

After installing pyMolDyn, use

% pymoldyn --batch <options> <filename>

to process a batch file. To configure the computation and output, you can pass the following options to pymoldyn:

  • -a ATOM_RADIUS, --atomradius=ATOM_RADIUS: Set the cut off radius
  • -r RESOLUTION, --resolution=RESOLUTION: Set the vacancy resolution
  • -o OUTPUT_DIRECTORY, --output_directory=OUTPUT_DIRECTORY: Set the directory to store the results in
  • --maxcachefiles=MAX_CACHEFILES: Set the maximum number of cached files
  • --nocenterbasedcavities: Center based cavities are not calculated
  • --nosurfacebasedcavities: Surface based cavities are not calculated
  • --nohdf5export: No HDF5 files with results are created
  • --notextexport: No text files with results are created
  • -q, --quiet: Less progress information is printed

Additionally, you can use pymoldyn --batch --help to display a help message.

Step 3: Use the GUI to view the results (optional)

While the text exports might be adequate, the graphical user interface can be used to view the results of the calculation. Move the resulting HDF5 files to the pyMolDyn result directory (set in the pyMolDyn GUI preferences, usually ~/.pymoldyn/results), then follow the pyMolDyn GUI tutorial.