Pages

Plotting Transport Coefficients from BoltzTraP

BoltzTraP puts the traces of the various transport coefficient tensors (such as the conductivity tensor) in a *.trace. The trace of the conductivity tensor can be plotted using this gnuplot script. Remember to select the size to fit your display. Note that the "trace" as reported by BoltzTraP 1.2.5 is actually the trace divided by 3.
set terminal png size 2720,1800 font "Helvetica,30" linewidth 5
set output "ConductivitySym.png"
set title "Conductivity/Relaxation Time (Symmetrised)"
set xlabel "Chemical Potential (eV)"
set ylabel "1/(Ω*m*s)"

set grid

plot "data.trace" using ($1*13.605698066):6 with lines title "Conductivity/Tau"

reset
Note that this script converts the x-axis to units of electron-volts. Also remember that BoltzTraP uses the constant relaxation time approximation, so one must supply a relaxation time to get the true conductivity or mobility. The mobility is related to the conductivity by this simple formula: \(\sigma = ne\mu_e\) where \(n = N/V_{cell}\), where N is an output from BoltzTraP.
set terminal png size 2720,1800 font "Helvetica,30" linewidth 5
set output "MobilitySym.png"
set title "Mobility (Symmetrised)"
set xlabel "Chemical Potential (eV)"
set ylabel "cm^{2}/(V*s)"

set grid

set xrange [-2:2]
#Unit cell volumes in cm^3
V_cell = 10

plot "data.trace" using ($1*13.605698066):($6*tau/($3/V_cell*1.6022*10**-19)) with lines title "Mobility/Tau"

reset
Individual components of the tensors may be plotted from the corresponding file; for conductivity, this file is *.condtens.
set terminal png size 2720,1800 font "Helvetica,30" linewidth 5
set output "Conductivity_xx.png"
set title "Conductivity/Relaxation Time"
set xlabel "Chemical Potential (eV)"
set ylabel "1/(Ω*m*s)"

set grid

plot "data.condtens" using ($1*13.605698066):4 with lines title "XX",
"data.condtens" using ($1*13.605698066):5 with lines title "XY",
"data.condtens" using ($1*13.605698066):6 with lines title "XZ",
"data.condtens" using ($1*13.605698066):7 with lines title "YZ",
"data.condtens" using ($1*13.605698066):8 with lines title "YY",
"data.condtens" using ($1*13.605698066):9 with lines title "YZ",
"data.condtens" using ($1*13.605698066):10 with lines title "ZX",
"data.condtens" using ($1*13.605698066):11 with lines title "ZY",
"data.condtens" using ($1*13.605698066):12 with lines title "ZZ"

reset
As this paper points out, the effective mass can be a more useful quantity to plot from calculations because conductivity/mobility are dependent on the scattering time and mix knowledge of the electronic structure (which, in principle, we know from the DFT calculation) and the scattering properties of the material and its carriers (which we probably do not know at all). The effective mass is, in this sense, more useful because it gives information about the electronic structure without requiring any knowledge of scattering in the material. The paper gives the formula \(m^* = \frac{e^2 \tau |N|}{\sigma V_{cell}}\) where \(\tau/\sigma\) is the reciprocal of an output from BoltzTrap. \(N\) is another output from BoltzTraP in the *.trace file.
set terminal png size 2720,1800 font "Helvetica,30" linewidth 5
set output "MassSym.png"
set title "Effective Mass"
set xlabel "Chemical Potential (eV)"
set ylabel "Mass in m_{e}"

set grid

set xrange [-2:2]
#Unit cell volumes in m^3
V_cell = 10

# tau = 10**-12 #Guess relaxation time
# sigma = n * e * mu
# 1/m = sigma/(e**2 * tau) * 1/n
# n = abs(N)/V_cell
# Checked, relations used below have proper units of mass

plot "data.trace" using ($1*13.605698066):(abs($3)/V_cell*(1.602177*10**-19)**2/$6)/(9.1093836*10**-31) with lines title "Mass"

reset

N.B.: Do not trust WolframAlpha to correctly convert cubic Angstroms to cubic centimeters!

References
Gibbs, Zachary M., Francesco Ricci, Guodong Li, Hong Zhu, Kristin Persson, Gerbrand Ceder, Geoffroy Hautier, Anubhav Jain, and G. Jeffrey Snyder. 2017. “Effective Mass and Fermi Surface Complexity Factor from Ab Initio Band Structure Calculations.” npj Computational Materials. Springer US: 1–6. doi:10.1038/s41524-017-0013-3.