effmass.extrema¶
A module for finding the band structure extrema and instantiating
a Segment
object for each extrema point.
The extrema are found within an energy range given by the Settings
class.
Each Segment object contains data for kpoints within an energy range given by the Settings
class.
-
effmass.extrema.
calc_CBM_VBM_from_Fermi
(Data, CBMVBM_search_depth=4.0)[source]¶ This function is used to find the CBM and VBM when there is no occupancy data. It relies upon the Fermi level being in the middle of the band gap. The CBMVBM_search_depth is refereced from the fermi energy.
- Parameters
DataASE (DataASE) – instance of the
DataASE
class.- Returns
A tuple containing the conduction band minimum and valence band maximum in eV.
- Return type
(float, float)
-
effmass.extrema.
calculate_direction
(a, b)[source]¶ Calculates the direction vector between two points.
- Parameters
a (list) – the position vector of point a.
b (list) – the position vector of point b.
- Returns
The (unnormalised) direction vector between points a and b. The smallest magnitude of an element is 1 (eg: [1,1,2]).
- Return type
array
-
effmass.extrema.
change_direction
(kpoints, kpoint_indices)[source]¶ Finds the index of the kpoint (if any) where there is a change of direction in reciprocal space.
- Parameters
kpoints (array) – array of kpoints with shape (number_of_kpoints, 3). Each row contains the fractional coordinates of a kpoint [kx,ky,kz]. See
effmass.inputs.Data.kpoints
.kpoint_indices (list (int)) – the kpoint indices over which to check for change in direction
- Returns
the index of the kpoint where there is a change of direction. If there is no change of direction, returns None.
- Return type
int
-
effmass.extrema.
find_extrema_indices
(Data, Settings)[source]¶ Finds the kpoint index and band index of the minimum/maximum energy turning points within
effmass.inputs.Settings.energy_range
of the conduction band minimum (effmass.inputs.Data.CBM
) / valence band maximum (effmass.inputs.Data.VBM
).- Parameters
- Returns
A 3-dimensional array of shape (2, ). The first index differentiates between the valence band and conduction band. The second contains [
efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index] for each extrema.- Return type
array
-
effmass.extrema.
generate_segments
(Settings, Data, bk=None, truncate_dir_change=True)[source]¶ Generates a list of Segment objects.
- Args:
Settings (Settings): instance of the
Settings
class. Data (Data): instance of theData
class. truncate_dir_change (bool): If True, truncates eigenstates when there is a change in direction. If False, there is no truncation. Defaults to True. bk (list(int)): To manually set an extrema point, in format [efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index]. Defaults to None.
- Returns
A list of
Segment
objects.- Return type
list(Segments)
-
effmass.extrema.
get_kpoints_after
(band_index, kpoint_index, Settings, Data, truncate_dir_change=True)[source]¶ For a given eigenstate, finds eigenstates which 1) belong to the same band 2) come after the given eigenstate in the route through reciprocal space 3) are within
effmass.inputs.Settings.energy_range
.- Parameters
band_index (int) – index of
effmass.inputs.Data.bands
.kpoint_index (int) – index of
effmass.inputs.Data.kpoints
.Settings (Settings) – instance of the
Settings
class.Data (Data) – instance of the
Data
class.truncate_dir_change (bool) – If True, truncates eigenstates when there is a change in direction. If False, there is no truncation. Defaults to True.
- Returns
indices of
effmass.inputs.Data.kpoints
.- Return type
list(int)
-
effmass.extrema.
get_kpoints_before
(band_index, kpoint_index, Settings, Data, truncate_dir_change=True)[source]¶ For a given eigenstate, finds eigenstates which 1) belong to the same band 2) come before the given eigenstate in the route through reciprocal space 3) are within
effmass.inputs.Settings.energy_range
.- Parameters
band_index (int) – index of
effmass.inputs.Data.bands
.kpoint_index (int) – index of
effmass.inputs.Data.kpoints
.Settings (Settings) – instance of the
Settings
class.Data (Data) – instance of the
Data
class.truncate_dir_change (bool) – If True, truncates eigenstates when there is a change in direction. If False, there is no truncation. Defaults to True.
- Returns
indices of
effmass.inputs.Data.kpoints
.- Return type
list(int)