{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Ground-state SCF cycle\n\nThis example shows how to plot the results of the\nGS self-consistent cycle reported in the main output file.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from abipy.abilab import abiopen\nimport abipy.data as abidata\n\n# Open the output file with GS calculation (Note the .abo extension).\n# Alternatively, one can use `abiopen.py run.abo -nb`\n# to generate a jupyter notebook.\nabo = abiopen(abidata.ref_file(\"refs/si_ebands/run.abo\"))\n\n# Plot all SCF-GS sections found in the output file.\n# Use abo.next_d2de_scf_cycle() for DFPT cycles.\nscf_cycle = abo.next_gs_scf_cycle()\nif scf_cycle is not None:\n scf_cycle.plot()\n\n# If timopt -1, we can extract the timing and plot the data.\ntimer = abo.get_timer()\ntimer.plot_pie()\n\nabo.close()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.0" } }, "nbformat": 4, "nbformat_minor": 0 }