0% found this document useful (0 votes)
49 views

Phonopy

Phonon theory describes lattice vibrations in solids using a harmonic oscillator model. Phonons are quantized lattice vibrations that can be modeled by solving the dynamical matrix derived from interatomic force constants. The phonopy software calculates force constants from first principles using finite atomic displacements in supercells and then determines phonon frequencies, densities of states, and other thermal properties by diagonalizing the dynamical matrix at different q-points in the Brillouin zone. It requires force calculations on supercells with small atomic displacements as input.

Uploaded by

kongyong16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Phonopy

Phonon theory describes lattice vibrations in solids using a harmonic oscillator model. Phonons are quantized lattice vibrations that can be modeled by solving the dynamical matrix derived from interatomic force constants. The phonopy software calculates force constants from first principles using finite atomic displacements in supercells and then determines phonon frequencies, densities of states, and other thermal properties by diagonalizing the dynamical matrix at different q-points in the Brillouin zone. It requires force calculations on supercells with small atomic displacements as input.

Uploaded by

kongyong16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Brief introduction to phonon theory

Harmonic oscillator
Harmonic potential well V

Spring constant k

Mass m x
x
Equation of motion

F=ma=-kx
A solution is
frequency
1D-lattice connected with N.N.
Nearest neighbor

a
Mass m

n-1 n n+1 n+2

un-1 un un+1 un+2

Let displacement be superposition of traveling waves


Dispersion relation

Solving equation of motion, frequency is


Pure transverse wave
Atomic modulation is orthogonal to wave vector.

q
Pure longitudinal wave
Atomic modulation is parallel to wave vector.

q
Interaction between atoms


… …

An atomic displacement induces forces exerted on all other atoms.


Potential energy expansion

Hamiltonian = kinetic + potential

Potential energy is expaned with respect to atomic displacements (U).

(Monatomic unit cell)


: Force constants i, j, k, … : Cartesian components
(FCs) M, N, P, … : Lattice points
Harmonic solution → phonon
Omit higher terms than 3nd order → Harmonic approximation

Diagonalization of harmonic Hamiltonian gives mutually independent bases.

Diagonalization is needed.

Multiple atoms in a unit cell are distinguished.


Here Greek letters μνπ... are used for internal atomic labeling.
(In normal coordinates)
It is equivalent to solving eigenvalue problem of dynamical matrix.*

M: mass, N0: number of atoms, R: positon vector

*“Thermodynamics of crystals” by Wallace, “Electrons and phonons” by Ziman


Phonons by solving dynamical matrix

D: dynamical matrix, w: eigenvector, s: band index

It is convenient for solving eigenvalue problem by computer to


construct the dynamical matrix in the form, e.g., for the case with two
atoms in unit cell,
Eigenvector w

Orthonormality

Completeness

*Here indices i, j run over the Catesian components and atom indices.
Imaginary mode

Imaginary frequency appears when crystal structure is dynamically


unstable through the imaginary mode.
Sometimes it relates to phase transition, or may be used to check if
virtual crystal structure is stable or not.
* Imaginary frequency is shown by negative value.

(a>0, b<0)

Normal coordinate
Thermal properties
Thermal properties are derived from statistical mechanics.

Helmholtz free energy

Entropy

Heat capacity at constant volume


Introduction to phonopy
Phonopy is

● A phonon calculation toolbox based on supercell approach

● Coupled with a variety of force calculators:


– First-principles calculations (VASP, PWscf, Abinit, etc)
– Or any calculator that can provide forces on atoms

● Written in Python
– Used as a python module
– Easy to read the code
Supercell?

4x4 supercell

Your unit cell


Atomic interaction beyond unit cell

Force constants

N
M

M, N: Index of lattice points


, : Index of atom in unit cell
Choice of supercell size

Supercell size has to be chosen by interaction range.

Practically ~100 atoms can often be a good choice.


Package installation
● Requirements:
– For example, the software required by phonopy is installed via package manager
of OS or a python package manager pip. The package names for Ubuntu linux:

% sudo apt-get install python-dev python-numpy \


python-matplotlib python-yaml python-scipy

● Installation using pip


– If pip is not in the system, it is installed via OS’s package manager. Then

% pip install –-user phonopy

● Setup PATH (execution path for unix system) in .bashrc, .zshrc, etc

For Mac: export PATH=$PATH:~/Library/Python/2.7/bin

For Ubuntu: export PATH=$PATH:~/.local/bin


Manual installation
● Download phonopy
– http://sourceforge.net/projects/phonopy/
● Requirements
– see previous page
● Install phonopy
% tar xvfz phonopy-1.11.0.tar.gz
% cd phonopy-1.11.0
% python setup.py install –home=.

● Add PATH and PYTHONPATH in .bashrc, .zshenv, etc like

export PATH=$PATH:~/phonopy-1.11.0/bin
export PYTHONPATH=$PYTHONPATH:~/phonopy-1.11.0/lib/python
Run examples
https://atztogo.github.io/phonopy/examples.html

% cd example/Si % cd example/NaCl
% phonopy -p mesh.conf % phonopy -p –-nac band.conf
Example of supercell size dependence

Small Large
Ti3SiC2
2×2×1 supercell 4x4×1 supercell

Widths of localized bands are different.


→ Larger supercell may be required.
Calculation of harmonic force constants
Finite displacements and supercell approach

1. Displace an atom M N
uj(N): Displacement of atom N

2. Measure forces on atoms


Fi(M): Force on atom M P
Finite difference method
Displace one atom in a supercell, and measure forces on all atoms

Force on an atom (Fi)


Atomic displacement (Δrj)
Calculation steps

A model of supercell with a displacement


1. Prepare a unit cell
2. Relax the structure
3. Build a set of supercells with
displacements

4. Calculate forces on atoms of the set of


supercells

5. Collect sets of forces


Forces 6. Calculate phonon frequencies
Primitive cell Displacement of atom
Work flow of phonopy

● Prepare a crystal structure at equilibrium


● Create a set of supercells with different atomic displacements
● Run force calculations of the supercells
● Collect all force-calculation results
● Phonon analysis:
– Density of states, band structure, thermal properties, etc
● Further analysis from a set of phonon calculations
– Thermal expansion, Gibbs free energy, Gruneisen parameter, etc
POSCAR
DIM tag
Phonopy
process

SPOSCAR, POSCAR-*, disp.yaml

VASP calculations VASP DFPT calculations


Pre-process & Force collection

Pre-process Force collection


● Input structure (POSCAR) ● Disp.yaml
● Supercell size (--dim) ● vasprun.xml's
% phonopy -d –-dim=”2 2 2”
% phonopy -f ALL_vapsrun.xml
(supercell size = 2x2x2)

● Output files ● Output file


- Supercell with displacements – Sets of forces (FORCE_SETS) used
(POSCAR-*) in the post-process.
- Displacement directions
(disp.yaml)
Post process
● A file containing sets of forces and atomic displacements
(FORCE_SETS) is transformed to supercell force constants.
● Dynamical matrices at arbitrary q-point are built from the supercell
force constants.
● Dynamical matrices are solved, and phonon frequency and
polarization vectors are obtained.
● DOS, PDOS, band structure, and thermal properties at constant
volume are obtained following a setting file (xxx.conf) and
command-line options.

% cat mesh.conf
DIM = 2 2 2 ← Thermal properties are
MP = 20 20 20
% phonopy -p -t mesh.conf calculated and plotted.
Phonopy post-process

DIM tag or FORCE_SETS or


POSCAR --dim option FORCE_CONSTANTS PRIMITIVE_AXIS tag

band.yaml mesh.yaml

thermal_properties.yaml total_dos.dat partial_dos.dat


Tips of force calculation in VASP
INCAR of phonon calculation
PREC = Accurate
LREAL = .FALSE.
EDIFF = 1.0e-08
Geometry optimization of unit cell
Set EDIFFG = -1.0e-08 and relax as much as possible

Residual force of ~1e-4 eV/Å may be acceptable, but depending on systems.


Maybe IBRION = 2; ISIF = 3

Force calculations of supercells


Set IBRION = -1 not to relax atomic positions
An example of INCARs
Geometry optimization Force calculation

PREC = Accurate PREC = Accurate


ENCUT = 500 ENCUT = 500
IBRION = 2 IBRION = -1
ISIF = 3 NELMIN = 5
NSW = 20 EDIFF = 1.0e-08
NELMIN = 5 IALGO = 38
EDIFF = 1.0e-08 ISMEAR = 0; SIGMA = 0.1
EDIFFG = -1.0e-08 LREAL = .FALSE.
IALGO = 38 LWAVE = .FALSE.
ISMEAR = 0; SIGMA = 0.1 LCHARG = .FALSE.
LREAL = .FALSE.
LWAVE = .FALSE.
LCHARG = .FALSE.

It may necessary to run geometry


optimization several times by renaming
CONTCAR to POSCAR.
Tips of k-point sampling mesh in electronic
structure calculations
Real space Reciprocal space

Unit
cell

2×2
½×½
supercell
Crystal symmetry
Crystal symmetry
Every crystal structure has to be correctly symmetrized by its space group!

Employing crystal symmetry gives high quality results and also reduces computational
demands.

Note that number of decimals in CIF database is insufficient for phonon calculation,
e.g., 1/3 → 0.3333. Casting to ideal structure is necessary before starting the calculation.

VASP geometry optimization results in breaking crystal symmetry though it’s rare.
Therefore symmetry check / symmetrization is necessary to be careful.

Using phonopy, symmetry check and symmetrization can be achieved by

% phonopy –-symmetry –tolerance=some_distance


Centrings of crystals
In space-group-type symbols in international table,
starting with F, I, C, A, and B means that crystal has centring.

F: face centre
I: body centre
C, A, B: base centre

In these cases, the conventional unit cell is 1-, 2-, or 4-fold larger
than the primitive cell.

Basis vectors of the conventional and primitive cells are related by a


transformation matrix.
(ITA2002 Sec. 5.1) *ITA: International table volume A
Fm3m (e.g. Silicon)

Conventional unit cell to


primitive cell

PRIMITIVE_AXIS = 0 1/2 1/2 1/2 0 1/2 1/2 1/2 0


Brillouin zones for space groups
Bilbao crystallographic server http://www.cryst.ehu.es/

click
Brillouin zone of Fm3m

Coordinates wrt. reciprocal primitive


lattice vectors
Physical properties and tensors
● Physical properties are represented by tensors and the tensors are
defined by symmetry operations.
● By symmetry, elements of the tensors are not independent, e.g., most
2nd rank tensors of physical properties are symmetric 3x3 matrices.
The relationship of tensor elements for the point groups are listed in
the books.
● Usual rotation of a tensor is defined by direct products of rotated 1st
rank tensors, e.g., for 3rd rank tensor,
Irreducible representations
● Phonon modes are assigned to irreducible representations of the
space-group type.
● Phonon eigenvector has the information of the symmetry of the mode.
A character of a symmetry operation is obtained by , where w
is the eigenvector and S is the symmetry operation matrix for
eigenvector at q.
● Character tables are found at Bilbao crystallographic server.
More on phonopy
Features
● Mesh sampling mode
– Brillouin zone is sampled by a uniform sampling mesh.
– DOS, PDOS, thermal properties, thermal ellipsoid are calculated.
● Band structure mode
– Brillouin zone is sampled along straight paths.
● Direct q-point mode
– User selected q-points are listed in QPOINTS file.
● Irreducible representation mode
● Normal mode modulation mode

For mesh, band, and q-point modes


phonon eigenvector and group velocity can be calculated.
Basic usage (see NaCl example)
● Configuration file
% phonopy band.conf
– File name is arbitrary.
– Line by line tags, MESH = 10 10 10
– No graphical output
● Command-line style
% phonopy -p –-thm -–dim=”2 2 2” –mesh=”10 10 10”

– Almost all equivalent options to setting tags are prepared.


– Graphical output is invoked.
● Mixture of configuration file and command options
% phonopy -p –-nac band.conf
– Command options overwrite configuration file settings when conflicting.
Python module / Phonopy API
import numpy as np
from phonopy import Phonopy ● Python module
from phonopy.interface.vasp import read_vasp
from phonopy.file_IO import parse_FORCE_SETS, parse_BORN
import matplotlib.pyplot as plt % python NaCl-gv.py
unitcell = read_vasp("POSCAR") – Custom plot
phonon = Phonopy(unitcell,
np.diag([2, 2, 2]),
primitive_matrix=[[0, 0.5, 0.5], – Low level control
[0.5, 0, 0.5],
[0.5, 0.5, 0]]) – Describing algorithm
force_sets = parse_FORCE_SETS()
phonon.set_displacement_dataset(force_sets)
– Involving to automation
phonon.produce_force_constants()
primitive = phonon.get_primitive()
nac_params = parse_BORN(primitive, filename="BORN")
phonon.set_nac_params(nac_params)
phonon.set_group_velocity()
phonon.set_mesh([31, 31, 31])
qpoints, weights, frequencies, _ = phonon.get_mesh()
group_velocity = phonon.get_group_velocity()
gv_norm = np.sqrt((group_velocity ** 2).sum(axis=2))
for i, (f, g) in enumerate(zip(frequencies.T, gv_norm.T)):
plt.plot(f, g, 'o', label=('band%d' % (i + 1)))
plt.legend()
plt.xlabel("Frequency (THz)")
plt.ylabel("|group-velocity| (THz.A)")
plt.show()
Band structure mode
https://atztogo.github.io/phonopy/setting-tags.html#band-structure-tags

Brillouin zone sampling paths (two segments):

BAND = 1/2 1/2 0 0 0 0 1/2 1/2 1/2


(1) (2)

Number of sampling points in a path:

BAND_POINTS = 51
*End points are counted.

The output file is band.yaml.


bandplot

Re-plot band structure from band.yaml by

% bandplot

Command options can be shown by


% bandplot -h

To print out frequencies in gnuplot data format


% bandplot --gnuplot

If you want to cut below 0,


% bandplot --fmin=0
Mesh sampling mode
https://atztogo.github.io/phonopy/setting-tags.html#mesh-sampling-tags

Reciprocal lattice are sampled by a uniform mesh.

MP = 10 10 10

A Γ-centre mesh is used along each axis when the number is odd,
otherwise the mesh is half shifted with respect to grid space.
Additionally the mesh shift is controlled by

MP_shift = 0.5 0.5 0.5

MP_SHIFT value of only 0 or 0.5 is allowed.

The output file is mesh.yaml.


Mesh sampling / DOS
https://atztogo.github.io/phonopy/setting-tags.html#phonon-density-of-states-dos-tags

DOS is obtained by

% phonopy –-dos ... or % phonopy -p ...


(without plot) (with plot)

Smearing width is controlled by


% phonopy –-sigma=0.1 ...

Alternatively a linear tetrahedron method is used by


% phonopy –-thm ...

The output file is total_dos.dat.


Mesh sampling / PDOS
https://atztogo.github.io/phonopy/setting-tags.html#phonon-density-of-states-dos-tags

Partial DOS is obtained by


% phonopy –-pdos=”1, 2” ...

The output files is partial_dos.dat, and it is reploted by


% pdosplot -i “1, 2”

Where numbers for -i option correspond


to atom1, atom2, atom3, …

Whem mesh.yaml becomes huge,


it is recommended to use
--nowritemesh option.
Mesh sampling / Thermal properties
https://atztogo.github.io/phonopy/setting-tags.html#thermal-properties-related-tags

Helmholtz free energy, entropy, heat capacity at constant volume are


calculated by

% phonopy -t ...

With -p option, the resutls are plotted.


Options --tmax,--tmin,--tstep may be used together.

The output file is thermal_properties.yaml.


Thermal properties are re-plotted by

% propplot –cv (or –-fe, --entropy)


(--gnuplot option is dummy....)
Mesh sampling / Thermal ellipsoid
https://atztogo.github.io/phonopy/setting-tags.html#thermal-displacements

Mean square atomic displacement is calculated by

% phonopy --tdisp ...

Mean square displacement matrix Ucart and Ucif* are


calculated by
% phonopy --tdispmat ...

More specifically CIF file with aniso_U is obtained by


% phonopy --tdispmat_cif ...
Ti3SiC2

*Grosse-Kunstleve and Adams, J. Appl. Cryst., 35, 477-480 (2002)


Non-analytical term correction
Dynamical matrix at q → 0 are corrected to include long-range
electrostatic interaction by non-analytical term correction.
R. M. Pick et al., PRB 1, 910, (1970)

*Z: Born effective charge tensor, ε: dielectric tensor

At general q-points, force constants are


corrected by interpolation. % phonopy –-nac ...
J. Phys.: Condens. Matter. 22, 202201 (2010))

Apply NAC
Z and ε: BORN file
14.400 Unit conversion factor Dielectric
2.00 0.00 0.00 0.00 2.00 0.00 0.00 0.00 2.00 constant ε
1.98 0.00 0.00 0.00 1.98 0.00 0.00 0.00 1.98
-0.99 0.00 0.00 0.00 -0.99 0.00 0.00 0.00 -0.99 Born effective
... charge Z

* Only Born effective charges for symmetrically independent atoms are written.
See https://atztogo.github.io/phonopy/input-files.html#born-optional

These values are obtained by VASP 5.x with the INCAR tag
LEPSILON = .TRUE.

VASP results are found in OUTCAR near the following texts:


BORN EFFECTIVE CHARGES (in e, cummulative output)

MACROSCOPIC STATIC DIELECTRIC TENSOR (including local field effects


in DFT)
Quasi-harmonic approximation (QHA)
https://atztogo.github.io/phonopy/qha.html

QHA: Frequencies at volumes

% phonopy-qha -p -s e-v.dat \
thermal_properties_yaml_of_volume1 \
thermal_properties_yaml_of_volume2 \
thermal_properties_yaml_of_volume3 ...

The file e-v.dat contains volumes and electronic


total energies U(V) of unit cells.

140.030000 -42.132246
144.500000 -42.600974
149.060000 -42.949142
...
V U
Thermal expansion by QHA

Silicon
Supercell sizes

Origin of thermal expansion is


volume dependence of frequency.
Volume dependence of frequency:
mode-Grüneisen parameter
https://atztogo.github.io/phonopy/gruneisen.html#phonopy-gruneisen

Silicon
Mode Gruneisen parameter

Mode Gruneisen parameter


0.984

Frequency (THz)
Frequency (THz)

% gruneisen ...
Wave vector
Volume dependence of frequency

Silicon This mode


Normal mode modulation
https://atztogo.github.io/phonopy/setting-tags.html#create-modulated-structure

eigenvector

Modulated structure with along mass weighted eigenvector is created by

MODULATION = 0 0 0 1 1 1, 4 1

In this case, MPOSCAR-001 is the structure that we want.


The output file is mesh.yaml.
Force constants calculation by finite
displacements
Amplitude
Default value is 0.01 Å.
Too small value induces numerical error in force constants.
Too large value induces anharmonic contribution.

Plus-minus displacement
This is default mode in phonopy.
This often cancels residual forces.
But only one direction is used when crystal symmetry guarantees.

Combination of these defaults and high enough energy


convergence criteria in force calculation is expected to give
uniform results.
References for phonon calculations

● Introduction to Lattice Dynamics (M. T. Dove)


● Thermodynamics of Crystals (Duane C. Wallace)
● Electrons and Phonons (J. M. Ziman)
● Symmetry and Condensed Matter Physics (M. El-Batanouny & F.
Wooten)
● Bilbao crystallographic server http://www.cryst.ehu.es/

● For phonopy
– http://dx.doi.org/10.1016/j.scriptamat.2015.07.021 (Open access)

You might also like