Self-Consistent Energy Calculations with QE

The calculations handled by pw.x include seven types, specified in the input file with calculation:

Input File

In QE input files, there are NAMELISTS and INPUT_CARDS.

PWscf requires three mandatory NAMELISTS:

  1. &CONTROL: Specifies the calculation flow.
  2. &SYSTEM: Describes the system.
  3. &ELECTRONS: Defines the algorithm for solving the Kohn-Sham equations.

Two additional NAMELISTS, &IONS and &CELLS, are needed for specific calculations.

The three mandatory INPUT_CARDS in PWscf are ATOMIC_SPECIES, ATOMIC_POSITIONS, and K_POINTS. Other information may be required depending on the calculation.

Example: Self-Consistent Calculation for Silicon (pw.scf.silicon.in)

&CONTROL
calculation='scf',   # Self-consistent field calculation
prefix='silicon',   # Prefix for output files
pseudo_dir='./pseudo/',   # Directory for pseudopotentials
outdir='./out/',   # Directory for output files
/
&SYSTEM
ibrav=2,   # Bravais lattice type (FCC)
celldm(1)=10.2625,   # Lattice constant (in Bohr, 1 Bohr = 0.529 Å)
nat=2,   # Number of atoms
ntyp=1,   # Number of atomic types
ecutwfc=60.0,   # Wavefunction cutoff energy (in Ry, 1 Ry = 13.606 eV)
ecutrho=720.0,   # Charge density cutoff energy
/
&ELECTRONS
mixing_beta=0.7,   # Mixing ratio for charge density (default 0.7)
conv_thr=1d-8,   # Convergence threshold for SCF (default 1d-6)
/
ATOMIC_SPECIES
Si 28.0855 Si.pbe-rrkj.UPF   # Pseudopotential
ATOMIC_POSITIONS (alat)   # Atomic positions (alat = lattice parameter)
Si 0.00 0.00 0.00
Si 0.25 0.25 0.25
K_POINTS automatic  # Automatic k-point grid
4 4 4 1 1 1

Refer to the PWscf User Manual for a detailed explanation.

Execution

mpirun -np 4 pw.x -inp pw.scf.silicon.in > pw.scf.silicon.out

Output File

Check the output file pw.scf.silicon.out for convergence details:

grep -e 'total energy' -e estimate pw.scf.silicon.out

Example:

Self-consistent Calculation

iteration #  1     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  1.00E-02,  avg # of iterations =  2.0
Threshold (ethr) on eigenvalues was too large:
Diagonalizing with lowered threshold
Davidson diagonalization with overlap
ethr =  6.93E-04,  avg # of iterations =  1.0
total cpu time spent up to now is        0.3 secs
total energy              =     -15.83539933 Ry
estimated scf accuracy    <       0.06071141 Ry

iteration #  2     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  7.59E-04,  avg # of iterations =  1.0
total cpu time spent up to now is        0.4 secs
total energy              =     -15.83851631 Ry
estimated scf accuracy    <       0.00218630 Ry

iteration #  3     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  2.73E-05,  avg # of iterations =  2.3
total cpu time spent up to now is        0.4 secs
total energy              =     -15.83897965 Ry
estimated scf accuracy    <       0.00007075 Ry

iteration #  4     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  8.84E-07,  avg # of iterations =  2.6
total cpu time spent up to now is        0.4 secs
total energy              =     -15.83900178 Ry
estimated scf accuracy    <       0.00000211 Ry

iteration #  5     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  2.64E-08,  avg # of iterations =  3.6
total cpu time spent up to now is        0.4 secs
total energy              =     -15.83900299 Ry
estimated scf accuracy    <       0.00000012 Ry

iteration #  6     ecut=    16.00 Ry     beta= 0.70
Davidson diagonalization with overlap
ethr =  1.46E-09,  avg # of iterations =  2.7
total cpu time spent up to now is        0.4 secs

End of self-consistent calculation

Important notes:

!    total energy              =     -15.83900302 Ry
     estimated scf accuracy    <          3.2E-10 Ry

     The total energy is the sum of the following terms:
     one-electron contribution =       4.79863652 Ry
     hartree contribution      =       1.07565897 Ry
     xc contribution           =      -4.81353993 Ry
     ewald contribution        =     -16.89975858 Ry

     convergence has been achieved in   6 iterations

Tips

Additional Details

Exchange-correlation= SLA  PZ   NOGX NOGC
sticks:   dense  smooth     PW     G-vecs:    dense   smooth      PW
Sum         433     433    139                 5961     5961    1067
number of electrons       =         8.00
number of Kohn-Sham states=            8