euphonic.data.data module¶
-
class
euphonic.data.data.Data¶ Bases:
objectA general superclass for both vibrational and electronic data. Has functions that can apply to both vibrational and electronic data (e.g. CASTEP .bands and .phonon file data)
-
calculate_dos(dos_bins, gwidth=0, lorentz=False, weights=None, _freqs=None)¶ Calculates a density of states with fixed width Gaussian/Lorentzian broadening
Parameters: - dos_bins ((n_ebins + 1,) float ndarray) – The energy bin edges to use for calculating the DOS, in the same units as freqs
- gwidth (float, optional, default 0) – FWHM of Gaussian/Lorentzian for broadening the DOS bins, in the same units as freqs
- lorentz (boolean, optional) – Whether to use a Lorentzian or Gaussian broadening function. Default: False
- weights ((n_qpts, n_branches) float ndarray, optional) – The weights to use for each q-points and branch. If unspecified, uses the q-point weights stored in the Data object
Returns: dos – The density of states for each bin
Return type: (n_ebins,) float ndarray
-
convert_e_units(units)¶ Redefine the units to be used when displaying values with energy units e.g. freqs
Parameters: units (str) – The units to use e.g. ‘1/cm’, ‘hartree’, ‘eV’
-
convert_l_units(units)¶ Redefine the units to be used when displaying value with length units e.g. cell_vec
Parameters: units (str) – The units to use e.g. ‘angstrom’, ‘bohr’
-
dos_bins¶
-