euphonic-dos
The euphonic-dos program can be used to plot density of states,
partial density of states, and/or neutron-weighted density of states.
It can use pre-calculated frequencies, or use force constants to
generate frequencies and DOS over a Monkhorst-Pack grid. For example,
to plot DOS from a Phonopy mesh.yaml file in units of THz, run:
euphonic-dos NaCl/mesh.yaml --energy-unit THz
Or, to plot coherent neutron-weighted DOS from CASTEP force constants in a
.castep_bin file on a 15x15x12 grid with 1.5 meV broadening, run:
euphonic-dos quartz.castep_bin --weighting coherent-dos --grid 15 15 12 --energy-broadening 1.5
To see all the command line options, run:
euphonic-dos -h
You can also see the available command line options below. For information on advanced plot styling, see Customising plots.
Command Line Options
Plots a DOS from the file provided. If a force constants file is provided, a DOS is generated on the Monkhorst-Pack grid specified by the grid (or grid-spacing) argument.
usage: euphonic-dos [-h] [--asr [{reciprocal,realspace}]]
[--dipole-parameter DIPOLE_PARAMETER]
[--use-c | --disable-c] [--n-threads N_THREADS]
[--pdos [PDOS ...]]
[--weighting {dos,coherent-dos,incoherent-dos,coherent-plus-incoherent-dos}]
[--grid GRID GRID GRID | --grid-spacing GRID_SPACING]
[--scale SCALE] [--save-json SAVE_JSON] [-s SAVE_TO]
[--title TITLE] [--x-label XLABEL] [--y-label YLABEL]
[--style STYLE [STYLE ...]] [--no-base-style]
[--font FONT] [--font-size FONTSIZE]
[--fig-size FIGSIZE FIGSIZE]
[--fig-size-unit FIGSIZE_UNIT] [--line-width LINEWIDTH]
[--e-min E_MIN] [--e-max E_MAX]
[--energy-unit ENERGY_UNIT] [--ebins EBINS]
[--energy-broadening ENERGY_BROADENING [ENERGY_BROADENING ...]]
[--shape [{gauss,lorentz}]] [--adaptive]
[--adaptive-method {reference,fast}]
[--adaptive-error ADAPTIVE_ERROR]
[--adaptive-scale ADAPTIVE_SCALE]
[--length-unit LENGTH_UNIT]
filename
File I/O arguments
- filename
Phonon data file. This should contain force constants or phonon mode data. Force constants formats: .yaml, force_constants.hdf5 (Phonopy); .castep_bin , .check (Castep); .json (Euphonic). Phonon mode data formats: {band,qpoints,mesh}.{hdf5,yaml} (Phonopy); .phonon (Castep); .json (Euphonic)
- --save-json
Save spectrum to a .json file with this name
q-point sampling arguments
- --grid
Defines a Monkhorst-Pack grid.
- --grid-spacing
q-point spacing of Monkhorst-Pack grid.
Default:
0.1- --length-unit
Length units; these will be inverted to obtain units of distance between q-points (e.g. “bohr” for bohr^-1).
Default:
'angstrom'
energy/frequency arguments
- --e-min
Energy range minimum in ENERGY_UNIT
- --e-max
Energy range maximum in ENERGY_UNIT
- --energy-unit, -u
Energy units
Default:
'meV'- --ebins
Number of energy bins
Default:
200- --energy-broadening, --eb
The FWHM of broadening on energy axis in ENERGY_UNIT (no broadening if unspecified). If multiple values are provided, these will be interpreted as polynomial coefficients to be evaluated in ENERGY_UNIT base, e.g. –energy-broadening 1. 0.01 1e-6 –energy-unit meV will apply FWHM of (1. + 0.01 (energy / meV) + 1e-6 (energy / meV)^2) meV.
- --shape
Possible choices: gauss, lorentz
The broadening shape
Default:
'gauss'- --adaptive
Use adaptive broadening on the energy axis to broaden based on phonon mode widths, rather than using fixed width broadening
Default:
False- --adaptive-method
Possible choices: reference, fast
Adaptive broadening method. “Reference” is default for compatibility purposes: “Fast” method is approximate with much better performance.
Default:
'reference'- --adaptive-error
Maximum absolute error for gaussian approximations when using the fast adaptive broadening method
Default:
0.01- --adaptive-scale
Scale factor applied to adaptive broadening width
Default:
1.0
Force constants interpolation arguments
- --asr
Possible choices: reciprocal, realspace
Apply an acoustic-sum-rule (ASR) correction to the data: “realspace” applies the correction to the force constant matrix in real space. “reciprocal” applies the correction to the dynamical matrix at each q-point.
- --dipole-parameter
Set the cutoff in real/reciprocal space for the dipole Ewald sum; higher values use more reciprocal terms. If tuned correctly this can result in performance improvements. See euphonic-optimise-dipole-parameter program for help on choosing a good DIPOLE_PARAMETER.
Default:
1.0
Property-calculation arguments
- --pdos
Plot PDOS. With –pdos, per-species PDOS will be plotted alongside total DOS. A subset of species can also be selected by adding more arguments e.g. –pdos Si O
- --weighting, -w
Possible choices: dos, coherent-dos, incoherent-dos, coherent-plus-incoherent-dos
Type of DOS to plot: DOS, coherent neutron-weighted DOS, incoherent neutron-weighted DOS or total (coherent + incoherent) neutron-weighted DOS
Default:
'dos'- --scale
Intensity scale factor
Plotting arguments
- -s, --save-to
Save resulting plot to a file with this name
- --title
Plot title
- --x-label, --xlabel
Plot x-axis label
- --y-label, --ylabel
Plot y-axis label
- --style
Matplotlib styles (name or file)
- --no-base-style
Remove all default formatting before applying other style options.
Default:
False- --font
Select text font. (This has to be a name known to Matplotlib. font-family will be set to sans-serif; it doesn’t matter if)the font is actually sans-serif.
- --font-size, --fontsize
Set base font size in pt.
- --fig-size, --figsize
Figure canvas size in FIGSIZE-UNITS
- --fig-size-unit, --figsize-unit
Unit of length for –figsize
Default:
'cm'- --line-width, --linewidth
Set line width in pt.