Skip to content

34: Graphene — Projectability-disentangled Wannier functions

Outline

Obtain MLWFs for graphene using projectability disentanglement. For more details on the methodology, see Ref.1.

Input files

  • Directory: tutorial/tutorial34/

  • graphene.scf The pw.x input file for ground state calculation

    graphene.scf
    Input file
    &CONTROL
      calculation = 'scf'
      etot_conv_thr =   2.0000000000d-05
      forc_conv_thr =   1.0000000000d-04
      outdir = './out/'
      prefix = 'graphene'
      pseudo_dir = '../../pseudo/'
      tprnfor = .true.
      tstress = .true.
      verbosity = 'high'
    /
    &SYSTEM
      degauss =   1.0000000000d-02
      ecutrho =   1.4700000000d+02
      ecutwfc =   3.7000000000d+01
      ibrav = 0
      nat = 2
      nosym = .false.
      ntyp = 1
      occupations = 'smearing'
      smearing = 'cold'
    /
    &ELECTRONS
      conv_thr =   4.0000000000d-10
      electron_maxstep = 80
      mixing_beta =   4.0000000000d-01
    /
    ATOMIC_SPECIES
    C      12.011 C.pbe-n-kjpaw_psl.0.1.UPF
    ATOMIC_POSITIONS angstrom
    C            0.0000000000       1.4202816622       0.0000000000
    C            1.2300000000       0.7101408311       0.0000000000
    K_POINTS automatic
    9 9 1 0 0 0
    CELL_PARAMETERS angstrom
          2.4600000000       0.0000000000       0.0000000000
         -1.2300000000       2.1304224933       0.0000000000
          0.0000000000       0.0000000000      20.0000000000
    
  • graphene.bands The pw.x input file for band structure calculation

    graphene.bands
    Input file
    &CONTROL
      calculation = 'bands'
      etot_conv_thr =   2.0000000000d-05
      forc_conv_thr =   1.0000000000d-04
      outdir = './out/'
      prefix = 'graphene'
      pseudo_dir = '../../pseudo/'
      tprnfor = .true.
      tstress = .true.
      verbosity = 'high'
    /
    &SYSTEM
      degauss =   1.0000000000d-02
      ecutrho =   1.4700000000d+02
      ecutwfc =   3.7000000000d+01
      ibrav = 0
      nat = 2
      nbnd = 60
      nosym = .false.
      ntyp = 1
      occupations = 'smearing'
      smearing = 'cold'
    /
    &ELECTRONS
      conv_thr =   4.0000000000d-10
      diago_full_acc = .true.
    ! diagonalization = 'cg'
      electron_maxstep = 80
      mixing_beta =   4.0000000000d-01
    /
    ATOMIC_SPECIES
    C      12.011 C.pbe-n-kjpaw_psl.0.1.UPF
    ATOMIC_POSITIONS angstrom
    C            0.0000000000       1.4202816622       0.0000000000
    C            1.2300000000       0.7101408311       0.0000000000
    CELL_PARAMETERS angstrom
          2.4600000000       0.0000000000       0.0000000000
         -1.2300000000       2.1304224933       0.0000000000
          0.0000000000       0.0000000000      20.0000000000
    K_POINTS crystal
             274
        0.000000    0.000000    0.000000   1.0
        0.005000    0.000000    0.000000   1.0
        0.010000    0.000000    0.000000   1.0
        0.015000    0.000000    0.000000   1.0
        0.020000    0.000000    0.000000   1.0
        0.025000    0.000000    0.000000   1.0
        0.030000    0.000000    0.000000   1.0
    ...
    ...
    
  • graphene.bandsx The bands.x input file for extracting band structure eigenvalues

    graphene.bandsx
    Input file
    1
    2
    3
    4
    5
    6
    &bands
      prefix = 'graphene',
      outdir = './out/',
      lsym = .false.,
      filband = 'graphene.bands.dat',
    /
    
  • graphene.projwfc The projwfc.x input file for projectability calculation

    graphene.projwfc
    Input file
    &PROJWFC
      deltae =   2.0000000000d-01
      kresolveddos = .false.
      lbinary_data = .false.
      lsym = .false.
      lwrite_overlaps = .false.
      outdir = './out/'
      plotboxes = .false.
      prefix = 'graphene'
      tdosinboxes = .false.
      filproj = 'graphene.bands.dat.proj'
    /
    
  • graphene.plotband The plotband.x input file for plotting band structure

    graphene.plotband
    Input file
    1
    2
    3
    4
    5
    6
    7
    8
    graphene.bands.dat
    1 2 3 4 5 6 7 8
    -21.9130   39.9100
    graphene.plotband.gnu.dat
    graphene.plotband.ps
    -2.3043
    5.0  -2.3043
    graphene.projbands.gnu
    
  • graphene.nscf The pw.x input file to obtain Bloch states on a uniform grid

    graphene.nscf
    Input file
    &CONTROL
      calculation = 'nscf'
      etot_conv_thr =   2.0000000000d-05
      forc_conv_thr =   1.0000000000d-04
      max_seconds =   4.1040000000d+04
      outdir = './out/'
      prefix = 'graphene'
      pseudo_dir = '../../pseudo/'
      tprnfor = .true.
      tstress = .true.
      verbosity = 'high'
    /
    &SYSTEM
      degauss =   1.0000000000d-02
      ecutrho =   1.4700000000d+02
      ecutwfc =   3.7000000000d+01
      ibrav = 0
      nat = 2
      nbnd = 60
      noinv = .true.
      nosym = .true.
      ntyp = 1
      occupations = 'smearing'
      smearing = 'cold'
    /
    &ELECTRONS
      conv_thr =   4.0000000000d-10
      diago_full_acc = .true.
      electron_maxstep = 80
      mixing_beta =   4.0000000000d-01
      startingpot = 'file'
    /
    ATOMIC_SPECIES
    C      12.011 C.pbe-n-kjpaw_psl.0.1.UPF
    ATOMIC_POSITIONS angstrom
    C            0.0000000000       1.4202816622       0.0000000000
    C            1.2300000000       0.7101408311       0.0000000000
    CELL_PARAMETERS angstrom
          2.4600000000       0.0000000000       0.0000000000
         -1.2300000000       2.1304224933       0.0000000000
          0.0000000000       0.0000000000      20.0000000000
    K_POINTS crystal
    81
      0.00000000  0.00000000  0.00000000  1.234568e-02
      0.00000000  0.11111111  0.00000000  1.234568e-02
      0.00000000  0.22222222  0.00000000  1.234568e-02
      0.00000000  0.33333333  0.00000000  1.234568e-02
      0.00000000  0.44444444  0.00000000  1.234568e-02
    ...
    ...
    
  • graphene.pw2wan Input file for pw2wannier90.x

    graphene.pw2wan
    Input file
    1
    2
    3
    4
    5
    6
    7
    &INPUTPP
    ! use pseudo-atomic-orbital projection
      atom_proj = .true.
      outdir = './out/'
      prefix = 'graphene'
      seedname = 'graphene'
    /
    
  • graphene.win The wannier90.x input file

    graphene.win
    Input file
    num_wann = 8
    num_bands = 60
    
    ! use pseudo-atomic orbital projection
    auto_projections = .true.
    
    ! enable projectability disentanglement
    dis_froz_proj = .true.
    dis_proj_max =   0.85
    dis_proj_min =   0.01
    
    ! you can also enable energy window disentanglement, which
    ! will also freeze states inside inner window, so that those
    ! states are always reproduced.
    fermi_energy =  -2.3043
    ! dis_froz_max =  0.5
    
    num_iter = 4000
    conv_tol =   2.0000000000d-10
    conv_window = 3
    dis_num_iter = 4000
    dis_conv_tol =   2.0000000000d-10
    
    mp_grid = 9, 9, 1
    
    ! restart = plot
    bands_plot = .true.
    
    begin unit_cell_cart
    ang
          2.4600000000       0.0000000000       0.0000000000
         -1.2300000000       2.1304224933       0.0000000000
          0.0000000000       0.0000000000      20.0000000000
    end unit_cell_cart
    
    begin atoms_cart
    ang
    C         0.0000000000       1.4202816622       0.0000000000
    C         1.2300000000       0.7101408311       0.0000000000
    end atoms_cart
    
    begin kpoint_path
    G  0.0000000000  0.0000000000  0.0000000000  M  0.5000000000  0.0000000000  0.0000000000
    M  0.5000000000  0.0000000000  0.0000000000  K  0.3333333333  0.3333333333  0.0000000000
    K  0.3333333333  0.3333333333  0.0000000000  G  0.0000000000  0.0000000000  0.0000000000
    end kpoint_path
    
    begin kpoints
      0.00000000  0.00000000  0.00000000
      0.00000000  0.11111111  0.00000000
      0.00000000  0.22222222  0.00000000
      0.00000000  0.33333333  0.00000000
      0.00000000  0.44444444  0.00000000
      0.00000000  0.55555556  0.00000000
      0.00000000  0.66666667  0.00000000
    ...
    ...
    
  • graphene_bandsdiff.gnu The gnuplot script to compare DFT and Wannier bands

    graphene_bandsdiff.gnu
    Gnuplot script
    #!/usr/bin/env gnuplot
    set terminal pdf enhanced color dashed lw 1 size 6in,9in
    set output "graphene_bandsdiff.pdf"
    set size ratio 1.5
    fermi = -2.3043
    # set style data dots
    set key
    set xrange [0: 4.02877]
    set yrange [(-22.91167 - fermi) : (23.53815 - fermi)]
    set arrow from  1.47463, (-22.91167 - fermi) to  1.47463,  (23.53815 - fermi) nohead
    set arrow from  2.32601, (-22.91167 - fermi) to  2.32601,  (23.53815 - fermi) nohead
    set xtics ("G"  0.00000,"M"  1.47463,"K"  2.32601,"G"  4.02877)
    # scale QE x-axis to be consistent with w90
    plot "graphene.bands.dat.gnu" u ($1*2.554):($2 - fermi) w l title "QE", \
         "graphene_band.dat" u 1:($2 - fermi) w l title "W90"
    

Steps

  1. Run pw.x to obtain the ground state of graphene

    Terminal
    pw.x < graphene.scf > scf.out
    
  2. Run pw.x to obtain the band structure of graphene

    Terminal
    pw.x < graphene.bands > bands.out
    
  3. Run projwfc.x to obtain the band structure projectability of graphene

    Terminal
    projwfc.x < graphene.projwfc > projwfc.out
    
  4. Run bands.x to obtain a graphene.bands.dat file containing the band structure of graphene

    Terminal
    bands.x < graphene.bandsx > bandsx.out
    
  5. Run plotband.x to plot the band structure with projectability for graphene

    Note

    Run plotband.x interactively to see the meaning of each line in the input file.

    1. First rename file so that it can be recognized by plotband.x

      Terminal
      mv graphene.bands.dat.proj.projwfc_up graphene.bands.dat.proj
      
    2. Run plotband.x

      Terminal
      plotband.x < graphene.plotband > plotband.out
      
    3. Generate a graphene.projbands.gnu_projected.ps file

      Terminal
      gnuplot graphene.projbands.gnu
      
    4. Generate a graphene.projbands.gnu_projected.pdf file, see the following Fig. Projected bands

      Terminal
      ps2pdf graphene.projbands.gnu_projected.ps
      

      Projected bands
      Band structure of graphene with projectability.

  6. Run pw.x to obtain the Bloch states on a uniform k-point grid

    Terminal
    pw.x < graphene.nscf > nscf.out
    
  7. Run wannier90.x -pp to generate a list of the required overlaps (written into the graphene.nnkp file).

    Note

    See win input file, no need to specify initial projections, they are automatically chosen from the pseudo-atomic orbitals inside pseudopotentials used in the scf calculation.

    Terminal
    wannier90.x -pp graphene
    
  8. Run pw2wannier90.x to compute the overlap between Bloch states and the projections for the starting guess (written in the graphene.mmn and graphene.amn files).

    Terminal
    pw2wannier90.x < graphene.pw2wan > pw2wan.out
    
  9. Run  to compute the MLWFs.

    Terminal
    wannier90.x graphene
    
  10. Run gnuplot to compare DFT and Wannier-interpolated bands, this will generate a PDF file graphene_bandsdiff.pdf, see the following Fig. Bands comparison.

    Terminal
    ./graphene_bandsdiff.gnu
    

    Notice that high-projectability states in the conduction region are properly reproduced. Try commenting out the dis_froz_proj, dis_proj_max/min lines in the win input file, and use the energy disentanglement dis_froz_max/min, and compare the band interpolations.

    Bands diff
    Comparison of DFT and Wannier bands.

  11. (Optional) Clean up all output files

    Terminal
    make clean
    

  1. Junfeng Qiao, Giovanni Pizzi, and Nicola Marzari. Projectability disentanglement for accurate and automated electronic-structure Hamiltonians. npj Comput. Mater., 9(1):208, Nov 2023. doi:10.1038/s41524-023-01146-w