Basics And Bonding

Learning Objectives

  • Introduction to CASTEP input and output files.


The aim of this exercise is to familiarise you with CASTEP input and output files and running the code, some associated utilities and conversion programs. You will run some simple and small CASTEP calculations on canonical examples of covalently and ionically bonded materials - silicon and sodium chloride - and use the results to study the bonding from an electronic structure perspective.

While performing the exercises try to think about the reasons for each step, and about how to interpret the results. The point of the exercise is not merely to reach the end but to learn the path. The exercise below contains a number of questions. Please take note when a question is asked of you, and think about the answer.

Where To Find Help

If you want more information about a particular CASTEP keyword, or you want to find if CASTEP has particular functionality, there are a few places you can look.

  1. There is information on this website: www.castep.org.
  2. CASTEP has an in built help option to assist with using particular keywords. Information on using CASTEP can be seen by using:

    $ castep -help

    To get more information on a particular input file keyword (e.g. kpoint_mp_grid) use:

    $ castep -help kpoint_mp_grid

    If you don't know the keyword you need to use, then you can search on a particular keyword. This returns a list of keywords that you might be interested in, e.g. to look at all keywords which contain a reference to symmetry.

    $ castep -help search symmetry

    Finally, to list all keywords, use:

    $ castep -help search all

Example 1 - Silicon

Start a new terminal

1. Get the files required for this exercise

$ wget http://www.castep.org/files/Si2.tgz

2. Unzip and untar them, then move into the new directory

$ gunzip Si2.tgz
$ tar -xvf Si2.tar
$ cd Si2

3. Examine the CASTEP input files Si2.cell and Si2.param using your favourite text editor (e.g. nano). The Si_00.usp file is a pseudopotential file, you do not need to understand it at the moment.

$ nano Si2.cell
$ nano Si2.param

4. Viewing your input geometry using Jmol.

It is useful to view the structure before submitting your calculation using CASTEP. Many of the CASTEP outpuf files are viewable using Jmol. To open the Si2.cell file using Jmol: open Jmol then use File => Open and navigate to your Si2.cell file. Alternatively, you can drag and drop the Si2.cell file into the Jmol window, and Jmol will open it.

It can be helpful to view multiple repeat units of your unit cell. The easiest way to do this in Jmol is to open a console window, click File => Console and type:
$ load "" { 2 2 2 }
To show a 2x2x2 supercell. Check the geometry of the input file is what you expect it to be before moving onto the next step.

6. Now run CASTEP using the 2-atom input files. $ castep Si2 This should only take a few seconds and produce a readable output file Si2.castep. Examine this file and try to understand the meaning of the various parts. In particular check the section following the header which lists all of the input parameters, both explicit and default. Note what default values of the major parameters CASTEP chose where you did not specify them explicitly. (There will be some whose meaning has not been explained. Don't worry about these.)

  • Find the section of the file which monitors the SCF loop and the approach to convergence. How many SCF iterations did it need?

8. Jmol can also be used to view the isodensity map, open the castep file by dragging and dropping the Si2.castep file into the Jmol window.

Open the Jmol console (File => Console) and type the following commands:
$ load "" { 2 2 2 }
$ isosurface cutoff 10 "Si2.den_fmt" lattice { 2 2 2 }

  • Note: depending on how Jmol is set up you may have to supply a full path to the file e.g. C:/Documents and Settings/Si/Si.den_fmt
  • Jmol uses forward slash for paths to files on windows and linux based machines.

This Si2.den_fmt file is a formatted file produced by CASTEP that contains the value of the electron density on a grid of points. This isosurface command in Jmol plots an isodensity surface over your atomic positions.

 Answer the following questions:
  1. Can you explain what you see as you vary the isosurface value?
  2. Can you see any features which might be characteristic of a covalently-bonded crystal.
  3. Do you notice anything strange about the electron density close to the Si nucleus?
  4. Can you explain this as a consequence of the particular kind of electronic structure calculation you have just performed?

9. Repeat steps 1-8 using input files for sodium chloride and aluminium.

$ wget http://www.castep.org/files/Al.tgz

$ wget http://www.castep.org/files/NaCl.tgz

 Think about the following questions:
  • Note what similarities and differences you find compared to silicon?
  • Does this help explain the difference in bond chemistry between silicon, sodium chloride and aluminium?
  • Does this help explain why there are many reasonable classical potential functions for NaCl to be found in the simulation literature, but that finding good potentials for silicon is a tough challenge?
  • What about aluminium, can you find good classical potentials for aluminium?