This tool requires 2 Quantum ESPRESSO files (.scf and .modes) passed as an input to show the phonon dispersions. More information on these files is given below.

It is an usual input of PW code of Quantum ESPRESSO. The example of minimum necessary information is:

` ````
&system
ibrav = 4,
celldm(1) = 4.5978084723,
celldm(3) = 2.6099390769,
nat = 2,
ntyp = 1,
/&end
ATOMIC_SPECIES
C 12.0107 C.pw-mt_fhi.UPF
ATOMIC_POSITIONS { crystal }
C 0.00000000000000 0.00000000000000 0.00000000000000
C 0.66666666666666 0.33333333333333 0.00000000000000
```

The output file of pw.x is used to get the value of
`alat`

, the lattice parameter, as defined by Quantum
ESPRESSO. Unfortunately, its value cannot always be obtained from
the input only (e.g. in the case of `ibrav=0`

it is not
explicitly specified), and the way it is obtained depends on the
version of Quantum ESPRESSO (in 6.x versions it is the length of
the first lattice vector, but it used to be user-defined in earlier
versions).

This is essential to perform the correct unit conversions, as
the q-points are written in units of `2 * pi / alat`

in the `matdyn.modes`

file (see below).

It is one of the files produced by the **matdyn.x** code of Quantum ESPRESSO (its name can be changed using the input flag "flvec").
This is obtained at the end of the following "workflow":

ph.x on a certain grid => q2r.x to get force constants => matdyn.x to get the phonons on arbitrary grid

Download the example files for **cubic BaTiO _{3}** here.

The short description of internal .json format used in this tool to show the phonon dispersions and animations is:

` ````
name: name of the material that will be displayed on the website (string)
natoms: number of atoms (integer)
lattice: lattice vectors (3x3 float array), in Angstroms
atom_types: atom type for each atom in the system (array strings)
atom_numbers: atom number for each atom in the system (array integers)
formula: chemical formula (string)
repetitions: default value for the repetitions of the unit-cell in the visualizer (array 3 integers)
atom_pos_car: atomic positions in cartesian coordinates (natoms x 3 float array), in , Angstrom
atom_pos_red: atomic positions in reduced coordinates (natoms x 3 float array)
highsym_qpts: list of high symmetry qpoints (number of high symmetry q-points x 3 float arraay)
qpoints: list of q-point in the reciprocal space (Nq x 3 float array). They are in reduced
coordinates. (fractions of reciprocal lattice vectors), so are high-symmetry qpoints
distances: list distances between the qpoints (Nq float array)
eigenvalues: eigenvalues in units of cm-1 (Nq x Nphonons with Nphonons = natoms x 3).
vectors: eigenvectors (Nq x Nphonons x Natoms x 3 x 2) They are, more rigorously speaking,
normalized phonon displacements i.e. the eigenvectors divided by the square root
of the mass, then normalized on the unit-cell.
For each q point (Nq), for each phonon (Nphonons), a normalized phonon displacement
is a vector containing, for each atom (Natoms), the x, y, and z displacements (x3)
which are complex numbers (x2).
```

Example of custom JSON file is shown below.

` ````
{
"distances": [0, 0.004591723543957549, ...., 0.25105661898056153],
"natoms": 2,
"vectors": [[[[[0.704604, 0.0], [0.059344, 0.0], [-0.003418, 0.0]], [[0.704604, 0.0], [0.059344, 0.0], [-0.003418, 0.0]]] , ..., [[0.298964, 0.0], [-0.640797, 0.0], [0.0, 0.0]]]]],
"name": "Graphene",
"eigenvalues": [[-6.2e-05, -4.3e-05, -3e-05, 911.740895, 1604.085116, 1604.085116], ...., [1604.085116, -4.3e-05, 911.740895, -3e-05, -6.2e-05, 1604.085116]],
"repetitions": [3, 3, 3],
"qpoints": [[0.0, 0.0, 0.0], ..., [0.0, 0.0, 0.0]],
"atom_numbers": [6, 6],
"lattice": [[2.433055638800606, 0.0, 0.0], [-1.216527819400303, 2.1070879920223002, 0.0], [0.0, 0.0, 6.350126987977594]],
"highsym_qpts": [[0, ""], [20, ""], [30, ""], [50, ""]],
"atom_pos_car": [[0.0, 0.0, 0.0], [1.2165278194002909, 0.7023626640074263, 0.0]],
"atom_pos_red": [[0.0, 0.0, 0.0], [0.66666666666666, 0.33333333333333, 0.0]],
"formula": "C2",
"atom_types": ["C", "C"]
}
```