qphensurf / STMpw

Implementation of Bardeen and Tersoff-Hamann approximations.
GNU General Public License v3.0
4 stars 4 forks source link
bardeen dft stm tersoff-hamann vasp vasp-processing

# STMpw

STMpw is a program created by the Quantum Phenomena on Surfaces group to perform STM constant current and dI/dV map simulations in the Tersoff-Hamann and Bardeen approximations. It is a postprocessing utility for DFT planewave codes. At the moment it is interfaced with VASP.

The program can perform:

a) Constant current and constant height STM topographic images
b) dI/dV maps in constant current and constant height modes
c) dI/dV curves

Approximations

Compilation

The program is compiled using the included Makefile by typing make in the main directory. The program has been tested in linux with INTEL and GNU FORTRAN compilers.

It is required to provide a FFTW implementation. The performance of the program will dramatically depend on the performance of the FFTW library, so it is strongly recommended to use an optimized version for your system. MKL typically offers a good performance.

The Makefile file must be adapted to your system by choosing a FORTRAN compiler and a FFTW library.

Usage

  1. You must run VASP with some requirements:
  1. You must determine the plane z_s from which the wavefunction Fourier components will be substituted by exponential functions of z. First, you have to look for the last surface layer to be used as reference (Zsurf). Then you look at the density vs density behavior to look for the first point where there is an exponential decay. The z value of this point in direct coordinates will be z_s. Typically this point is around 2-3 angstroms above the most protruding atom of the molecule. So to speed things up a negative value of z_s indicates a distance in angstroms above the most protruding atom (the code will look for the most protruding atom). In addition, if you are using the Bardeen approach the origin of the tip Ztip must be supplied. z_t is hardwired to 2 angstroms below the most (least?) protruding atom of the tip. At the end you should have Zsurf < z_s < z_t < Ztip.

  2. For the calculation of dI/dV curves you must determine

    • The range of energies (or bias value) to use (referred to Fermi energy = 0 eV).
    • The number of divisions (or total number of bias values) on that range
    • On which points the curves will be determined. Tipically we select the x and y coordinates of one atom (in angstroms) and a z value several angstroms over the z of the atom.
  3. You must create an input.STMpw file as follows (where ! means that a comment follows, before ! you have to write a value for the marked variable. Please start from the first line of the file.):

    phi ! workfunction of the surface in eV n ! number of voltages to calculate V1...Vn ! n values of tip-substrate voltages in V (tip to mass) nZ ! sampling points in z (perpendicular to the surface) Zmax ! maximum tip-surface distance (from 'Zsurf') in angstroms Zsurf ! origin of the surface in direct coordinates z_s ! as explained above Bardeen ! T for Bardeen and and F for Tersoff-Hamman Ztip ! (only if Bardeen=T) origin of the tip in direct coordinates dIdV ! T or F, whether we calculate the dIdV curve emin emax ! (if dIdV=T) range of energy for dIdV ndiv ! (if dIdV=T) number of divisions between emin and emax Np ! (if dIdV=T) number of points to plot the dIdV curve x1, y1, z1 ! (if dIdV=T) coordinates of the first point (in angstroms) ... xNp, yNp, zNp ! (if dIdV=T) coordinates of the nP point (in angstroms) name_POSCAR ! name of the POSCAR file name_WAVECAR ! name of the WAVECAR file mapfile ! T to read a reciprocal vector and index file or F to generate it name_mapfile ! (if mapfile=T) name of the reciprocal vector and index file name_OUTCAR ! (if mapfile=F) name of the OUTCAR file Gamma ! T or F, whether the k-point sampling contains the Gamma point or not wsxm ! T or F, WSxM output? factor ! (if wsxm=T) multiplying factor for WSxM output files gnuplot ! T or F, plain output to use in gnuplot? cube ! T or F, cube format output?

    Some examples can be found in Utils.

  4. Different output files are produced. For each required voltage a directory with the name V_voltage is created. Inside each directory, different files can be found depending on the required output.

    • WSxM: output for the WSxM program. There is a TH_V_voltage.siesta file for Tersoff-Hamann and Bardeen_V_voltage.siesta and TH_tip_V_voltage.siesta files for Bardeen. The last file is a STM simulation of the tip in the Tersoff-Hamann approximation. All these files can be directly read by WsXM (choose the . format for reading it in WSxM) and processed using: Process -> Filter -> Create STM type image...
    • gnuplot: .dat plain files. They can be plotted, for example, with gnuplot. In the Utils directory there are different programs and scripts to process them.
    • cube: files in the cube format. At the moment there are just for Tersoff-Hamann: TH_V_voltage.cube for STM images and dIdV_TH_V_voltage.cube for dIdV maps. cube is a standard format which can be read by many programs, including the last versions of WSxM.

    Note: distances are referred to both surfaces (sample and tip) but the sampling region is only between z_s and z_t, because it is the 'asymptotic' region where the electron potential is supposed to be constant ('zero'). The consequence is that the plotting isosurface values of the current (or LDOS) need to be smaller than a certain value to avoid z smaller than z_s when plotting the simulated STM images. You will realize that you need to reduce the isovalue when patches of your image are missing because z is too small.

Examples

Examples are included in the Examples directory. There are intended just for testing: the different parameters are not converged.

Authors

Nicolás Lorente and Roberto Robles based on the Bardeen2 code of Nicolás Lorente.

License

GNU General Public License v3.0

In case the use of the code leads to a scientific publication please cite it as:

Lorente, N. and Robles, R. STMpw (Zenodo, 2019). https://doi.org/10.5281/ZENODO.3581159