.. 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_20_MCLC4.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_20_MCLC4.py: MCLC4 ***** Base-centered monoclinic cell is defined by four parameters :math:`a`, :math:`b`, :math:`c` and :math:`\alpha` with :math:`b \le c`, :math:`\alpha < 90^{\circ}`. MCLC lattice has variation MCLC4 when :math:`k_{\gamma} < 90^{\circ}` and :math:`\dfrac{b\cos(\alpha)}{c} + \dfrac{b^2\sin(\alpha)^2}{a^2} = 1`. Cell constructor ================ To get an example of the cell use :py:func:`wulfric.cell.SC_MCLC`. :py:func:`wulfric.cell.sc_get_example` returns an example where :math:`a = 1.2\sin(65)\pi`, :math:`b = \pi`, :math:`c = 36\cos(65)\pi/11` and :math:`\alpha = 65^{\circ}`. .. GENERATED FROM PYTHON SOURCE LINES 37-65 .. code-block:: Python import wulfric cell = wulfric.cell.sc_get_example("MCLC4") 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 == "MCLC4" print(variation) .. rst-class:: sphx-glr-script-out .. code-block:: none MCLC4 .. GENERATED FROM PYTHON SOURCE LINES 66-68 K-path ====== .. GENERATED FROM PYTHON SOURCE LINES 68-71 .. code-block:: Python print(kp.path_string) .. rst-class:: sphx-glr-script-out .. code-block:: none GAMMA-Y-F-H-Z-I|H1-Y1-X-GAMMA-N|M-GAMMA .. GENERATED FROM PYTHON SOURCE LINES 72-74 High-symmetry points ==================== .. GENERATED FROM PYTHON SOURCE LINES 74-77 .. 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 F 0.5000 0.5000 0.5000 0.0000 2.0000 -0.1349 F1 -0.5000 0.5000 -0.5000 -1.8390 0.0000 -0.7977 F2 -0.5000 0.5000 -0.5000 -1.8390 -0.0000 -0.7977 H 0.4227 0.4227 -0.0058 -0.0000 1.6909 -0.7977 H1 -0.4227 0.5773 0.0058 -1.8390 0.3091 -0.1349 H2 -0.4227 -0.4227 -0.9942 0.0000 -1.6909 -0.7977 I -0.5000 0.5000 -0.5000 -1.8390 0.0000 -0.7977 M 0.0000 0.5000 -0.0000 -0.9195 1.0000 -0.4663 N 0.0000 0.5000 0.5000 -0.9195 1.0000 0.3314 N1 -0.5000 0.0000 -0.5000 -0.9195 -1.0000 -0.3314 X -0.5000 0.5000 0.0000 -1.8390 0.0000 0.0000 Y 0.4614 0.4614 0.7471 -0.0000 1.8454 0.3314 Y1 -0.4614 0.5386 0.2529 -1.8390 0.1546 0.3314 Y2 -0.4614 -0.4614 -0.7471 0.0000 -1.8454 -0.3314 Y3 -0.5386 0.4614 -0.2529 -1.8390 -0.1546 -0.3314 Z 0.0000 0.0000 -0.5000 0.0000 0.0000 -0.7977 .. GENERATED FROM PYTHON SOURCE LINES 78-80 Brillouin zone and default k-path ================================= .. GENERATED FROM PYTHON SOURCE LINES 80-95 .. 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 96-101 Cells of real space =================== .. hint Click on the legend to hide some of the cells .. GENERATED FROM PYTHON SOURCE LINES 101-114 .. 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.551 seconds) .. _sphx_glr_download_user-guide_conventions_bravais-lattices_2_sc_plot_20_MCLC4.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_20_MCLC4.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_20_MCLC4.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_20_MCLC4.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_