.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "flow_gallery/run_qha_vzsisa.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_flow_gallery_run_qha_vzsisa.py: Flow for QHA calculations v-ZSISA-QHA ===================================== See [Phys. Rev. B 110, 014103](https://doi.org/10.1103/PhysRevB.110.014103) .. GENERATED FROM PYTHON SOURCE LINES 8-88 .. image-sg:: /flow_gallery/images/sphx_glr_run_qha_vzsisa_001.png :alt: run qha vzsisa :srcset: /flow_gallery/images/sphx_glr_run_qha_vzsisa_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Downloading repository from: https://github.com/PseudoDojo/ONCVPSP-PBEsol-PDv0.4/archive/refs/heads/master.zip ... Installing ONCVPSP-PBEsol-SR-PDv0.4 in: /home/runner/.abinit/pseudos/ONCVPSP-PBEsol-SR-PDv0.4 0.00iB [00:00, ?iB/s] 754kiB [00:00, 7.19MiB/s] 1.50MiB [00:00, 6.96MiB/s] 2.25MiB [00:00, 6.74MiB/s] 3.15MiB [00:00, 7.25MiB/s] 3.92MiB [00:00, 7.22MiB/s] 4.69MiB [00:00, 7.30MiB/s] 5.44MiB [00:00, 7.12MiB/s] 6.21MiB [00:00, 6.48MiB/s] 6.89MiB [00:01, 6.15MiB/s] 7.58MiB [00:01, 6.26MiB/s] 8.44MiB [00:01, 6.59MiB/s] 9.23MiB [00:01, 6.60MiB/s] 10.1MiB [00:01, 7.05MiB/s] 10.8MiB [00:01, 6.96MiB/s] 11.6MiB [00:01, 6.72MiB/s] 12.4MiB [00:01, 6.67MiB/s] 13.2MiB [00:01, 6.81MiB/s] 14.0MiB [00:02, 6.83MiB/s] 14.9MiB [00:02, 6.98MiB/s] 15.8MiB [00:02, 6.91MiB/s] 16.6MiB [00:02, 6.85MiB/s] 17.3MiB [00:02, 6.95MiB/s] 18.1MiB [00:02, 6.81MiB/s] 18.8MiB [00:02, 6.54MiB/s] 19.5MiB [00:02, 6.56MiB/s] 20.1MiB [00:02, 6.32MiB/s] 20.8MiB [00:03, 6.03MiB/s] 21.4MiB [00:03, 6.16MiB/s] 22.1MiB [00:03, 5.87MiB/s] 23.1MiB [00:03, 6.35MiB/s] 24.0MiB [00:03, 6.97MiB/s] 24.7MiB [00:03, 6.94MiB/s] 25.4MiB [00:03, 6.93MiB/s] 26.2MiB [00:03, 6.69MiB/s] 27.1MiB [00:04, 6.75MiB/s] 27.9MiB [00:04, 6.86MiB/s] 28.7MiB [00:04, 6.92MiB/s] 29.5MiB [00:04, 7.03MiB/s] 30.3MiB [00:04, 7.08MiB/s] 31.1MiB [00:04, 7.10MiB/s] 31.9MiB [00:04, 7.14MiB/s] 32.7MiB [00:04, 7.02MiB/s] 33.6MiB [00:04, 7.09MiB/s] 34.4MiB [00:05, 6.94MiB/s] 35.2MiB [00:05, 7.15MiB/s] 35.9MiB [00:05, 7.09MiB/s] 36.7MiB [00:05, 6.92MiB/s] 37.5MiB [00:05, 6.90MiB/s] 38.3MiB [00:05, 6.83MiB/s] 39.2MiB [00:05, 7.07MiB/s] 40.0MiB [00:05, 7.01MiB/s] 41.0MiB [00:06, 7.13MiB/s] 41.6MiB [00:06, 6.87MiB/s] Validating md5 checksums of ONCVPSP-PBEsol-SR-PDv0.4... Checksum test: OK Installation completed successfully in 7.11 [s] scf_input ############################################## #### SECTION: basic ############################################## ecut 18.0 nband 4 nstep 100 tolvrs 1e-08 ngkpt 2 2 2 kptopt 1 nshiftk 1 shiftk 0 0 0 ############################################## #### SECTION: files ############################################## indata_prefix "indata/in" tmpdata_prefix "tmpdata/tmp" outdata_prefix "outdata/out" pseudos "/home/runner/.abinit/pseudos/ONCVPSP-PBEsol-SR-PDv0.4/Si/Si.psp8" ############################################## #### SECTION: gstate ############################################## nline 10 nbdbuf 0 ############################################## #### SECTION: rlx ############################################## ecutsm 1.0 ############################################## #### STRUCTURE ############################################## natom 2 ntypat 1 typat 1 1 znucl 14 xred 0.0000000000 0.0000000000 0.0000000000 0.2500000000 0.2500000000 0.2500000000 acell 1.0 1.0 1.0 rprim 6.3285005287 0.0000000000 3.6537614838 2.1095001762 5.9665675181 3.6537614838 0.0000000000 0.0000000000 7.3075229676 # #{ # "pseudos": [ # { # "@module": "pymatgen.io.abinit.pseudos", # "@class": "NcAbinitPseudo", # "basename": "Si.psp8", # "type": "NcAbinitPseudo", # "symbol": "Si", # "Z": 14, # "Z_val": 4.0, # "l_max": 2, # "md5": "926731724df1b06af70b3ef370bdc1e4", # "filepath": "/home/runner/.abinit/pseudos/ONCVPSP-PBEsol-SR-PDv0.4/Si/Si.psp8" # } # ] #} # | .. code-block:: Python import sys import os import abipy.abilab as abilab import abipy.data as abidata from abipy import flowtk from abipy.flowtk.vzsisa import VzsisaFlow def build_flow(options): """ Create a `VzsisaFlow`. """ # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_") if not options.workdir: __file__ = os.path.join(os.getcwd(), "run_qha_vzsisa.py") options.workdir = os.path.basename(__file__).replace(".py", "").replace("run_", "flow_") # Initialize structure from cif file. structure = abilab.Structure.from_file(abidata.cif_file("si.cif")) # Get NC pseudos from pseudodojo. from abipy.flowtk.psrepos import get_oncvpsp_pseudos pseudos = get_oncvpsp_pseudos(xc_name="PBEsol", version="0.4") # Select k-mesh for electrons and q-mesh for phonons. ngkpt = [2, 2, 2]; ngqpt = [1, 1, 1] #ngkpt = [4, 4, 4]; ngqpt = [4, 4, 4] with_becs = False with_quad = False #with_quad = not structure.has_zero_dynamical_quadrupoles #bo_vol_scales = [0.96, 0.98, 1.0, 1.02, 1.04, 1.06] #ph_vol_scales = [0.98, 1.0, 1.02, 1.04, 1.06] # EinfVib4(D) bo_vol_scales = [0.96, 0.98, 1, 1.02, 1.04] # EinfVib4(S) ph_vol_scales = [1, 1.02, 1.04] # EinfVib2(D) scf_input = abilab.AbinitInput(structure, pseudos) # Set other important variables # All the other DFPT runs will inherit these parameters. scf_input.set_vars( nband=scf_input.num_valence_electrons // 2, nline=10, nbdbuf=0, nstep=100, ecutsm=1.0, tolvrs=1.0e-8, # SCF stopping criterion (modify default) #tolvrs=1.0e-18, # SCF stopping criterion (modify default) ) scf_input.set_kmesh(ngkpt=ngkpt, shiftk=[0, 0, 0]) print("scf_input\n", scf_input) return VzsisaFlow.from_scf_input(options.workdir, scf_input, bo_vol_scales, ph_vol_scales, ngqpt, with_becs, with_quad, edos_ngkpt=None) # This block generates the thumbnails in the Abipy gallery. # You can safely REMOVE this part if you are using this script for production runs. if os.getenv("READTHEDOCS", False): __name__ = None import tempfile options = flowtk.build_flow_main_parser().parse_args(["-w", tempfile.mkdtemp()]) build_flow(options).graphviz_imshow() @flowtk.flow_main def main(options): """ This is our main function that will be invoked by the script. flow_main is a decorator implementing the command line interface. Command line args are stored in `options`. """ return build_flow(options) if __name__ == "__main__": sys.exit(main()) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 7.319 seconds) .. _sphx_glr_download_flow_gallery_run_qha_vzsisa.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: run_qha_vzsisa.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: run_qha_vzsisa.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: run_qha_vzsisa.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_