TABLE OF CONTENTS
2.3 Defining Programs and Directories
DESCRIPTION
- Commands for specifying and manipulating outdir
- Commands for specifying and manipulating wfcdir
- Commands for specifying directories for pseudo-potential files and QE executables
- Command for querying QE executables before their execution
- Commands for explicit definition of how to run executables (prefix and postfix)
- Commands for explicit definition of executables
List of user commands for specifying the Quantum ESPRESSO executables and directories such as outdir and pseudo_dir.
This commands are typically used in the PWTK's configuration file (~/.pwtk/pwtk.tcl). The lists provided below are in the following form:
user_command => Tcl proc that provides the command
To see the explanation of a given user_command, click on the corresponding Tcl proc. All the below commands use the following syntax:
command value
where command is the name of the command and value is its argument.
Commands for specifying and manipulating outdir
As a convenience there is a set of outdir-related commands. The use of outdir command is equivalent to CONTROL { outdir = '/path/to/outdir' }, but the use of outdir command is more convenient. Even more flexible is the use of outdir_prefix and outdir_postfix pair of commands; outdir is then set to outdir_prefix/outdir_postfix. For example, outdir_prefix can be defined globally (in ~/.pwtk/pwtk.tcl file) as:
outdir_prefix /scratch/$env(USER)/QE
and then in PWTK scripts only outdir_postfix can be used to define the subdirectory of outdir_prefix to be used for outdir.
Here is a list of outdir-related commands:
* outdir => ::pwtk::outdir * outdir_prefix => ::pwtk::outdir_prefix * outdir_postfix => ::pwtk::outdir_postfix * outdir_clean => ::pwtk::outdir_clean (BEWARE: dangerous routine)
Example:
outdir /tmp
Note: if outdir is explicitly defined in a namelist, then it has the precedence over the value defined by the outdir command.
Commands for specifying and manipulating wfcdir
The wfcdir set of commands works analogously to the the outdir set of commands:
* wfcdir => ::pwtk::wfcdir * wfcdir_prefix => ::pwtk::wfcdir_prefix * wfcdir_postfix => ::pwtk::wfcdir_postfix * wfcdir_clean => ::pwtk::wfcdir_clean (BEWARE: dangerous routine)
Note: wfcdir behaves similarly as outdir. However, PWTK also checks for ESPRESSO_WFCDIR enviromental variable (not that QE only uses the ESPRESSO_TMPDIR variable) and if this variable is defined it will use its value when wfcdir is undefined otherwise.
Commands for specifying directories for pseudo-potential files and QE executables
* pseudo_dir => ::pwtk::pseudo_dir * bin_dir => ::pwtk::bin_dir
By specifying the bin_dir, the Quantum-ESPRESSO executables are run as bin_dir/prog.x, where bin_dir is the directory where the executables are located, while prog.x is the name of the program (e.g. pw.x, pp.x, ph.x, ...).
Command for querying QE executables before their execution
* bin_query => ::pwtk::bin_query
Example:
bin_query ON
or
bin_query OFF
where the first form enables and the second form disables the querying of existence of QE executables and their executable status before their execution. Typically, it is good to query, hence this is the default.
A specific case where querying should be disabled is when using QE executables from a container (e.g. singularity container).
Commands for explicit definition of how to run executables, i.e., prefix and postfix
* prefix => ::pwtk::prefix * postfix => ::pwtk::postfix
Note that executables are run by PWTK as: prefix program.x postfix -in input > output
Example:
prefix mpirun -np 8 postfix -nk 4
Commands for explicit definition of executables
It is usually sufficient to define only the bin_dir directory (see above) and PWTK will then run executables as bin_dir/prog.x. Nevertheless, it is also possible to explicitly specify each particular executable and then for the so defined executable, PWTK will run it accordingly. Here is a list of commands for explicit definition of each particular PWTK-supported executable:
* pw => ::pwtk::pw * cp => ::pwtk::cp * neb => ::pwtk::neb * pp => ::pwtk::pp * projwfc => ::pwtk::projwfc * dos => ::pwtk::dos * bands => ::pwtk::bands * molecularpdos => ::pwtk::molecularpdos * ph => ::pwtk::ph * dynmat => ::pwtk::dynmat * matdyn => ::pwtk::matdyn * q2r => ::pwtk::q2r * hp => ::pwtk::hp * turbo_davidson => ::pwtk::turbo_davidson * turbo_lanczos => ::pwtk::turbo_lanczos * turbo_eels => ::pwtk::turbo_eels * turbo_spectrum => ::pwtk::turbo_spectrum
Example:
pw /full/path/to/pw.x
By this call the pw.x is explicitly defined as /full/path/to/pw.x