Difference between revisions of "Solution LAB1 bands DOS diamond"

From Wiki Max
Jump to navigation Jump to search
Line 9: Line 9:
 
   ecutwfc = 60.0    # could be lowered further
 
   ecutwfc = 60.0    # could be lowered further
 
   alat = 6.6694212
 
   alat = 6.6694212
 +
 +
As a preliminary step:
 +
* make a new directory, e.g. called Diamond_BANDS
 +
* In a situation like this it is always a good idea to start over from scratch with a fresh scf calculation.
 +
* prepare an input file for a single scf run according to the parameters above.
 +
  &CONTROL
 +
    calculation="scf"
 +
    [...]
 +
  /
 +
  &SYSTEM
 +
    alat=...
 +
    ecutwfc=...
 +
  /
 +
  [...]
 +
  K_POINTS {automatic}
 +
  8 8 8  0 0 0
 +
 +
* run the calculation as:
 +
  mpirun -np 2 pw.x < scf.in > scf.out
 +
* The use of <code>mpirun -np 2</code> in the example above makes the calculation running on two MPI processes.
 +
 +
We start by addressing the '''calculation of the DOS'''.
 +
 +
We need now to write the input file for a non-self consistent calculation using a regular k-point grid.
 +
The input file looks like:
 +
  >$ cat nscf_dos.in
 +
  &CONTROL
 +
    calculation="nscf"
 +
    verbosity="high"    # not strictly needed but useful sometimes
 +
    [...]
 +
  /
 +
  &SYSTEM
 +
    alat=...
 +
    ecutwfc=...
 +
    nbnd=20              # let's include some empty states
 +
  /
 +
  [...]
 +
  K_POINTS {automatic}
 +
  20 20 20  0 0 0        # here we use a much denser kpt grid
 +
 +
Then we run it
 +
  mpirun -np 2 pw.x < nscf_dos.in > nscf_dos.out
 +
 +
Given the number of k-points requested, the calculation may take some time.
 +
 +
At this point we can prepare an input file for the <code>dos.x</code> program,
 +
  $> cat  dos.in
 +
  &DOS
 +
    prefix = 'diamond'
 +
    outdir = './SCRATCH/'   
 +
    degauss=0.025  !  [Ry]  broadening parameter
 +
    fildos = 'dos_diamond_0.025Ry.dat'
 +
  /
 +
 +
The variable <code>degauss</code> controls the gaussian broadening used to approximate
 +
Dirac delta's in the calculation.
 +
 +
Try to change this value to get a feeling of the effect is has on the computed DOS.
 +
 +
An example is show in the figure below.
 +
 +
[[File:Dos_diamond.jpg | 450px| DOS of Diamond for different values of gaussian broadening.]]

Revision as of 11:48, 16 December 2020

Band structure and DOS of Diamond

Given the calculations run previously to determine the converged set of k-points, ecutwfc, and lattice parameter, here we set the following:

 nk = 8
 ecutwfc = 60.0     # could be lowered further
 alat = 6.6694212

As a preliminary step:

  • make a new directory, e.g. called Diamond_BANDS
  • In a situation like this it is always a good idea to start over from scratch with a fresh scf calculation.
  • prepare an input file for a single scf run according to the parameters above.
 &CONTROL
   calculation="scf"
   [...]
 /
 &SYSTEM
   alat=...
   ecutwfc=...
 /
 [...]
 K_POINTS {automatic}
 8 8 8  0 0 0
  • run the calculation as:
 mpirun -np 2 pw.x < scf.in > scf.out
  • The use of mpirun -np 2 in the example above makes the calculation running on two MPI processes.

We start by addressing the calculation of the DOS.

We need now to write the input file for a non-self consistent calculation using a regular k-point grid. The input file looks like:

 >$ cat nscf_dos.in
 &CONTROL
   calculation="nscf"
   verbosity="high"     # not strictly needed but useful sometimes
   [...]
 /
 &SYSTEM
   alat=...
   ecutwfc=...
   nbnd=20              # let's include some empty states
 /
 [...]
 K_POINTS {automatic}
 20 20 20  0 0 0        # here we use a much denser kpt grid

Then we run it

 mpirun -np 2 pw.x < nscf_dos.in > nscf_dos.out

Given the number of k-points requested, the calculation may take some time.

At this point we can prepare an input file for the dos.x program,

 $> cat  dos.in
 &DOS
    prefix = 'diamond'
    outdir = './SCRATCH/'    
    degauss=0.025  !  [Ry]  broadening parameter
    fildos = 'dos_diamond_0.025Ry.dat'
 / 

The variable degauss controls the gaussian broadening used to approximate Dirac delta's in the calculation.

Try to change this value to get a feeling of the effect is has on the computed DOS.

An example is show in the figure below.

DOS of Diamond for different values of gaussian broadening.