Note
Go to the end to download the full example code.
K-path and k-points#
This page explains how to plot a set of atoms.
import wulfric
import numpy as np
cell = np.array(
[
[5.64, 0.00, 0.00],
[0.00, 5.64, 0.00],
[0.00, 0.00, 5.64],
]
)
atoms = {
"names": ["Cl1", "Cl2", "Cl3", "Cl4", "Na1", "Na2", "Na3", "Na4"],
"positions": np.array(
[
(0, 0, 0),
(1 / 2, 1 / 2, 0),
(1 / 2, 0, 1 / 2),
(0, 1 / 2, 1 / 2),
(1 / 2, 1 / 2, 1 / 2),
(1 / 2, 0, 0),
(0, 1 / 2, 0),
(0, 0, 1 / 2),
]
),
}
spglib_data = wulfric.get_spglib_data(cell, atoms)
Best way to interact with high-symmetry points and k-path is trough the
wulfric.Kpoints. First, we create one
kp = wulfric.Kpoints.from_crystal(
cell, atoms, spglib_data=spglib_data, convention="HPKOT"
)
Now one can check the recommended k-path and pre-defined high-symmetry points
print(kp.path_string)
print(kp.hs_table())
GAMMA-X-U|K-GAMMA-L-W-X
Name rel_b1 rel_b2 rel_b3 k_x k_y k_z
GAMMA 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
X 0.00000000 1.00000000 0.00000000 0.00000000 1.11403995 0.00000000
L 0.50000000 0.50000000 0.50000000 0.55701997 0.55701997 0.55701997
W 0.50000000 1.00000000 -0.00000000 0.55701997 1.11403995 -0.00000000
W2 0.00000000 1.00000000 0.50000000 0.00000000 1.11403995 0.55701997
K 0.75000000 0.75000000 -0.00000000 0.83552996 0.83552996 -0.00000000
U 0.25000000 1.00000000 0.25000000 0.27850999 1.11403995 0.27850999
High-symmetry points are given by relative coordinates with respect to the reciprocal cell of the original cell. However, the points correspond to the Brillouin zone of the primitive cell, which may or may not be the one that have k-path and high symmetry points lying on its edges
prim_cell, _ = wulfric.crystal.get_primitive(cell, atoms, spglib_data=spglib_data)
pe = wulfric.PlotlyEngine(_sphinx_gallery_fix=True)
pe.plot_brillouin_zone(
cell=prim_cell, color="red", legend_label="Brillouin zone of primitive cell"
)
pe.plot_kpath(kp=kp, legend_label="K-path")
pe.plot_kpoints(kp=kp, legend_label="K-points")
pe.plot_brillouin_zone(
cell=cell, color="chocolate", legend_label="Brillouin zone of original cell"
)
pe.show()
Total running time of the script: (0 minutes 0.935 seconds)