euphonic.data.bands module¶
-
class
euphonic.data.bands.BandsData(seedname, model='CASTEP', path='')¶ Bases:
euphonic.data.data.DataA class to read and store electronic data from model (e.g. CASTEP) output files
-
seedname¶ Seedname specifying file(s) to read from
Type: str
-
model¶ Records what model the data came from
Type: str
-
n_qpts¶ Number of k-points
Type: int
-
n_spins¶ Number of spin components
Type: int
-
n_branches¶ Number of electronic dispersion branches
Type: int
-
fermi¶ The Fermi energy/energies. Default units eV
Type: (n_spins,) float ndarray
-
cell_vec¶ The unit cell vectors. Default units Angstroms
Type: (3, 3) float ndarray
-
recip_vec¶ The reciprocal lattice vectors. Default units inverse Angstroms
Type: (3, 3) float ndarray
-
qpts¶ K-point coordinates
Type: (n_qpts, 3) float ndarray
-
weights¶ The weight for each k-point
Type: (n_qpts,) float ndarray
-
freqs¶ Band frequencies, ordered according to increasing k-point number. Default units eV
Type: (n_qpts, 3*n_ions) float ndarray
-
freq_down¶ Spin down band frequencies, ordered according to increasing k-point number. Can be empty if there are no spin down frequencies present. Default units eV
Type: (n_qpts, 3*n_ions) float ndarray
-
__init__(seedname, model='CASTEP', path='')¶ ” Calls functions to read the correct file(s) and sets BandsData attributes
Parameters: - seedname (str) – Seedname of file(s) to read
- model ({'CASTEP'}, optional, default 'CASTEP') – Which model has been used. e.g. if seedname = ‘Fe’ and model=’CASTEP’, the ‘Fe.bands’ file will be read
- path (str, optional) – Path to dir containing the file(s), if in another directory
-
calculate_dos(dos_bins, gwidth, lorentz=False, weights=None)¶ Calculates a density of states with fixed width Gaussian/Lorentzian broadening. Extends the Data.calculate_dos function and has the same input parameters, but additionally calculates DOS for spin down frequencies
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) – FWHM of Gaussian/Lorentzian for broadening the DOS bins, in the same units as freqs. Set to 0 if no broadening is desired
- 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 ((n_ebins,) float ndarray) – The spin up density of states for each bin
- dos_down ((n_ebins,) float ndarray) – The spin down density of states for each bin
-
cell_vec
-
fermi
-
freq_down
-
freqs
-
recip_vec
-