introduction to phonopy - icms3icms3.weebly.com/uploads/3/5/9/0/3590130/version1.pdf · phonopy is...

Post on 10-Mar-2018

280 Views

Category:

Documents

11 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Introduction to phonopy

Installation

● Download phonopy– http://sourceforge.net/projects/phonopy/

● Install Python libraries that phonopy relies● Install phonopy

● Add the phonopy library directory(e.g., ~/phonopy-0.9.3/lib/python) to PYTHONPATH, maybe in .bashrc, .zshenv, etc.

% sudo apt-get install python-dev python-numpy \ python-matplotlib python-tk python-lxml python-yaml

% tar xvfz phonopy-0.9.3.tar.gz% cd phonopy-0.9.3% python setup.py install –home=.

export PYTHONPATH=$PYTHONPATH:~/phonopy-0.9.3/lib/python

Run examplesSuppose phonopy's /bin is in the list of the execution path.

Examples are found athttp://phonopy.sourceforge.net/examples.html

% cd example/NaCl% phonopy -p –-nac

% cd example/Si% phonopy -p

Phonopy is

● A phonon calculation toolbox and toolkit● Easily installed on Ubuntu (or recent distributions)

– Currently Windows and Mac OS X are out of consideration.

– Windows and Mac users are encouraged to boot Ubuntu on a virtual machine (e.g. VMware, Virtualbox)

● Phonopy requires force calculators, e.g., it work togather with first-principles calculations, or any calculation that can calculate forces on atoms.

● Processes of phonopy and force calculations are completely separated. Therefore phonopy can be applied to any force calculator with small effort.

● Written mainly in Python– Phonopy Python module is prepared.

Calculation steps

Forces

Displacement

A supercell with a displacement1. 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

6. Calculate phonon frequencies

Work flow of phonopy

● Prepare a crystal structure at equilibrium in VASP POSCAR format

● Create supercells with displacements● Force calculation by a force calculator, e.g. VASP● Force collection

– Collect sets of forces on atoms of the supercells

● Phonon analysis– Density of states, Band structure, Thermal properties, etc.

● Further analysis from a set of phonon calculations– Thermal expansion, etc.

Pre-process & Force collection

● Input structure (POSCAR)

● Supercell size (--dim)

● Output files- Supercell with

displacements (POSCAR-*)

- Displacement directions (DISP)

● DISP and vasprun.xml's

● Supercell size (--dim)

● Output file– Sets of forces (FORCES)

for a post-process input.

Pre-process

% phonopy -d –-dim=”2 2 2”

(supercell size = 2x2x2)

Force collection

% phonopy –-dim=”2 2 2” \-f ALL_vapsrun.xml_FILES

POSCAR

SPOSCAR, POSCAR-*DISP

Phonopyprocess

NDIM tag

VASP calculations VASP DFPT calculations

Post process

● A file containing sets of forces and atomic displacements (FORCES) 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 (INPHON) and command-line options.

% cat INPHONNDIM = 2 2 2MP = 20 20 20% phonopy -p -t

← Thermal properties are plotted.

Phonopy post-process

thermal_properties.yaml total_dos.dat partial_dos.dat

mesh.yamlband.yaml

POSCAR

NDIM or MATDIM tagor --dim option PRIMITIVE_AXIS tag

FORCES or FORCE_CONSTANTS

Computing system

PC ClusterAsk force calculation

Work station

Ask phonon analysis(via X forwarding)

Recent PCs are enough strong that usually PC can be Work station.

Plot

Tips of force calculation in VASP

Geometry optimization of unit cell

EDIFFG = -1.0e-08Set

and relax as much as possible watching the recidual forces

Recidual forces of ~1e-4 eV/Å may be acceptable, but depends on systems.

Force calculations of supercellsIBRION = -1Set

PREC = AccurateLREAL = .FALSE.ADDGRID = .TRUE.EDIFF = 1.0e-08

INCAR of phonon calculation

i.e. no relaxation is allowed.

IBRION = 2; ISIF = 3Maybe

An example set of INCARs

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

PREC = Accurate ENCUT = 500 IBRION = -1 NELMIN = 5 EDIFF = 1.0e-08 IALGO = 38 ISMEAR = 0; SIGMA = 0.1 LREAL = .FALSE. ADDGRID = .TRUE. LWAVE = .FALSE. LCHARG = .FALSE.

Geometry optimization Force calculation

Tips of k-point sampling mesh in electronic structure calculations

Real space Reciprocal space

2×2supercell

Unitcell

½×½

Brief introduction to phonon theory

Harmonic oscillator

Harmonic potential well V

m

k

frequency

Mass

Spring constant

F=ma=-kx

x

x

Equation of motion

A solution is

1D-lattice connected with N.N.

n n+1 n+2n-1

Nearest neighbor

un-1 un un+1 un+2

aMass m

Let displacement be superposition of traveling waves

Dispersion relation

Solving equation of motion, frequency is

Transverse wave

q

Atomic modulation is orthogonal to wave vector.

Longitudinal wave

Atomic modulation is parallel to wave vector.

q

Interaction among atoms

… ……

We don't know how far it reaches and how strong it is.Furthermore interaction is not only in pairs.

Potential energy expansion

Hamiltonian = kinetic + potential

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

i, j, k, … : Cartesian componentsM, N, P, … : Lattice points

(Monatomic unit cell)

: Force constants (FCs)

Phonon from classical mechanics

Omit higher terms than 3nd order → Harmonic approximation

Diagonalization is needed.

Phonon is found to diagonalize harmonic Hamiltonian:

This is reduced to eigenvalue problem of dynamical matrix.

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

Multiple atoms in a unit cell are considered.Indices μνπ... are used for internal atomic labeling.

Phonon frequencies are obtained as square roots of eigenvalues of the dynamical matrix.

It is convenient for solving eigenvalue problem using computer to construct a matrix of in the form like (two atom in unit cell):

Diagonalization using computer

eigvals, eigvecs = numpy.linalg.eigh( dynmat )

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

Eigenvector w

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

w(qs) are eigenvectors in the output files of phonopy.

Orthonormality

Completeness

Imaginary mode

(a>0, b<0)

Sometimes it relates to phase transition, or may be used to check if virtual crystal structure is stable or not.

Normal mode coordinate

Imaginary frequency appears when crystal structure is dynamically unstable through the imaginary mode.

*In phonopy output, imaginary frequency is given as negative frequency.

Supercell approach

… ……

Assume interaction range is confined in supercell size.

E.g., 2x2 supercell is used to calculate force constans.

Finite difference method

Force on an atom (Fi)

Atomic displacement (Δrj)

Displace one atom, and measure forces on all atoms

Thermal properties

Helmholtz free energy

Thermal properties are calculated from frequencies.

Entropy

Heat capacity at constant volume

Quantum mechanics is necessary to derive them.

Crystal symmetry

Crystal symmetry

CIF database may have small number of decimals

e.g. 1/3 → 0.3333

VASP geometry optimization may result in breaking symmetry in hexagonal case, etc.

Crystal symmetry gives high quality results and reduces computational demands.

% phonopy –-symmetry --tolerance=1e-8

Detailed crystal symmetry is checked by

Crystal structure has to be correctly symmetrized according to the space group type.

Centrings of crystals

In space group type names in international table,

starting with F, I, C, A, and B means that crystal has centring.

F: face centreI: body centreC, A, B: base centre

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

Lattice parameters of the conventional and primitive cells are related by transformation matrix.(ITA2002 Sec. 5.1) *ITA: International table volume A

Fm3m (e.g. Silicon)

Conventional unit cell toprimitive cell

PRIMITIVE_AXIS = 0 0.5 0.5 0.5 0 0.5 0.5 0.5 0

Brillouin zones for space groups

Go to http://www.cryst.ehu.es/

click

Brillouin zone of Fm3m

Coordinates wrt. reciprocal primitive lattice vectors

This is to be written in QI and QF tags.

Non-analytical term correction

More on phonopy

SiO2 stishovite

Si O1.0 4.1 0.0 0.0 0.0 4.1 0.0 0.0 0.0 2.6 2 4Direct 0.0 0.0 0.0 0.5 0.5 0.5 0.3 0.3 0.0 0.7 0.7 0.0 0.2 0.8 0.5 0.8 0.2 0.5

Eigenvector to displacement

ANIME_TYPE = POSCARANIME = 0 0 0 1 5 4

Displaced structure along an eigenvector is created by

POSCAR-001 or POSCAR-003 is the structure that we want.

Animation for v_sim and gdis

ANIME = 0 0 0

ANIME = 0 0 0 4 5 20 0.25 0.25 0.25

For v_sim

For gdisq-point

Band index (from the bottom)

q-point Amplitude

Number of pictures

Shift

Running modes of phonopy

Band structure

Mesh sampling

List of q-points

Sample q-points along specified paths

Sample q-points on a uniform mesh

Sample q-points listed in QPOINTS file

Calculations of DOS, PDOS, thermal propertiesblong to this mode.

Band structure mode

q-point sampling paths:

Number of sampling paths:

Number of sampling points in a path:

QI = 0.0 0.0 0.0 0.5 0.0 0.0 0.5 0.5 0.0

QF = 0.5 0.0 0.0 0.5 0.5 0.0 0.0 0.0 0.0

ND = 3

NPOINTS = 51 *End points are counted.

(1) (2) (3)

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

Reciprocal lattice are sampled by a uniform mesh.

MP = 10 10 10

In phonopy, a mesh point samples the Γ-point when the number is odd. Optionally, the sampling mesh can be shifted with respect to grid space.

MP_shift = 0.5 0.5 0.5

When MP_SHIFT is 0 or 0.5, the symmetrization of the grid points is fast, which may be important when the mesh is quite dense.

The output file is mesh.yaml.

Mesh sampling/DOS

n: number of calculated q-points, g: function used for broadening

% phonopy --dos % phonopy -por

(without plot) (with plot)

The output file is total_dos.dat.

The broadening function is the Gaussian function.

DOS is obtained by

(Lorentzian is in the code, but no phonopy user interface is implemented. )

% phonopy –sigma=0.1

Smearing width is controlled by

Mesh sampling/PDOS

Partial DOS is obtained by

PDOS = 1 2, 3 4 5 6

As well as total DOS, smearing is controlled by --sigma.

% phonopy

With -p option, PDOS is plotted.

The output files is partial_dos.dat, and reploted by

% pdosplot -i “1 2 4 5, 3 6”

Where numbers for -i option correspond to1x, 1y, 1z, 2x, 2y, 2z, … (numbers are atom indices.)

and

DOS/Thermal properties

Helmholtz free energy, entropy, heat capacity at constant volume are calculated from phonon frequencies 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....)

Phonon frequencies of Ti3SiC2

Togo et al., PRB, 81, 174301 (2010)

% phonopy -p

with ND, NPOINTS, QI, QF tags with MP, PDOS tags*Drawn by v_sim

Thermal properties of Ti3SiC2

CV F

S % phonopy -t –-tmax 1400

Quasi-harmonic approximation (QHA)

QHA: Frequencies at volumes

Ti3SiC2

Physical prop. of Ti3SiC2 at p=0

These are calculated using phonopy-qha.

Thermal expansion of Silicon

Origin of thermal expansion isvolume dependence of frequency.

Volume dependence of frequency of Silicon

This point

Ferroelastic phase transition of SiO2 under high pressure (HP)

SiO2 rutile-type (P42/mnm) → CaCl2-type (Pnnm)

Increasing pressure, tetragonal to orthorhombic phase ferroelastic transition arises in SiO2.

Shear deformation Rotations of tetrahedronsCrystal structure

Togo et al., PRB, 78, 134106-1-9 (2008)

Phonon frequency vs pressure

Tetragonal

Orthothombic

Pc

ω2

Characteristic behavior is well reproduced by QHA.

Circles are calculated values.They fit to the straight lines.

Phase transition occurs at finite frequency. This is characteristic behavir of ferroelastic phase transition.

It is known that squared phonon frequency characteristic to this phase transition is linear to pressure from experiments and Landau theory.

Double well potential

Double well potential shape is virtually observed.

Lattice instability

(c11–c12)/2(tetragonal case)

Combination of elastic stiffness constants, c11-c12 < 0 gives instability of lattice.

Lattice becomes unstable at the critical pressure.

CO2 transition pathways under HP

Togo et al., PRB, 77, 184101-1-5 (2008)

Unstable phonon mode of phase-II

Raman modes of layers-AA & AB

Technical details

Tips of phonopy

● Check phonon DOS always!– Often imaginary modes appear.

– Thermal properties are not defined with imaginary modes.

VASP for finite difference method

● Always check OUTCAR carefully– Residual forces: As small as possible for equilibrium structure

– Stress: Hydrostatic at volumes?

● Watch electronic DOS (or eigenvalues) carefully– Sometimes band gap collapses.

Finite displacements

AmplitudeDefault value is 0.01 Å.

Too small value enhances error of forces.

Too large value induces anharmonic contribution.

Plus-minus displacement

Take plus-minus as default

Only plus when symmetric (automatically searched from crystal symmetry)

This often also compensates residual forces.

Combination of these defaults and high enough energy convergence criteria in force calculation is expected to give uniform results.

Formation entropy of a vacancy in aluminum

● Introduce a vacancy in aluminum● 2x2x2 supercell of conventional unit cell (32 sites)● Formation entropy:

Displacement distance without plus-minus displacement

*Lattice parameters calculated for perfect aluminum are used. This leads higher formation entropy.

Without using plus-minus displacement, formation entropy highly depends on displacement distance.

Plus-minus displacement

plus-minus

Without plus-minus

Plus-minus displacement may ease this error in wide range of displacement distance.

top related