.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/plot_multiple_mdf.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_multiple_mdf.py: Multiple Bethe-Salpeter calculations ==================================== This example shows how to analyze multiple MDF files. .. GENERATED FROM PYTHON SOURCE LINES 8-28 .. rst-class:: sphx-glr-horizontal * .. image:: /gallery/images/sphx_glr_plot_multiple_mdf_001.png :alt: Real and Imaginary part (averaged over q-points) :class: sphx-glr-multi-img * .. image:: /gallery/images/sphx_glr_plot_multiple_mdf_002.png :alt: Real and Imaginary part for individual q-points :class: sphx-glr-multi-img .. code-block:: default import abipy.data as abidata from abipy import abilab # Read data from multiple files. mdf_paths = abidata.ref_files("si_444_MDF.nc", "si_666_MDF.nc", "si_888_MDF.nc") robot = abilab.MdfRobot.from_files(mdf_paths) # Build MultipleMdfPlotter plotter = robot.get_multimdf_plotter() # Plot the dielectric function with excitonic effects. plotter.plot(mdf_type="exc", qview="avg", title="Real and Imaginary part (averaged over q-points)", tight_layout=True) # Plot the dielectric function computed at the RPA level with KS energies. # Show q-point dependence. plotter.plot(mdf_type="rpa", qview="all", title="Real and Imaginary part for individual q-points", tight_layout=True) robot.close() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.698 seconds) .. _sphx_glr_download_gallery_plot_multiple_mdf.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_multiple_mdf.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_multiple_mdf.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_multiple_mdf.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_