Phonon Band Structure with QE
The procedure is very similar for that
with QE and a phonon DoS. One should follow the
DoS example until the final point of running matdyn.x. When
matdyn.x is run, q-points on lines are wanted, not on a
regular 3D grid.
diamond.matdyn_bs.in
&INPUT flfrc="flfrc.diamond", flfrq="diamond_bs.freq", flvec="diamond_bs.modes", fleig="diamond_bs.eig", asr="crystal", q_in_band_form=.true., q_in_cryst_coord=.true. / 7 0.0 0.0 0.0 10 0.5 0.0 0.5 10 0.375 0.375 0.75 10 0.0 0.0 0.0 10 0.5 0.5 0.5 10 0.5 0.25 0.75 10 0.5 0.0 0.5 10
If one remembers q_in_cryst_coord=.true., then the
q-points are specified in conventional fractional co-ordinates. And
one must specify the number of points for the line segment following
each point.
If resolution of crossings is not required, the output can be plotted with
$ c2x --phbands_gnu --merge diamond.in diamond_bs.freq out.gnu $ gnuplot -p out.gnu

The .freq file contains just the frequencies, with no
eigenvectors, so crossing detection via dot products is not
possible. Reading a .in (or xml) file as well is needed
to detect the symmetry and to label the special points. Otherwise a
rough plot can be made by
requesting --phbands_gnu_ik.
The .modes file contains eigenvectors and
eigenfrequencies. But it contains no q-point weights (not needed for a
band plot), and the q-point positions are at a surprisingly low
precision. Those in a .freq file have two extra
digits. This is true for QE 7.4.1, but QE 7.5 improves the precision
in the .modes file signficantly, as the formatting of the
q-point co-ordinates is changed from f12.4 to
f15.8. The .eig file remains at f12.4 in this
version.
If c2x is asked to read a .modes file, it will try to
read also a .freq file of the same base name so as to
improve the q-point precision and add weights.
$ c2x --phbands_gnu_dcross -v --merge diamond.in diamond_bs.modes out.gnu $ gnuplot -p out.gnu

The result of detecting crossings is not the same as that for the Castep example. Crossing detection is a slightly inexact science, at least as implemented in c2x. Reducing the distance between the points calculated on the q-point path should improve the accuracy of the crossing detection. QE's defaults resulted in a total of 61 points, whereas Castep defaulted to ninety.
Finally, one can obtain a rough plot from a .freq.gp
file as output by matdyn.x with
gnuplot> unset key gnuplot> plot for [col=2:7] 'diamond_bs.freq.gp' using 1:col w l
where the range for col is two to one plus three times the
number of atoms in the unit cell, here 1+3x2.

No crossings, no labelling of x-axis, and no c2x.