Disentangle

class Disentangle(overlap_matrix: ndarray)

Attributes

callsig

disentangle_matrix

Give back the reordering for the band structure.

no_reorder_idx

Give back the list of indices that aren't going to be disentangled.

routine

Give back the routine for the reordering.

Methods

__call__(matrix)

Apply the disentanglement on a matrix, wrapper for Disentangle._apply_disentanglement()

_apply_disentanglement(matrix)

Apply the disentanglement on a matrix

_calc_disentangle_matrix()

Calculate the changes in index for the band structure of which the overlap matrix is given

_linear_sum_approx(matrix)

Function to calculate the equivalent of scipy.optimize.lineair_sum_assignment

_linear_sum_scipy(matrix)

Wrapper for scipy.optimize.lineair_sum_assignment

__call__(matrix: ndarray) ndarray

Apply the disentanglement on a matrix, wrapper for Disentangle._apply_disentanglement()

usage :

energy_sorted = Disentangle(energy_unsorted)

Parametersnp.ndarray

The matrix to reorder

Returnsnp.ndarray

The reordered matrix

property disentangle_matrix: Tuple[ndarray, ndarray]

Give back the reordering for the band structure.

ReturnsTuple[np.ndarray(), np.ndarray()]

2D array with the [to-index, relative changes index] of the band for each step

property no_reorder_idx: List[int]

Give back the list of indices that aren’t going to be disentangled.

This function can be useful for high-symmetry points, where it isn’t clear what is the best band for a overlap.

property routine: int

Give back the routine for the reordering.

Returnsint
The integer for the routine:

0 -> The bands are ordered from low to high 1 -> The scipy.optimize.linear_sum_assignment