<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.yambo-code.eu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Conor</id>
	<title>The Yambo Project - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.yambo-code.eu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Conor"/>
	<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Special:Contributions/Conor"/>
	<updated>2026-04-04T06:08:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Test_images&amp;diff=5973</id>
		<title>Test images</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Test_images&amp;diff=5973"/>
		<updated>2022-06-01T09:04:12Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;testing image upload&lt;br /&gt;
[[File:Stack4-rev2.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
[[File:K doping spin v2.png|thumb]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=File:K_doping_spin_v2.png&amp;diff=5972</id>
		<title>File:K doping spin v2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=File:K_doping_spin_v2.png&amp;diff=5972"/>
		<updated>2022-06-01T09:03:57Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ok&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Test_images&amp;diff=5969</id>
		<title>Test images</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Test_images&amp;diff=5969"/>
		<updated>2022-05-31T15:16:31Z</updated>

		<summary type="html">&lt;p&gt;Conor: Created page with &amp;quot;testing image upload thumb&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;testing image upload&lt;br /&gt;
[[File:Stack4-rev2.png|thumb]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=File:Stack4-rev2.png&amp;diff=5968</id>
		<title>File:Stack4-rev2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=File:Stack4-rev2.png&amp;diff=5968"/>
		<updated>2022-05-31T15:16:22Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;just a test&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Developers_Corner&amp;diff=5967</id>
		<title>Developers Corner</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Developers_Corner&amp;diff=5967"/>
		<updated>2022-05-31T15:14:42Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Development Repositories ==&lt;br /&gt;
** [[Test-suite-simple|Test-suite (for dummies)]]&lt;br /&gt;
** [[Test-suite | Test-suite]]&lt;br /&gt;
** [[Benchmark-suite | Benchmark-suite]]&lt;br /&gt;
** [[Educational]]&lt;br /&gt;
* Special pages&lt;br /&gt;
** [[Special:AllPages | All Pages]]&lt;br /&gt;
** [[MediaWiki:Sidebar | Side Bar]]&lt;br /&gt;
** [[under construction | Html2Wiki HOWTO]]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Help:Wikitext Wikitext Help]&lt;br /&gt;
&lt;br /&gt;
== Reducing the size of the VM image ==&lt;br /&gt;
Open a terminal in the VM and type&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k&lt;br /&gt;
 sudo rm -rf /bigemptyfile&lt;br /&gt;
&lt;br /&gt;
== Sandbox (for testing) ==&lt;br /&gt;
&lt;br /&gt;
[[Test images]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Developers_Corner&amp;diff=5966</id>
		<title>Developers Corner</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Developers_Corner&amp;diff=5966"/>
		<updated>2022-05-31T15:13:55Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Development Repositories ==&lt;br /&gt;
** [[Test-suite-simple|Test-suite (for dummies)]]&lt;br /&gt;
** [[Test-suite | Test-suite]]&lt;br /&gt;
** [[Benchmark-suite | Benchmark-suite]]&lt;br /&gt;
** [[Educational]]&lt;br /&gt;
* Special pages&lt;br /&gt;
** [[Special:AllPages | All Pages]]&lt;br /&gt;
** [[MediaWiki:Sidebar | Side Bar]]&lt;br /&gt;
** [[under construction | Html2Wiki HOWTO]]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Help:Wikitext Wikitext Help]&lt;br /&gt;
&lt;br /&gt;
== Reducing the size of the VM image ==&lt;br /&gt;
Open a terminal in the VM and type&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k&lt;br /&gt;
 sudo rm -rf /bigemptyfile&lt;br /&gt;
&lt;br /&gt;
== Sandbox (for testing) ==&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=3617</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=3617"/>
		<updated>2020-01-23T14:34:35Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Monday 27 Jan HANDS-ON 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Tutorial files ===&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of the following pre-prepared Yambo databases or DFT input files:&amp;lt;br&amp;gt;&lt;br /&gt;
DAY 1-2-3. hBN-3D and hBN-2D&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] (237 MB) &lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] (8.6 MB)&amp;lt;br&amp;gt;&lt;br /&gt;
DAY 3. hBN-2D with higher convergence parameters for parallel tutorials:&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] (137 MB)&amp;lt;br&amp;gt;&lt;br /&gt;
DAY 4. hBN-2D and AlAs for real time simulations&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-RT.tar.gz hBN-2D-RT.tar.gz] (10 MB)&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/AlAs.tar.gz AlAs.tar.gz] (10 MB)&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
&#039;&#039;&#039;14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
&amp;lt;!-- * [[First steps: a walk through from DFT to optical properties]] --&amp;gt;&lt;br /&gt;
* [[First steps: walk through from DFT to RPA (standalone)]]&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
Link to old CECAM specific cases: [[GW_parallel_strategies_CECAM]] and [[Pushing_convergence_in_parallel_CECAM]]&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real-time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Pedro Melo&lt;br /&gt;
&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3616</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3616"/>
		<updated>2020-01-23T14:30:44Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt; for plotting spectra&lt;br /&gt;
&lt;br /&gt;
==Download the Files==&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
==DFT calculation of bulk hBN and conversion to Yambo==&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
&lt;br /&gt;
=== DFT calculations ===&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Yambo format ===&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Initialization of Yambo databases==&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Every Yambo run &#039;&#039;&#039;must&#039;&#039;&#039; start with this step. Go to the folder &#039;&#039;containing&#039;&#039; the hBN-bulk &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
and simply launch the code&lt;br /&gt;
 $ yambo &lt;br /&gt;
This will run the initialization (setup) &#039;&#039;runlevel&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TIP&#039;&#039;&#039;: do not run yambo from &#039;&#039;inside&#039;&#039; the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; folder! In fact, if you ever see the message:&lt;br /&gt;
 yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)&lt;br /&gt;
it usually means you are trying to launch Yambo &#039;&#039;&#039;from the wrong place&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Three new elements will appear:&lt;br /&gt;
===Run-time output===&lt;br /&gt;
This is typically written to standard output (on screen) and tracks the progress of the run in real time:&lt;br /&gt;
 &amp;lt;---&amp;gt; [01] CPU structure, Files &amp;amp; I/O Directories&lt;br /&gt;
 &amp;lt;---&amp;gt; [02] CORE Variables Setup&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.01] Unit cells&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.02] Symmetries&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.03] RL shells&lt;br /&gt;
 &amp;lt;---&amp;gt; Shells finder |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.04] K-grid lattice&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
 &amp;lt;---&amp;gt; [03] Transferred momenta grid&lt;br /&gt;
 &amp;lt;---&amp;gt; BZ -&amp;gt; IBZ reduction |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; X indexes |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; SE indexes |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; [05] Game Over &amp;amp; Game summary&lt;br /&gt;
Specific runlevels are indicated with numeric labels like [02.02]. &amp;lt;br&amp;gt;&lt;br /&gt;
The hashes (#) indicate progress of the run in Wall Clock time, indicating the elapsed (E) and expected (X) time to complete a runlevel, and the percentage of the task complete.&lt;br /&gt;
&lt;br /&gt;
If Yambo is launched using a script, or as a background process, or in parallel, this output will appear in a log file prefixed by the letter &#039;&#039;l&#039;&#039;, in this case as &#039;&#039;l_setup&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If this log file already exists from a previous run, it will not be overwritten. Instead, a new file will be created with an incrementing numerical label, e.g. &#039;&#039;l_setup_01, l_setup_02&#039;&#039;, etc. &#039;&#039;&#039;This applies to all files created by Yambo&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In the case of parallel runs, CPU-dependent log files will appear inside a &#039;&#039;LOG&#039;&#039; folder, e.g. &lt;br /&gt;
 $ mpirun -np 4 yambo &lt;br /&gt;
 $ ls LOG&lt;br /&gt;
 l_setup_CPU_1   l_setup_CPU_2  l_setup_CPU_3  l_setup_CPU_4&lt;br /&gt;
This behaviour can be controlled at runtime - see the Parallel tutorial for details.&lt;br /&gt;
&lt;br /&gt;
===New core databases===&lt;br /&gt;
New databases appear in the &#039;&#039;SAVE&#039;&#039; folder:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1 ns.wf ns.kb_pp_pwscf &#039;&#039;&#039;ndb.gops ndb.kindx&#039;&#039;&#039;&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These contain information about the &#039;&#039;G&#039;&#039;-vector shells and &#039;&#039;k/q&#039;&#039;-point meshes as defined by the DFT calculation.&lt;br /&gt;
&lt;br /&gt;
In general: a database called &#039;&#039;n&#039;&#039;&#039;s&#039;&#039;&#039;.xxx&#039;&#039; is a &#039;&#039;static&#039;&#039; database, generated once by &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;, while databases called &#039;&#039;n&#039;&#039;&#039;db&#039;&#039;&#039;.xxx&#039;&#039; are &#039;&#039;dynamically&#039;&#039; generated while you use &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TIP&#039;&#039;&#039;: if you launch &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt;, but it does not seem to do anything, check that these files are present.&lt;br /&gt;
&lt;br /&gt;
===Report file===&lt;br /&gt;
A report file &#039;&#039;r_setup&#039;&#039; is generated in the run directory. &lt;br /&gt;
This mostly reports information about the ground state system as defined by the DFT run, but also adds information about the band gaps, occupations, shells of G-vectors, IBZ/BZ grids, the CPU structure (for parallel runs), and so on. Some points of note:&lt;br /&gt;
&lt;br /&gt;
  [02.03] RL shells&lt;br /&gt;
  =================&lt;br /&gt;
  Shells, format: [S#] G_RL(mHa)&lt;br /&gt;
   [S453]:8029(0.7982E+5) [S452]:8005(0.7982E+5) [S451]:7981(0.7982E+5) [S450]:7957(0.7942E+5)&lt;br /&gt;
   ...&lt;br /&gt;
   [S4]:11( 1183.) [S3]:5( 532.5123) [S2]:3( 133.1281) [S1]:1( 0.000000)&lt;br /&gt;
&lt;br /&gt;
This reports the set of closed reciprocal lattice (RL) shells defined internally that contain G-vectors with the same modulus. &lt;br /&gt;
The highest number of RL vectors we can use is 8029.  Yambo will always redefine any input variable in RL units to the nearest closed shell.&lt;br /&gt;
&lt;br /&gt;
  [02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
  Fermi Level        [ev]:  5.112805&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  3.876293&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.460E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 3.876293  7.278081&lt;br /&gt;
  Direct Gaps        [ev]:  4.28829  11.35409&lt;br /&gt;
  X BZ K-points :  72&lt;br /&gt;
&lt;br /&gt;
Yambo recalculates again the Fermi level (close to the value of 5.06 noted in the PWscf SCF calculation). From here on, however, the Fermi level is set to zero, and other eigenvalues are shifted accordingly. The system is insulating (8 filled, 92 empty) with an indirect band gap of 3.87 eV. The minimum and maximum direct and indirect gaps are indicated. There are 72 k-points in the full BZ, generated using symmetry from the 14 k-points in our user-defined grid.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TIP&#039;&#039;&#039;: You should inspect the report file after &#039;&#039;every&#039;&#039; run for errors and warnings.&lt;br /&gt;
&lt;br /&gt;
===2D hBN===&lt;br /&gt;
Simply repeat the steps above. Go to the folder &#039;&#039;containing&#039;&#039; the hBN-sheet &#039;&#039;SAVE&#039;&#039; directory and launch &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt;:&lt;br /&gt;
 $ cd TUTORIALS/hBN-2D/YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
 $ yambo&lt;br /&gt;
Again, inspect the &#039;&#039;r_setup&#039;&#039; file, output logs, and verify that &#039;&#039;ndb.gops&#039;&#039; and &#039;&#039;ndb.kpts&#039;&#039; have been created inside the SAVE folder.&lt;br /&gt;
&lt;br /&gt;
You are now ready to use Yambo!&lt;br /&gt;
&lt;br /&gt;
==Yambo&#039;s command line interface==&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to select tasks, generate and modify input files, and control the runtime behaviour by using Yambo&#039;s command line interface.&lt;br /&gt;
&lt;br /&gt;
Command line options are divided into &#039;&#039;&#039;uppercase&#039;&#039;&#039; and &#039;&#039;&#039;lowercase&#039;&#039;&#039; options:&lt;br /&gt;
* Lowercase: select tasks, generate input files, and (by default) launch a file editor&lt;br /&gt;
* Uppercase: modify Yambo&#039;s default settings, at run time and when generating input files&lt;br /&gt;
Lowercase and uppercase options can be used together.&lt;br /&gt;
&lt;br /&gt;
=== Input file generator ===&lt;br /&gt;
First, move to the appropriate folder and initialize the Yambo databases if you haven&#039;t already done so.&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
 $ yambo                    &#039;&#039;(initialize)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Yambo generates its own input files: you just tell the code what you want to calculate by launching Yambo along with one or more &#039;&#039;&#039;lowercase&#039;&#039;&#039; options. &lt;br /&gt;
&lt;br /&gt;
====Allowed options====&lt;br /&gt;
To see the list of runlevels and options, run &amp;lt;code&amp;gt;yambo -h&amp;lt;/code&amp;gt; or better,&lt;br /&gt;
 $ yambo -H&lt;br /&gt;
 This is yambo 4.4.0 rev.148&lt;br /&gt;
 A shiny pot of fun and happiness [C.D.Hogan] &lt;br /&gt;
 -h		:Short Help&lt;br /&gt;
 -H		:Long Help&lt;br /&gt;
 -J &amp;lt;opt&amp;gt;	:Job string identifier&lt;br /&gt;
 -V &amp;lt;opt&amp;gt;	:Input file verbosity[opt=RL,kpt,sc,qp,io,gen,resp,all,par]&lt;br /&gt;
 -F &amp;lt;opt&amp;gt;	:Input file&lt;br /&gt;
 -I &amp;lt;opt&amp;gt;	:Core I/O directory&lt;br /&gt;
 -O &amp;lt;opt&amp;gt;	:Additional I/O directory&lt;br /&gt;
 -C &amp;lt;opt&amp;gt;	:Communications I/O directory&lt;br /&gt;
 -D		:DataBases properties&lt;br /&gt;
 -W &amp;lt;opt&amp;gt;	:Wall Time limitation (1d2h30m format)&lt;br /&gt;
 -Q		:Don&#039;t launch the text editor&lt;br /&gt;
 -E &amp;lt;opt&amp;gt;	:Environment Parallel Variables file&lt;br /&gt;
 -M		:Switch-off MPI support (serial run)&lt;br /&gt;
 -N		:Switch-off OpenMP support (single thread run)&lt;br /&gt;
 -i		:Initialization&lt;br /&gt;
 -o &amp;lt;opt&amp;gt;	:Optics [opt=(c)hi is (G)-space / (b)se is (eh)-space ]&lt;br /&gt;
 -k &amp;lt;opt&amp;gt;	:Kernel [opt=hartree/alda/lrc/hf/sex](hf/sex only eh-space; lrc only G-space)&lt;br /&gt;
 -y &amp;lt;opt&amp;gt;	:BSE solver [opt=h/d/s/(p/f)i](h)aydock/(d)iagonalization/(i)nversion&lt;br /&gt;
 -r		:Coulomb potential&lt;br /&gt;
 -x		:Hartree-Fock Self-energy and local XC&lt;br /&gt;
 -d		:Dynamical Inverse Dielectric Matrix&lt;br /&gt;
 -b		:Static Inverse Dielectric Matrix&lt;br /&gt;
 -p &amp;lt;opt&amp;gt;	:GW approximations [opt=(p)PA/(c)HOSEX]&lt;br /&gt;
 -g &amp;lt;opt&amp;gt;	:Dyson Equation solver[opt=(n)ewton/(s)ecant/(g)reen]&lt;br /&gt;
 -l		:GoWo Quasiparticle lifetimes&lt;br /&gt;
 -a		:ACFDT Total Energy&lt;br /&gt;
 -s		:ScaLapacK test&lt;br /&gt;
&lt;br /&gt;
Any time you launch Yambo with a lowercase option, Yambo will generate the appropriate input file (default name: &#039;&#039;yambo.in&#039;&#039;) and launch the &amp;lt;code&amp;gt;vi&amp;lt;/code&amp;gt; editor. &lt;br /&gt;
&lt;br /&gt;
Editor choice can be changed at configure; alternatively you can use the &amp;lt;code&amp;gt;-Q&amp;lt;/code&amp;gt; run time option to skip the automatic editing (do this if you are not familiar with &amp;lt;code&amp;gt;vi&amp;lt;/code&amp;gt;!):&lt;br /&gt;
 $ yambo -x -Q&lt;br /&gt;
 yambo: input file yambo.in created&lt;br /&gt;
 $ emacs yambo.in     &#039;&#039;or your favourite editing tool&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Combining options====&lt;br /&gt;
Multiple options can be used together to activate various tasks or runlevels (in some cases this is actually a necessity). &lt;br /&gt;
For instance, to generate an input file for optical spectra including local field effects (Hartree approximation), do (and then exit)&lt;br /&gt;
 $ yambo -o c -k hartree       &#039;&#039;which switches on:&#039;&#039;&lt;br /&gt;
 optics                       # [R OPT] Optics&lt;br /&gt;
 chi                          # [R CHI] Dyson equation for Chi.&lt;br /&gt;
 Chimod= &amp;quot;Hartree&amp;quot;            # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
To perform a Hartree-Fock and GW calculation using a plasmon-pole approximation, do (and then exit):&lt;br /&gt;
 $ yambo -x -g n -p p        &#039;&#039;which switches on:&#039;&#039;&lt;br /&gt;
 HF_and_locXC                 # [R XX] Hartree-Fock Self-energy and Vxc&lt;br /&gt;
 gw0                          # [R GW] GoWo Quasiparticle energy levels&lt;br /&gt;
 ppa                          # [R Xp] Plasmon Pole Approximation&lt;br /&gt;
 em1d                         # [R Xd] Dynamical Inverse Dielectric Matrix      &lt;br /&gt;
Each runlevel activates its own list of variables and flags.&lt;br /&gt;
&lt;br /&gt;
===Changing input parameters ===&lt;br /&gt;
Yambo reads various parameters from existing database files and/or input files and uses them to suggest values or ranges. &lt;br /&gt;
Let&#039;s illustrate this by generating the input file for a Hartree-Fock calculation. &lt;br /&gt;
&lt;br /&gt;
 $ yambo -x&lt;br /&gt;
Inside the generated input file you should find:&lt;br /&gt;
 [[Variables#EXXRLvcs|EXXRLvcs]] =  3187        RL    # [XX] Exchange RL components&lt;br /&gt;
 %[[Variables#QPkrange|QPkrange]]                    # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
   1| 14|  1|100|&lt;br /&gt;
 %&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Variables#QPkrange|QPkrange]]&amp;lt;/code&amp;gt; variable (follow the link for a &amp;quot;detailed&amp;quot; explanation for any variable) suggests a range of k-points (1 to 14) and bands (1 to 100) based on what it finds in the core database &#039;&#039;SAVE/ns.db1&#039;&#039;, i.e. as defined by the DFT code. &amp;lt;br&amp;gt;&lt;br /&gt;
Leave that variable alone, and instead modify the previous variable to &amp;lt;code&amp;gt;EXXRLvcs=  1000        RL&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file, and now generate the input a second time with &amp;lt;code&amp;gt;yambo -x&amp;lt;/code&amp;gt;. You will see:&lt;br /&gt;
  [[Variables#EXXRLvcs|EXXRLvcs]]=  1009        RL&lt;br /&gt;
This indicates that Yambo has read the new input value (1000 G-vectors), checked the database of G-vector shells &#039;&#039;(SAVE/ndb.gops)&#039;&#039;, &lt;br /&gt;
and changed the input value to one that fits a completely closed shell.&lt;br /&gt;
&lt;br /&gt;
Last, note that Yambo variables can be expressed in different &#039;&#039;&#039;units&#039;&#039;&#039;. In this case, &amp;lt;code&amp;gt;RL&amp;lt;/code&amp;gt; can be replaced by an energy unit like Ry, eV, Ha, etc. Energy units are generally better as they are independent of the cell size. Technical information is available on the [[Variables]] page. &lt;br /&gt;
&lt;br /&gt;
The input file generator of Yambo is thus an &#039;&#039;intelligent&#039;&#039; parser, which interacts with the user and the existing databases. For this reason we recommend that you always use Yambo to generate the input files, rather than making them yourself.&lt;br /&gt;
&lt;br /&gt;
===Uppercase options===&lt;br /&gt;
Uppercase options modify some of the code&#039;s default settings. They can be used when launching the code but also when generating input files. &lt;br /&gt;
&lt;br /&gt;
====Allowed options====&lt;br /&gt;
To see the list of options, again do:&lt;br /&gt;
 $ yambo -H&lt;br /&gt;
 Tool: yambo 4.1.2 rev.14024&lt;br /&gt;
 Description: A shiny pot of fun and happiness [C.D.Hogan] &lt;br /&gt;
 -J &amp;lt;opt&amp;gt;	:Job string identifier&lt;br /&gt;
 -V &amp;lt;opt&amp;gt;	:Input file verbosity&lt;br /&gt;
                 [opt=RL,kpt,sc,qp,io,gen,resp,all,par]&lt;br /&gt;
 -F &amp;lt;opt&amp;gt;	:Input file&lt;br /&gt;
 -I &amp;lt;opt&amp;gt;	:Core I/O directory&lt;br /&gt;
 -O &amp;lt;opt&amp;gt;	:Additional I/O directory&lt;br /&gt;
 -C &amp;lt;opt&amp;gt;	:Communications I/O directory&lt;br /&gt;
 -D		:DataBases properties&lt;br /&gt;
 -W &amp;lt;opt&amp;gt;	:Wall Time limitation (1d2h30m format)&lt;br /&gt;
 -Q		:Don&#039;t launch the text editor&lt;br /&gt;
 -M		:Switch-off MPI support (serial run)&lt;br /&gt;
 -N		:Switch-off OpenMP support (single thread run)&lt;br /&gt;
 [Lower case options]&lt;br /&gt;
&lt;br /&gt;
Command line options are extremely important to master if you want to use yambo productively. &lt;br /&gt;
Often, the meaning is clear from the help menu:&lt;br /&gt;
 $ yambo -F yambo.in_HF -x    &#039;&#039;Make a Hartree -Fock input file called yambo.in_HF&#039;&#039;&lt;br /&gt;
 $ yambo -D                   &#039;&#039;Summarize the content of the databases in the SAVE folder&#039;&#039;&lt;br /&gt;
 $ yambo -I ../               &#039;&#039;Run the code, using a SAVE folder in a directory one level up&#039;&#039;&lt;br /&gt;
 $ yambo -C MyTest            &#039;&#039;Run the code, putting all report, log, plot files inside a folder MyTest&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
Other options deserve a closer look.&lt;br /&gt;
===Verbosity===&lt;br /&gt;
Yambo uses &#039;&#039;many&#039;&#039; input variables, many of which can be left at their default values. To keep input files short and manageable, only a few variables appear by default  in the inout file. More advanced variables can be switched on by using the &amp;lt;code&amp;gt;-V&amp;lt;/code&amp;gt; verbosity option. These are grouped according to the type of variable. For instance, &amp;lt;code&amp;gt;-V RL&amp;lt;/code&amp;gt; switches on variables related to G vector summations, and &amp;lt;code&amp;gt;-V io&amp;lt;/code&amp;gt; switches on options related to I/O control. Try: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o c -V RL       &#039;&#039;switches on:&#039;&#039;&lt;br /&gt;
 FFTGvecs=  3951        RL    # [FFT] Plane-waves&lt;br /&gt;
 &lt;br /&gt;
 $ yambo -o c -V io       &#039;&#039;switches on:&#039;&#039;&lt;br /&gt;
 StdoHash=  40                # [IO] Live-timing Hashes&lt;br /&gt;
 DBsIOoff= &amp;quot;none&amp;quot;             # [IO] Space-separated list of DB with NO I/O. DB= ...&lt;br /&gt;
 DBsFRAGpm= &amp;quot;none&amp;quot;            # [IO] Space-separated list of +DB to be FRAG and ...&lt;br /&gt;
 #WFbuffIO                    # [IO] Wave-functions buffered I/O&lt;br /&gt;
&lt;br /&gt;
Unfortunately, -V options must be invoked and changed &#039;&#039;one at a time&#039;&#039;. When you are more expert, you may go straight to &amp;lt;code&amp;gt;-V all&amp;lt;/code&amp;gt;, which turns on all possible variables. However note that &amp;lt;code&amp;gt;yambo -o c -V all&amp;lt;/code&amp;gt; adds an extra 30 variables to the input file, which can be confusing: use it with care.&lt;br /&gt;
&lt;br /&gt;
===Job script label===&lt;br /&gt;
The best way to keep track of different runs using different parameters is through the &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; flag. This inserts a label in all output and report files, and creates a new folder containing any new databases (i.e. they are not written in the core &#039;&#039;SAVE&#039;&#039; folder). Try:&lt;br /&gt;
 $ yambo -J 1Ry -V RL -x        &#039;&#039;and modify to&#039;&#039;&lt;br /&gt;
 FFTGvecs = 1 Ry&lt;br /&gt;
 EXXGvecs = 1 Ry&lt;br /&gt;
 $ yambo -J 1Ry           &#039;&#039;Run the code&#039;&#039;&lt;br /&gt;
 $ ls&lt;br /&gt;
 yambo.in SAVE  &lt;br /&gt;
 o-1Ry.hf r-1Ry_HF_and_locXC 1Ry 1Ry/ndb.HF_and_locXC&lt;br /&gt;
This is extremely useful when running convergence tests, trying out different parameters, etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Exercise&#039;&#039;: use &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; to report the properties of all database files (including &#039;&#039;ndb.HF_and_locXC&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in hBN: independent particle approximation ==&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
The dielectric function in the long-wavelength limit, at the independent particle level (RPA without local fields), is essentially given by the following:&lt;br /&gt;
[[File:CH1.png|none|x50px|Yambo tutorial image]]&lt;br /&gt;
In practice, Yambo does not use this expression directly but solves the Dyson equation for the susceptibility &#039;&#039;X&#039;&#039;, which is described in the [[Local fields]] module.&lt;br /&gt;
&lt;br /&gt;
=== Choosing input parameters ===&lt;br /&gt;
Enter the folder for bulk hBN that contains the &#039;&#039;SAVE&#039;&#039; directory, run the initialization and generate the input file. From &amp;lt;code&amp;gt;yambo -H&amp;lt;/code&amp;gt; you should understand that the correct option is &amp;lt;code&amp;gt;yambo -o c&amp;lt;/code&amp;gt;. Let&#039;s add some command line options:&lt;br /&gt;
&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
 $ yambo               &#039;&#039;(initialization)&#039;&#039;&lt;br /&gt;
 $ yambo -F yambo.in_IP -o c&lt;br /&gt;
This corresponds to optical properties in G-space at the independent particle level: in the input file this is indicated by (&amp;lt;code&amp;gt;Chimod= &amp;quot;IP&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Optics runlevel===&lt;br /&gt;
For optical properties we are interested just in the long-wavelength limit &#039;&#039;q = 0&#039;&#039;. This always corresponds to the &#039;&#039;first&#039;&#039; &#039;&#039;q&#039;&#039;-point in the set of possible &#039;&#039;q=k-k&#039; &#039;&#039;-points. &lt;br /&gt;
Change the following variables in the input file to:&lt;br /&gt;
 % [[Variables#QpntsRX|QpntsRXd]]&lt;br /&gt;
  1 |  &#039;&#039;&#039;1&#039;&#039;&#039; |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#ETStpsX|ETStpsXd]]= &#039;&#039;&#039;1001&#039;&#039;&#039;               # [Xd] Total Energy steps&lt;br /&gt;
in order to select just the first &#039;&#039;q&#039;&#039;. The last variable ensures we generate a smooth spectrum. &lt;br /&gt;
Save the input file and launch the code, keeping the command line options as before (i.e., just remove the lower case options):&lt;br /&gt;
 $ yambo -F yambo.in_IP -J Full&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; [05] Optics&lt;br /&gt;
 &amp;lt;---&amp;gt; [LA] SERIAL linear algebra&lt;br /&gt;
 &amp;lt;---&amp;gt; [DIP] Checking dipoles header&lt;br /&gt;
 &amp;lt;---&amp;gt; [x,Vnl] computed using 4 projectors&lt;br /&gt;
 &amp;lt;---&amp;gt; [M  0.017 Gb] Alloc WF ( 0.016)&lt;br /&gt;
 &amp;lt;---&amp;gt; [WF] Performing Wave-Functions I/O from ./SAVE&lt;br /&gt;
 &amp;lt;01s&amp;gt; Dipoles: P and iR (T): |########################################| [100%] 01s(E) 01s(X)&lt;br /&gt;
 &amp;lt;01s&amp;gt; [M  0.001 Gb] Free WF ( 0.016)&lt;br /&gt;
 &amp;lt;01s&amp;gt; [DIP] Writing dipoles header&lt;br /&gt;
 &amp;lt;01s&amp;gt; [X-CG] R(p) Tot o/o(of R)  :   5501   52992     100&lt;br /&gt;
 &amp;lt;01s&amp;gt; Xo@q[1] |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;01s&amp;gt; [06] Game Over &amp;amp; Game summary&lt;br /&gt;
  &lt;br /&gt;
 $ ls&lt;br /&gt;
 Full   SAVE  yambo.in_IP   r_setup&lt;br /&gt;
 o-Full.eel_q1_ip  o-Full.eps_q1_ip  r-Full_optics_chi&lt;br /&gt;
Let&#039;s take a moment to understand what Yambo has done inside the Optics runlevel:&lt;br /&gt;
# Compute the &#039;&#039;[x,Vnl]&#039;&#039; term&lt;br /&gt;
# Read the wavefunctions from disc [WF]&lt;br /&gt;
# Compute the &#039;&#039;dipoles&#039;&#039;, i.e. matrix elements of &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
# Write the dipoles to disk as &#039;&#039;Full/ndb.dip*&#039;&#039; databases. This you can see in the report file:&lt;br /&gt;
 $ grep -A20 &amp;quot;WR&amp;quot; r-Full_optics_chi &lt;br /&gt;
 [WR./Full//ndb.dip_iR_and_P]&lt;br /&gt;
 Brillouin Zone Q/K grids (IBZ/BZ):  14   72   14   72&lt;br /&gt;
 RL vectors                   (WF): 1491&lt;br /&gt;
 Electronic Temperature        [K]: 0.0000000&lt;br /&gt;
 Bosonic    Temperature        [K]: 0.0000000&lt;br /&gt;
 X band range           :   1  100&lt;br /&gt;
 RL vectors in the sum  : 1491&lt;br /&gt;
 [r,Vnl] included       :yes&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, Yambo computes the non-interacting susceptibility &#039;&#039;X&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&#039;&#039; for this &#039;&#039;q&#039;&#039;, and writes the dielectric function inside the &#039;&#039;o-Full.eps_q1_ip&#039;&#039; file for plotting&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Energy cut off===&lt;br /&gt;
&lt;br /&gt;
Before plotting the output, let&#039;s change a few more variables. The previous calculation used &#039;&#039;all&#039;&#039; the G-vectors in expanding the wavefunctions, up to 1491 (~1016 components). This corresponds roughly to the cut off energy of 40Ry we used in the DFT calculation. Generally, however, we can use a smaller value. We use the verbosity to switch on this variable, and a new &#039;&#039;-J&#039;&#039; flag to avoid reading the previous database:&lt;br /&gt;
 $ yambo -F yambo.in_IP &#039;&#039;&#039;-J 6Ry -V RL&#039;&#039;&#039; -o c&lt;br /&gt;
Change the &#039;&#039;&#039;value&#039;&#039;&#039; of &amp;lt;code&amp;gt;[[Variables#FFTGvecs|FFTGvecs]]&amp;lt;/code&amp;gt; and also its &#039;&#039;&#039;unit&#039;&#039;&#039; from &amp;lt;code&amp;gt;RL&amp;lt;/code&amp;gt; (number of G-vectors) to &amp;lt;code&amp;gt;Ry&amp;lt;/code&amp;gt; (energy in Rydberg):&lt;br /&gt;
 [[Variables#FFTGvecs|FFTGvecs]]= &#039;&#039;&#039;6&#039;&#039;&#039;           &#039;&#039;&#039;Ry&#039;&#039;&#039;    # [FFT] Plane-waves&lt;br /&gt;
Save the input file and launch the code again:&lt;br /&gt;
  $ yambo -F yambo.in_IP &#039;&#039;&#039;-J 6Ry -V RL&#039;&#039;&#039;&lt;br /&gt;
and then plot the &#039;&#039;o-Full.eps_q1_ip&#039;&#039; and &#039;&#039;o-6Ry.eps_q1_ip&#039;&#039; files:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; plot &amp;quot;o-Full.eps_q1_ip&amp;quot; w l,&amp;quot;o-6Ry.eps_q1_ip&amp;quot; w p&lt;br /&gt;
&lt;br /&gt;
[[File:CH-hBN-6Ry.png|none|500px|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
Clearly there is very little difference between the two spectra. This highlights an important point in calculating excited state properties: generally, fewer G-vectors are needed than what are needed in DFT calculations. Regarding the spectrum itself, the first peak occurs at about 4.4eV. This is consistent with the minimum direct gap reported by Yambo: 4.28eV. The comparison with experiment (not shown) is very poor however. &lt;br /&gt;
&lt;br /&gt;
If you make some mistake, and cannot reproduce this figure, you should check the value of &amp;lt;code&amp;gt;[[Variables#FFTGvecs|FFTGvecs]]&amp;lt;/code&amp;gt; in the input file, delete the &#039;&#039;6Ry&#039;&#039; folder, and try again - taking care to plot the right file! (e.g. &#039;&#039;o-6Ry.eps_q1_ip_01&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
===q-direction===&lt;br /&gt;
Now let&#039;s select a different component of the dielectric tensor:&lt;br /&gt;
 $ yambo -F yambo.in_IP -J 6Ry -V RL -o c&lt;br /&gt;
 ...&lt;br /&gt;
 % [[Variables#LongDrXd|LongDrXd]]&lt;br /&gt;
 &#039;&#039;&#039;0.000000&#039;&#039;&#039; | 0.000000 | &#039;&#039;&#039;1.000000&#039;&#039;&#039; |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 ...&lt;br /&gt;
 $ yambo -F yambo.in_IP -J 6Ry -V RL&lt;br /&gt;
This time yambo reads from the &#039;&#039;6Ry&#039;&#039; folder, so it does not need to compute the dipole matrix elements again, and the calculation is fast. Plotting gives:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; plot &amp;quot;o-6Ry.eps_q1_ip&amp;quot; t &amp;quot;q || x-axis&amp;quot; w l,&amp;quot;o-6Ry.eps_q1_ip_01&amp;quot; t &amp;quot;q || c-axis&amp;quot; w l&lt;br /&gt;
&lt;br /&gt;
[[File:CH-hBN-ac.png|none|500px|Yambo tutorial image]]&lt;br /&gt;
The absorption is suppressed in the stacking direction. As the interplanar spacing is increased, we would eventually arrive at the absorption of the BN sheet (see [[Local fields]] tutorial).&lt;br /&gt;
&lt;br /&gt;
===Non-local commutator===&lt;br /&gt;
Last, we show the effect of switching off the non-local commutator term (see &#039;&#039;[Vnl,r]&#039;&#039; in the equation at the top of the page) due to the pseudopotential. As there is no option to do this inside yambo, you need to hide the database file. Change back to the &#039;&#039;q || (1 0 0)&#039;&#039; direction, and launch yambo with a different &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; option:&lt;br /&gt;
 $ mv SAVE/ns.kb_pp_pwscf SAVE/ns.kb_pp_pwscf_&#039;&#039;&#039;OFF&#039;&#039;&#039;&lt;br /&gt;
 $ yambo -F yambo.in_IP -J &#039;&#039;&#039;6Ry_NoVnl&#039;&#039;&#039; -o c             &#039;&#039;(change to q || 100)&#039;&#039;&lt;br /&gt;
 $ yambo -F yambo.in_IP -J 6Ry_NoVnl&lt;br /&gt;
Note the warning in the output:&lt;br /&gt;
 &amp;lt;---&amp;gt; [WARNING] Missing non-local pseudopotential contribution&lt;br /&gt;
which also appears in the report file, and noted in the database as &amp;lt;code&amp;gt;[r,Vnl] included       :no&amp;lt;/code&amp;gt;. The difference is tiny:&lt;br /&gt;
[[File:CH-hBN-Vnl.png|none|500px|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
However, when your system is larger, with more projectors in the pseudopotential or more k-points (see the BSE tutorial), the inclusion of &#039;&#039;Vnl&#039;&#039; can make a huge difference in the computational load, so it&#039;s always worth checking to see if the terms are important in your system.&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in 2D BN: local field effects ==&lt;br /&gt;
&lt;br /&gt;
=== Background ===&lt;br /&gt;
[[File:Yambo-handbook-v4.1.2-p-4.png|thumb|Cheatsheet on LFE|150px]]&lt;br /&gt;
The macroscopic dielectric function is obtained by including the so-called local field effects (LFE) in the calculation of the response function. Within the time-dependent DFT formalism this is achieved by solving the Dyson equation for the susceptibility &#039;&#039;X&#039;&#039;. In reciprocal space this is given by:&lt;br /&gt;
[[File:Yambo-CH7.png|none|x50px|Yambo tutorial image]]&lt;br /&gt;
The microscopic dielectric function is related to &#039;&#039;X&#039;&#039; by:&lt;br /&gt;
[[File:Yambo-CH5.png|none|x30px|Yambo tutorial image]]&lt;br /&gt;
and the macroscopic dielectric function is obtained by taking the (0,0) component of the inverse microscopic one:&lt;br /&gt;
[[File:Yambo-CH6.png|none|x60px|Yambo tutorial image]]&lt;br /&gt;
Experimental observables like the optical absorption and the electron energy loss can be obtained from the macroscopic dielectric function:&lt;br /&gt;
[[File:Yambo-CH8.png|none|x60px|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
In the following we will neglect the &#039;&#039;f &amp;lt;sup&amp;gt; xc&amp;lt;/sup&amp;gt;&#039;&#039; term: we perform the calculation at the RPA level and consider just the Hartree term (from &#039;&#039;v&amp;lt;sub&amp;gt;G&amp;lt;/sub&amp;gt;&#039;&#039;) in the kernel. If we also neglect the Hartree term, we arrive back at the independent particle approximation, since there is no kernel and &#039;&#039;X = X&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Choosing input parameters ===&lt;br /&gt;
Enter the folder for 2D hBN that contains the SAVE directory, and generate the input file. From &amp;lt;code&amp;gt;yambo -H&amp;lt;/code&amp;gt; you should understand that the correct option is &amp;lt;code&amp;gt;yambo -o c -k hartree&amp;lt;/code&amp;gt;. Let&#039;s start by running the calculation for light polarization &#039;&#039;q&#039;&#039; in the plane of the BN sheet:&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN-2D/YAMBO&lt;br /&gt;
 $ yambo        &#039;&#039;(Initialization)&#039;&#039;&lt;br /&gt;
 $ yambo -F yambo.in_RPA -V RL -J q100 -o c -k hartree&lt;br /&gt;
We thus use a new input file &#039;&#039;yambo.in_RPA&#039;&#039;, switch on the &amp;lt;code&amp;gt;FFTGvecs&amp;lt;/code&amp;gt; variable, and label all outputs/databases with a &#039;&#039;q100&#039;&#039; tag. Make sure to set/modify all of the following variables to:&lt;br /&gt;
 [[Variables#FFTGvecs|FFTGvecs]]=     &#039;&#039;&#039;6        Ry&#039;&#039;&#039;    # [FFT] Plane-waves&lt;br /&gt;
 [[Variables#Chimod|Chimod]]= &amp;quot;Hartree&amp;quot;            # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 [[Variables#NGsBlkXd|NGsBlkXd]]= &#039;&#039;&#039;    3        Ry&#039;&#039;&#039;    # [Xd] Response block size&lt;br /&gt;
 % [[Variables#QpntsRXd|QpntsRXd]]&lt;br /&gt;
  1 |  1 |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#EnRngeXd|EnRngeXd]]&lt;br /&gt;
  0.00000 | 20.00000 | eV    # [Xd] Energy range&lt;br /&gt;
 %&lt;br /&gt;
 % [[Variables#DmRngeXd|DmRngeXd]]&lt;br /&gt;
 0.200000 | 0.200000 | eV    # [Xd] Damping range&lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#ETStpsXd|ETStpsXd]]= 2001               # [Xd] Total Energy steps&lt;br /&gt;
 % [[Variables#LongDrXd|LongDrXd]]&lt;br /&gt;
 1.000000 | 0.000000 | 0.000000 |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
In this input file, we have:&lt;br /&gt;
* A &#039;&#039;q&#039;&#039; parallel to the sheet &lt;br /&gt;
* A wider energy range than before, and more broadening&lt;br /&gt;
* Selected the Hartree kernel, and expanded G-vectors in the screening up to 3 Ry (about 85 G-vectors)&lt;br /&gt;
&lt;br /&gt;
===LFEs in periodic direction===&lt;br /&gt;
Now let&#039;s run the code with this new input file (CECAM in serial: about 2mins; parallel 4 tasks: 50s)&lt;br /&gt;
 $ yambo -F yambo.in_RPA -V RL -J q100 &lt;br /&gt;
and let&#039;s compare the absorption with and without the local fields included. By inspecting the &#039;&#039;o-q100.eps_q1_inv_rpa_dyson&#039;&#039; file we find&lt;br /&gt;
that this information is given in the 2nd and 4th columns, respectively:&lt;br /&gt;
 $ head -n30 o-q100.eps_q1_inv_rpa_dyson&lt;br /&gt;
 # Absorption @ Q(1) [q-&amp;gt;0 direction] : 1.0000000  0.0000000  0.0000000&lt;br /&gt;
 #  E/ev[1]     EPS-Im[2]   EPS-Re[3]   EPSo-Im[4]  EPSo-Re[5]&lt;br /&gt;
Plot the result:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; plot &amp;quot;o-q100.eps_q1_inv_rpa_dyson&amp;quot; u 1:2 w l,&amp;quot;o-q100.eps_q1_inv_rpa_dyson&amp;quot; u 1:4 w l&lt;br /&gt;
[[File:CH-LFE4.png|none|600px|Yambo tutorial image]]&lt;br /&gt;
It is clear that there is little influence of local fields in this case. This is generally the case for semiconductors or materials with a smoothly varying electronic density. We have also shown the EELS spectrum (&#039;&#039;o-q100.eel_q1_inv_rpa_dyson&#039;&#039;) for comparison.&lt;br /&gt;
&lt;br /&gt;
===LFEs in non-periodic direction===&lt;br /&gt;
Now let&#039;s switch to &#039;&#039;q&#039;&#039; perpendicular to the BN plane:&lt;br /&gt;
 $ yambo -F yambo.in_RPA -V RL -o c -k hartree        &#039;&#039;and set&#039;&#039;&lt;br /&gt;
 ...&lt;br /&gt;
 % [[Variables#LongDrXd|LongDrXd]]&lt;br /&gt;
 0.000000 | 0.000000 | &#039;&#039;&#039;1.000000&#039;&#039;&#039; |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 &lt;br /&gt;
You can try out the default parallel usage now, or run again in serial, i.e.&lt;br /&gt;
 $ yambo -F yambo.in_RPA -V RL -J &#039;&#039;&#039;q001&#039;&#039;&#039;       &#039;&#039;(serial)&#039;&#039;&lt;br /&gt;
 $ mpirun -np 4 yambo -F yambo.in_RPA -V RL -J &#039;&#039;&#039;q001&#039;&#039;&#039; &amp;amp;      &#039;&#039;(parallel, MPI only, 4 tasks)&#039;&#039;&lt;br /&gt;
As noted previously, the &#039;&#039;log&#039;&#039; files in parallel appear in the LOG folder, you can follow the execution with &amp;lt;code&amp;gt;tail -F LOG/l-q001_optics_chi_CPU_1&amp;lt;/code&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
Plotting the output file:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; plot &amp;quot;o-q001.eps_q1_inv_rpa_dyson&amp;quot; u 1:2 w l,&amp;quot;o-q001.eps_q1_inv_rpa_dyson&amp;quot; u 1:4 w l&lt;br /&gt;
[[File:CH-LFE6.png|none|600px|Yambo tutorial image]]&lt;br /&gt;
In this case, the absorption is strongly blueshifted with respect to the in-plane absorption. Furthermore, the influence of local fields is striking, and quenches the spectrum strongly. This is the well known depolarization effect. Local field effects are much stronger in the perpendicular direction because the charge inhomogeneity is dramatic. Many G-vectors are needed to account for the sharp change in the potential across the BN-vacuum interface.&lt;br /&gt;
&lt;br /&gt;
===Absorption versus EELS===&lt;br /&gt;
In order to understand this further, we plot the electron energy loss spectrum for this component and compare with the absorption:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot &amp;gt; plot &amp;quot;o-q001.eps_q1_inv_rpa_dyson&amp;quot; w l,&amp;quot;o-q001.eel_q1_inv_rpa_dyson&amp;quot; w l&lt;br /&gt;
[[File:CH-LFE5.png|none|600px|Yambo tutorial image]]&lt;br /&gt;
The conclusion is that the absorption and EELS coincide for isolated systems. &lt;br /&gt;
To understand why this is, you need to consider the role of the &#039;&#039;macroscopic&#039;&#039; screening in the response function and the long-range part of the Coulomb potential. &lt;br /&gt;
See e.g.&amp;lt;ref&amp;gt;TDDFT from molecules to solids: The role of long‐range interactions, F. Sottile et al, International journal of quantum chemistry 102 (5), 684-701 (2005)&amp;lt;/ref&amp;gt;&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3615</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3615"/>
		<updated>2020-01-23T14:25:20Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Optical absorption in hBN */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
&lt;br /&gt;
==Download the Files==&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
==DFT calculation of bulk hBN and conversion to Yambo==&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
&lt;br /&gt;
=== DFT calculations ===&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Yambo format ===&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Initialization of Yambo databases==&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Every Yambo run &#039;&#039;&#039;must&#039;&#039;&#039; start with this step. Go to the folder &#039;&#039;containing&#039;&#039; the hBN-bulk &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
and simply launch the code&lt;br /&gt;
 $ yambo &lt;br /&gt;
This will run the initialization (setup) &#039;&#039;runlevel&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TIP&#039;&#039;&#039;: do not run yambo from &#039;&#039;inside&#039;&#039; the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; folder! In fact, if you ever see the message:&lt;br /&gt;
 yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)&lt;br /&gt;
it usually means you are trying to launch Yambo &#039;&#039;&#039;from the wrong place&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Three new elements will appear:&lt;br /&gt;
===Run-time output===&lt;br /&gt;
This is typically written to standard output (on screen) and tracks the progress of the run in real time:&lt;br /&gt;
 &amp;lt;---&amp;gt; [01] CPU structure, Files &amp;amp; I/O Directories&lt;br /&gt;
 &amp;lt;---&amp;gt; [02] CORE Variables Setup&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.01] Unit cells&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.02] Symmetries&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.03] RL shells&lt;br /&gt;
 &amp;lt;---&amp;gt; Shells finder |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.04] K-grid lattice&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
 &amp;lt;---&amp;gt; [03] Transferred momenta grid&lt;br /&gt;
 &amp;lt;---&amp;gt; BZ -&amp;gt; IBZ reduction |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; X indexes |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; SE indexes |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; [05] Game Over &amp;amp; Game summary&lt;br /&gt;
Specific runlevels are indicated with numeric labels like [02.02]. &amp;lt;br&amp;gt;&lt;br /&gt;
The hashes (#) indicate progress of the run in Wall Clock time, indicating the elapsed (E) and expected (X) time to complete a runlevel, and the percentage of the task complete.&lt;br /&gt;
&lt;br /&gt;
If Yambo is launched using a script, or as a background process, or in parallel, this output will appear in a log file prefixed by the letter &#039;&#039;l&#039;&#039;, in this case as &#039;&#039;l_setup&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If this log file already exists from a previous run, it will not be overwritten. Instead, a new file will be created with an incrementing numerical label, e.g. &#039;&#039;l_setup_01, l_setup_02&#039;&#039;, etc. &#039;&#039;&#039;This applies to all files created by Yambo&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In the case of parallel runs, CPU-dependent log files will appear inside a &#039;&#039;LOG&#039;&#039; folder, e.g. &lt;br /&gt;
 $ mpirun -np 4 yambo &lt;br /&gt;
 $ ls LOG&lt;br /&gt;
 l_setup_CPU_1   l_setup_CPU_2  l_setup_CPU_3  l_setup_CPU_4&lt;br /&gt;
This behaviour can be controlled at runtime - see the Parallel tutorial for details.&lt;br /&gt;
&lt;br /&gt;
===New core databases===&lt;br /&gt;
New databases appear in the &#039;&#039;SAVE&#039;&#039; folder:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1 ns.wf ns.kb_pp_pwscf &#039;&#039;&#039;ndb.gops ndb.kindx&#039;&#039;&#039;&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These contain information about the &#039;&#039;G&#039;&#039;-vector shells and &#039;&#039;k/q&#039;&#039;-point meshes as defined by the DFT calculation.&lt;br /&gt;
&lt;br /&gt;
In general: a database called &#039;&#039;n&#039;&#039;&#039;s&#039;&#039;&#039;.xxx&#039;&#039; is a &#039;&#039;static&#039;&#039; database, generated once by &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;, while databases called &#039;&#039;n&#039;&#039;&#039;db&#039;&#039;&#039;.xxx&#039;&#039; are &#039;&#039;dynamically&#039;&#039; generated while you use &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TIP&#039;&#039;&#039;: if you launch &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt;, but it does not seem to do anything, check that these files are present.&lt;br /&gt;
&lt;br /&gt;
===Report file===&lt;br /&gt;
A report file &#039;&#039;r_setup&#039;&#039; is generated in the run directory. &lt;br /&gt;
This mostly reports information about the ground state system as defined by the DFT run, but also adds information about the band gaps, occupations, shells of G-vectors, IBZ/BZ grids, the CPU structure (for parallel runs), and so on. Some points of note:&lt;br /&gt;
&lt;br /&gt;
  [02.03] RL shells&lt;br /&gt;
  =================&lt;br /&gt;
  Shells, format: [S#] G_RL(mHa)&lt;br /&gt;
   [S453]:8029(0.7982E+5) [S452]:8005(0.7982E+5) [S451]:7981(0.7982E+5) [S450]:7957(0.7942E+5)&lt;br /&gt;
   ...&lt;br /&gt;
   [S4]:11( 1183.) [S3]:5( 532.5123) [S2]:3( 133.1281) [S1]:1( 0.000000)&lt;br /&gt;
&lt;br /&gt;
This reports the set of closed reciprocal lattice (RL) shells defined internally that contain G-vectors with the same modulus. &lt;br /&gt;
The highest number of RL vectors we can use is 8029.  Yambo will always redefine any input variable in RL units to the nearest closed shell.&lt;br /&gt;
&lt;br /&gt;
  [02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
  Fermi Level        [ev]:  5.112805&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  3.876293&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.460E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 3.876293  7.278081&lt;br /&gt;
  Direct Gaps        [ev]:  4.28829  11.35409&lt;br /&gt;
  X BZ K-points :  72&lt;br /&gt;
&lt;br /&gt;
Yambo recalculates again the Fermi level (close to the value of 5.06 noted in the PWscf SCF calculation). From here on, however, the Fermi level is set to zero, and other eigenvalues are shifted accordingly. The system is insulating (8 filled, 92 empty) with an indirect band gap of 3.87 eV. The minimum and maximum direct and indirect gaps are indicated. There are 72 k-points in the full BZ, generated using symmetry from the 14 k-points in our user-defined grid.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TIP&#039;&#039;&#039;: You should inspect the report file after &#039;&#039;every&#039;&#039; run for errors and warnings.&lt;br /&gt;
&lt;br /&gt;
===2D hBN===&lt;br /&gt;
Simply repeat the steps above. Go to the folder &#039;&#039;containing&#039;&#039; the hBN-sheet &#039;&#039;SAVE&#039;&#039; directory and launch &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt;:&lt;br /&gt;
 $ cd TUTORIALS/hBN-2D/YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
 $ yambo&lt;br /&gt;
Again, inspect the &#039;&#039;r_setup&#039;&#039; file, output logs, and verify that &#039;&#039;ndb.gops&#039;&#039; and &#039;&#039;ndb.kpts&#039;&#039; have been created inside the SAVE folder.&lt;br /&gt;
&lt;br /&gt;
You are now ready to use Yambo!&lt;br /&gt;
&lt;br /&gt;
==Yambo&#039;s command line interface==&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to select tasks, generate and modify input files, and control the runtime behaviour by using Yambo&#039;s command line interface.&lt;br /&gt;
&lt;br /&gt;
Command line options are divided into &#039;&#039;&#039;uppercase&#039;&#039;&#039; and &#039;&#039;&#039;lowercase&#039;&#039;&#039; options:&lt;br /&gt;
* Lowercase: select tasks, generate input files, and (by default) launch a file editor&lt;br /&gt;
* Uppercase: modify Yambo&#039;s default settings, at run time and when generating input files&lt;br /&gt;
Lowercase and uppercase options can be used together.&lt;br /&gt;
&lt;br /&gt;
=== Input file generator ===&lt;br /&gt;
First, move to the appropriate folder and initialize the Yambo databases if you haven&#039;t already done so.&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
 $ yambo                    &#039;&#039;(initialize)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Yambo generates its own input files: you just tell the code what you want to calculate by launching Yambo along with one or more &#039;&#039;&#039;lowercase&#039;&#039;&#039; options. &lt;br /&gt;
&lt;br /&gt;
====Allowed options====&lt;br /&gt;
To see the list of runlevels and options, run &amp;lt;code&amp;gt;yambo -h&amp;lt;/code&amp;gt; or better,&lt;br /&gt;
 $ yambo -H&lt;br /&gt;
 This is yambo 4.4.0 rev.148&lt;br /&gt;
 A shiny pot of fun and happiness [C.D.Hogan] &lt;br /&gt;
 -h		:Short Help&lt;br /&gt;
 -H		:Long Help&lt;br /&gt;
 -J &amp;lt;opt&amp;gt;	:Job string identifier&lt;br /&gt;
 -V &amp;lt;opt&amp;gt;	:Input file verbosity[opt=RL,kpt,sc,qp,io,gen,resp,all,par]&lt;br /&gt;
 -F &amp;lt;opt&amp;gt;	:Input file&lt;br /&gt;
 -I &amp;lt;opt&amp;gt;	:Core I/O directory&lt;br /&gt;
 -O &amp;lt;opt&amp;gt;	:Additional I/O directory&lt;br /&gt;
 -C &amp;lt;opt&amp;gt;	:Communications I/O directory&lt;br /&gt;
 -D		:DataBases properties&lt;br /&gt;
 -W &amp;lt;opt&amp;gt;	:Wall Time limitation (1d2h30m format)&lt;br /&gt;
 -Q		:Don&#039;t launch the text editor&lt;br /&gt;
 -E &amp;lt;opt&amp;gt;	:Environment Parallel Variables file&lt;br /&gt;
 -M		:Switch-off MPI support (serial run)&lt;br /&gt;
 -N		:Switch-off OpenMP support (single thread run)&lt;br /&gt;
 -i		:Initialization&lt;br /&gt;
 -o &amp;lt;opt&amp;gt;	:Optics [opt=(c)hi is (G)-space / (b)se is (eh)-space ]&lt;br /&gt;
 -k &amp;lt;opt&amp;gt;	:Kernel [opt=hartree/alda/lrc/hf/sex](hf/sex only eh-space; lrc only G-space)&lt;br /&gt;
 -y &amp;lt;opt&amp;gt;	:BSE solver [opt=h/d/s/(p/f)i](h)aydock/(d)iagonalization/(i)nversion&lt;br /&gt;
 -r		:Coulomb potential&lt;br /&gt;
 -x		:Hartree-Fock Self-energy and local XC&lt;br /&gt;
 -d		:Dynamical Inverse Dielectric Matrix&lt;br /&gt;
 -b		:Static Inverse Dielectric Matrix&lt;br /&gt;
 -p &amp;lt;opt&amp;gt;	:GW approximations [opt=(p)PA/(c)HOSEX]&lt;br /&gt;
 -g &amp;lt;opt&amp;gt;	:Dyson Equation solver[opt=(n)ewton/(s)ecant/(g)reen]&lt;br /&gt;
 -l		:GoWo Quasiparticle lifetimes&lt;br /&gt;
 -a		:ACFDT Total Energy&lt;br /&gt;
 -s		:ScaLapacK test&lt;br /&gt;
&lt;br /&gt;
Any time you launch Yambo with a lowercase option, Yambo will generate the appropriate input file (default name: &#039;&#039;yambo.in&#039;&#039;) and launch the &amp;lt;code&amp;gt;vi&amp;lt;/code&amp;gt; editor. &lt;br /&gt;
&lt;br /&gt;
Editor choice can be changed at configure; alternatively you can use the &amp;lt;code&amp;gt;-Q&amp;lt;/code&amp;gt; run time option to skip the automatic editing (do this if you are not familiar with &amp;lt;code&amp;gt;vi&amp;lt;/code&amp;gt;!):&lt;br /&gt;
 $ yambo -x -Q&lt;br /&gt;
 yambo: input file yambo.in created&lt;br /&gt;
 $ emacs yambo.in     &#039;&#039;or your favourite editing tool&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Combining options====&lt;br /&gt;
Multiple options can be used together to activate various tasks or runlevels (in some cases this is actually a necessity). &lt;br /&gt;
For instance, to generate an input file for optical spectra including local field effects (Hartree approximation), do (and then exit)&lt;br /&gt;
 $ yambo -o c -k hartree       &#039;&#039;which switches on:&#039;&#039;&lt;br /&gt;
 optics                       # [R OPT] Optics&lt;br /&gt;
 chi                          # [R CHI] Dyson equation for Chi.&lt;br /&gt;
 Chimod= &amp;quot;Hartree&amp;quot;            # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
To perform a Hartree-Fock and GW calculation using a plasmon-pole approximation, do (and then exit):&lt;br /&gt;
 $ yambo -x -g n -p p        &#039;&#039;which switches on:&#039;&#039;&lt;br /&gt;
 HF_and_locXC                 # [R XX] Hartree-Fock Self-energy and Vxc&lt;br /&gt;
 gw0                          # [R GW] GoWo Quasiparticle energy levels&lt;br /&gt;
 ppa                          # [R Xp] Plasmon Pole Approximation&lt;br /&gt;
 em1d                         # [R Xd] Dynamical Inverse Dielectric Matrix      &lt;br /&gt;
Each runlevel activates its own list of variables and flags.&lt;br /&gt;
&lt;br /&gt;
===Changing input parameters ===&lt;br /&gt;
Yambo reads various parameters from existing database files and/or input files and uses them to suggest values or ranges. &lt;br /&gt;
Let&#039;s illustrate this by generating the input file for a Hartree-Fock calculation. &lt;br /&gt;
&lt;br /&gt;
 $ yambo -x&lt;br /&gt;
Inside the generated input file you should find:&lt;br /&gt;
 [[Variables#EXXRLvcs|EXXRLvcs]] =  3187        RL    # [XX] Exchange RL components&lt;br /&gt;
 %[[Variables#QPkrange|QPkrange]]                    # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
   1| 14|  1|100|&lt;br /&gt;
 %&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Variables#QPkrange|QPkrange]]&amp;lt;/code&amp;gt; variable (follow the link for a &amp;quot;detailed&amp;quot; explanation for any variable) suggests a range of k-points (1 to 14) and bands (1 to 100) based on what it finds in the core database &#039;&#039;SAVE/ns.db1&#039;&#039;, i.e. as defined by the DFT code. &amp;lt;br&amp;gt;&lt;br /&gt;
Leave that variable alone, and instead modify the previous variable to &amp;lt;code&amp;gt;EXXRLvcs=  1000        RL&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file, and now generate the input a second time with &amp;lt;code&amp;gt;yambo -x&amp;lt;/code&amp;gt;. You will see:&lt;br /&gt;
  [[Variables#EXXRLvcs|EXXRLvcs]]=  1009        RL&lt;br /&gt;
This indicates that Yambo has read the new input value (1000 G-vectors), checked the database of G-vector shells &#039;&#039;(SAVE/ndb.gops)&#039;&#039;, &lt;br /&gt;
and changed the input value to one that fits a completely closed shell.&lt;br /&gt;
&lt;br /&gt;
Last, note that Yambo variables can be expressed in different &#039;&#039;&#039;units&#039;&#039;&#039;. In this case, &amp;lt;code&amp;gt;RL&amp;lt;/code&amp;gt; can be replaced by an energy unit like Ry, eV, Ha, etc. Energy units are generally better as they are independent of the cell size. Technical information is available on the [[Variables]] page. &lt;br /&gt;
&lt;br /&gt;
The input file generator of Yambo is thus an &#039;&#039;intelligent&#039;&#039; parser, which interacts with the user and the existing databases. For this reason we recommend that you always use Yambo to generate the input files, rather than making them yourself.&lt;br /&gt;
&lt;br /&gt;
===Uppercase options===&lt;br /&gt;
Uppercase options modify some of the code&#039;s default settings. They can be used when launching the code but also when generating input files. &lt;br /&gt;
&lt;br /&gt;
====Allowed options====&lt;br /&gt;
To see the list of options, again do:&lt;br /&gt;
 $ yambo -H&lt;br /&gt;
 Tool: yambo 4.1.2 rev.14024&lt;br /&gt;
 Description: A shiny pot of fun and happiness [C.D.Hogan] &lt;br /&gt;
 -J &amp;lt;opt&amp;gt;	:Job string identifier&lt;br /&gt;
 -V &amp;lt;opt&amp;gt;	:Input file verbosity&lt;br /&gt;
                 [opt=RL,kpt,sc,qp,io,gen,resp,all,par]&lt;br /&gt;
 -F &amp;lt;opt&amp;gt;	:Input file&lt;br /&gt;
 -I &amp;lt;opt&amp;gt;	:Core I/O directory&lt;br /&gt;
 -O &amp;lt;opt&amp;gt;	:Additional I/O directory&lt;br /&gt;
 -C &amp;lt;opt&amp;gt;	:Communications I/O directory&lt;br /&gt;
 -D		:DataBases properties&lt;br /&gt;
 -W &amp;lt;opt&amp;gt;	:Wall Time limitation (1d2h30m format)&lt;br /&gt;
 -Q		:Don&#039;t launch the text editor&lt;br /&gt;
 -M		:Switch-off MPI support (serial run)&lt;br /&gt;
 -N		:Switch-off OpenMP support (single thread run)&lt;br /&gt;
 [Lower case options]&lt;br /&gt;
&lt;br /&gt;
Command line options are extremely important to master if you want to use yambo productively. &lt;br /&gt;
Often, the meaning is clear from the help menu:&lt;br /&gt;
 $ yambo -F yambo.in_HF -x    &#039;&#039;Make a Hartree -Fock input file called yambo.in_HF&#039;&#039;&lt;br /&gt;
 $ yambo -D                   &#039;&#039;Summarize the content of the databases in the SAVE folder&#039;&#039;&lt;br /&gt;
 $ yambo -I ../               &#039;&#039;Run the code, using a SAVE folder in a directory one level up&#039;&#039;&lt;br /&gt;
 $ yambo -C MyTest            &#039;&#039;Run the code, putting all report, log, plot files inside a folder MyTest&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
Other options deserve a closer look.&lt;br /&gt;
===Verbosity===&lt;br /&gt;
Yambo uses &#039;&#039;many&#039;&#039; input variables, many of which can be left at their default values. To keep input files short and manageable, only a few variables appear by default  in the inout file. More advanced variables can be switched on by using the &amp;lt;code&amp;gt;-V&amp;lt;/code&amp;gt; verbosity option. These are grouped according to the type of variable. For instance, &amp;lt;code&amp;gt;-V RL&amp;lt;/code&amp;gt; switches on variables related to G vector summations, and &amp;lt;code&amp;gt;-V io&amp;lt;/code&amp;gt; switches on options related to I/O control. Try: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o c -V RL       &#039;&#039;switches on:&#039;&#039;&lt;br /&gt;
 FFTGvecs=  3951        RL    # [FFT] Plane-waves&lt;br /&gt;
 &lt;br /&gt;
 $ yambo -o c -V io       &#039;&#039;switches on:&#039;&#039;&lt;br /&gt;
 StdoHash=  40                # [IO] Live-timing Hashes&lt;br /&gt;
 DBsIOoff= &amp;quot;none&amp;quot;             # [IO] Space-separated list of DB with NO I/O. DB= ...&lt;br /&gt;
 DBsFRAGpm= &amp;quot;none&amp;quot;            # [IO] Space-separated list of +DB to be FRAG and ...&lt;br /&gt;
 #WFbuffIO                    # [IO] Wave-functions buffered I/O&lt;br /&gt;
&lt;br /&gt;
Unfortunately, -V options must be invoked and changed &#039;&#039;one at a time&#039;&#039;. When you are more expert, you may go straight to &amp;lt;code&amp;gt;-V all&amp;lt;/code&amp;gt;, which turns on all possible variables. However note that &amp;lt;code&amp;gt;yambo -o c -V all&amp;lt;/code&amp;gt; adds an extra 30 variables to the input file, which can be confusing: use it with care.&lt;br /&gt;
&lt;br /&gt;
===Job script label===&lt;br /&gt;
The best way to keep track of different runs using different parameters is through the &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; flag. This inserts a label in all output and report files, and creates a new folder containing any new databases (i.e. they are not written in the core &#039;&#039;SAVE&#039;&#039; folder). Try:&lt;br /&gt;
 $ yambo -J 1Ry -V RL -x        &#039;&#039;and modify to&#039;&#039;&lt;br /&gt;
 FFTGvecs = 1 Ry&lt;br /&gt;
 EXXGvecs = 1 Ry&lt;br /&gt;
 $ yambo -J 1Ry           &#039;&#039;Run the code&#039;&#039;&lt;br /&gt;
 $ ls&lt;br /&gt;
 yambo.in SAVE  &lt;br /&gt;
 o-1Ry.hf r-1Ry_HF_and_locXC 1Ry 1Ry/ndb.HF_and_locXC&lt;br /&gt;
This is extremely useful when running convergence tests, trying out different parameters, etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Exercise&#039;&#039;: use &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; to report the properties of all database files (including &#039;&#039;ndb.HF_and_locXC&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in hBN==&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
The dielectric function in the long-wavelength limit, at the independent particle level (RPA without local fields), is essentially given by the following:&lt;br /&gt;
[[File:CH1.png|none|x50px|Yambo tutorial image]]&lt;br /&gt;
In practice, Yambo does not use this expression directly but solves the Dyson equation for the susceptibility &#039;&#039;X&#039;&#039;, which is described in the [[Local fields]] module.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
[[File:Yambo-handbook-v4.1.2-p-3.png|thumb|Cheatsheet on linear response|150px]]&lt;br /&gt;
* You must first complete the [[Modules#How to use Yambo|How to use Yambo]] modules&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* The &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; databases for bulk hBN &lt;br /&gt;
* The &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executable&lt;br /&gt;
* &amp;lt;code&amp;gt;gnuplot&amp;lt;/code&amp;gt;, for plotting spectra&lt;br /&gt;
&lt;br /&gt;
== Choosing input parameters ==&lt;br /&gt;
Enter the folder for bulk hBN that contains the &#039;&#039;SAVE&#039;&#039; directory, run the initialization and generate the input file. From &amp;lt;code&amp;gt;yambo -H&amp;lt;/code&amp;gt; you should understand that the correct option is &amp;lt;code&amp;gt;yambo -o c&amp;lt;/code&amp;gt;. Let&#039;s add some command line options:&lt;br /&gt;
&amp;lt;!--If you have already worked in this folder, you might like to clean up any old files, and run the initialization again:&lt;br /&gt;
 cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
 rm yambo.in SAVE/ndb.* &lt;br /&gt;
 yambo &lt;br /&gt;
Take care to &#039;&#039;&#039;not&#039;&#039;&#039; delete the &amp;lt;code&amp;gt;ns.*&amp;lt;/code&amp;gt; files. --&amp;gt;&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
 $ yambo               &#039;&#039;(initialization)&#039;&#039;&lt;br /&gt;
 $ yambo -F yambo.in_IP -o c&lt;br /&gt;
This corresponds to optical properties in G-space at the independent particle level: in the input file this is indicated by (&amp;lt;code&amp;gt;Chimod= &amp;quot;IP&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==Optics runlevel==&lt;br /&gt;
For optical properties we are interested just in the long-wavelength limit &#039;&#039;q = 0&#039;&#039;. This always corresponds to the &#039;&#039;first&#039;&#039; &#039;&#039;q&#039;&#039;-point in the set of possible &#039;&#039;q=k-k&#039; &#039;&#039;-points. &lt;br /&gt;
Change the following variables in the input file to:&lt;br /&gt;
 % [[Variables#QpntsRX|QpntsRXd]]&lt;br /&gt;
  1 |  &#039;&#039;&#039;1&#039;&#039;&#039; |                   # [Xd] Transferred momenta&lt;br /&gt;
 %&lt;br /&gt;
 [[Variables#ETStpsX|ETStpsXd]]= &#039;&#039;&#039;1001&#039;&#039;&#039;               # [Xd] Total Energy steps&lt;br /&gt;
in order to select just the first &#039;&#039;q&#039;&#039;. The last variable ensures we generate a smooth spectrum. &lt;br /&gt;
Save the input file and launch the code, keeping the command line options as before (i.e., just remove the lower case options):&lt;br /&gt;
 $ yambo -F yambo.in_IP -J Full&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; [05] Optics&lt;br /&gt;
 &amp;lt;---&amp;gt; [LA] SERIAL linear algebra&lt;br /&gt;
 &amp;lt;---&amp;gt; [DIP] Checking dipoles header&lt;br /&gt;
 &amp;lt;---&amp;gt; [x,Vnl] computed using 4 projectors&lt;br /&gt;
 &amp;lt;---&amp;gt; [M  0.017 Gb] Alloc WF ( 0.016)&lt;br /&gt;
 &amp;lt;---&amp;gt; [WF] Performing Wave-Functions I/O from ./SAVE&lt;br /&gt;
 &amp;lt;01s&amp;gt; Dipoles: P and iR (T): |########################################| [100%] 01s(E) 01s(X)&lt;br /&gt;
 &amp;lt;01s&amp;gt; [M  0.001 Gb] Free WF ( 0.016)&lt;br /&gt;
 &amp;lt;01s&amp;gt; [DIP] Writing dipoles header&lt;br /&gt;
 &amp;lt;01s&amp;gt; [X-CG] R(p) Tot o/o(of R)  :   5501   52992     100&lt;br /&gt;
 &amp;lt;01s&amp;gt; Xo@q[1] |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;01s&amp;gt; [06] Game Over &amp;amp; Game summary&lt;br /&gt;
  &lt;br /&gt;
 $ ls&lt;br /&gt;
 Full   SAVE  yambo.in_IP   r_setup&lt;br /&gt;
 o-Full.eel_q1_ip  o-Full.eps_q1_ip  r-Full_optics_chi&lt;br /&gt;
Let&#039;s take a moment to understand what Yambo has done inside the Optics runlevel:&lt;br /&gt;
# Compute the &#039;&#039;[x,Vnl]&#039;&#039; term&lt;br /&gt;
# Read the wavefunctions from disc [WF]&lt;br /&gt;
# Compute the &#039;&#039;dipoles&#039;&#039;, i.e. matrix elements of &#039;&#039;&#039;p&#039;&#039;&#039;&lt;br /&gt;
# Write the dipoles to disk as &#039;&#039;Full/ndb.dip*&#039;&#039; databases. This you can see in the report file:&lt;br /&gt;
 $ grep -A20 &amp;quot;WR&amp;quot; r-Full_optics_chi &lt;br /&gt;
 [WR./Full//ndb.dip_iR_and_P]&lt;br /&gt;
 Brillouin Zone Q/K grids (IBZ/BZ):  14   72   14   72&lt;br /&gt;
 RL vectors                   (WF): 1491&lt;br /&gt;
 Electronic Temperature        [K]: 0.0000000&lt;br /&gt;
 Bosonic    Temperature        [K]: 0.0000000&lt;br /&gt;
 X band range           :   1  100&lt;br /&gt;
 RL vectors in the sum  : 1491&lt;br /&gt;
 [r,Vnl] included       :yes&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;ol start=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Finally, Yambo computes the non-interacting susceptibility &#039;&#039;X&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&#039;&#039; for this &#039;&#039;q&#039;&#039;, and writes the dielectric function inside the &#039;&#039;o-Full.eps_q1_ip&#039;&#039; file for plotting&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Energy cut off==&lt;br /&gt;
&lt;br /&gt;
Before plotting the output, let&#039;s change a few more variables. The previous calculation used &#039;&#039;all&#039;&#039; the G-vectors in expanding the wavefunctions, up to 1491 (~1016 components). This corresponds roughly to the cut off energy of 40Ry we used in the DFT calculation. Generally, however, we can use a smaller value. We use the verbosity to switch on this variable, and a new &#039;&#039;-J&#039;&#039; flag to avoid reading the previous database:&lt;br /&gt;
 $ yambo -F yambo.in_IP &#039;&#039;&#039;-J 6Ry -V RL&#039;&#039;&#039; -o c&lt;br /&gt;
Change the &#039;&#039;&#039;value&#039;&#039;&#039; of &amp;lt;code&amp;gt;[[Variables#FFTGvecs|FFTGvecs]]&amp;lt;/code&amp;gt; and also its &#039;&#039;&#039;unit&#039;&#039;&#039; from &amp;lt;code&amp;gt;RL&amp;lt;/code&amp;gt; (number of G-vectors) to &amp;lt;code&amp;gt;Ry&amp;lt;/code&amp;gt; (energy in Rydberg):&lt;br /&gt;
 [[Variables#FFTGvecs|FFTGvecs]]= &#039;&#039;&#039;6&#039;&#039;&#039;           &#039;&#039;&#039;Ry&#039;&#039;&#039;    # [FFT] Plane-waves&lt;br /&gt;
Save the input file and launch the code again:&lt;br /&gt;
  $ yambo -F yambo.in_IP &#039;&#039;&#039;-J 6Ry -V RL&#039;&#039;&#039;&lt;br /&gt;
and then plot the &#039;&#039;o-Full.eps_q1_ip&#039;&#039; and &#039;&#039;o-6Ry.eps_q1_ip&#039;&#039; files:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; plot &amp;quot;o-Full.eps_q1_ip&amp;quot; w l,&amp;quot;o-6Ry.eps_q1_ip&amp;quot; w p&lt;br /&gt;
&lt;br /&gt;
[[File:CH-hBN-6Ry.png|none|500px|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
Clearly there is very little difference between the two spectra. This highlights an important point in calculating excited state properties: generally, fewer G-vectors are needed than what are needed in DFT calculations. Regarding the spectrum itself, the first peak occurs at about 4.4eV. This is consistent with the minimum direct gap reported by Yambo: 4.28eV. The comparison with experiment (not shown) is very poor however. &lt;br /&gt;
&lt;br /&gt;
If you make some mistake, and cannot reproduce this figure, you should check the value of &amp;lt;code&amp;gt;[[Variables#FFTGvecs|FFTGvecs]]&amp;lt;/code&amp;gt; in the input file, delete the &#039;&#039;6Ry&#039;&#039; folder, and try again - taking care to plot the right file! (e.g. &#039;&#039;o-6Ry.eps_q1_ip_01&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
==q-direction==&lt;br /&gt;
Now let&#039;s select a different component of the dielectric tensor:&lt;br /&gt;
 $ yambo -F yambo.in_IP -J 6Ry -V RL -o c&lt;br /&gt;
 ...&lt;br /&gt;
 % [[Variables#LongDrXd|LongDrXd]]&lt;br /&gt;
 &#039;&#039;&#039;0.000000&#039;&#039;&#039; | 0.000000 | &#039;&#039;&#039;1.000000&#039;&#039;&#039; |        # [Xd] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 ...&lt;br /&gt;
 $ yambo -F yambo.in_IP -J 6Ry -V RL&lt;br /&gt;
This time yambo reads from the &#039;&#039;6Ry&#039;&#039; folder, so it does not need to compute the dipole matrix elements again, and the calculation is fast. Plotting gives:&lt;br /&gt;
 $ gnuplot&lt;br /&gt;
 gnuplot&amp;gt; plot &amp;quot;o-6Ry.eps_q1_ip&amp;quot; t &amp;quot;q || x-axis&amp;quot; w l,&amp;quot;o-6Ry.eps_q1_ip_01&amp;quot; t &amp;quot;q || c-axis&amp;quot; w l&lt;br /&gt;
&lt;br /&gt;
[[File:CH-hBN-ac.png|none|500px|Yambo tutorial image]]&lt;br /&gt;
The absorption is suppressed in the stacking direction. As the interplanar spacing is increased, we would eventually arrive at the absorption of the BN sheet (see [[Local fields]] tutorial).&lt;br /&gt;
&lt;br /&gt;
==Non-local commutator==&lt;br /&gt;
Last, we show the effect of switching off the non-local commutator term (see &#039;&#039;[Vnl,r]&#039;&#039; in the equation at the top of the page) due to the pseudopotential. As there is no option to do this inside yambo, you need to hide the database file. Change back to the &#039;&#039;q || (1 0 0)&#039;&#039; direction, and launch yambo with a different &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; option:&lt;br /&gt;
 $ mv SAVE/ns.kb_pp_pwscf SAVE/ns.kb_pp_pwscf_&#039;&#039;&#039;OFF&#039;&#039;&#039;&lt;br /&gt;
 $ yambo -F yambo.in_IP -J &#039;&#039;&#039;6Ry_NoVnl&#039;&#039;&#039; -o c             &#039;&#039;(change to q || 100)&#039;&#039;&lt;br /&gt;
 $ yambo -F yambo.in_IP -J 6Ry_NoVnl&lt;br /&gt;
Note the warning in the output:&lt;br /&gt;
 &amp;lt;---&amp;gt; [WARNING] Missing non-local pseudopotential contribution&lt;br /&gt;
which also appears in the report file, and noted in the database as &amp;lt;code&amp;gt;[r,Vnl] included       :no&amp;lt;/code&amp;gt;. The difference is tiny:&lt;br /&gt;
[[File:CH-hBN-Vnl.png|none|500px|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
However, when your system is larger, with more projectors in the pseudopotential or more k-points (see the BSE tutorial), the inclusion of &#039;&#039;Vnl&#039;&#039; can make a huge difference in the computational load, so it&#039;s always worth checking to see if the terms are important in your system.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to compute a simple optical spectrum &lt;br /&gt;
* How to reduce the computational load through reducing the G-vector/energy cut off and removing the Vnl term&lt;br /&gt;
* How to plot different components of the dielectric tensor&lt;br /&gt;
* How to use the &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; option to neatly label and organise files and databases &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:15%; text-align:left&amp;quot;|Prev: Back to [[First_steps:_a_walk_through_from_DFT_to_optical_properties#Step_4:_Optical_absorption_in_hBN|First steps]]&lt;br /&gt;
|style=&amp;quot;width:70%; text-align:center&amp;quot;|Now: [[Tutorials|Tutorials Home]] --&amp;gt; [[First_steps:_a_walk_through_from_DFT_to_optical_properties|First steps]] --&amp;gt; [[Bulk_material:_h-BN|bulk hBN]]  --&amp;gt; [[Optics_at_the_independent_particle_level|IP optics]]&lt;br /&gt;
|style=&amp;quot;width:15%; text-align:right&amp;quot;|Next: Back to [[First_steps:_a_walk_through_from_DFT_to_optical_properties#Step_4:_Optical_absorption_in_hBN|First steps]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in 2D BN==&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3614</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3614"/>
		<updated>2020-01-23T14:03:42Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
&lt;br /&gt;
==Download the Files==&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
==DFT calculation of bulk hBN and conversion to Yambo==&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
&lt;br /&gt;
=== DFT calculations ===&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Yambo format ===&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Initialization of Yambo databases==&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Every Yambo run &#039;&#039;&#039;must&#039;&#039;&#039; start with this step. Go to the folder &#039;&#039;containing&#039;&#039; the hBN-bulk &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; directory:&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
and simply launch the code&lt;br /&gt;
 $ yambo &lt;br /&gt;
This will run the initialization (setup) &#039;&#039;runlevel&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TIP&#039;&#039;&#039;: do not run yambo from &#039;&#039;inside&#039;&#039; the &amp;lt;code&amp;gt;SAVE&amp;lt;/code&amp;gt; folder! In fact, if you ever see the message:&lt;br /&gt;
 yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)&lt;br /&gt;
it usually means you are trying to launch Yambo &#039;&#039;&#039;from the wrong place&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Three new elements will appear:&lt;br /&gt;
===Run-time output===&lt;br /&gt;
This is typically written to standard output (on screen) and tracks the progress of the run in real time:&lt;br /&gt;
 &amp;lt;---&amp;gt; [01] CPU structure, Files &amp;amp; I/O Directories&lt;br /&gt;
 &amp;lt;---&amp;gt; [02] CORE Variables Setup&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.01] Unit cells&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.02] Symmetries&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.03] RL shells&lt;br /&gt;
 &amp;lt;---&amp;gt; Shells finder |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.04] K-grid lattice&lt;br /&gt;
 &amp;lt;---&amp;gt; [02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
 &amp;lt;---&amp;gt; [03] Transferred momenta grid&lt;br /&gt;
 &amp;lt;---&amp;gt; BZ -&amp;gt; IBZ reduction |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; X indexes |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; SE indexes |########################################| [100%] --(E) --(X)&lt;br /&gt;
 &amp;lt;---&amp;gt; [04] External corrections&lt;br /&gt;
 &amp;lt;---&amp;gt; [05] Game Over &amp;amp; Game summary&lt;br /&gt;
Specific runlevels are indicated with numeric labels like [02.02]. &amp;lt;br&amp;gt;&lt;br /&gt;
The hashes (#) indicate progress of the run in Wall Clock time, indicating the elapsed (E) and expected (X) time to complete a runlevel, and the percentage of the task complete.&lt;br /&gt;
&lt;br /&gt;
If Yambo is launched using a script, or as a background process, or in parallel, this output will appear in a log file prefixed by the letter &#039;&#039;l&#039;&#039;, in this case as &#039;&#039;l_setup&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If this log file already exists from a previous run, it will not be overwritten. Instead, a new file will be created with an incrementing numerical label, e.g. &#039;&#039;l_setup_01, l_setup_02&#039;&#039;, etc. &#039;&#039;&#039;This applies to all files created by Yambo&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In the case of parallel runs, CPU-dependent log files will appear inside a &#039;&#039;LOG&#039;&#039; folder, e.g. &lt;br /&gt;
 $ mpirun -np 4 yambo &lt;br /&gt;
 $ ls LOG&lt;br /&gt;
 l_setup_CPU_1   l_setup_CPU_2  l_setup_CPU_3  l_setup_CPU_4&lt;br /&gt;
This behaviour can be controlled at runtime - see the Parallel tutorial for details.&lt;br /&gt;
&lt;br /&gt;
===New core databases===&lt;br /&gt;
New databases appear in the &#039;&#039;SAVE&#039;&#039; folder:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1 ns.wf ns.kb_pp_pwscf &#039;&#039;&#039;ndb.gops ndb.kindx&#039;&#039;&#039;&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These contain information about the &#039;&#039;G&#039;&#039;-vector shells and &#039;&#039;k/q&#039;&#039;-point meshes as defined by the DFT calculation.&lt;br /&gt;
&lt;br /&gt;
In general: a database called &#039;&#039;n&#039;&#039;&#039;s&#039;&#039;&#039;.xxx&#039;&#039; is a &#039;&#039;static&#039;&#039; database, generated once by &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;, while databases called &#039;&#039;n&#039;&#039;&#039;db&#039;&#039;&#039;.xxx&#039;&#039; are &#039;&#039;dynamically&#039;&#039; generated while you use &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TIP&#039;&#039;&#039;: if you launch &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt;, but it does not seem to do anything, check that these files are present.&lt;br /&gt;
&lt;br /&gt;
===Report file===&lt;br /&gt;
A report file &#039;&#039;r_setup&#039;&#039; is generated in the run directory. &lt;br /&gt;
This mostly reports information about the ground state system as defined by the DFT run, but also adds information about the band gaps, occupations, shells of G-vectors, IBZ/BZ grids, the CPU structure (for parallel runs), and so on. Some points of note:&lt;br /&gt;
&lt;br /&gt;
  [02.03] RL shells&lt;br /&gt;
  =================&lt;br /&gt;
  Shells, format: [S#] G_RL(mHa)&lt;br /&gt;
   [S453]:8029(0.7982E+5) [S452]:8005(0.7982E+5) [S451]:7981(0.7982E+5) [S450]:7957(0.7942E+5)&lt;br /&gt;
   ...&lt;br /&gt;
   [S4]:11( 1183.) [S3]:5( 532.5123) [S2]:3( 133.1281) [S1]:1( 0.000000)&lt;br /&gt;
&lt;br /&gt;
This reports the set of closed reciprocal lattice (RL) shells defined internally that contain G-vectors with the same modulus. &lt;br /&gt;
The highest number of RL vectors we can use is 8029.  Yambo will always redefine any input variable in RL units to the nearest closed shell.&lt;br /&gt;
&lt;br /&gt;
  [02.05] Energies [ev] &amp;amp; Occupations&lt;br /&gt;
  ===================================&lt;br /&gt;
  Fermi Level        [ev]:  5.112805&lt;br /&gt;
  VBM / CBm          [ev]:  0.000000  3.876293&lt;br /&gt;
  Electronic Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  Bosonic    Temp. [ev K]:  0.00      0.00&lt;br /&gt;
  El. density      [cm-3]: 0.460E+24&lt;br /&gt;
  States summary         : Full        Metallic    Empty&lt;br /&gt;
                           0001-0008               0009-0100&lt;br /&gt;
  Indirect Gaps      [ev]: 3.876293  7.278081&lt;br /&gt;
  Direct Gaps        [ev]:  4.28829  11.35409&lt;br /&gt;
  X BZ K-points :  72&lt;br /&gt;
&lt;br /&gt;
Yambo recalculates again the Fermi level (close to the value of 5.06 noted in the PWscf SCF calculation). From here on, however, the Fermi level is set to zero, and other eigenvalues are shifted accordingly. The system is insulating (8 filled, 92 empty) with an indirect band gap of 3.87 eV. The minimum and maximum direct and indirect gaps are indicated. There are 72 k-points in the full BZ, generated using symmetry from the 14 k-points in our user-defined grid.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;TIP&#039;&#039;&#039;: You should inspect the report file after &#039;&#039;every&#039;&#039; run for errors and warnings.&lt;br /&gt;
&lt;br /&gt;
===2D hBN===&lt;br /&gt;
Simply repeat the steps above. Go to the folder &#039;&#039;containing&#039;&#039; the hBN-sheet &#039;&#039;SAVE&#039;&#039; directory and launch &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt;:&lt;br /&gt;
 $ cd TUTORIALS/hBN-2D/YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
 $ yambo&lt;br /&gt;
Again, inspect the &#039;&#039;r_setup&#039;&#039; file, output logs, and verify that &#039;&#039;ndb.gops&#039;&#039; and &#039;&#039;ndb.kpts&#039;&#039; have been created inside the SAVE folder.&lt;br /&gt;
&lt;br /&gt;
You are now ready to use Yambo!&lt;br /&gt;
&lt;br /&gt;
==Yambo&#039;s command line interface==&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to select tasks, generate and modify input files, and control the runtime behaviour by using Yambo&#039;s command line interface.&lt;br /&gt;
&lt;br /&gt;
Command line options are divided into &#039;&#039;&#039;uppercase&#039;&#039;&#039; and &#039;&#039;&#039;lowercase&#039;&#039;&#039; options:&lt;br /&gt;
* Lowercase: select tasks, generate input files, and (by default) launch a file editor&lt;br /&gt;
* Uppercase: modify Yambo&#039;s default settings, at run time and when generating input files&lt;br /&gt;
Lowercase and uppercase options can be used together.&lt;br /&gt;
&lt;br /&gt;
=== Input file generator ===&lt;br /&gt;
First, move to the appropriate folder and initialize the Yambo databases if you haven&#039;t already done so.&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/YAMBO&lt;br /&gt;
 $ yambo                    &#039;&#039;(initialize)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Yambo generates its own input files: you just tell the code what you want to calculate by launching Yambo along with one or more &#039;&#039;&#039;lowercase&#039;&#039;&#039; options. &lt;br /&gt;
&lt;br /&gt;
====Allowed options====&lt;br /&gt;
To see the list of runlevels and options, run &amp;lt;code&amp;gt;yambo -h&amp;lt;/code&amp;gt; or better,&lt;br /&gt;
 $ yambo -H&lt;br /&gt;
 This is yambo 4.4.0 rev.148&lt;br /&gt;
 A shiny pot of fun and happiness [C.D.Hogan] &lt;br /&gt;
 -h		:Short Help&lt;br /&gt;
 -H		:Long Help&lt;br /&gt;
 -J &amp;lt;opt&amp;gt;	:Job string identifier&lt;br /&gt;
 -V &amp;lt;opt&amp;gt;	:Input file verbosity[opt=RL,kpt,sc,qp,io,gen,resp,all,par]&lt;br /&gt;
 -F &amp;lt;opt&amp;gt;	:Input file&lt;br /&gt;
 -I &amp;lt;opt&amp;gt;	:Core I/O directory&lt;br /&gt;
 -O &amp;lt;opt&amp;gt;	:Additional I/O directory&lt;br /&gt;
 -C &amp;lt;opt&amp;gt;	:Communications I/O directory&lt;br /&gt;
 -D		:DataBases properties&lt;br /&gt;
 -W &amp;lt;opt&amp;gt;	:Wall Time limitation (1d2h30m format)&lt;br /&gt;
 -Q		:Don&#039;t launch the text editor&lt;br /&gt;
 -E &amp;lt;opt&amp;gt;	:Environment Parallel Variables file&lt;br /&gt;
 -M		:Switch-off MPI support (serial run)&lt;br /&gt;
 -N		:Switch-off OpenMP support (single thread run)&lt;br /&gt;
 -i		:Initialization&lt;br /&gt;
 -o &amp;lt;opt&amp;gt;	:Optics [opt=(c)hi is (G)-space / (b)se is (eh)-space ]&lt;br /&gt;
 -k &amp;lt;opt&amp;gt;	:Kernel [opt=hartree/alda/lrc/hf/sex](hf/sex only eh-space; lrc only G-space)&lt;br /&gt;
 -y &amp;lt;opt&amp;gt;	:BSE solver [opt=h/d/s/(p/f)i](h)aydock/(d)iagonalization/(i)nversion&lt;br /&gt;
 -r		:Coulomb potential&lt;br /&gt;
 -x		:Hartree-Fock Self-energy and local XC&lt;br /&gt;
 -d		:Dynamical Inverse Dielectric Matrix&lt;br /&gt;
 -b		:Static Inverse Dielectric Matrix&lt;br /&gt;
 -p &amp;lt;opt&amp;gt;	:GW approximations [opt=(p)PA/(c)HOSEX]&lt;br /&gt;
 -g &amp;lt;opt&amp;gt;	:Dyson Equation solver[opt=(n)ewton/(s)ecant/(g)reen]&lt;br /&gt;
 -l		:GoWo Quasiparticle lifetimes&lt;br /&gt;
 -a		:ACFDT Total Energy&lt;br /&gt;
 -s		:ScaLapacK test&lt;br /&gt;
&lt;br /&gt;
Any time you launch Yambo with a lowercase option, Yambo will generate the appropriate input file (default name: &#039;&#039;yambo.in&#039;&#039;) and launch the &amp;lt;code&amp;gt;vi&amp;lt;/code&amp;gt; editor. &lt;br /&gt;
&lt;br /&gt;
Editor choice can be changed at configure; alternatively you can use the &amp;lt;code&amp;gt;-Q&amp;lt;/code&amp;gt; run time option to skip the automatic editing (do this if you are not familiar with &amp;lt;code&amp;gt;vi&amp;lt;/code&amp;gt;!):&lt;br /&gt;
 $ yambo -x -Q&lt;br /&gt;
 yambo: input file yambo.in created&lt;br /&gt;
 $ emacs yambo.in     &#039;&#039;or your favourite editing tool&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Combining options====&lt;br /&gt;
Multiple options can be used together to activate various tasks or runlevels (in some cases this is actually a necessity). &lt;br /&gt;
For instance, to generate an input file for optical spectra including local field effects (Hartree approximation), do (and then exit)&lt;br /&gt;
 $ yambo -o c -k hartree       &#039;&#039;which switches on:&#039;&#039;&lt;br /&gt;
 optics                       # [R OPT] Optics&lt;br /&gt;
 chi                          # [R CHI] Dyson equation for Chi.&lt;br /&gt;
 Chimod= &amp;quot;Hartree&amp;quot;            # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
To perform a Hartree-Fock and GW calculation using a plasmon-pole approximation, do (and then exit):&lt;br /&gt;
 $ yambo -x -g n -p p        &#039;&#039;which switches on:&#039;&#039;&lt;br /&gt;
 HF_and_locXC                 # [R XX] Hartree-Fock Self-energy and Vxc&lt;br /&gt;
 gw0                          # [R GW] GoWo Quasiparticle energy levels&lt;br /&gt;
 ppa                          # [R Xp] Plasmon Pole Approximation&lt;br /&gt;
 em1d                         # [R Xd] Dynamical Inverse Dielectric Matrix      &lt;br /&gt;
Each runlevel activates its own list of variables and flags.&lt;br /&gt;
&lt;br /&gt;
===Changing input parameters ===&lt;br /&gt;
Yambo reads various parameters from existing database files and/or input files and uses them to suggest values or ranges. &lt;br /&gt;
Let&#039;s illustrate this by generating the input file for a Hartree-Fock calculation. &lt;br /&gt;
&lt;br /&gt;
 $ yambo -x&lt;br /&gt;
Inside the generated input file you should find:&lt;br /&gt;
 [[Variables#EXXRLvcs|EXXRLvcs]] =  3187        RL    # [XX] Exchange RL components&lt;br /&gt;
 %[[Variables#QPkrange|QPkrange]]                    # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
   1| 14|  1|100|&lt;br /&gt;
 %&lt;br /&gt;
The &amp;lt;code&amp;gt;[[Variables#QPkrange|QPkrange]]&amp;lt;/code&amp;gt; variable (follow the link for a &amp;quot;detailed&amp;quot; explanation for any variable) suggests a range of k-points (1 to 14) and bands (1 to 100) based on what it finds in the core database &#039;&#039;SAVE/ns.db1&#039;&#039;, i.e. as defined by the DFT code. &amp;lt;br&amp;gt;&lt;br /&gt;
Leave that variable alone, and instead modify the previous variable to &amp;lt;code&amp;gt;EXXRLvcs=  1000        RL&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file, and now generate the input a second time with &amp;lt;code&amp;gt;yambo -x&amp;lt;/code&amp;gt;. You will see:&lt;br /&gt;
  [[Variables#EXXRLvcs|EXXRLvcs]]=  1009        RL&lt;br /&gt;
This indicates that Yambo has read the new input value (1000 G-vectors), checked the database of G-vector shells &#039;&#039;(SAVE/ndb.gops)&#039;&#039;, &lt;br /&gt;
and changed the input value to one that fits a completely closed shell.&lt;br /&gt;
&lt;br /&gt;
Last, note that Yambo variables can be expressed in different &#039;&#039;&#039;units&#039;&#039;&#039;. In this case, &amp;lt;code&amp;gt;RL&amp;lt;/code&amp;gt; can be replaced by an energy unit like Ry, eV, Ha, etc. Energy units are generally better as they are independent of the cell size. Technical information is available on the [[Variables]] page. &lt;br /&gt;
&lt;br /&gt;
The input file generator of Yambo is thus an &#039;&#039;intelligent&#039;&#039; parser, which interacts with the user and the existing databases. For this reason we recommend that you always use Yambo to generate the input files, rather than making them yourself.&lt;br /&gt;
&lt;br /&gt;
===Uppercase options===&lt;br /&gt;
Uppercase options modify some of the code&#039;s default settings. They can be used when launching the code but also when generating input files. &lt;br /&gt;
&lt;br /&gt;
====Allowed options====&lt;br /&gt;
To see the list of options, again do:&lt;br /&gt;
 $ yambo -H&lt;br /&gt;
 Tool: yambo 4.1.2 rev.14024&lt;br /&gt;
 Description: A shiny pot of fun and happiness [C.D.Hogan] &lt;br /&gt;
 -J &amp;lt;opt&amp;gt;	:Job string identifier&lt;br /&gt;
 -V &amp;lt;opt&amp;gt;	:Input file verbosity&lt;br /&gt;
                 [opt=RL,kpt,sc,qp,io,gen,resp,all,par]&lt;br /&gt;
 -F &amp;lt;opt&amp;gt;	:Input file&lt;br /&gt;
 -I &amp;lt;opt&amp;gt;	:Core I/O directory&lt;br /&gt;
 -O &amp;lt;opt&amp;gt;	:Additional I/O directory&lt;br /&gt;
 -C &amp;lt;opt&amp;gt;	:Communications I/O directory&lt;br /&gt;
 -D		:DataBases properties&lt;br /&gt;
 -W &amp;lt;opt&amp;gt;	:Wall Time limitation (1d2h30m format)&lt;br /&gt;
 -Q		:Don&#039;t launch the text editor&lt;br /&gt;
 -M		:Switch-off MPI support (serial run)&lt;br /&gt;
 -N		:Switch-off OpenMP support (single thread run)&lt;br /&gt;
 [Lower case options]&lt;br /&gt;
&lt;br /&gt;
Command line options are extremely important to master if you want to use yambo productively. &lt;br /&gt;
Often, the meaning is clear from the help menu:&lt;br /&gt;
 $ yambo -F yambo.in_HF -x    &#039;&#039;Make a Hartree -Fock input file called yambo.in_HF&#039;&#039;&lt;br /&gt;
 $ yambo -D                   &#039;&#039;Summarize the content of the databases in the SAVE folder&#039;&#039;&lt;br /&gt;
 $ yambo -I ../               &#039;&#039;Run the code, using a SAVE folder in a directory one level up&#039;&#039;&lt;br /&gt;
 $ yambo -C MyTest            &#039;&#039;Run the code, putting all report, log, plot files inside a folder MyTest&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
Other options deserve a closer look.&lt;br /&gt;
===Verbosity===&lt;br /&gt;
Yambo uses &#039;&#039;many&#039;&#039; input variables, many of which can be left at their default values. To keep input files short and manageable, only a few variables appear by default  in the inout file. More advanced variables can be switched on by using the &amp;lt;code&amp;gt;-V&amp;lt;/code&amp;gt; verbosity option. These are grouped according to the type of variable. For instance, &amp;lt;code&amp;gt;-V RL&amp;lt;/code&amp;gt; switches on variables related to G vector summations, and &amp;lt;code&amp;gt;-V io&amp;lt;/code&amp;gt; switches on options related to I/O control. Try: &lt;br /&gt;
&lt;br /&gt;
 $ yambo -o c -V RL       &#039;&#039;switches on:&#039;&#039;&lt;br /&gt;
 FFTGvecs=  3951        RL    # [FFT] Plane-waves&lt;br /&gt;
 &lt;br /&gt;
 $ yambo -o c -V io       &#039;&#039;switches on:&#039;&#039;&lt;br /&gt;
 StdoHash=  40                # [IO] Live-timing Hashes&lt;br /&gt;
 DBsIOoff= &amp;quot;none&amp;quot;             # [IO] Space-separated list of DB with NO I/O. DB= ...&lt;br /&gt;
 DBsFRAGpm= &amp;quot;none&amp;quot;            # [IO] Space-separated list of +DB to be FRAG and ...&lt;br /&gt;
 #WFbuffIO                    # [IO] Wave-functions buffered I/O&lt;br /&gt;
&lt;br /&gt;
Unfortunately, -V options must be invoked and changed &#039;&#039;one at a time&#039;&#039;. When you are more expert, you may go straight to &amp;lt;code&amp;gt;-V all&amp;lt;/code&amp;gt;, which turns on all possible variables. However note that &amp;lt;code&amp;gt;yambo -o c -V all&amp;lt;/code&amp;gt; adds an extra 30 variables to the input file, which can be confusing: use it with care.&lt;br /&gt;
&lt;br /&gt;
===Job script label===&lt;br /&gt;
The best way to keep track of different runs using different parameters is through the &amp;lt;code&amp;gt;-J&amp;lt;/code&amp;gt; flag. This inserts a label in all output and report files, and creates a new folder containing any new databases (i.e. they are not written in the core &#039;&#039;SAVE&#039;&#039; folder). Try:&lt;br /&gt;
 $ yambo -J 1Ry -V RL -x        &#039;&#039;and modify to&#039;&#039;&lt;br /&gt;
 FFTGvecs = 1 Ry&lt;br /&gt;
 EXXGvecs = 1 Ry&lt;br /&gt;
 $ yambo -J 1Ry           &#039;&#039;Run the code&#039;&#039;&lt;br /&gt;
 $ ls&lt;br /&gt;
 yambo.in SAVE  &lt;br /&gt;
 o-1Ry.hf r-1Ry_HF_and_locXC 1Ry 1Ry/ndb.HF_and_locXC&lt;br /&gt;
This is extremely useful when running convergence tests, trying out different parameters, etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Exercise&#039;&#039;: use &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; to report the properties of all database files (including &#039;&#039;ndb.HF_and_locXC&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in hBN==&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in 2D BN==&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3613</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3613"/>
		<updated>2020-01-23T13:59:38Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
&lt;br /&gt;
==Download the Files==&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
==DFT calculation of bulk hBN and conversion to Yambo==&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
&lt;br /&gt;
=== DFT calculations ===&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Yambo format ===&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Initialization of Yambo databases==&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Yambo&#039;s command line interface==&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in hBN==&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in 2D BN==&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3612</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3612"/>
		<updated>2020-01-23T13:58:28Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
&lt;br /&gt;
==Download the Files==&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
==DFT calculation of bulk hBN and conversion to Yambo==&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
&lt;br /&gt;
=== DFT calculations ===&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Yambo format ===&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Initialization of Yambo databases==&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Yambo&#039;s command line interface==&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in hBN==&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Optical absorption in 2D BN==&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3611</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3611"/>
		<updated>2020-01-23T13:57:35Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
== Step 1: System characteristics ==&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
&lt;br /&gt;
==Step 2: Download the Files==&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
==Step 3: DFT calculation of bulk hBN and conversion to Yambo==&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
&lt;br /&gt;
=== DFT calculations ===&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Yambo format ===&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Step 3: Initialization of Yambo databases==&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Step 4: Yambo&#039;s command line interface==&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Step 5: Optical absorption in hBN==&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Step 6: Optical absorption in 2D BN==&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3610</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3610"/>
		<updated>2020-01-23T13:55:48Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
&lt;br /&gt;
==Step 0: Download the Files==&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
==Step 1: DFT calculation of bulk hBN and conversion to Yambo==&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
&lt;br /&gt;
=== DFT calculations ===&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Yambo format ===&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Step 2: Initialization of Yambo databases==&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Step 3: Yambo&#039;s command line interface==&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Step 4: Optical absorption in hBN==&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Step 5: Optical absorption in 2D BN==&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3609</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3609"/>
		<updated>2020-01-23T13:54:00Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
&lt;br /&gt;
===Step 0: Download the Files===&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
===Step 1: DFT calculation of bulk hBN and conversion to Yambo===&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
&lt;br /&gt;
== DFT calculations ==&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
== Conversion to Yambo format ==&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to run a DFT calculation with PWscf in preparation for Yambo&lt;br /&gt;
* Convert the DFT output into the Yambo format&lt;br /&gt;
* How to check the contents of the netCDF databases&lt;br /&gt;
&lt;br /&gt;
===Step 2: Initialization of Yambo databases===&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 3: Yambo&#039;s command line interface===&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Step 4: Optical absorption in hBN===&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 5: Optical absorption in 2D BN===&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3608</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3608"/>
		<updated>2020-01-23T13:52:34Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
* Follow the instructions in the [[Tutorials#Files|File page]] and download and unpack the hBN.tar.gz.&lt;br /&gt;
&lt;br /&gt;
Before starting, you need to obtain the tarballs for hBN and hBN-2D. See instructions on the [[Tutorials|main tutorials page]].&lt;br /&gt;
&lt;br /&gt;
The steps are the following: &amp;lt;!--Menu appears here--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 0: Download the Files===&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
===Step 1: DFT calculation of bulk hBN and conversion to Yambo===&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DFT calculations ==&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
== Conversion to Yambo format ==&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to run a DFT calculation with PWscf in preparation for Yambo&lt;br /&gt;
* Convert the DFT output into the Yambo format&lt;br /&gt;
* How to check the contents of the netCDF databases&lt;br /&gt;
&lt;br /&gt;
===Step 2: Initialization of Yambo databases===&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 3: Yambo&#039;s command line interface===&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Step 4: Optical absorption in hBN===&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 5: Optical absorption in 2D BN===&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3607</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3607"/>
		<updated>2020-01-23T13:50:18Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|thumb|Atomic structure of bulk hBN]]&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
* Follow the instructions in the [[Tutorials#Files|File page]] and download and unpack the hBN.tar.gz.&lt;br /&gt;
&lt;br /&gt;
Before starting, you need to obtain the tarballs for hBN and hBN-2D. See instructions on the [[Tutorials|main tutorials page]].&lt;br /&gt;
&lt;br /&gt;
The steps are the following: &amp;lt;!--Menu appears here--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 0: Download the Files===&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
===Step 1: DFT calculation of bulk hBN and conversion to Yambo===&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DFT calculations ==&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
== Conversion to Yambo format ==&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to run a DFT calculation with PWscf in preparation for Yambo&lt;br /&gt;
* Convert the DFT output into the Yambo format&lt;br /&gt;
* How to check the contents of the netCDF databases&lt;br /&gt;
&lt;br /&gt;
===Step 2: Initialization of Yambo databases===&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 3: Yambo&#039;s command line interface===&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Step 4: Optical absorption in hBN===&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 5: Optical absorption in 2D BN===&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3606</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3606"/>
		<updated>2020-01-23T13:49:08Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Step 1: DFT calculation of bulk hBN and conversion to Yambo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
Before starting, you need to obtain the tarballs for hBN and hBN-2D. See instructions on the [[Tutorials|main tutorials page]].&lt;br /&gt;
&lt;br /&gt;
The steps are the following: &amp;lt;!--Menu appears here--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 0: Download the Files===&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
===Step 1: DFT calculation of bulk hBN and conversion to Yambo===&lt;br /&gt;
&lt;br /&gt;
In this module you will learn how to generate the Yambo &#039;&#039;SAVE&#039;&#039; folder for bulk hBN starting from a PWscf calculation.&lt;br /&gt;
 &lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&#039;&#039;&#039;You will need&#039;&#039;&#039;:&lt;br /&gt;
* PWSCF input files and pseudopotentials for hBN bulk &lt;br /&gt;
* &amp;lt;code&amp;gt;pw.x&amp;lt;/code&amp;gt; executable, version 5.0 or later&lt;br /&gt;
* &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; executables&lt;br /&gt;
* Follow the instructions in the [[Tutorials#Files|File page]] and download and unpack the hBN.tar.gz.&lt;br /&gt;
&lt;br /&gt;
== System characteristics ==&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|thumb|Atomic structure of bulk hBN]]&lt;br /&gt;
&#039;&#039;&#039;Hexagonal boron nitride - hBN&#039;&#039;&#039;:&lt;br /&gt;
* HCP lattice, ABAB stacking&lt;br /&gt;
* Four atoms per cell, B and N (16 electrons)&lt;br /&gt;
* Lattice constants: &#039;&#039;a&#039;&#039; = 4.716 [a.u.], &#039;&#039;c/a&#039;&#039; = 2.582&lt;br /&gt;
* Plane wave cutoff 40 Ry (~1500 RL vectors in wavefunctions)&lt;br /&gt;
* SCF run: shifted &#039;&#039;6x6x2&#039;&#039; grid (12 k-points) with 8 bands &lt;br /&gt;
* Non-SCF run: gamma-centred &#039;&#039;6x6x2&#039;&#039; (14 k-points) grid with 100 bands&lt;br /&gt;
&lt;br /&gt;
== DFT calculations ==&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN/PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 Inputs		Pseudos		PostProcessing		References&lt;br /&gt;
 hBN_scf.in	hBN_nscf.in     hBN_scf_plot_bands.in  hBN_nscf_plot_bands.in &lt;br /&gt;
&lt;br /&gt;
First run the SCF calculation to generate the ground-state charge density, occupations, Fermi level, and so on:&lt;br /&gt;
 $ pw.x &amp;lt; hBN_scf.in &amp;gt; hBN_scf.out&lt;br /&gt;
Inspection of the output shows that the valence band maximum lies at 5.06eV.&lt;br /&gt;
&lt;br /&gt;
Next run a non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors for both occupied and unoccupied states (100 bands): &lt;br /&gt;
 $ pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out                  &#039;&#039;(serial run, ~1 min) OR&#039;&#039;&lt;br /&gt;
 $ mpirun -np 2 pw.x &amp;lt; hBN_nscf.in &amp;gt; hBN_nscf.out       &#039;&#039;(parallel run, 40s)&#039;&#039;&lt;br /&gt;
Here we use a &#039;&#039;6x6x2&#039;&#039; grid giving 14 k-points, but denser grids should be used for checking convergence of Yambo runs.&lt;br /&gt;
&lt;br /&gt;
Note the presence of the following flags in the input file:&lt;br /&gt;
 wf_collect=.true.&lt;br /&gt;
 force_symmorphic=.true.&lt;br /&gt;
 diago_thr_init=5.0e-6,&lt;br /&gt;
 diago_full_acc=.true.&lt;br /&gt;
which are needed for generating the Yambo databases accurately. Full explanations of these variables are given on the [http://www.quantum-espresso.org/wp-content/uploads/Doc/INPUT_PW.html quantum-ESPRESSO input variables page]. &lt;br /&gt;
&lt;br /&gt;
After these two runs, you should have a &#039;&#039;hBN.save&#039;&#039; directory:&lt;br /&gt;
 $ ls hBN.save&lt;br /&gt;
 data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF&lt;br /&gt;
 K00001	K00002 .... 	K00035	K00036&lt;br /&gt;
&lt;br /&gt;
== Conversion to Yambo format ==&lt;br /&gt;
The PWscf &#039;&#039;bBN.save&#039;&#039; output is converted to the Yambo format using the &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt; executable (pwscf to yambo), found in the yambo &#039;&#039;bin&#039;&#039; directory.&lt;br /&gt;
Enter &#039;&#039;hBN.save&#039;&#039; and launch &amp;lt;code&amp;gt;p2y&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 $ cd hBN.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; DBs path set to .&lt;br /&gt;
 &amp;lt;---&amp;gt; Index file set to data-file.xml&lt;br /&gt;
 &amp;lt;---&amp;gt; Header/K-points/Energies... done&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB1 (Gvecs and more) ...&lt;br /&gt;
 &amp;lt;---&amp;gt; ... Database done&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB2 (wavefunctions)  ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt; == DB3 (PseudoPotential) ... done ==&lt;br /&gt;
 &amp;lt;---&amp;gt;  == P2Y completed ==&lt;br /&gt;
&lt;br /&gt;
This output repeats some information about the system and generates a &#039;&#039;SAVE&#039;&#039; directory:&lt;br /&gt;
 $ ls SAVE&lt;br /&gt;
 ns.db1  ns.wf  ns.kb_pp_pwscf&lt;br /&gt;
 ns.wf_fragments_1_1 ...&lt;br /&gt;
 ns.kb_pp_pwscf_fragment_1 ...&lt;br /&gt;
These files, with an &#039;&#039;n&#039;&#039; prefix, indicate that they are in netCDF format, and thus not human readable. However, they are perfectly transferable across different architectures. You can check that the databases contain the information you expect by launching Yambo using the &amp;lt;code&amp;gt;-D&amp;lt;/code&amp;gt; option:&lt;br /&gt;
&lt;br /&gt;
 $ yambo -D&lt;br /&gt;
 [RD./SAVE//ns.db1]------------------------------------------&lt;br /&gt;
 Bands                           : 100&lt;br /&gt;
 K-points                        : 14&lt;br /&gt;
 G-vectors             [RL space]:  8029&lt;br /&gt;
 Components       [wavefunctions]: 1016&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.wf]-------------------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 ...&lt;br /&gt;
 [RD./SAVE//ns.kb_pp_pwscf]----------------------------------&lt;br /&gt;
 Fragmentation                    :yes&lt;br /&gt;
 - S/N 006626 -------------------------- v.04.01.02 r.00000 -&lt;br /&gt;
&lt;br /&gt;
In practice we suggest to move the &#039;&#039;SAVE&#039;&#039; folder into a new clean folder. &lt;br /&gt;
&lt;br /&gt;
In this tutorial however, we ask instead that you continue using a &#039;&#039;SAVE&#039;&#039; folder that we prepared previously:&lt;br /&gt;
 $ cd ../../YAMBO&lt;br /&gt;
 $ ls&lt;br /&gt;
 SAVE&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
From this tutorial you&#039;ve learned:&lt;br /&gt;
* How to run a DFT calculation with PWscf in preparation for Yambo&lt;br /&gt;
* Convert the DFT output into the Yambo format&lt;br /&gt;
* How to check the contents of the netCDF databases&lt;br /&gt;
&lt;br /&gt;
===Step 2: Initialization of Yambo databases===&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 3: Yambo&#039;s command line interface===&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Step 4: Optical absorption in hBN===&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 5: Optical absorption in 2D BN===&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3605</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3605"/>
		<updated>2020-01-23T13:47:09Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Step 0: Download the Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
Before starting, you need to obtain the tarballs for hBN and hBN-2D. See instructions on the [[Tutorials|main tutorials page]].&lt;br /&gt;
&lt;br /&gt;
The steps are the following: &amp;lt;!--Menu appears here--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 0: Download the Files===&lt;br /&gt;
&lt;br /&gt;
Download and unpack the  [http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] and [http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] files.&lt;br /&gt;
After downloading the tar.gz files just unpack them in the &#039;&#039;&#039;YAMBO_TUTORIALS&#039;&#039;&#039; folder. For example&lt;br /&gt;
 $ mkdir YAMBO_TUTORIALS&lt;br /&gt;
 $ mv hBN.tar.gz YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS&lt;br /&gt;
 $ tar -xvfz hBN.tar.gz&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN&lt;br /&gt;
&lt;br /&gt;
(Advanced users can download and install all tutorial files using git. See the main  [[Tutorials#Files|Tutorial Files]] page.)&lt;br /&gt;
&lt;br /&gt;
===Step 1: DFT calculation of bulk hBN and conversion to Yambo===&lt;br /&gt;
Follow the DFT and p2y module on &#039;&#039;&#039;[[Bulk material: h-BN|database generation for bulk hBN]]&#039;&#039;&#039; and then &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
There is no need to complete the DFT and p2y module on &#039;&#039;&#039;[[2D_material:_h-BN_sheet|database generation in 2D hBN]]&#039;&#039;&#039;, but you may do so if you wish.&lt;br /&gt;
&lt;br /&gt;
===Step 2: Initialization of Yambo databases===&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 3: Yambo&#039;s command line interface===&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Step 4: Optical absorption in hBN===&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 5: Optical absorption in 2D BN===&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=3604</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=3604"/>
		<updated>2020-01-23T13:41:47Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Monday 27 Jan HANDS-ON 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Tutorial files ===&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of the following pre-prepared Yambo databases or DFT input files:&amp;lt;br&amp;gt;&lt;br /&gt;
DAY 1-2-3. hBN-3D and hBN-2D&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz] (237 MB) &lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz] (8.6 MB)&amp;lt;br&amp;gt;&lt;br /&gt;
DAY 3. hBN-2D with higher convergence parameters for parallel tutorials:&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz] (137 MB)&amp;lt;br&amp;gt;&lt;br /&gt;
DAY 4. hBN-2D and AlAs for real time simulations&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-RT.tar.gz hBN-2D-RT.tar.gz] (10 MB)&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/AlAs.tar.gz AlAs.tar.gz] (10 MB)&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
&#039;&#039;&#039;14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[First steps: walk through from DFT to RPA (standalone)]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
Link to old CECAM specific cases: [[GW_parallel_strategies_CECAM]] and [[Pushing_convergence_in_parallel_CECAM]]&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real-time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Linear response from real time simulations]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to non-linear response]]&lt;br /&gt;
* [[Correlation effects in the non-linear response]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Pedro Melo&lt;br /&gt;
&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3603</id>
		<title>First steps: walk through from DFT to RPA (standalone)</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=First_steps:_walk_through_from_DFT_to_RPA_(standalone)&amp;diff=3603"/>
		<updated>2020-01-23T13:41:24Z</updated>

		<summary type="html">&lt;p&gt;Conor: Created page with &amp;quot;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical resp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will learn how to calculate optical spectra using Yambo, starting from a DFT calculation and ending with a look at local field effects in the optical response. &lt;br /&gt;
&lt;br /&gt;
We will use a 3D system (bulk hBN) and a 2D system (hBN sheet). &lt;br /&gt;
&lt;br /&gt;
[[File:HBN-bulk-3x3-annotated.png|x200px|Atomic structure of bulk hBN]]&lt;br /&gt;
[[File:HBN2.png|x200px|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
Before starting, you need to obtain the tarballs for hBN and hBN-2D. See instructions on the [[Tutorials|main tutorials page]].&lt;br /&gt;
&lt;br /&gt;
The steps are the following: &amp;lt;!--Menu appears here--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 0: Download the Files===&lt;br /&gt;
Follow the instructions in the [[Tutorials#Files|Tutorial Files]] and download and unpack the  &amp;lt;code&amp;gt;hBN.tar.gz&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;hBN-2D.tar.gz&amp;lt;/code&amp;gt; files.&lt;br /&gt;
&lt;br /&gt;
===Step 1: DFT calculation of bulk hBN and conversion to Yambo===&lt;br /&gt;
Follow the DFT and p2y module on &#039;&#039;&#039;[[Bulk material: h-BN|database generation for bulk hBN]]&#039;&#039;&#039; and then &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
There is no need to complete the DFT and p2y module on &#039;&#039;&#039;[[2D_material:_h-BN_sheet|database generation in 2D hBN]]&#039;&#039;&#039;, but you may do so if you wish.&lt;br /&gt;
&lt;br /&gt;
===Step 2: Initialization of Yambo databases===&lt;br /&gt;
Use the &#039;&#039;SAVE&#039;&#039; folders that are already provided, rather than any ones you may have generated previously. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Initialization]]&#039;&#039;&#039;, for both hBN and 2D-hBN, and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 3: Yambo&#039;s command line interface===&lt;br /&gt;
Yambo uses a command line interface to select tasks, generate input files, and control the runtime behaviour. &lt;br /&gt;
&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Input_file_generation_and_command_line_options|Input file generation and command line options]]&#039;&#039;&#039; for bulk hBN and then return to this tutorial &amp;quot;First steps...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Step 4: Optical absorption in hBN===&lt;br /&gt;
Follow the module on &#039;&#039;&#039;[[Optics at the independent particle level]]&#039;&#039;&#039; for  bulk hBN and &#039;&#039;&#039;return to this tutorial &amp;quot;First steps...&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Step 5: Optical absorption in 2D BN===&lt;br /&gt;
&lt;br /&gt;
To complete the tutorial you should use the preprepared &#039;&#039;SAVE&#039;&#039; folder for 2D BN and follow the module on &#039;&#039;&#039;[[Local fields]]&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Parse_qp.py&amp;diff=3489</id>
		<title>Parse qp.py</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Parse_qp.py&amp;diff=3489"/>
		<updated>2020-01-21T14:41:21Z</updated>

		<summary type="html">&lt;p&gt;Conor: Created page with &amp;quot;Save the following text into a file called &amp;#039;&amp;#039;&amp;#039;parse_qp.py&amp;#039;&amp;#039;&amp;#039; &amp;lt;pre&amp;gt; #! /usr/bin/env python3 import sys  def parse_report(file_qp):    #    outl=[]    outd={}    fl=open(file_qp...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Save the following text into a file called &#039;&#039;&#039;parse_qp.py&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#! /usr/bin/env python3&lt;br /&gt;
import sys&lt;br /&gt;
&lt;br /&gt;
def parse_report(file_qp):&lt;br /&gt;
   #&lt;br /&gt;
   outl=[]&lt;br /&gt;
   outd={}&lt;br /&gt;
   fl=open(file_qp,&amp;quot;r&amp;quot;)&lt;br /&gt;
   #&lt;br /&gt;
   for line in fl:&lt;br /&gt;
     #&lt;br /&gt;
     if &amp;quot;#  X G`s&amp;quot; in line:&lt;br /&gt;
        outd[&amp;quot;X_gvect&amp;quot;]=int(line.split()[-1])&lt;br /&gt;
     if &amp;quot;#  X bands&amp;quot; in line:&lt;br /&gt;
        outd[&amp;quot;X_bands&amp;quot;]=int(line.split()[-1])&lt;br /&gt;
     if &amp;quot;#  Sc/G bands&amp;quot; in line:&lt;br /&gt;
        outd[&amp;quot;G_bands&amp;quot;]=int(line.split()[-1])&lt;br /&gt;
     if &amp;quot;#&amp;quot; in line: continue&lt;br /&gt;
     if len(line) == 0: continue&lt;br /&gt;
     s=line.split()&lt;br /&gt;
     if len(s) != 5 : continue&lt;br /&gt;
&lt;br /&gt;
     data=[float(s[0]),float(s[1]),float(s[2]),float(s[3])]&lt;br /&gt;
     outl.append(data)&lt;br /&gt;
     outd[&amp;quot;qp_list&amp;quot;]=outl&lt;br /&gt;
&lt;br /&gt;
   fl.close()&lt;br /&gt;
   return outd&lt;br /&gt;
&lt;br /&gt;
def formatter(val,maxfield=12):&lt;br /&gt;
    sval=str(val)&lt;br /&gt;
    return &amp;quot; &amp;quot;*(maxfield-len(sval))+sval&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def print_qp_data(outd=None,val=None):&lt;br /&gt;
    if outd == None:&lt;br /&gt;
       strout =  formatter(&amp;quot;# Xo_gvect&amp;quot;)&lt;br /&gt;
       strout += formatter(&amp;quot;Xo_nbnd&amp;quot;)&lt;br /&gt;
       strout += formatter(&amp;quot;G_nbnd&amp;quot;)&lt;br /&gt;
       strout += formatter(&amp;quot;Egap [eV]&amp;quot;)&lt;br /&gt;
       print(strout)&lt;br /&gt;
       return&lt;br /&gt;
&lt;br /&gt;
    outl=outd[&amp;quot;qp_list&amp;quot;]&lt;br /&gt;
    #&lt;br /&gt;
    # determine top of the valence&lt;br /&gt;
    if val==None:&lt;br /&gt;
      for dat in outl:&lt;br /&gt;
         if dat[2] == 0.0:&lt;br /&gt;
            val=int(dat[1])&lt;br /&gt;
            break&lt;br /&gt;
&lt;br /&gt;
    # valence top was not found&lt;br /&gt;
    if val == None: sys.exit(2)&lt;br /&gt;
&lt;br /&gt;
    # compute the gap&lt;br /&gt;
    homo=-10000&lt;br /&gt;
    lumo=+10000&lt;br /&gt;
    for dat in outl:&lt;br /&gt;
       tmp=(dat[2]+dat[3])&lt;br /&gt;
       if (dat[1]==val+1):&lt;br /&gt;
         if (tmp&amp;lt;lumo): lumo=tmp&lt;br /&gt;
       if (dat[1]==val):&lt;br /&gt;
         if (tmp&amp;gt;homo): homo=tmp&lt;br /&gt;
    #&lt;br /&gt;
    egap=lumo-homo&lt;br /&gt;
    egap_str=str(&amp;quot;%10.6f&amp;quot; % egap)&lt;br /&gt;
    #&lt;br /&gt;
    stdout  = formatter(outd[&amp;quot;X_gvect&amp;quot;])&lt;br /&gt;
    stdout += formatter(outd[&amp;quot;X_bands&amp;quot;])&lt;br /&gt;
    stdout += formatter(outd[&amp;quot;G_bands&amp;quot;])&lt;br /&gt;
    stdout += formatter(egap_str)&lt;br /&gt;
    print(stdout)&lt;br /&gt;
&lt;br /&gt;
def main(argv):&lt;br /&gt;
   #&lt;br /&gt;
   usage_str=&#039;&#039;&#039;&lt;br /&gt;
  Usage parse_qp.py  [-h,--help] file_qp1 file_qp2...&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
   #&lt;br /&gt;
   if len(argv) == 1:&lt;br /&gt;
     print(usage_str)&lt;br /&gt;
     sys.exit(1)&lt;br /&gt;
   if argv[1]==&amp;quot;-h&amp;quot; or argv[1]==&amp;quot;--help&amp;quot;:&lt;br /&gt;
     print(usage_str)&lt;br /&gt;
     sys.exit(0)&lt;br /&gt;
   #&lt;br /&gt;
   print_qp_data()&lt;br /&gt;
   flist=argv&lt;br /&gt;
   for f in flist[1:]:&lt;br /&gt;
     #&lt;br /&gt;
     outd=parse_report(f)&lt;br /&gt;
     print_qp_data(outd)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;quot;__main__&amp;quot;:&lt;br /&gt;
   main(sys.argv)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Pushing_convergence_in_parallel&amp;diff=3488</id>
		<title>Pushing convergence in parallel</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Pushing_convergence_in_parallel&amp;diff=3488"/>
		<updated>2020-01-21T14:36:08Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Files and Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run it  just replace the parallel queue instructions with simple MPI commands.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Files and Tools==&lt;br /&gt;
Database and tools can be downloaded here:&lt;br /&gt;
&lt;br /&gt;
*[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/educational/tutorials/files/parse_yambo.py parse_yambo.py]&lt;br /&gt;
*[http://www.yambo-code.org/educational/tutorials/files/parse_qp.py parse_qp.py]   (or wiki version: [[parse_qp.py]])&lt;br /&gt;
&lt;br /&gt;
== 2D hBN ==&lt;br /&gt;
&lt;br /&gt;
In the previous session we focused on the scaling properties of the code.&lt;br /&gt;
We now focus more on the physical aspect.&lt;br /&gt;
&lt;br /&gt;
The system we are working on is the 2D-hBN sheet we already used the first day.&lt;br /&gt;
[[File:HBN2.png|500px|center|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
If you want a published reference of quasi-particle properties of hBN you can have a look to the following arxiv, &lt;br /&gt;
https://arxiv.org/abs/1511.00129 (Phys. Rev. B 94, 155406 (2016)),&lt;br /&gt;
and references therein, were the GW correction are computed.&lt;br /&gt;
In that case the convergence with the number of k-points is studied in detail (for hBN and other materials).&lt;br /&gt;
The focus is on a proper description of the q-&amp;gt;0 limit of the (screened) electron-electron&lt;br /&gt;
interaction entering the GW self-energy.&lt;br /&gt;
As you can see from the below image extracted from the arxiv the QP corrections converge slowly with the number of k-points.&lt;br /&gt;
[[File:QP convergence hBN from literature.png|400px|center|Yambo tutorial image]]&lt;br /&gt;
In the present tutorial you will start using a 12x12 grid.&lt;br /&gt;
Only in the last part we will re-run pw.x (optional) to generate bigger k-grids&lt;br /&gt;
&lt;br /&gt;
Tomorrow you will learn how to do that in a more automatic way using the yambopy scripting tools, however running yambo in serial.&lt;br /&gt;
While yambopy offers an easier interface for the use, in the present parallel tutorial you&lt;br /&gt;
will be able to push much more the convergence. In a real life calculation you will likely take advantage&lt;br /&gt;
of both.&lt;br /&gt;
&lt;br /&gt;
As this morning if you are not inside bellatrix, please follow the instructions in the tutorial home. &lt;br /&gt;
If you are inside bellatrix and in the proper folder&lt;br /&gt;
 [cecam.school01@bellatrix yambo_YOUR_NAME]$ pwd&lt;br /&gt;
 /scratch/cecam.schoolXY/yambo_YOUR_NAME&lt;br /&gt;
you can proceed.&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN-2D-para/YAMBO&lt;br /&gt;
For the present tutorial you will need an upgraded version of the parse_qp.py. &amp;lt;br&amp;gt;&lt;br /&gt;
You can get it from the scratch folder&lt;br /&gt;
 $ cp /scratch/cecam.school/parse_qp.py ./&lt;br /&gt;
&lt;br /&gt;
== Convergence on the number of bands in X and G ==&lt;br /&gt;
&lt;br /&gt;
To do convergence calculations you need to execute the same run many time, progressively changing one (or more of the input variables)&lt;br /&gt;
We start considering the number of bands entering the construction of the response function. This will then be used to compute the screened electron-electron interaction, W, needed for the GW self-energy.&lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
Try to use different values, going to a very small one (say 10) up to the maximum allowed by the number of bands computed with pw.x to generate the present database (400). You may use 10, 25, 50, 100, 200, 400.&lt;br /&gt;
Since now the focus is not anymore on the number of cores but on the yambo input parameters, it is a good idea to label the jobname accordingly to the latter in the run.sh script:&lt;br /&gt;
   label=Xnb&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt;_Gnb200_ecut4Ry&lt;br /&gt;
Then you can use the parse_qp.py script to extract the direct gap using the command&lt;br /&gt;
 ./parse_qp.py run*/o-*.qp&lt;br /&gt;
The output should be something similar to&lt;br /&gt;
   # Xo_gvect     Xo_nbnd      G_nbnd   Egap [eV]&lt;br /&gt;
         245          25          25    6.848440&lt;br /&gt;
         245          50          50    6.759580&lt;br /&gt;
         245          75          75    6.724210&lt;br /&gt;
         245         100         100    6.712120&lt;br /&gt;
         245         200         200    6.717220&lt;br /&gt;
         245         400         400    6.733410&lt;br /&gt;
&lt;br /&gt;
Now you can try to do the same with the number of bands entering the definition of the green function&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
You can do the same numbers we tried for the bands entering the response function.&lt;br /&gt;
It is also a good idea to let yambo read the screening from a previous run.&lt;br /&gt;
To this end you need to create a folder and copy there the screening DB&lt;br /&gt;
 $ mkdir SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
 $ cp Xnb&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;_Gnb&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt;_ecut4Ry/ndb.pp* SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
Then, to let yambo read it, edit the job.sh script creating the new variable&lt;br /&gt;
 auxjdir=SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
and &lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;$jdir,&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;$auxjdir&amp;quot;&amp;lt;/span&amp;gt; -C $cdir&lt;br /&gt;
&lt;br /&gt;
Below how your QP gap should converge versus the total number of band used both in X and G &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:QP gap convergence.png|600px|center|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- remember to run in parallel, we suggest you keep using 16 cores, with 2 OpenMP threads, but for the biggest runs you can try to use even more than one node&lt;br /&gt;
&lt;br /&gt;
== Convergence with the energy cut-off on the response function ==&lt;br /&gt;
&lt;br /&gt;
The variable we now consider is the energy cut-off, i.e. the number of G-vectors used to construct the &amp;lt;math&amp;gt;\chi_{G,G&#039;}(\omega)&amp;lt;/math&amp;gt; matrix&lt;br /&gt;
&lt;br /&gt;
 NGsBlkXp= &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;4            Ry&amp;lt;/span&amp;gt;    # [Xp] Response block size&lt;br /&gt;
&lt;br /&gt;
Even in this case try changing the input value from a low value to a big one.&lt;br /&gt;
Try 0 (it means the code will just use 1 G vector), 1, 2, 4 and 8.&lt;br /&gt;
This time you are re-computing the screening, so you cannot use anymore the auxdir from the previous run.&lt;br /&gt;
just change the script back as&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;quot;$jdir,$auxjdir&amp;quot; -C $cdir&lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;$jdir&amp;lt;/span&amp;gt; -C $cdir&lt;br /&gt;
&lt;br /&gt;
== Convergence with the number of k-points (optional) ==&lt;br /&gt;
&lt;br /&gt;
For this last step you need to  re-run pw.x&lt;br /&gt;
Go to the DFT folder&lt;br /&gt;
 $ cd ../PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 hBN_2D_nscf.in  hBN_2D_scf.in  Inputs  Pseudos  References&lt;br /&gt;
You now need to run pw.x, first the scf step, then then NSCF step.&lt;br /&gt;
&lt;br /&gt;
For the &#039;&#039;&#039;SCF step&#039;&#039;&#039; copy the submit script you used for yambo here,&lt;br /&gt;
 $ cp ../YAMBO/run.sh ./&lt;br /&gt;
change it (you can erase many lines)&lt;br /&gt;
 $ vim run.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #SBATCH -N &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 #SBATCH -t 06:00:00 &lt;br /&gt;
 #SBATCH -J test_braun&lt;br /&gt;
 #SBATCH --reservation=cecam_course&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;nodes=1&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;nthreads=8&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;ncpu=`echo $nodes $nthreads 16 | awk &#039;{print $1*$3/$2}&#039;`&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 module purge&lt;br /&gt;
 module load intel/16.0.3&lt;br /&gt;
 module load intelmpi/5.1.3&lt;br /&gt;
 bindir=/home/cecam.school/bin/&lt;br /&gt;
 &lt;br /&gt;
 export OMP_NUM_THREADS=&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;label=MPI${ncpu}_OMP${nthreads}&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;jdir=run_${label}&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;cdir=run_${label}.out&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;filein0=yambo_gw.in&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;filein=yambo_gw_${label}.in&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;cp -f $filein0 $filein&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;cat &amp;gt;&amp;gt; $filein &amp;lt;&amp;lt; EOF&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_CPU= &amp;quot;1 1 $ncpu 1&amp;quot;  # [PARALLEL] CPUs for each role&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;    # [PARALLEL] CPUs roles (q,k,c,v)&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_Threads=  0               # [OPENMP/X] Number of threads for response functions&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_CPU= &amp;quot; 1 1 $ncpu&amp;quot;        # [PARALLEL] CPUs for each role&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_ROLEs= &amp;quot;q qp b&amp;quot;          # [PARALLEL] CPUs roles (q,qp,b)&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_Threads=  0    &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;EOF&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Running on 16 MPI, 1 OpenMP threads&amp;quot;&lt;br /&gt;
 srun -n &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; -c &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; $bindir/pw.x &amp;lt; hBN_2D_scf.in &amp;gt; hBN_2D_scf.out&lt;br /&gt;
and use it&lt;br /&gt;
 ./run.sh&lt;br /&gt;
&lt;br /&gt;
To run the &#039;&#039;&#039;NSCF step&#039;&#039;&#039; first of all open&lt;br /&gt;
 $ vim hBN_2D_nscf.in&lt;br /&gt;
and change the input fil&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;nscf&#039;,&lt;br /&gt;
     prefix=&#039;hBN_2D&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;_kx16&amp;lt;/span&amp;gt;&#039;,&lt;br /&gt;
     pseudo_dir = &#039;./Pseudo&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.716&lt;br /&gt;
     celldm(3) = 7.&lt;br /&gt;
     nat= 2,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 40,nbnd = 400&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
    diago_thr_init=5.0e-6,&lt;br /&gt;
    diago_full_acc=.true.&lt;br /&gt;
    electron_maxstep = 100,&lt;br /&gt;
    diagonalization=&#039;cg&#039;&lt;br /&gt;
    mixing_mode = &#039;plain&#039;&lt;br /&gt;
    mixing_beta = 0.6&lt;br /&gt;
    conv_thr =  1.0d-8,&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10 B.pz-vbc.UPF&lt;br /&gt;
  N 14 N.pz-vbc.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 B  0.6666667  0.3333333  0.0000000&lt;br /&gt;
 N -0.6666667 -0.3333333  0.0000000&lt;br /&gt;
 K_POINTS (automatic)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16 16&amp;lt;/span&amp;gt; 1 0 0 0&lt;br /&gt;
copy the scf density into a new save folder and run pw.x&lt;br /&gt;
 $ mkdir hBN_2D_kx16.save&lt;br /&gt;
 $ cp hBN_2D.save/* hBN_2D&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;_kx16&amp;lt;/span&amp;gt;.save&lt;br /&gt;
(ignore the warning message about the K00* folders)&lt;br /&gt;
open&lt;br /&gt;
 $ vim run.sh&lt;br /&gt;
modify the submission script&lt;br /&gt;
 srun -n 16 -c 1 $bindir/pw.x &amp;lt; hBN_2D_&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;nscf.in&amp;lt;/span&amp;gt; &amp;gt; hBN_2D_&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;nscf_kx16&amp;lt;/span&amp;gt;.out&lt;br /&gt;
and run it&lt;br /&gt;
 $ ./run.sh&lt;br /&gt;
You just created the wave-functions on the kx16 grid.&lt;br /&gt;
Next step is to convert to the Yambo format&lt;br /&gt;
 $ cd hBN_2D_nscf_kx16.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 $ mkdir ../../YAMBO_kx16&lt;br /&gt;
 $ mv SAVE ../../YAMBO_kx16&lt;br /&gt;
 $ cd ../../YAMBO_kx16&lt;br /&gt;
 $ cp ../YAMBO/run.sh ./&lt;br /&gt;
&lt;br /&gt;
And you are ready to run calculation in the kx16 folder.&lt;br /&gt;
You may need to repeat the same for smaller and/or bigger k-grids to properly check the convergence against k-points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:15%; text-align:left&amp;quot;|Prev: [[Tutorials|Tutorials Home]]&lt;br /&gt;
|style=&amp;quot;width:50%; text-align:center&amp;quot;|Now: [[Tutorials|Tutorials Home]] --&amp;gt; [[Pushing_convergence_in_parallel|GW Convergence]]&lt;br /&gt;
|style=&amp;quot;width:35%; text-align:right&amp;quot;|Next: Parallel tutorials are over&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Pushing_convergence_in_parallel&amp;diff=3486</id>
		<title>Pushing convergence in parallel</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Pushing_convergence_in_parallel&amp;diff=3486"/>
		<updated>2020-01-21T14:30:23Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Files and Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run it  just replace the parallel queue instructions with simple MPI commands.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Files and Tools==&lt;br /&gt;
Database and tools can be downloaded here:&lt;br /&gt;
&lt;br /&gt;
*[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/educational/tutorials/files/parse_yambo.py parse_yambo.py]&lt;br /&gt;
*[http://www.yambo-code.org/educational/tutorials/files/parse_qp.py parse_qp.py]&lt;br /&gt;
&lt;br /&gt;
== 2D hBN ==&lt;br /&gt;
&lt;br /&gt;
In the previous session we focused on the scaling properties of the code.&lt;br /&gt;
We now focus more on the physical aspect.&lt;br /&gt;
&lt;br /&gt;
The system we are working on is the 2D-hBN sheet we already used the first day.&lt;br /&gt;
[[File:HBN2.png|500px|center|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
If you want a published reference of quasi-particle properties of hBN you can have a look to the following arxiv, &lt;br /&gt;
https://arxiv.org/abs/1511.00129 (Phys. Rev. B 94, 155406 (2016)),&lt;br /&gt;
and references therein, were the GW correction are computed.&lt;br /&gt;
In that case the convergence with the number of k-points is studied in detail (for hBN and other materials).&lt;br /&gt;
The focus is on a proper description of the q-&amp;gt;0 limit of the (screened) electron-electron&lt;br /&gt;
interaction entering the GW self-energy.&lt;br /&gt;
As you can see from the below image extracted from the arxiv the QP corrections converge slowly with the number of k-points.&lt;br /&gt;
[[File:QP convergence hBN from literature.png|400px|center|Yambo tutorial image]]&lt;br /&gt;
In the present tutorial you will start using a 12x12 grid.&lt;br /&gt;
Only in the last part we will re-run pw.x (optional) to generate bigger k-grids&lt;br /&gt;
&lt;br /&gt;
Tomorrow you will learn how to do that in a more automatic way using the yambopy scripting tools, however running yambo in serial.&lt;br /&gt;
While yambopy offers an easier interface for the use, in the present parallel tutorial you&lt;br /&gt;
will be able to push much more the convergence. In a real life calculation you will likely take advantage&lt;br /&gt;
of both.&lt;br /&gt;
&lt;br /&gt;
As this morning if you are not inside bellatrix, please follow the instructions in the tutorial home. &lt;br /&gt;
If you are inside bellatrix and in the proper folder&lt;br /&gt;
 [cecam.school01@bellatrix yambo_YOUR_NAME]$ pwd&lt;br /&gt;
 /scratch/cecam.schoolXY/yambo_YOUR_NAME&lt;br /&gt;
you can proceed.&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN-2D-para/YAMBO&lt;br /&gt;
For the present tutorial you will need an upgraded version of the parse_qp.py. &amp;lt;br&amp;gt;&lt;br /&gt;
You can get it from the scratch folder&lt;br /&gt;
 $ cp /scratch/cecam.school/parse_qp.py ./&lt;br /&gt;
&lt;br /&gt;
== Convergence on the number of bands in X and G ==&lt;br /&gt;
&lt;br /&gt;
To do convergence calculations you need to execute the same run many time, progressively changing one (or more of the input variables)&lt;br /&gt;
We start considering the number of bands entering the construction of the response function. This will then be used to compute the screened electron-electron interaction, W, needed for the GW self-energy.&lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
Try to use different values, going to a very small one (say 10) up to the maximum allowed by the number of bands computed with pw.x to generate the present database (400). You may use 10, 25, 50, 100, 200, 400.&lt;br /&gt;
Since now the focus is not anymore on the number of cores but on the yambo input parameters, it is a good idea to label the jobname accordingly to the latter in the run.sh script:&lt;br /&gt;
   label=Xnb&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt;_Gnb200_ecut4Ry&lt;br /&gt;
Then you can use the parse_qp.py script to extract the direct gap using the command&lt;br /&gt;
 ./parse_qp.py run*/o-*.qp&lt;br /&gt;
The output should be something similar to&lt;br /&gt;
   # Xo_gvect     Xo_nbnd      G_nbnd   Egap [eV]&lt;br /&gt;
         245          25          25    6.848440&lt;br /&gt;
         245          50          50    6.759580&lt;br /&gt;
         245          75          75    6.724210&lt;br /&gt;
         245         100         100    6.712120&lt;br /&gt;
         245         200         200    6.717220&lt;br /&gt;
         245         400         400    6.733410&lt;br /&gt;
&lt;br /&gt;
Now you can try to do the same with the number of bands entering the definition of the green function&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
You can do the same numbers we tried for the bands entering the response function.&lt;br /&gt;
It is also a good idea to let yambo read the screening from a previous run.&lt;br /&gt;
To this end you need to create a folder and copy there the screening DB&lt;br /&gt;
 $ mkdir SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
 $ cp Xnb&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;_Gnb&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt;_ecut4Ry/ndb.pp* SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
Then, to let yambo read it, edit the job.sh script creating the new variable&lt;br /&gt;
 auxjdir=SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
and &lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;$jdir,&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;$auxjdir&amp;quot;&amp;lt;/span&amp;gt; -C $cdir&lt;br /&gt;
&lt;br /&gt;
Below how your QP gap should converge versus the total number of band used both in X and G &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:QP gap convergence.png|600px|center|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- remember to run in parallel, we suggest you keep using 16 cores, with 2 OpenMP threads, but for the biggest runs you can try to use even more than one node&lt;br /&gt;
&lt;br /&gt;
== Convergence with the energy cut-off on the response function ==&lt;br /&gt;
&lt;br /&gt;
The variable we now consider is the energy cut-off, i.e. the number of G-vectors used to construct the &amp;lt;math&amp;gt;\chi_{G,G&#039;}(\omega)&amp;lt;/math&amp;gt; matrix&lt;br /&gt;
&lt;br /&gt;
 NGsBlkXp= &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;4            Ry&amp;lt;/span&amp;gt;    # [Xp] Response block size&lt;br /&gt;
&lt;br /&gt;
Even in this case try changing the input value from a low value to a big one.&lt;br /&gt;
Try 0 (it means the code will just use 1 G vector), 1, 2, 4 and 8.&lt;br /&gt;
This time you are re-computing the screening, so you cannot use anymore the auxdir from the previous run.&lt;br /&gt;
just change the script back as&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;quot;$jdir,$auxjdir&amp;quot; -C $cdir&lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;$jdir&amp;lt;/span&amp;gt; -C $cdir&lt;br /&gt;
&lt;br /&gt;
== Convergence with the number of k-points (optional) ==&lt;br /&gt;
&lt;br /&gt;
For this last step you need to  re-run pw.x&lt;br /&gt;
Go to the DFT folder&lt;br /&gt;
 $ cd ../PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 hBN_2D_nscf.in  hBN_2D_scf.in  Inputs  Pseudos  References&lt;br /&gt;
You now need to run pw.x, first the scf step, then then NSCF step.&lt;br /&gt;
&lt;br /&gt;
For the &#039;&#039;&#039;SCF step&#039;&#039;&#039; copy the submit script you used for yambo here,&lt;br /&gt;
 $ cp ../YAMBO/run.sh ./&lt;br /&gt;
change it (you can erase many lines)&lt;br /&gt;
 $ vim run.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #SBATCH -N &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 #SBATCH -t 06:00:00 &lt;br /&gt;
 #SBATCH -J test_braun&lt;br /&gt;
 #SBATCH --reservation=cecam_course&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;nodes=1&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;nthreads=8&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;ncpu=`echo $nodes $nthreads 16 | awk &#039;{print $1*$3/$2}&#039;`&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 module purge&lt;br /&gt;
 module load intel/16.0.3&lt;br /&gt;
 module load intelmpi/5.1.3&lt;br /&gt;
 bindir=/home/cecam.school/bin/&lt;br /&gt;
 &lt;br /&gt;
 export OMP_NUM_THREADS=&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;label=MPI${ncpu}_OMP${nthreads}&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;jdir=run_${label}&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;cdir=run_${label}.out&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;filein0=yambo_gw.in&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;filein=yambo_gw_${label}.in&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;cp -f $filein0 $filein&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;cat &amp;gt;&amp;gt; $filein &amp;lt;&amp;lt; EOF&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_CPU= &amp;quot;1 1 $ncpu 1&amp;quot;  # [PARALLEL] CPUs for each role&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;    # [PARALLEL] CPUs roles (q,k,c,v)&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_Threads=  0               # [OPENMP/X] Number of threads for response functions&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_CPU= &amp;quot; 1 1 $ncpu&amp;quot;        # [PARALLEL] CPUs for each role&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_ROLEs= &amp;quot;q qp b&amp;quot;          # [PARALLEL] CPUs roles (q,qp,b)&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_Threads=  0    &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;EOF&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Running on 16 MPI, 1 OpenMP threads&amp;quot;&lt;br /&gt;
 srun -n &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; -c &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; $bindir/pw.x &amp;lt; hBN_2D_scf.in &amp;gt; hBN_2D_scf.out&lt;br /&gt;
and use it&lt;br /&gt;
 ./run.sh&lt;br /&gt;
&lt;br /&gt;
To run the &#039;&#039;&#039;NSCF step&#039;&#039;&#039; first of all open&lt;br /&gt;
 $ vim hBN_2D_nscf.in&lt;br /&gt;
and change the input fil&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;nscf&#039;,&lt;br /&gt;
     prefix=&#039;hBN_2D&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;_kx16&amp;lt;/span&amp;gt;&#039;,&lt;br /&gt;
     pseudo_dir = &#039;./Pseudo&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.716&lt;br /&gt;
     celldm(3) = 7.&lt;br /&gt;
     nat= 2,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 40,nbnd = 400&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
    diago_thr_init=5.0e-6,&lt;br /&gt;
    diago_full_acc=.true.&lt;br /&gt;
    electron_maxstep = 100,&lt;br /&gt;
    diagonalization=&#039;cg&#039;&lt;br /&gt;
    mixing_mode = &#039;plain&#039;&lt;br /&gt;
    mixing_beta = 0.6&lt;br /&gt;
    conv_thr =  1.0d-8,&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10 B.pz-vbc.UPF&lt;br /&gt;
  N 14 N.pz-vbc.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 B  0.6666667  0.3333333  0.0000000&lt;br /&gt;
 N -0.6666667 -0.3333333  0.0000000&lt;br /&gt;
 K_POINTS (automatic)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16 16&amp;lt;/span&amp;gt; 1 0 0 0&lt;br /&gt;
copy the scf density into a new save folder and run pw.x&lt;br /&gt;
 $ mkdir hBN_2D_kx16.save&lt;br /&gt;
 $ cp hBN_2D.save/* hBN_2D&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;_kx16&amp;lt;/span&amp;gt;.save&lt;br /&gt;
(ignore the warning message about the K00* folders)&lt;br /&gt;
open&lt;br /&gt;
 $ vim run.sh&lt;br /&gt;
modify the submission script&lt;br /&gt;
 srun -n 16 -c 1 $bindir/pw.x &amp;lt; hBN_2D_&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;nscf.in&amp;lt;/span&amp;gt; &amp;gt; hBN_2D_&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;nscf_kx16&amp;lt;/span&amp;gt;.out&lt;br /&gt;
and run it&lt;br /&gt;
 $ ./run.sh&lt;br /&gt;
You just created the wave-functions on the kx16 grid.&lt;br /&gt;
Next step is to convert to the Yambo format&lt;br /&gt;
 $ cd hBN_2D_nscf_kx16.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 $ mkdir ../../YAMBO_kx16&lt;br /&gt;
 $ mv SAVE ../../YAMBO_kx16&lt;br /&gt;
 $ cd ../../YAMBO_kx16&lt;br /&gt;
 $ cp ../YAMBO/run.sh ./&lt;br /&gt;
&lt;br /&gt;
And you are ready to run calculation in the kx16 folder.&lt;br /&gt;
You may need to repeat the same for smaller and/or bigger k-grids to properly check the convergence against k-points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:15%; text-align:left&amp;quot;|Prev: [[Tutorials|Tutorials Home]]&lt;br /&gt;
|style=&amp;quot;width:50%; text-align:center&amp;quot;|Now: [[Tutorials|Tutorials Home]] --&amp;gt; [[Pushing_convergence_in_parallel|GW Convergence]]&lt;br /&gt;
|style=&amp;quot;width:35%; text-align:right&amp;quot;|Next: Parallel tutorials are over&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Pushing_convergence_in_parallel&amp;diff=3485</id>
		<title>Pushing convergence in parallel</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Pushing_convergence_in_parallel&amp;diff=3485"/>
		<updated>2020-01-21T14:28:46Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Files and Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run it  just replace the parallel queue instructions with simple MPI commands.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Files and Tools==&lt;br /&gt;
Database and tools can be downloaded here:&lt;br /&gt;
&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/parse_yambo.py parse_yambo.py]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/parse_qp.py parse_qp.py]&lt;br /&gt;
&lt;br /&gt;
== 2D hBN ==&lt;br /&gt;
&lt;br /&gt;
In the previous session we focused on the scaling properties of the code.&lt;br /&gt;
We now focus more on the physical aspect.&lt;br /&gt;
&lt;br /&gt;
The system we are working on is the 2D-hBN sheet we already used the first day.&lt;br /&gt;
[[File:HBN2.png|500px|center|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
If you want a published reference of quasi-particle properties of hBN you can have a look to the following arxiv, &lt;br /&gt;
https://arxiv.org/abs/1511.00129 (Phys. Rev. B 94, 155406 (2016)),&lt;br /&gt;
and references therein, were the GW correction are computed.&lt;br /&gt;
In that case the convergence with the number of k-points is studied in detail (for hBN and other materials).&lt;br /&gt;
The focus is on a proper description of the q-&amp;gt;0 limit of the (screened) electron-electron&lt;br /&gt;
interaction entering the GW self-energy.&lt;br /&gt;
As you can see from the below image extracted from the arxiv the QP corrections converge slowly with the number of k-points.&lt;br /&gt;
[[File:QP convergence hBN from literature.png|400px|center|Yambo tutorial image]]&lt;br /&gt;
In the present tutorial you will start using a 12x12 grid.&lt;br /&gt;
Only in the last part we will re-run pw.x (optional) to generate bigger k-grids&lt;br /&gt;
&lt;br /&gt;
Tomorrow you will learn how to do that in a more automatic way using the yambopy scripting tools, however running yambo in serial.&lt;br /&gt;
While yambopy offers an easier interface for the use, in the present parallel tutorial you&lt;br /&gt;
will be able to push much more the convergence. In a real life calculation you will likely take advantage&lt;br /&gt;
of both.&lt;br /&gt;
&lt;br /&gt;
As this morning if you are not inside bellatrix, please follow the instructions in the tutorial home. &lt;br /&gt;
If you are inside bellatrix and in the proper folder&lt;br /&gt;
 [cecam.school01@bellatrix yambo_YOUR_NAME]$ pwd&lt;br /&gt;
 /scratch/cecam.schoolXY/yambo_YOUR_NAME&lt;br /&gt;
you can proceed.&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN-2D-para/YAMBO&lt;br /&gt;
For the present tutorial you will need an upgraded version of the parse_qp.py. &amp;lt;br&amp;gt;&lt;br /&gt;
You can get it from the scratch folder&lt;br /&gt;
 $ cp /scratch/cecam.school/parse_qp.py ./&lt;br /&gt;
&lt;br /&gt;
== Convergence on the number of bands in X and G ==&lt;br /&gt;
&lt;br /&gt;
To do convergence calculations you need to execute the same run many time, progressively changing one (or more of the input variables)&lt;br /&gt;
We start considering the number of bands entering the construction of the response function. This will then be used to compute the screened electron-electron interaction, W, needed for the GW self-energy.&lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
Try to use different values, going to a very small one (say 10) up to the maximum allowed by the number of bands computed with pw.x to generate the present database (400). You may use 10, 25, 50, 100, 200, 400.&lt;br /&gt;
Since now the focus is not anymore on the number of cores but on the yambo input parameters, it is a good idea to label the jobname accordingly to the latter in the run.sh script:&lt;br /&gt;
   label=Xnb&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt;_Gnb200_ecut4Ry&lt;br /&gt;
Then you can use the parse_qp.py script to extract the direct gap using the command&lt;br /&gt;
 ./parse_qp.py run*/o-*.qp&lt;br /&gt;
The output should be something similar to&lt;br /&gt;
   # Xo_gvect     Xo_nbnd      G_nbnd   Egap [eV]&lt;br /&gt;
         245          25          25    6.848440&lt;br /&gt;
         245          50          50    6.759580&lt;br /&gt;
         245          75          75    6.724210&lt;br /&gt;
         245         100         100    6.712120&lt;br /&gt;
         245         200         200    6.717220&lt;br /&gt;
         245         400         400    6.733410&lt;br /&gt;
&lt;br /&gt;
Now you can try to do the same with the number of bands entering the definition of the green function&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
You can do the same numbers we tried for the bands entering the response function.&lt;br /&gt;
It is also a good idea to let yambo read the screening from a previous run.&lt;br /&gt;
To this end you need to create a folder and copy there the screening DB&lt;br /&gt;
 $ mkdir SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
 $ cp Xnb&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;_Gnb&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt;_ecut4Ry/ndb.pp* SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
Then, to let yambo read it, edit the job.sh script creating the new variable&lt;br /&gt;
 auxjdir=SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
and &lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;$jdir,&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;$auxjdir&amp;quot;&amp;lt;/span&amp;gt; -C $cdir&lt;br /&gt;
&lt;br /&gt;
Below how your QP gap should converge versus the total number of band used both in X and G &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:QP gap convergence.png|600px|center|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- remember to run in parallel, we suggest you keep using 16 cores, with 2 OpenMP threads, but for the biggest runs you can try to use even more than one node&lt;br /&gt;
&lt;br /&gt;
== Convergence with the energy cut-off on the response function ==&lt;br /&gt;
&lt;br /&gt;
The variable we now consider is the energy cut-off, i.e. the number of G-vectors used to construct the &amp;lt;math&amp;gt;\chi_{G,G&#039;}(\omega)&amp;lt;/math&amp;gt; matrix&lt;br /&gt;
&lt;br /&gt;
 NGsBlkXp= &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;4            Ry&amp;lt;/span&amp;gt;    # [Xp] Response block size&lt;br /&gt;
&lt;br /&gt;
Even in this case try changing the input value from a low value to a big one.&lt;br /&gt;
Try 0 (it means the code will just use 1 G vector), 1, 2, 4 and 8.&lt;br /&gt;
This time you are re-computing the screening, so you cannot use anymore the auxdir from the previous run.&lt;br /&gt;
just change the script back as&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;quot;$jdir,$auxjdir&amp;quot; -C $cdir&lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;$jdir&amp;lt;/span&amp;gt; -C $cdir&lt;br /&gt;
&lt;br /&gt;
== Convergence with the number of k-points (optional) ==&lt;br /&gt;
&lt;br /&gt;
For this last step you need to  re-run pw.x&lt;br /&gt;
Go to the DFT folder&lt;br /&gt;
 $ cd ../PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 hBN_2D_nscf.in  hBN_2D_scf.in  Inputs  Pseudos  References&lt;br /&gt;
You now need to run pw.x, first the scf step, then then NSCF step.&lt;br /&gt;
&lt;br /&gt;
For the &#039;&#039;&#039;SCF step&#039;&#039;&#039; copy the submit script you used for yambo here,&lt;br /&gt;
 $ cp ../YAMBO/run.sh ./&lt;br /&gt;
change it (you can erase many lines)&lt;br /&gt;
 $ vim run.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #SBATCH -N &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 #SBATCH -t 06:00:00 &lt;br /&gt;
 #SBATCH -J test_braun&lt;br /&gt;
 #SBATCH --reservation=cecam_course&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;nodes=1&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;nthreads=8&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;ncpu=`echo $nodes $nthreads 16 | awk &#039;{print $1*$3/$2}&#039;`&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 module purge&lt;br /&gt;
 module load intel/16.0.3&lt;br /&gt;
 module load intelmpi/5.1.3&lt;br /&gt;
 bindir=/home/cecam.school/bin/&lt;br /&gt;
 &lt;br /&gt;
 export OMP_NUM_THREADS=&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;label=MPI${ncpu}_OMP${nthreads}&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;jdir=run_${label}&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;cdir=run_${label}.out&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;filein0=yambo_gw.in&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;filein=yambo_gw_${label}.in&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;cp -f $filein0 $filein&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;cat &amp;gt;&amp;gt; $filein &amp;lt;&amp;lt; EOF&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_CPU= &amp;quot;1 1 $ncpu 1&amp;quot;  # [PARALLEL] CPUs for each role&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;    # [PARALLEL] CPUs roles (q,k,c,v)&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_Threads=  0               # [OPENMP/X] Number of threads for response functions&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_CPU= &amp;quot; 1 1 $ncpu&amp;quot;        # [PARALLEL] CPUs for each role&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_ROLEs= &amp;quot;q qp b&amp;quot;          # [PARALLEL] CPUs roles (q,qp,b)&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_Threads=  0    &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;EOF&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Running on 16 MPI, 1 OpenMP threads&amp;quot;&lt;br /&gt;
 srun -n &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; -c &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; $bindir/pw.x &amp;lt; hBN_2D_scf.in &amp;gt; hBN_2D_scf.out&lt;br /&gt;
and use it&lt;br /&gt;
 ./run.sh&lt;br /&gt;
&lt;br /&gt;
To run the &#039;&#039;&#039;NSCF step&#039;&#039;&#039; first of all open&lt;br /&gt;
 $ vim hBN_2D_nscf.in&lt;br /&gt;
and change the input fil&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;nscf&#039;,&lt;br /&gt;
     prefix=&#039;hBN_2D&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;_kx16&amp;lt;/span&amp;gt;&#039;,&lt;br /&gt;
     pseudo_dir = &#039;./Pseudo&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.716&lt;br /&gt;
     celldm(3) = 7.&lt;br /&gt;
     nat= 2,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 40,nbnd = 400&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
    diago_thr_init=5.0e-6,&lt;br /&gt;
    diago_full_acc=.true.&lt;br /&gt;
    electron_maxstep = 100,&lt;br /&gt;
    diagonalization=&#039;cg&#039;&lt;br /&gt;
    mixing_mode = &#039;plain&#039;&lt;br /&gt;
    mixing_beta = 0.6&lt;br /&gt;
    conv_thr =  1.0d-8,&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10 B.pz-vbc.UPF&lt;br /&gt;
  N 14 N.pz-vbc.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 B  0.6666667  0.3333333  0.0000000&lt;br /&gt;
 N -0.6666667 -0.3333333  0.0000000&lt;br /&gt;
 K_POINTS (automatic)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16 16&amp;lt;/span&amp;gt; 1 0 0 0&lt;br /&gt;
copy the scf density into a new save folder and run pw.x&lt;br /&gt;
 $ mkdir hBN_2D_kx16.save&lt;br /&gt;
 $ cp hBN_2D.save/* hBN_2D&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;_kx16&amp;lt;/span&amp;gt;.save&lt;br /&gt;
(ignore the warning message about the K00* folders)&lt;br /&gt;
open&lt;br /&gt;
 $ vim run.sh&lt;br /&gt;
modify the submission script&lt;br /&gt;
 srun -n 16 -c 1 $bindir/pw.x &amp;lt; hBN_2D_&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;nscf.in&amp;lt;/span&amp;gt; &amp;gt; hBN_2D_&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;nscf_kx16&amp;lt;/span&amp;gt;.out&lt;br /&gt;
and run it&lt;br /&gt;
 $ ./run.sh&lt;br /&gt;
You just created the wave-functions on the kx16 grid.&lt;br /&gt;
Next step is to convert to the Yambo format&lt;br /&gt;
 $ cd hBN_2D_nscf_kx16.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 $ mkdir ../../YAMBO_kx16&lt;br /&gt;
 $ mv SAVE ../../YAMBO_kx16&lt;br /&gt;
 $ cd ../../YAMBO_kx16&lt;br /&gt;
 $ cp ../YAMBO/run.sh ./&lt;br /&gt;
&lt;br /&gt;
And you are ready to run calculation in the kx16 folder.&lt;br /&gt;
You may need to repeat the same for smaller and/or bigger k-grids to properly check the convergence against k-points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:15%; text-align:left&amp;quot;|Prev: [[Tutorials|Tutorials Home]]&lt;br /&gt;
|style=&amp;quot;width:50%; text-align:center&amp;quot;|Now: [[Tutorials|Tutorials Home]] --&amp;gt; [[Pushing_convergence_in_parallel|GW Convergence]]&lt;br /&gt;
|style=&amp;quot;width:35%; text-align:right&amp;quot;|Next: Parallel tutorials are over&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2996</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2996"/>
		<updated>2020-01-09T14:37:30Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of pre-prepared Yambo databases or DFT input files. After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz]&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. Each tutorial requires download of a specific core database, and typically they cover a specific physical system (like bulk GaSb or a hydrogen chain). Ground state input files and pseudopotentials are provided. Output files are also provided for reference.&lt;br /&gt;
&lt;br /&gt;
These tutorials can be accessed directly from this page of from the side bar. They include different kind of subjects:&lt;br /&gt;
&lt;br /&gt;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Electron_Phonon|Electron-Phonon]]&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- For each TUTORIAL (Solid_LiF, Solid_Al, ...) , therefore, you can download the ground state files (zip archive named TUTORIAL_ground_state.zip) and generate the Yambo databases from your own by running abinit/PWscf and a2y/p2y. In this case the Yambo input and reference files are contained in the zip file (TUTORIAL_reference_files.zip). Alternatively, if (and only if) you have compiled yambo with the NetCDF support you can directly download the zip files containing the Yambo core databases (TUTORIAL_NETCDF_databases_and_reference_files.zip). These are generated using the NetCDF interface in order to be readable in any platform.&lt;br /&gt;
After you have downloaded the tutorial zip files and unziped them you should have now a tutorial tree:&lt;br /&gt;
localhost:&amp;gt; ls &lt;br /&gt;
YAMBO_TUTORIALS/&lt;br /&gt;
localhost:&amp;gt; ls  YAMBO_TUTORIALS/&lt;br /&gt;
COPYING  Fantastic_Dimensions/  Hydrogen_Chain/  README  Solid_LiF/ Solid_Al/ SiH4/ ...&lt;br /&gt;
In each folder you will find an Abinit or Pwscf subfolder in case you have downloaded the ground state zip files and the YAMBO subfolder. The tutorials start by entering the YAMBO subfolder and followinf the informations provided in the tutorial documentation.  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
Files for both systems must be downloaded, and make sure to extract the tarballs &#039;&#039;&#039;in the same place.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Download:&#039;&#039;&#039;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2995</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2995"/>
		<updated>2020-01-08T17:28:38Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Tuesday 28 Jan HANDS-ON 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Tutorial files ===&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of the following pre-prepared Yambo databases or DFT input files:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
&#039;&#039;&#039;14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
Link to old CECAM specific cases: [[GW_parallel_strategies_CECAM]] and [[Pushing_convergence_in_parallel_CECAM]]&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, spin orbit effect, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to linear response]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to non linear response]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2994</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2994"/>
		<updated>2020-01-08T17:28:18Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Tuesday 28 Jan HANDS-ON 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Tutorial files ===&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of the following pre-prepared Yambo databases or DFT input files:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
&#039;&#039;&#039;14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
Link to old CECAM specific cases: [[GW_parallel_strategies_CECAM]] and [[Pushing_convergence_in_parallel_CECAM]]&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, spin orbit effect, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to linear response]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to non linear response]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Pushing_convergence_in_parallel_CECAM&amp;diff=2993</id>
		<title>Pushing convergence in parallel CECAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Pushing_convergence_in_parallel_CECAM&amp;diff=2993"/>
		<updated>2020-01-08T17:27:52Z</updated>

		<summary type="html">&lt;p&gt;Conor: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run it  just replace the parallel queue instructions with simple MPI commands.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Files and Tools==&lt;br /&gt;
Database and tools can be downloaded here:&lt;br /&gt;
&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN-2D-para.tar.gz BN-2D-para.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/parse_yambo.py parse_yambo.py]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/parse_qp.py parse_qp.py]&lt;br /&gt;
&lt;br /&gt;
== 2D hBN ==&lt;br /&gt;
&lt;br /&gt;
In the previous session we focused on the scaling properties of the code.&lt;br /&gt;
We now focus more on the physical aspect.&lt;br /&gt;
&lt;br /&gt;
The system we are working on is the 2D-hBN sheet we already used the first day.&lt;br /&gt;
[[File:HBN2.png|500px|center|Atomic structure of 2D hBN]]&lt;br /&gt;
&lt;br /&gt;
If you want a published reference of quasi-particle properties of hBN you can have a look to the following arxiv, &lt;br /&gt;
https://arxiv.org/abs/1511.00129 (Phys. Rev. B 94, 155406 (2016)),&lt;br /&gt;
and references therein, were the GW correction are computed.&lt;br /&gt;
In that case the convergence with the number of k-points is studied in detail (for hBN and other materials).&lt;br /&gt;
The focus is on a proper description of the q-&amp;gt;0 limit of the (screened) electron-electron&lt;br /&gt;
interaction entering the GW self-energy.&lt;br /&gt;
As you can see from the below image extracted from the arxiv the QP corrections converge slowly with the number of k-points.&lt;br /&gt;
[[File:QP convergence hBN from literature.png|400px|center|Yambo tutorial image]]&lt;br /&gt;
In the present tutorial you will start using a 12x12 grid.&lt;br /&gt;
Only in the last part we will re-run pw.x (optional) to generate bigger k-grids&lt;br /&gt;
&lt;br /&gt;
Tomorrow you will learn how to do that in a more automatic way using the yambopy scripting tools, however running yambo in serial.&lt;br /&gt;
While yambopy offers an easier interface for the use, in the present parallel tutorial you&lt;br /&gt;
will be able to push much more the convergence. In a real life calculation you will likely take advantage&lt;br /&gt;
of both.&lt;br /&gt;
&lt;br /&gt;
As this morning if you are not inside bellatrix, please follow the instructions in the tutorial home. &lt;br /&gt;
If you are inside bellatrix and in the proper folder&lt;br /&gt;
 [cecam.school01@bellatrix yambo_YOUR_NAME]$ pwd&lt;br /&gt;
 /scratch/cecam.schoolXY/yambo_YOUR_NAME&lt;br /&gt;
you can proceed.&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN-2D-para/YAMBO&lt;br /&gt;
For the present tutorial you will need an upgraded version of the parse_qp.py. &amp;lt;br&amp;gt;&lt;br /&gt;
You can get it from the scratch folder&lt;br /&gt;
 $ cp /scratch/cecam.school/parse_qp.py ./&lt;br /&gt;
&lt;br /&gt;
== Convergence on the number of bands in X and G ==&lt;br /&gt;
&lt;br /&gt;
To do convergence calculations you need to execute the same run many time, progressively changing one (or more of the input variables)&lt;br /&gt;
We start considering the number of bands entering the construction of the response function. This will then be used to compute the screened electron-electron interaction, W, needed for the GW self-energy.&lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
Try to use different values, going to a very small one (say 10) up to the maximum allowed by the number of bands computed with pw.x to generate the present database (400). You may use 10, 25, 50, 100, 200, 400.&lt;br /&gt;
Since now the focus is not anymore on the number of cores but on the yambo input parameters, it is a good idea to label the jobname accordingly to the latter in the run.sh script:&lt;br /&gt;
   label=Xnb&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt;_Gnb200_ecut4Ry&lt;br /&gt;
Then you can use the parse_qp.py script to extract the direct gap using the command&lt;br /&gt;
 ./parse_qp.py run*/o-*.qp&lt;br /&gt;
The output should be something similar to&lt;br /&gt;
   # Xo_gvect     Xo_nbnd      G_nbnd   Egap [eV]&lt;br /&gt;
         245          25          25    6.848440&lt;br /&gt;
         245          50          50    6.759580&lt;br /&gt;
         245          75          75    6.724210&lt;br /&gt;
         245         100         100    6.712120&lt;br /&gt;
         245         200         200    6.717220&lt;br /&gt;
         245         400         400    6.733410&lt;br /&gt;
&lt;br /&gt;
Now you can try to do the same with the number of bands entering the definition of the green function&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
You can do the same numbers we tried for the bands entering the response function.&lt;br /&gt;
It is also a good idea to let yambo read the screening from a previous run.&lt;br /&gt;
To this end you need to create a folder and copy there the screening DB&lt;br /&gt;
 $ mkdir SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
 $ cp Xnb&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;_Gnb&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt;_ecut4Ry/ndb.pp* SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
Then, to let yambo read it, edit the job.sh script creating the new variable&lt;br /&gt;
 auxjdir=SCREENING_&amp;lt;span style=&amp;quot;color: green&amp;quot;&amp;gt;400&amp;lt;/span&amp;gt;bands&lt;br /&gt;
and &lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;$jdir,&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;$auxjdir&amp;quot;&amp;lt;/span&amp;gt; -C $cdir&lt;br /&gt;
&lt;br /&gt;
Below how your QP gap should converge versus the total number of band used both in X and G &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:QP gap convergence.png|600px|center|Yambo tutorial image]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- remember to run in parallel, we suggest you keep using 16 cores, with 2 OpenMP threads, but for the biggest runs you can try to use even more than one node&lt;br /&gt;
&lt;br /&gt;
== Convergence with the energy cut-off on the response function ==&lt;br /&gt;
&lt;br /&gt;
The variable we now consider is the energy cut-off, i.e. the number of G-vectors used to construct the &amp;lt;math&amp;gt;\chi_{G,G&#039;}(\omega)&amp;lt;/math&amp;gt; matrix&lt;br /&gt;
&lt;br /&gt;
 NGsBlkXp= &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;4            Ry&amp;lt;/span&amp;gt;    # [Xp] Response block size&lt;br /&gt;
&lt;br /&gt;
Even in this case try changing the input value from a low value to a big one.&lt;br /&gt;
Try 0 (it means the code will just use 1 G vector), 1, 2, 4 and 8.&lt;br /&gt;
This time you are re-computing the screening, so you cannot use anymore the auxdir from the previous run.&lt;br /&gt;
just change the script back as&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;#&amp;lt;/span&amp;gt;srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;quot;$jdir,$auxjdir&amp;quot; -C $cdir&lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;$jdir&amp;lt;/span&amp;gt; -C $cdir&lt;br /&gt;
&lt;br /&gt;
== Convergence with the number of k-points (optional) ==&lt;br /&gt;
&lt;br /&gt;
For this last step you need to  re-run pw.x&lt;br /&gt;
Go to the DFT folder&lt;br /&gt;
 $ cd ../PWSCF&lt;br /&gt;
 $ ls&lt;br /&gt;
 hBN_2D_nscf.in  hBN_2D_scf.in  Inputs  Pseudos  References&lt;br /&gt;
You now need to run pw.x, first the scf step, then then NSCF step.&lt;br /&gt;
&lt;br /&gt;
For the &#039;&#039;&#039;SCF step&#039;&#039;&#039; copy the submit script you used for yambo here,&lt;br /&gt;
 $ cp ../YAMBO/run.sh ./&lt;br /&gt;
change it (you can erase many lines)&lt;br /&gt;
 $ vim run.sh&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #SBATCH -N &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 #SBATCH -t 06:00:00 &lt;br /&gt;
 #SBATCH -J test_braun&lt;br /&gt;
 #SBATCH --reservation=cecam_course&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;nodes=1&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;nthreads=8&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;ncpu=`echo $nodes $nthreads 16 | awk &#039;{print $1*$3/$2}&#039;`&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 module purge&lt;br /&gt;
 module load intel/16.0.3&lt;br /&gt;
 module load intelmpi/5.1.3&lt;br /&gt;
 bindir=/home/cecam.school/bin/&lt;br /&gt;
 &lt;br /&gt;
 export OMP_NUM_THREADS=&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;label=MPI${ncpu}_OMP${nthreads}&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;jdir=run_${label}&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;cdir=run_${label}.out&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;filein0=yambo_gw.in&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;filein=yambo_gw_${label}.in&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;s&amp;gt;cp -f $filein0 $filein&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;cat &amp;gt;&amp;gt; $filein &amp;lt;&amp;lt; EOF&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_CPU= &amp;quot;1 1 $ncpu 1&amp;quot;  # [PARALLEL] CPUs for each role&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;    # [PARALLEL] CPUs roles (q,k,c,v)&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;X_Threads=  0               # [OPENMP/X] Number of threads for response functions&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_CPU= &amp;quot; 1 1 $ncpu&amp;quot;        # [PARALLEL] CPUs for each role&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_ROLEs= &amp;quot;q qp b&amp;quot;          # [PARALLEL] CPUs roles (q,qp,b)&amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_Threads=  0    &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;EOF&amp;lt;/s&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Running on 16 MPI, 1 OpenMP threads&amp;quot;&lt;br /&gt;
 srun -n &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; -c &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; $bindir/pw.x &amp;lt; hBN_2D_scf.in &amp;gt; hBN_2D_scf.out&lt;br /&gt;
and use it&lt;br /&gt;
 ./run.sh&lt;br /&gt;
&lt;br /&gt;
To run the &#039;&#039;&#039;NSCF step&#039;&#039;&#039; first of all open&lt;br /&gt;
 $ vim hBN_2D_nscf.in&lt;br /&gt;
and change the input fil&lt;br /&gt;
 &amp;amp;control&lt;br /&gt;
     calculation=&#039;nscf&#039;,&lt;br /&gt;
     prefix=&#039;hBN_2D&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;_kx16&amp;lt;/span&amp;gt;&#039;,&lt;br /&gt;
     pseudo_dir = &#039;./Pseudo&#039;&lt;br /&gt;
     wf_collect=.true.&lt;br /&gt;
     verbosity = &#039;high&#039;&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;system&lt;br /&gt;
     ibrav = 4,&lt;br /&gt;
     celldm(1) = 4.716&lt;br /&gt;
     celldm(3) = 7.&lt;br /&gt;
     nat= 2,&lt;br /&gt;
     ntyp= 2,&lt;br /&gt;
     force_symmorphic=.true.&lt;br /&gt;
     ecutwfc = 40,nbnd = 400&lt;br /&gt;
 /&lt;br /&gt;
 &amp;amp;electrons&lt;br /&gt;
    diago_thr_init=5.0e-6,&lt;br /&gt;
    diago_full_acc=.true.&lt;br /&gt;
    electron_maxstep = 100,&lt;br /&gt;
    diagonalization=&#039;cg&#039;&lt;br /&gt;
    mixing_mode = &#039;plain&#039;&lt;br /&gt;
    mixing_beta = 0.6&lt;br /&gt;
    conv_thr =  1.0d-8,&lt;br /&gt;
 /&lt;br /&gt;
 ATOMIC_SPECIES&lt;br /&gt;
  B 10 B.pz-vbc.UPF&lt;br /&gt;
  N 14 N.pz-vbc.UPF&lt;br /&gt;
 ATOMIC_POSITIONS {crystal}&lt;br /&gt;
 B  0.6666667  0.3333333  0.0000000&lt;br /&gt;
 N -0.6666667 -0.3333333  0.0000000&lt;br /&gt;
 K_POINTS (automatic)&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;16 16&amp;lt;/span&amp;gt; 1 0 0 0&lt;br /&gt;
copy the scf density into a new save folder and run pw.x&lt;br /&gt;
 $ mkdir hBN_2D_kx16.save&lt;br /&gt;
 $ cp hBN_2D.save/* hBN_2D&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;_kx16&amp;lt;/span&amp;gt;.save&lt;br /&gt;
(ignore the warning message about the K00* folders)&lt;br /&gt;
open&lt;br /&gt;
 $ vim run.sh&lt;br /&gt;
modify the submission script&lt;br /&gt;
 srun -n 16 -c 1 $bindir/pw.x &amp;lt; hBN_2D_&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;nscf.in&amp;lt;/span&amp;gt; &amp;gt; hBN_2D_&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;nscf_kx16&amp;lt;/span&amp;gt;.out&lt;br /&gt;
and run it&lt;br /&gt;
 $ ./run.sh&lt;br /&gt;
You just created the wave-functions on the kx16 grid.&lt;br /&gt;
Next step is to convert to the Yambo format&lt;br /&gt;
 $ cd hBN_2D_nscf_kx16.save&lt;br /&gt;
 $ p2y&lt;br /&gt;
 $ mkdir ../../YAMBO_kx16&lt;br /&gt;
 $ mv SAVE ../../YAMBO_kx16&lt;br /&gt;
 $ cd ../../YAMBO_kx16&lt;br /&gt;
 $ cp ../YAMBO/run.sh ./&lt;br /&gt;
&lt;br /&gt;
And you are ready to run calculation in the kx16 folder.&lt;br /&gt;
You may need to repeat the same for smaller and/or bigger k-grids to properly check the convergence against k-points.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:15%; text-align:left&amp;quot;|Prev: [[Tutorials|Tutorials Home]]&lt;br /&gt;
|style=&amp;quot;width:50%; text-align:center&amp;quot;|Now: [[Tutorials|Tutorials Home]] --&amp;gt; [[Pushing_convergence_in_parallel|GW Convergence]]&lt;br /&gt;
|style=&amp;quot;width:35%; text-align:right&amp;quot;|Next: Parallel tutorials are over&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2992</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2992"/>
		<updated>2020-01-08T17:23:34Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Tutorial files ===&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of the following pre-prepared Yambo databases or DFT input files:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
&#039;&#039;&#039;14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
Link to old CECAM specific cases: [[GW_parallel_strategies_CECAM]] [[Pushing_convergence_in_parallel_CECAM]]&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, spin orbit effect, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to linear response]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to non linear response]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2991</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2991"/>
		<updated>2020-01-08T17:21:22Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Tutorial files ===&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of the following pre-prepared Yambo databases or DFT input files:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
&#039;&#039;&#039;14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
Link to old CECAM specific cases: [[GW_parallel_strategies_CECAM]]&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, spin orbit effect, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to linear response]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to non linear response]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=GW_parallel_strategies&amp;diff=2990</id>
		<title>GW parallel strategies</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=GW_parallel_strategies&amp;diff=2990"/>
		<updated>2020-01-08T17:03:53Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run it  just replace the parallel queue instructions with simple MPI commands. THIS PAGE NEEDS TO BE UPDATED&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will see how to setup the variables governing the parallel execution of yambo in order to perform efficient calculations in terms of both cpu time and memory to solution. As a test case we will consider the hBN 2D material. Because of its reduced dimensionality, GW calculations turns out to be very delicate. Beside the usual convergence studies with respect to k-points and sums-over-bands, in low dimensional systems a sensible amount of vacuum is required in order to treat the system as isolated, translating into a large number of plane-waves. As for other tutorials, it is important to stress that this tutorial it is meant to illustrate the functionality of the key variables and to run in reasonable time, so it has not the purpose to reach the desired accuracy to reproduce experimental results. Moreover please also note that scaling performance illustrated below may be significantly dependent on the underlying parallel architecture. Nevertheless, general considerations are tentatively drawn in discussing the results.&lt;br /&gt;
&lt;br /&gt;
==Files and Tools==&lt;br /&gt;
Database and tools can be downloaded here:&lt;br /&gt;
&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/parse_yambo.py parse_yambo.py]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/run.sh run.sh]&lt;br /&gt;
&lt;br /&gt;
and also&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
&lt;br /&gt;
== Getting familiar with yambo in parallel ==&lt;br /&gt;
&lt;br /&gt;
If you are not inside bellatrix, please follow the instructions in the tutorial home. &lt;br /&gt;
If you are inside bellatrix and in the proper folder&lt;br /&gt;
 [cecam.school01@bellatrix yambo_YOUR_NAME]$ pwd&lt;br /&gt;
 /scratch/cecam.schoolXY/yambo_YOUR_NAME&lt;br /&gt;
you can proceed. First you need to obtain the appropriate tarball&lt;br /&gt;
 $ cp /scratch/cecam.school/hBN-2D-para.tar.gz  ./  (Notice that this time there is not XY!)&lt;br /&gt;
 $ tar -zxvf hBN-2D-para.tar.gz&lt;br /&gt;
 $ ls&lt;br /&gt;
 YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN-2D-para/YAMBO&lt;br /&gt;
&lt;br /&gt;
To run a calculation on bellatrix you need to go via the queue system as explained in the Tutorials home.&lt;br /&gt;
Under the YAMBO folder, together with the SAVE folder, you will see the run.sh script&lt;br /&gt;
&lt;br /&gt;
 $ ls&lt;br /&gt;
 parse_yambo.py  parse_qp.py  run.sh  SAVE&lt;br /&gt;
&lt;br /&gt;
First run the initialization as usual.&lt;br /&gt;
Then you need to generate the input file for a GW run.&lt;br /&gt;
 $ yambo -g n -p p -F yambo_gw.in &lt;br /&gt;
The new input file should look like the folllowing.&lt;br /&gt;
Please remove the lines you see below with a stroke and set the parameters to the same values as below&lt;br /&gt;
 $ cat yambo_gw.in&lt;br /&gt;
 #&lt;br /&gt;
 #                                                           &lt;br /&gt;
 # Y88b    /   e           e    e      888~~\    ,88~-_      &lt;br /&gt;
 #  Y88b  /   d8b         d8b  d8b     888   |  d888   \     &lt;br /&gt;
 #   Y88b/   /Y88b       d888bdY88b    888 _/  88888    |    &lt;br /&gt;
 #    Y8Y   /  Y88b     / Y88Y Y888b   888  \  88888    |    &lt;br /&gt;
 #     Y   /____Y88b   /   YY   Y888b  888   |  Y888   /     &lt;br /&gt;
 #    /   /      Y88b /          Y888b 888__/    `88_-~      &lt;br /&gt;
 #                                                           &lt;br /&gt;
 #                                                           &lt;br /&gt;
 #             GPL Version 4.1.2 Revision 120                &lt;br /&gt;
 #                    MPI+OpenMP Build                       &lt;br /&gt;
 #               http://www.yambo-code.org                   &lt;br /&gt;
 #&lt;br /&gt;
 ppa                          # [R Xp] Plasmon Pole Approximation&lt;br /&gt;
 gw0                          # [R GW] GoWo Quasiparticle energy levels&lt;br /&gt;
 HF_and_locXC                 # [R XX] Hartree-Fock Self-energy and Vxc&lt;br /&gt;
 em1d                         # [R Xd] Dynamical Inverse Dielectric Matrix&lt;br /&gt;
 &amp;lt;s&amp;gt;X_Threads=  32               # [OPENMP/X] Number of threads for response functions &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;DIP_Threads=  32             # [OPENMP/X] Number of threads for dipoles &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_Threads=  32              # [OPENMP/GW] Number of threads for self-energy &amp;lt;/s&amp;gt;&lt;br /&gt;
 EXXRLvcs= 21817        RL    # [XX] Exchange RL components&lt;br /&gt;
 Chimod= &amp;quot;&amp;quot;                   # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXp= &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;4            Ry&amp;lt;/span&amp;gt;    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138     eV    # [Xp] PPA imaginary energy&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 GDamping=  0.10000     eV    # [GW] G[W] damping&lt;br /&gt;
 dScStep=  0.10000      eV    # [GW] Energy step to evaluate Z factors&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;               # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;)&lt;br /&gt;
 %QPkrange                    # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
   1| &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1| 3| 6&amp;lt;/span&amp;gt;|&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now open the submission script and the submission script&lt;br /&gt;
 $ cat run.sh&lt;br /&gt;
  &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #SBATCH -N 1&lt;br /&gt;
 #SBATCH -t 06:00:00 &lt;br /&gt;
 #SBATCH -J test&lt;br /&gt;
 #SBATCH --reservation=cecam_course&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nodes=1&lt;br /&gt;
 nthreads=1&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
 &lt;br /&gt;
 module purge&lt;br /&gt;
 module load intel/16.0.3&lt;br /&gt;
 module load intelmpi/5.1.3&lt;br /&gt;
 bindir=/home/cecam.school/bin/&lt;br /&gt;
 &lt;br /&gt;
 export OMP_NUM_THREADS=$nthreads&lt;br /&gt;
 &lt;br /&gt;
 label=MPI${ncpu}_OMP${nthreads}&lt;br /&gt;
 jdir=run_${label}&lt;br /&gt;
 cdir=run_${label}.out&lt;br /&gt;
 &lt;br /&gt;
 filein0=yambo_gw.in&lt;br /&gt;
 filein=yambo_gw_${label}.in&lt;br /&gt;
 &lt;br /&gt;
 cp -f $filein0 $filein&lt;br /&gt;
 cat &amp;gt;&amp;gt; $filein &amp;lt;&amp;lt; EOF&lt;br /&gt;
 X_all_q_CPU= &amp;quot;1 1 $ncpu 1&amp;quot;  # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;    # [PARALLEL] CPUs roles (q,k,c,v)&lt;br /&gt;
 X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&lt;br /&gt;
 X_Threads=  0               # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_CPU= &amp;quot; 1 1 $ncpu&amp;quot;        # [PARALLEL] CPUs for each role&lt;br /&gt;
 SE_ROLEs= &amp;quot;q qp b&amp;quot;          # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
 SE_Threads=  0    &lt;br /&gt;
 &lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Running on $ncpu MPI, $nthreads OpenMP threads&amp;quot;&lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J $jdir -C $cdir&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As soon as you are ready submit the job.&lt;br /&gt;
&lt;br /&gt;
 $ sbatch run.sh&lt;br /&gt;
&lt;br /&gt;
Yambo calculates the GW-qp corrections running on 1 MPI process with a single thread.&lt;br /&gt;
As you can see, monitoring the log file produced by yambo, the run takes some time, although&lt;br /&gt;
we are using minimal parameters.&lt;br /&gt;
&lt;br /&gt;
The status of the jobs can be controlled via:&lt;br /&gt;
 $ squeue  -u $USER        # to inspect the status of jobs &lt;br /&gt;
                        #(hint: make a unix alias, if you like)&lt;br /&gt;
 $ scancel  &amp;lt;jobid&amp;gt;           # to delete jobs in the queue&lt;br /&gt;
&lt;br /&gt;
== Pure MPI scaling with default parallelization scheme ==&lt;br /&gt;
&lt;br /&gt;
Meanwhile we can run the code in parallel. Let&#039;s use 16 MPI process, still with a single thread.&lt;br /&gt;
To this end modify the job.sh script changing&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
&lt;br /&gt;
or set ncpu by hand:&lt;br /&gt;
  ncpu=XX   (e.g. 1 to 16)&lt;br /&gt;
&lt;br /&gt;
This time the code should be much faster.&lt;br /&gt;
Once the run is over try to run the simulation also on 2, 4, 8.&lt;br /&gt;
Each time please remember to change both the number of tasks per node and the number of CPUs.&lt;br /&gt;
At the end you can try to produce a scaling plot.&lt;br /&gt;
&lt;br /&gt;
To analyze the data you can use the phyton &amp;quot;yambo_parse.py&amp;quot; script which is also provided.&lt;br /&gt;
&lt;br /&gt;
You can use it running&lt;br /&gt;
 $ ./parse_yambo.py run*/r-*&lt;br /&gt;
where $jobstring is the string you used for $jobname without the explicit number of MPI tasks.&lt;br /&gt;
&lt;br /&gt;
You should obtain something like that (but with more columns)&lt;br /&gt;
 # ncores         MPI     threads     Dipoles          Xo           X       Sgm_x       Sgm_c   WALL_TIME&lt;br /&gt;
       1           1           1       1.00s    7m39.00s       0.00s       3.00s    1m46.00s      09m38s&lt;br /&gt;
       2           2           1       2.00s    3m48.00s       0.00s       2.00s      53.00s      04m55s&lt;br /&gt;
       4           4           1       0.00s    1m56.00s       0.00s       1.00s      27.00s      02m33s&lt;br /&gt;
       8           8           1       0.00s     1m2.00s       0.00s       0.00s      14.00s      01m26s&lt;br /&gt;
      16          16           1       0.00s      35.00s       0.00s       0.00s       7.00s         54s&lt;br /&gt;
&lt;br /&gt;
Plot the execution time vs the number of MPI tasks&lt;br /&gt;
and check (do a log plot) how far you are from the ideal linear scaling.&lt;br /&gt;
Below a similar plot performed on Fermi&lt;br /&gt;
[[File:scaling_mpi_fermi.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- not all runlevels scale in in the same way &amp;lt;br&amp;gt;&lt;br /&gt;
- you should never overload the available number of cores&lt;br /&gt;
&lt;br /&gt;
== Pure OpenMP scaling ==&lt;br /&gt;
&lt;br /&gt;
Next step is instead to check the OpenMP scaling.&lt;br /&gt;
Set back&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
and now use&lt;br /&gt;
 nthreads=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
&lt;br /&gt;
In order to do pure OpenMP scaling the three numbers must be the same.&lt;br /&gt;
Notice that here the last 16 entering the definition of &amp;quot;ncpu&amp;quot; defines the total number of cores (or better threads, see tips below).&lt;br /&gt;
Since we are already using 16 threads, we cannot also split among MPI tasks, i.e. ncpu will result equal to 1.&lt;br /&gt;
Try setting nthreads to 16, 8, 4 and 2 and again to plot the execution time vs the number of threads using the pyton script.&lt;br /&gt;
Again you should be able to produce a plot similar to the following&lt;br /&gt;
&lt;br /&gt;
[[File:scaling_omp_fermi.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- OpenMP usually shares the memory among threads, but not always &amp;lt;br&amp;gt;&lt;br /&gt;
- you should never overload the available number of cores &amp;lt;br&amp;gt;&lt;br /&gt;
- in principle we could overload the cores setting more threads than the available total number of cores, since a single core allows multi-thread operations&lt;br /&gt;
&lt;br /&gt;
== MPI vs OpenMP scaling ==&lt;br /&gt;
&lt;br /&gt;
Which is scaling better ? MPI or OpenMP ?&lt;br /&gt;
How is the memory distributed ?&lt;br /&gt;
&lt;br /&gt;
Now you can try running simualations with hybrid strategies.&lt;br /&gt;
Try for example setting:&lt;br /&gt;
&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nthreads= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;4&amp;lt;/span&amp;gt;&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
&lt;br /&gt;
We can try to do scaling keeping the total number of tasks per node at 16.&lt;br /&gt;
Parsing the data we will obtain something similar to&lt;br /&gt;
&lt;br /&gt;
  # ncores         MPI     threads     Dipoles       Xo           X       Sgm_x       Sgm_c   WALL_TIME&lt;br /&gt;
      16           1          16       1.00s      38.00s       0.00s       2.00s      33.00s      01m25s&lt;br /&gt;
      16           2           8       2.00s      34.00s       0.00s       1.00s      16.00s      01m06s&lt;br /&gt;
      16           4           4       0.00s      34.00s       0.00s       1.00s      11.00s         56s&lt;br /&gt;
      16           8           2       0.00s      33.00s       0.00s       0.00s       9.00s         52s&lt;br /&gt;
      16          16           1       0.00s      35.00s       0.00s       0.00s       7.00s         54s&lt;br /&gt;
&lt;br /&gt;
As you can see here the total CPU time decreases more and more moving the parallelization from the the OpenMP to the MPI level.&lt;br /&gt;
Sigma_c in particular scales better. However the fastest run is not the one with 16 MPI task but the 8 2 configuration&lt;br /&gt;
since Xo is faster using an hybrid MPI-OpenMP scheme.&lt;br /&gt;
&lt;br /&gt;
However CPU time is not the only parameter you need to check.&lt;br /&gt;
Also the total memory usage is important&lt;br /&gt;
If you compare for example the two extreme cases (you can use)&lt;br /&gt;
 $ grep Gb run_MPI1_OMP*/l* | grep Alloc      (use this for the case with only one MPI proc)&lt;br /&gt;
 $ grep Gb run_MPI*_OMP*/LOG/l*_1 | grep Alloc  (use this for the case with more than one MPI proc)&lt;br /&gt;
&lt;br /&gt;
For the case&lt;br /&gt;
  # ncores         MPI     threads&lt;br /&gt;
      16           1          16  &lt;br /&gt;
 &amp;lt;01s&amp;gt; [M  0.119 Gb] Alloc WF ( 0.112)&lt;br /&gt;
 &amp;lt;03s&amp;gt; [M  0.314 Gb] Alloc WF ( 0.306)&lt;br /&gt;
 &amp;lt;46s&amp;gt; [M  0.074 Gb] Alloc WF ( 0.056)&lt;br /&gt;
 &amp;lt;50s&amp;gt; [M  0.321 Gb] Alloc WF ( 0.306)&lt;br /&gt;
the numbers reported above refer to the total amount of memory use in the run.&lt;br /&gt;
&lt;br /&gt;
For the case&lt;br /&gt;
  # ncores         MPI     threads&lt;br /&gt;
      16           16          1&lt;br /&gt;
 &amp;lt;02s&amp;gt; P0001: [M  0.034 Gb] Alloc WF ( 0.026)&lt;br /&gt;
 &amp;lt;43s&amp;gt; P0001: [M  0.037 Gb] Alloc WF ( 0.019)&lt;br /&gt;
 &amp;lt;45s&amp;gt; P0001: [M  0.091 Gb] Alloc WF ( 0.076)&lt;br /&gt;
the numbers reported above refer to the total amount of memory per MPI task.&lt;br /&gt;
Multiplying by 16 you obtain an estimate of the total memory: 0.091*16=1.456 (0.076*16=1.216)&lt;br /&gt;
These last two numbers have to be compared with 0.321 (0.306)&lt;br /&gt;
As you can see yambo is distributing memory, since the single MPI task uses less memory than&lt;br /&gt;
the total one needed (you can even compare with the serial case). However it is not as efficient as&lt;br /&gt;
OpenMP in doing so.&lt;br /&gt;
&lt;br /&gt;
Using an hybrid scheme you may also consider running yambo on mode than one node.&lt;br /&gt;
To run on two nodes for example you need to set&lt;br /&gt;
 #SBATCH -N &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;2&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nodes=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;2&amp;lt;/span&amp;gt;&lt;br /&gt;
accordingly you can now set &lt;br /&gt;
 nthreads= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;4&amp;lt;/span&amp;gt;&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
This time you will use 32 cores with (16 per node) 4 OpenMP threads and 2*16/4=8 MPI tasks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- in real life calculations running on n_cores &amp;gt; 100 it is a good idea to adopt an hybrid approach &amp;lt;br&amp;gt;&lt;br /&gt;
- with OpenMP you cannot exit the single node, with MPI you can&lt;br /&gt;
&lt;br /&gt;
== Advanced: Comparing different parallelization schemes (optional) ==&lt;br /&gt;
&lt;br /&gt;
Up to now we used the default parallelization scheme.&lt;br /&gt;
Yambo also allows you to tune the parameters which controls the parallelization scheme.&lt;br /&gt;
To this end you can open again the job.sh script and modify the section where the yambo input &lt;br /&gt;
variables are set&lt;br /&gt;
&lt;br /&gt;
 X_all_q_CPU= &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1 1 $ncpu 1&amp;lt;/span&amp;gt;&amp;quot;   # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;     # [PARALLEL] CPUs roles (q,k,c,v)&lt;br /&gt;
 #X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&lt;br /&gt;
 X_Threads=  0               # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_CPU= &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1 1 $ncpu&amp;lt;/span&amp;gt;&amp;quot;             # [PARALLEL] CPUs for each role&lt;br /&gt;
 SE_ROLEs= &amp;quot;q qp b&amp;quot;               # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
 SE_Threads=  0    &lt;br /&gt;
&lt;br /&gt;
In particular &amp;quot;X_all_q_CPU&amp;quot; sets how the MPI Tasks are distributed in the calculation of the response function.&lt;br /&gt;
The possibilities are shown in the &amp;quot;X_all_q_ROLEs&amp;quot;. The same holds for &amp;quot;SE_CPU&amp;quot; and &amp;quot;SE_ROLEs&amp;quot; which control&lt;br /&gt;
how MPI Tasks are distributed in the calculation of the response function.&lt;br /&gt;
&lt;br /&gt;
Please try different parallelization schemes and check the performances of Yambo.&lt;br /&gt;
In doing so you should also change the jobname in the run.sh script&lt;br /&gt;
 label=MPI${ncpu}_OMP${nthreads}&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;_scheme1&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the python script, you can then chenck how speed, memory and load balance between the CPUs are affected.&lt;br /&gt;
For more details see also the [[Using_Yambo_in_parallel|Parallel module]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips: &amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
- the product of the numbers entering each variable (i.e. X_all_q_CPU and SE_CPU) times the number of threads should always match the total number of cores (unless you want to overload the cores taking advantage of multi-threads) &amp;lt;br&amp;gt;&lt;br /&gt;
- using the X_Threads and SE_Threads variables you can think about setting different Hybrid schemes in between the screening and the self-energy runlevel.&lt;br /&gt;
- memory better scales if you parallelize on bands (c v b) &amp;lt;br&amp;gt;&lt;br /&gt;
- parallelization on k-points performs similarly to parallelization on bands, but memory requires more memory &amp;lt;br&amp;gt;&lt;br /&gt;
- parallelization on q-points requires much less communication in between the MPI tasks. It maybe useful if you run on more than one node and the inter-node connection is slow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:15%; text-align:left&amp;quot;|Prev: [[Tutorials|Tutorials Home]]&lt;br /&gt;
|style=&amp;quot;width:50%; text-align:center&amp;quot;|Now: [[Tutorials|Tutorials Home]] --&amp;gt; [[GW_parallel_strategies|GW Parallel]]&lt;br /&gt;
|style=&amp;quot;width:35%; text-align:right&amp;quot;|Next: [[Pushing_convergence_in_parallel|GW Convergence]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2989</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2989"/>
		<updated>2020-01-08T17:03:01Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
&#039;&#039;&#039;14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
Link to old CECAM specific cases: [[GW_parallel_strategies_CECAM]]&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, spin orbit effect, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to linear response]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to non linear response]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=GW_parallel_strategies_CECAM&amp;diff=2988</id>
		<title>GW parallel strategies CECAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=GW_parallel_strategies_CECAM&amp;diff=2988"/>
		<updated>2020-01-08T17:01:34Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This modules contains very general discussions of the parallel environment of Yambo. The commands are specific to the CECAM cluster. For other architectures, follow instead the [[GW_parallel_strategies]] tutorial or just replace the parallel queue instructions with simple MPI commands.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will see how to setup the variables governing the parallel execution of yambo in order to perform efficient calculations in terms of both cpu time and memory to solution. As a test case we will consider the hBN 2D material. Because of its reduced dimensionality, GW calculations turns out to be very delicate. Beside the usual convergence studies with respect to k-points and sums-over-bands, in low dimensional systems a sensible amount of vacuum is required in order to treat the system as isolated, translating into a large number of plane-waves. As for other tutorials, it is important to stress that this tutorial it is meant to illustrate the functionality of the key variables and to run in reasonable time, so it has not the purpose to reach the desired accuracy to reproduce experimental results. Moreover please also note that scaling performance illustrated below may be significantly dependent on the underlying parallel architecture. Nevertheless, general considerations are tentatively drawn in discussing the results.&lt;br /&gt;
&lt;br /&gt;
==Files and Tools==&lt;br /&gt;
Database and tools can be downloaded here:&lt;br /&gt;
&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/parse_yambo.py parse_yambo.py]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/run.sh run.sh]&lt;br /&gt;
&lt;br /&gt;
and also&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
&lt;br /&gt;
== Getting familiar with yambo in parallel ==&lt;br /&gt;
&lt;br /&gt;
If you are not inside bellatrix, please follow the instructions in the tutorial home. &lt;br /&gt;
If you are inside bellatrix and in the proper folder&lt;br /&gt;
 [cecam.school01@bellatrix yambo_YOUR_NAME]$ pwd&lt;br /&gt;
 /scratch/cecam.schoolXY/yambo_YOUR_NAME&lt;br /&gt;
you can proceed. First you need to obtain the appropriate tarball&lt;br /&gt;
 $ cp /scratch/cecam.school/hBN-2D-para.tar.gz  ./  (Notice that this time there is not XY!)&lt;br /&gt;
 $ tar -zxvf hBN-2D-para.tar.gz&lt;br /&gt;
 $ ls&lt;br /&gt;
 YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN-2D-para/YAMBO&lt;br /&gt;
&lt;br /&gt;
To run a calculation on bellatrix you need to go via the queue system as explained in the Tutorials home.&lt;br /&gt;
Under the YAMBO folder, together with the SAVE folder, you will see the run.sh script&lt;br /&gt;
&lt;br /&gt;
 $ ls&lt;br /&gt;
 parse_yambo.py  parse_qp.py  run.sh  SAVE&lt;br /&gt;
&lt;br /&gt;
First run the initialization as usual.&lt;br /&gt;
Then you need to generate the input file for a GW run.&lt;br /&gt;
 $ yambo -g n -p p -F yambo_gw.in &lt;br /&gt;
The new input file should look like the folllowing.&lt;br /&gt;
Please remove the lines you see below with a stroke and set the parameters to the same values as below&lt;br /&gt;
 $ cat yambo_gw.in&lt;br /&gt;
 #&lt;br /&gt;
 #                                                           &lt;br /&gt;
 # Y88b    /   e           e    e      888~~\    ,88~-_      &lt;br /&gt;
 #  Y88b  /   d8b         d8b  d8b     888   |  d888   \     &lt;br /&gt;
 #   Y88b/   /Y88b       d888bdY88b    888 _/  88888    |    &lt;br /&gt;
 #    Y8Y   /  Y88b     / Y88Y Y888b   888  \  88888    |    &lt;br /&gt;
 #     Y   /____Y88b   /   YY   Y888b  888   |  Y888   /     &lt;br /&gt;
 #    /   /      Y88b /          Y888b 888__/    `88_-~      &lt;br /&gt;
 #                                                           &lt;br /&gt;
 #                                                           &lt;br /&gt;
 #             GPL Version 4.1.2 Revision 120                &lt;br /&gt;
 #                    MPI+OpenMP Build                       &lt;br /&gt;
 #               http://www.yambo-code.org                   &lt;br /&gt;
 #&lt;br /&gt;
 ppa                          # [R Xp] Plasmon Pole Approximation&lt;br /&gt;
 gw0                          # [R GW] GoWo Quasiparticle energy levels&lt;br /&gt;
 HF_and_locXC                 # [R XX] Hartree-Fock Self-energy and Vxc&lt;br /&gt;
 em1d                         # [R Xd] Dynamical Inverse Dielectric Matrix&lt;br /&gt;
 &amp;lt;s&amp;gt;X_Threads=  32               # [OPENMP/X] Number of threads for response functions &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;DIP_Threads=  32             # [OPENMP/X] Number of threads for dipoles &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_Threads=  32              # [OPENMP/GW] Number of threads for self-energy &amp;lt;/s&amp;gt;&lt;br /&gt;
 EXXRLvcs= 21817        RL    # [XX] Exchange RL components&lt;br /&gt;
 Chimod= &amp;quot;&amp;quot;                   # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXp= &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;4            Ry&amp;lt;/span&amp;gt;    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138     eV    # [Xp] PPA imaginary energy&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 GDamping=  0.10000     eV    # [GW] G[W] damping&lt;br /&gt;
 dScStep=  0.10000      eV    # [GW] Energy step to evaluate Z factors&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;               # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;)&lt;br /&gt;
 %QPkrange                    # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
   1| &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1| 3| 6&amp;lt;/span&amp;gt;|&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now open the submission script and the submission script&lt;br /&gt;
 $ cat run.sh&lt;br /&gt;
  &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #SBATCH -N 1&lt;br /&gt;
 #SBATCH -t 06:00:00 &lt;br /&gt;
 #SBATCH -J test&lt;br /&gt;
 #SBATCH --reservation=cecam_course&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nodes=1&lt;br /&gt;
 nthreads=1&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
 &lt;br /&gt;
 module purge&lt;br /&gt;
 module load intel/16.0.3&lt;br /&gt;
 module load intelmpi/5.1.3&lt;br /&gt;
 bindir=/home/cecam.school/bin/&lt;br /&gt;
 &lt;br /&gt;
 export OMP_NUM_THREADS=$nthreads&lt;br /&gt;
 &lt;br /&gt;
 label=MPI${ncpu}_OMP${nthreads}&lt;br /&gt;
 jdir=run_${label}&lt;br /&gt;
 cdir=run_${label}.out&lt;br /&gt;
 &lt;br /&gt;
 filein0=yambo_gw.in&lt;br /&gt;
 filein=yambo_gw_${label}.in&lt;br /&gt;
 &lt;br /&gt;
 cp -f $filein0 $filein&lt;br /&gt;
 cat &amp;gt;&amp;gt; $filein &amp;lt;&amp;lt; EOF&lt;br /&gt;
 X_all_q_CPU= &amp;quot;1 1 $ncpu 1&amp;quot;  # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;    # [PARALLEL] CPUs roles (q,k,c,v)&lt;br /&gt;
 X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&lt;br /&gt;
 X_Threads=  0               # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_CPU= &amp;quot; 1 1 $ncpu&amp;quot;        # [PARALLEL] CPUs for each role&lt;br /&gt;
 SE_ROLEs= &amp;quot;q qp b&amp;quot;          # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
 SE_Threads=  0    &lt;br /&gt;
 &lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Running on $ncpu MPI, $nthreads OpenMP threads&amp;quot;&lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J $jdir -C $cdir&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As soon as you are ready submit the job.&lt;br /&gt;
&lt;br /&gt;
 $ sbatch run.sh&lt;br /&gt;
&lt;br /&gt;
Yambo calculates the GW-qp corrections running on 1 MPI process with a single thread.&lt;br /&gt;
As you can see, monitoring the log file produced by yambo, the run takes some time, although&lt;br /&gt;
we are using minimal parameters.&lt;br /&gt;
&lt;br /&gt;
The status of the jobs can be controlled via:&lt;br /&gt;
 $ squeue  -u $USER        # to inspect the status of jobs &lt;br /&gt;
                        #(hint: make a unix alias, if you like)&lt;br /&gt;
 $ scancel  &amp;lt;jobid&amp;gt;           # to delete jobs in the queue&lt;br /&gt;
&lt;br /&gt;
== Pure MPI scaling with default parallelization scheme ==&lt;br /&gt;
&lt;br /&gt;
Meanwhile we can run the code in parallel. Let&#039;s use 16 MPI process, still with a single thread.&lt;br /&gt;
To this end modify the job.sh script changing&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
&lt;br /&gt;
or set ncpu by hand:&lt;br /&gt;
  ncpu=XX   (e.g. 1 to 16)&lt;br /&gt;
&lt;br /&gt;
This time the code should be much faster.&lt;br /&gt;
Once the run is over try to run the simulation also on 2, 4, 8.&lt;br /&gt;
Each time please remember to change both the number of tasks per node and the number of CPUs.&lt;br /&gt;
At the end you can try to produce a scaling plot.&lt;br /&gt;
&lt;br /&gt;
To analyze the data you can use the phyton &amp;quot;yambo_parse.py&amp;quot; script which is also provided.&lt;br /&gt;
&lt;br /&gt;
You can use it running&lt;br /&gt;
 $ ./parse_yambo.py run*/r-*&lt;br /&gt;
where $jobstring is the string you used for $jobname without the explicit number of MPI tasks.&lt;br /&gt;
&lt;br /&gt;
You should obtain something like that (but with more columns)&lt;br /&gt;
 # ncores         MPI     threads     Dipoles          Xo           X       Sgm_x       Sgm_c   WALL_TIME&lt;br /&gt;
       1           1           1       1.00s    7m39.00s       0.00s       3.00s    1m46.00s      09m38s&lt;br /&gt;
       2           2           1       2.00s    3m48.00s       0.00s       2.00s      53.00s      04m55s&lt;br /&gt;
       4           4           1       0.00s    1m56.00s       0.00s       1.00s      27.00s      02m33s&lt;br /&gt;
       8           8           1       0.00s     1m2.00s       0.00s       0.00s      14.00s      01m26s&lt;br /&gt;
      16          16           1       0.00s      35.00s       0.00s       0.00s       7.00s         54s&lt;br /&gt;
&lt;br /&gt;
Plot the execution time vs the number of MPI tasks&lt;br /&gt;
and check (do a log plot) how far you are from the ideal linear scaling.&lt;br /&gt;
Below a similar plot performed on Fermi&lt;br /&gt;
[[File:scaling_mpi_fermi.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- not all runlevels scale in in the same way &amp;lt;br&amp;gt;&lt;br /&gt;
- you should never overload the available number of cores&lt;br /&gt;
&lt;br /&gt;
== Pure OpenMP scaling ==&lt;br /&gt;
&lt;br /&gt;
Next step is instead to check the OpenMP scaling.&lt;br /&gt;
Set back&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
and now use&lt;br /&gt;
 nthreads=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
&lt;br /&gt;
In order to do pure OpenMP scaling the three numbers must be the same.&lt;br /&gt;
Notice that here the last 16 entering the definition of &amp;quot;ncpu&amp;quot; defines the total number of cores (or better threads, see tips below).&lt;br /&gt;
Since we are already using 16 threads, we cannot also split among MPI tasks, i.e. ncpu will result equal to 1.&lt;br /&gt;
Try setting nthreads to 16, 8, 4 and 2 and again to plot the execution time vs the number of threads using the pyton script.&lt;br /&gt;
Again you should be able to produce a plot similar to the following&lt;br /&gt;
&lt;br /&gt;
[[File:scaling_omp_fermi.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- OpenMP usually shares the memory among threads, but not always &amp;lt;br&amp;gt;&lt;br /&gt;
- you should never overload the available number of cores &amp;lt;br&amp;gt;&lt;br /&gt;
- in principle we could overload the cores setting more threads than the available total number of cores, since a single core allows multi-thread operations&lt;br /&gt;
&lt;br /&gt;
== MPI vs OpenMP scaling ==&lt;br /&gt;
&lt;br /&gt;
Which is scaling better ? MPI or OpenMP ?&lt;br /&gt;
How is the memory distributed ?&lt;br /&gt;
&lt;br /&gt;
Now you can try running simualations with hybrid strategies.&lt;br /&gt;
Try for example setting:&lt;br /&gt;
&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nthreads= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;4&amp;lt;/span&amp;gt;&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
&lt;br /&gt;
We can try to do scaling keeping the total number of tasks per node at 16.&lt;br /&gt;
Parsing the data we will obtain something similar to&lt;br /&gt;
&lt;br /&gt;
  # ncores         MPI     threads     Dipoles       Xo           X       Sgm_x       Sgm_c   WALL_TIME&lt;br /&gt;
      16           1          16       1.00s      38.00s       0.00s       2.00s      33.00s      01m25s&lt;br /&gt;
      16           2           8       2.00s      34.00s       0.00s       1.00s      16.00s      01m06s&lt;br /&gt;
      16           4           4       0.00s      34.00s       0.00s       1.00s      11.00s         56s&lt;br /&gt;
      16           8           2       0.00s      33.00s       0.00s       0.00s       9.00s         52s&lt;br /&gt;
      16          16           1       0.00s      35.00s       0.00s       0.00s       7.00s         54s&lt;br /&gt;
&lt;br /&gt;
As you can see here the total CPU time decreases more and more moving the parallelization from the the OpenMP to the MPI level.&lt;br /&gt;
Sigma_c in particular scales better. However the fastest run is not the one with 16 MPI task but the 8 2 configuration&lt;br /&gt;
since Xo is faster using an hybrid MPI-OpenMP scheme.&lt;br /&gt;
&lt;br /&gt;
However CPU time is not the only parameter you need to check.&lt;br /&gt;
Also the total memory usage is important&lt;br /&gt;
If you compare for example the two extreme cases (you can use)&lt;br /&gt;
 $ grep Gb run_MPI1_OMP*/l* | grep Alloc      (use this for the case with only one MPI proc)&lt;br /&gt;
 $ grep Gb run_MPI*_OMP*/LOG/l*_1 | grep Alloc  (use this for the case with more than one MPI proc)&lt;br /&gt;
&lt;br /&gt;
For the case&lt;br /&gt;
  # ncores         MPI     threads&lt;br /&gt;
      16           1          16  &lt;br /&gt;
 &amp;lt;01s&amp;gt; [M  0.119 Gb] Alloc WF ( 0.112)&lt;br /&gt;
 &amp;lt;03s&amp;gt; [M  0.314 Gb] Alloc WF ( 0.306)&lt;br /&gt;
 &amp;lt;46s&amp;gt; [M  0.074 Gb] Alloc WF ( 0.056)&lt;br /&gt;
 &amp;lt;50s&amp;gt; [M  0.321 Gb] Alloc WF ( 0.306)&lt;br /&gt;
the numbers reported above refer to the total amount of memory use in the run.&lt;br /&gt;
&lt;br /&gt;
For the case&lt;br /&gt;
  # ncores         MPI     threads&lt;br /&gt;
      16           16          1&lt;br /&gt;
 &amp;lt;02s&amp;gt; P0001: [M  0.034 Gb] Alloc WF ( 0.026)&lt;br /&gt;
 &amp;lt;43s&amp;gt; P0001: [M  0.037 Gb] Alloc WF ( 0.019)&lt;br /&gt;
 &amp;lt;45s&amp;gt; P0001: [M  0.091 Gb] Alloc WF ( 0.076)&lt;br /&gt;
the numbers reported above refer to the total amount of memory per MPI task.&lt;br /&gt;
Multiplying by 16 you obtain an estimate of the total memory: 0.091*16=1.456 (0.076*16=1.216)&lt;br /&gt;
These last two numbers have to be compared with 0.321 (0.306)&lt;br /&gt;
As you can see yambo is distributing memory, since the single MPI task uses less memory than&lt;br /&gt;
the total one needed (you can even compare with the serial case). However it is not as efficient as&lt;br /&gt;
OpenMP in doing so.&lt;br /&gt;
&lt;br /&gt;
Using an hybrid scheme you may also consider running yambo on mode than one node.&lt;br /&gt;
To run on two nodes for example you need to set&lt;br /&gt;
 #SBATCH -N &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;2&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nodes=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;2&amp;lt;/span&amp;gt;&lt;br /&gt;
accordingly you can now set &lt;br /&gt;
 nthreads= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;4&amp;lt;/span&amp;gt;&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
This time you will use 32 cores with (16 per node) 4 OpenMP threads and 2*16/4=8 MPI tasks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- in real life calculations running on n_cores &amp;gt; 100 it is a good idea to adopt an hybrid approach &amp;lt;br&amp;gt;&lt;br /&gt;
- with OpenMP you cannot exit the single node, with MPI you can&lt;br /&gt;
&lt;br /&gt;
== Advanced: Comparing different parallelization schemes (optional) ==&lt;br /&gt;
&lt;br /&gt;
Up to now we used the default parallelization scheme.&lt;br /&gt;
Yambo also allows you to tune the parameters which controls the parallelization scheme.&lt;br /&gt;
To this end you can open again the job.sh script and modify the section where the yambo input &lt;br /&gt;
variables are set&lt;br /&gt;
&lt;br /&gt;
 X_all_q_CPU= &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1 1 $ncpu 1&amp;lt;/span&amp;gt;&amp;quot;   # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;     # [PARALLEL] CPUs roles (q,k,c,v)&lt;br /&gt;
 #X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&lt;br /&gt;
 X_Threads=  0               # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_CPU= &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1 1 $ncpu&amp;lt;/span&amp;gt;&amp;quot;             # [PARALLEL] CPUs for each role&lt;br /&gt;
 SE_ROLEs= &amp;quot;q qp b&amp;quot;               # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
 SE_Threads=  0    &lt;br /&gt;
&lt;br /&gt;
In particular &amp;quot;X_all_q_CPU&amp;quot; sets how the MPI Tasks are distributed in the calculation of the response function.&lt;br /&gt;
The possibilities are shown in the &amp;quot;X_all_q_ROLEs&amp;quot;. The same holds for &amp;quot;SE_CPU&amp;quot; and &amp;quot;SE_ROLEs&amp;quot; which control&lt;br /&gt;
how MPI Tasks are distributed in the calculation of the response function.&lt;br /&gt;
&lt;br /&gt;
Please try different parallelization schemes and check the performances of Yambo.&lt;br /&gt;
In doing so you should also change the jobname in the run.sh script&lt;br /&gt;
 label=MPI${ncpu}_OMP${nthreads}&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;_scheme1&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the python script, you can then chenck how speed, memory and load balance between the CPUs are affected.&lt;br /&gt;
For more details see also the [[Using_Yambo_in_parallel|Parallel module]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips: &amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
- the product of the numbers entering each variable (i.e. X_all_q_CPU and SE_CPU) times the number of threads should always match the total number of cores (unless you want to overload the cores taking advantage of multi-threads) &amp;lt;br&amp;gt;&lt;br /&gt;
- using the X_Threads and SE_Threads variables you can think about setting different Hybrid schemes in between the screening and the self-energy runlevel.&lt;br /&gt;
- memory better scales if you parallelize on bands (c v b) &amp;lt;br&amp;gt;&lt;br /&gt;
- parallelization on k-points performs similarly to parallelization on bands, but memory requires more memory &amp;lt;br&amp;gt;&lt;br /&gt;
- parallelization on q-points requires much less communication in between the MPI tasks. It maybe useful if you run on more than one node and the inter-node connection is slow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:15%; text-align:left&amp;quot;|Prev: [[Tutorials|Tutorials Home]]&lt;br /&gt;
|style=&amp;quot;width:50%; text-align:center&amp;quot;|Now: [[Tutorials|Tutorials Home]] --&amp;gt; [[GW_parallel_strategies|GW Parallel]]&lt;br /&gt;
|style=&amp;quot;width:35%; text-align:right&amp;quot;|Next: [[Pushing_convergence_in_parallel|GW Convergence]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=GW_parallel_strategies_CECAM&amp;diff=2987</id>
		<title>GW parallel strategies CECAM</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=GW_parallel_strategies_CECAM&amp;diff=2987"/>
		<updated>2020-01-08T16:59:30Z</updated>

		<summary type="html">&lt;p&gt;Conor: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run it  just replace the parallel queue instructions with simple MPI commands.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will see how to setup the variables governing the parallel execution of yambo in order to perform efficient calculations in terms of both cpu time and memory to solution. As a test case we will consider the hBN 2D material. Because of its reduced dimensionality, GW calculations turns out to be very delicate. Beside the usual convergence studies with respect to k-points and sums-over-bands, in low dimensional systems a sensible amount of vacuum is required in order to treat the system as isolated, translating into a large number of plane-waves. As for other tutorials, it is important to stress that this tutorial it is meant to illustrate the functionality of the key variables and to run in reasonable time, so it has not the purpose to reach the desired accuracy to reproduce experimental results. Moreover please also note that scaling performance illustrated below may be significantly dependent on the underlying parallel architecture. Nevertheless, general considerations are tentatively drawn in discussing the results.&lt;br /&gt;
&lt;br /&gt;
==Files and Tools==&lt;br /&gt;
Database and tools can be downloaded here:&lt;br /&gt;
&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/parse_yambo.py parse_yambo.py]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/run.sh run.sh]&lt;br /&gt;
&lt;br /&gt;
and also&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
*[http://www.yambo-code.org/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
&lt;br /&gt;
== Getting familiar with yambo in parallel ==&lt;br /&gt;
&lt;br /&gt;
If you are not inside bellatrix, please follow the instructions in the tutorial home. &lt;br /&gt;
If you are inside bellatrix and in the proper folder&lt;br /&gt;
 [cecam.school01@bellatrix yambo_YOUR_NAME]$ pwd&lt;br /&gt;
 /scratch/cecam.schoolXY/yambo_YOUR_NAME&lt;br /&gt;
you can proceed. First you need to obtain the appropriate tarball&lt;br /&gt;
 $ cp /scratch/cecam.school/hBN-2D-para.tar.gz  ./  (Notice that this time there is not XY!)&lt;br /&gt;
 $ tar -zxvf hBN-2D-para.tar.gz&lt;br /&gt;
 $ ls&lt;br /&gt;
 YAMBO_TUTORIALS&lt;br /&gt;
 $ cd YAMBO_TUTORIALS/hBN-2D-para/YAMBO&lt;br /&gt;
&lt;br /&gt;
To run a calculation on bellatrix you need to go via the queue system as explained in the Tutorials home.&lt;br /&gt;
Under the YAMBO folder, together with the SAVE folder, you will see the run.sh script&lt;br /&gt;
&lt;br /&gt;
 $ ls&lt;br /&gt;
 parse_yambo.py  parse_qp.py  run.sh  SAVE&lt;br /&gt;
&lt;br /&gt;
First run the initialization as usual.&lt;br /&gt;
Then you need to generate the input file for a GW run.&lt;br /&gt;
 $ yambo -g n -p p -F yambo_gw.in &lt;br /&gt;
The new input file should look like the folllowing.&lt;br /&gt;
Please remove the lines you see below with a stroke and set the parameters to the same values as below&lt;br /&gt;
 $ cat yambo_gw.in&lt;br /&gt;
 #&lt;br /&gt;
 #                                                           &lt;br /&gt;
 # Y88b    /   e           e    e      888~~\    ,88~-_      &lt;br /&gt;
 #  Y88b  /   d8b         d8b  d8b     888   |  d888   \     &lt;br /&gt;
 #   Y88b/   /Y88b       d888bdY88b    888 _/  88888    |    &lt;br /&gt;
 #    Y8Y   /  Y88b     / Y88Y Y888b   888  \  88888    |    &lt;br /&gt;
 #     Y   /____Y88b   /   YY   Y888b  888   |  Y888   /     &lt;br /&gt;
 #    /   /      Y88b /          Y888b 888__/    `88_-~      &lt;br /&gt;
 #                                                           &lt;br /&gt;
 #                                                           &lt;br /&gt;
 #             GPL Version 4.1.2 Revision 120                &lt;br /&gt;
 #                    MPI+OpenMP Build                       &lt;br /&gt;
 #               http://www.yambo-code.org                   &lt;br /&gt;
 #&lt;br /&gt;
 ppa                          # [R Xp] Plasmon Pole Approximation&lt;br /&gt;
 gw0                          # [R GW] GoWo Quasiparticle energy levels&lt;br /&gt;
 HF_and_locXC                 # [R XX] Hartree-Fock Self-energy and Vxc&lt;br /&gt;
 em1d                         # [R Xd] Dynamical Inverse Dielectric Matrix&lt;br /&gt;
 &amp;lt;s&amp;gt;X_Threads=  32               # [OPENMP/X] Number of threads for response functions &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;DIP_Threads=  32             # [OPENMP/X] Number of threads for dipoles &amp;lt;/s&amp;gt;&lt;br /&gt;
 &amp;lt;s&amp;gt;SE_Threads=  32              # [OPENMP/GW] Number of threads for self-energy &amp;lt;/s&amp;gt;&lt;br /&gt;
 EXXRLvcs= 21817        RL    # [XX] Exchange RL components&lt;br /&gt;
 Chimod= &amp;quot;&amp;quot;                   # [X] IP/Hartree/ALDA/LRC/BSfxc&lt;br /&gt;
 % BndsRnXp&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [Xp] Polarization function bands&lt;br /&gt;
 %&lt;br /&gt;
 NGsBlkXp= &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;4            Ry&amp;lt;/span&amp;gt;    # [Xp] Response block size&lt;br /&gt;
 % LongDrXp&lt;br /&gt;
  1.000000 | 0.000000 | 0.000000 |        # [Xp] [cc] Electric Field&lt;br /&gt;
 %&lt;br /&gt;
 PPAPntXp= 27.21138     eV    # [Xp] PPA imaginary energy&lt;br /&gt;
 % GbndRnge&lt;br /&gt;
     1 |  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;200&amp;lt;/span&amp;gt; |               # [GW] G[W] bands range&lt;br /&gt;
 %&lt;br /&gt;
 GDamping=  0.10000     eV    # [GW] G[W] damping&lt;br /&gt;
 dScStep=  0.10000      eV    # [GW] Energy step to evaluate Z factors&lt;br /&gt;
 DysSolver= &amp;quot;n&amp;quot;               # [GW] Dyson Equation solver (&amp;quot;n&amp;quot;,&amp;quot;s&amp;quot;,&amp;quot;g&amp;quot;)&lt;br /&gt;
 %QPkrange                    # [GW] QP generalized Kpoint/Band indices&lt;br /&gt;
   1| &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;1| 3| 6&amp;lt;/span&amp;gt;|&lt;br /&gt;
 %&lt;br /&gt;
&lt;br /&gt;
You can now open the submission script and the submission script&lt;br /&gt;
 $ cat run.sh&lt;br /&gt;
  &lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #SBATCH -N 1&lt;br /&gt;
 #SBATCH -t 06:00:00 &lt;br /&gt;
 #SBATCH -J test&lt;br /&gt;
 #SBATCH --reservation=cecam_course&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nodes=1&lt;br /&gt;
 nthreads=1&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
 &lt;br /&gt;
 module purge&lt;br /&gt;
 module load intel/16.0.3&lt;br /&gt;
 module load intelmpi/5.1.3&lt;br /&gt;
 bindir=/home/cecam.school/bin/&lt;br /&gt;
 &lt;br /&gt;
 export OMP_NUM_THREADS=$nthreads&lt;br /&gt;
 &lt;br /&gt;
 label=MPI${ncpu}_OMP${nthreads}&lt;br /&gt;
 jdir=run_${label}&lt;br /&gt;
 cdir=run_${label}.out&lt;br /&gt;
 &lt;br /&gt;
 filein0=yambo_gw.in&lt;br /&gt;
 filein=yambo_gw_${label}.in&lt;br /&gt;
 &lt;br /&gt;
 cp -f $filein0 $filein&lt;br /&gt;
 cat &amp;gt;&amp;gt; $filein &amp;lt;&amp;lt; EOF&lt;br /&gt;
 X_all_q_CPU= &amp;quot;1 1 $ncpu 1&amp;quot;  # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;    # [PARALLEL] CPUs roles (q,k,c,v)&lt;br /&gt;
 X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&lt;br /&gt;
 X_Threads=  0               # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_CPU= &amp;quot; 1 1 $ncpu&amp;quot;        # [PARALLEL] CPUs for each role&lt;br /&gt;
 SE_ROLEs= &amp;quot;q qp b&amp;quot;          # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
 SE_Threads=  0    &lt;br /&gt;
 &lt;br /&gt;
 EOF&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;Running on $ncpu MPI, $nthreads OpenMP threads&amp;quot;&lt;br /&gt;
 srun -n $ncpu -c $nthreads $bindir/yambo -F $filein -J $jdir -C $cdir&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As soon as you are ready submit the job.&lt;br /&gt;
&lt;br /&gt;
 $ sbatch run.sh&lt;br /&gt;
&lt;br /&gt;
Yambo calculates the GW-qp corrections running on 1 MPI process with a single thread.&lt;br /&gt;
As you can see, monitoring the log file produced by yambo, the run takes some time, although&lt;br /&gt;
we are using minimal parameters.&lt;br /&gt;
&lt;br /&gt;
The status of the jobs can be controlled via:&lt;br /&gt;
 $ squeue  -u $USER        # to inspect the status of jobs &lt;br /&gt;
                        #(hint: make a unix alias, if you like)&lt;br /&gt;
 $ scancel  &amp;lt;jobid&amp;gt;           # to delete jobs in the queue&lt;br /&gt;
&lt;br /&gt;
== Pure MPI scaling with default parallelization scheme ==&lt;br /&gt;
&lt;br /&gt;
Meanwhile we can run the code in parallel. Let&#039;s use 16 MPI process, still with a single thread.&lt;br /&gt;
To this end modify the job.sh script changing&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
&lt;br /&gt;
or set ncpu by hand:&lt;br /&gt;
  ncpu=XX   (e.g. 1 to 16)&lt;br /&gt;
&lt;br /&gt;
This time the code should be much faster.&lt;br /&gt;
Once the run is over try to run the simulation also on 2, 4, 8.&lt;br /&gt;
Each time please remember to change both the number of tasks per node and the number of CPUs.&lt;br /&gt;
At the end you can try to produce a scaling plot.&lt;br /&gt;
&lt;br /&gt;
To analyze the data you can use the phyton &amp;quot;yambo_parse.py&amp;quot; script which is also provided.&lt;br /&gt;
&lt;br /&gt;
You can use it running&lt;br /&gt;
 $ ./parse_yambo.py run*/r-*&lt;br /&gt;
where $jobstring is the string you used for $jobname without the explicit number of MPI tasks.&lt;br /&gt;
&lt;br /&gt;
You should obtain something like that (but with more columns)&lt;br /&gt;
 # ncores         MPI     threads     Dipoles          Xo           X       Sgm_x       Sgm_c   WALL_TIME&lt;br /&gt;
       1           1           1       1.00s    7m39.00s       0.00s       3.00s    1m46.00s      09m38s&lt;br /&gt;
       2           2           1       2.00s    3m48.00s       0.00s       2.00s      53.00s      04m55s&lt;br /&gt;
       4           4           1       0.00s    1m56.00s       0.00s       1.00s      27.00s      02m33s&lt;br /&gt;
       8           8           1       0.00s     1m2.00s       0.00s       0.00s      14.00s      01m26s&lt;br /&gt;
      16          16           1       0.00s      35.00s       0.00s       0.00s       7.00s         54s&lt;br /&gt;
&lt;br /&gt;
Plot the execution time vs the number of MPI tasks&lt;br /&gt;
and check (do a log plot) how far you are from the ideal linear scaling.&lt;br /&gt;
Below a similar plot performed on Fermi&lt;br /&gt;
[[File:scaling_mpi_fermi.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- not all runlevels scale in in the same way &amp;lt;br&amp;gt;&lt;br /&gt;
- you should never overload the available number of cores&lt;br /&gt;
&lt;br /&gt;
== Pure OpenMP scaling ==&lt;br /&gt;
&lt;br /&gt;
Next step is instead to check the OpenMP scaling.&lt;br /&gt;
Set back&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
and now use&lt;br /&gt;
 nthreads=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
&lt;br /&gt;
In order to do pure OpenMP scaling the three numbers must be the same.&lt;br /&gt;
Notice that here the last 16 entering the definition of &amp;quot;ncpu&amp;quot; defines the total number of cores (or better threads, see tips below).&lt;br /&gt;
Since we are already using 16 threads, we cannot also split among MPI tasks, i.e. ncpu will result equal to 1.&lt;br /&gt;
Try setting nthreads to 16, 8, 4 and 2 and again to plot the execution time vs the number of threads using the pyton script.&lt;br /&gt;
Again you should be able to produce a plot similar to the following&lt;br /&gt;
&lt;br /&gt;
[[File:scaling_omp_fermi.jpg|750px|center]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- OpenMP usually shares the memory among threads, but not always &amp;lt;br&amp;gt;&lt;br /&gt;
- you should never overload the available number of cores &amp;lt;br&amp;gt;&lt;br /&gt;
- in principle we could overload the cores setting more threads than the available total number of cores, since a single core allows multi-thread operations&lt;br /&gt;
&lt;br /&gt;
== MPI vs OpenMP scaling ==&lt;br /&gt;
&lt;br /&gt;
Which is scaling better ? MPI or OpenMP ?&lt;br /&gt;
How is the memory distributed ?&lt;br /&gt;
&lt;br /&gt;
Now you can try running simualations with hybrid strategies.&lt;br /&gt;
Try for example setting:&lt;br /&gt;
&lt;br /&gt;
 #SBATCH --tasks-per-node=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nthreads= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;4&amp;lt;/span&amp;gt;&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
&lt;br /&gt;
We can try to do scaling keeping the total number of tasks per node at 16.&lt;br /&gt;
Parsing the data we will obtain something similar to&lt;br /&gt;
&lt;br /&gt;
  # ncores         MPI     threads     Dipoles       Xo           X       Sgm_x       Sgm_c   WALL_TIME&lt;br /&gt;
      16           1          16       1.00s      38.00s       0.00s       2.00s      33.00s      01m25s&lt;br /&gt;
      16           2           8       2.00s      34.00s       0.00s       1.00s      16.00s      01m06s&lt;br /&gt;
      16           4           4       0.00s      34.00s       0.00s       1.00s      11.00s         56s&lt;br /&gt;
      16           8           2       0.00s      33.00s       0.00s       0.00s       9.00s         52s&lt;br /&gt;
      16          16           1       0.00s      35.00s       0.00s       0.00s       7.00s         54s&lt;br /&gt;
&lt;br /&gt;
As you can see here the total CPU time decreases more and more moving the parallelization from the the OpenMP to the MPI level.&lt;br /&gt;
Sigma_c in particular scales better. However the fastest run is not the one with 16 MPI task but the 8 2 configuration&lt;br /&gt;
since Xo is faster using an hybrid MPI-OpenMP scheme.&lt;br /&gt;
&lt;br /&gt;
However CPU time is not the only parameter you need to check.&lt;br /&gt;
Also the total memory usage is important&lt;br /&gt;
If you compare for example the two extreme cases (you can use)&lt;br /&gt;
 $ grep Gb run_MPI1_OMP*/l* | grep Alloc      (use this for the case with only one MPI proc)&lt;br /&gt;
 $ grep Gb run_MPI*_OMP*/LOG/l*_1 | grep Alloc  (use this for the case with more than one MPI proc)&lt;br /&gt;
&lt;br /&gt;
For the case&lt;br /&gt;
  # ncores         MPI     threads&lt;br /&gt;
      16           1          16  &lt;br /&gt;
 &amp;lt;01s&amp;gt; [M  0.119 Gb] Alloc WF ( 0.112)&lt;br /&gt;
 &amp;lt;03s&amp;gt; [M  0.314 Gb] Alloc WF ( 0.306)&lt;br /&gt;
 &amp;lt;46s&amp;gt; [M  0.074 Gb] Alloc WF ( 0.056)&lt;br /&gt;
 &amp;lt;50s&amp;gt; [M  0.321 Gb] Alloc WF ( 0.306)&lt;br /&gt;
the numbers reported above refer to the total amount of memory use in the run.&lt;br /&gt;
&lt;br /&gt;
For the case&lt;br /&gt;
  # ncores         MPI     threads&lt;br /&gt;
      16           16          1&lt;br /&gt;
 &amp;lt;02s&amp;gt; P0001: [M  0.034 Gb] Alloc WF ( 0.026)&lt;br /&gt;
 &amp;lt;43s&amp;gt; P0001: [M  0.037 Gb] Alloc WF ( 0.019)&lt;br /&gt;
 &amp;lt;45s&amp;gt; P0001: [M  0.091 Gb] Alloc WF ( 0.076)&lt;br /&gt;
the numbers reported above refer to the total amount of memory per MPI task.&lt;br /&gt;
Multiplying by 16 you obtain an estimate of the total memory: 0.091*16=1.456 (0.076*16=1.216)&lt;br /&gt;
These last two numbers have to be compared with 0.321 (0.306)&lt;br /&gt;
As you can see yambo is distributing memory, since the single MPI task uses less memory than&lt;br /&gt;
the total one needed (you can even compare with the serial case). However it is not as efficient as&lt;br /&gt;
OpenMP in doing so.&lt;br /&gt;
&lt;br /&gt;
Using an hybrid scheme you may also consider running yambo on mode than one node.&lt;br /&gt;
To run on two nodes for example you need to set&lt;br /&gt;
 #SBATCH -N &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;2&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nodes=&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;2&amp;lt;/span&amp;gt;&lt;br /&gt;
accordingly you can now set &lt;br /&gt;
 nthreads= &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;4&amp;lt;/span&amp;gt;&lt;br /&gt;
 ncpu=`echo $nodes $nthreads &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;16&amp;lt;/span&amp;gt; | awk &#039;{print $1*$3/$2}&#039;`&lt;br /&gt;
This time you will use 32 cores with (16 per node) 4 OpenMP threads and 2*16/4=8 MPI tasks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips:&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;br /&gt;
- in real life calculations running on n_cores &amp;gt; 100 it is a good idea to adopt an hybrid approach &amp;lt;br&amp;gt;&lt;br /&gt;
- with OpenMP you cannot exit the single node, with MPI you can&lt;br /&gt;
&lt;br /&gt;
== Advanced: Comparing different parallelization schemes (optional) ==&lt;br /&gt;
&lt;br /&gt;
Up to now we used the default parallelization scheme.&lt;br /&gt;
Yambo also allows you to tune the parameters which controls the parallelization scheme.&lt;br /&gt;
To this end you can open again the job.sh script and modify the section where the yambo input &lt;br /&gt;
variables are set&lt;br /&gt;
&lt;br /&gt;
 X_all_q_CPU= &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1 1 $ncpu 1&amp;lt;/span&amp;gt;&amp;quot;   # [PARALLEL] CPUs for each role&lt;br /&gt;
 X_all_q_ROLEs= &amp;quot;q k c v&amp;quot;     # [PARALLEL] CPUs roles (q,k,c,v)&lt;br /&gt;
 #X_all_q_nCPU_LinAlg_INV= $ncpu   # [PARALLEL] CPUs for Linear Algebra&lt;br /&gt;
 X_Threads=  0               # [OPENMP/X] Number of threads for response functions&lt;br /&gt;
 DIP_Threads=  0             # [OPENMP/X] Number of threads for dipoles&lt;br /&gt;
 SE_CPU= &amp;quot;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;1 1 $ncpu&amp;lt;/span&amp;gt;&amp;quot;             # [PARALLEL] CPUs for each role&lt;br /&gt;
 SE_ROLEs= &amp;quot;q qp b&amp;quot;               # [PARALLEL] CPUs roles (q,qp,b)&lt;br /&gt;
 SE_Threads=  0    &lt;br /&gt;
&lt;br /&gt;
In particular &amp;quot;X_all_q_CPU&amp;quot; sets how the MPI Tasks are distributed in the calculation of the response function.&lt;br /&gt;
The possibilities are shown in the &amp;quot;X_all_q_ROLEs&amp;quot;. The same holds for &amp;quot;SE_CPU&amp;quot; and &amp;quot;SE_ROLEs&amp;quot; which control&lt;br /&gt;
how MPI Tasks are distributed in the calculation of the response function.&lt;br /&gt;
&lt;br /&gt;
Please try different parallelization schemes and check the performances of Yambo.&lt;br /&gt;
In doing so you should also change the jobname in the run.sh script&lt;br /&gt;
 label=MPI${ncpu}_OMP${nthreads}&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;_scheme1&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the python script, you can then chenck how speed, memory and load balance between the CPUs are affected.&lt;br /&gt;
For more details see also the [[Using_Yambo_in_parallel|Parallel module]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;tips: &amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
- the product of the numbers entering each variable (i.e. X_all_q_CPU and SE_CPU) times the number of threads should always match the total number of cores (unless you want to overload the cores taking advantage of multi-threads) &amp;lt;br&amp;gt;&lt;br /&gt;
- using the X_Threads and SE_Threads variables you can think about setting different Hybrid schemes in between the screening and the self-energy runlevel.&lt;br /&gt;
- memory better scales if you parallelize on bands (c v b) &amp;lt;br&amp;gt;&lt;br /&gt;
- parallelization on k-points performs similarly to parallelization on bands, but memory requires more memory &amp;lt;br&amp;gt;&lt;br /&gt;
- parallelization on q-points requires much less communication in between the MPI tasks. It maybe useful if you run on more than one node and the inter-node connection is slow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:15%; text-align:left&amp;quot;|Prev: [[Tutorials|Tutorials Home]]&lt;br /&gt;
|style=&amp;quot;width:50%; text-align:center&amp;quot;|Now: [[Tutorials|Tutorials Home]] --&amp;gt; [[GW_parallel_strategies|GW Parallel]]&lt;br /&gt;
|style=&amp;quot;width:35%; text-align:right&amp;quot;|Next: [[Pushing_convergence_in_parallel|GW Convergence]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2986</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2986"/>
		<updated>2020-01-08T16:58:52Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Modular tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of pre-prepared Yambo databases or DFT input files. After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz]&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. Each tutorial requires download of a specific core database, and typically they cover a specific physical system (like bulk GaSb or a hydrogen chain). Ground state input files and pseudopotentials are provided. Output files are also provided for reference.&lt;br /&gt;
&lt;br /&gt;
These tutorials can be accessed directly from this page of from the side bar. They include different kind of subjects:&lt;br /&gt;
&lt;br /&gt;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Electron_Phonon|Electron-Phonon]]&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- For each TUTORIAL (Solid_LiF, Solid_Al, ...) , therefore, you can download the ground state files (zip archive named TUTORIAL_ground_state.zip) and generate the Yambo databases from your own by running abinit/PWscf and a2y/p2y. In this case the Yambo input and reference files are contained in the zip file (TUTORIAL_reference_files.zip). Alternatively, if (and only if) you have compiled yambo with the NetCDF support you can directly download the zip files containing the Yambo core databases (TUTORIAL_NETCDF_databases_and_reference_files.zip). These are generated using the NetCDF interface in order to be readable in any platform.&lt;br /&gt;
After you have downloaded the tutorial zip files and unziped them you should have now a tutorial tree:&lt;br /&gt;
localhost:&amp;gt; ls &lt;br /&gt;
YAMBO_TUTORIALS/&lt;br /&gt;
localhost:&amp;gt; ls  YAMBO_TUTORIALS/&lt;br /&gt;
COPYING  Fantastic_Dimensions/  Hydrogen_Chain/  README  Solid_LiF/ Solid_Al/ SiH4/ ...&lt;br /&gt;
In each folder you will find an Abinit or Pwscf subfolder in case you have downloaded the ground state zip files and the YAMBO subfolder. The tutorials start by entering the YAMBO subfolder and followinf the informations provided in the tutorial documentation.  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
Files for both systems must be downloaded, and make sure to extract the tarballs &#039;&#039;&#039;in the same place.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Download:&#039;&#039;&#039;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
[[GW_parallel_strategies_CECAM]]&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2985</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2985"/>
		<updated>2020-01-08T16:56:12Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
&#039;&#039;&#039;14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, spin orbit effect, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to linear response]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
* [[Real time approach to non linear response]]&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2984</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2984"/>
		<updated>2020-01-08T16:45:45Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
&#039;&#039;&#039;14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo&#039;&#039;&#039; Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued)&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, spin orbit effect, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2983</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2983"/>
		<updated>2020-01-08T16:26:57Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo 2h20&#039;&lt;br /&gt;
Speakers:	Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
14:00 - 16:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage) 2h0&#039;&lt;br /&gt;
Speakers:	Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued) 1h30&#039;&lt;br /&gt;
Speakers:	Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach&#039;&#039;&#039; Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:30 - 18:00 Many-body effects in 2D materials: convergences, spin orbit effect, exciton characterizations&#039;&#039;&#039; Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:00 - 15:00 Real time approach and Calculation of linear response functions and optical properties&#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) &#039;&#039;&#039; Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis &#039;&#039;&#039; Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2982</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2982"/>
		<updated>2020-01-08T16:25:14Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;br /&gt;
&lt;br /&gt;
=== Monday 27 Jan HANDS-ON 1 ===&lt;br /&gt;
14:40 - 17:00 From the DFT ground state to the complete setup of a Many Body calculation using Yambo 2h20&#039;&lt;br /&gt;
Speakers:	Davide Sangalli (CNR-ISM, Italy), Pedro Melo (University of Liege, Belgium)&lt;br /&gt;
&lt;br /&gt;
=== Tuesday 28 Jan HANDS-ON 2 ===&lt;br /&gt;
&lt;br /&gt;
14:00 - 16:00 A complete tour through GW simulation in a complex material (from the blackboard to numerical computation: convergence, algorithms, parallel usage) 2h0&#039;&lt;br /&gt;
Speakers:	Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
16:30 - 18:00 A complete tour through GW simulation in a complex material (from the blackboard to the computer settings: convergence, algorithms, parallel usage) (continued) 1h30&#039;&lt;br /&gt;
Speakers:	Daniele Varsano (CNR-NANO, Italy), Andrea Ferretti (CNR-NANO, Italy)&lt;br /&gt;
&lt;br /&gt;
=== Wednesday 29 Jan HANDS-ON 3 ===&lt;br /&gt;
&lt;br /&gt;
14:00 - 16:00 A guided tour through calculations of spectroscopic properties using the BSE approach 2h0&#039;&lt;br /&gt;
Speakers:	Daniele Varsano (CNR-NANO, Italy), Maurizia Palummo (University of Rome Tor Vergata, Italy)&lt;br /&gt;
&lt;br /&gt;
16:30 - 18:00 Many-body effects in 2D materials: convergences, spin orbit effect, exciton characterizations 1h30&#039;&lt;br /&gt;
Speakers:	Maurizia Palummo (University of Rome Tor Vergata, Italy), Attaccalite Claudio (CNRS, CINAM, Aix-Marseille Univ., France)&lt;br /&gt;
&lt;br /&gt;
=== Thursday 30 Jan HANDS-ON 4 ===&lt;br /&gt;
&lt;br /&gt;
14:00 - 15:00 Real time approach and Calculation of linear response functions and optical properties 1h0&#039;&lt;br /&gt;
Speakers:	Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
15:30 - 18:00 Real time approach and Calculation of non linear properties (second harmonic generation) 2h30&#039;&lt;br /&gt;
Speakers:	Claudio Attaccalite (CNRS, CINAM, Aix-Marseille Univ., France), Davide Sangalli (CNR-ISM, Italy)&lt;br /&gt;
&lt;br /&gt;
=== Friday 31 Jan HANDS-ON 5 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;09:00 - 10:30 Python scripting tools for accelerated GW convergence (Hands-on) &lt;br /&gt;
Speakers:	Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:30 - 11:30 Python scripting tools for BSE convergence and analysis (Hands-on)&lt;br /&gt;
Speakers:	Fulvio Paleari (CNR-ISM, Italy), Alejandro Molina-Sanchez (IINL, Portugal)&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2981</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2981"/>
		<updated>2020-01-08T13:12:31Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of pre-prepared Yambo databases or DFT input files. After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz]&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. Each tutorial requires download of a specific core database, and typically they cover a specific physical system (like bulk GaSb or a hydrogen chain). Ground state input files and pseudopotentials are provided. Output files are also provided for reference.&lt;br /&gt;
&lt;br /&gt;
These tutorials can be accessed directly from this page of from the side bar. They include different kind of subjects:&lt;br /&gt;
&lt;br /&gt;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Electron_Phonon|Electron-Phonon]]&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- For each TUTORIAL (Solid_LiF, Solid_Al, ...) , therefore, you can download the ground state files (zip archive named TUTORIAL_ground_state.zip) and generate the Yambo databases from your own by running abinit/PWscf and a2y/p2y. In this case the Yambo input and reference files are contained in the zip file (TUTORIAL_reference_files.zip). Alternatively, if (and only if) you have compiled yambo with the NetCDF support you can directly download the zip files containing the Yambo core databases (TUTORIAL_NETCDF_databases_and_reference_files.zip). These are generated using the NetCDF interface in order to be readable in any platform.&lt;br /&gt;
After you have downloaded the tutorial zip files and unziped them you should have now a tutorial tree:&lt;br /&gt;
localhost:&amp;gt; ls &lt;br /&gt;
YAMBO_TUTORIALS/&lt;br /&gt;
localhost:&amp;gt; ls  YAMBO_TUTORIALS/&lt;br /&gt;
COPYING  Fantastic_Dimensions/  Hydrogen_Chain/  README  Solid_LiF/ Solid_Al/ SiH4/ ...&lt;br /&gt;
In each folder you will find an Abinit or Pwscf subfolder in case you have downloaded the ground state zip files and the YAMBO subfolder. The tutorials start by entering the YAMBO subfolder and followinf the informations provided in the tutorial documentation.  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
Files for both systems must be downloaded, and make sure to extract the tarballs &#039;&#039;&#039;in the same place.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Download:&#039;&#039;&#039;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2980</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2980"/>
		<updated>2020-01-08T13:10:59Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of pre-prepared Yambo databases or DFT input files. After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz]&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. Each tutorial requires download of a specific core database, and typically they cover a specific physical system (like bulk GaSb or a hydrogen chain). Ground state input files and pseudopotentials are provided. Output files are also provided for reference.&lt;br /&gt;
&lt;br /&gt;
These tutorials can be accessed directly from this page of from the side bar. They include different kind of subjects:&lt;br /&gt;
&lt;br /&gt;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Electron_Phonon|Electron-Phonon]]&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- For each TUTORIAL (Solid_LiF, Solid_Al, ...) , therefore, you can download the ground state files (zip archive named TUTORIAL_ground_state.zip) and generate the Yambo databases from your own by running abinit/PWscf and a2y/p2y. In this case the Yambo input and reference files are contained in the zip file (TUTORIAL_reference_files.zip). Alternatively, if (and only if) you have compiled yambo with the NetCDF support you can directly download the zip files containing the Yambo core databases (TUTORIAL_NETCDF_databases_and_reference_files.zip). These are generated using the NetCDF interface in order to be readable in any platform.&lt;br /&gt;
After you have downloaded the tutorial zip files and unziped them you should have now a tutorial tree:&lt;br /&gt;
localhost:&amp;gt; ls &lt;br /&gt;
YAMBO_TUTORIALS/&lt;br /&gt;
localhost:&amp;gt; ls  YAMBO_TUTORIALS/&lt;br /&gt;
COPYING  Fantastic_Dimensions/  Hydrogen_Chain/  README  Solid_LiF/ Solid_Al/ SiH4/ ...&lt;br /&gt;
In each folder you will find an Abinit or Pwscf subfolder in case you have downloaded the ground state zip files and the YAMBO subfolder. The tutorials start by entering the YAMBO subfolder and followinf the informations provided in the tutorial documentation.  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
Files for both systems must be downloaded, and make sure to extract the tarballs &#039;&#039;&#039;in the same place.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Download:&#039;&#039;&#039;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2979</id>
		<title>ICTP2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=ICTP2020&amp;diff=2979"/>
		<updated>2020-01-08T13:10:38Z</updated>

		<summary type="html">&lt;p&gt;Conor: Created page with &amp;quot;Plan for the ICTP 2020 school tutorials&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Plan for the ICTP 2020 school tutorials&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2978</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Tutorials&amp;diff=2978"/>
		<updated>2020-01-08T13:10:14Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;ICTP students should start [[ICTP2020|HERE]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you are starting out with Yambo, or even an experienced user, we recommend that you complete the following tutorials before trying to use Yambo for your system.&lt;br /&gt;
&lt;br /&gt;
The tutorials are meant to give some introductory background to the key concepts behind Yambo. Practical topics such as convergence are also discussed. &lt;br /&gt;
Nonetheless, users are invited to first read and study the [[lectures|background material]] in order to get familiar with the fundamental physical quantities.&lt;br /&gt;
&lt;br /&gt;
Two kinds of tutorials are provided: &#039;&#039;&#039;stand-alone&#039;&#039;&#039; and &#039;&#039;&#039;modular&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tutorial files ==&lt;br /&gt;
All tutorials require &#039;&#039;&#039;download&#039;&#039;&#039; of pre-prepared Yambo databases or DFT input files. After downloading the tar.gz files just unpack them in &#039;&#039;&#039;the same folder&#039;&#039;&#039;:&lt;br /&gt;
 $ tar -xcvf hBN-2D.tar&lt;br /&gt;
 $ tar -xcvf hBN.tar&lt;br /&gt;
 $ ls&lt;br /&gt;
   YAMBO_TUTORIALS&lt;br /&gt;
 $ ls YAMBO_TUTORIALS&lt;br /&gt;
   hBN-2D hBN&lt;br /&gt;
&lt;br /&gt;
====Files needed for modular tutorials====&lt;br /&gt;
All of the following should be downloaded prior to following the modular tutorials:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Files needed for stand-alone tutorials====&lt;br /&gt;
At the start of each tutorial you will be told which specific file needs to be downloaded:&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Silicon.tar.gz Silicon.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/LiF.tar.gz LiF.tar.gz]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_surface.tar.gz Si_surface.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Si_wire.tar.gz Si_wire.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/H2.tar.gz H2.tar.gz]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Aluminum.tar.gz Aluminum.tar.gz]&lt;br /&gt;
&amp;lt;!--[http://www.yambo-code.org/educational/tutorials/files/GaSb.tar.gz GaSb.tar.gz]--&amp;gt;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/Hydrogen_Chain.tar.gz Hydrogen_Chain.tar.gz]&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Stand-alone overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Stand-alone tutorials ==&lt;br /&gt;
&lt;br /&gt;
These tutorials are self-contained and cover a variety of mixed topics, both physical and methodological. They are designed to be followed from start to finish in one page and do not require previous knowledge of yambo. Each tutorial requires download of a specific core database, and typically they cover a specific physical system (like bulk GaSb or a hydrogen chain). Ground state input files and pseudopotentials are provided. Output files are also provided for reference.&lt;br /&gt;
&lt;br /&gt;
These tutorials can be accessed directly from this page of from the side bar. They include different kind of subjects:&lt;br /&gt;
&lt;br /&gt;
=== Basic ===&lt;br /&gt;
* [[LiF|Linear Response in 3D. Excitons at work]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Si_Surface|Linear Response in 2D]]&lt;br /&gt;
* [[Si_wire|Linear Response in 1D]]&lt;br /&gt;
* [[H2|Linear Response in 0D]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
* [[Silicon|GW convergence]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced ===&lt;br /&gt;
* [[Hydrogen chain|TDDFT Failure and long range correlations]]&lt;br /&gt;
* [[Real_Axis_and_Lifetimes|Real Axis and Lifetimes]]&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* [[Electron_Phonon|Electron-Phonon]]&lt;br /&gt;
* [[SOC|Spin-Orbit Coupling MBPT]]&lt;br /&gt;
* [[Kerr|Kerr]]&lt;br /&gt;
* [[Real_Time|Real-Time]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- For each TUTORIAL (Solid_LiF, Solid_Al, ...) , therefore, you can download the ground state files (zip archive named TUTORIAL_ground_state.zip) and generate the Yambo databases from your own by running abinit/PWscf and a2y/p2y. In this case the Yambo input and reference files are contained in the zip file (TUTORIAL_reference_files.zip). Alternatively, if (and only if) you have compiled yambo with the NetCDF support you can directly download the zip files containing the Yambo core databases (TUTORIAL_NETCDF_databases_and_reference_files.zip). These are generated using the NetCDF interface in order to be readable in any platform.&lt;br /&gt;
After you have downloaded the tutorial zip files and unziped them you should have now a tutorial tree:&lt;br /&gt;
localhost:&amp;gt; ls &lt;br /&gt;
YAMBO_TUTORIALS/&lt;br /&gt;
localhost:&amp;gt; ls  YAMBO_TUTORIALS/&lt;br /&gt;
COPYING  Fantastic_Dimensions/  Hydrogen_Chain/  README  Solid_LiF/ Solid_Al/ SiH4/ ...&lt;br /&gt;
In each folder you will find an Abinit or Pwscf subfolder in case you have downloaded the ground state zip files and the YAMBO subfolder. The tutorials start by entering the YAMBO subfolder and followinf the informations provided in the tutorial documentation.  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span id=&amp;quot;Modular overview&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Modular tutorials ==&lt;br /&gt;
These tutorials are designed to provide a deeper understanding of specific yambo tasks and runlevels. They are designed to avoid repetition of common procedures and physical concepts. As such, they make use of the same physical systems: bulk hexagonal boron nitride &#039;&#039;hBN&#039;&#039; and a hBN sheet &#039;&#039;hBN-2D&#039;&#039;.&lt;br /&gt;
Files for both systems must be downloaded, and make sure to extract the tarballs &#039;&#039;&#039;in the same place.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Download:&#039;&#039;&#039;&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN.tar.gz hBN.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D.tar.gz hBN-2D.tar.gz]&lt;br /&gt;
[http://www.yambo-code.org/educational/tutorials/files/hBN-2D-para.tar.gz hBN-2D-para.tar.gz]&lt;br /&gt;
&lt;br /&gt;
====Introduction====&lt;br /&gt;
* [[First steps: a walk through from DFT to optical properties]]&lt;br /&gt;
====Quasiparticles in the GW approximation====&lt;br /&gt;
* [[How to obtain the quasi-particle band structure of a bulk material: h-BN]]&lt;br /&gt;
====Using Yambo in Parallel====&lt;br /&gt;
This modules contains very general discussions of the parallel environment of Yambo. Still the actual run of the code is specific to the CECAM cluster. If you want to run these modules just replace the parallel queue instructions with simple MPI commands.&lt;br /&gt;
&lt;br /&gt;
* [[GW_parallel_strategies|Parallel GW (CECAM specific)]]: strategies for running Yambo in parallel&lt;br /&gt;
* [[Pushing_convergence_in_parallel|GW convergence (CECAM specific)]]: use Yambo in parallel to converge a GW calculation for a layer of hBN (hBN-2D)&lt;br /&gt;
&lt;br /&gt;
====Excitons and the Bethe-Salpeter Equation====&lt;br /&gt;
* [[How to obtain an optical spectrum|Calculating optical spectra including excitonic effects: a step-by-step guide]]&lt;br /&gt;
* [[How to choose the input parameters|Obtaining a converged optical spectrum]] &lt;br /&gt;
* [[How to treat low dimensional systems|Many-body effects in low-dimensional systems: numerical issues and remedies]] &lt;br /&gt;
* [[How to analyse excitons|Analysis of excitonic spectra in a 2D material]]&lt;br /&gt;
&amp;lt;!--* [[Two particle excitations]] (try to bypass this page) : Learn how to set up and run calculations to obtain and analyze an optical absorption spectrum of bulk and low dimension materials by using the Bethe-Salpeter equation--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Yambo-python driver====&lt;br /&gt;
* [[First steps in Yambopy]]&lt;br /&gt;
* [[GW tutorial. Convergence and approximations (BN)]]&lt;br /&gt;
* [[Bethe-Salpeter equation tutorial. Optical absorption (BN)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Real-time simulations====&lt;br /&gt;
* [[Breaking of symmetries]]&lt;br /&gt;
* [[Independent-Particle Approximation Dynamics. Delta Pulse]]&lt;br /&gt;
* [[Post-processing. Optical Response]]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- [[Instructions for CECAM students]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
Alternatively, users can learn more about a specific runlevel or task by looking at the individual &#039;&#039;&#039;[[Modules|documentation modules]]&#039;&#039;&#039;. These provide a focus on the input parameters, run time behaviour, and underlying physics. Although they can be followed separately, non-experts are urged to follow them as part of the more structured tutorials given above.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Configure-4.4.0&amp;diff=2977</id>
		<title>Configure-4.4.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Configure-4.4.0&amp;diff=2977"/>
		<updated>2019-12-12T18:17:52Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Someday there will be some documentation for the following....&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;General flags&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
  --enable-keep-objects   Objects are not removed but saved in appropriate&lt;br /&gt;
                          directories. Default is yes.&lt;br /&gt;
  --enable-keep-src       Keep preprocessed.f90 file. Default is no.&lt;br /&gt;
  --enable-keep-extlibs   Keep downloaded packages as tar.gz . Default is yes.&lt;br /&gt;
  --enable-dp             Double-precision build. Default is no.&lt;br /&gt;
  --enable-time-profile   Extended timing profile of specific sections.&lt;br /&gt;
                          Default is yes.&lt;br /&gt;
  --enable-uspp           Enable Ultrasoft PP support&lt;br /&gt;
  --enable-memory-profile Extended Memory profile of specific sections&lt;br /&gt;
  --enable-msgs-comps     Verbose compilation log&lt;br /&gt;
  --enable-options-check  Enable the command line options check in driver.c.&lt;br /&gt;
                          Default is yes.&lt;br /&gt;
  --enable-debug-flags    Debug flags are set for compilation. Default is no.&lt;br /&gt;
&lt;br /&gt;
Parallelization&lt;br /&gt;
  --enable-open-mp        Enable OpenMP support&lt;br /&gt;
  --enable-mpi            Enable mpi parallelization . Default is yes.&lt;br /&gt;
Add...&lt;br /&gt;
&lt;br /&gt;
Linear algebra&lt;br /&gt;
  --enable-int-linalg     Force internal linear algebra. Default is no&lt;br /&gt;
  --enable-openmp-int-linalg&lt;br /&gt;
                          Use openmp internal linear algebra for few selected&lt;br /&gt;
                          operations. Default is no&lt;br /&gt;
  --enable-slepc-linalg   Enable suport for the diagonalization of BSE using&lt;br /&gt;
                          SLEPC. Default is no&lt;br /&gt;
  --enable-par-linalg     Use parallel linear algebra. Default is no&lt;br /&gt;
&lt;br /&gt;
FFT&lt;br /&gt;
  --enable-internal-fftqe Use internal QE FFT library&lt;br /&gt;
  --enable-internal-fftsg Use internal Goedecker FFT library&lt;br /&gt;
  --enable-3d-fft         Use 3D FFT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
netCDF&lt;br /&gt;
  --enable-netcdf-classic Switch to OLD NetCDF classic. Default is no.&lt;br /&gt;
  --enable-netcdf-hdf5    Activate the HDF5 support. Default is no.&lt;br /&gt;
&lt;br /&gt;
  --enable-hdf5-compression&lt;br /&gt;
                          Activate the HDF5 data compression. Default is no.&lt;br /&gt;
  --enable-hdf5-par-io    Activate the HDF5 parallel io. Default is no.&lt;br /&gt;
  --enable-hdf5-p2y-support&lt;br /&gt;
                          Activate HDF5 support in p2y. Default is no unless&lt;br /&gt;
                          parallel HDF5 libs are linked.&lt;br /&gt;
&lt;br /&gt;
Other I/O libraries&lt;br /&gt;
  --enable-iotk           Activate the IOTK support&lt;br /&gt;
  --enable-etsf-io        Activate the ETSF_IO support&lt;br /&gt;
&lt;br /&gt;
Optional Packages:&lt;br /&gt;
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]&lt;br /&gt;
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)&lt;br /&gt;
  --with-extlibs-path=&amp;lt;path&amp;gt;&lt;br /&gt;
                          Path to the external libs&lt;br /&gt;
  --with-editor=&amp;lt;exe&amp;gt;           User-defined editor (none for no editor)&lt;br /&gt;
  --with-f90ext=&amp;lt;flags&amp;gt;         Use .&amp;lt;flags&amp;gt; Fortran 90 extension&lt;br /&gt;
  --with-mpi-libs=&amp;lt;libs&amp;gt;        Use MPI libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-mpi-path=&amp;lt;path&amp;gt;        Path to the MPI install directory&lt;br /&gt;
  --with-mpi-libdir=&amp;lt;path&amp;gt;      Path to the MPI lib directory&lt;br /&gt;
  --with-mpi-includedir=&amp;lt;path&amp;gt;  Path to the MPI include directory&lt;br /&gt;
  --with-blas-libs=&amp;lt;libs&amp;gt;       Use BLAS libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-lapack-libs=&amp;lt;libs&amp;gt;     Use LAPACK libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-fft-libs=&amp;lt;libs&amp;gt;        Link to FFT libraries&lt;br /&gt;
  --with-fft-path=&amp;lt;path&amp;gt;        Path to the FFT install directory&lt;br /&gt;
  --with-fft-libdir=&amp;lt;path&amp;gt;      Path to the FFT lib directory&lt;br /&gt;
  --with-fft-includedir=&amp;lt;path&amp;gt;  Path to the FFT include directory&lt;br /&gt;
  --with-fftsg-fac=&amp;lt;val&amp;gt;        Change default Goedecker FFT cache factor&lt;br /&gt;
&lt;br /&gt;
  --with-slepc-libs=&amp;lt;libs&amp;gt;      Use Slepc libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-slepc-incs=&amp;lt;incs&amp;gt;      Use Slepc includes &amp;lt;incs&amp;gt;&lt;br /&gt;
  --with-slepc-path=&amp;lt;path&amp;gt;      Path to the Slepc install directory&lt;br /&gt;
  --with-slepc-libdir=&amp;lt;path&amp;gt;    Path to the Slepc lib directory&lt;br /&gt;
  --with-slepc-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the Slepc include directory&lt;br /&gt;
  --with-petsc-libs=&amp;lt;libs&amp;gt;      Use Petsc libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-petsc-incs=&amp;lt;incs&amp;gt;      Use Petsc includes &amp;lt;incs&amp;gt;&lt;br /&gt;
  --with-petsc-path=&amp;lt;path&amp;gt;      Path to the Petsc install directory&lt;br /&gt;
  --with-petsc-libdir=&amp;lt;path&amp;gt;    Path to the Petsc lib directory&lt;br /&gt;
  --with-petsc-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the Petsc include directory&lt;br /&gt;
  --with-blacs-libs=&amp;lt;libs&amp;gt;      Use BLACS libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-scalapack-libs=&amp;lt;libs&amp;gt;  Use SCALAPACK libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-netcdf-libs=&amp;lt;libs&amp;gt;     Use NetCDF libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-netcdf-path=&amp;lt;path&amp;gt;     Path to the NetCDF install directory&lt;br /&gt;
  --with-netcdf-libdir=&amp;lt;path&amp;gt;   Path to the NetCDF lib directory&lt;br /&gt;
  --with-netcdf-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the NetCDF include directory&lt;br /&gt;
  --with-netcdff-libs=&amp;lt;libs&amp;gt;    Use NetCDFF libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-netcdff-path=&amp;lt;path&amp;gt;    Path to the NetCDFF install directory&lt;br /&gt;
  --with-netcdff-libdir=&amp;lt;path&amp;gt;  Path to the NetCDFF lib directory&lt;br /&gt;
  --with-netcdff-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the NetCDFF include directory&lt;br /&gt;
&lt;br /&gt;
  --with-hdf5-libs=&amp;lt;libs&amp;gt;       Use HDF5 libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-hdf5-path=&amp;lt;path&amp;gt;       Path to the HDF5 install directory&lt;br /&gt;
  --with-hdf5-libdir=&amp;lt;path&amp;gt;     Path to the HDF5 lib directory&lt;br /&gt;
  --with-hdf5-includedir=&amp;lt;path&amp;gt; Path to the HDF5 include directory&lt;br /&gt;
  --with-iotk-libs=&amp;lt;libs&amp;gt;       Use the IOTK library in &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-iotk-path=&amp;lt;path&amp;gt;       Path to the IOTK install directory&lt;br /&gt;
  --with-iotk-libdir=&amp;lt;path&amp;gt;     Path to the IOTK lib directory&lt;br /&gt;
  --with-iotk-includedir=&amp;lt;path&amp;gt; Path to the IOTK include directory&lt;br /&gt;
  --with-etsf-io-libs=&amp;lt;libs&amp;gt;    Use the ETSF_IO libraries in &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-etsf-io-path=&amp;lt;path&amp;gt;    Path to the ETSF_IO install directory&lt;br /&gt;
  --with-etsf-io-libdir=&amp;lt;path&amp;gt;  Path to the ETSF_IO lib directory&lt;br /&gt;
  --with-etsf-io-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the ETSF_IO include directory&lt;br /&gt;
  --with-libxc-libs=&amp;lt;libs&amp;gt;      Use libxc libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-libxc-path=&amp;lt;path&amp;gt;      Path to libxc install directory&lt;br /&gt;
  --with-libxc-libdir=&amp;lt;path&amp;gt;    Path to the libxc lib directory&lt;br /&gt;
  --with-libxc-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the libxc include directory&lt;br /&gt;
&lt;br /&gt;
Some influential environment variables:&lt;br /&gt;
  CC          C compiler command&lt;br /&gt;
  CFLAGS      C compiler flags&lt;br /&gt;
  LDFLAGS     linker flags, e.g. -L&amp;lt;lib dir&amp;gt; if you have libraries in a&lt;br /&gt;
              nonstandard directory &amp;lt;lib dir&amp;gt;&lt;br /&gt;
  LIBS        libraries to pass to the linker, e.g. -l&amp;lt;library&amp;gt;&lt;br /&gt;
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I&amp;lt;include dir&amp;gt; if&lt;br /&gt;
              you have headers in a nonstandard directory &amp;lt;include dir&amp;gt;&lt;br /&gt;
  CPP         C preprocessor&lt;br /&gt;
  FC          Fortran compiler command&lt;br /&gt;
  FCFLAGS     Fortran compiler flags&lt;br /&gt;
  UFLAGS      Unoptimized Fortran flags&lt;br /&gt;
  FPP         Fortran preprocessor&lt;br /&gt;
  F77         Fortran 77 compiler command&lt;br /&gt;
  FFLAGS      Fortran 77 compiler flags&lt;br /&gt;
  MPIFC       Parallel Fortran compiler command&lt;br /&gt;
  MPIF77      Parallel Fortran 77 compiler command&lt;br /&gt;
  MPICC       Parallel C compiler command&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Configure-4.4.0&amp;diff=2976</id>
		<title>Configure-4.4.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Configure-4.4.0&amp;diff=2976"/>
		<updated>2019-12-12T18:14:18Z</updated>

		<summary type="html">&lt;p&gt;Conor: Created page with &amp;quot;Someday there will be some documentation for the following....    --enable-keep-objects   Objects are not removed but saved in appropriate                           directorie...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Someday there will be some documentation for the following....&lt;br /&gt;
&lt;br /&gt;
  --enable-keep-objects   Objects are not removed but saved in appropriate&lt;br /&gt;
                          directories. Default is yes.&lt;br /&gt;
  --enable-keep-src       Keep preprocessed.f90 file. Default is no.&lt;br /&gt;
  --enable-keep-extlibs   Keep downloaded packages as tar.gz . Default is yes.&lt;br /&gt;
  --enable-dp             Double-precision build. Default is no.&lt;br /&gt;
  --enable-time-profile   Extended timing profile of specific sections.&lt;br /&gt;
                          Default is yes.&lt;br /&gt;
  --enable-uspp           Enable Ultrasoft PP support&lt;br /&gt;
  --enable-memory-profile Extended Memory profile of specific sections&lt;br /&gt;
  --enable-msgs-comps     Verbose compilation log&lt;br /&gt;
  --enable-options-check  Enable the command line options check in driver.c.&lt;br /&gt;
                          Default is yes.&lt;br /&gt;
  --enable-debug-flags    Debug flags are set for compilation. Default is no.&lt;br /&gt;
  --enable-open-mp        Enable OpenMP support&lt;br /&gt;
  --enable-mpi            Enable mpi parallelization . Default is yes.&lt;br /&gt;
  --enable-int-linalg     Force internal linear algebra. Default is no&lt;br /&gt;
  --enable-openmp-int-linalg&lt;br /&gt;
                          Use openmp internal linear algebra for few selected&lt;br /&gt;
                          operations. Default is no&lt;br /&gt;
  --enable-internal-fftqe Use internal QE FFT library&lt;br /&gt;
  --enable-internal-fftsg Use internal Goedecker FFT library&lt;br /&gt;
  --enable-3d-fft         Use 3D FFT&lt;br /&gt;
  --enable-slepc-linalg   Enable suport for the diagonalization of BSE using&lt;br /&gt;
                          SLEPC. Default is no&lt;br /&gt;
  --enable-par-linalg     Use parallel linear algebra. Default is no&lt;br /&gt;
  --enable-netcdf-classic Switch to OLD NetCDF classic. Default is no.&lt;br /&gt;
  --enable-netcdf-hdf5    Activate the HDF5 support. Default is no.&lt;br /&gt;
&lt;br /&gt;
  --enable-hdf5-compression&lt;br /&gt;
                          Activate the HDF5 data compression. Default is no.&lt;br /&gt;
  --enable-hdf5-par-io    Activate the HDF5 parallel io. Default is no.&lt;br /&gt;
  --enable-hdf5-p2y-support&lt;br /&gt;
                          Activate HDF5 support in p2y. Default is no unless&lt;br /&gt;
                          parallel HDF5 libs are linked.&lt;br /&gt;
  --enable-iotk           Activate the IOTK support&lt;br /&gt;
  --enable-etsf-io        Activate the ETSF_IO support&lt;br /&gt;
&lt;br /&gt;
Optional Packages:&lt;br /&gt;
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]&lt;br /&gt;
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)&lt;br /&gt;
  --with-extlibs-path=&amp;lt;path&amp;gt;&lt;br /&gt;
                          Path to the external libs&lt;br /&gt;
  --with-editor=&amp;lt;exe&amp;gt;           User-defined editor (none for no editor)&lt;br /&gt;
  --with-f90ext=&amp;lt;flags&amp;gt;         Use .&amp;lt;flags&amp;gt; Fortran 90 extension&lt;br /&gt;
  --with-mpi-libs=&amp;lt;libs&amp;gt;        Use MPI libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-mpi-path=&amp;lt;path&amp;gt;        Path to the MPI install directory&lt;br /&gt;
  --with-mpi-libdir=&amp;lt;path&amp;gt;      Path to the MPI lib directory&lt;br /&gt;
  --with-mpi-includedir=&amp;lt;path&amp;gt;  Path to the MPI include directory&lt;br /&gt;
  --with-blas-libs=&amp;lt;libs&amp;gt;       Use BLAS libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-lapack-libs=&amp;lt;libs&amp;gt;     Use LAPACK libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-fft-libs=&amp;lt;libs&amp;gt;        Link to FFT libraries&lt;br /&gt;
  --with-fft-path=&amp;lt;path&amp;gt;        Path to the FFT install directory&lt;br /&gt;
  --with-fft-libdir=&amp;lt;path&amp;gt;      Path to the FFT lib directory&lt;br /&gt;
  --with-fft-includedir=&amp;lt;path&amp;gt;  Path to the FFT include directory&lt;br /&gt;
  --with-fftsg-fac=&amp;lt;val&amp;gt;        Change default Goedecker FFT cache factor&lt;br /&gt;
&lt;br /&gt;
  --with-slepc-libs=&amp;lt;libs&amp;gt;      Use Slepc libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-slepc-incs=&amp;lt;incs&amp;gt;      Use Slepc includes &amp;lt;incs&amp;gt;&lt;br /&gt;
  --with-slepc-path=&amp;lt;path&amp;gt;      Path to the Slepc install directory&lt;br /&gt;
  --with-slepc-libdir=&amp;lt;path&amp;gt;    Path to the Slepc lib directory&lt;br /&gt;
  --with-slepc-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the Slepc include directory&lt;br /&gt;
  --with-petsc-libs=&amp;lt;libs&amp;gt;      Use Petsc libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-petsc-incs=&amp;lt;incs&amp;gt;      Use Petsc includes &amp;lt;incs&amp;gt;&lt;br /&gt;
  --with-petsc-path=&amp;lt;path&amp;gt;      Path to the Petsc install directory&lt;br /&gt;
  --with-petsc-libdir=&amp;lt;path&amp;gt;    Path to the Petsc lib directory&lt;br /&gt;
  --with-petsc-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the Petsc include directory&lt;br /&gt;
  --with-blacs-libs=&amp;lt;libs&amp;gt;      Use BLACS libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-scalapack-libs=&amp;lt;libs&amp;gt;  Use SCALAPACK libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-netcdf-libs=&amp;lt;libs&amp;gt;     Use NetCDF libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-netcdf-path=&amp;lt;path&amp;gt;     Path to the NetCDF install directory&lt;br /&gt;
  --with-netcdf-libdir=&amp;lt;path&amp;gt;   Path to the NetCDF lib directory&lt;br /&gt;
  --with-netcdf-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the NetCDF include directory&lt;br /&gt;
  --with-netcdff-libs=&amp;lt;libs&amp;gt;    Use NetCDFF libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-netcdff-path=&amp;lt;path&amp;gt;    Path to the NetCDFF install directory&lt;br /&gt;
  --with-netcdff-libdir=&amp;lt;path&amp;gt;  Path to the NetCDFF lib directory&lt;br /&gt;
  --with-netcdff-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the NetCDFF include directory&lt;br /&gt;
&lt;br /&gt;
  --with-hdf5-libs=&amp;lt;libs&amp;gt;       Use HDF5 libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-hdf5-path=&amp;lt;path&amp;gt;       Path to the HDF5 install directory&lt;br /&gt;
  --with-hdf5-libdir=&amp;lt;path&amp;gt;     Path to the HDF5 lib directory&lt;br /&gt;
  --with-hdf5-includedir=&amp;lt;path&amp;gt; Path to the HDF5 include directory&lt;br /&gt;
  --with-iotk-libs=&amp;lt;libs&amp;gt;       Use the IOTK library in &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-iotk-path=&amp;lt;path&amp;gt;       Path to the IOTK install directory&lt;br /&gt;
  --with-iotk-libdir=&amp;lt;path&amp;gt;     Path to the IOTK lib directory&lt;br /&gt;
  --with-iotk-includedir=&amp;lt;path&amp;gt; Path to the IOTK include directory&lt;br /&gt;
  --with-etsf-io-libs=&amp;lt;libs&amp;gt;    Use the ETSF_IO libraries in &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-etsf-io-path=&amp;lt;path&amp;gt;    Path to the ETSF_IO install directory&lt;br /&gt;
  --with-etsf-io-libdir=&amp;lt;path&amp;gt;  Path to the ETSF_IO lib directory&lt;br /&gt;
  --with-etsf-io-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the ETSF_IO include directory&lt;br /&gt;
  --with-libxc-libs=&amp;lt;libs&amp;gt;      Use libxc libraries &amp;lt;libs&amp;gt;&lt;br /&gt;
  --with-libxc-path=&amp;lt;path&amp;gt;      Path to libxc install directory&lt;br /&gt;
  --with-libxc-libdir=&amp;lt;path&amp;gt;    Path to the libxc lib directory&lt;br /&gt;
  --with-libxc-includedir=&amp;lt;path&amp;gt;&lt;br /&gt;
                                Path to the libxc include directory&lt;br /&gt;
&lt;br /&gt;
Some influential environment variables:&lt;br /&gt;
  CC          C compiler command&lt;br /&gt;
  CFLAGS      C compiler flags&lt;br /&gt;
  LDFLAGS     linker flags, e.g. -L&amp;lt;lib dir&amp;gt; if you have libraries in a&lt;br /&gt;
              nonstandard directory &amp;lt;lib dir&amp;gt;&lt;br /&gt;
  LIBS        libraries to pass to the linker, e.g. -l&amp;lt;library&amp;gt;&lt;br /&gt;
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I&amp;lt;include dir&amp;gt; if&lt;br /&gt;
              you have headers in a nonstandard directory &amp;lt;include dir&amp;gt;&lt;br /&gt;
  CPP         C preprocessor&lt;br /&gt;
  FC          Fortran compiler command&lt;br /&gt;
  FCFLAGS     Fortran compiler flags&lt;br /&gt;
  UFLAGS      Unoptimized Fortran flags&lt;br /&gt;
  FPP         Fortran preprocessor&lt;br /&gt;
  F77         Fortran 77 compiler command&lt;br /&gt;
  FFLAGS      Fortran 77 compiler flags&lt;br /&gt;
  MPIFC       Parallel Fortran compiler command&lt;br /&gt;
  MPIF77      Parallel Fortran 77 compiler command&lt;br /&gt;
  MPICC       Parallel C compiler command&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Installation&amp;diff=2975</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Installation&amp;diff=2975"/>
		<updated>2019-12-12T18:10:56Z</updated>

		<summary type="html">&lt;p&gt;Conor: /* Full install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preinstall ===&lt;br /&gt;
&lt;br /&gt;
Download the yambo source as explained in [[Getting Yambo]]. &lt;br /&gt;
&lt;br /&gt;
Yambo can make good use of external libraries like FFTW, ESSL, BLAS, netCDF, and so on. It is worth identifying if they are already installed on your system, especially for HPCs.&lt;br /&gt;
&lt;br /&gt;
=== Quick install ===&lt;br /&gt;
&lt;br /&gt;
If you are lucky, the configure script will successfully find the best compiler options.&lt;br /&gt;
&lt;br /&gt;
 % tar -xvzf yambo-latest.tar.gz&lt;br /&gt;
 % cd yambo-X.X.X&lt;br /&gt;
 % ./configure&lt;br /&gt;
 % make yambo ypp interfaces&lt;br /&gt;
&lt;br /&gt;
Executables are found in the &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; folder. To check that it works:&lt;br /&gt;
&lt;br /&gt;
 % ./bin/yambo&lt;br /&gt;
 &lt;br /&gt;
 Cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)&lt;br /&gt;
&lt;br /&gt;
=== Full install ===&lt;br /&gt;
&lt;br /&gt;
In general, however, some fine-tuning will be necessary to link the requested libraries.&lt;br /&gt;
&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
for a large set of options. &lt;br /&gt;
&lt;br /&gt;
[[configure-4.4.0|Configure options for yambo 4.4.0]] &lt;br /&gt;
&lt;br /&gt;
Insert details here...&lt;br /&gt;
&lt;br /&gt;
After configure, you can also edit the &amp;lt;code&amp;gt;config/setup&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
=== See also ===&lt;br /&gt;
&lt;br /&gt;
* [[Configure options for Yambo v3 and earlier]]&lt;br /&gt;
* [[configure options for Yambo v4]]&lt;br /&gt;
* [[Machine specific configure scripts]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Variables&amp;diff=2956</id>
		<title>Variables</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Variables&amp;diff=2956"/>
		<updated>2019-11-11T13:20:11Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gives a brief explanation of the many input variables used by Yambo. &amp;lt;br&amp;gt;&lt;br /&gt;
Variables apply to the standard &amp;lt;code&amp;gt;yambo&amp;lt;/code&amp;gt; &#039;&#039;&#039;executable&#039;&#039;&#039; unless indicated otherwise. &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Default&#039;&#039;&#039; values are read from the indicated database file unless stated otherwise.&amp;lt;br&amp;gt;&lt;br /&gt;
Required &#039;&#039;&#039;verbosity&#039;&#039;&#039; flags are indicated where appropriate.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Units&#039;&#039;&#039; can have the following values:&lt;br /&gt;
* None = no unit&lt;br /&gt;
* RL = number of G-vectors&lt;br /&gt;
* Energy = Ha, mHa (Hartree atomic units), Ry, mRy (Rydberg atomic units), eV, meV (electron volts), K, THz, GHz&lt;br /&gt;
* Length = Bohr atomic units a.u.&lt;br /&gt;
&amp;lt;!--* Time = ps, fs, as&lt;br /&gt;
* Magnetic field = T&lt;br /&gt;
* Electric field = V/mm&lt;br /&gt;
* Angle = deg, rad --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Formats&#039;&#039;&#039; are described on the [[Format]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DO NOT EDIT THIS PAGE DIRECTLY!!! CHANGES WILL BE LOST!!!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Eventually it will be split into separate pages per runlevel, with the Units/Formats appearing just on the main page.&lt;br /&gt;
Links can be made to runlevel sections with &amp;lt;nowiki&amp;gt;Variables#Initialization&amp;lt;/nowiki&amp;gt; and to single variables with &amp;lt;nowiki&amp;gt;Variables#MaxGvecs&amp;lt;/nowiki&amp;gt;, etc. Use the template &#039;&#039;var3&#039;&#039;. Some characters will mess up the template, such as equal signs - this may explain why some of your text is missing. THIS CAN BE FIXED WITH NAMED OPTIONS --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===All Variables (alphabetical order)===&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#BDmRange|BDmRange]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BEnRange|BEnRange]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BEnSteps|BEnSteps]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BLongDir|BLongDir]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BndsRnXd|BndsRnXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BndsRnXp|BndsRnXp]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BoseCut|BoseCut]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BoseTemp|BoseTemp]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#BS_CPU|BS_CPU]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BS_nCPU_LinAlg_DIAGO|BS_nCPU_LinAlg_DIAGO]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BS_nCPU_LinAlg_INV|BS_nCPU_LinAlg_INV]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BS_ROLEs|BS_ROLEs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#bse|bse]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSEBands|BSEBands]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSEmod|BSEmod]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSENGBlk|BSENGBlk]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#BSENGexx|BSENGexx]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSEPSInvTrs|BSEPSInvTrs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSHayTrs|BSHayTrs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#bsk|bsk]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSKmod|BSKmod]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#bss|bss]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSSInvKdiag|BSSInvKdiag]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSSInvMode|BSSInvMode]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#BSSInvPFratio|BSSInvPFratio]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSSmod|BSSmod]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#BSSPertWidth |BSSPertWidth ]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#CGrdSpXd|CGrdSpXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#chi|chi]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#ChiLinAlgMod|ChiLinAlgMod]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#Chimod|Chimod]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#cohsex|cohsex]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#CUTBox|CUTBox]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#CUTCol_test|CUTCol_test]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#CUTCylLen|CUTCylLen]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#CUTGeo|CUTGeo]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#CUTRadius|CUTRadius]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#CUTwsGvec|CUTwsGvec]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DbGdQsize|DbGdQsize]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DbGdQsize|DbGdQsize]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#DBsFRAGpm|DBsFRAGpm]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DBsIOoff|DBsIOoff]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DIP_Threads|DIP_Threads]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DipApproach|DipApproach]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DipApproach|DipApproach]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DipPDirect|DipPDirect]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DipPDirect|DipPDirect]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DmERefXd|DmERefXd]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#DmRngeXd|DmRngeXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DmRngeXp|DmRngeXp]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DrClassic|DrClassic]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DrudeWBS|DrudeWBS]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DrudeWXd|DrudeWXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#dScStep|dScStep]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#DysSolver|DysSolver]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#EhEngyXd|EhEngyXd]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#ElecTemp|ElecTemp]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#Em1Anys|Em1Anys]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#em1d|em1d]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#em1s|em1s]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#EMStpsXd|EMStpsXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#EnRngeXd|EnRngeXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#EnRngeXp|EnRngeXp]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#ETStpsXd|ETStpsXd]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#ETStpsXp|ETStpsXp]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#EvalCurrent|EvalCurrent]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#ExtendOut |ExtendOut ]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#ExtF_Dir|ExtF_Dir]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#ExtF_kind|ExtF_kind]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#EXXRLvcs|EXXRLvcs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#EXXRLvcs|EXXRLvcs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#FFTGvecs|FFTGvecs]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#FrSndOrd|FrSndOrd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#FxcGRLc|FxcGRLc]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#Gauge|Gauge]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GbndRnge|GbndRnge]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GDamping|GDamping]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GDmRnge|GDmRnge]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GEnRnge|GEnRnge]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GEnSteps|GEnSteps]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#GfnQP_E|GfnQP_E]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GfnQP_N|GfnQP_N]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GfnQP_Wc|GfnQP_Wc]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GfnQP_Wc_dos|GfnQP_Wc_dos]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GfnQP_Wc_E|GfnQP_Wc_E]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GfnQP_Wv|GfnQP_Wv]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GfnQP_Wv_dos|GfnQP_Wv_dos]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GfnQP_Wv_E|GfnQP_Wv_E]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#GfnQP_Z|GfnQP_Z]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GfnQPdb|GfnQPdb]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GrFnTpXd|GrFnTpXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GTermEn|GTermEn]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#GTermKind|GTermKind]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#gw0|gw0]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#HARRLvcs|HARRLvcs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#HF_and_locXC|HF_and_locXC]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#IDEm1Ref|IDEm1Ref]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#IkSigLim|IkSigLim]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#IkXLim|IkXLim]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#K_Threads|K_Threads]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#KfnQP_E|KfnQP_E]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#KfnQP_N|KfnQP_N]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#KfnQP_Wc|KfnQP_Wc]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#KfnQP_Wc_dos|KfnQP_Wc_dos]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#KfnQP_Wc_E|KfnQP_Wc_E]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#KfnQP_Wv|KfnQP_Wv]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#KfnQP_Wv_dos|KfnQP_Wv_dos]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#KfnQP_Wv_E|KfnQP_Wv_E]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#KfnQP_Z|KfnQP_Z]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#KfnQPdb|KfnQPdb]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#life |life ]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#LifeTrCG|LifeTrCG]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#LongDrXd|LongDrXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#LongDrXp|LongDrXp]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#LRC_alpha|LRC_alpha]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#MaxGvecs|MaxGvecs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#MEM_tresh|MEM_tresh]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#MetDamp|MetDamp]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#Nelectro|Nelectro]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NewtDchk|NewtDchk]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#NGsBlkXd|NGsBlkXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NLBands|NLBands]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NLCorrelation |NLCorrelation ]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NLDamping|NLDamping]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NLintegrator|NLintegrator]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NLLrcAlpha|NLLrcAlpha]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NLogCPUs|NLogCPUs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#nloptics|nloptics]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#NLstep|NLstep]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NLtime|NLtime]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NLverbosity|NLverbosity]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NoCondSumRule|NoCondSumRule]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#NonPDirs|NonPDirs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#OccTresh|OccTresh]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#OnMassShell |OnMassShell ]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#optics|optics]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#PAR_def_mode|PAR_def_mode]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#PAR_def_mode|PAR_def_mode]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#PPAPntXp|PPAPntXp]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#Qdirection|Qdirection]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#QPerange|QPerange]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#QPerange|QPerange]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#QpgFull|QpgFull]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#QPkrange|QPkrange]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#QPkrange|QPkrange]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#QpntsRXd|QpntsRXd]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#QptCoord|QptCoord]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#QShiftOrder|QShiftOrder]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#RandGvec|RandGvec]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#RandQpts|RandQpts]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#Reflectivity|Reflectivity]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#rim_cut|rim_cut]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#SE_CPU|SE_CPU]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#SE_ROLEs|SE_ROLEs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#SE_Threads|SE_Threads]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#setup|setup]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#ShiftedPaths|ShiftedPaths]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#ShiftedPaths|ShiftedPaths]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#StdoHash|StdoHash]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#tddft|tddft]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#UseDipoles|UseDipoles]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#UseNLCC|UseNLCC]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#VXCRLvcs|VXCRLvcs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#WehCpl|WehCpl]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#WehDiag|WehDiag]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#WFbuffIO|WFbuffIO]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#WRbsWF|WRbsWF]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#X_all_q_CPU|X_all_q_CPU]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#X_all_q_nCPU_LinAlg_INV|X_all_q_nCPU_LinAlg_INV]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#X_all_q_ROLEs|X_all_q_ROLEs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#X_finite_q_CPU|X_finite_q_CPU]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#X_finite_q_nCPU_LinAlg_INV|X_finite_q_nCPU_LinAlg_INV]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#X_finite_q_ROLEs|X_finite_q_ROLEs]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#X_q_0_CPU|X_q_0_CPU]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#X_q_0_nCPU_LinAlg_INV|X_q_0_nCPU_LinAlg_INV]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#X_q_0_ROLEs|X_q_0_ROLEs]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#X_Threads|X_Threads]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#XfnQP_E|XfnQP_E]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#XfnQP_N|XfnQP_N]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#XfnQP_Wc|XfnQP_Wc]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#XfnQP_Wc_dos|XfnQP_Wc_dos]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#XfnQP_Wc_E|XfnQP_Wc_E]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#XfnQP_Wv|XfnQP_Wv]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#XfnQP_Wv_dos|XfnQP_Wv_dos]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;[[Variables#XfnQP_Wv_E|XfnQP_Wv_E]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#XfnQP_Z|XfnQP_Z]]&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;[[Variables#XfnQPdb|XfnQPdb]]&amp;lt;/code&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Global options===&lt;br /&gt;
&amp;lt;span id=Nelectro&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|Nelectro|None|Real}}{{var-default|From ns.db1}}{{var-verbosity|gen}}&lt;br /&gt;
{{var-short|Number of electrons}}&lt;br /&gt;
{{var-usage|Change to shift the Fermi level by hand.}}&lt;br /&gt;
&amp;lt;span id=ElecTemp&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|ElecTemp|Energy|Real}}{{var-default|0.000}}{{var-verbosity|gen}}&lt;br /&gt;
{{var-short|Electronic Temperature}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BoseTemp&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BoseTemp|Energy|Real}}{{var-default|-1}}{{var-verbosity|gen}}&lt;br /&gt;
{{var-short|Bosonic Temperature}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=OccTresh&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|OccTresh|None|Real}}{{var-default|1.00E-05}}{{var-verbosity|gen}}&lt;br /&gt;
{{var-short|Occupation treshold (metallic bands)}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=StdoHash&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|StdoHash|None|Integer}}{{var-default|40}}{{var-verbosity|io}}&lt;br /&gt;
{{var-short|Number of hashes in live-timing output.}}&lt;br /&gt;
{{var-usage|Might be useful to increase for very long jobs, or if the code is hanging.}}&lt;br /&gt;
&amp;lt;span id=DBsIOoff&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DBsIOoff|None|String}}{{var-default|none}}{{var-verbosity|io}}&lt;br /&gt;
{{var-short|List of databases not written to disk}}&lt;br /&gt;
{{var-usage|Space-separated list of DB with NO I/O. DB is (DIP,X,HF,COLLs,J,GF,CARRIERs,OBS,W,SC,BS,ALL). No ndb.* file is written. }}&lt;br /&gt;
::Example: DBsIOoff= &amp;quot;DIP&amp;quot; means ndb.dip_iR_and_P_fragment_* is not written, but stored in memory if Yambo needs it.&lt;br /&gt;
&amp;lt;span id=DBsFRAGpm&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DBsFRAGpm|None|String}}{{var-default|none}}{{var-verbosity|io}}&lt;br /&gt;
{{var-short|List of databases to be fragmented}}&lt;br /&gt;
{{var-usage|Space-separated list of +DB to FRAG and -DB to NOT FRAG, where DB is (DIP,X,W,HF,COLLS,K,BS,QINDX,RT,ELP. Fragments the database. Smaller files (e.g. ndb.em1s_fragment_*) are created instead of a large one (e.g. ndb.em1s). Faster read/write operations in parallel runs}}&lt;br /&gt;
&amp;lt;span id=WFbuffIO&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|WFbuffIO|None|Flag}}{{var-default|Off}}{{var-verbosity|io}}&lt;br /&gt;
{{var-short|Wave-functions buffered I/O}}&lt;br /&gt;
{{var-usage|Parts of the WFs are stored by the node. Nodes communicate when these elements are needed. Memory heavy.}}&lt;br /&gt;
&amp;lt;span id=MEM_tresh&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|MEM_tresh|Kb|Integer}}{{var-default|10000}}{{var-verbosity|gen}}&lt;br /&gt;
{{var-short|Threshold on traced memory allocations/deallocations}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NLogCPUs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NLogCPUs|None|Integer}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|Live-timing CPU`s (0 for all)}}&lt;br /&gt;
{{var-usage|Number of CPUs that write a LOG file. 0 means all CPUs.}}&lt;br /&gt;
&amp;lt;span id=PAR_def_mode&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|PAR_def_mode|None|String}}{{var-default|balanced}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|Parallelization mode (&amp;quot;balanced&amp;quot;/&amp;quot;memory&amp;quot;/&amp;quot;workload&amp;quot;)}}&lt;br /&gt;
{{var-usage|You can set &amp;quot;memory&amp;quot; to save memory}}&lt;br /&gt;
&amp;lt;span id=FFTGvecs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|FFTGvecs|RL/Energy|Integer/Real}}{{var-verbosity|RL}}&lt;br /&gt;
{{var-short|Number of G-vectors or energy cut off for expanding the wavefunctions/FFT transforms}}&lt;br /&gt;
{{var-usage|Determines size (memory) of calculation. Corresponds to cutoff in DFT calculation; can be much less than geometry cutoff. It needs careful convergence. }}&lt;br /&gt;
===Initialization===&lt;br /&gt;
&amp;lt;span id=setup&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|setup|None|String}}&lt;br /&gt;
{{var-short|Runlevel name}}&lt;br /&gt;
{{var-usage|Activate with -i option}}&lt;br /&gt;
&amp;lt;span id=MaxGvecs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|MaxGvecs|RL/Energy|Integer/Real}}{{var-verbosity|RL}}&lt;br /&gt;
{{var-short|Maximum number of G-vectors that can be used by code}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=IkSigLim&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|IkSigLim|Range|Integer }}{{var-verbosity|kpt}}&lt;br /&gt;
{{var-short|QP K-points indices range}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=IkXLim&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|IkXLim||}}{{var-verbosity|kpt}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=QptCoord&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|QptCoord||}}{{var-verbosity|kpt}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
===Random integration method and cutoff Coulomb potentials===&lt;br /&gt;
&amp;lt;span id=rim_cut&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|rim_cut|None|String}}&lt;br /&gt;
{{var-short|Runlevel name}}&lt;br /&gt;
{{var-usage|Activate with -r option}}&lt;br /&gt;
&amp;lt;span id=RandQpts&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|RandQpts|RL|Integer}}&lt;br /&gt;
{{var-short|Number of random q-points in the BZ to perform Monte Carlo Integration,}}&lt;br /&gt;
{{var-usage|It needs convergence: values like 10^6 can be used to ensure convergence. Needed for non 3D system to avoid divergences for small q, and needed to build cutoff potential with box shape}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#RandGvec|RandGvec]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=CUTGeo&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|CUTGeo|None|String}}{{var-default|none}}&lt;br /&gt;
{{var-short|Cutoff geometry}}&lt;br /&gt;
{{var-usage|Allowed values are: &amp;quot;box/cylinder/sphere/ws X/Y/Z/XY...&amp;quot;, e.g. &amp;quot;box xy&amp;quot; or &amp;quot;cylinder y&amp;quot;. WS is the suggested option for orthorhombic cells. Use sphere (0D) for molecules, cylinder (1D) for polymers and nanotubes, box (0D, 1D, 2D) for all geometries. XYZ: cut in all directions. Box: XY: cut in XY only. Cylinder X/Y/Z indicates cylinder axis. When using Box shapes, the RIM is also needed to calculate the potential. In Box for large enough boxes assigns Box side slighlty smaller than the cell box. In order to use the box a previous RandQpts  (rim_cut) is needed.}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#CUTBox|CUTBox]]&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;[[Variables#CUTRadius|CUTRadius]]&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;[[Variables#CUTCylLen|CUTCylLen]]&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;[[Variables#CUTwsGvec|CUTwsGvec]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=CUTBox&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|CUTBox|Length|Vector}}{{var-default|(0,0,0)}}&lt;br /&gt;
{{var-short|Dimensions of box}}&lt;br /&gt;
{{var-usage|Box side=0 means do not cut in that direction. }}&lt;br /&gt;
&amp;lt;span id=CUTRadius&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|CUTRadius|Length|Real}}&lt;br /&gt;
{{var-short|Sphere/cylinder radius.}}&lt;br /&gt;
{{var-usage|Cutoff radius used in spehere and cylinder geometry}}&lt;br /&gt;
&amp;lt;span id=CUTCylLen&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|CUTCylLen|Length|Real}}&lt;br /&gt;
{{var-short|Length for finite Cylinders}}&lt;br /&gt;
{{var-usage|CUTCylLen=0 indicates infinite cylinder}}&lt;br /&gt;
&amp;lt;span id=CUTwsGvec&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|CUTwsGvec|Energy|Real}}{{var-default|0.7}}&lt;br /&gt;
{{var-short|Energy cut off on modified component }}&lt;br /&gt;
{{var-usage|To be used together with CUTGeo=&amp;quot;ws&amp;quot;.Determines the number of components of the potential to be modified.  }}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#CUTGeo|CUTGeo]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=RandGvec&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|RandGvec|Energy|}}{{var-verbosity|RL}}&lt;br /&gt;
{{var-short|Number of G vectors the RIM is calculated at}}&lt;br /&gt;
{{var-usage|RandGvec=1 (gamma) is usually enough}}&lt;br /&gt;
&amp;lt;span id=QpgFull&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|QpgFull|None|Flag}}{{var-default|off}}{{var-verbosity|RL}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|Monte Carlo random integratio for the full coulomb matrix 1/|q+G||q+G&#039;|}}&lt;br /&gt;
&amp;lt;span id=Em1Anys&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|Em1Anys||}}{{var-verbosity|RL}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=IDEm1Ref&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|IDEm1Ref||}}{{var-verbosity|RL}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=CUTCol_test&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|CUTCol_test|None|Flag}}{{var-default|off}}{{var-verbosity|RL}}&lt;br /&gt;
{{var-short|Provides in output the truncated Coulomb potential in real space}}&lt;br /&gt;
{{var-usage|Useful option for debugging purposes.}}&lt;br /&gt;
===Hartree-Fock Self-energy and Vxc===&lt;br /&gt;
&amp;lt;span id=HF_and_locXC&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|HF_and_locXC|None|String}}&lt;br /&gt;
{{var-short|Runlevel name}}&lt;br /&gt;
{{var-usage|Activate with -x}}&lt;br /&gt;
&amp;lt;span id=EXXRLvcs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|EXXRLvcs|RL/Energy|Integer/Real}}{{var-default|MaXGvecs}}&lt;br /&gt;
{{var-short|Number of G-vectors used in the sum of the exchange self-energy Sx.}}&lt;br /&gt;
{{var-usage|It needs careful convergence. As it is not particularly time consuming, large values can be used to ensure convergence. Generally a large number is needed as the QP energies show a slow convergence. The calcualtion of the exchange part is rather fast.}}&lt;br /&gt;
&amp;lt;span id=VXCRLvcs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|VXCRLvcs|RL/Energy|Integer/Real}}{{var-default|MaXGvecs}}&lt;br /&gt;
{{var-short|Number of G-vectors used in the evaluation of the density for the &amp;lt;Vxc&amp;gt; matrix element}}&lt;br /&gt;
{{var-usage|A large number is needed in order to have a precise cancellation with the ground state calculation, in particular when GGA potential are used. A good measure of the accuracy is to compare the E_xc value printed in Yambo report and QE output file.}}&lt;br /&gt;
&amp;lt;span id=QPkrange&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|QPkrange|None|Range}}{{var-default|All qp and all bands available.}}&lt;br /&gt;
{{var-short|Range of states (n,k) where GW/Sx elements are calculated}}&lt;br /&gt;
{{var-usage|Careful use of fewer k-points and bands reduces the calculation time; yambo will interpolate the rest. Format is: first k-point | last k-point | lower band | upper band. This can be split over several lines for multiple groups - see the Format page for examples.}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#QPerange|QPerange]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=UseNLCC&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|UseNLCC|None|Flag}}{{var-default|off}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|If present, add NLCC contributions to the charge density.}}&lt;br /&gt;
{{var-usage|Care is needed. Beware NLCC are included in the Vxc but not in the exchange part of the self energy that could be inconsistent. Suggestion: if possible use PP without NLCC.}}&lt;br /&gt;
&amp;lt;span id=QPerange&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|QPerange|None/Energy|Range}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|Range of states (E,k) where GW/Sx elements are calculated}}&lt;br /&gt;
{{var-usage|Careful use of fewer k-points and bands reduces the calculation time; yambo will interpolate the rest. Format is: first k-point | last k-point | lower energy | upper energy. This can be split over several lines for multiple groups.}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#QPkrange|QPkrange]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=SE_CPU&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|SE_CPU|None|String}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|CPUs for each role}}&lt;br /&gt;
{{var-usage|For consistency the product of the CPUs for each role has to be equal to the number of MPI tasks of the job}}&lt;br /&gt;
&amp;lt;span id=SE_ROLEs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|SE_ROLEs|None|String}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|CPUs roles (q,qp,b)}}&lt;br /&gt;
{{var-usage|Here qp=quasiparticle states, q=transferred momenta, b=bands in G summation. MPI-b best memory distribution. MPI-qp no communication. MPI-q leads to load unbalance.}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#SE_ROLEs|SE_ROLEs]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=SE_Threads&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|SE_Threads|None|Integer}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|Number of threads for self-energy}}&lt;br /&gt;
{{var-usage|Very efficient. To be effective the code should have been compiled with OMP support.}}&lt;br /&gt;
===GW===&lt;br /&gt;
&amp;lt;span id=cohsex&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|cohsex|None|String}}&lt;br /&gt;
{{var-short|Runlevel name}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=gw0&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|gw0|None|String}}&lt;br /&gt;
{{var-short|Runlevel name}}&lt;br /&gt;
{{var-usage|Activate with -g &amp;lt;opt&amp;gt; }}&lt;br /&gt;
&amp;lt;span id=life &amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|life |None|String}}&lt;br /&gt;
{{var-short|Runlevel name}}&lt;br /&gt;
{{var-usage|Activate with -l option.}}&lt;br /&gt;
&amp;lt;span id=QPkrange&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|QPkrange|None|Range}}{{var-default|From ns.db1 (all k-points, all bands)}}&lt;br /&gt;
{{var-short|K-points and band range where you want to calculate the GW correction.}}&lt;br /&gt;
{{var-usage|If interested in non consecutive kpoints or bands multiple rows can be also considered. The syntax is first kpoint | last kpoint | first band | last band}}&lt;br /&gt;
&amp;lt;span id=GbndRnge&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|GbndRnge|None|Range}}&lt;br /&gt;
{{var-short|Specifies the range of bands entering in the sum over states in the correlation part of the self energy}}&lt;br /&gt;
{{var-usage|It needs several empty states. Single quasiparticle states converges very slowly with respect GbndRnge, energy differences (e.g. gaps) behave better. See also GTermKind variable in order to speed up the convergences.This number is usually larger than the number of bands used to calculated the dielectricconstant. Single quasiparticle energies converge slowly with respect GbndRnge, energy difference behave better. You can use terminator technique to mitigate the slow dependence.}}&lt;br /&gt;
&amp;lt;span id=GDamping&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|GDamping||}}&lt;br /&gt;
{{var-short|Small damping in the Green&#039;s function definition, the delta parameter.}}&lt;br /&gt;
{{var-usage|The final result shouuld not depend on that, usually set at 0.1 eV}}&lt;br /&gt;
&amp;lt;span id=dScStep&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|dScStep|Energy|Real}}{{var-default|0.1}}&lt;br /&gt;
{{var-short|Energy step to evaluate Z factors}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=DysSolver&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DysSolver||}}&lt;br /&gt;
{{var-short|Indicates method used to solve the Dyson equation}}&lt;br /&gt;
{{var-usage|&amp;quot;n&amp;quot; Newton linearization (First order expansion around KS eigenvalue), &#039;s&#039; non linear iterative secant method}}&lt;br /&gt;
&amp;lt;span id=LifeTrCG&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|LifeTrCG|None|Real}}{{var-default|100}}&lt;br /&gt;
{{var-short|Lifetime transition reduction (%)}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=GfnQPdb&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQPdb|&amp;lt;code&amp;gt;[[Variables#KfnQPdb|KfnQPdb]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GfnQP_N&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQP_N|&amp;lt;code&amp;gt;[[Variables#KfnQP_N|KfnQP_N]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GfnQP_E&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQP_E|&amp;lt;code&amp;gt;[[Variables#KfnQP_E|KfnQP_E]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GfnQP_Z&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQP_Z|&amp;lt;code&amp;gt;[[Variables#KfnQP_Z|KfnQP_Z]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GfnQP_Wv_E&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQP_Wv_E|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wv_E|KfnQP_Wv_E]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GfnQP_Wv&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQP_Wv|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wv|KfnQP_Wv]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GfnQP_Wv_dos&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQP_Wv_dos|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wv_dos|KfnQP_Wv_dos]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GfnQP_Wc_E&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQP_Wc_E|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wc_E|KfnQP_Wc_E]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GfnQP_Wc&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQP_Wc|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wc|KfnQP_Wc]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GfnQP_Wc_dos&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|GfnQP_Wc_dos|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wc_dos|KfnQP_Wc_dos]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=GTermKind&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|GTermKind|None|String}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|Type of terminator to accelarate onvergence with respect empty states}}&lt;br /&gt;
{{var-usage|Default is &amp;quot;none&amp;quot;, possible options are &amp;quot;BG&amp;quot; for the Bruneval-Gonze terminator. See BG[1]. It speeds up the convergence with respect to number of empty bands.}}&lt;br /&gt;
&amp;lt;span id=GTermEn&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|GTermEn|Energy|}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|Energy of the fictitious pole of the terminator}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NewtDchk&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NewtDchk||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=ExtendOut &amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|ExtendOut |None|Flag}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|Extended output: Print more quantities in qp output files}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=OnMassShell &amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|OnMassShell ||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=QPerange&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|QPerange||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=GEnSteps&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|GEnSteps||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|-g s}}&lt;br /&gt;
&amp;lt;span id=GEnRnge&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|GEnRnge||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|-g s}}&lt;br /&gt;
&amp;lt;span id=GDmRnge&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|GDmRnge||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|-g s}}&lt;br /&gt;
===Screening===&lt;br /&gt;
&amp;lt;span id=em1d&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|em1d||String}}&lt;br /&gt;
{{var-short|Runlevel name}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=em1s&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|em1s||String}}&lt;br /&gt;
{{var-short|Runlevel name}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NGsBlkXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NGsBlkXd|RL/Energy|Integer/Real}}&lt;br /&gt;
{{var-short|Number of G-vectors or energy cut off in the screening (response block size)}}&lt;br /&gt;
{{var-usage|Determines the size of the dielectric matrix in G-space. Needed for inclusion of local field effects, it should be much smaller than the number of G-vectors needed to expand the wavefunctions (FFTGvecs). It needs careful convergence, and should be converged along with BndsRnXp. Depends strongly on the system inhomogeneity.}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#BndsRnXp|BndsRnXp]]&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;[[Variables#FFTGvecs|FFTGvecs]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=PPAPntXp&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|PPAPntXp|Energy|Real}}{{var-default|1 Ha (27.2114eV)}}&lt;br /&gt;
{{var-short|Plasmon pole Imaginary Energy}}&lt;br /&gt;
{{var-usage|The self energy in the imaginary axis should be a smooth function so it should not have a strong dependence on this pole energy. Set it at an higher value of the plasmon energy (see EELS spectrum). this is the second frequency used to fit the Godby-Needs plasmon-pole model (PPM). If results depend consistently by changing this frequency, the PPM is not adequate for your calculation and it is need to gp beyond that, e.g. Real-axis.}}&lt;br /&gt;
&amp;lt;span id=BndsRnXp&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|BndsRnXp|&amp;lt;code&amp;gt;[[Variables#BndsRnXd|BndsRnXd]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=EnRngeXp&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|EnRngeXp|&amp;lt;code&amp;gt;[[Variables#EnRngeXd|EnRngeXd]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=DmRngeXp&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|DmRngeXp|&amp;lt;code&amp;gt;[[Variables#DmRngeXd|DmRngeXd]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=ETStpsXp&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|ETStpsXp|&amp;lt;code&amp;gt;[[Variables#ETStpsXd|ETStpsXd]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=LongDrXp&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|LongDrXp|&amp;lt;code&amp;gt;[[Variables#LongDrXd|LongDrXd]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
===Optics/chi in G-space===&lt;br /&gt;
&amp;lt;span id=optics&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|optics|None|String}}&lt;br /&gt;
{{var-short|Runlevel name: &amp;quot;Optics&amp;quot;}}&lt;br /&gt;
{{var-usage|Activate with -o &amp;lt;opt&amp;gt;. Optics runlevel.}}&lt;br /&gt;
&amp;lt;span id=chi&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|chi|None|String}}&lt;br /&gt;
{{var-short|Runlevel name: &amp;quot;Dyson equation for chi.&amp;quot;}}&lt;br /&gt;
{{var-usage|Activate with -o c. Dyson equation for chi.}}&lt;br /&gt;
&amp;lt;span id=tddft&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|tddft|None|String}}&lt;br /&gt;
{{var-short|Runlevel name: &amp;quot;Use TDDFT kernel&amp;quot;}}&lt;br /&gt;
{{var-usage|Activate with -k alda or -k lrc. Use TDDFT kernel}}&lt;br /&gt;
&amp;lt;span id=Chimod&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|Chimod|None|String}}&lt;br /&gt;
{{var-short|Type of kernel in TDDFT Dyson equation}}&lt;br /&gt;
{{var-usage|Do not set this manually - set using the appropriate &#039;&#039;&#039;-k&#039;&#039;&#039; command line option. Allowed values: IP/Hartree/ALDA/LRC/BSfxc. IP indicates no kernel (independent particle level/RPA without local fields)}}&lt;br /&gt;
&amp;lt;span id=X_Threads&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_Threads|None|Integer}}&lt;br /&gt;
{{var-short|Number of threads for response functions}}&lt;br /&gt;
{{var-usage|efficient, need extra mem}}&lt;br /&gt;
&amp;lt;span id=DIP_Threads&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DIP_Threads||}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=QpntsRXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|QpntsRXd|None|Range}}&lt;br /&gt;
{{var-short|Range of indexes of q-points/transferred momenta to be computed.}}&lt;br /&gt;
{{var-usage|Set to 1 1 to select just the long wavelength term. Range from 1:nqpt.}}&lt;br /&gt;
&amp;lt;span id=BndsRnXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BndsRnXd|None|Range}}&lt;br /&gt;
{{var-short|Bands range: Specifies the number of bands entering in the sum over states in the RPA response function}}&lt;br /&gt;
{{var-usage|It needs several empty states. See also GTermKind variable in order to speed up the convergences. Reduce range in order to lower memory. In metals it includes partially filled bands. See also EhEngyXd.}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#GTermKind|GTermKind]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=EnRngeXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|EnRngeXd|Energy|Range}}&lt;br /&gt;
{{var-short|Energy range the spectrum is calculated across.}}&lt;br /&gt;
{{var-usage|Extremae of the energy range across which optical spectra will be computed.}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#EhEngyXd|EhEngyXd]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=DmRngeXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DmRngeXd|Energy|Range}}&lt;br /&gt;
{{var-short|Determines the damping used across the requested spectral range.}}&lt;br /&gt;
{{var-usage|Typically this is kept constant. If different values are used, the damping at each energy will be interpolated linearly. This can be useful when poor k-point sampling leads to large oscillations at higher energy.}}&lt;br /&gt;
&amp;lt;span id=ETStpsXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|ETStpsXd|None|Integer}}&lt;br /&gt;
{{var-short|Number of energy steps in computing X}}&lt;br /&gt;
{{var-usage|Determines the number of steps in energy the response function/spectrum is computed for in the desired range defined by EnRngeXd. In the case of a full frequency GW the range is fixed by the occupied/empty states included in the calculation, the number of frequency requires a careful check}}&lt;br /&gt;
&amp;lt;span id=LongDrXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|LongDrXd|Length|Vector}}&lt;br /&gt;
{{var-short|Electric field direction}}&lt;br /&gt;
{{var-usage|Pay attention how the system is oriented when treating non 3D systems and choose a direction in the plane/axis where your system lies}}&lt;br /&gt;
&amp;lt;span id=FxcGRLc&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|FxcGRLc||}}&lt;br /&gt;
{{var-short|XC-kernel size}}&lt;br /&gt;
{{var-usage|Needs convergence study. Much less than FFTGvecs}}&lt;br /&gt;
&amp;lt;span id=LRC_alpha&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|LRC_alpha|None|Real}}{{var-default|0.00}}&lt;br /&gt;
{{var-short|LRC fitting parameter alpha}}&lt;br /&gt;
{{var-usage|Long-range tail of the fxc kernel. Depends on the system: the larger the screening the smaller this parameter.}}&lt;br /&gt;
&amp;lt;span id=XfnQPdb&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQPdb|&amp;lt;code&amp;gt;[[Variables#KfnQPdb|KfnQPdb]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=XfnQP_N&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQP_N|&amp;lt;code&amp;gt;[[Variables#KfnQP_N|KfnQP_N]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=XfnQP_E&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQP_E|&amp;lt;code&amp;gt;[[Variables#KfnQP_E|KfnQP_E]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=XfnQP_Z&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQP_Z|&amp;lt;code&amp;gt;[[Variables#KfnQP_Z|KfnQP_Z]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=XfnQP_Wv_E&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQP_Wv_E|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wv_E|KfnQP_Wv_E]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=XfnQP_Wv&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQP_Wv|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wv|KfnQP_Wv]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=XfnQP_Wv_dos&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQP_Wv_dos|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wv_dos|KfnQP_Wv_dos]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=XfnQP_Wc_E&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQP_Wc_E|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wc_E|KfnQP_Wc_E]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=XfnQP_Wc&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQP_Wc|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wc|KfnQP_Wc]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=XfnQP_Wc_dos&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-redirect|XfnQP_Wc_dos|&amp;lt;code&amp;gt;[[Variables#KfnQP_Wc_dos|KfnQP_Wc_dos]]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=NonPDirs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NonPDirs||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=ChiLinAlgMod&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|ChiLinAlgMod||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=GrFnTpXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|GrFnTpXd||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|Greens function: T/R/r/Ta/Ra. &amp;quot;R&amp;quot; = resonant gives the causal response function}}&lt;br /&gt;
&amp;lt;span id=DmERefXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DmERefXd||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=CGrdSpXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|CGrdSpXd||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=EMStpsXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|EMStpsXd||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=DrudeWXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DrudeWXd|Energy|Complex}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Drude plasmon energy and inverse lifetime.}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=EhEngyXd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|EhEngyXd|Energy|Range}}{{var-default|(-1,-1)}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Electron-hole energy range}}&lt;br /&gt;
{{var-usage|An alternative way to BndsRnXd to restrict transitions, but will not reduce memory}}&lt;br /&gt;
&amp;lt;span id=DrClassic&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DrClassic||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=DipApproach&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DipApproach||String}}{{var-default|G-space v}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Different ways to calculate dipole matrix elements}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=DipPDirect&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DipPDirect||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=ShiftedPaths&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|ShiftedPaths||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=Qdirection&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|Qdirection||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=QShiftOrder&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|QShiftOrder||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=DbGdQsize&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DbGdQsize||}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=PAR_def_mode&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|PAR_def_mode||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=X_q_0_CPU&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_q_0_CPU||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=X_q_0_ROLEs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_q_0_ROLEs||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=X_q_0_nCPU_LinAlg_INV&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_q_0_nCPU_LinAlg_INV||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=X_finite_q_CPU&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_finite_q_CPU||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=X_finite_q_ROLEs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_finite_q_ROLEs||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=X_finite_q_nCPU_LinAlg_INV&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_finite_q_nCPU_LinAlg_INV||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=X_all_q_CPU&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_all_q_CPU||}}&lt;br /&gt;
{{var-short|CPUs for each role}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=X_all_q_ROLEs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_all_q_ROLEs||}}&lt;br /&gt;
{{var-short|CPUs roles (q,k,c,v)}}&lt;br /&gt;
{{var-usage|MPI-c,v best memory distribution. MPI-k efficient, some memory replication. MPI-q may lead to load unbalance.}}&lt;br /&gt;
&amp;lt;span id=X_all_q_nCPU_LinAlg_INV&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|X_all_q_nCPU_LinAlg_INV||}}&lt;br /&gt;
{{var-short|CPUs for matrix inv}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
===Optics/BSE in eh-space===&lt;br /&gt;
&amp;lt;span id=bse&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|bse|None|String}}&lt;br /&gt;
{{var-short|Runlevel name: &amp;quot;Bethe Salpeter Equation&amp;quot;}}&lt;br /&gt;
{{var-usage|Activate with -o b}}&lt;br /&gt;
&amp;lt;span id=K_Threads&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|K_Threads|None|Integer}}&lt;br /&gt;
{{var-short|Number of threads for response functions}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BSEmod&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSEmod|None|String}}{{var-default|retarded}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|resonant/retarded/coupling}}&lt;br /&gt;
&amp;lt;span id=BSKmod&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSKmod|None|String}}{{var-default|IP}}&lt;br /&gt;
{{var-short|Bethe Salpeter kernel}}&lt;br /&gt;
{{var-usage|Do not set this manually: activate with the appropriate -k &amp;lt;opt&amp;gt; command line option, where opt is one of IP/Hartree/HF/ALDA/SEX.}}&lt;br /&gt;
&amp;lt;span id=BEnRange&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BEnRange|Energy|Range}}{{var-default|[0:10] eV}}&lt;br /&gt;
{{var-short|Energy range for computing the macroscopic dielectric function using BSE}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BDmRange&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BDmRange|Energy|Range}}{{var-default|(0.10000 , 0.10000)}}&lt;br /&gt;
{{var-short|Broadening for the BSE calculation}}&lt;br /&gt;
{{var-usage|Lorentzian broadening changes linearly between the two values}}&lt;br /&gt;
&amp;lt;span id=BEnSteps&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BEnSteps|None|Integer}}{{var-default|100}}&lt;br /&gt;
{{var-short|Number of evenly spaced energy points in spectrum}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BLongDir&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BLongDir|None|Vector}}{{var-default|(1,0,0)}}&lt;br /&gt;
{{var-short|Direction of the longitudinal perturbation}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BSEBands&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSEBands|None|Range}}{{var-default|All bands}}&lt;br /&gt;
{{var-short|Bands range: Specifies the band states from which the electron-hole basis of the BSE kernel is constructed}}&lt;br /&gt;
{{var-usage|Choose few bands close to the Fermi level. Size scales rapidly with the number of bands: BSE is rewritten as an eigenvalue problem for the 2 particle Hamiltonian: size of matrix [Nv x Nc x NKBZ ] x [Nv x Nc x NKBZ]}}&lt;br /&gt;
&amp;lt;span id=KfnQPdb&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQPdb|None|String}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|Database for QP corrections.}}&lt;br /&gt;
{{var-usage|From a previous GW calculation. An interpolation of the missing QP-values on the basis of the QP-database is available}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#KfnQP_E|KfnQP_E]]&amp;lt;/code&amp;gt;&lt;br /&gt;
::Format: &amp;quot;&amp;lt;what&amp;gt; &amp;lt; &amp;lt;path&amp;gt;/ndb.QP&amp;quot; with &amp;lt;what&amp;gt; = E,W,Z for QP energy correction, QP width and renormalization factor. For example, from a previous GW calculation use KfnQPdb= &amp;quot;E &amp;lt; ./SAVE/ndb.QP&amp;quot;&lt;br /&gt;
&amp;lt;span id=KfnQP_N&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQP_N|None|Integer}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|Interpolation neighbours?}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=KfnQP_E&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQP_E|eV/None/None|Scissors}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|QP corrections using a scissor operator and stretching coefficients for the conduction/valence bandwidths.}}&lt;br /&gt;
{{var-usage|Insert values from a previous GW calculation or experiment. This is a lighter way to include GW corrections than KfnQP_E. Format is: scissor | stretch conduction | stretch valence.}}  &#039;&#039;See also:&#039;&#039; &amp;lt;code&amp;gt;[[Variables#KfnQPdb|KfnQPdb]]&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span id=KfnQP_Z&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQP_Z||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=KfnQP_Wv_E&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQP_Wv_E||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=KfnQP_Wv&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQP_Wv||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=KfnQP_Wv_dos&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQP_Wv_dos||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=KfnQP_Wc_E&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQP_Wc_E||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=KfnQP_Wc&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQP_Wc||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=KfnQP_Wc_dos&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|KfnQP_Wc_dos||}}{{var-verbosity|qp}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BoseCut&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BoseCut||}}{{var-verbosity|gen}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=DbGdQsize&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DbGdQsize|None|Real}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Percentual of the total DbGd transitions to be used}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=DipApproach&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DipApproach|None|String}}{{var-default|G-space v}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|how dipoles are calculated:G-space v}}&lt;br /&gt;
{{var-usage|Options are: G-space v/R-space x/Covariant/Shifted grids}}&lt;br /&gt;
&amp;lt;span id=DipPDirect&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DipPDirect|None|Flag}}{{var-default|off}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Directly compute &amp;lt;v&amp;gt; also when using other approaches for dipoles}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=ShiftedPaths&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|ShiftedPaths|None|String}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Shifted grids paths (separated by a space)}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=Gauge&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|Gauge|None|String}}{{var-default|length}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Switch between lenght or velocity gauge}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NoCondSumRule&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NoCondSumRule|None|Flag}}{{var-default|off}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Do not impose the conductivity sum rule in velocity gauge}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=MetDamp&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|MetDamp|None|Flag}}{{var-default|off}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Define \w+=sqrt(\w*(\w+i\eta))}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=Reflectivity&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|Reflectivity|None|Flag}}{{var-default|off}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Compute reflectivity at normal incidence}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=DrudeWBS&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|DrudeWBS|Energy|Complex}}{{var-verbosity|resp}}&lt;br /&gt;
{{var-short|Drude plasmon}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BS_CPU&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BS_CPU||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short| CPUs for each role}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BS_ROLEs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BS_ROLEs||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short| CPUs for each role}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BS_nCPU_LinAlg_INV&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BS_nCPU_LinAlg_INV||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BS_nCPU_LinAlg_DIAGO&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BS_nCPU_LinAlg_DIAGO||}}{{var-verbosity|par}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
===Bethe Salpeter Kernel===&lt;br /&gt;
&amp;lt;span id=bsk&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|bsk|None|String}}&lt;br /&gt;
{{var-short|Runlevel name: &amp;quot;Bethe Salpeter Equation kernel&amp;quot;}}&lt;br /&gt;
{{var-usage|Activate with -y &amp;lt;opt&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=bss&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|bss|None|String}}&lt;br /&gt;
{{var-short|Runlevel name: &amp;quot;Bethe Salpeter Equation solver&amp;quot;}}&lt;br /&gt;
{{var-usage|Activate with -y &amp;lt;opt&amp;gt;}}&lt;br /&gt;
&amp;lt;span id=BSENGexx&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSENGexx|RL/Energy|Integer/Real}}&lt;br /&gt;
{{var-short|G-components to be summed in the Exchange part of the BSE kernel, which takes into account the Local-field effects}}&lt;br /&gt;
{{var-usage|Small values increase speed. Convergence tests are required.}}&lt;br /&gt;
&amp;lt;span id=BSENGBlk&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSENGBlk|RL/Energy|Integer/Real}}&lt;br /&gt;
{{var-short|Number of RL-components of the Screened Coulomb Potential matrix W(G,G&#039;), to be included in the sum of the e-h attractive Kernel}}&lt;br /&gt;
{{var-usage|Try using the diagonal terms only first (BSresKmod BScplKmod variables); use a smaller number than the dimension of the Screened interaction matrix}}&lt;br /&gt;
&amp;lt;span id=WehCpl&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|WehCpl|None|Flag}}&lt;br /&gt;
{{var-short|activate W in the Coupling part}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=WehDiag&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|WehDiag|None|Flag}}&lt;br /&gt;
{{var-short|diagonal (G-space) the eh interaction}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BSSmod&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSSmod|None|String}}&lt;br /&gt;
{{var-short|select solver for BSE}}&lt;br /&gt;
{{var-usage|(h)aydock/(d)iagonalization/(i)nversion/(t)ddft}}&lt;br /&gt;
&amp;lt;span id=BSHayTrs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSHayTrs|None|Real}}{{var-default|-0.02}}&lt;br /&gt;
{{var-short|Threshold for accuracy of the iterative Haydock process}}&lt;br /&gt;
{{var-usage|Negative sign: average difference, over the energy range, of two consecutive approximations to the spectrum. Positive sign: maximum difference, over the energy range, of two consecutive approximations to the spectrum}}&lt;br /&gt;
&amp;lt;span id=BSSInvMode&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSSInvMode|None|String}}{{var-default|Off}}&lt;br /&gt;
{{var-short|select full or perturbative inversion solver for BSE}}&lt;br /&gt;
{{var-usage|(p) perturbative (f) full}}&lt;br /&gt;
&amp;lt;span id=BSEPSInvTrs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSEPSInvTrs|None|Real}}{{var-default|0.01}}&lt;br /&gt;
{{var-short|Inversion treshold. }}&lt;br /&gt;
{{var-usage|Relative[o/o](&amp;gt;0)/Absolute(&amp;lt;0)}}&lt;br /&gt;
&amp;lt;span id=BSSInvPFratio&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSSInvPFratio|None|real}}&lt;br /&gt;
{{var-short|Inversion solver. Ratio between the number of frequencies solved pert/full}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BSSInvKdiag&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSSInvKdiag|None|Flag}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=BSSPertWidth &amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|BSSPertWidth |None|Flag}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=WRbsWF&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|WRbsWF|None|Flag}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
===Non-linear===&lt;br /&gt;
&amp;lt;span id=nloptics&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|nloptics||String}}&lt;br /&gt;
{{var-short|Runlevel name}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NLBands&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NLBands||}}{{var-default|From ns.ndb1}}&lt;br /&gt;
{{var-short|Number of bands}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NLverbosity&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NLverbosity||String}}{{var-default|low}}&lt;br /&gt;
{{var-short|Verbosity level &amp;quot;high&amp;quot; or &amp;quot;low&amp;quot;}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NLstep&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NLstep|fs|Real}}{{var-default|0.01}}&lt;br /&gt;
{{var-short|Time step}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NLtime&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NLtime|fs|Real}}{{var-default|-1}}&lt;br /&gt;
{{var-short|Simulaiton length}}&lt;br /&gt;
{{var-usage|If negative automatically set the right value for SHG}}&lt;br /&gt;
::This value is invertionaly proportional to NLDamping&lt;br /&gt;
&amp;lt;span id=NLintegrator&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NLintegrator||String}}{{var-default|INVINT}}&lt;br /&gt;
{{var-short|Integrator}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NLCorrelation &amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NLCorrelation ||String}}{{var-default|IPA (independent particle approximation)}}&lt;br /&gt;
{{var-short|Correlation level}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=NLDamping&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NLDamping|eV|Real}}{{var-default|0.2}}&lt;br /&gt;
{{var-short|Damping (or dephasing)}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=EvalCurrent&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|EvalCurrent||Flag}}{{var-default|Off}}&lt;br /&gt;
{{var-short|}}&lt;br /&gt;
{{var-usage|Calculate the current if true}}&lt;br /&gt;
&amp;lt;span id=HARRLvcs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|HARRLvcs||Integer}}{{var-default|from ns.ndb1}}&lt;br /&gt;
{{var-short|Number of G-vectors in the Hartree}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=EXXRLvcs&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|EXXRLvcs||Integer}}{{var-default|from Collisions}}&lt;br /&gt;
{{var-short|Number of G-vectors in the Screened Exchange}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=ExtF_Dir&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|ExtF_Dir|None|Vector}}{{var-default|(1,0,0)}}&lt;br /&gt;
{{var-short|Direction of the external field}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=ExtF_kind&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|ExtF_kind||String}}{{var-default|SOFTSIN}}&lt;br /&gt;
{{var-short|Field kind}}&lt;br /&gt;
{{var-usage|Type of external field, for non-linear response only SIN or SOFTSIN}}&lt;br /&gt;
&amp;lt;span id=NLLrcAlpha&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|NLLrcAlpha||Real}}{{var-verbosity|nl}}&lt;br /&gt;
{{var-short|Long range alpha correction}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=UseDipoles&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|UseDipoles||Flag}}{{var-default|Off}}{{var-verbosity|nl}}&lt;br /&gt;
{{var-short|Use Covariant Dipoles (just for test purpose)}}&lt;br /&gt;
{{var-usage|}}&lt;br /&gt;
&amp;lt;span id=FrSndOrd&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
{{var-basic|FrSndOrd||Flag}}{{var-default|Off}}&lt;br /&gt;
{{var-short|Force second order numerical derivatives (only for testing purpose)}}&lt;br /&gt;
{{var-usage|}}&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Main_Page&amp;diff=2923</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Main_Page&amp;diff=2923"/>
		<updated>2019-11-07T10:29:20Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Yambo_teaches.png|thumb|center|upright=2.0|]]&lt;br /&gt;
&lt;br /&gt;
Welcome to the Yambo educational page. In this page you will find several informations about how to run Yambo and, more generally, about the methods implemented in the code.&lt;br /&gt;
&lt;br /&gt;
== Yambo Philosophy ==&lt;br /&gt;
The Yambo Philosophy is simple: &#039;&#039;&#039;read, learn, run, cite us&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Yambo is a tool but to use it you must first know as much as possible the theories, approximations and methods that are coded in the tool. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Yambo should never be used without a clear understanding of the theory laying behind the code&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
This is exactly the aim of this wiki page. To guide the general Yambo user, advanced or not, in a detailed tour of the Yambo features.&lt;br /&gt;
&lt;br /&gt;
== Read ==&lt;br /&gt;
Reading is the basic ingredient. Here we provide some elemental references of the theories/methods used in Yambo:&lt;br /&gt;
* [[Theory|Background theory]]&lt;br /&gt;
* [[Lectures|Lectures on various topics by the Yambo team]]&lt;br /&gt;
* [[Selected Readings|Other reading material]]&lt;br /&gt;
* [[Cheatsheets|Cheatsheets: Relating theory and code variables]]&lt;br /&gt;
* [[Thesis]]&lt;br /&gt;
&lt;br /&gt;
== Learn ==&lt;br /&gt;
The second step in the philosophy are the tutorials.   &lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
* [[Download]] &lt;br /&gt;
* [[Installation]]&lt;br /&gt;
&lt;br /&gt;
== Cite us ==&lt;br /&gt;
It is scientifically fair to &#039;&#039;cite the two following articles in any publication based on results obtained with Yambo&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* {{article&lt;br /&gt;
|title= Many-body perturbation theory calculations using the yambo code&lt;br /&gt;
|authors=Davide Sangalli and Andrea Ferretti and Henrique Miranda and Claudio Attaccalite and Ivan Marri and Elena Cannuccia and Pedro Miguel Melo and Margherita Marsili and Fulvio Paleari and Antimo Marrazzo and Gianluca Prandini and Pietro Bonf\`a and Michael O Atambo and Fabio Affinito and Maurizia Palummo and Alejandro Molina Sanchez and Conor Hogan and Myrta Gr\xFCning and Daniele Varsano and Andrea Marini&lt;br /&gt;
|journal= Journal of Physics: Condensed Matter&lt;br /&gt;
|volume=  31&lt;br /&gt;
|pages= 325902&lt;br /&gt;
|year=  2019&lt;br /&gt;
|doi=10.1088/1361-648x/ab15d0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* {{article&lt;br /&gt;
|title= Yambo: an ab initio tool for excited state calculations &lt;br /&gt;
|authors=Andrea Marini, Conor Hogan, Myrta Grüning, Daniele Varsano &lt;br /&gt;
|journal= Comp. Phys. Comm.&lt;br /&gt;
|volume=  144&lt;br /&gt;
|pages= 180&lt;br /&gt;
|year=  2009&lt;br /&gt;
|doi=10.1016/j.cpc.2009.02.003&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Check the [http://www.researcherid.com/rid/O-4564-2015 Yambo researcher ID page] for citation information.&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
	<entry>
		<id>https://wiki.yambo-code.eu/wiki/index.php?title=Lectures&amp;diff=2922</id>
		<title>Lectures</title>
		<link rel="alternate" type="text/html" href="https://wiki.yambo-code.eu/wiki/index.php?title=Lectures&amp;diff=2922"/>
		<updated>2019-11-07T10:13:24Z</updated>

		<summary type="html">&lt;p&gt;Conor: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here you will find a collection of lectures given by members of the Yambo team over the years.&amp;lt;br&amp;gt;&lt;br /&gt;
Click the &#039;&#039;Download&#039;&#039; link under an image to open the PDF in your browser.&lt;br /&gt;
==Theoretical background: MBPT==&lt;br /&gt;
&lt;br /&gt;
[[File:ASESMA_2015_MBPT_1.png|200px]]&lt;br /&gt;
[[Media:ASESMA_2015_MBPT_1.pdf|Download]]&lt;/div&gt;</summary>
		<author><name>Conor</name></author>
	</entry>
</feed>