A Python/C based package, available at, which primary purpose is to simulate STM or dI/dV signal obtained with tilting tip apex (like CO, or Xe tip). It can work separately for a “rigid tip” STM, but for the tilting tip simulations, the original AFM code (Probe Particle model written by Prokop Hapala and Co. also in Python/C) for simulation of tilting tip apex' AFM images, is necessary, too.

You can get it easily from terminal by running this command:

git clone

The original Probe Particle model (here it will be refered as PPAFM) can be downloaded and linked separately, or you can run an script, which will do it for you. The PPAFM model will be stored next to the PPSTM model.

Basic Principles

The PP-STM code calculates an STM or dI/dV signal based on the input from various Linear Combination of Atomic Orbitals (LCAO)-DFT codes. These inputs are eigen-energies of eigen-states (molecular orbitals) and LCAO coefficients (for each state and atomic orbital of sample). Sample can be approximated by freestanding molecule, or by full system - molecule/substrate.

Nowadays these LCAO DFT codes can be used for the creation of necessary PP-STM inputs: Fireball, FHI-AIMS and GPAW in the LCAO mode

Detailed description of the PP-STM code principle is shown in PRB 95, 045407 (2017) - see the literature.

Software requirements


python-2.7; python-2.7-numpy(-1.8); gcc(-4.8); python-2.7-matplotlib(-1.3) - for plotting of figures;


python-ase(-3.8.1) & GPAW - needed for reading of GPAW inputs;

Inputs for DFT Codes

Running PP-STM

PP-AFM pre-calculations

Generating force-fields and running AFM scans in PP-STM do not differ from those showed at The creation of input files for the PP-AFM pre-calcultions is described at From a GPAW DFT code there is now way, how to get a hartree potential at the moment. But the L-J force field can still be created from an *.xyz or *.in file with geometry of the sample's system.

Since the PP-STM calculations takes much longer, than the PPAFM, the proposed strategy for the PP-STM is following.

To tune the parameters for the spring constant K, the charge Q, FWHM of the charge cloud σ and/or multipole a AFM pre-calculations should be done. Once the position of the sharp edges in the AFM figures is in agreement with the position of sharp edges in the STM maps, then the PP-STM simulations should proceed from the positions of the Probe Particle (PP) from these best simulations. Be aware, that when there are sharp edges in the STM, the scan is just between the height, when the 1st unwanted artifacts due to the proximity of tip appears, and 0.2-0.3 Â above it. If the scan was done with oscillating tip, then the figures which should be compared are df images, if the STM scan is done with fixed tip, then the figures of positions should be more important.

For the PP-STM calculations the positions of the PP are necessary. You can get them by running:

PP-STM calculations

- input parameters: input parameters

- reading input files: reading procedures

- running fixed tip STM calculations: An example of the fixed tip STM calculations is script: ; There is no need to have pre-calculated positions of the tip and to have linked the PP-AFM code. The positions can be prepared by: ReadSTM.mkSpaceGrid(xmin,xmax,dx,ymin,ymax,dy,zmin,zmax,dz) – Give rectangular grid along the main cartesian axes for non-relaxed dI/dV or STM - 4D grid of xyz coordinates. The height of the scan should be approximately 4-6 Å above the heighest atom of the sample. (A single height scan can be calculated easily, once zmin=zmax and dz is arbitrary > 0.001.)

- running PP-dI/dV: An example how to run the whole PP-AFM pre-calculations and the PP-STM calculations is in tests/4N-coronene/ . The script how to calculate the PP-dI/dV is in . For this kind of calculations a linking with PP-AFM code needs to be done. To read the positions of the relaxing PP the pyProbeParticle.GridUtils are important. It is also needed once you want to plot df together with STM. But beware that the df is calculated from multiple heights (oscillating tip), while STM is calculated only from a single height.

Examples and Tests

- Example of STM with rigid tip Si (111) 7×7 reconstruction: Si_7x7

- Example of dI/dV scans above spin-polarized CuPc molecule with rigid tip: CuPc

- Example of PPSTM simulations with flexible CO tip: 4N-coronene


Ondrej Krejčí, Prokop Hapala, Martin Ondráček, and Pavel Jelínek, Principles and simulations of high-resolution STM imaging with a flexible tip apex, Phys. Rev. B 95, 045407 (2017);

probe_particle_stm.txt · Last modified: 2017/05/05 17:59 by krejcio
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki