wulfric.Kpoints#

class wulfric.Kpoints(rcell, coordinates=None, names=None, labels=None, path=None, n=100)[source]#

Interface for convenient manipulations with the high-symmetry k-points and k-path in reciprocal space.

Parameters:
rcell(3, 3) array-like

Reciprocal cell. Rows are interpreted as vectors.

coordinateslist, optional

Coordinates of high-symmetry points given in relative coordinates in reciprocal space (in the basis of rcell).

names: list, optional

Names of the high-symmetry points. Used in path. Has to have the same length as coordinates. If None, then use "K1", ... "KN", where N = len(coordinates).

labelslist, optional

List of the high-symmetry point's labels. Used for plotting. Has to have the same length as coordinates. If None and names is None, then use "K$_1$", ... "K$_N$", where ``N = len(coordinates). If None but names are given, then ``labels = names.

pathstr, optional

K-path. Use elements of names to specify the path. If no names given, then use "K1-K2-...-KN", where N = len(coordinates).

nint

Number of intermediate points between each pair of the high-symmetry points (high symmetry points excluded).

Attributes:
rcell(3, 3) numpy.ndarray

Reciprocal cell. Rows are interpreted as vectors.

hs_nameslist

Names of the high-symmetry points. Used in k-path and as main identifier of the point.

hs_coordinatesdict

Dictionary of the high-symmetry points coordinates. Coordinates are relative (in the basis of rcell)

{"name": [k_a, k_b, k_c], ... }
hs_labelsdict

Dictionary of labels for plotting.

{"name": "label", ... }

Methods:

add_hs_point(name, coordinate[, label, relative])

Adds high-symmetry point.

copy()

Creates a copy of the kpoints.

flat_points([relative])

Flatten coordinates of all points with n points between each pair of the high symmetry points (high-symmetry points excluded).

from_crystal(cell, atoms[, convention, ...])

hs_table([decimals])

Table of the high-symmetry points.

points([relative])

Coordinates of all points with n points between each pair of the high symmetry points (high-symmetry points excluded).

remove_hs_point(name)

Removes high-symmetry point.

ticks([relative])

Tick's positions of the high-symmetry points, ready to be plotted.

Properties:

labels

Labels of high-symmetry points, ready to be plotted.

n

Amount of points between each pair of the high-symmetry points (high-symmetry points excluded).

path

K points path.

path_string

K points path as a string.