.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "user-guide/conventions/bravais-lattices/2_sc/plot_22_TRI1a.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_2_sc_plot_22_TRI1a.py: TRI1a ***** Triclinic cell is defined by six parameters :math:`a`, :math:`b`, :math:`c` and :math:`\alpha`, :math:`\beta`, :math:`\gamma`. TRI lattice has variation TRI1a when :math:`k_{\alpha} > 90^{\circ}, k_{\beta} > 90^{\circ}, k_{\gamma} > 90^{\circ}` and :math:`k_{\gamma} = \min(k_{\alpha}, k_{\beta}, k_{\gamma})`. Cell constructor ================ To get an example of the cell use :py:func:`wulfric.cell.SC_TRI`. .. GENERATED FROM PYTHON SOURCE LINES 36-64 .. code-block:: Python import wulfric cell = wulfric.cell.sc_get_example("TRI1a") atoms = dict(positions=[[0, 0, 0]], spglib_types=[1]) # 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="SC") conv_cell, conv_atoms = wulfric.crystal.get_conventional( cell=cell, atoms=atoms, convention="SC", spglib_data=spglib_data ) prim_cell, prim_atoms = wulfric.crystal.get_primitive( cell=cell, atoms=atoms, convention="SC", spglib_data=spglib_data ) variation = wulfric.crystal.sc_get_variation( cell=cell, atoms=atoms, spglib_data=spglib_data ) assert variation == "TRI1a" print(variation) .. rst-class:: sphx-glr-script-out .. code-block:: none TRI1a .. GENERATED FROM PYTHON SOURCE LINES 65-67 K-path ====== .. GENERATED FROM PYTHON SOURCE LINES 67-70 .. code-block:: Python print(kp.path_string) .. rst-class:: sphx-glr-script-out .. code-block:: none X-GAMMA-Y|L-GAMMA-Z|N-GAMMA-M|R-GAMMA .. GENERATED FROM PYTHON SOURCE LINES 71-73 High-symmetry points ==================== .. GENERATED FROM PYTHON SOURCE LINES 73-76 .. 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 L -0.5000 0.5000 -0.0000 -6.2832 7.4880 -1.6532 M -0.0000 0.0000 -0.5000 -0.0000 0.0000 -9.5674 N -0.5000 -0.5000 -0.5000 -6.2832 -5.2722 -0.2516 R -0.5000 0.0000 -0.5000 -6.2832 1.1079 -5.7361 X -0.5000 -0.0000 -0.0000 -6.2832 1.1079 3.8313 Y -0.0000 0.5000 0.0000 -0.0000 6.3801 -5.4845 Z -0.0000 -0.5000 -0.5000 -0.0000 -6.3801 -4.0829 .. GENERATED FROM PYTHON SOURCE LINES 77-79 Brillouin zone and default k-path ================================= .. GENERATED FROM PYTHON SOURCE LINES 79-94 .. 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) pe.plot_kpoints(kp=kp, only_from_kpath=True) pe.show(axes_visible=False) .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 95-100 Cells of real space =================== .. hint Click on the legend to hide some of the cells .. GENERATED FROM PYTHON SOURCE LINES 100-113 .. 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.547 seconds) .. _sphx_glr_download_user-guide_conventions_bravais-lattices_2_sc_plot_22_TRI1a.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_22_TRI1a.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_22_TRI1a.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_22_TRI1a.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_