Posted Nov. 19, 2021, 11:33 p.m.

GENERAL GUIDELINES:

https://phonopy.github.io/phonopy/vasp.html

 

INSTALL PHONOPY:

Create a custom conda environment for yourself, if you don't already have one:

conda create -n scotts_env -c conda-forge python=3.x.x

x's are latest version, found by typing python --version.  Currently, 3.8.8.

Activate your environment and install phonopy:

conda activate scotts_env
conda install -c conda-forge phonopy
conda install -c conda-forge h5py

Everything should now be installed.

 

SET UP CALCULATIONS:

Create a folder with the desired POSCAR unit cell.

Decide on the size of supercell to do calculation on.  For example, 2 x 2 x 2.  Generally we aim for a supercell that has similar a, b, and c lattice vector lengths.

In command line, enter:

phonopy -d --dim="2 2 2"

This writes out a series of new POSCAR files.  "SPOSCAR", is the supercell with no distortions.  The other POSCARs are identical to SPOSCAR, except that one atom has been displaced in each structure. 

I created a folder for each new structure file, and each folder has my POSCAR, KPOINTS, INCAR, and POTCAR file.  I then do the VASP calculation on each supercell.

The folder names that I use are 000 (no distortion), 001 ... 00n (POSCARS with distortions.).  The POSCAR files (e.g., POSCAR-002) need to be renamed to just POSCAR.

 

VASP CALCULATION:

The settings used for my run are derived from the INCAR given on the phonopy website:

PREC = Accurate
ENCUT = 480 
EDIFF = 1e-8
IBRION = -1
NSW = 0
ISMEAR = 0 ; SIGMA = 0.01
ISTART = 0
IALGO = 38
LCHARG = FALSE
LWAVE = FALSE
LREAL = FALSE
NELM = 200
IVDW = 12
NPAR = 1

(ENCUT depends on atoms used, of course!  "grep 'ENM' POTCAR" to estimate your ENCUT -- usually 130 eV larger than the largest ENMAX.)

 

POST PROCESSING:

After these calculations complete, I then type into the command prompt:

phonopy -f {001..010}/vasprun.xml

This command is run from the directory that holds the 001 through 010 directories.  The folders 001 through 010 contain the calculations with displacements.  (Folder 000 contains the calculation with no displacement.)

If the command is successful, phonopy will output:

Displacements were read from "phonopy_disp.yaml".
counter (file index): 1 2 3 4 5 6 7 8 9 10
FORCE_SETS has been created.

 

PLOTTING:

I make a settings file that gives instructions on plotting the data.  The file can have any name (often *.conf).

To plot the band structure and PDOS, I create a file called band-pdos.conf that contains:

DIM = 2 2 2
BAND = 0 0 0.5 0 0 0 0.5 0 0 0.1 0.1 0.5 0 0.5 0 0 0 0
MP = 13 13 13
PDOS = AUTO
BAND_LABELS= Z $\Gamma$ X P N $\Gamma$

The DIM has the supercell dimensions as entered previously.

The MP can be whatever you want.  Increase MP until results are unchanged.  Typically, MP should be larger than 8 or 10.

You may need Latex installed to print out band labels.  On centos, I installed Latex with:

sudo yum -y install texlive texlive-*.noarch

To make the plot, type this command:

phonopy -p band-pdos.conf -s

Adding the -s tag will write out a PDF.  

To interpret the PDOS (to add labels to each PDOS line), you also need to see the PDOS plot by itself.  Create a PDOS.conf file that contains:

DIM = 2 2 2
MP = 13 13 13
PDOS = AUTO

and type this command:

phonopy -p pdos.conf -s

 

ADDITIONAL CORRECTIONS:

Phonopy has additional methods that are more advanced than above.  Probably the most important case is the analysis of semiconductors or insulators.  For these systems, see:

https://phonopy.github.io/phonopy/input-files.html#born-optional

https://phonopy.github.io/phonopy/setting-tags.html#non-analytical-term-correction

 

CALCULATION OF THERMAL PROPERTIES:

The thermal properties can be calculated using the -t tag.  Create a settings file, such as mesh.conf:

DIM = 2 2 2
MP = 20 20 20

and run the command:

phonopy -t -p mesh.conf