# Open SourceMolecular Dynamics

### Site Tools

exercises:2017_uzh_cmest:stm

# Differences

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

 exercises:2017_uzh_cmest:stm [2017/11/08 09:58]tmueller exercises:2017_uzh_cmest:stm [2018/01/13 23:14] (current)jglan [Generating the STM image] Both sides previous revision Previous revision 2018/01/13 23:14 jglan [Generating the STM image] 2017/11/10 15:06 tmueller [Preparation] 2017/11/10 15:06 tmueller [Preparation] 2017/11/10 15:06 tmueller 2017/11/08 10:34 tmueller [Generating the STM image] 2017/11/08 10:33 tmueller [Generating the STM image] 2017/11/08 10:32 tmueller [Calculating the nanoribbon] 2017/11/08 10:30 tmueller [Generating the STM image] 2017/11/08 10:05 tmueller [Generating the STM image] 2017/11/08 09:58 tmueller 2017/11/08 08:06 tmueller [Preparation] 2017/11/08 08:02 tmueller 2017/11/07 16:36 tmueller created Next revision Previous revision 2018/01/13 23:14 jglan [Generating the STM image] 2017/11/10 15:06 tmueller [Preparation] 2017/11/10 15:06 tmueller [Preparation] 2017/11/10 15:06 tmueller 2017/11/08 10:34 tmueller [Generating the STM image] 2017/11/08 10:33 tmueller [Generating the STM image] 2017/11/08 10:32 tmueller [Calculating the nanoribbon] 2017/11/08 10:30 tmueller [Generating the STM image] 2017/11/08 10:05 tmueller [Generating the STM image] 2017/11/08 09:58 tmueller 2017/11/08 08:06 tmueller [Preparation] 2017/11/08 08:02 tmueller 2017/11/07 16:36 tmueller created Line 9: Line 9: * On the server is a package for you to unpack (hohoho ;-)), containing a number of input files. Run the following in a new and empty directory: <​code>​tar xf /​users/​tiziano/​CHE437_ex7.tar.gz​ * On the server is a package for you to unpack (hohoho ;-)), containing a number of input files. Run the following in a new and empty directory: <​code>​tar xf /​users/​tiziano/​CHE437_ex7.tar.gz​ - * The scripts are contained in yet another python package: <​code>​pip install --user https://​github.com/​ltalirz/​asetk/​archive/​master.zip​... and since you have setup the path variable in [[exercises:​2017_uzh_cmest:​phonon_calculation|a previous exercise]], you should now have the following new commands available: ''​stm.py'',​ ''​cube-plot.py'',​ ''​cp2k-sumbias.py''​. + * The scripts are contained in yet another python package: <​code>​pip install --user https://​github.com/​ltalirz/​asetk/​archive/​master.zip​... and since you have setup the path variable in [[exercises:​2017_uzh_cmest:​phonon_calculation|a previous exercise]], you should now have the following new commands available: ''​stm.py'',​ ''​cube-plot.py'',​ ''​cp2k-sumbias.py''​. If the installation fails, make sure that you do **not** have the CP2K module loaded: ''​module list''​ should return an empty list. To explicitly unload the CP2K module, run ''​module unload cp2k''​. ===== Geometry optimization ===== ===== Geometry optimization ===== Line 26: Line 26: ===== Calculating the nanoribbon ===== ===== Calculating the nanoribbon ===== - To get the actual electron density, we are now going to run a full DFT calculation using a large basis set (''​TZV2P''​) on the nanoribbon geometry. This time, the input ''​nanoribbon.inp''​ is similar to what you are used to, except the fact that to to speed the calculation ​up, we use the wavefunctions from the previous calculation as a starting point (the ''​RESTART_FILE_NAME''​ option). + To get the actual electron density, we are now going to run a full DFT calculation using a large basis set (''​TZV2P''​) on the nanoribbon geometry. This time, the input ''​nanoribbon.inp''​ is similar to what you are used to, except ​for the fact that to speedup ​the calculation,​ we use the wavefunctions from the previous calculation as a starting point (the ''​RESTART_FILE_NAME''​ option). This calculation will take a while to finish: run it in parallel using 4 processes (''​mpirun -np 4 ...''​) and in the background. This calculation will take a while to finish: run it in parallel using 4 processes (''​mpirun -np 4 ...''​) and in the background. Line 37: Line 37: ===== Generating the STM image ===== ===== Generating the STM image ===== + To get an actual STM image, we now have to combine the wavefunctions into a single one: To get an actual STM image, we now have to combine the wavefunctions into a single one: # use your output file of the full DFT calculation as your levelsfile! # use your output file of the full DFT calculation as your levelsfile! - cp2k-sumbias.py ​\ + cp2k-sumbias.py --cubes *WFN*.cube --levelsfile nanoribbon.out --vmin -2.0 --vmax 2.0 --vstep 0.5 | tee sumbias.out - ​--cubes *WFN*.cube ​\ + # and pipe the output to the file sumbias.out and the screen simultaneously by using '​tee'​ - ​--levelsfile nanoribbon.out ​\ + - ​--vmin -2.0 --vmax 2.0 --vstep 0.5 \ + - ​| tee sumbias.out + ​ + + The parameters ''​--vmin'',​ ''​--vmax''​ and ''​--vstep''​ determine which bias voltages for the tip (the potential between the substrate/​molecule and the tip) you want to simulate, in our case $-2.0$, $-1.5$, ... $2.0$. + + It is important to note that for a given bias voltage, for example $-2.0$ (current goes from the substrate/​molecule to the tip) all orbitals with an energy between $-2.0 eV$ and $0 eV$ have to be taken into account. + + At this point you should have a new set of combined CUBE files: ''​stm_-2.00V.cube''​..''​stm_+0.00V.cube''​..''​stm_+2.00V.cube'',​ one for each bias voltage, containing the respective electron density. + + From these we can finally generate the actual STM images, which should give you a set of files ''​stm_*V.cube.iso1e-07.png'':​ + + + # zcut is the minimum z-height + stm.py --stmcubes stm_*.cube --isovalues 1.0e-7 --zcut 22 --plot + ​ + + Why are there no images for certain bias voltages? Would you expect the same for a metallic substrate?