Phonon Band Structure with Abinit
Just as with Quantum Espresso, one must run multiple programs to achieve a band structure.
First the basic SCF calculation.
$ abinit diamond.abi >& out
Then the rather longer phonon calculation
This contains the alarming magic number "29", the number of irreducible q points for the 8x8x8 grid used. This number can be obtained by
$ abitk ibz diamondo_DS1_GSR.nc --ngkpt 8 8 8 --shiftk 0 0 0
Before the second run can be started, some of the output files from the first must be renamed.
$ mv diamondo_DS1_WFK diamond_2o_DS999_WFK $ mv diamondo_DS2_1WF7 diamond_2o_DS998_1WF7 $ mv diamondo_DS2_1WF8 diamond_2o_DS998_1WF8 $ mv diamondo_DS2_1WF9 diamond_2o_DS998_1WF9
The second run can then be started with
$ abinit diamond_2.abi >& out_2
and it will take half a core-hour or so.
Next one must merge the 29 output files created.
$ mrgddb < diamond_3.abi
Then one needs to interpolate along a band path.
$ anaddb diamond_4.abi > out_4
And finally one can invoke Abinit's plot generation program. It uses Abinit's old convention of reading from stdin a list of files to process.
$ cat diamond_5.files diamond_5.abi diamond_5.eps diamond_4o_B2EPS.freq no $ band2eps < diamond_5.files

The line
nqline 16 13 17 14 11 8
gives the number of points in each section of the band plot. This can
be found in the section of out_4 reading
Total number of points in the path: 80 Number of divisions for each segment of the normalized path: 0.00000 0.00000 0.00000 ==> 0.50000 0.00000 0.50000 ( ndivs : 16 ) 0.50000 0.00000 0.50000 ==> 0.37500 0.37500 0.75000 ( ndivs : 13 ) 0.37500 0.37500 0.75000 ==> 0.00000 0.00000 0.00000 ( ndivs : 17 ) 0.00000 0.00000 0.00000 ==> 0.50000 0.50000 0.50000 ( ndivs : 14 ) 0.50000 0.50000 0.50000 ==> 0.50000 0.25000 0.75000 ( ndivs : 11 ) 0.50000 0.25000 0.75000 ==> 0.50000 0.00000 0.50000 ( ndivs : 8 )
The extent of the y-axis was given explicitly. One can colour the lines by the weight of given atomic species, although this makes no sense for diamond.
Alternatively one can skip the fifth step and plot the bands using
$ xmgrace diamond_4o_PHBANDS.agr
or, if prtphbands 2 is added
to diamond_4.abi,
$ gnuplot diamond_4o_PHBANDS.gnuplot
These approaches do not label the special points (although they do draw vertical lines at them), and plot the energy in meV. The result is even less pretty than the EPS above.
Note that the output files from step four above are remarkably
sparse. The .freq files are bare lists of eigenvalues
with no header and no information about
q-points. The PHFREQ file adds a header reporting the
number of q-points and modes, but still has no q-point
information. The diamond_4.abo file contains more useful
information, but is harder to parse. If eivec 1 is
included in diamond_4.abi, eigenvectors are also given in
the .abo file. These can then be read by c2x.
$ c2x --phbands_gnu_dcross -e=5e-4 -v diamond_4.abo out.gnu $ gnuplot -p out.gnu
Note the use of -e=5e-4 to make c2x more tolerant of
the low precision of the q-point co-ordinates. It may even be
necessary to use
1e-3 not 5e-4. C2x detects the break
points in the band path itself, and is confused by low
precisions.
