3
$\begingroup$

I need to calculate the bands of the structure I'm working on, can anyone tell me how I create the input file to calculate the bands?

$\endgroup$
2

2 Answers 2

4
$\begingroup$

A general idea is:

  1. Determine the crystal symmetry of your system.
  2. Select the path between high symmetry points to calculate the bands (follow one of these links: 1, 2, 3 or read this paper).
  3. Use a sample file as a guide to add the path information to your input file or use a GUI like BURAI.
  4. You can search YouTube for tutorials about calculating bands using QuantumEspresso.
$\endgroup$
1
  • $\begingroup$ Could you share a file of any structure you made as an example, so I can try to build my file based on that example $\endgroup$ Sep 12, 2023 at 18:01
3
$\begingroup$

Using Quantum ESPRESSO, you can follow one of several routes to calculate the band structure of your material. The number of input files depends on the specific path that you follow. All routes have almost the same structure. You first obtain the electronic ground state by doing an SCF calculation and then perform the post-processing to get the bands. Two of the most common ways to achieve this are:

  1. The first way is to do a pw.x scf calculation with uniform k-mesh and smearing, then a pw.x bands calculation with k-points corresponding to you material's band structure (this is an excellent reference), then a bands.x post-processing to obtain the band structure data. Now to plot the output data, you can either use plotband.x (basic plot) or use your own script for improved quality and features.
  2. The second way is to do a pw.x calculation with no smearing, then a pw.x nscf calculation with dense k-mesh, then a pw.x bands calculation with specific k-points, and then the post-processing stuff same as before.

The first way takes less time, computationally easy to converge but slightly inaccurate. The second way has an additional step, takes more time to converge but relatively more accurate. Below, I am listing the input files needed for the first workflow. If you need more accuracy, you can prepare the input files accordingly by doing some modifications.

I have downloaded the CIF file you provided. Assuming it's a periodic structure, I have prepared a input file using Quantum ESPRESSO input generator. You need to run this input using pw.x executable.

&CONTROL
  calculation = 'scf'
  outdir = './outdir/'
  prefix = 'mmse'
  pseudo_dir = './pseudo/'
  verbosity = 'high'
/
&SYSTEM
  ibrav = 0
  nat = 20
  ntyp = 4
  ecutrho =   400
  ecutwfc =   50
  occupations = 'smearing'
  smearing = 'mv'
  degauss =   0.001
/
&ELECTRONS
  conv_thr =   1d-8
/
ATOMIC_SPECIES
Ca     40.078    ca_pbesol_v1.uspp.F.UPF
O      15.999    O.pbesol-n-kjpaw_psl.0.1.UPF
P      30.973    P.pbesol-n-rrkjus_psl.1.0.0.UPF
Si     28.085    Si.pbesol-n-rrkjus_psl.1.0.0.UPF
ATOMIC_POSITIONS crystal
Si           0.0000000000       0.0000000000       0.5000000000 
Si           0.0000000000       0.0000000000       0.0000000000 
Ca           0.6666670000       0.3333330000       0.3797950000 
P            0.3333330000       0.6666670000       0.6202050000 
P            0.3333330000       0.6666670000       0.8797950000 
P            0.6666670000       0.3333330000       0.1202050000 
O            0.2652530000       0.3303280000       0.5860850000 
O            0.6696720000       0.9349250000       0.5860850000 
O            0.7347470000       0.6696720000       0.0860850000 
O            0.3303280000       0.0650750000       0.4139150000 
O            0.6666670000       0.3333330000       0.2500000000 
O            0.9349250000       0.2652530000       0.0860850000 
O            0.6696720000       0.9349250000       0.9139150000 
O            0.9349250000       0.2652530000       0.4139150000 
O            0.0650750000       0.7347470000       0.5860850000 
O            0.3303280000       0.0650750000       0.0860850000 
O            0.2652530000       0.3303280000       0.9139150000 
O            0.0650750000       0.7347470000       0.9139150000 
O            0.7347470000       0.6696720000       0.4139150000 
O            0.3333330000       0.6666670000       0.7500000000 
K_POINTS automatic
8 8 3 0 0 0
CELL_PARAMETERS angstrom
      4.7132930000       0.0000000000       0.0000000000
     -2.3566465000       4.0818314735       0.0000000000
      0.0000000000       0.0000000000      11.9970890000

Now, you must take notes of few things. The ecutwfc and k-mesh parameter must be converged. A not great but somewhat reasonable method is to start from maybe 30 Ry and then increase it by 10 Ry up to 100 Ry and check at which ecutwfc you are getting an energy difference less than 0.1 mRy. Choose that as your ecutwfc in the actual calculation. The same goes for k-mesh. Camps' answer contains some very helpful link where you will get some bash script that does these things automatically for you. Check those please.

The second thing you have to take care is the pseudopotentials. Change them according to the ones you have access to. They should be in a directory called pseudo. I have taken these pseudopotentials from Standard solid-state pseudopotentials SSSP.

After running this calculation, you will have a directoty called outdir and an output file also. See the number of Kohn-Sham states from the output file. Multiply that number with 1.3 (if you are trying to get a non-spin polarised/regular band structure) or 2.5 (if you are looking for a spin-polarised band structure). These numbers are not strict. Choose an integer value close to the number you obtained after multiplication as the nbnd value. Now, run the pw.x calculation again with band structure

&CONTROL
  calculation = 'bands'
  outdir = './outdir/'
  prefix = 'mmse'
  pseudo_dir = './pseudo/'
  verbosity = 'high'
/
&SYSTEM
  nbnd = !follow the above written instruction
  ibrav = 0
  nat = 20
  ntyp = 4
  ecutrho =   400
  ecutwfc =   50
  occupations = 'smearing'
  smearing = 'mv'
  degauss =   0.001
/
&ELECTRONS
  conv_thr =   1d-8
/
ATOMIC_SPECIES
Ca     40.078    ca_pbesol_v1.uspp.F.UPF
O      15.999    O.pbesol-n-kjpaw_psl.0.1.UPF
P      30.973    P.pbesol-n-rrkjus_psl.1.0.0.UPF
Si     28.085    Si.pbesol-n-rrkjus_psl.1.0.0.UPF
ATOMIC_POSITIONS crystal
Si           0.0000000000       0.0000000000       0.5000000000 
Si           0.0000000000       0.0000000000       0.0000000000 
Ca           0.6666670000       0.3333330000       0.3797950000 
P            0.3333330000       0.6666670000       0.6202050000 
P            0.3333330000       0.6666670000       0.8797950000 
P            0.6666670000       0.3333330000       0.1202050000 
O            0.2652530000       0.3303280000       0.5860850000 
O            0.6696720000       0.9349250000       0.5860850000 
O            0.7347470000       0.6696720000       0.0860850000 
O            0.3303280000       0.0650750000       0.4139150000 
O            0.6666670000       0.3333330000       0.2500000000 
O            0.9349250000       0.2652530000       0.0860850000 
O            0.6696720000       0.9349250000       0.9139150000 
O            0.9349250000       0.2652530000       0.4139150000 
O            0.0650750000       0.7347470000       0.5860850000 
O            0.3303280000       0.0650750000       0.0860850000 
O            0.2652530000       0.3303280000       0.9139150000 
O            0.0650750000       0.7347470000       0.9139150000 
O            0.7347470000       0.6696720000       0.4139150000 
O            0.3333330000       0.6666670000       0.7500000000 
K_POINTS crystal
394
!I have truncuated the full list of 394 k-points and included only 5 of them
!Upload your CIF to https://www.materialscloud.org/work/tools/seekpath 
!And get the full list of 394 k-points. Copy-paste them here
    0.0000000000     0.0000000000     0.0000000000 1
    0.0172413793     0.0000000000     0.0000000000 1
    0.0344827586     0.0000000000     0.0000000000 1
    0.0517241379     0.0000000000     0.0000000000 1
    0.0689655172     0.0000000000     0.0000000000 1
    0.0862068966     0.0000000000     0.0000000000 1
!I have truncuated the full list of 394 k-points and included only 5 of them
!Upload your CIF to https://www.materialscloud.org/work/tools/seekpath 
!And get the full list of 394 k-points. Copy-paste them here

CELL_PARAMETERS angstrom
      4.7132930000       0.0000000000       0.0000000000
     -2.3566465000       4.0818314735       0.0000000000
      0.0000000000       0.0000000000      11.9970890000

Now, you have successfully calculated the ground state. You can post-process the data needed to get the band structure using bands.x. For that, run the following input file:

&bands
  outdir='./outdir/'
  prefix='mmse'
  filband='Your_material.dat'
/

This will generate at least two files: a Your_material.dat file which contains data suitable to plot with plotband.x executables, and a Your_material.dat.gnu file which can be directly plotted using gnuplot/xmgrace type of software. Let's take a look at how to do this using plotband.x. First, take a note of the Fermi energy from the scf output file. Do:

$ grep -e 'Fermi' your_output_file.out 

You will see the Fermi energy from here. Then type plotband.x in the command line. It will give you the band extrema values. Type those or other pair of values if you wanna modify the range. plotband.x is interactive, so it will ask you the Fermi energy, deltaE etc. one by one. Provide those info and you will get several data files and a .ps file containing the band structure image. If you need a fancier plot, use this python script.

Lastly, plotband.x can also be executed using an input file. The input file should look like:

X.bands.dat    !name of the input data file which is the output of bands.x
-20 20         !lower and upper level of band in eV
X.bands.xmgr   !output image file (choose anything)
X.bands.ps     !output image file (choose anything)
0.0000         !Fermi level
0.0 0.0000     !DeltaE(interval between axis labels/ticks) and Fermi level offset (to set it as 0)

So in summary, if you carefully prepared all the input files, you can get the band structure by running the following commands. If you are using more than 1 processor, use mpirun -np or other mpi executables accordingly before the QE executables and specify the # of the processors.

pw.x < material.scf.in |tee material.scf.out

pw.x < material.bands.in |tee material.bands.out

bands.x < material.bands.pp.in |tee material.bands.pp.out

plotband.x < material.plotband.in |tee material.plotband.out
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .