.. index:: Examples
A series of typical usage scenarios are given, including the result and the source code.
Note
- Three different model systems are used in the examples below. More information on these model systems can be found under :ref:`Model systems<model systems>`.
- The examples below can be reproduced from the electron density files as stored in
dataset.tar.bz2which can be found undersrc/test/testinput. - It is assumed that the executable
edpis available from the$PATH.
Consider the benzene molecule, centered in a rectangular unit cell with dimensions 14.313320 Å x 14.980580 Å x 10.000000 Å. To generate a projection of the electron density onto a plane spanned by the normal vectors \vec{v} = (1,0,0) and \vec{w} = (0,1,0) going through the center of the unit cell, the following command in run:
edp -i PARCHG_BENZENE_07 -o benzene_xy.png \ -p 7.15666,7.49029,5.0 -v 1,0,0 -w 0,1,0 -s 25
If no bounds are set, the electron density is by default projected according to \rho \in (10^{-7},10^{2}).
To set the bounds of the electron density to \rho \in (10^{-5},10^{0}) and add a legend to the plot, the following command is used:
edp -i PARCHG_BENZENE_07 -o benzene_xy.png \ -p 7.15666,7.49029,5.0 -v 1,0,0 -w 0,1,0 -s 25 -b -5,0 -l
Instead of specifying the center of unit the unit cell by hand, we can perform the same operation by using atom indices. Since all the atoms lie on the xy- plane through the center of the unit cell, we can pick any atom. Here, we have used the first atom:
edp -i PARCHG_BENZENE_07 -o benzene_xy.png -p 1 -v 1,0,0 -w 0,1,0 -s 25 -b -5,0 -l
To produce the projection onto the xz-plane through the first carbon atom, the following command is used:
edp -i PARCHG_BENZENE_07 -v 1,0,0 -w 0,0,1 -s 25 -p 1 -o benzene_xz.png -b -5,0 -l
To increase the scale of the image, we can use 30 pixels/Å instead of 25 pixels/Å as used in the previous examples:
edp -i PARCHG_BENZENE_07 -v 1,0,0 -w 0,0,1 -s 30 -p 1 -o benzene_xz.png -b -5,0 -l
:program:`EDP` supports 16 color schemes as schematically shown in the image
below. To select a color scheme, append the following to the command line
instructions: -c <color-scheme-id> where <color-scheme-id> should be a number
between 0-15, inclusive.
Note
The color schemes are extracted from the following resources.
Note
In the subsections below, a list of special features of :program:`EDP` is given. To visualize the results, we have made use of NumPy and Matplotlib. These programs are typically readily available on Linux operating systems. The scripts used below can be found in the examples folder on Github.
Consider the (111)\;2x2 termination of FCC Al using 7 layers. Besides projecting the electron density onto the plane, we can supply an additional instruction to calculate the total electron density per plane lying in the z-direction:
edp -i CHGCAR_Al_FCC111 -o al_fcc111_xz.png \ -p 28 -v 1,0,0 -w 0,0,1 -s 25 -b -5,0 -l -z
The result is stored in z_extraction.txt which can be readily visualized using a simple Python script.
Consider the methane molecule at the center of a cubic unit cell of length 10 Å. We wish to calculate the average electron density alongside a line running through the central carbon atom to one of the H atoms:
edp -i CHGCAR_CH4 -o ch4.png \ -p 1 -v 1,0,0 -w 0,1,0 -s 25 -e 1-2
The result is stored in line_extraction.txt.
Note that the electron density is plotted between 0 and ~17.5 Å. This corresponds to the tridiagonal of the cubic unit cell which has size \sqrt{3} * 10 \approx 17.32 Å.
Consider the methane molecule at the center of a cubic unit cell of length 10 Å. We wish to calculate the average electron density surrounding the central carbon atom. This can be done using:
edp -i CHGCAR_CH4 -o ch4.png \ -p 1 -v 1,0,0 -w 0,1,0 -s 25 -r 1,2
The result is stored in spherical_average.txt.
In the examples as shown on this page, three model systems have been used. The files to reproduce these calculations can be found here.
.. literalinclude:: ../examples/model_systems_input/benzene/POSCAR :linenos:
.. literalinclude:: ../examples/model_systems_input/CH4/POSCAR :linenos:
.. literalinclude:: ../examples/model_systems_input/Al111/POSCAR :linenos:










