Structural and electronic properties of semiconductors and metals
Prev: LabQSM#Lecture 1: Basic DFT calculations and Convergences
Structural and electronic properties of Diamond
In this tutorial we will see how to setup a calculation and to get total energies using the PW code from the Quantum ESPRESSO distribution.
Some helpful conversions:
1 bohr = 1 a.u. (atomic unit) = 0.529177249 angstroms.
1 Rydberg = 13.6056981 eV
1 eV =1.60217733 x 10-19 Joules
For all first-principles calculations, you must pay attention to two convergence parameters. The first one is the energy cutoff, which is the max kinetic energy used in wave-function expansion. The second is the number of k-points, which measures how well the continuous integral over the BZ is discretized.
Diamond is a face-centered cubic structure with two C atoms at 0 0 0 and 0.25 0.25 0.25 a is the lattice parameter
Now let's see in detail how a QE input is structured to make a total energy calculation for this system. An example can be found in ~/LabQSM/LAB_1/test_diamond/scf.diamond.in that you can read e.g. using the editor vi
:
Input file description
&CONTROL prefix='diamond', calculation = 'scf' restart_mode='from_scratch', pseudo_dir = './pseudo/' outdir = './SCRATCH' / &SYSTEM ibrav = 2, celldm(1) = 6.7402778 nat = 2, ntyp = 1, ecutwfc = 40.0 / &ELECTRONS mixing_mode = 'plain' mixing_beta = 0.7 conv_thr = 1.0d-8 / ATOMIC_SPECIES C 12.011 C.pz-vbc.UPF ATOMIC_POSITIONS (alat) C 0.00 0.00 0.00 C 0.25 0.25 0.25 K_POINTS {automatic} 4 4 4 0 0 0
The input file for PWscf is structured in a number of NAMELISTS and INPUT CARDS:
&NAMELIST1 ... / &NAMELIST2 ... / &NAMELIST3 ... / INPUT_CARD1 .... .... INPUT_CARD2 .... ....
The use of NAMELISTS allows to specify the value of an input variable, not all the variables need to be specified, for most variable, a default value is assigned. Variable can be inserted in any order. NAMELISTS are read in a specific order. INPUT CARDS are specific of QuantumESPRESSO codes and are used to provide input data that are always needed.
There are three mandatory NAMELISTS:
- &CONTROL: variables that control the kind of calculation (here scf), where to get the pseudopopotentials, and the verbosity needed in the output.
- &SYSTEM: variables specifying the system as the crystal structure, number of atoms, dimension of the basis set.
- &ELECTRONS variables controlling the algorithm to solve the Kohn-Sham equations.
Next, we have three mandatory INPUT CARDS:
- ATOMIC_SPECIES : name, mass and pseudopotential file
- ATOMIC_POSITIONS: atom type and coordinate in the unit cell
- K_POINTS: definition of the k point grid for the BZ integration
Other NAMELISTS relative to other kinds of calculations as relaxations, cell relaxations and other INPUT CARDS will be shown later.
The complete list of QE variables can be found in the documentation of the code at: | http://www.quantum-espresso.org/Doc/INPUT_PW.html
Now that we know how a QE input looks like let's run it and see what the code does and analyze the output:
Running pw.x
Let's create a working directory e.g.
mkdir diamond
and copy in this directory
$ ./pw.x < scf.diamond.in > scf.diamond.out