From c9f1927411bc11e2e8cd66637b506537cdf2210b Mon Sep 17 00:00:00 2001 From: marcella <40494362+marci73@users.noreply.github.com> Date: Thu, 4 Jul 2024 20:34:35 +0200 Subject: [PATCH] improved documentation RTP with delta kick for spectra calculations (#3529) --- docs/methods/properties/x-ray/delta-kick.md | 100 +++++++++----------- 1 file changed, 46 insertions(+), 54 deletions(-) diff --git a/docs/methods/properties/x-ray/delta-kick.md b/docs/methods/properties/x-ray/delta-kick.md index 2ab7c21dc5..634d3e8adf 100644 --- a/docs/methods/properties/x-ray/delta-kick.md +++ b/docs/methods/properties/x-ray/delta-kick.md @@ -1,7 +1,7 @@ -# X-Ray Absorption from δ-Kick +# X-Ray Absorption from RTP and $\delta$-Kick perturbation -This tutorial shows how to run a Real-Time Time-Dependent DFT calculation using the so-called δ-kick -approach to compute absorption electronic spectra. +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. For the corresponding Linear-Response approach, read the tutorial [the X-Ray frequencies](./tddft). @@ -33,20 +33,21 @@ This quantity involves a dot product between the field vector and the polarizabi 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. +oscillating at a specific frequency $\omega$ and then the transition dipole moment associated with +such electronic transition. This transition dipole moment is then used to derive 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. +at the beginning of the simulation by providing an istantaneous pulse containing all the frequencies +The perturbed electronic wavefunction is then propagated and the fluctuations of the induced time +dependent dipole moment are recorded . The polarizability tensor at any frequency is finally derived +from the induced dipole moment. -### The δ-kic +### The $delta$-kick perturbation -To apply the δ-kck, i.e., an intense electric field in a very sort time, the electronic structure is -first obtained at the ground state, for instance using DFT, and then perturbed with an instantaneous -electric field: +To apply the $delta$-kick, i.e., an intense electric field in a very sort time, the electronic +structure is first obtained at the ground state, for instance using DFT, and then perturbed with an +instantaneous electric field: $$ F(t) = F^0 \delta(t) @@ -54,9 +55,9 @@ $$ The same result is obtained by applying a constant field with a very narrow Gaussian envelope. This field perturbes the ground state wave-function at $t=0^-$. Then, this excited wave-function is -propagated in real time by numerically integrating the time dependent Schrodinger equation. +propagated in real time by numerically integrating the time dependent Schroedinger equation. -The electric δ-kick can be written in the frequency domain: +Theinstantaneaous field can be written in the frequency domain as $$ 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} @@ -64,11 +65,10 @@ $$ The field amplitude in the Fourier space is $F^0 / 2 \pi$ for all frequencies: this instantaneous perturbation does indeed contain all the frequencies. The time-dependent wave-function can be -described to be the ground state one plus all possible excited states. The total dipole -moment\ -results from the superposition of all possible oscillations related to all the excited -states. This complex behavior in the time domain becomes simple in the frequency domain, since we -know the amplitude of the perturbation applied at each frequency: +described to be the ground state one plus all possible excited states. The total dipole moment +results from the superposition of all possible oscillations related to all the excited states. This +complex behavior in the time domain becomes simple in the frequency domain, since we know the +amplitude of the perturbation applied at each frequency: $$ \mu^\omega = \frac{1}{2 \pi} \alpha(\omega, \omega) F^0 @@ -100,8 +100,7 @@ pure real off resonances. From one Real-Time propagation, one can obtain three components of the polarizability tensor. For instance, applying a $\delta$-kick along $x$ provides the components $\alpha_{xx}$, $\alpha_{yx}$ and $\alpha_{zx}$, corresponding to the Fourier transform in $x$, $y$ and $z$, respectively. -Therefore, to get the full polarizability tensor, one should run 3 Real-Time propagations each -perturbing along one of the three Cartesian axis. +Therefore, to get the full polarizability tensor, three RTP runs are needed, one per Cartesian axis. To compare with experiments, one often assumes that the system is averaged over all possible orientations in space. Then, the absorption spectrum $I(\omega)$ is proportional to: @@ -112,14 +111,13 @@ $$ ## CP2K Input -In this tutorial, we will study the response of a carbon-monoxide in the gas phase obtained by -applying the $\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 the same approach. +The following example is to simulate the response of carbon-monoxide in the gas phase when applying +the $\delta$-kick along the perpendicular to the CO bond. The analysis is done within the X-Ray +range, but in principle, any other range of frequency can be sampled using the same approach, +providing that fime step and length of the propagation are opportunely adjusted. -The input file RTP.inp presents an example to propagate the electronic density of an isolated -carbon-monoxide molecule, upon the application of a predefined $\delta$-kick. The simulation is -performed at the DFT/PBEh level of theory. For the expansion of the density the all-electron PCSEG-2 -basis sets are used. +The ifollowing input file `RTP.inp` is for a simulation at the DFT/PBEh level of theory, it uses the +GAPW approah and the density is expandedn in the all-electron PCSEG-2 basis sets. ```none &GLOBAL @@ -231,25 +229,24 @@ corresponding to the maximum frequency to be resolved. For core excitation from K-edge is around 530 eV, corresponding to a period of 0.0078 fs. According to Linear Response TDDFT calculations (using the XAS_TDP module, see -[this tutorial](./tddft)), the first transition occurs at 529 eV with an oscillator strength of +[this tutorial](./tddft)), the first transition occurs at 529 eV, with an oscillator strength of 0.044 a.u. For the $\delta$-kick approach, this means that the induced dipole moment should have an oscillatory component around the frequency corresponding to 529 eV. Hence, the [TIMESTEP](#CP2K_INPUT.MOTION.MD.TIMESTEP) is set ten times smaller than the maximum frequency, i.e., to `[fs] 0.00078`, which allows the sampling of the fasted oscillation by means of at 10 propagation steps. -The total time of the simulation is then given by the number of time steps, here 500000, and it -affects the smoothness and sharpness of the resulting spectrum. Longer simulation times give a -better resolution of the spectral peaks, i.e., a more accurate determination of the resonances. -There is no always valid rule to decide how long the propagation needs to be extended, because the -fluctuations might be strongly system dependent. It is always a good idea to check whether the -obtained spectrum has converged with respect to further extension of the sampling. +The total time of the simulation is then determined by the maximum number of time steps, here +500000\. The longer is the sampling, the smoother and sharper is the resulting spectrum. Longer +simulation times give a better resolution of the spectral peaks, i.e., a more accurate determination +of the resonances. There is no always valid rule to decide how long the propagation needs to be +extended, because the fluctuations might be strongly system dependent. It is always a good idea to +check whether the obtained spectrum has converged with respect to further extension of the sampling. ### Field properties -The field perturbation (the $\delta$-kick) is defined by its amplitude and polarization. - -The amplitude depends on the system of interest, a typical value is $10^{-3}$. Also in this case a +The field perturbation (the $\delta$-kick) is defined by its amplitude and polarization. The +amplitude depends on the system of interest, a typical value is $10^{-3}$. Also in this case a convergence check by running more than one propagation at different amplitudes is the best way to asses the parameter. Within the linear regime, the response of the system should double by twice the field's amplitude. Note that when applying a too-low field, numerical noise might become dominant. @@ -257,29 +254,24 @@ For isolated CO, $10^{-3}$ is a good value. **Please note that the actual perturbation applied in CP2K is not [DELTA_PULSE_SCALE](#CP2K_INPUT.FORCE_EVAL.DFT.REAL_TIME_PROPAGATION.DELTA_PULSE_SCALE) and depends -on the cell size. The corresponding amplitude value is written in the output file just before, when -RTP is initialized** +on the cell size. The corresponding amplitude value is written in the output file, as part of the +RTP initialization** -The field's polarization determines what excited states are most probably triggered since the -electric field and the transition dipole moment should be non-perpendicular. For the present -example, we know that the electronic transition at 529 eV is perpendicular to the CO bond. For the -geometry we are using, it means that the field polarization should be along $x$ (or $y$) , i.e., +The field's polarization determines what excited states are most probably triggered, according to +the selection rules. For the present example, we know that the electronic transition at 529 eV is +perpendicular to the CO bond. For the geometry we are using, it means that the field polarization +should be along $x$ (or $y$) , i.e., [DELTA_PULSE_DIRECTION](#CP2K_INPUT.FORCE_EVAL.DFT.REAL_TIME_PROPAGATION.DELTA_PULSE_DIRECTION) to `1 0 0` and [DELTA_PULSE_SCALE](#CP2K_INPUT.FORCE_EVAL.DFT.REAL_TIME_PROPAGATION.DELTA_PULSE_SCALE) to `0.001`. ### Note about the choice of the Gauge -For an isolated system, use the length gauge implementation because the perturbation is applied up -to all perturbative orders by setting +For an isolated system, the length gauge form coupling coupling the position and the electric field +operators can be employed to all perturbative orders by setting [PERIODIC](#CP2K_INPUT.FORCE_EVAL.DFT.REAL_TIME_PROPAGATION.PERIODIC) to `.FALSE.`. -For condensed phase systems, use the velocity gauge instead by setting +For condensed phase systems, the velocity gauge form, implying a gauge transformation involving the +vector potential is instead required, and in CP2K it is activated by setting [PERIODIC](#CP2K_INPUT.FORCE_EVAL.DFT.REAL_TIME_PROPAGATION.PERIODIC) to `.TRUE.`. In this case, the perturbation will be applied only within the first order. - -## Analyzing the results - -The a jupyter notebook: -[download this file](https://www.cp2k.org/_media/howto:delta_kick_analyse.zip). provides some tools -to analyse and verify the results obtained by running this example.