.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_lumi_1D_nv_center.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_gallery_plot_lumi_1D_nv_center.py: Luminescent properties (1D-CCM) =============================== This example shows how to post-process the results of a LumiWork following a one-dimensional configuration coordinate model (1D-CCM). Based on NV- center in diamond (64 atoms supercell). .. GENERATED FROM PYTHON SOURCE LINES 10-14 .. code-block:: Python import abipy.data as abidata from abipy.lumi.deltaSCF import DeltaSCF .. GENERATED FROM PYTHON SOURCE LINES 15-16 Read the 4 points netcdf file produced by a LumiWork .. GENERATED FROM PYTHON SOURCE LINES 16-26 .. code-block:: Python NV_center = DeltaSCF.from_four_points_file( [ abidata.ref_file("relaxed_gs_out_GSR.nc"), abidata.ref_file("unrelaxed_ex_out_GSR.nc"), abidata.ref_file("relaxed_ex_out_GSR.nc"), abidata.ref_file("unrelaxed_gs_out_GSR.nc"), ] ) .. GENERATED FROM PYTHON SOURCE LINES 27-28 To draw the configuration coordinates diagram. .. GENERATED FROM PYTHON SOURCE LINES 28-31 .. code-block:: Python NV_center.draw_displaced_parabolas(scale_eff_freq=4) .. image-sg:: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_001.png :alt: plot lumi 1D nv center :srcset: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 32-33 To plot the luminescence lineshape following the one effective phonon mode model at 0K .. GENERATED FROM PYTHON SOURCE LINES 33-38 .. code-block:: Python NV_center.plot_lineshape_1D_zero_temp( energy_range=[0.5, 3], max_m=20, phonon_width=0.02, with_omega_cube=True, normalized="Sum" ) .. image-sg:: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_002.png :alt: plot lumi 1D nv center :srcset: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 39-40 To get a panda dataframe with the main results: .. GENERATED FROM PYTHON SOURCE LINES 40-42 .. code-block:: Python NV_center.get_dataframe() .. GENERATED FROM PYTHON SOURCE LINES 43-44 To plot the magnitude of the displacements/forces, from the N atom. .. GENERATED FROM PYTHON SOURCE LINES 44-48 .. code-block:: Python NV_center.plot_delta_R_distance(defect_symbol="N") NV_center.plot_delta_F_distance(defect_symbol="N") .. rst-class:: sphx-glr-horizontal * .. image-sg:: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_003.png :alt: plot lumi 1D nv center :srcset: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_003.png :class: sphx-glr-multi-img * .. image-sg:: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_004.png :alt: plot lumi 1D nv center :srcset: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_004.png :class: sphx-glr-multi-img .. GENERATED FROM PYTHON SOURCE LINES 49-50 To visualise displacements in 3D .. GENERATED FROM PYTHON SOURCE LINES 50-53 .. code-block:: Python NV_center.displacements_visu() .. image-sg:: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_005.png :alt: plot lumi 1D nv center :srcset: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_005.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 54-56 To plot the four band structures associated to each point nscf_files are obtained in a LumiWork by activating the BS computations .. GENERATED FROM PYTHON SOURCE LINES 56-66 .. code-block:: Python nscf_files = [ abidata.ref_file("relaxed_gs_nscf_GSR.nc"), abidata.ref_file("unrelaxed_ex_nscf_GSR.nc"), abidata.ref_file("relaxed_ex_nscf_GSR.nc"), abidata.ref_file("unrelaxed_gs_nscf_GSR.nc"), ] NV_center.plot_four_BandStructures(nscf_files, ylims=[-4, 4]) .. image-sg:: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_006.png :alt: $A_g$, $A_g^*$, $A_e^*$, $A_e$ :srcset: /gallery/images/sphx_glr_plot_lumi_1D_nv_center_006.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.615 seconds) .. _sphx_glr_download_gallery_plot_lumi_1D_nv_center.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_lumi_1D_nv_center.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_lumi_1D_nv_center.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_lumi_1D_nv_center.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_