To determine the structural ground state of CaO, we need to do a volume optimization of the compound in the B1(NaCl) and B2(CsCl) structures and plot them together to see which structure is the most stable. We need to do the calculations in the same directory CaO.

$ ls
CaO-B1.cell CaO-B1.param CaO-B2.cell CaO-B2.param 

 

CaO-B1.cell

%BLOCK LATTICE_ABC
ang # angstrom units
3.42 3.42 3.42
60 60 60
%ENDBLOCK LATTICE_ABC

%BLOCK POSITIONS_FRAC
Ca 0.000000000000000 0.000000000000000 0.000000000000000
O 0.500000000000000 0.500000000000000 0.500000000000000
%ENDBLOCK POSITIONS_FRAC

kpoint_mp_grid 12 12 12

symmetry_generate

 

 CaO-B1.param

task     SinglePoint          ! The TASK keyword instructs CASTEP what to do
xc_functional PBE ! Which exchange-correlation functional to use.
cut_off_energy 500 eV !
opt_strategy speed ! Choose algorithms for best speed

 

generate_EV.sh

Download the script from the following link and rename it and edit it according to this case as follows:

$ wget https://raw.githubusercontent.com/jazairdz/Castep/refs/heads/main/generate_EV.sh
$ cp generate_EV.sh generate_EV-B1.sh

 

run=CaO-B1
ref_value=3.42

 

for a in 3.15 3.20 3.25 3.30 3.35 3.40 3.45 3.50 3.55 3.60 ; do

 

Execution

$ sudo apt install dos2unix
$ dos2unix generate_EV-B1.sh
$ bash generate_EV-B1.sh

 

CaO-B2.cell

%BLOCK LATTICE_ABC
ang # angstrom units
2.90 2.90 2.90
90 90 90
%ENDBLOCK LATTICE_ABC

%BLOCK POSITIONS_FRAC
Ca 0.000000000000000 0.000000000000000 0.000000000000000
O 0.500000000000000 0.500000000000000 0.500000000000000
%ENDBLOCK POSITIONS_FRAC

kpoint_mp_grid 12 12 12

symmetry_generate

 

 CaO-B2.param

task     SinglePoint          ! The TASK keyword instructs CASTEP what to do
xc_functional PBE ! Which exchange-correlation functional to use.
cut_off_energy 500 eV !
opt_strategy speed ! Choose algorithms for best speed

 

generate_EV.sh

Rename the script and edit it according to this case as follows:

$ cp generate_EV.sh generate_EV-B2.sh

 

run=CaO-B2
ref_value=2.90

 

for a in 2.70 2.75 2.80 2.85 2.90 2.95 3.00 3.05 3.0 ; do

 

Execution

$ dos2unix generate_EV-B2.sh
$ bash generate_EV-B2.sh

 

Plotting both curves

We need to use the script fit_Burch2.py which will download it from the following link:

$ wget https://raw.githubusercontent.com/jazairdz/Castep/refs/heads/main/fit_Burch2.py

$ python fit_Burch2.py

Enter name of (vol,energy) file to load : CaO-B1_EV.dat
Burch-Murnaghan fit parameters:
E0 = -1447.1409 eV
B0 = 0.7900 eV.ang^-3
B' = 4.7128
V0 = 26.0909 ang^3

Bulk modulus = 126.5648 GPa

Graph of data and fit saved as BM_curve.png - please check all is OK
Enter name of (vol,energy) file to load : CaO-B2_EV.dat
Burch-Murnaghan fit parameters:
E0 = -1446.2527 eV
B0 = 0.8203 eV.ang^-3
B' = 4.6591
V0 = 23.0972 ang^3

Bulk modulus = 131.4152 GPa

Graph of data and fit saved as BM_curve.png - please check all is OK
Plot of fit saved as BM_curve.png


We get the following picture which shows that the B1 (NaCl) structure is the ground state structure of CaO.