Diamond Phonon DoS using QE

Just like Castep, QE can calculate phonons on a set of q points, interpolate onto a denser set (the "fine grid"), and calculate the DoS directly itself. There is little for any post-processing tool to do. However, the calculation does seem more difficult to set up than for Castep. This uses the same 8x8x8 initial grid, with interpolation to 18x18x18, that the Castep calculation used.

SCF calculation

diamond.in

&CONTROL
  calculation = 'scf',
  outdir = '.',
  pseudo_dir = '.'
/
&SYSTEM
  ibrav = 0,
  nat   = 2,
  ntyp  = 1,
  ecutwfc = 40
/
&ELECTRONS
/

CELL_PARAMETERS angstrom
  2.5357000   0.0000000   0.0000000
  1.2678500   2.1959806   0.0000000
  1.2678500   0.7319935   2.0703904

ATOMIC_SPECIES
  C    1.0   C.UPF

ATOMIC_POSITIONS angstrom
  C   0.000000000  0.000000000  0.000000000
  C   1.267850000  0.731993539  0.517597595

K_POINTS automatic
  8 8 8 0 0 0

The pseudopotential used was C.UPF and the calculation runs in a few seconds as

$ pw.x < diamond.in > diamond.out

Phonon calculations need well-relaxed geometries. Here symmetry makes things simple. If a DFT relaxation step is needed, then set
calculation = 'relax',
and include an empty ions card

&IONS
/

Phonons

The next calculation actually calculates the phonons on the coarse phonon grid, slowly.

diamond.ph.in

Normal modes for diamond
 &inputph
  amass(1)=12
  epsil=.true.,
  trans=.true.,
  asr=.true.,
  ldisp=.true.,
  nq1=8,
  nq2=8,
  nq3=8,
  fildyn='dmat.diamond'
 /
$ ph.x < diamond.ph.in > diamond.ph.out

That run may take a core-hour, and will produce 65 output files.

Dynamical matrix

The above output then needs to be processed and combined by q2r.

diamond.q2r.in

&INPUT
  fildyn="dmat.diamond",
  zasr="crystal",
  flfrc="flfrc.diamond"
/

At least this step runs very quickly.

$ q2r.x < diamond.q2r.in > diamond.q2r.out

DoS and Eigenvalues

The final calculation of the DoS and eigenstates on a fine grid is performed by matdyn.x.

diamond.matdyn.in

&INPUT
  flfrc="flfrc.diamond",
  asr="crystal",
  dos=.true.,
  nk1=18,
  nk2=18,
  nk3=18
/

which runs in a few tens of seconds

$ matdyn.x < diamond.matdyn.in > diamond.matdyn.out

This produces a matdyn.dos file which can be plotted directly.

gnuplot> plot "matdyn.dos" using 1:2 w l

diamond phonon DoS from QE

QE had used Blöchl's tetrahedral method, and the .dos file also contains the DoS projected onto each atom separately (very uninteresting in this case where the atoms are equivalent under symmetry operations).

QE also produces a matdyn.freq file, which contains kpoints, weights and frequencies. It does not contain any information about the unit cell, and the kpoints are after symmetrisation and in Cartesian co-ordinates.

If you really want to process it with c2x, then

$ c2x --merge --phdos_gnu diamond.in matdyn.freq out.gnu