.. tip:: All input files can be downloaded: :download:`Files `. tddft ======= .. contents:: :local: This keyword defines how to perform time-dependent DFT (TDDFT) calculation. Options ------------ .. option:: type .. list-table:: :stub-columns: 1 * - Value - ``TDDFT`` Standard TDDFT. * - - ``TDA`` TDDFT with Tamm-Dancoff approximation (TDA). * - - ``RTDDFT`` Restricted TDDFT. * - - ``UTDDFT`` Unrestricted TDDFT. * - - ``XTDDFT`` Spin-adaptive TDDFT. * - - ``RTDA`` Restricted TDA. * - - ``UTDA`` Unrestricted TDA. * - - ``XTDA`` Spin-adaptive TDA. * - Default - ``TDDFT`` The type of TDDFT calculations. TDA is an approximate case of TDDFT. For closed-shell systems, ``RTDDFT`` and ``RTDA`` are the best choices. For closed- and open-shell systems, ``UTDDFT`` and ``UTDA`` are available. For open-shell systems, ``XTDDFT`` and ``XTDA`` are also available. If ``TDDFT`` or ``TDA`` is used, a suitable method will be automatically selected. .. option:: spin_flip .. list-table:: :stub-columns: 1 * - Value - ``None`` No spin flipping is performed. * - - ``Up`` Flip beta electrons to alpha ones. * - - ``Down`` Flip alpha electrons to beta ones. * - Default - ``None`` Spin flipping way for the excited states. .. option:: num_states .. list-table:: :stub-columns: 1 * - Value - An integer. * - Default - ``5`` The number of excited states to be calculated. .. option:: max_it .. list-table:: :stub-columns: 1 * - Value - An integer. * - Default - ``100`` The maximum number of Davidson iterations for the TDDFT calculation. If TDDFT fails to converge, you can try to increase this number. .. option:: dim_trials .. list-table:: :stub-columns: 1 * - Value - An integer. * - Default - ``50`` The maximum dimension of trial vectors. If TDDFT fails to converge, you can try to increase this number. .. option:: energy_cov .. list-table:: :stub-columns: 1 * - Value - A real number. * - Default - ``1.E-7`` The energy convergence threshold for the TDDFT calculation. .. option:: vec_cov .. list-table:: :stub-columns: 1 * - Value - A real number. * - Default - ``1.E-5`` The excited state vector convergence threshold for the TDDFT calculation. .. option:: precondition_threshold .. list-table:: :stub-columns: 1 * - Value - A real number. * - Default - ``1.E-8`` The precondition convergence threshold for the TDDFT calculation. .. option:: print_coeff_threshold .. list-table:: :stub-columns: 1 * - Value - A real number. * - Default - ``0.01`` Print the excited state coefficients when the absolute value is larger than this threshold. .. option:: transxtdvec Transform the excited state vectors from alpha/beta to spin-adapted ones. Theoretical Background ------------------------- Time-dependent DFT (TDDFT) is a powerful tool for studying the electronic structure of molecules and materials. It is a time-dependent extension of density functional theory (DFT), which allows for the calculation of excited states and transition properties. Input Examples -------------------- Example: TDDFT Calculation of HCHO ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In this example, we will perform a TDDFT calculation of HCHO at TD-B3LYP/cc-pVTZ level of theory. The input file is as follows: .. code-block:: :caption: tddft-1.inp :linenos: basis cc-pvtz end scf charge 0 spin2p1 1 type R end mol C -0.000756 -0.520733 0. H 0.935697 -1.111766 0. H -0.939631 -1.107897 0. O 0.001792 0.678123 0 end tddft type tddft num_states 10 max_it 100 dim_trials 50 print_coeff_threshold 0.01 end task tddft b3lyp end After running the calculation, you will find the following lines: .. code-block:: :caption: tddft-1.out :linenos: #1: Absolute energy = -114.39668857 Hartree Excited energy = 4.1600 eV; wavelength = 298.04 nm, oscillator strength = 0.0000 Transition dipole moment (a.u.): -0.00000 -0.00000 -0.00000 CV(0) 8 --> 9: Coefficient = -0.9512, Percentage = 99.7 %, IPA = 6.0538 eV #2: Absolute energy = -114.26455102 Hartree Excited energy = 7.7556 eV; wavelength = 159.86 nm, oscillator strength = 0.0917 Transition dipole moment (a.u.): 0.69575 -0.00144 -0.00000 CV(0) 8 --> 10: Coefficient = 0.9803, Percentage = 99.1 %, IPA = 8.7346 eV #3: Absolute energy = -114.20726662 Hartree Excited energy = 9.3144 eV; wavelength = 133.11 nm, oscillator strength = 0.0004 Transition dipole moment (a.u.): 0.00000 -0.00000 0.03936 CV(0) 6 --> 9: Coefficient = 0.9615, Percentage = 99.0 %, IPA = 11.0312 eV You can find excited state energies, oscillator strengths, transition dipole moments, and orbital transition coefficients. You can also find the spectrum file ``tddft-1-spectrum.txt``. .. code-block:: :caption: tddft-1-spectrum.txt :linenos: # Energy/Hartree dE/eV Osc.Str. DX/a.u. DY/a.u. DZ/a.u. 1 -114.39668857 4.160 0.00000 -0.00000 -0.00000 -0.00000 2 -114.26455102 7.756 0.09170 0.69575 -0.00144 -0.00000 3 -114.20726662 9.314 0.00035 0.00000 -0.00000 0.03936 4 -114.20671875 9.329 0.01909 0.00061 0.28940 0.00000 5 -114.18117786 10.024 0.02217 0.30091 -0.00062 0.00000 6 -114.16908782 10.353 0.00000 -0.00000 -0.00000 -0.00000 7 -114.16561892 10.448 0.32962 0.00236 1.13648 0.00000 8 -114.13865859 11.181 0.01049 -0.00000 -0.00000 -0.19601 9 -114.08206773 12.721 0.00000 -0.00000 0.00000 0.00004 10 -114.08073037 12.758 0.05235 -0.00083 -0.40988 -0.00000 You can plot the spectrum using a script provided by Qbics, i.e., ``tools/plotspec.py``. Copy this file to the same directory as the input file, and modify the following parameters: .. code-block:: python :caption: plotspec.py :linenos: if __name__ == "__main__": fn = "tddft-1-spectrum.txt" # Spectrum file name. eL_eV = 4 # Lower energy limit. eH_eV = 13 # Higher energy limit. sigma_eV = 0.2 # Sigma value. num_ps = 500 # Number of points. use_angle = False # Whether to use angle dependence. incident_angles = [i*30 for i in range(4)] # Incident angles. - Line 2: Change the spectrum file name. - Line 3,4: Change the lower and upper energy limit. - Line 5: Change the sigma value. - Line 6: Change the number of points. The larger the number, the smoother the spectrum. - Line 7: Whether to use angle dependence. - Line 8: Incident angles. Then, you can run the script using the following command: .. code-block:: bash :caption: plotspec.py :linenos: $ python plotspec.py You will find following spectrum plot: .. figure:: figs/tddft-1.jpg