In this tutorial, we do a volume optimization for the cubic structure as in the case of Silicon. We need to use 2 scripts: a shell script to do automatic calculations for different values of lattice parameter and a python script to do a fitting to the Birch-Murnagham equation.
The input files are Si.cell and Si.param. In the Si.cell file we need to use the lattice parameters as follows:
%BLOCK LATTICE_ABC
[units]
a b c
alpha beta gamma
%ENDBLOCK LATTICE_ABCSi.cell
%block lattice_abc
3.78 3.78 3.78
60.0 60.0 60.0
%endblock lattice_abc
%block positions_frac
Si 0.00 0.00 0.00
Si 0.25 0.25 0.25
%endblock positions_frac
kpoint_mp_grid 4 4 4
symmetry_generate
Si.param
task SinglePoint ! The TASK keyword instructs CASTEP what to do
xc_functional LDA ! Which exchange-correlation functional to use.
cut_off_energy 500 eV !
opt_strategy speed ! Choose algorithms for best speed
You may download the input files using command line:
$ wget https://raw.githubusercontent.com/jazairdz/Castep/refs/heads/main/Si.cell$ wget https://raw.githubusercontent.com/jazairdz/Castep/refs/heads/main/Si.param
Scripts generate_EV.sh and fit_Burch.py
You may download the 2 scripts using the command line
$ wget https://raw.githubusercontent.com/jazairdz/Castep/refs/heads/main/generate_EV.sh$ wget https://raw.githubusercontent.com/jazairdz/Castep/refs/heads/main/fit_Burch.py
Execution
$ sudo apt install dos2unix$ dos2unix generate_EV.sh
$ bash generate_EV.shGenerating energy-volume data for Si
doing a= 3.60
doing a= 3.65
doing a= 3.70
doing a= 3.75
doing a= 3.80
doing a= 3.85
doing a= 3.90
doing a= 3.95
doing a= 4.00
finished with results in Si_EV.dat
NB each run contains 2 atoms
This will create the file Si_EV.dat
$ python fit_Burch.py Enter name of (vol,energy) file to load : Si_EV.dat
Birch-Murnaghan fit parameters:
E0 = -337.9959 eV
B0 = 0.5785 eV.ang^-3
B' = 4.1611
V0 = 39.5975 ang^3
Bulk modulus = 92.6759 GPa
Graph of data and fit saved as BM_curve.png - please check all is OK
Plot of fit saved as BM_curve.png

0 Comments