.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_qpconvergence.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code or to run this example in your browser via Binder .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_plot_qpconvergence.py: GW Convergence ============== This example shows how to use the SigresRobot to visualize the convergence of the QP results stored in the SIGRES.nc files produced by the GW code (sigma run). .. GENERATED FROM PYTHON SOURCE LINES 9-33 .. rst-class:: sphx-glr-horizontal * .. image:: /gallery/images/sphx_glr_plot_qpconvergence_001.png :alt: QP gaps vs sigma_nband, QP dirgap k:[-0.250, -0.250, +0.000], QP dirgap k:[-0.250, +0.250, +0.000], QP dirgap k:[+0.500, +0.500, +0.000] X, QP dirgap k:[-0.250, +0.500, +0.250] W, QP dirgap k:[+0.500, +0.000, +0.000] L, QP dirgap k:[+0.000, +0.000, +0.000] $\Gamma$ :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_qpconvergence_002.png :alt: QP results spin: 0, k:[+0.000, +0.000, +0.000] $\Gamma$, band: 3 :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_qpconvergence_003.png :alt: QP energies vs sigma_nband :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none
| .. code-block:: default from abipy.abilab import SigresRobot import abipy.data as abidata # List of SIGRES files computed with different values of nband. filenames = [ "si_g0w0ppm_nband10_SIGRES.nc", "si_g0w0ppm_nband20_SIGRES.nc", "si_g0w0ppm_nband30_SIGRES.nc", ] filepaths = [abidata.ref_file(fname) for fname in filenames] # Build robot from list of file paths robot = SigresRobot.from_files(filepaths) #robot.remap_labels(lambda sigres: sigres.params["sigma_nband"]) # Plot the convergence of the QP gaps. robot.plot_qpgaps_convergence(sortby="sigma_nband", title="QP gaps vs sigma_nband") # Plot the convergence of the QP energies. robot.plot_qpdata_conv_skb(spin=0, kpoint=[0, 0, 0], band=3, sortby="sigma_nband") # sphinx_gallery_thumbnail_number = 3 robot.plot_qpfield_vs_e0("qpeme0", sortby="sigma_nband", title="QP energies vs sigma_nband") .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.189 seconds) .. _sphx_glr_download_gallery_plot_qpconvergence.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/abinit/abipy/gh-pages?filepath=notebooks/gallery/plot_qpconvergence.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_qpconvergence.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_qpconvergence.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_