Initialization: Difference between revisions

From The Yambo Project
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
== Prerequisites ==
== Prerequisites ==
'''Previous modules'''
'''Previous modules'''
* It is recommended that you first follow the tutorials on generating the Yambo databases for [[Bulk_material:_h-BN|bulk hBN]] and [[2D_material:_h-BN_sheet|2D hBN]].
* It is recommended that you first follow the tutorials on generating the Yambo databases for [[Bulk_material:_h-BN|bulk hBN]].


'''You will need''':
'''You will need''':
Line 43: Line 43:
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.
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.


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 ''l'', in this case as <code>l_setup</code>.
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 ''l'', in this case as ''l_setup''.


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. <code>l_setup_01, l_setup_02</code>, etc. '''This applies to all files created by Yambo'''.
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. ''l_setup_01, l_setup_02'', etc. '''This applies to all files created by Yambo'''.


In the case of parallel runs, CPU-dependent log files will appear inside a <code>LOG</code> folder, e.g.  
In the case of parallel runs, CPU-dependent log files will appear inside a ''LOG'' folder, e.g.  
  $ mpirun -np 4 yambo  
  $ mpirun -np 4 yambo  
  $ ls LOG
  $ ls LOG
Line 54: Line 54:


===New core databases===
===New core databases===
New databases appear in the <code>SAVE</code> folder:
New databases appear in the ''SAVE'' folder:
  $ ls SAVE
  $ ls SAVE
  ns.db1 ns.wf ns.kb_pp_pwscf '''ns.gops ns.kindx'''
  ns.db1 ns.wf ns.kb_pp_pwscf '''ndb.gops ndb.kindx'''
  ns.wf_fragments_1_1 ...
  ns.wf_fragments_1_1 ...
  ns.kb_pp_pwscf_fragment_1 ...
  ns.kb_pp_pwscf_fragment_1 ...
These contain information about the ''G''-vector shells and ''k/q''-point meshes as defined by the DFT calculation.
These contain information about the ''G''-vector shells and ''k/q''-point meshes as defined by the DFT calculation.


'''TIP''': if you launch yambo, but it does not seem to produce anything new, check that these files are present.
'''TIP''': if you launch yambo, but it does not seem to do anything, check that these files are present.


===Report file===
===Report file===
A report file <code>r_setup</code> is generated in the run directory.  
A report file ''r_setup'' is generated in the run directory.  
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:
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:


Line 75: Line 75:


This reports the set of closed reciprocal lattice (RL) shells defined internally that contain G-vectors with the same modulus.  
This reports the set of closed reciprocal lattice (RL) shells defined internally that contain G-vectors with the same modulus.  
The highest number of RL vectors we can use is 3187.  Yambo will always redefine any input variable in RL space to the nearest closed shell.
The highest number of RL vectors we can use is 3187.  Yambo will always redefine any input variable in RL units to the nearest closed shell.


   [02.05] Energies [ev] & Occupations
   [02.05] Energies [ev] & Occupations

Revision as of 16:07, 30 March 2017

In this tutorial you will learn how to initialize the Yambo databases for bulk hBN.

Prerequisites

Previous modules

  • It is recommended that you first follow the tutorials on generating the Yambo databases for bulk hBN.

You will need:

  • The SAVE databases for bulk hBN and the 2D hBN sheet
  • The yambo executable

Initialization

Every Yambo run must start with this step. Go to the folder containing the hBN-bulk SAVE directory:

$ cd TUTORIALS/hBN/YAMBO
$ ls
SAVE

and simply launch the code

$ yambo 

This will run the initialization (setup) runlevel.

TIP: do not run yambo from inside the SAVE folder! In fact, if you ever see the message:

yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)

it usually means you are trying to launch Yambo from the wrong place.

Three new elements will appear:

Run-time output

This is typically written to standard output (on screen) and tracks the progress of the run in real time:

<---> [01] CPU structure, Files & I/O Directories
<---> [02] CORE Variables Setup
<---> [02.01] Unit cells
<---> [02.02] Symmetries
<---> [02.03] RL shells
<---> Shells finder |########################################| [100%] --(E) --(X)
<---> [02.04] K-grid lattice
<---> [02.05] Energies [ev] & Occupations
<---> [03] Transferred momenta grid
<---> BZ -> IBZ reduction |########################################| [100%] --(E) --(X)
<---> X indexes |########################################| [100%] --(E) --(X)
<---> SE indexes |########################################| [100%] --(E) --(X)
<---> [04] External corrections
<---> [05] Game Over & Game summary

Specific runlevels are indicated with numeric labels like [02.02].
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.

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 l, in this case as l_setup.

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. l_setup_01, l_setup_02, etc. This applies to all files created by Yambo.

In the case of parallel runs, CPU-dependent log files will appear inside a LOG folder, e.g.

$ mpirun -np 4 yambo 
$ ls LOG
l_setup_CPU_1   l_setup_CPU_2  l_setup_CPU_3  l_setup_CPU_4

This behaviour can be controlled at runtime - see the Parallel tutorial for details.

New core databases

New databases appear in the SAVE folder:

$ ls SAVE
ns.db1 ns.wf ns.kb_pp_pwscf ndb.gops ndb.kindx
ns.wf_fragments_1_1 ...
ns.kb_pp_pwscf_fragment_1 ...

These contain information about the G-vector shells and k/q-point meshes as defined by the DFT calculation.

TIP: if you launch yambo, but it does not seem to do anything, check that these files are present.

Report file

A report file r_setup is generated in the run directory. 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:

 [02.03] RL shells
 =================
 Shells, format: [S#] G_RL(mHa)
 [S217]:3187(0.4380E+5) [S216]:3175(0.4378E+5) [S215]:3163(0.4321E+5) [S214]:3139(0.4321E+5)
 ... 
 [S4]:11( 1183.) [S3]:5( 532.5123) [S2]:3( 133.1281) [S1]:1( 0.000000)

This reports the set of closed reciprocal lattice (RL) shells defined internally that contain G-vectors with the same modulus. The highest number of RL vectors we can use is 3187. Yambo will always redefine any input variable in RL units to the nearest closed shell.

 [02.05] Energies [ev] & Occupations
 ===================================
 Fermi Level        [ev]:  5.112805
 VBM / CBm          [ev]:  0.000000  3.876293
 Electronic Temp. [ev K]:  0.00      0.00
 Bosonic    Temp. [ev K]:  0.00      0.00
 El. density      [cm-3]: 0.460E+24
 States summary         : Full        Metallic    Empty
                          0001-0008               0009-0100
 Indirect Gaps      [ev]: 3.876293  7.278081
 Direct Gaps        [ev]:  4.28829  11.35409
 X BZ K-points :  72

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.

TIP: You should inspect the report file after every run for errors and warnings.

2D hBN

Simply repeat the steps above. Go to the folder containing the hBN-sheet SAVE directory and launch yambo:

$ cd TUTORIALS/hBN-2D/YAMBO
$ ls
SAVE
$ yambo

Again, inspect the r_setup file, output logs, and verify that ndb.gops and ndb.kpts have been created inside the SAVE folder.

You are now ready to use Yambo!

Summary

From this tutorial you've learned:

  • How to initialize the Yambo databases
  • The Yambo logs and output file structure

Links