FeaturizeDoscar#
- class lobsterpy.featurize.core.FeaturizeDoscar(path_to_structure, path_to_doscar, e_range=[-10.0, 0.0], add_element_dos_moments=False)[source]#
Bases:
object
Class to compute DOS moments and fingerprints from DOSCAR.lobster / DOSCAR.LSO.lobster.
- Parameters:
path_to_structure (str | Path) – path to structure file (e.g., CONTCAR (preferred), POSCAR)
path_to_doscar (str | Path) – path to DOSCAR.lobster or DOSCAR.LSO.lobster
e_range (list[float] | None) – range of energy relative to fermi for which moment features and features needs to be computed
add_element_dos_moments (bool) – add element dos moment features alongside orbital dos
- get_df(ids=None)[source]#
Return a pandas dataframe with computed DOS moment features as columns.
- Parameters:
ids (str | None) – set index name in the pandas dataframe. Default is None. When None, LOBSTER calc directory name is used as index name.
- Return type:
DataFrame
Moment features are PDOS center, width, skewness, kurtosis and upper band edge.
- Returns:
A pandas dataframe object
- Parameters:
ids (str | None)
- Return type:
DataFrame
- get_fingerprint_df(ids=None, fp_type='summed_pdos', binning=True, n_bins=256, normalize=True)[source]#
Generate a dataframe consisting of DOS fingerprint (fp).
- Parameters:
ids (str | None) – set index name in the pandas dataframe. Default is None. When None, LOBSTER calc directory name is used as index name.
fp_type (Literal['s', 'p', 'd', 'f', 'summed_pdos', 'tdos']) – Specify fingerprint type to compute, can accept s/p/d/f/tdos/summed_pdos (default is summed_pdos)
binning (bool) – If true, the DOS fingerprint is binned using np.linspace and n_bins. Default is True.
n_bins (int) – Number of bins to be used in the fingerprint (default is 256)
normalize (bool) – If true, normalizes the area under fp to equal to 1. Default is True.
- Returns:
A pandas dataframe object with DOS fingerprints
- Return type:
DataFrame