euphonic.util module¶
-
direction_changed(qpts, tolerance=5e-06)¶ Takes a N length list of q-points and returns an N - 2 length list of booleans indicating whether the direction has changed between each pair of q-points
-
is_gamma(qpt)¶ Determines whether the given point(s) are gamma points
Parameters: qpts ((3,) or (N, 3) float ndarray) – The q-point or q-points Returns: isgamma – Whether the input q-points(s) are gamma points. Returns a scalar if only 1 q-point is provided Return type: bool or (N,) bool ndarray
-
mp_grid(grid)¶ Returns the q-points on a MxNxL Monkhorst-Pack grid specified by grid
Parameters: grid ((3,) int ndarray) – Length 3 array specifying the number of points in each direction Returns: qgrid – Q-points on an MP grid Return type: (M*N*L, 3) float ndarray
-
get_all_origins(max_xyz, min_xyz=[0, 0, 0], step=1)¶ Given the max/min number of cells in each direction, get a list of all possible cell origins
Parameters: - max_xyz ((3,) int ndarray) – The number of cells to count to in each direction
- min_xyz ((3,) int ndarray, optional) – The cell number to count from in each direction
- step (integer, optional) – The step between cells
Returns: origins – The cell origins
Return type: (prod(max_xyz - min_xyz)/step, 3) int ndarray
-
get_qpoint_labels(crystal, qpts)¶ Gets q-points point labels (e.g. GAMMA, X, L) for the q-points at which the path through reciprocal space changes direction
Parameters: - crystal (Crystal) – The crystal to get high-symmetry labels for
- qpts ((n_qpts, 3) float ndarray) – The q-points to get labels for
Returns: x_tick_labels – Tick labels and the q-point indices that they apply to
Return type: list (int, string) tuples or None