exercises:2014_ethz_mmm:uv
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
exercise:uv [2014/05/16 02:56] – created dpasserone | exercise:2014_ethz_mmm:uv [2014/10/15 13:34] – oschuett | ||
---|---|---|---|
Line 12: | Line 12: | ||
</ | </ | ||
- | Then source your profile file: | + | Then source your profile |
< | < | ||
. ~/ | . ~/ | ||
+ | module load intel/ | ||
+ | cp ~danielep/ | ||
</ | </ | ||
- | Now you are able to run the **nwchem** code. Theo | + | Now you are able to run the **nwchem** code. |
+ | Download all files from the media manager: {{exercise_11.1.tar.gz|}}. | ||
+ | ===== Calculation of the spectrum using linear response TDDFT ===== | ||
- | We will show how a simple change in the termination (1 vs. 2 Hydrogens) changes | + | We first run a calculation using linear response TDDFT. The code computes |
- | {{ : | + | <code> |
- | <note tip> | + | # This tests CIS, TDHF, TDDFT functionality at once |
- | You should run these calculations on 16 nodes with '' | + | # by using a hybrid LDA, GGA, HF functional for |
- | Copy, as usual, the files from the directory **/ | + | # spin restricted reference with symmetry |
- | </ | + | |
- | ===== 1. Task: Running the job and looking at the orbitals ===== | + | start tddft_h2o |
- | This time we will not optimize the structure. With an ENERGY run, we run with ** cp2k ** the job 1h.1.5.inp and 2h.1.5.inp, meaning that there are here 1.5 units of the original molecule in the gas phase. | + | |
- | The interesting part of the code is in the ** & | + | echo |
+ | |||
+ | title "TDDFT H2O PBE0/6-31G**" | ||
+ | |||
+ | geometry | ||
+ | O | ||
+ | H | ||
+ | H -0.75933475 | ||
+ | end | ||
+ | |||
+ | basis | ||
+ | O library 6-31G** | ||
+ | H library 6-31G** | ||
+ | end | ||
+ | |||
+ | dft | ||
+ | xc pbe0 | ||
+ | odft | ||
+ | end | ||
+ | |||
+ | dplot | ||
+ | TITLE h2o | ||
+ | | ||
+ | -2.0 2.0 25 | ||
+ | -2.0 2.0 25 | ||
+ | -2.0 2.0 25 | ||
+ | spin total | ||
+ | | ||
+ | | ||
+ | end | ||
+ | |||
+ | |||
+ | tddft | ||
+ | | ||
+ | end | ||
+ | |||
+ | task tddft energy | ||
+ | task dplot | ||
+ | |||
+ | </ | ||
+ | |||
+ | The command is | ||
< | < | ||
- | & | + | bsub |
- | &STM | + | </ |
- | BIAS -2.0 -1.0 1.0 2.0 | + | |
- | TH_TORB S | + | |
- | &END STM | + | |
- | & | + | |
- | NHOMO 10 | + | |
- | NLUMO 10 | + | |
- | | + | |
- | | + | |
- | &END | + | |
- | & | + | |
- | & | + | |
- | &MO | + | Once the job has started, you can monitor the output file by the command (the file is still not present in your directory): |
- | FILENAME EIG | + | |
- | ADD_LAST NUMERIC | + | < |
- | EIGENVALUES | + | bpeek -f [jobid] |
- | | + | |
- | &END | + | |
- | &END | + | |
</ | </ | ||
- | There will be an output file with the energy levels | + | where **jobid** is the job number (see bjobs) |
+ | In the output file (** tddft_h2o_uhf.out ** ) you can find all orbital energies. | ||
+ | You can also plot the orbitals with vmd. There are lumo.cube and homo.cube files generated previously with the input **uhf.nw**. | ||
+ | To visualize them, | ||
- | <note tip> | + | <code> |
- | Hitting ** ls -ltr ** will allow you to see on the last lines of the screen the most recent files. | + | vmd -e homo.vmd |
- | </note> | + | vmd -e lumo.vmd |
+ | </ | ||
+ | |||
+ | Then, the excitation spectrum can be visualized using | ||
+ | |||
+ | < | ||
+ | python ./ | ||
+ | </code> | ||
<note important> | <note important> | ||
- | - Draw the energy level diagram | + | - List in a table the orbital energies |
- | - Look with vmd at the cube files corresponding to the most interesting levels | + | - Visualize homo and lumo with vmd. |
+ | - The excitation spectrum corresponds to transitions between occupied and unoccupied | ||
</ | </ | ||
- | ===== 2. Task: Producing a simple STM image ===== | ||
+ | ===== Resonant ultraviolet excitation of water ===== | ||
- | The section ** &STM ** shown above produces STM images at different bias (feel free to change), meaning, using the Tersoff-Hamann approximation, | + | In this second part, we compute |
- | The ** *STM*cube files are 3D maps of the integrated density of states. Imagine that we have a microscope | + | The spectrum obtained with linear response TDDFT can be also calculated by exciting |
- | The program ** stm ** (in the same working dir) allows to extract | + | We will use the results |
+ | {{ 730px-rt_tddft_h2o_resonant_spec_field.png? | ||
+ | |||
+ | |||
+ | Say we are interested in the excitation near 10 eV. We can clearly see this is a z-polarized transition (green on curve). To selectively excite this we could use a continuous wave E-field, which has a delta-function, | ||
+ | |||
+ | The relevant code section is: | ||
< | < | ||
- | Run the program in the following way: | + | rt_tddft |
- | $ module load boost/1.54.0 | + | tmax 1000.0 |
- | $ module load mkl | + | dt 0.2 |
- | $ stm -c 2h*STM*.cube --isovalues 1E-5 > stm.out | + | |
- | </ | + | |
- | The resulting .igor files contain the z profile (in bohr) and may for example be plotted by gnuplot: | + | field " |
+ | type gaussian | ||
+ | polarization | ||
+ | frequency 0.3768 | ||
+ | center 393.3 | ||
+ | width 64.8 | ||
+ | max 0.0001 | ||
+ | end | ||
+ | |||
+ | excite " | ||
+ | end | ||
+ | task dft rt_tddft | ||
+ | </ | ||
+ | |||
+ | Run now ** h2_resonant.nw ** on 4 cores: | ||
< | < | ||
- | gnuplot | + | bsub -n 4 -o resonant.out mpirun nwchem resonant.nw |
- | set pm3d map | + | </ |
- | set size square | + | |
- | set xrange [...... | + | |
- | set yrange [..... | + | |
- | splot "mystm.igor" matrix | + | The run (follow with bpeek) will apply a field for a limited amount of time. This field will excite the system into a superposition of the ground state and the one excited state, which manifests as monochromatic oscillations. After the field has passed the dipole oscillations continue forever as there is no damping in the system. |
+ | There are 5000 MD steps. It will take about 10 minutes. At the end, cubefiles for the density at each timestep will be generated. | ||
+ | You can visualize the animation | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | vmd -e animate.cube.vmd | ||
+ | </ | ||
- | </ | + | What you will see is the electron density difference between the initial state and an instant along the trajectory. |
- | Where instead of " | ||
- | <note important> | + | <note important> |
- | - In the output file of cp2k, the program tells you how many states have contributed to each STM image. Discuss the images that you see in the two cases. | + | - Plot from the output file the applied field: **grep -i Applied resonant.out | grep alpha > appl** |
- | - What makes the 1h* case particular with respect to the 2h*? | + | - Plot the z component of the induced dipole moment: **grep ipole resonant.out > dipole** |
- | - Change the isosurface and look at the z-range. Discuss | + | - Explain what you see in the vmd representation based on what you see on the previous plot |
- | - Would you define the differences between 1h and 2h in the STM images as more of structural origin or electronic origin? | + | |
</ | </ |
exercises/2014_ethz_mmm/uv.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1