User Tools

Site Tools


probe_particle_stm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
probe_particle_stm [2016/12/05 17:28]
krejcio
probe_particle_stm [2018/10/24 13:05]
krejcio [Basic Principles]
Line 1: Line 1:
 ===== Introduction ===== ===== Introduction =====
  
-A Python/C based package, available at [[http://​github.com/​ProkopHapala/​ProbeParticleModel/​tree/PPSTM]], which primary purpose is to simulate STM or dI/dV signal obtained with tilting tip apex (like CO, or Xe tip). It is based on the original ​PPAFM Python/​C ​by Prokop Hapala and Co. [[http://​github.com/​ProkopHapala/​ProbeParticleModel/​]] for simulation of tilting tip apex' AFM images.+A Python/C based package, available at [[https://​github.com/​ondrejkrejci/PPSTM]], 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)[[http://​github.com/​ProkopHapala/​ProbeParticleModel/​]] for simulation of tilting tip apex' AFM images, is necessary, too. 
 + 
 +You can get it easily from terminal by running this command: 
 + 
 +  git clone https://​github.com/​ondrejkrejci/​PPSTM 
 + 
 +The original Probe Particle model (here it will be refered as PPAFM) can be downloaded and linked separately, or you can run an __install_PPAFM.sh__ script, which will do it for you. The PPAFM model will be stored next to the PPSTM model.
  
 ===== Basic Principles ===== ===== Basic Principles =====
Line 7: Line 13:
 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. 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.
  
-===== Inputs for DFT Codes =====+Nowadays these LCAO DFT codes can be used for the creation of necessary PP-STM inputs: //​Fireball//​ [[http://​sites.google.com/​site/​fireballofficialsite/​]],​ //​FHI-AIMS//​ [[http://​aimsclub.fhi-berlin.mpg.de]],​ //CP2K// [[https://​www.cp2k.org/​]] and //GPAW// in the LCAO mode [[http://​wiki.fysik.dtu.dk/​gpaw/​documentation/​lcao/​lcao.html]]
  
-[[Creating inputs]]+Detailed description of the PP-STM code principle is shown in PRB 95, 045407 (2017) - see the literature.
  
-At the moment the PP-STM code can read inputs from following DFT codes: 
  
-== Fireball ​== +===== Software requirements =====
-[[http://​www.fireball-dft.org]]+
  
-A working executable for creation of necessary file is at +Necessary:
-/​storage/​praha1/​home/​krejcio/​bin_fireball_stable/​fireball.x+
  
-Input files can computed with McWEDA functional as well as with computing XC on a gridCluster systems as well as systems with Periodic Boundary Conditions ​(PBCcan be computed. + ​python-2.7; python-2.7-numpy(-1.8); gcc(-4.8); python-2.7-matplotlib(-1.3) ​ - for plotting of figures;
-A fireball.in file for calculations with McWEDA:+
  
-  &​OPTION +Optional:
-  basisfile =     '​answer.bas'​ +
-  lvsfile =       '​input.lvs'​ +
-  kptpreference = '​input.kpts' ​   ! only gamma point-calculations work at the moment +
-  nstepf ​    = 1 +
-  icluster ​  = 0     ! 0 for PBC / 1 for cluster calculation +
-  itdse      = 0 +
-  iqout      = 1 +
-  ifixcharge = 1     ! 0 if you don't have pre-calculated atomic charges in CHARGES +
-  iquench ​   = -1 +
-  &END +
-   +
-  &​OUTPUT +
-  iwrtcdcoefs = -2   ! print the important files +
-  &END+
  
-A fireball.in file for calculations with XC on a grid computations:​+ ​python-ase(-3.8.1) & GPAW - needed ​for reading of //GPAW// inputs;
  
-  &​OPTION +===== Inputs ​for DFT Codes =====
-  basisfile ​    '​answer.bas'​ +
-  lvsfile ​      '​input.lvs'​ +
-  kptpreference ​'​samplek.kpts'​ +
-  nstepf ​    +
-  icluster ​  0      ! 0 for PBC / 1 for cluster calculation +
-  itdse      ​+
-  iqout      ​+
-  ifixcharge = 0 +
-  dt         = 0.5 +
-  iquench ​   = -1 +
-  iks        = 1 +
-  imcweda ​   = 0 +
-  idogs      = 0 +
-  bmix       = 0.05 +
-  &END +
-   +
-  &​OUTPUT +
-  iwrtcdcoefs =  -2 +
-  &END +
-          ! Next part is more important for calculating fftpot.xsf, which is Hartree potential important for PP-AFM calculations with charged tip apex. +
-  &MESH +
-  ifixg0 ​1            !  +
-  g0     0.0,​0.0,​0.0 ​ ! do not shift the position of atoms in fftpot.xsf with respect to the answer.bas +
-  Ecut 300.0d0 ​       ! not really necessary, but gives grid sampling approximately 100 pm. +
-  &END+
  
-In case of PBC calculations phik_0001_s.dat,​ phik_0001_py.dat,​ ... files are produced by the Fireball. In case of cluster calculations phik_s.dat, phik_py.dat,​ ... are outputs of the Fireball calculations. They serve as inputs ​for the PP-STM calculations. Inside they look like: +[[Creating ​inputs]]
- +
-        38     ​280 ​    ​-5.37896401 ​                                                         Number of atoms   ​Number of states (Molecular orbitals) ​  The Fermi Level +
-   ​-27.58251 ​     -0.00004 ​  ​0.00000 ​     -0.00006 ​  ​0.00000 ​      ​0.00002 ​  ​0.00000 ​  ​... ​ Eigen-energy of the 1st state  Real & Imaginary part for the LCAO coeficient for 1st state 1st atom for (s, py ... depending on the name of file) etc. +
-   ​-27.58139 ​      ​0.02716 ​  ​0.00000 ​      ​0.04766 ​  ​0.00000 ​      ​0.00660 ​  ​0.00000 ​  ​... ​ eigen-energy of the 2nd state  Real & Imaginary part for the LCAO coeficient for 2nd state 1st atom for (s, py ... depending on the name of file) etc. +
-   ​... ​+
  
-== GPAW == 
-[[http://​wiki.fysik.dtu.dk/​gpaw/​]] 
  
-Even though the GPAW is mainly used for representing the wave-function on a grid it can work in LCAO mode as well. For the purpose of making inputs for the PP-STM calculations the LCAO mode is necessary. Both - default or double-zeta (basis='​dzp';​ for more information look at the GPAW web page) - basis sets can be used. The PP-STM ​code reads the stored *.gpw binary produced by the GPAW calculations. Here is an example of some GPAW script for the calculations of the input:+===== Running ​PP-STM ​=====
  
-  from ase import * +== PP-AFM pre-calculations ​== 
-  from ase.visualize import * +
-  from ase.io import* +
-  from gpaw import * +
-  import numpy as npy +
-   +
-  mol read('​input.xyz'​) ​                                      # xyz geometry of the sample +
-  cell npy.loadtxt('​input.lvs'​) ​                              # cell in which a sample is +
-  mol.set_cell(cell) +
-  mol.set_pbc(False) ​                                           # cluster calculation,​ but PBC can be used as well: mol.set_cell(cell) +
-  mol.center() +
-  xc='​LDA' ​                                                     # other XC like PBE, RPBE, PW91, BLYP can be used, too. +
-  calc GPAW(txt='​out_LCAO.txt',​xc=xc,​mode='​lcao',​basis='​dzp'​) +
-  mol.set_calculator(calc) +
-  en = mol.get_potential_energy() +
-  print en +
-  calc.write('​out_LCAO_'​+xc+'​.gpw',​mode='​all'​) ​                 # saves the calculation into binary '​out_LCAO_LDA.gpw'​ file+
  
-The results ​of the GPAW calculations ​is stored ​in binary ​file 'out_LCAO_LDA.gpw'+Generating force-fields and running AFM scans in PP-STM do not differ from those showed at http://​nanosurf.fzu.cz/​wiki/​doku.php?​id=probe_particle_model. 
 +The creation ​of input files for the PP-AFM pre-calcultions is described at http://​nanosurf.fzu.cz/​wiki/​doku.php?​id=dft_inputs. 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.
  
-== FHI-AIMS == +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 doneOnce 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 simulationsBe 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  
-[[http://aimsclub.fhi-berlin.mpg.de/]]+are df images, if the STM scan is done with fixed tip, then the figures of positions should be more important.
  
-Works for PBC calculations, just add: +For the PP-STM ​calculations ​the positions of the PP are necessary. You can get them by running:
-  output eigenvectors +
-  output band 0 0 0 0.5 0.5 0.0 3 G K +
-into control.in.+
  
-The calculations produces: KS_eigenvectors.band_1.kpt_1.out for spin-restricted calculations or KS_eigenvectors_dn.band_1.kpt_1.out & KS_eigenvectors_up.band_1.kpt_1.out in the case of spin-polarized calculations.+  python PATH_TO_YOUR_PROBE_PARTICLE_MODEL/​relaxed_scan.py --pos
  
-Note: For cluster calculations Mathematica scripts have to be used for creating ​PP-STM ​inputs.+== PP-STM ​calculations ==
  
 +- input parameters: [[input parameters]]
  
-===== Example =====+- reading input files: [[reading procedures]]
  
-Theoretical prediction for Coronene molecule modified with with four nitrogen atoms :+- running fixed tip STM calculationsAn example of the fixed tip STM calculations is script: __dIdV_test_Si_7x7.py__ ; 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.)
  
-{{:4n-coronene.png|}}+- running PP-dI/dVAn example how to run the whole PP-AFM pre-calculations and the PP-STM calculations is in __tests/4N-coronene/​run_test.sh__ . The script how to calculate the PP-dI/dV is in __dIdV_test_4N-coronene.py__ . 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.
  
-LDA predicted HOMO for this molecule: 
  
-{{:​4n-corornene_homo.png|}}+===== Examples and Tests =====
  
-and LUMO:+ - Example of STM with rigid tip Si (111) 7×7 reconstruction[[Si_7x7]]
  
-{{:​4n-coronene_lumo.png|}} 
  
-== Example ​test outputs ==+ ​- ​Example ​of dI/dV scans above spin-polarized CuPc molecule with rigid tip: [[CuPc]]
  
-Example of scans over this molecule, ​with different probing orbitals and different scanning modes (AFM, STM, dI/dV ... ).+  
 + ​- ​Example of PPSTM simulations ​with flexible CO tip: [[4N-coronene]]
  
-Scans at the energy of HOMO: 
  
-{{:​homo_energy_far.png|}} +===== Literature =====
-{{:​homo_energy_close.png|}}+
  
-Scans at the energy ​of LUMO:+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); http://​journals.aps.org/​prb/​abstract/​10.1103/​PhysRevB.95.045407
  
-{{:lumo_energy_far.png|}} +__For d-orbitals and IETS calculations:__
-{{:​lumo_energy_close.png|}}+
  
 +Bruno de la Torre, Martin Švec, Giuseppe Foti, Ondřej Krejčí, Prokop Hapala, Aran Garcia-Lekue,​ Thomas Frederiksen,​ Radek Zbořil, Andres Arnau, Héctor Vázquez, and Pavel Jelínek, Submolecular Resolution by Variation of the Inelastic Electron Tunneling Spectroscopy Amplitude and its Relation to the AFM/STM Signal, Phys. Rev. Lett. 119, 166001 (2017); http://​journals.aps.org/​prl/​abstract/​10.1103/​PhysRevLett.119.166001
probe_particle_stm.txt · Last modified: 2021/11/16 20:59 by krejcio