# Difference between revisions of "Prerequisites for Real Time propagation with Yambo"

(First version of the page created) |
|||

Line 1: | Line 1: | ||

− | + | The real-time response using the equation of motion for the density matrix is obtained via the <code>yambo_rt</code> and <code>ypp_rt</code> excutables. <br> | |

− | The real-time response using the Time-Dependent Schroedinger Equation(TDSE) | + | The real-time response using the Time-Dependent Schroedinger Equation (TDSE) is obtained via the <code>yambo_nl</code> and <code>ypp_nl</code> excutables. <br> |

+ | Since the TDSE is used to extract non linear properties which are much smaller (if weak perturbations are used), numerical accuracy is very important. Thus the code needs to be compiled in double precision. To this end, just add the flag <code>--enable-dp</code> when running the <code>configure</code>. <br> If you have problems in the compilation please have a look to [http://www.yambo-code.org/wiki/index.php?title=Installation compiling yambo]. | ||

− | |||

− | Before running the real time simulations in any of the two schemes described in the [[Introduction to Real Time propagation in Yambo| Introduction to Real Time propagation in Yambo]] the following steps need to be performed: | + | |

+ | Before running the real time simulations in any of the two schemes described in the [[Introduction to Real Time propagation in Yambo| Introduction to Real Time propagation in Yambo]] the following steps need to be performed. The firsts are common to any yambo calculation and we repeat them here for consistency. The last steps are specific for real time simulations. | ||

+ | Let's consider consider a single later of hexagonal boron nitride (hBN) to describe the procedure. If you didn't befpre, You can download input files and Yambo databases for this tutorial here: [http://www.yambo-code.org/educational/tutorials/files/hBN-2D-RT.tar.gz hBN-2D-RT]. | ||

==DFT calculations== | ==DFT calculations== | ||

− | + | The first input file is a self-consistent(SCF) calculation that is used to generate the density of the system. The second input file is a non-self consistent(NSCF) calculation to diagonalize the KS Hamiltonian, which depends on the density of the first run, on for a given number of bands and k-points. Notice that parameters in the NSCF calculation determine the number of k-points and the maximum number of bands that can be used in Lumen. Run this calculation with the command: | |

pw.x -inp hBN_2D_scf.in > output_scf | pw.x -inp hBN_2D_scf.in > output_scf | ||

Line 28: | Line 30: | ||

==Setup== | ==Setup== | ||

− | Generate the setup input file with the command <code> | + | Below <code>yambo_td</code> is used for any of the two executables <code>yambo_rt</code> or <code>yambo_nl</code>.<br> |

+ | Generate the setup input file with the command <code>yambo_td -i -V RL -F setup.in</code>, then run <code>yambo_td -F setup.in</code>. You can reduce the number of G-vectors in the setup in such a way to speed up calculations. It is advised to reduce the number of G-vectors to 1000 (about 50% of the initial ones). | ||

## Revision as of 15:01, 16 January 2020

The real-time response using the equation of motion for the density matrix is obtained via the `yambo_rt`

and `ypp_rt`

excutables.

The real-time response using the Time-Dependent Schroedinger Equation (TDSE) is obtained via the `yambo_nl`

and `ypp_nl`

excutables.

Since the TDSE is used to extract non linear properties which are much smaller (if weak perturbations are used), numerical accuracy is very important. Thus the code needs to be compiled in double precision. To this end, just add the flag `--enable-dp`

when running the `configure`

.

If you have problems in the compilation please have a look to compiling yambo.

Before running the real time simulations in any of the two schemes described in the Introduction to Real Time propagation in Yambo the following steps need to be performed. The firsts are common to any yambo calculation and we repeat them here for consistency. The last steps are specific for real time simulations. Let's consider consider a single later of hexagonal boron nitride (hBN) to describe the procedure. If you didn't befpre, You can download input files and Yambo databases for this tutorial here: hBN-2D-RT.

## DFT calculations

The first input file is a self-consistent(SCF) calculation that is used to generate the density of the system. The second input file is a non-self consistent(NSCF) calculation to diagonalize the KS Hamiltonian, which depends on the density of the first run, on for a given number of bands and k-points. Notice that parameters in the NSCF calculation determine the number of k-points and the maximum number of bands that can be used in Lumen. Run this calculation with the command:

pw.x -inp hBN_2D_scf.in > output_scf pw.x -inp hBN_2D_nscf.nscf.in > output_nscf

Notice that in the NSCF file of QuantumEspresso we use the flag `force_symmorphic=.true.`

to exclude the non-symmorphic symmetries that are not supported by Yambo.

## Import the wave-functions

If you used QuantumEspresso go in the folder `hBN_2D.save`

. Then import the wave-function with the command

for QuantumEspresso:
```
p2y -F data-file.xml
```

## Setup

Below `yambo_td`

is used for any of the two executables `yambo_rt`

or `yambo_nl`

.

Generate the setup input file with the command `yambo_td -i -V RL -F setup.in`

, then run `yambo_td -F setup.in`

. You can reduce the number of G-vectors in the setup in such a way to speed up calculations. It is advised to reduce the number of G-vectors to 1000 (about 50% of the initial ones).

## Reduce symmetries

Since in real-time simulation we introduce a finite electric field in the Hamiltonian, the number of the symmetries of the original system is reduced due to the presence of this field. Using the tool `ypp -y`

to generate the input file:

fixsyms # [R] Reduce Symmetries % Efield1 0.00 | 1.00 | 0.00 | # First external Electric Field % % Efield2 0.00 | 0.00 | 0.00 | # Additional external Electric Field % #RmAllSymm # Remove all symmetries RmTimeRev # Remove Time Reversal

Set the external field in the y-direction and uncomment the Time Reversal flag, as shown in red above. Run `ypp`

and it will create a new folder called `FixSymm`

with the reduced symmetries wave-functions.

## Setup again

Go in the `FixSymm`

directory and run the setup again `yambo_nl -F ../setup.in`

. Now everything is ready for the real-time simulations!