howto:delta_kick
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto:delta_kick [2023/10/10 07:36] – [Analyzing the results] glebreton | howto:delta_kick [2024/02/24 10:00] (current) – oschuett | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to run a Real-Time TDDFT calculation for absorption spectroscopy using $\delta$-kick ====== | + | |
- | + | ||
- | This tutorial shows how to run a Real-Time Time-Dependent DFT calculation using the so-called $\delta$-kick approach to compute absorption electronic spectra. | + | |
- | + | ||
- | We warmly recommend having a look first at the Linear-Response approach, for instance at [[howto: | + | |
- | See also this article and the supplementary information: | + | |
- | + | ||
- | This tutorial is structured as follows: | + | |
- | + | ||
- | - Brief theory overview | + | |
- | - CP2K input file overview | + | |
- | + | ||
- | Then, the link between the CP2K output (time-dependent dipole moment) and the quantity targetted (the absorption spectra in the frequency domain) is performed in this jupyter notebook: {{ : | + | |
- | Of course, one can use its own script and method. Yet, as these analyses present some subtilities, | + | |
- | + | ||
- | ===== Theory Overview ===== | + | |
- | + | ||
- | === Response theory reminders === | + | |
- | + | ||
- | In the perturbative regime and at the linear order, the time-dependent response of an electronic cloud can be decomposed in the Fourier space: the response at a given frequency is proportional to the perturbation acting on the system at the same frequency. In particular, the induced dipole moment (or equivalently the induced current) at a given frequency, $\mu^\omega$, | + | |
- | + | ||
- | $$ | + | |
- | \mu^\omega = \alpha(\omega, | + | |
- | $$ | + | |
- | + | ||
- | This quantity involved a dot product between the field vector and the polarizability matrix. | + | |
- | For the next paragraphs, we will drop the vectorial behavior and discuss it later. | + | |
- | + | ||
- | In Linear-Response-TDDFT approaches, one computes the excited state promoted by an electric field oscillating at a specific frequency $\omega$ and then computes the transition dipole moment associated with such electronic transition. This transition dipole moment is then used to compute the polarizability for resonant or non-resonant frequency. | + | |
- | + | ||
- | In the Real-Time approach presented here, we will excite **all** the possible electronic transitions at the beginning of the simulation and then propagate this excited electronic cloud to observe the induced dipole moment. We will deduce the polarizability tensor for any frequency from this induced dipole moment. | + | |
- | + | ||
- | + | ||
- | === The $\mathbf{\delta}$-kick technic === | + | |
- | + | ||
- | In the $\delta$-kick technic, the electronic structure is first obtained at the ground state, for instance using DFT, and then perturbed with an instantaneous electric field named a $\delta$-kick: | + | |
- | + | ||
- | $$ | + | |
- | F(t) = F^0 \delta(t) | + | |
- | $$ | + | |
- | + | ||
- | This $\delta$-kick perturbes the ground state wave-function at $t=0^-$ using either the dipole moment operator (length gauge) or using the momentum one (velocity gauge). Then, this excited wave-function is propagated in real time by numerically integrating the DFT equivalent of the Schrodinger equation. For more information, | + | |
- | + | ||
- | The electric $\delta$-kick can be written in the frequency domain: | + | |
- | + | ||
- | $$ | + | |
- | F^\omega = \frac{F^0}{2 \pi} \int_{-\infty}^{+ \infty} \delta(t) e^{i \omega t} dt = \frac{F^0}{2 \pi} e^{i \omega \times 0} = \frac{F^0}{2 \pi} | + | |
- | $$ | + | |
- | + | ||
- | The field amplitude in the Fourier space is $F^0 / 2 \pi$ for all frequencies: | + | |
- | The time-dependent wave-function can be thus described to be the one at the ground state plus all the possible excited states. | + | |
- | During the time propagation, | + | |
- | This complex behavior in the time domain became simple in the frequency one since we know the amplitude of the perturbation applied at each frequency: | + | |
- | + | ||
- | $$ | + | |
- | \mu^\omega = \frac{1}{2 \pi} \alpha(\omega, | + | |
- | $$ | + | |
- | + | ||
- | Therefore, in order to get the polarizability $\alpha(\omega, | + | |
- | + | ||
- | $$ | + | |
- | \text{Re} \left[ \alpha(\omega, | + | |
- | \text{Im} \left[ \alpha(\omega, | + | |
- | $$ | + | |
- | + | ||
- | The amplitude of the dipole moment in the Fourier space may be very small if the frequencies are far from resonances. But, in principle, one can extract the whole spectra from one Real-Time calculation. Of course, numerically speaking this is not the case since the time scale involved for UV frequencies is quite different from the one involved for X-Rays: a Real-Time propagation calculation is thus run for a specific range of frequency. | + | |
- | + | ||
- | + | ||
- | === Absorption spectrum === | + | |
- | + | ||
- | Using the time-dependent dipole moment, we got the frequency-dependent polarizability $\alpha$ assuming a perturbative and linear response regime. The real and imaginary part of the polarizability defines the nature of the response. If the frequency is at an electronic resonance, then the polarizability has an imaginary part. The polarizability is pure real off resonances. | + | |
- | + | ||
- | From one Real-Time propagation, | + | |
- | Therefore, to get the full polarizability tensor, one should run 3 Real-Time propagations using a perturbation along 3 orthogonal directions, for instance, $x$, $y$, and $z$. | + | |
- | + | ||
- | To compare with experiments, | + | |
- | + | ||
- | $$ | + | |
- | I(\omega) | + | |
- | $$ | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ===== CP2K Input ===== | + | |
- | + | ||
- | In this tutorial, we will study the response of a carbon-monoxide in the gas phase upon a $\delta$-kick along its perpendicular direction. | + | |
- | We will focus on the X-Ray range, but in principle, other ranges of frequency can be sampled using this technic. | + | |
- | + | ||
- | This has been done for isolated carbon-monoxide at the DFT/PBEh level using a PCSEG-2 basis set. | + | |
- | One can look at the input file contained in RTP.inp, in the following we will emphasize a few important points related to the $\delta$-kick technic. | + | |
- | + | ||
- | + | ||
- | <code - RTP.inp> | + | |
- | + | ||
- | & | + | |
- | PROJECT RTP | + | |
- | RUN_TYPE RT_PROPAGATION | + | |
- | &END GLOBAL | + | |
- | + | ||
- | & | + | |
- | &MD | + | |
- | ENSEMBLE NVE | + | |
- | STEPS 50000 | + | |
- | TIMESTEP [fs] 0.00078 | + | |
- | TEMPERATURE [K] 0.0 | + | |
- | &END MD | + | |
- | &END MOTION | + | |
- | + | ||
- | & | + | |
- | METHOD QS | + | |
- | &DFT | + | |
- | & | + | |
- | APPLY_DELTA_PULSE .TRUE. | + | |
- | DELTA_PULSE_DIRECTION 1 0 0 | + | |
- | DELTA_PULSE_SCALE 0.001 | + | |
- | MAX_ITER 100 | + | |
- | MAT_EXP ARNOLDI | + | |
- | EPS_ITER 1.0E-11 | + | |
- | INITIAL_WFN SCF_WFN | + | |
- | PERIODIC .FALSE. | + | |
- | &END REAL_TIME_PROPAGATION | + | |
- | BASIS_SET_FILE_NAME BASIS_PCSEG2 | + | |
- | POTENTIAL_FILE_NAME POTENTIAL | + | |
- | & | + | |
- | CUTOFF 1000 | + | |
- | NGRIDS 5 | + | |
- | REL_CUTOFF 60 | + | |
- | &END MGRID | + | |
- | &QS | + | |
- | METHOD GAPW | + | |
- | EPS_FIT 1.0E-6 | + | |
- | &END QS | + | |
- | &SCF | + | |
- | MAX_SCF 500 | + | |
- | SCF_GUESS RESTART | + | |
- | EPS_SCF 1.0E-8 | + | |
- | &END SCF | + | |
- | & | + | |
- | POISSON_SOLVER WAVELET | + | |
- | PERIODIC NONE | + | |
- | &END POISSON | + | |
- | &XC | + | |
- | & | + | |
- | &PBE | + | |
- | SCALE_X 0.55 | + | |
- | &END | + | |
- | &END XC_FUNCTIONAL | + | |
- | &HF | + | |
- | FRACTION 0.45 | + | |
- | & | + | |
- | POTENTIAL_TYPE TRUNCATED | + | |
- | CUTOFF_RADIUS 7.0 | + | |
- | &END INTERACTION_POTENTIAL | + | |
- | &END HF | + | |
- | &END XC | + | |
- | & | + | |
- | & | + | |
- | &END MULLIKEN | + | |
- | & | + | |
- | &END HIRSHFELD | + | |
- | & | + | |
- | | + | |
- | | + | |
- | | + | |
- | & | + | |
- | MD 1 | + | |
- | & | + | |
- | &END MOMENTS | + | |
- | &END PRINT | + | |
- | &END DFT | + | |
- | + | ||
- | & | + | |
- | &CELL | + | |
- | ABC 10 10 10 | + | |
- | ALPHA_BETA_GAMMA 90 90 90 | + | |
- | PERIODIC NONE | + | |
- | &END CELL | + | |
- | & | + | |
- | COORD_FILE_NAME carbon-monoxide_opt.xyz | + | |
- | COORD_FILE_FORMAT XYZ | + | |
- | &END TOPOLOGY | + | |
- | &KIND C | + | |
- | BASIS_SET pcseg-2 | + | |
- | POTENTIAL ALL | + | |
- | &END KIND | + | |
- | &KIND O | + | |
- | BASIS_SET pcseg-2 | + | |
- | POTENTIAL ALL | + | |
- | &END KIND | + | |
- | &END SUBSYS | + | |
- | &END FORCE_EVAL | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | === Time step === | + | |
- | + | ||
- | The time step used to propagate the wave-function is related to the frequency of interest. Typically, one should do a trade-off between the maximal frequency that can be sampled, this gives the time step value, and the accuracy of the sampling itself, related to the total simulation time. Typically, the time step should be about one order of magnitude lower than the frequency of interest. Here, we will tackle the Oxygen K-edge: the electronic transition between the Oxygen 1s and the first available excited state. | + | |
- | + | ||
- | According to Linear Response TDDFT calculation (using the XAS_TDP module, see [[howto: | + | |
- | In our $\delta$-kick approach, it means that the induced dipole moment should have an oscillatory component around the frequency corresponding to 529~ev. Hence, we should have a time step smaller than this frequency. | + | |
- | Hence, a time step of 0.00078 femtoseconds would lead to about 10 time steps per period for an oscillation at 529 ev. For this tutorial, we have used this value for the real-time propagation calculation in CP2K: | + | |
- | + | ||
- | < | + | |
- | TIMESTEP [fs] 0.00078 | + | |
- | </ | + | |
- | + | ||
- | The total time of the simulation is then given by the number of time steps required, here 500000, and is related to the precision of the calculation: | + | |
- | + | ||
- | === Field properties === | + | |
- | + | ||
- | The field perturbation (the $\delta$-kick) is defined by its amplitude and polarization. | + | |
- | + | ||
- | The amplitude depends on the system of interest, typically $10^{-3}$ would do, and a good way to check it is to run 2 simulations: | + | |
- | Note that applying a too-low field may lead to numerical noise. | + | |
- | For isolated carbon monoxide, we have checked that $10^{-3}$ is within the linear regime. | + | |
- | + | ||
- | **Please note that the actual perturbation applied in CP2K is not DELTA_PULSE_SCALE and depends on the cell size. Look at the output file just before the Real Time propagation part to know the exact perturbation amplitude used** | + | |
- | + | ||
- | The polarization of the field determines which excited state is triggered: the electric field and the transition dipole moment should be non-perpendicular. One way to know how to select the polarization is to run a Linear-Response TDDFT calculation and to look at the transition dipole moment decomposition along the laboratory axis (or the oscillator strength decomposition). For instance, have a look at the first part of [[howto: | + | |
- | + | ||
- | The corresponding input for CP2K are: | + | |
- | + | ||
- | < | + | |
- | DELTA_PULSE_DIRECTION 1 0 0 | + | |
- | DELTA_PULSE_SCALE 0.001 | + | |
- | </ | + | |
- | + | ||
- | === Note about the choice of the Gauge === | + | |
- | + | ||
- | For an isolated system, use the length implementation because the perturbation is applied up to all perturbative orders: | + | |
- | + | ||
- | < | + | |
- | PERIODIC .FALSE. | + | |
- | </ | + | |
- | + | ||
- | For condensed phase systems, use the velocity gauge instead | + | |
- | + | ||
- | < | + | |
- | PERIODIC .TRUE. | + | |
- | </ | + | |
- | + | ||
- | In this case, the perturbation will be applied only within the first order. We have used the length one for this tutorial. | + | |
- | + | ||
- | ===== Analyzing the results ===== | + | |
- | + | ||
- | To analyze the Real Time propagation simulation, we propose to go through a jupyter notebook: {{ : | + | |
- | Note that this zip file also contains the data needed to perform the analyses (the output of the CP2K run). | + | |
- | + |
howto/delta_kick.1696923360.txt.gz · Last modified: 2023/10/10 07:36 by glebreton