VASP Combined With Phonopy to Calculate the Specific Heat Capacity of Silicon
VASP stands for Vienna Ab initio Simulation Package (The VASP Manual – VASP Wiki) is a computer program for atomic-scale material modeling from first principles, such as electronic structure calculations and quantum mechanical molecular dynamics.
PhonopyWelcome to phonopy — Phonopy v.2.37.1) is a Python toolkit for computing phonon band structures, thermal properties, group velocities, and other phonon-related quantities at the harmonic and quasi-harmonic levels.
Under the simple harmonic approximation, the specific heat capacity shared by phonons isSpecific derivationYou can check it out on Phonopy’s official website.
Tutorial Content
This tutorial will use an automated script to demonstrate the calculation process using Phonopy. Through this tutorial, you will learn the basic process of specific heat capacity calculation:
- Prepare perturbation difference supercell structure
- Calculate the total energy of all structures
- Calculate the force constant matrix
- Calculation of the specific heat capacity of silicon from the force constant matrix
Input File
The input file contains
├── POSCAR-unitcell
├── clean.sh
├── run.sh
└── run_vasp.sh
├── pt
│ ├── INCAR
│ ├── KPOINTS
│ └── POTCAR
POSCAR-unitcell
Si #硅结构
5.38930000000000
0.0000000000000000 0.5071343999939496 0.5071343999939496
0.5071343999939496 0.0000000000000000 0.5071343999939496
0.5071343999939496 0.5071343999939496 0.0000000000000000
2
Direct
0.8750000000000000 0.8750000000000000 0.8750000000000000
0.1250000000000000 0.1250000000000000 0.1250000000000000
clean.sh
#!/bin/bash
rm -r *.yaml thermal_properties.pdf
band.yaml FORCE_SETS vasp poscar *out SPOSCAR
# 删除不必要文件
run.sh
#!/bin/bash
rm -r vasp poscar
#准备微扰差分超胞结构
##########################
phonopy -d --dim 2 2 2 --pa auto -c POSCAR-unitcell
mkdir poscar
mv POSCAR-unitcell pp
mv POSCAR-* poscar/
##########################
#计算所有结构的总能
##########################
mkdir vasp
cd vasp
Pnum=$(ls -l ../poscar/ -IR | grep "^-" | wc | awk -F ' ' '{print $1}')
cp ../run_vasp.sh .
t_head="for i in {1.."
t_tail="}"
sed -i "3c ${t_head}${Pnum}${t_tail}" run_vasp.sh #生成 vasp 计算脚本
./run_vasp.sh
##########################
cd ../
mv pp POSCAR-unitcell
#计算力常数矩阵
##########################
phonopy -f vasp/*/vasprun.xml > pfcout
##########################
#根据力常数矩阵计算比热容
##########################
phonopy-load --mesh 31 31 31 -t -p -s
##########################
run_vasp.sh
#!/bin/bash
#计算 vasp 流程自动脚本
for i in {1..8}
do
rm -r $i
mkdir $i
cd $i
ii=$(printf "%03d" $i)
cp ../../poscar/POSCAR-${ii} POSCAR
cp ../../pt/* .
mpirun -n 1 vasp_std
cd ../
done
Files in folder pt
INCAR standard static calculation
ISTART = 1 (若有波函数、读取波函数)
ISPIN = 1 (非极化计算)
Static Calculation
ISMEAR = 0 (高斯占据)
SIGMA = 0.05 (高斯展宽)
NELM = 60 (最大电子步)
EDIFF = 1E-08 (SCF 收敛精度)
KPOINTS
K-Spacing Value to Generate K-Mesh: 0.040
0
Gamma
4 4 4
0.0 0.0 0.0
POTCAR
The pseudopotential combination of the corresponding elements in the system, here is the pseudopotential of Si
Getting Started
1. Clone the container
Find the tutorial working directory and clone the container
2. Set up the container
Select 4090 — Pay as you go — vasp 6.3.0-cuda11.8 — Workspace

After loading, open the workspace

Open Terminal

Unzip the package
unzip Cv_dft.zip
Enter the directory
cd Cv_dft
Upload the prepared silicon pseudopotential
Here you can useOfficial website examplePut the pseudopotential POTCAR in the directory

3. Install the phonopy environment
Enter the following command to install the phonopy environment
conda install -c conda-forge phonopy
Then enter y and press Enter to agree to the installation

4. Run the script
Run the script by typing:
chmod 777 *.sh
./run.sh
5. View the “Specific Heat v Temperature” graph
The final calculated result will be output in pdf

View the file thermal_properties.pdf

We can see in the terminal that the specific heat capacity ends up being 48.8006881 J/K/mol.
Here we need to convert the units to the common units J/K/kg. There are 2 atoms in the unit cell, and the molar mass of the unit cell is 0.056kg/mol. Let's do a simple conversion:
48.8006881/0.056 J/K/kg = 871.4408589285714 J/K/kg
It can be seen that the final results are consistent with the paper "Study on thermal properties of silicon single crystals based on lattice dynamics (I) - Lattice dynamics and specific heat" is consistent with the result of 888.03 J/K/kg.