INSTRUCTIONS FOR DAY 2 (MASTANI 2014), EXERCISE 1
Note that the following color code has been used in this instruction sheet:
Broad headings are in red.
File names are in magenta.
Phrases to be typed into the command line are in blue.
Input parameters are in dark green.
This exercise is meant as an introduction to how to perform simple scf calculations using the pw package of Quantum ESPRESSO. You will perform calculations on Al (a metal).
First, you will first perform simple scf (self-consistent field) calculations on aluminium.
- STEP 1: Go to the directory ~/hands_on/week1/day2/exercise1
You will see the following files:
day2_exercise1_instructions.html this file!
Al.sample.in this is a sample input file, for a primitive Al cell.
Al.sample.sh this is a sample shell script that you can use (optionally) to run a series of calculations on Al.
- STEP 2: Open and read the sample file Al.sample.in
- Compared to your input files for Si (day 1, exercise 1) there are two main differences:
(i) Now nat = 1 instead of nat = 2, and accordingly there is only one Al atom at 0.0 0.0 0.0
(ii) There are additional lines, saying that the occupation should be smeared, which type of smearing to use, and what value of degauss (smearing width) to use.
Note that now we have set verbosity = 'high' in the &control namelist ; so that the code wll print out occupation numbers, etc.
- STEP 3: Use Xcrysden to view the structure in the sample file:
- xcrysden --pwi Al.sample.in &
- STEP 4: Run an scf calculation:
- /usr/local/apps/espresso-5.1/bin/pw.x < Al.sample.in > Al.sample.out
- STEP 5: Read the output, and answer the following questions:
- How many bands were computed? How does this compare with the number of electrons?
- What is the Fermi energy?
- STEP 6: Now do convergence tests with respect to plane-wave cut-off:
- In principle, you should now run a series of calculations with different values of ecutwfc (as you did for Si) and see at what value of ecutwfc your total energy has converged. However, to save time, let us assume that this has been done. Keep working with ecutwfc=12.
- STEP 7: Now do convergence tests with respect to Brillouin zone sampling and smearing width:
- We will simultaneously decide what k-point mesh (values of nk1, nk2, nk3) and the value of the smearing width (degauss) to use. For simplicity, let us assume now that we will only use the Marzari-Vanderbilt smearing.
- Loop over values of nk1, nk2, nk3 = 6 6 6, 8 8 8, 12 12 12, 16 16 16
- For each of these k-point meshes, loop over degauss ranging from 0.02 to 0.10 (at intervals chosen by you).
- Make input files of the form Al.degauss.*_kdiv.*.in (inserting the appropriate values of degauss and nk). In order to do this, you can either edit your input files manually, or use the shell script Al.sample.sh (If doing the latter, read the shell script carefully and see whether you need to insert additional values or lines.
- Run pw.x for each value of nk and degauss, either using the shell script or a command of the form
- /usr/local/apps/espresso-5.1/bin/pw.x < Al.degauss.<val>_kdiv.<val>.in > Al_degauss.<val>_kdiv.<val>.out
(of course, you should substitute the appropriate values).
- Plot a graph showing how the total energy varies with the number of k-points and the smearing width, using a plotting program of your choice.
The 'true' converged result is obtained in the limit of zero smearing and an infinite number of k-points.
Based upon this, decide what values of nk1=nk2=nk3 and degauss you consider satisfactory.
(Note: you will have to achieve some sort of compromise between accuracy and computational time!)
- Stuff for you to do later on (or you can do it now if you have the time):
- Obtain the equilibrium lattice constant of Al:
- Proceed as you did for Si, look for a lattice constant that lies in the range of 7.0 to 8.0 bohr.