Вы находитесь на странице: 1из 4

Introduction to OCTOPUS Computer Session 3

06.04.2009

Note: This guide is not fully self-explanatory - please follow the instructions given in the class. See also: http://www.tddft.org/programs/octopus/wiki/index.php/Main_Page and in particular the variable reference: http://www.tddft.org/programs/octopus/doc/3.0.1/html/vars.php Exercise 1: (1) Optical absorption spectrum of Na2

Follow the instructions of the last exercise from the last week, and try to calculate the optical absorption spectrum from time-propagation. Instead of benzene, choose the sodium dimer, for which you probably have the ground state already (see Exercise 2 from last week). You may set the bond distance to the experimental value, 3.079 . Please ask if you have any troubles in finishing the ground-state calculation, or in starting the time propagation. Select the largest possible time step that does not blow up the total energy, and set the maximum propagation time (or number of time steps) to a value which leads to about a half-an-hour calculation.

(2)

While your propagation is running, try to calculate the optical absorption spectrum from a linear-response calculation. For this purpose, create a new subdirectory, e.g., ./na2/lin_resp. From you working directory ./na2 (where the time-propagation is running), copy the input, job script and ./restart directory to the subdirectory ./na2/lin_resp. (You may use "cp -r" to copy directories). Edit your input for the linear-response calculation. First you need to calculate several unoccupied states which you need in solving the Casida equations (see the lecture notes). set CalculationMode = unocc and add the following lines: NumberUnoccStates = ... EigenSolverMaxIter = ... Try to calculate about 10 unoccupied states, and set the number of iterations in the eigensolver to a few hundred (default is 50). Start the calculation and check if the new states converge. If not, increase the number of iterations in the eigensolver. You might also calculate the ground state again first for a larger box size -- remember that the new higher states require more space on the grid. You can use the LDA in these calculations.

(3)

(4)

Next solve the Casida matrix equation by setting CalculationMode = casida. The calculation prints the output in a directory ./linear, where the file casida contains the transition dipole moments, and the files in ./linear/excitations correspond to the eigenvectors in the Casida equation. More information can be found in Octopus homepage:
http://www.tddft.org/programs/octopus/wiki/index.php/Tutorial:Optical_Spectra_from_Casida

To generate the spectrum to be plotted from the output, type oct-broad in your working directory (./na2/lin_resp). This will create a file ./linear/spectrum.casida. Plot the spectrum (5th vs. 1st column) and compare with the experiment and previous (LDA) calculations (see the figure below). You may also try to increase the number of unoccupied states and see how the results change. Be careful to have a sufficiently large box.

Photoabsorption cross section

Na2

Na4

Theory

Energy (eV)
Vasiliev et al., PRB 65 , 115416 (2002)

(5)

Finally, compare the result of your td-calculation with the linear-response result. Do they agree? Quantum transport

Exercise 2:

The task is to study the response of a simple 1D system to an external bias voltage. The system consists of left and right "leads" and the "device". The leads are just flat potentials with boundaries (due to the finite grid), and the model for the device is a barrier with confining potential wells (see below). (1) As usually, create a new working directory and use the input on the next page. You can copy the input file directly from: /wrk/fysk542/octopus/transport. Since the input file is rather long, it is divided to different sections for clarity. Do the ground state calculation by applying the input as it is. A schematic plot of the ground-state external potential can be seen below. As you can see, we are doing DFT with zero xc functional -- in other words it's a Hartree calculation.

(2)

# #GENERALITIES # CalculationMode=gs FromScratch=yes FlushMessages=yes # #GRID # Dimensions=1 BoxShape=parallelepiped xmax=80 dx=0.2 %Lsize xmax % %Spacing dx % # #SYSTEM # bias=0 NumberOfElectrons=40 V0=0.8 V1=0.4 x0=6 x1=10 cusp=1/xmax %Species "qd"|1.0|user_defined|NumberOfElectrons|"V0*step(x+x0)V0*step(xx0dx)+ V1*step(x+x1)V1*step(xx1dx)bias*x/xmax" % %Coordinates "qd"|0|0|0 % # #GROUNDSTATECALCULATION # TheoryLevel=DFT XCFunctional=no MaximumIter=500 TypeOfMixing=linear Mixing=0.05 ConvAbsDens=1e5 LCAOStart=no # #TIMEDEPENDENTCALCULATION # maxtime=100.0 dt=0.02 TDMaximumIter=maxtime/dt TDTimeStep=dt # #OUTPUTPARAMETERS # OutputEvery=100 Output=potential+density+current OutputHow=axis_x

(3) (4)

Switch on the bias by setting bias=1 in the input (system section). Then start a timedependent calculation with CalculationMode = td. When your job is finished, you'll have a large set of directories for different time instants. To clean up the output a bit, and to make the files readable in Matlab, run the script modify that you'll find in /wrk/fysk542/octopus/transport (just type sh modify in your working directory). Copy the complete output (both ./static and all ./td.00.... directories) to your local directory, or any place that you can reach with Matlab. Copy also the Matlab scripts ani_den.m and ani_pot.m from /wrk/fysk542/octopus/transport to your local directory. Examine the animation scripts and figure out how they work. You can try to run them in Matlab by just typing ani_den or ani_pot. In the best case you'll see a movie of the time-dependent excess density, n(x,t)-n(x,t=0), and the sum of the Hartree potential and the bias, v_H(x,t) + v_bias(x,t). You can re-run the movie by typing movie(M). Questions: What is the role of the Hartree potential in the total potential? What is the time scale of the effect? Do you find a steady or quasi-steady current in this calculation? Why / why not? You may check the current by integrating the density in time on one side of the system (e.g., modify the script ani_den.m). If you have time left, do some more runs with different input parameters and try to examine how the strength of the bias (slope in the external potential) affects the current and the behavior of the total potential. Recipe

(5)

(6)

(7)

(8)

Exercise 3: (1) (2)

Try a recipe calculation with Octopus. Simply take any of your input files, put CalculationMode = recipe and start a calculation. Check the output, follow the instructions, and enjoy!