-
Notifications
You must be signed in to change notification settings - Fork 2
eval_stm
This program generates STM pictures from a given PARCHG
file of a surface slab (see in the STM section how to obtain this file).
Only the PARCHG
file is needed as input for an arbitrary system.
Two modes can be used: constant height, in which the unit cell is essentially cut through parallel to the x-y axis at the given z-value and constant current, in which the first z-value (looked from above) at which the partial charge density is equal or larger the given value is determined for each pixel in the image.
A number of command line arguments are available for the program:
-
-mode=[word]
Select if the constant height or constant current mode shall be used.-mode=height
activates the constant height mode,-mode=current
activates the constant current mode. -
-pos=[value]
For a constant height mode calculation, give the height (z-value) at which the local partial charge density shall be probed (in Angstroms). -
-dens=[value]
For a constant current mode calculation, give the partial charge density to which the STM tip shall be lowered for each pixel of the STM picture. Usually, values between 0.01 and 0.1 give reasonable results (comparable to experimental STM images). The larger the value, the smaller and sharper the contour of the adsorbate or the substrate surface will be. -
-repeat_x=[number]
How often the STM image of the given unit cell shall be repeated in x-direction (or more general, including nonorthogonal unit cells: the a-axis) to show the periodic pattern more clearly. Default: 1 -
-repeat_y=[number]
Similar torepeat_x
, along the y-axis (or b-axis) of the unit cell. -
-grid_x=[number]
The number of STM grid points (or pixels) that shall be calculated along the x-axis (or more general: a-axis) of the unit cell inPARCHG
. Ifrepeat_x
is larger than 1, the total number of grid points of x will be multiplied by it (but not recalculated, thus not increasing the calculation effort significantly). Default: 1 -
-grid_y=[number]
Similar togrid_x
, along the y-axis (or b-axis) of the unit cell. -
-gauss_width=[value]
For smearing of the STM picture, to imitate an experimental STM image with limited resolution available. The given value is the width of the smearing Gaussian at half maximum (FWHM), in Angstroms. Larger values will smear the STM image out, but also increase the computation effort since morePARCHG
data points need to be included in each STM grid point. Default: 0.3
The program first reads in the PARCHG file, with a value of the partial charge density at each grid point.
In the constant height mode, the x-y plane (or more general: a-b plane) at a given z-value is divided into the number of grid-points defined by grid_x
and grid_y
. Then, all grid points stored in PARCHG
are included and weighted in a Shepard interpolation kind of interpolation. The range of indices PARCHG
points along this axis
Then, the current local charge density (equal to the STM intensity in line of the Tersoff-Haman methodology) is calculated by first determining the nearst PARCHG
grid point
It can be seen that the included range along z is half that of x and y, since one can assume that the resolution along z is higher than along x and y (the tip ends at a certain height and will mostly interact with the local partial charge density at this height).
Since the lengths of the sums depend on the prefactor
In the constant current mode, the same numerical integration is done, but now the z-position of the current point is scanned in addition until the obtained charge density is equal or larger than the proposed value in -dens
. In the first grid point (x=y=0), the imaginary tip is started at z=0.8 times the z-length of the unit cell in order to avoid problems with atoms that might be located at the bottom of the cell at z=0. It is thus assumed that the surface slab is located in the lower half of the unit cell!
The smeared local charge density is then calculated by the noted formula and if the charge is still slower than the value given by -dens
, the calculation is repeated with the tip lowered by a third of the grid point distance along z in the PARCHG
file. This is done until the charge density is equal or larger than the given value or the z-coordinate has reached zero. The corresponding z-value is noted as STM height in the current grid point. Then, the tip is moved to the next x-value. In order to save calculation time, the tip is now not started at z=0.8 times unit cell length, but instead increased only by one Angstroms, assuming that the isosurface of the charge density is sufficiently smooth. Then, the tip is lowered again in small steps until the charge density is high enough, the final z-value is stored. This procedure is repeated until the whole x-y (or more general a-b) grid has been scanned and the STM images has been obtained.