PSCF v1.3.1
|
Parameter Files (Prev) Examples (Next)
For any PSCF simulation program, the parameter file is read first, followed by a command file. The name of the command file is specified when the program is invoked as an argument of the -c command line option.
The command file contains a sequence of commands that are read and executed in the order in which they appear in the file. Each command begins with a command name that is given in upper case letters. Some commands take one or more parameters, which must appear after the command name, separated by whitespace. The program stops execution and returns control to the operating system when it encounters the command name 'FINISH' on a line by itself.
Full descriptions of all of the commands recognized by all three PSCF programs are given here.
Suppose that pscf_pc is used to perform an SCFT calculation periodic structure of known space group symmetry, and is invoked from a directory that contains a parameter file named "param" and a command file named "command", using the command
Suppose also that the working directory has subdirectories named "in" and "out", such that the "in" directory contains an initial w-field file named w.bf, while output files are all written to the "out" directory. An example of a minimal command file that could be used for this purpose is shown below:
This file would work equally well as input to the GPU accelerated pscf_pg program, which accepts the same set of commands as pscf_pc. This command file instructs the program to perform the following actions:
The FINISH command is always the last command that is read in a command file, and causes execution of the program to halt.
In this example, w-fields are both read and written in basis format, using the commands READ_W_BASIS_and WRITE_W_BASIS. This is typical for SCFT calculations that are performed on a single unit cell of a structure of user-specified space group symmetry. The final monomer concentration fields have, however, been written in r-grid format, using the command WRITE_C_RGRID. Use of r-grid format for the c fields allows the resulting file to be used as an input to the POLYMER VISUAL program to allow visualization of the structure.
Many commands require the names of input or output files as arguments. By default, file names are interpreted as paths that are defined relative to the current working directory, i.e., relative to the directory from which the program executable was invoked. File name paths may that appear in the command file may include names of subdirectories of this directory and path separator slash characters, as done in the above example.
This default behavior may, however, be modified by using the "-i" and "-o" command line options to automatically add prefixes to paths for input and output files.
Example (revisited) : The command file in the above example was designed for a case in which pscf_pc or pscf_pg is invoked without using the -i or -o command line options. Suppose that the program had instead been invoked using these options to specify prefixes of "in/" and "out/", e.g., as
The corresponding command file would then have been written in a form
in which the names of the input and output files that appear in the command file do not include explicit "in/" and "out/" directory names. In this case, the prefix "in/" is instead automatically prepended to the name given for any input file in the parameter or command file, while the prefix "out/" is prepended to the name of any output file. Note that, if a prefix is used to specify a subdirectory in which files are located, as in this example, then the prefix string must include a trailing backlash character. The input and output prefixes defined by the -i and -o command line options are not, however, applied to the names of the parameter and command file that are specified by the -p and -o command line options.
Parameter Files (Prev) User Introduction (Up) Examples (Next)