[Wien] Simulating STM images

Michael Gurnett michael.gurnett at kau.se
Thu Sep 4 14:04:01 CEST 2003


thank you
----- Original Message ----- 
From: "M. Todorova" <todorova at fhi-berlin.mpg.de>
To: <wien at zeus.theochem.tuwien.ac.at>
Sent: Thursday, September 04, 2003 1:25 PM
Subject: Re: [Wien] Simulating STM images


> Dear Michael,
>
> I have simulated STM images using WIEN97. Please find all the necessary
> information in the attachment. I hope it helps.
>
> Best wishes
> Mira
>
> Michael Gurnett wrote:
> >
> > Hello
> >
> >Just wondering if anyone has used Wien2k information to simulate STM
images and if >so how was this done
> >
> >Best wishes
> >
> >Michael Gurnett
>
> ------------------------------------------------------------------
> Mira Todorova                           todorova at fhi-berlin.mpg.de
> Fritz-Haber-Institut, Abt. Theorie      Phone:  +49 30 8413 4808
> Faradayweg 4-6                          FAX:    +49 30 8413 4701
> D-14195 Berlin (Germany)                www.fhi-berlin.mpg.de/th
> ------------------------------------------------------------------


----------------------------------------------------------------------------
----


> To do an STM-Simulation one needs:
> 1) a converged calculation
>
> 2) run LAPW2 to get a case.clmval file
>    Use a energy window around the Fermi energy (usually Ef +- 0.5 eV)
>
> 3) Run LAPW5
>    This program has been rewritten, so that you get not only the
>    charge density in one plane, but in many planes, parallel to each
>    other. Accordingly, one has to specify one more dimension in the
>    input file case.in5. An example file case.in5 is attached to this mail:
>
>    line 1-4: four points in the unit cell (origin, x-end, y-end,
>              z-end), which specify the volume in which the charge
>              density will be calculated.
>              In the old LAPW5 one had to specify just 3 points
>              (origin, x-end, y-end).
>    line 7  : specifies number of x, y and z grid points
>              To make an STM-simulation I found it useful to plot more
>              than one cell - the example file is for (5 x 5) unit cells.
For
>              plotting more than one cell, make sure, that you have the
>              same number of x and y points in each cell. In the
>              example file I have used 41 points for each direction in
>              a plane (x and y). This corresponds to 9 points per cell
>              in x(y) direction, approximately 1 point per Angstroem.
>              For the z-direction it seems to be sufficient to have a
>              plane each 0.06 Angstroem. The z-coordinate of each plane
>              is written in the case.output5 file (look for 'k,ZI'; k
>              is the  number of the plane, ZI is the z-coordinate of
>              the first point in each plane).
>    Everything else in case.in5 is as one knows it from the old LAPW5.
>
>    To calculate the charge density in just one plane (like in the old
>    LAPW5) the z-coordinates of each specified point should be the same
>    and the number of points in z direction should be 1.
>
> 4) Simulate an STM-image by running STM.f
>
>    This programm enables one to draw a isosurface of constant
>    density. One has to try different values to get a reasonable
>    picture. Values for the density corresponding to a height 5 - 6
>    Angstoems above the surface seem to work for metals.
>
>    Input file: The STM.f programm requires a file STM.rho as input,
>                so one has to copy the case.rho file to STM.rho.
>    Output file: The output file is called STM.out and is suitable for
>                 plotting with XFarbe. If one wants to use an other
>                 plotting programm, it might be necessary to change the
>                 format of the output
>
>    Run STM.f
>    The program will ask for a threshold value for the density
>    to be specified.
>
>


----------------------------------------------------------------------------
----


>
>       PROGRAM STM
>
>       IMPLICIT NONE
>       INTEGER nx,ny,nz,x,y,z,val
>
>       DOUBLE PRECISION value(1:300), value1(1:300,1:300)
>       DOUBLE PRECISION thresh, dz
>       DOUBLE PRECISION  value_cov(0:300,0:300,0:300)
>
>       CHARACTER*40 dummy
>       CHARACTER*10 test
>
>       DO z=0,300,1
>          DO x=0,170,1
>             DO y=0,170,1
>                value_cov(x,y,z) = 0.0
>             ENDDO
>          ENDDO
>          value(z)=0
>       ENDDO
>
>       open(unit=15,file='STM.rho',status='old',err=91)
>       open(unit=16,file='STM.out',status='new',err=92)
> 91    WRITE(*,*) 'STM.rho file does not exist'
>       STOP
> 92    WRITE(*,*) 'File STM.out already exists.'
>       WRITE(*,*) ' Overwrite (y/n)?'
>       READ(*,93) test
>       if (test.eq.'y' .or. test.eq.'Y') then
>        open(unit=16,file='STM.out')
> c       return
>       else
>        STOP
>       endif
> 93    FORMAT(a1)
>
>       WRITE(*,*)  'SELECT CONSTANT DENSITY VALUE:'
>       READ(*,*) thresh
>
> c      READ (5,'(3I4,A40,E20.13)') nx,ny,nz,dummy,z_axis
>       READ (15,'(3I4,A70)') nx,ny,nz,dummy
>
>       WRITE (16,'(A40)')
>       WRITE (16,'(2I5)') ny-2,nx-2
>
>       READ  (15,'(5E16.8)') (((value_cov(x,y,z),y=1,ny),x=1,nx),z=1,nz)
>
>       DO y=1,ny,1
>          DO x=1,nx,1
>             DO 20 z=1,nz,1
>
>                IF (value_cov(x,y,z) .LE. thresh) GO TO 10
>  20   CONTINUE
>  10   dz= (value_cov(x,y,z-1) - thresh)/(value_cov(x,y,z-1)
>      &           -value_cov(x,y,z))
>       value1(x,y)= dble(z-1) + dz
>
>          ENDDO
> c          WRITE (16,'(5F16.8)') (value1(x,y),x=1,nx,1)
>       ENDDO
>
>       DO x=2,nx-1,1
>          DO y=2,ny-1,1
>          value(y)=(value1(x,y-1)+value1(x,y)+value1(x,y+1)+
>      &            value1(x-1,y)+value1(x+1,y)+
>      &            value1(x-1,y-1)+value1(x-1,y+1)+
>      &            value1(x+1,y-1)+value1(x+1,y+1))/9.0
>          ENDDO
>          WRITE (16,'(5F16.8)') (value(y),y=2,ny-1,1)
>       ENDDO
>
>
>       END
>


----------------------------------------------------------------------------
----


> 0  0  3 4                     # x, y, z, divisor    of origin
> 20 0  3 4                     # x, y, z, divisor    of x-end
> 0  20 3 4                     # x, y, z, divisor    of y-end
> 0  0  4 4                     # x, y, z, divisor    of z-end
> 6 6 6                       # number of shells
> 41 41 125                   # number of points in x, y and z direction
> RHO                         #   RHO|DIFF|OVER; ADD|SUB or blank
> ANG VAL NODEBUG             #   ANG|ATU; VAL|TOT; DEBUG|NODEBUG
>






More information about the Wien mailing list