pythtb.Lattice.k_path#
- Lattice.k_path(k_nodes, nk, report=False)[source]#
Interpolates a path in reciprocal space.
Interpolates a path in reciprocal space between specified k-points. In 2D or 3D the k-path can consist of several straight segments connecting high-symmetry points (“nodes”). The interpolated path is constructed so that the k-points are (nearly) equidistant in Cartesian k-space.
- Parameters:
- k_nodesarray-like, str
Array of k-vectors in reduced units, between which the interpolated path will be constructed. In 1D k-space, value may be a string:
“full”: Implies
[0.0, 0.5, 1.0](full BZ)“fullc”: Implies
[-0.5, 0.0, 0.5](full BZ, centered)“half”: Implies
[ 0.0, 0.5](half BZ)
- nkint
Total number of k-points along the path.
- reportbool, optional
Optional parameter specifying whether printout is desired (default is False).
- Returns:
- k_vecnp.ndarray
Array of (nearly) equidistant interpolated k-points. Shape is
(nk, dim_k).- k_distnp.ndarray
Array giving accumulated k-distance to each k-point in the path. This array is useful when plotting bands along the path. The distances between the points can be used to ensure that the plot accurately reflects the k-space geometry. Shape is
(nk,).Changed in version 2.0.0: The returned
k_distnow includes the factors of \(2\pi\). See notes for further details.- k_nodenp.ndarray
Array giving accumulated k-distance to each node on the path in Cartesian coordinates. This array can be used to reference the nodes on the 1D
k_distarray, e.g., when plotting high-symmetry points. Shape is(n_nodes,).
Notes
The distance between the points is calculated in the Cartesian frame, however coordinates themselves are given in dimensionless reduced coordinates! This is done so that this array can be directly passed to function
pythtb.TBModel.solve_ham().Unlike array
k_vec,k_disthas dimensions! Units are defined so that for a one-dimensional crystal with lattice constant equal to for example \(10\) the length of the Brillouin zone would equal \(2\pi/10\).
Examples
Construct a path connecting four nodal points in k-space Path will contain 401 k-points, roughly equally spaced
>>> path = [[0.0, 0.0], [0.0, 0.5], [0.5, 0.5], [0.0, 0.0]] >>> (k_vec, k_dist, k_node) = my_model.k_path(path,401)
Solve for eigenvalues on that path and plot the band structure
>>> import matplotlib.pyplot as plt >>> evals = tb.solve_ham(k_vec) >>> for n in range(evals.shape[1]): ... plt.plot(k_dist, evals[:, n], 'b-') >>> for node_dist in k_node: ... plt.axvline(x=node_dist, color='k', linestyle='--') >>> plt.xlabel('k') >>> plt.ylabel('Energy (eV)') >>> plt.show()