# Input File Description

## Program: matdyn.x / PHonon / Quantum ESPRESSO (version: 7.2)

> ### TABLE OF CONTENTS

> > INTRODUCTION

> > &INPUT

> > > flfrc | asr | huang | dos | nk1 | nk2 | nk3 | deltaE | ndos | degauss | fldos | flfrq | flvec | fleig | fldyn | at | l1 | l2 | l3 | ntyp | amass | readtau | fltau | la2F | q_in_band_form | q_in_cryst_coord | eigen_similarity | fd | na_ifc | nosym | loto_2d | loto_disable | read_lr | write_frc

> > AtomicPositionSpecs

> > > X | Y | Z | ityp

> > qPointsSpecs

> > > nq | q_x | q_y | q_z | nptq

> > qPointsSpecs

> > > nq | q_x | q_y | q_z

> > Notes

> ### INTRODUCTION

> >     Purpose of matdyn.x:

> >     This program calculates the phonon frequencies for a list of generic
> >     q vectors starting from the interatomic force constants generated
> >     from the dynamical matrices as written by DFPT phonon code through
> >     the companion program q2r.x

> >     matdyn.x can generate a supercell of the original cell for mass
> >     approximation calculation. If supercell data are not specified
> >     in input, the unit cell, lattice vectors, atom types and positions
> >     are read from the force constant file.

> >     Input data format: [ ] = it depends

> >     Structure of the input data:
> >     ========================================================================

> >     &INPUT
> >        ...specs of the namelist variables...
> >     /

> >     [ X(1)   Y(1)   Z(1)    ityp(1)
> >       ...
> >       X(nat) Y(nat) Z(nat)  ityp(nat) ]

> >     [ nq
> >       q_x(1)  q_y(1)  q_x(1)   [ nptq(1) ]
> >       ...
> >       q_x(nq) q_y(nq) q_x(nq)  [ nptq(1) ] ]

## Namelist: &INPUT

flfrc | CHARACTER

>     File produced by q2r containing force constants (needed)
>     It is the same as in the input of q2r.x (+ the .xml extension
>     if the dynamical matrices produced by ph.x were in xml
>     format). No default value: must be specified.

[Back to Top]

asr | CHARACTER
Default: | 'no'

>     Indicates the type of Acoustic Sum Rule imposed.

>     Allowed values:

> `'no' :`

>       no Acoustic Sum Rules imposed (default)

> `'simple' :`

>       previous implementation of the asr used
>       (3 translational asr imposed by correction of
>        the diagonal elements of the force constants matrix)

> `'crystal' :`

>       3 translational asr imposed by optimized
>       correction of the force constants (projection)

> `'all' :`

>       3 translational asr + 3 rotational asr + 15 Huang
>       conditions for vanishing stress tensor, imposed by
>       optimized correction of the force constants (projection).
>       Remember to set write_lr = .true. to write long-range
>       force constants into file when running q2r and set read_lr = .true. when running matdyn in the case of
>       infrared-active solids. (See npj Comput Mater 8, 236 (2022))

> `'one-dim' :`

>       3 translational asr + 1 rotational asr imposed
>       by optimized correction of the dyn. mat. (the
>       rotation axis is the direction of periodicity; it
>       will work only if this axis considered is one of
>       the Cartesian axis).

> `'zero-dim' :`

>       3 translational asr + 3 rotational asr imposed
>       by optimized correction of the dyn. mat.

>     Note that in certain cases, not all the rotational asr
>     can be applied (e.g. if there are only 2 atoms in a
>     molecule or if all the atoms are aligned, etc.).
>     In these cases the supplementary asr are cancelled
>     during the orthonormalization procedure (see below).

[Back to Top]

huang | LOGICAL
Default: | `.true.`

>     if .true. 15 Huang conditions for vanishing stress
>     tensor are included in asr = 'all'.

[Back to Top]

dos | LOGICAL

>     if .true. calculate phonon Density of States (DOS)
>     using tetrahedra and a uniform q-point grid (see below)
>     NB: may not work properly in noncubic materials

>     if .false. calculate phonon bands from the list of q-points
>     supplied in input (default)

[Back to Top]

nk1, nk2, nk3 | INTEGER

>     uniform q-point grid for DOS calculation (includes q=0)
>     (must be specified if dos = .true., ignored otherwise)

[Back to Top]

deltaE | REAL

>     energy step, in cm-1, for DOS calculation: from min
>     to max phonon energy (default: 1 cm-1 if ndos, see
>     below, is not specified)

[Back to Top]

ndos | INTEGER

>     number of energy steps for DOS calculations
>     (default: calculated from deltaE if not specified)

[Back to Top]

degauss | REAL

>     DOS broadening in cm-1

>     Default: 0 - meaning use tetrahedra

[Back to Top]

fldos | CHARACTER

>     output file for dos (default: 'matdyn.dos')
>     the dos is in states/cm-1 plotted vs omega in cm(-1)
>     and is normalised to 3*nat, i.e. the number of phonons

[Back to Top]

flfrq | CHARACTER

>     output file for frequencies (default: 'matdyn.freq')

[Back to Top]

flvec | CHARACTER

>     output file for normalized phonon displacements
>     (default: 'matdyn.modes'). The normalized phonon displacements
>     are the eigenvectors divided by the square root of the mass,
>     then normalized. As such they are not orthogonal.

[Back to Top]

fleig | CHARACTER

>     output file for phonon eigenvectors (default: 'matdyn.eig')
>     The phonon eigenvectors are the eigenvectors of the dynamical
>     matrix. They are orthogonal.

[Back to Top]

fldyn | CHARACTER

>     output file for dynamical matrix (default: ' ' i.e. not written)

[Back to Top]

at(i,j), (i,j) = (1,1) . . . (3,3) | REAL

>     supercell lattice vectors - must form a superlattice of the
>     original lattice (default: use original cell)

[Back to Top]

l1, l2, l3 | INTEGER

>     supercell lattice vectors are original cell vectors times
>     l1, l2, l3 respectively (default: 1, ignored if at specified)

[Back to Top]

ntyp | INTEGER

>     number of atom types in the supercell
>     (default: ntyp of the original cell)

[Back to Top]

amass(i), i=1,ntyp | REAL

>     masses of atoms in the supercell (a.m.u.), one per atom type
>     (default: use masses read from file flfrc)

[Back to Top]

readtau | LOGICAL

>     read  atomic positions of the supercell from input
>     (used to specify different masses) (default: .false.)

[Back to Top]

fltau | CHARACTER

>     write atomic positions of the supercell to file fltau
>     (default: fltau = ' ', do not write)

[Back to Top]

la2F | LOGICAL

>     if .true. interpolates also the el-ph coefficients

[Back to Top]

q_in_band_form | LOGICAL

>     if .true. the q points are given in band form:
>     only the first and last point of one or more lines
>     are given. See below. (default: .false.).

[Back to Top]

q_in_cryst_coord | LOGICAL

>     if .true. input q points are in crystalline
>     coordinates (default: .false.)

[Back to Top]

eigen_similarity | LOGICAL

>     use similarity of the displacements to order
>     frequencies  (default: .false.)

>     NB: You cannot use this option with the symmetry
>     analysis of the modes.

[Back to Top]

fd | LOGICAL

>     if .true. the ifc come from the finite displacement calculation

[Back to Top]

na_ifc | LOGICAL

>     add non analitic contributions to the interatomic force
>     constants if finite displacement method is used (as in Wang et al.
>     PRB 85, 224303 (2012)) [to be used in conjunction with fd.x]

[Back to Top]

nosym | LOGICAL

>     if .true., no symmetry and no time reversal are imposed

[Back to Top]

loto_2d | LOGICAL

>     set to .true. to activate two-dimensional treatment of LO-TO splitting

[Back to Top]

loto_disable | LOGICAL

>     if .true. do not apply LO-TO splitting for q=0
>     (default: .false.)

[Back to Top]

read_lr | LOGICAL
Default: | `.false.`

>     if .true. read also long-range force constants when they exist in
>     force constant file. This is required when enforcing asr = 'all'
>     for infrared-active solids.

[Back to Top]

write_frc | LOGICAL
Default: | `.false.`

>     if .true. write force constants with asr imposed into file.
>     The filename would be flfrc+".matdyn". The long-range part of
>     force constants will be not written.

[Back to Top]

IF `readtau == .true. :`

> ## Card: AtomicPositionSpecs

> if (readtau) atomic positions must be specified as follows:

> ### Syntax:

> > X(1) | Y(1) | Z(1) | ityp(1)
> > X(2) | Y(2) | Z(2) | ityp(2)
> > . . .
> > X(nat) | Y(nat) | Z(nat) | ityp(nat)

> ### Description of items:

> > X, Y, Z | REAL

> > >     X, Y, Z atomic positions

> > [Back to Top]

> > ityp | INTEGER

> > >     index of the atomic type

> > [Back to Top]

IF `q_in_band_form == .true .and. dos == .false. :`

> ## Card: qPointsSpecs

> if (q_in_band_form .and. .not.dos) q-points must be specified as follows:

> ### Syntax:

> > nq

> > q_x(1) | q_y(1) | q_z(1) | nptq(1)
> > q_x(2) | q_y(2) | q_z(2) | nptq(2)
> > . . .
> > q_x(nq) | q_y(nq) | q_z(nq) | nptq(nq)

> ### Description of items:

> > nq | INTEGER

> > >     number of q points

> > [Back to Top]

> > q_x, q_y, q_z | REAL

> > >     coordinates of the Q point

> > [Back to Top]

> > nptq | INTEGER

> > >     The number of points between this point and the next.

> > >     nptq is the number of points between this point
> > >     and the next. These points are automatically
> > >     generated. the q points are given in Cartesian
> > >     coordinates, 2pi/a units (a = lattice parameters)

> > [Back to Top]

ELSEIF `dos == .false. :`

> if (.not. dos) q-points must be specified as follows:

> ## Card: qPointsSpecs

> ### Syntax:

> > nq

> > q_x(1) | q_y(1) | q_z(1)
> > q_x(2) | q_y(2) | q_z(2)
> > . . .
> > q_x(nq) | q_y(nq) | q_z(nq)

> ### Description of items:

> > nq | INTEGER

> > >     number of q points

> > [Back to Top]

> > q_x, q_y, q_z | REAL

> > >     q-points in cartesian coordinates, 2pi/a units (a = lattice parameters)

> > [Back to Top]

> ### Notes

> >     If q = 0, the direction qhat (q=>0) for the non-analytic part
> >     is extracted from the sequence of q-points as follows:

> >     qhat = q(n) - q(n-1)   or   qhat = q(n) - q(n+1)

> >     depending on which one is available and nonzero.

> >     For low-symmetry crystals, specify twice q = 0 in the list
> >     if you want to have q = 0 results for two different directions

This file has been created by helpdoc utility on Sat Mar 18 19:08:12 CET 2023.