PP User Guide
PP User Guide
PP User Guide
0)
Contents
1 Introduction 1
3 Compilation 3
4 Usage 3
4.1 Plotting selected quantities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4.2 About Bader’s analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.3 Band structure, Fermi surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.4 Projection over atomic states, DOS, projected band structure . . . . . . . . . . 4
4.5 Color plot of the Fermi velocity and the orbital character on Fermi surfaces . . . 5
4.6 Wannier functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.7 Interfaces to/from other code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.8 Other tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
5 Troubleshooting 7
1 Introduction
This guide covers the usage of PostProc, version 7.0: an open-source package for postprocessing
of data produced by PWscf and CP.
This guide assumes that you know the physics that PostProc describes and the methods it
implements. It also assumes that you have already installed, or know how to install, Quantum
ESPRESSO. If not, please read the general User’s Guide for Quantum ESPRESSO, found
in subdirectory Doc/ of the main Quantum ESPRESSO directory, or consult the web site:
http://www.quantum-espresso.org.
Further documentation, beyond what is provided in this guide, can be found in the direc-
tory PP/Doc/, containing a copy of this guide. People who want to contribute to Quantum
ESPRESSO should read the Wiki pages on GitLab: https://gitlab.com/QEF/q-e/-/wikis.
1
2 People and terms of use
The PostProc package was originally developed by Stefano Baroni, Stefano de Gironcoli, An-
drea Dal Corso (SISSA), Paolo Giannozzi (Univ. Udine), and many others. We mention in
particular:
Dong Yang and Qin Liu (JSG) for calculation of DORI (10.1021/ct500490b) and for
spin-polarized ELF;
Minsu Ghim (Seoul National U.) for Ji Hoon Ryoo’s spin-current matrix elements (Phys.
Rev. B 99, 235113) for spin Hall conductivity using Wannier interpolation, in pw2wannier.f90;
Yang Jiao, Elsebeth Schröder, Per Hyldgaard (Chalmers) for the ppacf.x code;
Olivia Pulci, Adriano Mosca Conte, Davide Grassano (RomaII) for the pw2gw utility;
Cyrille Barreteau and Alexander Smogunov (CEA) for magnetic anisotropy with the Force
Theorem in projwfc.f90;
Andrea Benassi (SISSA) for the epsilon utility, Tae Yun Kim and Cheol-Hwan Park
(Seoul National University) for fixes to it;
Dmitry Korotin (Inst. Met. Phys. Ekaterinburg) for the wannier ham utility;
Georgy Samsonidze (Bosch Research) for the interface with the Berkeley GW code,
Fangzhou Zhao (Berkeley) for its extension to hybrid and meta-GGA functionals;
The late Prof. Eyvaz Isaev for the Fermi Surface code;
Takashi Koretsune and Florian Thoele (ETHZ) for noncollinear magnetisation support
with USPP and PAW pseudopotentials in code pw2wannier.f90.
PostProc is free software, released under the GNU General Public License. See:
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt, or the file License in the distri-
bution).
We shall greatly appreciate if scientific work done using the Quantum ESPRESSO dis-
tribution will contain an acknowledgment to the following references:
2
and
P. Giannozzi, O. Andreussi, T. Brumme, O. Bunau, M. Buongiorno Nardelli, M.
Calandra, R. Car, C. Cavazzoni, D. Ceresoli, M. Cococcioni, N. Colonna, I. Carn-
imeo, A. Dal Corso, S. de Gironcoli, P. Delugas, R. A. DiStasio Jr, A. Ferretti, A.
Floris, G. Fratesi, G. Fugallo, R. Gebauer, U. Gerstmann, F. Giustino, T. Gorni, J
Jia, M. Kawamura, H.-Y. Ko, A. Kokalj, E. Küçükbenli, M .Lazzeri, M. Marsili, N.
Marzari, F. Mauri, N. L. Nguyen, H.-V. Nguyen, A. Otero-de-la-Roza, L. Paulatto,
S. Poncé, D. Rocca, R. Sabatini, B. Santra, M. Schlipf, A. P. Seitsonen, A. Smo-
gunov, I. Timrov, T. Thonhauser, P. Umari, N. Vast, X. Wu, S. Baroni, J.Phys.:
Condens.Matter 29, 465901 (2017)
Users of the GPU-enabled version should also cite the following paper:
P. Giannozzi, O. Baseggio, P. Bonfà, D. Brunato, R. Car, I. Carnimeo, C. Cavazzoni,
S. de Gironcoli, P. Delugas, F. Ferrari Ruffino, A. Ferretti, N. Marzari, I. Timrov,
A. Urru, S. Baroni, J. Chem. Phys. 152, 154105 (2020)
Note the form Quantum ESPRESSO for textual citations of the code. Please also see
package-specific documentation for further recommended citations. Pseudopotentials should
be cited as (for instance)
[ ] We used the pseudopotentials C.pbe-rrjkus.UPF and O.pbe-vbc.UPF from
http://www.quantum-espresso.org.
3 Compilation
PostProc is part of the Quantum ESPRESSO distribution and depends upon PWscf for com-
pilation. For instruction on how to download and compile Quantum ESPRESSO, please refer
to the general Users’ Guide, available in file Doc/user guide.pdf under the main Quantum
ESPRESSO directory, or in web site http://www.quantum-espresso.org.
Once Quantum ESPRESSO is correctly configured, PostProc can be compiled by just
typing make pp, from the main Quantum ESPRESSO directory; or typing make from the
PP/ subdirectory. Several executable codes are produced in PP/bin and linked to bin/.
4 Usage
All codes for which input documentation is not explicitly mentioned below have some documen-
tation in the header of the fortran sources. In the following, subdirectories containing examples
are found in PP/examples/; “Example N” stands for subdirectory PP/examples/exampleN/.
All quantities whose dimensions are not explicitly specified are in RYDBERG ATOMIC
UNITS. Charge is ”number” charge (i.e. not multiplied by e); potentials are in energy units
(i.e. they are multiplied by e).
3
Quantities that can be read or calculated are:
charge density
spin polarization
various potentials
local density of states at EF
local density of electronic entropy
STM images
selected squared wavefunction
ELF (electron localization function)
RDG (reduced density gradient)
integrated local density of states
Various types of plotting (along a line, on a plane, three-dimensional, polar) and output formats
(including the popular cube format) can be specified. Moreover data can be saved to an
intermediate (formatted) file so that more data sets can be summed or subracted in a later
run. The output files can be directly read by the free plotting system Gnuplot (1D or 2D
plots), or by code plotrho.x that comes with PostProc and produces PostScript 2D plots, or
by advanced plotting software XCrySDen (3D plots).
See file PP/Doc/INPUT PP.* for a detailed description of the input for code pp.x. See
Example 01 for an example of a charge density plot, Example 03 for an example of STM image
simulation.
Planar averages Code plan avg.x calculates planar averages of Kohn-Sham orbitals. Input
documentation is in the header ofPP/src/plan avg.f90.
Code average.x calculates planar averages of quantities produced by pp.x (e.g. potentials,
charge, magnetization densities). Note that average.x reads the intermediate file produced
by pp.x, not data files produced by pw.x. Examples of usage of average.x can be found in
PP/examples/WorkFct example/ and in PP/examples/dipole example/.
All-electron charge pawplot.x produces plots of the all-electron charge for PAW calcula-
tions. Input documentation in the header of PP/src/pawplot.f90.
4
4.3 Band structure, Fermi surface
The code bands.x reads data file(s), extracts eigenvalues, regroups them into bands (the algo-
rithm used to order bands and to resolve crossings may not work in all circumstances, though).
The output is written to a file in a simple format that can be directly read and converted to
plottable format by auxiliary code plotband.x. Unpredictable plots may results if k-points
are not in sequence along lines, or if two consecutive points are the same. The code bands.x
performs as well a symmetry analysis of the band structure. For a complete input description,
see Doc/INPUT bands.*. See Example 01, Example 04 and Example 06 for simple band plots.
The plotting of Fermi surfaces can be performed using code fs.x. The resulting file in .bxsf
format can be read and plotted using XCrySDen. See Example 02 for an example of Fermi
surface visualization (Ni, including the spin-polarized case).
4.5 Color plot of the Fermi velocity and the orbital character on
Fermi surfaces
You can plot any quantity on Fermi surfaces as a color plot by using fermisurfer program1 .
fermi_velocity.x and fermi_proj.x are used to generate an input file for fermisurfer from
the output of pw.xor projwfc.x.
fermi_velocity.x generates a color-plot of Fermi velocity. You use it as follows:
1
http://osdn.jp/projects/fermisurfer/
5
1. Run pw.xwith K_POINT automatic.
2. Run
3. vfermi.frmsf is generated
fermi_proj.x generates a color plot of an orbital character. You use it as follows:
1. Run pw.xwith K_POINT automatic.
2. Run projwfc.x just to generate {prefix}.save/atomic_proj.*.
3. Run
&PROJWFC
{The same as the input of projwfc.x}
/
{Number of target wavefunctions}
{Index of target WFC1} {Index of target WFC2} {Index of target WFC3} ...
Pntarget
It generates i=1 |hϕatom 2
target(i) |ϕnk i| , where ns and target(i) are the number of the target
wavefunctions and the indices of target wavefunctions, respectively.
4. The above quantity is written into "proj.frmsf", which can be read by FermiSurfer
program.
There is an example of fermi_velocity.x and fermi_proj.x in fermisurf_example/.
6
4.7 Interfaces to/from other code
Codes pw2bgw.x convert data files from pw.x to a format suitable for usage by the Berkeley GW
code. See file Doc/INPUT pw2bgw.* for input data documentation. Code bgw2pw.x, performing
the inverse conversion, no longer works: a copy that worked for the old file format is kept for
reference in bgw2pw.f90.orig.
Code pw2gw.x converts data files from pw.x to a format suitable for usage by another
GW code, computes optical properties in single-particle approach (Fermi Golden Rule). See
file Doc/INPUT pw2gw.html for input data documentation, directory pw2gw example/ for an
example of usage.
Code open grid.x writes Kohn-Sham orbitals for the complete k-point grid (not symmetry-
independent points only) in real space. Useful for further processing. It can be used to generate
the Kohn-Sham state data required in pw2wannier.x and Wannier90 from the initial SCF
calculation, bypassing the non-SCF calculation step.
Code pw2critic.x is an interface to the CRITIC2 code by Alberto Otero-de-la-Roza. This
program creates a pwc file containing the Kohn-Sham orbitals from an SCF calculation (or from
the output of open grid.x). These orbitals are used for post-processing in CRITIC2.
Code pw export.f90 no longer works and is no longer present.
Core-level shifts Code initial state.x calculates the initial state contribution to the
Core-level shift. See CLS IS example/ for an example, and CLS FS example/ for the corre-
sponding final state calculation of Core-level shifts.
5 Troubleshooting
Almost all problems in Quantum ESPRESSO arise from incorrect input data and result in
error stops. Error messages should be self-explanatory, but unfortunately this is not always
true. If the code issues a warning messages and continues, pay attention to it but do not assume
that something is necessarily wrong in your calculation: most warning messages signal harmless
problems.
7
Some postprocessing codes complain that they do not find some files Most likely
you are not reading the correct data files, or you are not following the correct procedure for
postprocessing.
For Linux PC clusters in parallel execution: in at least some versions of MPICH, the current
directory is set to the directory where the executable code resides, instead of being set to the
directory where the code is executed. This MPICH weirdness may cause unexpected failures
in some postprocessing codes that expect a data file in the current directory. Workaround: use
symbolic links, or copy the executable to the current directory.