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
- 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.extrema.
filter_segments_by_direction
(segment_list, direction)[source]¶ Filter a list of Segments so that only those in a particular direction remain.
Parameters: - segment_list (list(Segment)) – A list of
Segment
objects. - direction (array(float)) – The direction array, length 3.
Returns: A list of
Segment
objects.Return type: segment_list (list(Segment))
- segment_list (list(Segment)) – A list of
-
effmass.extrema.
find_CB_indices
(Data, Settings)[source]¶ Finds the kpoint index and band index of the minimum energy turning points within
effmass.inputs.Settings.energy_range
of the conduction band minimum (effmass.inputs.Data.CBM
). Return indices for the lowest energy CB only if frontier_bands_only is True.Parameters: Returns: A 2-dimensional array. Contains [
efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index] for each minima.Return type: array
-
effmass.extrema.
find_VB_indices
(Data, Settings)[source]¶ Finds the kpoint index and band index of the maximum energy turning points within
effmass.inputs.Settings.energy_range
of the valence band maximum (effmass.inputs.Data.VBM
). Return indices for the highest energy VB only if frontier_bands_only is True.Parameters: Returns: A 2-dimensional array. Contains [
efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index] for each maxima.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 [effmass.inputs.Data.energies
row index,effmass.inputs.Data.kpoints
row index]. Defaults to None.
Returns: A list of Segment
objects.Return type: list(Segment)
-
effmass.extrema.
get_frontier_CB_indices
(Data, CB_min_indices, degeneracy_condition)[source]¶ Returns the indices of the lowest energy minima across the Brillouin Zone
Parameters: - Data (Data) – instance of the
Data
class. - CB_min_indices (array(int)) – A 2-dimensional array. Each row contains [
efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index] for each minimum in the CB band.
Returns: A 2-dimensional array. Each row contains [
efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index] for each minimum in the frontier conduction band(s).Return type: frontier_indices (array(int))
- Data (Data) – instance of the
-
effmass.extrema.
get_frontier_VB_indices
(Data, VB_max_indices, degeneracy_condition)[source]¶ Returns the indices of the highest energy maxima across the Brillouin Zone
Parameters: - Data (Data) – instance of the
Data
class. - VB_max_indices (array(int)) – A 2-dimensional array. Each row contains [
efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index] for each maximum in the VB band.
Returns: A 2-dimensional array. Each row contains [
efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index] for each maximum in the frontier valence band(s).Return type: frontier_indices (array(int))
- Data (Data) – instance of the
-
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)
- band_index (int) – index of
-
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)
- band_index (int) – index of
-
effmass.extrema.
get_maximum_indices
(Data, extrema_search_depth)[source]¶ Finds the kpoint indices and band indices of all maximum turning points in VB within extrema_search_depth.
Parameters: - Data (Data) – instance of the
Data
class. - extrema_search_depth (float) – energy in kT from bandedge over which to search for maxima.
Returns: A 2-dimensional array. Each row contains [
efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index] for each maximum in the VB band.Return type: array
- Data (Data) – instance of the
-
effmass.extrema.
get_minimum_indices
(Data, extrema_search_depth)[source]¶ Finds the kpoint indices and band indices of all minimum turning points in CB within extrema_search_depth.
Parameters: - Data (Data) – instance of the
Data
class. - extrema_search_depth (float) – energy in kT from bandedge over which to search for minima.
Returns: A 2-dimensional array. Each row contains [
efmmas.inputs.Data.bands
index,effmass.inputs.Data.kpoints
index] for each minimum in the CB band.Return type: array
- Data (Data) – instance of the