2D material: h-BN sheet: Difference between revisions

From The Yambo Project
Jump to navigation Jump to search
(Created page with "== Prerequisites == thumb|Atomic structure of 2D hBN '''Material properties''': * HCP lattice, ABAB stacking * Four atoms per cell, B and N (16 electrons, )...")
 
No edit summary
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
In this tutorial you will learn how to generate the Yambo SAVE folder for a 2D hBN sheet starting from a PWscf calculation.
== Prerequisites ==
== Prerequisites ==
[[File:HBN2.png|thumb|Atomic structure of 2D hBN]]
'''Previous modules'''
 
* You must first follow the tutorial on [[Bulk_material:_h-BN|bulk hBN]].
'''Material properties''':
* HCP lattice, ABAB stacking
* Four atoms per cell, B and N (16 electrons, )
* Lattice constants: ''a'' = 4.716 [a.u.], ''c/a'' = 2.582
* Plane wave cutoff 40 Ry (1500 RL vectors in wavefunctions)
 
'''You will need''':
'''You will need''':
* PWSCF input files and pseudopotentials for hBN bulk (Download here)
* <code>pw.x</code> executable, version 5.0 or later
* <code>pw.x</code> executable, version 5.0 or later
* <code>p2y</code> executable
* <code>p2y</code> executable
* Follow the instructions in the [[Tutorials#Files|File page]] and download and unpack the hBN-2D.tar.gz.
Unpack the TARFILE:
'''
$ tar -xcvf hBN-bulk.tar
 
  $ cd hBN/PWSCF
== System characteristics ==
[[File:HBN2.png|thumb|Atomic structure of 2D hBN]]
'''Hexagonal boron nitride sheet - 2D hBN''':
* 2D HCP lattice
* Two atoms per cell, B and N (8 electrons)
* Lattice constants: ''a'' = 4.716 [a.u.], ''c/a'' = 7 (supercell size)
* Plane wave cutoff 40 Ry (~5000 RL vectors in wavefunctions)
* SCF run: shifted ''6x6x1'' grid (12 k-points) with 4 bands
* Non-SCF run: gamma-centred ''6x6x1'' (7 k-points) grid with 60 bands
 
== DFT calculations ==
Unpack the tarfile. It uses the same file structure as other yambo tutorials:
  $ cd YAMBO_TUTORIALS/hBN-2D/PWSCF
  $ ls
  $ ls
  hbn_bands.in hbn_nscf.in hbn_scf.in hbn_scf_b.in REFERENCES
  Inputs Pseudos PostProcessing References
hBN_2D_scf.in hBN_2D_nscf.in     hBN_2D_scf_bands.in hBN_2D_nscf_bands.in  
 
The procedure is exactly the same as following in the [[Bulk_material:_h-BN]] tutorial, so no detailed explanations will be given here.


== DFT calculations ==
  pw.x < hBN_2D_scf.in > hBN_2D_scf.out
First run the SCF calculation in the usual manner, e.g.
  pw.x < hBN_2D nscf.in > hBN_2D_nscf.out
  pw.x < hBN_scf.in > hBN_scf.out
 
and then the non-SCF calculation to generate a set of Kohn-Sham eigenvalues and eigenvectors across a denser k-point mesh and for occupied and unoccupied states:
The valence band maximum is computed at -4.29 eV. After these two runs, you should have a <code>hBN_2D.save</code> directory.
  pw.x < hBN_nscf.in > hBN_nscf.out
  $ ls hBN_2D.save
Note the presence of the following flags in the input file:
  data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF
wf_collect=.true.
K00001 K00002 .... K00011 K00012
force_symmorphic=.true.
which are needed for the next step. 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]. After these two runs, you should have a <code>hBN.save</code> directory:
  $ ls hBN.save
  data-file.xml


== Conversion to Yambo format ==
== Conversion to Yambo format ==
PWscf output is converted to the Yambo format using the <code>p2y</code> (pwscf to yambo), found in the yambo <code>bin</code> directory.
Run the converter and check that the databases contain the information you expect:
Enter the <code>hbn.save</code> directory and launch <code>p2y</code>:
$ cd hBN_2D.save
$ p2y
<---> DBs path set to .
<---> Index file set to data-file.xml
...
<---> == P2Y completed ==
$ yambo -D
[RD./SAVE//ns.db1]------------------------------------------
Bands                          :  60
K-points                        :  7
G-vectors            [RL space]: 21817
Components      [wavefunctions]: 2736
...
[RD./SAVE//ns.wf]-------------------------------------------
Fragmentation                    :yes
Bands in each block            :  60
...
[RD./SAVE//ns.kb_pp_pwscf]----------------------------------
Fragmentation                    :yes
- S/N 0000908 -------------------------- v.04.01.02 r.00000 -


  $ cd hBN.save
Note that the number of wavefunction components (G-vectors) is much higher than in the bulk hBN case (why?)
  $ p2y
 
  [output]
Continue using a <code>SAVE</code> we prepared previously:
  $ cd ../../YAMBO
  $ ls
  SAVE
 
==Summary==
From this tutorial you've learned:
* How to run a DFT calculation with PWscf in preparation for Yambo
* Convert the DFT output into the Yambo format
* How to check the contents of the netCDF databases


The code reports some information about the system and generates a <code>SAVE</code> directory:
== More ==
$ ls
* [[Advanced usage|Advanced usage of p2y]]
SAVE HB,in etc
$ ls SAVE
ns.db1 ns.wf ns.kb_pp_pwscf
ns.wf_fragments_1_1 ...
ns.kb_pp_pwscf_fragment_1 ...


Finally, let's move the SAVE directory into a new clean folder:
<br>
mv SAVE ../YAMBO/
{| style="width:100%" border="1"
|style="width:15%; text-align:left"|Prev: [[Tutorials|Tutorials Home]]
|style="width:70%; text-align:center"|Now: [[Tutorials|Tutorials Home]] --> [[First_steps:_a_walk_through_from_DFT_to_optical_properties|First steps]] --> [[2D_material:_h-BN_sheet|2D hBN]]
|style="width:15%; text-align:right"|Next: [[Initialization#2D_hBN|Initialization#2D_hBN]]
|-
|}


== Advanced users ==
[[Category:Modules]]
<code>p2y<code> accepts several command line options:
$ p2y -H
dfadsfas

Latest revision as of 13:38, 31 October 2019

In this tutorial you will learn how to generate the Yambo SAVE folder for a 2D hBN sheet starting from a PWscf calculation.

Prerequisites

Previous modules

  • You must first follow the tutorial on bulk hBN.

You will need:

  • pw.x executable, version 5.0 or later
  • p2y executable
  • Follow the instructions in the File page and download and unpack the hBN-2D.tar.gz.

System characteristics

Atomic structure of 2D hBN

Hexagonal boron nitride sheet - 2D hBN:

  • 2D HCP lattice
  • Two atoms per cell, B and N (8 electrons)
  • Lattice constants: a = 4.716 [a.u.], c/a = 7 (supercell size)
  • Plane wave cutoff 40 Ry (~5000 RL vectors in wavefunctions)
  • SCF run: shifted 6x6x1 grid (12 k-points) with 4 bands
  • Non-SCF run: gamma-centred 6x6x1 (7 k-points) grid with 60 bands

DFT calculations

Unpack the tarfile. It uses the same file structure as other yambo tutorials:

$ cd YAMBO_TUTORIALS/hBN-2D/PWSCF
$ ls
Inputs		Pseudos		PostProcessing		References
hBN_2D_scf.in	hBN_2D_nscf.in     hBN_2D_scf_bands.in  hBN_2D_nscf_bands.in 

The procedure is exactly the same as following in the Bulk_material:_h-BN tutorial, so no detailed explanations will be given here.

pw.x < hBN_2D_scf.in > hBN_2D_scf.out
pw.x < hBN_2D nscf.in > hBN_2D_nscf.out

The valence band maximum is computed at -4.29 eV. After these two runs, you should have a hBN_2D.save directory.

$ ls hBN_2D.save
data-file.xml charge-density.dat gvectors.dat B.pz-vbc.UPF N.pz-vbc.UPF
K00001	K00002 .... 	K00011	K00012

Conversion to Yambo format

Run the converter and check that the databases contain the information you expect:

$ cd hBN_2D.save
$ p2y
<---> DBs path set to .
<---> Index file set to data-file.xml
...
<--->  == P2Y completed ==

$ yambo -D
[RD./SAVE//ns.db1]------------------------------------------
Bands                           :  60
K-points                        :  7
G-vectors             [RL space]: 21817
Components       [wavefunctions]: 2736
...
[RD./SAVE//ns.wf]-------------------------------------------
Fragmentation                    :yes
Bands in each block             :  60
...
[RD./SAVE//ns.kb_pp_pwscf]----------------------------------
Fragmentation                    :yes
- S/N 0000908 -------------------------- v.04.01.02 r.00000 -

Note that the number of wavefunction components (G-vectors) is much higher than in the bulk hBN case (why?)

Continue using a SAVE we prepared previously:

$ cd ../../YAMBO
$ ls
SAVE

Summary

From this tutorial you've learned:

  • How to run a DFT calculation with PWscf in preparation for Yambo
  • Convert the DFT output into the Yambo format
  • How to check the contents of the netCDF databases

More


Prev: Tutorials Home Now: Tutorials Home --> First steps --> 2D hBN Next: Initialization#2D_hBN