Note
Go to the end to download the full example code.
mP1#
Reference
POSCAR files with the crystal structure for these examples are taken from the seekpath repository with the permission of its authors. We refer you to seekpath for the original copies of the files and the license for those. To read more about the extended Bravais lattice symbols, chosen high-symmetry points and k-paths we refer you to the HPKOT paper.
Getting an example#
To get an example crystal use wulfric.crystal.hpkot_get_example().
import wulfric
# For every extended bravais lattice symbol two examples are defined:
# with and without inversion symmetry.
cell, atoms = wulfric.crystal.hpkot_get_example(
extended_bl_symbol="mP1", with_inversion=False
)
# To avoid multiple calls to spglib one can do it once and then pass spglib_data
# to the functions where it is needed
spglib_data = wulfric.get_spglib_data(cell=cell, atoms=atoms)
kp = wulfric.Kpoints.from_crystal(
cell=cell, atoms=atoms, convention="HPKOT", with_time_reversal=True
)
kp_no_tr = wulfric.Kpoints.from_crystal(
cell=cell, atoms=atoms, convention="HPKOT", with_time_reversal=False
)
conv_cell, conv_atoms = wulfric.crystal.get_conventional(
cell=cell, atoms=atoms, convention="HPKOT", spglib_data=spglib_data
)
prim_cell, prim_atoms = wulfric.crystal.get_primitive(
cell=cell, atoms=atoms, convention="HPKOT", spglib_data=spglib_data
)
K-path#
print(kp.path_string)
GAMMA-Z-D-B-GAMMA-A-E-Z-C2-Y2-GAMMA
High-symmetry points#
print(kp.hs_table(decimals=4))
Name rel_b1 rel_b2 rel_b3 k_x k_y k_z
GAMMA 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Z 0.0000 0.5000 0.0000 0.0000 0.7124 0.0000
B 0.0000 0.0000 0.5000 0.0000 0.0000 0.3788
B2 0.0000 0.0000 -0.5000 0.0000 0.0000 -0.3788
Y 0.5000 0.0000 -0.0000 0.3586 0.0000 0.2530
Y2 -0.5000 0.0000 0.0000 -0.3586 0.0000 -0.2530
C 0.5000 0.5000 -0.0000 0.3586 0.7124 0.2530
C2 -0.5000 0.5000 0.0000 -0.3586 0.7124 -0.2530
D 0.0000 0.5000 0.5000 0.0000 0.7124 0.3788
D2 0.0000 0.5000 -0.5000 0.0000 0.7124 -0.3788
A -0.5000 0.0000 0.5000 -0.3586 0.0000 0.1258
E -0.5000 0.5000 0.5000 -0.3586 0.7124 0.1258
H -0.3763 0.0000 0.7513 -0.2699 0.0000 0.3788
H2 -0.6237 0.0000 0.2487 -0.4474 0.0000 -0.1272
H4 -0.3763 0.0000 -0.2487 -0.2699 0.0000 -0.3788
M -0.3763 0.5000 0.7513 -0.2699 0.7124 0.3788
M2 -0.6237 0.5000 0.2487 -0.4474 0.7124 -0.1272
M4 -0.3763 0.5000 -0.2487 -0.2699 0.7124 -0.3788
Brillouin zone and default k-path#
pe = wulfric.PlotlyEngine(_sphinx_gallery_fix=True)
pe.plot_brillouin_zone(
cell=prim_cell, color="red", legend_label="Brillouin zone of the primitive cell"
)
pe.plot_brillouin_zone(
cell=cell, color="chocolate", legend_label="Brillouin zone of the original cell"
)
pe.plot_kpath(kp=kp, legend_group="with TR", legend_label="With time-reversal")
pe.plot_kpoints(kp=kp, only_from_kpath=True, legend_group="with TR")
pe.plot_kpath(
kp=kp_no_tr,
color="#7D7D7D",
legend_group="without TR",
legend_label="Without time-reversal",
)
pe.plot_kpoints(
kp=kp_no_tr, only_from_kpath=True, color="#7D7D7D", legend_group="without TR"
)
pe.show(axes_visible=False)
Cells of real space#
pe = wulfric.PlotlyEngine(_sphinx_gallery_fix=True)
pe.plot_cell(cell=cell, legend_label="Original cell", color="Chocolate")
pe.plot_cell(cell=prim_cell, legend_label="Primitive cell", color="Black")
pe.plot_cell(cell=conv_cell, legend_label="Conventional cell", color="Blue")
pe.plot_wigner_seitz_cell(
cell=prim_cell, legend_label="Wigner-Seitz cell", color="green"
)
pe.show(axes_visible=False)
Total running time of the script: (0 minutes 1.510 seconds)