Purpose of dynmat.x:

- reads a dynamical matrix file produced by the phonon code

- adds the non-analytical part (if Z* and epsilon are read from file), applies the chosen Acoustic Sum Rule (if q=0)

- diagonalise the dynamical matrix

- calculates IR and Raman cross sections (if Z* and Raman tensors are read from file, respectively)

- writes the results to files, both for inspection and for plotting

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

&INPUT ...specs of namelist variables... /
input file containing the dynamical matrix
'matdyn'
calculate LO modes (add non-analytic terms) along the direction q (Cartesian axis)
q = (0,0,0)
mass for each atom type
amass is read from file fildyn
'no'
Indicates the type of Acoustic Sum Rule imposed.

Allowed values:
no Acoustic Sum Rules imposed (default)
previous implementation of the asr used (3 translational asr imposed by correction of the diagonal elements of the dynamical matrix)
3 translational asr imposed by optimized correction of the dyn. matrix (projection)
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).
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 canceled during the orthonormalization procedure (see below).

Finally, in all cases except 'no' a simple correction on the effective charges is performed (same as in the previous implementation).
If .true. lines and rows corresponding to atoms that are not displaced are set to 0. This can be used for ph.x calculations with nat_todo set in ph.x, to remove the interaction between the diplaced and fixed parts of the system.
.false.
indicates the rotation axis for a 1D system (1=Ox, 2=Oy, 3=Oz)
3
if .true. then calculate Gamma-point mode contributions to dielectric permittivity tensor
.false.
if .true. then calculate Gamma-point mode effective plasma frequencies, automatically triggers lperm = .true.
.false.
output file containing phonon frequencies and normalized phonon displacements (i.e. eigenvectors divided by the square root of the mass and then normalized; they are not orthogonal)
'dynmat.out'
output file containing phonon frequencies and eigenvectors of the dynamical matrix (they are orthogonal)
' '
as above, in a format suitable for molden
'dynmat.mold'
as above, in axsf format suitable for xcrysden
'dynmat.axsf'
set to .true. to activate two-dimensional treatment of LO-TO splitting.
'.false.'
The number of double-delta smearing values used in an electron-phonon coupling calculation.
The spacing of double-delta smearing values used in an electron-phonon coupling calculation.