Exemplo n.º 1
0
def get_axes_distances(band_structure: BandStructure) -> list:
    """
    Get axes distances in angstrome.

    Args:
        band_structure: BandStructure class object.

    Returns:
        list: Axes distances in angstrome.

    Note:
        This function returns list of distances of connected band paths.
        To plot band structure, axes ratios are necessary.
        You can use resultant list as ratios for plotting band structure.
    """
    min_distance = 0.
    widths = []
    for distance, path_connection in zip(band_structure.get_distances(),
                                         band_structure.path_connections):
        if path_connection:
            continue

        width = distance[-1] - min_distance
        widths.append(width)
        min_distance = distance[-1]

    return widths