# Czechia 2026 This page provides the instructions and tutorials of Yambo hands-on sessions for the course organized by IT4I in collaboration with MaX CoE and NCC Czechia. Webpage of the event: [Hands-on many-body calculations with the Yambo code](https://events.it4i.cz/event/393/). ```{card} :margin: 5 5 auto auto :width: 75% :img-background: ../media/cz-it4i_handson_2026.png :img-alt: it4i handson title :link: https://events.it4i.cz/event/393/ ``` --- ## General instructions ### Scratch folder The tutorial calculations should be run in the `/scratch` storage space. First, create a folder named with your username with the following command ```{code-block} none $ mkdir /scratch/project/atr-25-5/YAMBO_SCHOOL/$USER ``` Then, add the following line in your `~/.bashrc` file: ```{code-block} none export MY_SCRATCH=/scratch/project/atr-25-5/YAMBO_SCHOOL/${USER} ``` Finally, either type `source ~/.bashrc` in your terminal or log out and log back in. You should now be able to `cd` directly to your scratch folder: ```{code-block} none $ cd $MY_SCRATCH ``` This is where you will copy the tutorial files and run the calculations. ### Gnuplot During the tutorials it may be useful to quickly visualize some of the plots. You can use `gnuplot` from a **login** node. To do so, you must connect via `ssh -X` and load `gnuplot` with ```{code-block} none $ module load gnuplot/5.4.6-GCCcore-12.2.0 ``` ```{note} You can always copy the data to you local machine and plot them with your favourite tool. ``` --- ## Tutorials Follow the tutorials listed below (you may want to skip the optional sections present in some of them). ```{important} Ignore the download instructions at the beginning of the tutorials. Instead, copy the tutorial files from `/scratch/project/atr-25-5/YAMBO_SCHOOL/TUTORIAL_FILES/` in your scratch folder, as shown below. ``` ### Getting started with Yambo We will run this part on CPUs in interactive mode. First, open a CPU interactive session on a compute node with ```{code-block} none $ salloc --account=ATR-25-5 --nodes=1 --ntasks-per-node=1 --cpus-per-task=1 --partition=qcpu_exp --time=01:00:00 --reservation=ATR-25-5_2026-05-05T09:00_2026-05-05T13:00__qcpu ``` then load Yambo with ```{code-block} none $ source /scratch/project/atr-25-5/YAMBO_SCHOOL/TUTORIAL_FILES/load_yambo_cpu ``` (this also sets the `OMP_NUM_THREADS` environment variable). 1. **Optics at the independent particle level** ```{code-block} none $ cd $MY_SCRATCH $ cp -r /scratch/project/atr-25-5/YAMBO_SCHOOL/TUTORIAL_FILES/DAY_1/hBN . ``` [Go to the tutorial](#optics-ipa-tutorial-target) 2. **RPA and local field effects** ```{code-block} none $ cd $MY_SCRATCH $ cp -r /scratch/project/atr-25-5/YAMBO_SCHOOL/TUTORIAL_FILES/DAY_1/hBN-2D . ``` [Go to the tutorial](#local-fields-tutorial-target) ### Run Yambo on a HPC machine We will run these tutorials on CPU and GPU, some parts in interactive mode and others via job submission scripts. 1. **GW calculation and parallelization schemes** Open an interactive session on GPU with the following command ```{code-block} none $ salloc --account=ATR-25-5 --nodes=1 --ntasks-per-node=1 --gpus=1 --cpus-per-task=8 --partition=qgpu_exp --time=01:00:00 --reservation=ATR-25-5_2026-05-06T09:00_2026-05-06T13:00__qgpu ``` Then load Yambo with ```{code-block} none $ source /scratch/project/atr-25-5/YAMBO_SCHOOL/TUTORIAL_FILES/load_yambo_gpu ``` (this also sets the `OMP_NUM_THREADS` environment variable). ```{attention} When running in interactive mode on GPU, run Yambo with `mpirun yambo`. ``` For this tutorial we also need `python`: ```{code-block} none $ source /scratch/project/atr-25-5/YAMBO_SCHOOL/TUTORIAL_FILES/load_python ``` Now copy the files in your scratch directory: ```{code-block} none $ cd $MY_SCRATCH $ cp -r /scratch/project/atr-25-5/YAMBO_SCHOOL/TUTORIAL_FILES/DAY_2/MoS2_HPC_tutorial . ``` [Go to the tutorial](#gw-on-mos2-hpc-tutorial-target) 2. **BSE calculation and solvers** Open an interactive session on CPU with the following command ```{code-block} none $ salloc --account=ATR-25-5 --nodes=1 --ntasks-per-node=1 --cpus-per-task=1 --partition=qcpu_exp --time=01:00:00 --reservation=atr-25-5_2026-05-07T09:00_2026-05-07T13:00__qcpu ``` Then load Yambo with ```{code-block} none $ source /scratch/project/atr-25-5/YAMBO_SCHOOL/TUTORIAL_FILES/load_yambo_cpu ``` (this also sets the `OMP_NUM_THREADS` environment variable). Now copy the files in your scratch directory: ```{code-block} none $ cd $MY_SCRATCH $ cp -r /scratch/project/atr-25-5/YAMBO_SCHOOL/TUTORIAL_FILES/DAY_3/MoS2_HPC_BSE_tutorial . ``` [Go to the tutorial](#bse-on-mos2-hpc-tutorial-target)