Keywords: user_guide

Next: 4.2 Band structure, Fermi Up: 4 Usage Previous: 4 Usage Contents
Subsections

- - 4.1.0.1 Planar averages
  - 4.1.0.2 All-electron charge
  - 4.1.0.3 About Bader's analysis

## 4.1 Plotting selected quantities

The main postprocessing code `pp.x` extracts the specified data from the data files produced by `PWscf` (`pw.x` executable) or `CP` (`cp.x` executable); prepares data for plotting by writing them into formats that can be read by several plotting programs.

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 set 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 and gOpenMol (3D plots).

See file `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.

#### 4.1.0.1 Planar averages

Code `plan_avg.x` calculates planar averages of Kohn-Sham orbitals. Code `average.x` calculates planar averages of quantities calculated 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 `WorkFct_example/` and in `dipole_example/`.

#### 4.1.0.2 All-electron charge

`pawplot.x` produces plots of the all-electron charge for PAW calculations.

#### 4.1.0.3 About Bader's analysis

In `http://theory.cm.utexas.edu/henkelman/code/bader/` one can find a software that performs Bader's analysis starting from charge on a regular grid. One should use PAW to compute the charge density. The required "cube" format can be produced using `pp.x` (info by G. Lapenna who has successfully used this technique, but adds: ``Problems occur with polar X-H bonds or in all cases where the zero-flux of density comes too close to atoms described with pseudo-potentials"). This code should perform decomposition into Voronoi polyhedra as well, in place of obsolete code `voronoy.x` (removed from distribution since v.4.2). Alternatively, you can use CRITIC2, available at `https://github.com/aoterodelaroza/critic2`, which can read directly `pw.x` output and ``XSF'' files. CRITIC2 functionaly include Bader's AIM, ELF, laplacian of density and potentials, non-covalente interaction (NCI) plots and much more.

Next: 4.2 Band structure, Fermi Up: 4 Usage Previous: 4 Usage Contents