structuretoolkit.common.helper.get_vertical_length

structuretoolkit.common.helper.get_vertical_length#

structuretoolkit.common.helper.get_vertical_length(structure: Atoms, norm_order: int = 2)[source]#

Return the length of the cell in each direction projected on the vector vertical to the plane.

Example:

For a cell [[1, 1, 0], [0, 1, 0], [0, 0, 1]], this function returns [1., 0.70710678, 1.] because the first cell vector is projected on the vector vertical to the yz-plane (as well as the y component on the xz-plane).

Parameters:

norm_order (int) – Norm order (cf. numpy.linalg.norm)