.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "user-guide/conventions/bravais-lattices/1_hpkot/plot_27_mC3.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_user-guide_conventions_bravais-lattices_1_hpkot_plot_27_mC3.py: mC3 *** .. include:: ../../HPKOT-reference-memo.inc Getting an example ================== To get an example crystal use :py:func:`wulfric.crystal.hpkot_get_example`. .. GENERATED FROM PYTHON SOURCE LINES 32-61 .. code-block:: Python 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="mC3", 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 ) .. GENERATED FROM PYTHON SOURCE LINES 62-64 K-path ====== .. GENERATED FROM PYTHON SOURCE LINES 64-67 .. code-block:: Python print(kp.path_string) .. rst-class:: sphx-glr-script-out .. code-block:: none GAMMA-A-I2|I-M2-GAMMA-Y|L2-GAMMA-V2 .. GENERATED FROM PYTHON SOURCE LINES 68-70 High-symmetry points ==================== .. GENERATED FROM PYTHON SOURCE LINES 70-73 .. code-block:: Python print(kp.hs_table(decimals=4)) .. rst-class:: sphx-glr-script-out .. code-block:: none 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 Y 0.0000 1.0000 0.0000 0.0000 1.0822 0.0000 A 0.0000 0.0000 0.5000 0.0000 0.0000 0.7886 M2 -1.0000 0.0000 0.5000 -1.0385 0.0000 0.4390 V 0.5000 0.5000 0.0000 0.5192 0.5411 0.1748 V2 -0.5000 0.5000 -0.0000 -0.5192 0.5411 -0.1748 L2 -0.5000 0.5000 0.5000 -0.5192 0.5411 0.6138 I -1.0000 0.2228 0.5000 -1.0385 0.2412 0.4390 I2 -0.0000 0.7772 0.5000 -0.0000 0.8411 0.7886 K -1.1347 -0.0000 0.3200 -1.1784 -0.0000 0.1080 K2 -0.8653 -0.0000 0.6800 -0.8986 -0.0000 0.7699 K4 -0.1347 1.0000 0.3200 -0.1399 1.0822 0.4577 H -0.8440 -0.0000 0.6871 -0.8765 -0.0000 0.7886 H2 -0.1560 1.0000 0.3129 -0.1620 1.0822 0.4390 H4 0.8440 0.0000 0.3129 0.8765 0.0000 0.7886 N -0.9894 0.0000 0.0036 -1.0274 0.0000 -0.3403 N2 -0.0106 1.0000 -0.0036 -0.0111 1.0822 -0.0094 N4 0.9894 -0.0000 -0.0036 1.0274 -0.0000 0.3403 N6 0.0106 1.0000 0.0036 0.0111 1.0822 0.0094 .. GENERATED FROM PYTHON SOURCE LINES 74-76 Brillouin zone and default k-path ================================= .. GENERATED FROM PYTHON SOURCE LINES 76-101 .. code-block:: Python 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) .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 102-107 Cells of real space =================== .. hint Click on the legend to hide some of the cells .. GENERATED FROM PYTHON SOURCE LINES 107-119 .. code-block:: Python 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) .. raw:: html


.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.932 seconds) .. _sphx_glr_download_user-guide_conventions_bravais-lattices_1_hpkot_plot_27_mC3.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_27_mC3.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_27_mC3.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_27_mC3.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_