1 What is PWTK
PWTK stands for PWSCF TOOLKIT.
PWTK is a Tcl scripting interface for Quantum ESPRESSO, aiming at providing a flexible and productive framework.
With PWTK, one can automate calculations and glue together different computational tasks, where outputs of preceding calculations serve as inputs for subsequent calculations.
(PWTK, standing for PWscf ToolKit, got its name from the consideration that it initially supported only the PWscf subset of Quantum ESPRESSO programs. Moreover, the name “Quantum ESPRESSO” did not yet exist at the time the PWTK project was initiated.)
2 Simple example
Here is a simple example: a comparison between the pw.x input file and the corresponding PWTK script.
pw.x input file: scf.si.in | PWTK script file: si.pwtk |
&CONTROL calculation = 'scf' outdir = 'Si_example/' pseudo_dir = '/home/tone/pw/pseudo/' / &SYSTEM ibrav = 2 celldm(1) = 10.2 nat = 2 ntyp = 1 ecutwfc = 18.0 ecutrho = 72.0 / &ELECTRONS conv_thr = 1d-7 / ATOMIC_SPECIES Si 1.00 Si.vbc ATOMIC_POSITIONS alat Si 0.00 0.00 0.00 Si 0.25 0.25 0.25 K_POINTS automatic 4 4 4 1 1 1 |
CONTROL { calculation = 'scf' outdir = 'Si_example/' pseudo_dir = '/home/tone/pw/pseudo/' } SYSTEM { ibrav = 2 celldm(1) = 10.2 nat = 2 ntyp = 1 ecutwfc = 18.0 ecutrho = 4*18.0 } ELECTRONS { conv_thr = 1d-7 } ATOMIC_SPECIES { Si 1.00 Si.vbc } ATOMIC_POSITIONS alat { Si 0.0 0.0 0.0 Si 1/4 1/4 1/4 } K_POINTS automatic { 4 4 4 1 1 1 } runPW scf.si.in |
This calculation is run as: | This calculation is run as: |
pw.x < scf.si.in > scf.si.out & |
pwtk si.pwtk > si.log & |
The syntax of the PWTK scripts is similar to QE input file, but notice that both Fortran namelists (e.g. &CONTROL) and cards (e.g. ATOMIC_SPECIES) are enclosed with curly braces (e.g. CONTROL { ... }).
The last line of the above PWTK script, runPW scf.si.in, requests the pw.x calculation. Upon execution, PWTK will:
- construct the scf.si.in input file (the output will be written to scf.si.out),
- create the outdir temporary directory if the directory does not exist
- run the pw.x calculation.
At a simplistic level of the above example, there is no advantage of using PWTK, but the advantage becomes evident once multiple calculations are performed (see example 1.5).
For detailed information check this link PWTK
How to install required Tcl packages in GNU/Linux
For Debian-based linux distros:
sudo apt install tcl tcllib tcl-tclreadline
tcl-thread
3 Downloading
Version 3.2
(Release date: 11 November 2024, release notes)
- pwtk-3.2.tar.gz (3.3M)
QE-emacs modes
To make the writing of PWTK scripts a bit easier, consider installing QE-emacs-modes.
- QE-modes-7.4.tar.gz (544K)
- QE-modes-7.3.1.tar.gz (532K)
4 Installing
No compilation is required. Just download and untar the
tarball, and add the location of the PWTK package (its root directory) to your
PATH
.
You can also download the package using the following command
$ wget http://pwtk.ijs.si/download/pwtk-3.0.tar.gz
$ sudo tar zxvf pwtk-3.0.tar.gz
Then open the ~/.bashrc
file with editor (say
emacs
) and add the following snippet:
export PATH=/home/alkhawarizmi/abinitio/pwtk-3.2:$PATH
References:
http://www-k3.ijs.si/kokalj/internal/pwtk-3.0rc12/doc/tutorial.html
0 Comments