Phonopy can be used to compute vibrational properties of solid-state materials. It uses DFT codes (VASP, CASTEP, and Quantum Espresso) as force calculator.

Install Phonopy

conda create -n phonopy
conda install -c conda-forge phonopy
conda activate phonopy

Analyze structure and create supercell

  • Re-relax your structures with higher precision (e.g. PREC = Accurate ENCUT = 800, EDIFFG = -0.001, EDIFF = 1E-8)
  • In principle you should do a convergence test: normal precision vs high precision and see how T*S impact your thermodynamic properties
  • Gather POSCAR KPOINTS POTCAR INCAR
  • for oxygen in a box we just use the box without creating additional supercell
phonopy -d --dim="1 1 1"
  • You will see POSCAR-{number} (POSCAR with supercell and displacement) and SPOSCAR (perfect POSCAR with supercell)
  • Run single point calculations for each POSCAR-{number} in separate folders

Gather force constants

phonopy -f disp-{...}/vasprun.xml

Post process

Use the following configuration file mesh.conf:

ATOM_NAME =  O
DIM = 1 1 1
MP = 10 10 10
TPROP =  T
TMAX  =  800
TSTEP = 5
FC_SYMMETRY = .TRUE.
GAMMA_CENTER = .TRUE.
  • MP should be tested for convergence

Calculate thermal properties like vibrational entropy and free energy

phonopy -t mesh.conf

Script: pre-processing

phonon_inputs_dir="/home/d155/d155/msedz/work/pbe_d3/cubic/phonon/inputs"
dimension="1 1 1"
 
    cp ./rlx/KPOINTS.orig.gz ./rlx/POTCAR.gz ./rlx/CONTCAR.relaxed.gz ${phonon_inputs_dir}/incar.ph .
    mv incar.ph INCAR
    mv KPOINTS.orig.gz KPOINTS.gz
    mv CONTCAR.relaxed.gz POSCAR.gz
    gunzip *.gz
    pwd
    phonopy -d --dim="${dimension}" -c POSCAR
    for j in `/bin/ls POSCAR-*`;do
         dispname=`echo $j|sed s/POSCAR/disp/`
         mkdir $dispname
         mv $j $dispname/POSCAR
         cd $dispname
         ln -s ../INCAR ../POTCAR ../KPOINTS .
         cd ..
    done
    mkdir perfect
    cd perfect
    ln -s ../INCAR ../POTCAR ../KPOINTS .
    cd ..
    mv SPOSCAR perfect/POSCAR

Script: post-processing

phonon_inputs_dir="/home/d155/d155/msedz/work/pbe_d3/cubic/phonon/inputs"
mkdir results
cp  POSCAR results
cd results
 
for j in `find ../ -maxdepth 1 -type d -name "disp*" -printf "%f "`;do
	ln -s  ../$j/vasprun.xml vasprun.xml_$j
done
 
ln -s ../phonopy_disp.yaml .
cp ${phonon_inputs_dir}/mesh.conf .
phonopy -f vasprun*
phonopy -ts mesh.conf