Real-time dynamics with external field read from file

From Lumen wiki
Jump to navigationJump to search
external field from file
external field from file

In this tutorial we will see how to generate an external field in a format compatible with Lumen and then use it to run real-time simulation (see for instance Ref. [1].

We will also prove a simple python script to do it, that you can easily modify to create your own external field.

The tutorial is divided in three sections: 1) generate external field with YamboPy, 2) generate external field with ypp_rt 3) use the external field in the real-time calculations.

Generate external field with YamboPy

Generate external field with ypp_rt

With ypp_rt one can generate all external fields that implemented in the Yambo code in the file src/modules/mod_fields.F. This can be usefull to visualize external fields used in Yambo without the need of running a real simulation. However if you want to add a new external field you have to code it in the file src/modules/mod_fields.F. The command to generate external field on file is: ypp_rt -rtplot f. This will generate the following input file:

TDplots                          # [R] TD observables plot
RTtime                           # [R] Post-Processing kind: function of time
RTfields                         # [R] Analize time-dependent fields
TimeStep= 0.010000         fs    # Time step
% TimeRange
0.000000 |100.000000 |         fs    # Time-window where processing is done
%
% EnRngeRt
  0.00000 | 20.00000 |         eV    # Energy range
%
ETStpsRt= 200                    # Total Energy steps
ChirpFac= 0.000000         fs    # Prefactor for linear chirping in frequency space
Field1_Freq= 2.000000      eV    # [RT Field1] Frequency
Field1_Int= 1000.000000       kWLm2 # [RT Field1] Intensity
Field1_Width= 0.000000     fs    # [RT Field1] Width
Field1_kind= "SIN"              # [RT Field1] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)
Field1_pol= "linear"               # [RT Field1] Pol(linear|circular)
% Field1_Dir
  1.000000 | 0.000000 | 0.000000 |        # [RT Field1] Versor
%
Field1_Tstart= 0.010000   fs    # [RT Field1] Initial Time

In the input file you have to specify a series of parameters, in red: the time step (TimeSpep), the time range (TimeRange), the field intensity (Field1_Int), the field kind (Field1_kind), its polarization, the field direction (Field1_Dir) and its starting time (Field1_Tstart), usually the first step of the dynamics. Then you run ypp_rt with this input and it will produce a series of files: YPP_EXTFIELD1_P1.time, YPP_EXTFIELD1_P2.time, YPP_EXTFIELD1_P1.freq, YPP_EXTFIELD1_P2.freq.

These files contain the external field and its Fourier transform. In the next section we will see how to use them in real-time dynamics.

Use generated external field with yambo_rt/yambo_nl

References

  1. D. Sangalli, Excitons and carriers in transient absorption and time-resolved ARPES spectroscopy: An ab initio approach, Phys. Rev. Materials 5, 083803, (2021).