{ "cells": [ { "cell_type": "markdown", "id": "df5a54da", "metadata": {}, "source": [ "# 1.4.1 EPCE and ZPR using FP: Preparing the input files\n", "After a normal-mode phonon calculation we need to post-process the data to compute electron-phonon coupling energies (EPCE), zero-point renormalization (ZPR) as well as electron-phonon renormalization at finite temperatures using a frozen phonon (harmonic) approach. \n", "\n", "The first step is to compute the overlap integral matrix for degenerate bands. For the CO2 example, HOMO is 2-fold degenerate, therefore, we need to compute the overlap integral matrix between the positive and negative displaced coordinates along each normal mode.\n", "\n", "For this purpose first we would import the mode_overlap class." ] }, { "cell_type": "code", "execution_count": 1, "id": "5296012f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " \n", " ███████████ \n", " ░░███░░░░░███ \n", " ░███ ░███ █████ ████ \n", " ░██████████ ░░███ ░███ \n", " ░███░░░░░░ ░███ ░███ \n", " ░███ ░███ ░███ \n", " █████ ░░███████ \n", " ░░░░░ ░░░░░███ \n", " ███ ░███ \n", " ░░██████ \n", " ░░░░░░ \n", " ██████████ ███████████ ███████████ ██████████ \n", "░░███░░░░░█░░███░░░░░███░░███░░░░░░█░░███░░░░███ \n", " ░███ █ ░ ░███ ░███ ░███ █ ░ ░███ ░░███\n", " ░██████ ░██████████ ░███████ ░███ ░███\n", " ░███░░█ ░███░░░░░░ ░███░░░█ ░███ ░███\n", " ░███ ░ █ ░███ ░███ ░ ░███ ███ \n", " ██████████ █████ █████ ██████████ \n", "░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░░ \n", "PyEPFD version : 1.1\n", "Author : Arpan Kundu\n", "Author Email : arpan.kundu@gmail.com\n", "Today : 2024-12-18 17:20:45.232701\n", "*************************************************\n", " CITATIONS \n", "=================================================\n", "Please cite the following 3 references: \n", "(1) A. Kundu et al, Phys. Rev. Mater (2021), 5, \n", "L070801, \n", "(2) A. Kundu and G Galli, \n", "J. Chem. Theory. Comput. (2023), 19, 4011\n", "(3) https://pyepfd.readthedocs.io/en/latest/\n", "*************************************************\n" ] } ], "source": [ "from pyepfd.overlap import mode_overlap" ] }, { "cell_type": "markdown", "id": "9bdfe0c5", "metadata": {}, "source": [ "A CO2 molecule has 9 normal modes. We would compute the overlap matrix elements for all 9 modes. Although, LUMO is singly degenerate, just to show how we can include several degenerate space in a single calculation, we would include also LUMO (orbital index 9). This may take a few minutes on a laptop. " ] }, { "cell_type": "code", "execution_count": 2, "id": "eefbccbf", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "pid-0: Processing 1 / 9 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 2.3985445499420166 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 4.802286148071289 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 7.183193922042847 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 9.529421091079712 s.\n", "pid-0: Processing 2 / 9 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 11.898732662200928 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 14.256268501281738 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 16.62139344215393 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 18.996598482131958 s.\n", "pid-0: Processing 3 / 9 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 21.356364488601685 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 23.73144555091858 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 26.10246467590332 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 28.46167230606079 s.\n", "pid-0: Processing 4 / 9 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 30.821962356567383 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 33.18801760673523 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 35.55064082145691 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 37.91228103637695 s.\n", "pid-0: Processing 5 / 9 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 40.28035879135132 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 42.65008521080017 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 45.043657541275024 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 47.417649030685425 s.\n", "pid-0: Processing 6 / 9 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 49.796602725982666 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 52.177109241485596 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 54.53765869140625 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 56.942097663879395 s.\n", "pid-0: Processing 7 / 9 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 59.335549116134644 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 61.69370365142822 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 64.0528335571289 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 66.41569328308105 s.\n", "pid-0: Processing 8 / 9 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 68.79132294654846 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 71.14842200279236 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 73.51953744888306 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 75.87124276161194 s.\n", "pid-0: Processing 9 / 9 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 78.24435520172119 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 80.60851955413818 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 82.97966432571411 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 85.34420228004456 s.\n", "pid-0: Processing 1 / 9 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 87.7206642627716 s.\n", "pid-0: Processing 2 / 9 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 90.1045503616333 s.\n", "pid-0: Processing 3 / 9 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 92.45966243743896 s.\n", "pid-0: Processing 4 / 9 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 94.8199954032898 s.\n", "pid-0: Processing 5 / 9 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 97.18849897384644 s.\n", "pid-0: Processing 6 / 9 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 99.53944730758667 s.\n", "pid-0: Processing 7 / 9 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 101.91113257408142 s.\n", "pid-0: Processing 8 / 9 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 104.31250166893005 s.\n", "pid-0: Processing 9 / 9 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 106.72435188293457 s.\n", "pid-0: Time spent on mode_overlap: 106.72467565536499 s.\n" ] } ], "source": [ "overlap = mode_overlap(nmode=9,\\\n", " orbital_space=[[7,8],[9]],\\\n", " directory='../2_normal_mode_phonon/',\n", " cube_prefix='wf')\n", "# Deleting the overlap object to complete file writing\n", "del overlap" ] }, { "cell_type": "code", "execution_count": 3, "id": "87335930", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "-rw-rw-r-- 1 arpan arpan 899 Dec 18 17:22 orbital-0.overlap\n", "-rw-rw-r-- 1 arpan arpan 401 Dec 18 17:22 orbital-1.overlap\n" ] } ], "source": [ "%%bash\n", "ls -lrth *.overlap" ] }, { "cell_type": "markdown", "id": "356fa10b", "metadata": {}, "source": [ "We see that two overlap files are created. Let us look at the first file: orbital-0.overlap." ] }, { "cell_type": "code", "execution_count": 4, "id": "67abbd93", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "#Orbitals indices: [7, 8]\n", "#normal mode index = 1\n", " 0.58352 -0.646224 \n", " -0.646224 -0.58352 \n", "#normal mode index = 2\n", " -0.571502 -1.50436e-06 \n", " -2.04339e-06 -0.846159 \n", "#normal mode index = 3\n", " -0.824038 -9.34836e-07 \n", " 7.68441e-07 0.49162 \n", "#normal mode index = 4\n", " -0.642178 -4.97481e-08 \n", " 4.85663e-08 0.871273 \n", "#normal mode index = 5\n", " -0.659458 3.49759e-06 \n", " 2.89872e-06 0.872965 \n", "#normal mode index = 6\n", " 0.998597 0.000107763 \n", " 0.000107612 0.981333 \n", "#normal mode index = 7\n", " 0.998597 -0.000107678 \n", " -0.000107666 0.981333 \n", "#normal mode index = 8\n", " -0.978867 -0.196916 \n", " 0.196916 -0.978867 \n", "#normal mode index = 9\n", " 0.185788 0.973269 \n", " 0.973269 -0.185788 \n" ] } ], "source": [ "%%bash\n", "cat orbital-0.overlap" ] }, { "cell_type": "markdown", "id": "e2f0404d", "metadata": {}, "source": [ "We see that there are 9 (2 x 2) overlap matrices. Each matrix element is the overlap integral between the negative and positive displaced structure along a normal mode. The diagonal elements are the overlap integrals between the 7th and 8th orbital indices. Off-diagonal elements are overlap integrals between 7th and 8th orbital indices. \n", "\n", "This file is necessary to calculate the second derivative of band energies when degeneracies are present. \n", "\n", "As expected orbital-1.overlap has only one orbital (9th) in the orbital space there are only one value for each mode. We do not need this file to compute the second derivative of LUMO, as it is singly degenerate." ] }, { "cell_type": "code", "execution_count": 5, "id": "fd23d21a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "#Orbitals indices: [9]\n", "#normal mode index = 1\n", " -0.979298 \n", "#normal mode index = 2\n", " 0.982993 \n", "#normal mode index = 3\n", " 0.981145 \n", "#normal mode index = 4\n", " -0.986205 \n", "#normal mode index = 5\n", " 0.985829 \n", "#normal mode index = 6\n", " -0.921256 \n", "#normal mode index = 7\n", " 0.921263 \n", "#normal mode index = 8\n", " 0.998094 \n", "#normal mode index = 9\n", " 0.999743 \n" ] } ], "source": [ "%%bash\n", "cat orbital-1.overlap" ] }, { "cell_type": "markdown", "id": "7e732e7e", "metadata": {}, "source": [ "For large system with many normal modes the calculation of overlap matrices may take long. Therefore, this step is parallelized over number of modes using MPI4Py. In that case it is easier to run it on a cluster. For that purpose first create a file calc_overlap.py, that should read as: " ] }, { "cell_type": "code", "execution_count": 6, "id": "111aaa0b", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "#!/usr/bin/env python3\n", "from pyepfd.overlap import mode_overlap\n", "overlap = mode_overlap(nmode=9,\\\n", " orbital_space=[[7,8],[9]],\\\n", " directory='../2_normal_mode_phonon/',\n", " cube_prefix='wf')\n" ] } ], "source": [ "%%bash\n", "cat calc_overlap.py" ] }, { "cell_type": "markdown", "id": "747ed830", "metadata": {}, "source": [ "Now we can make the file as an executable using the following command" ] }, { "cell_type": "code", "execution_count": 7, "id": "bff86198", "metadata": {}, "outputs": [], "source": [ "%%bash\n", "chmod 755 calc_overlap.py" ] }, { "cell_type": "markdown", "id": "2a0166ad", "metadata": {}, "source": [ "Now this can be run using mpirun as shown below, here I am using only 2 mpi process, but you can use n-number of MPI processes where n is less than equalto 0.5*total number of modes. " ] }, { "cell_type": "code", "execution_count": 8, "id": "40e86df6", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " \n", " ███████████ \n", " ░░███░░░░░███ \n", " ░███ ░███ █████ ████ \n", " ░██████████ ░░███ ░███ \n", " ░███░░░░░░ ░███ ░███ \n", " ░███ ░███ ░███ \n", " █████ ░░███████ \n", " ░░░░░ ░░░░░███ \n", " ███ ░███ \n", " ░░██████ \n", " ░░░░░░ \n", " ██████████ ███████████ ███████████ ██████████ \n", "░░███░░░░░█░░███░░░░░███░░███░░░░░░█░░███░░░░███ \n", " ░███ █ ░ ░███ ░███ ░███ █ ░ ░███ ░░███\n", " ░██████ ░██████████ ░███████ ░███ ░███\n", " ░███░░█ ░███░░░░░░ ░███░░░█ ░███ ░███\n", " ░███ ░ █ ░███ ░███ ░ ░███ ███ \n", " ██████████ █████ █████ ██████████ \n", "░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░░ \n", "PyEPFD version : 1.1\n", "Author : Arpan Kundu\n", "Author Email : arpan.kundu@gmail.com\n", "Today : 2024-12-18 17:22:32.535019\n", "*************************************************\n", " CITATIONS \n", "=================================================\n", "Please cite the following 3 references: \n", "(1) A. Kundu et al, Phys. Rev. Mater (2021), 5, \n", "L070801, \n", "(2) A. Kundu and G Galli, \n", "J. Chem. Theory. Comput. (2023), 19, 4011\n", "(3) https://pyepfd.readthedocs.io/en/latest/\n", "*************************************************\n", "pid-0: Processing 1 / 5 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 2.363884925842285 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 4.740048885345459 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 7.098685026168823 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 9.459259510040283 s.\n", "pid-0: Processing 2 / 5 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 11.84401559829712 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 14.201534748077393 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 16.565589904785156 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 18.91403102874756 s.\n", "pid-0: Processing 3 / 5 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 21.262477159500122 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 23.599480152130127 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 25.94901418685913 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 28.303104400634766 s.\n", "pid-0: Processing 4 / 5 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 30.66326642036438 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 33.035637855529785 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 35.41651463508606 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 37.770076274871826 s.\n", "pid-0: Processing 5 / 5 mode(s)\n", " 1 / 4 overlap intergal(s) computed.\n", " Elapsed time 40.115673542022705 s.\n", " 2 / 4 overlap intergal(s) computed.\n", " Elapsed time 42.493436336517334 s.\n", " 3 / 4 overlap intergal(s) computed.\n", " Elapsed time 44.882712602615356 s.\n", " 4 / 4 overlap intergal(s) computed.\n", " Elapsed time 47.28287863731384 s.\n", "pid-0: Processing 1 / 5 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 49.655537366867065 s.\n", "pid-0: Processing 2 / 5 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 51.993539810180664 s.\n", "pid-0: Processing 3 / 5 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 54.354880809783936 s.\n", "pid-0: Processing 4 / 5 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 56.74216842651367 s.\n", "pid-0: Processing 5 / 5 mode(s)\n", " 1 / 1 overlap intergal(s) computed.\n", " Elapsed time 59.18110394477844 s.\n", "pid-0: Time spent on mode_overlap: 59.181254863739014 s.\n" ] } ], "source": [ "%%bash\n", "mpirun -np 2 python3 calc_overlap.py" ] }, { "cell_type": "code", "execution_count": 9, "id": "9d3c81b2", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "-rw-rw-r-- 1 arpan arpan 899 Dec 18 17:23 orbital-0.overlap\n", "-rw-rw-r-- 1 arpan arpan 401 Dec 18 17:23 orbital-1.overlap\n" ] } ], "source": [ "%%bash\n", "ls -lrth *.overlap" ] }, { "cell_type": "markdown", "id": "1e1a3835", "metadata": {}, "source": [ "Besides overlap matrices, we need total electronic energies for displaced coordinates and band(orbital) energies. The electronic energies can be extracted from the qbox outputs using grep tool as below." ] }, { "cell_type": "code", "execution_count": 10, "id": "9385da0e", "metadata": {}, "outputs": [], "source": [ "%%bash\n", "grep '' ../2_normal_mode_phonon/enmfd-?.r | awk '{print $2}' > etotal.dat" ] }, { "cell_type": "markdown", "id": "86ef7e64", "metadata": {}, "source": [ "This would write the electronic energies sequentially in a file named etotal.dat. There are total 19 configurations, so there will be 19 numbers." ] }, { "cell_type": "code", "execution_count": 11, "id": "c6bc0a6f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "-37.52801335\n", "-37.52805984\n", "-37.52805985\n", "-37.52754654\n", "-37.52754654\n", "-37.52715354\n", "-37.52715354\n", "-37.52808833\n", "-37.52808833\n", "-37.52805442\n", "-37.52805442\n", "-37.52690255\n", "-37.52690255\n", "-37.52690255\n", "-37.52690255\n", "-37.52702210\n", "-37.52700642\n", "-37.52700281\n", "-37.52700337\n" ] } ], "source": [ "%%bash\n", "cat etotal.dat" ] }, { "cell_type": "markdown", "id": "8504ba42", "metadata": {}, "source": [ "Next step is to extract the band (orbital) energies. We will do it in two steps using the script extract_eigval.sh that can be found at util/qbox_tools folder of the pyepfd distribution. \n", "First step is to put add the path of the util/qbox_tools in the PATH variable.\n", "Then we would extract the homo energies (in this case orbital indices 7 8) after extracting copy them into a file named homo.eigval.dat. Then we would extract the lumo energies and copy them into a file lumo.eigval.dat.\n" ] }, { "cell_type": "code", "execution_count": 12, "id": "500b6ba8", "metadata": {}, "outputs": [], "source": [ "%%bash\n", "source ../../../env.sh\n", "cd ../2_normal_mode_phonon/\n", "rm -rf Eigenvalues #Removes old directory\n", "extract_eigval.sh -prefix enmfd -seq 1 1 -orb 7 8" ] }, { "cell_type": "markdown", "id": "4aad4d2e", "metadata": {}, "source": [ "Note, here we have only one qbox output file enmfd-1.r. Therefore, our prefix would be enmfd while the range would be 1 to 1. So we used \"-seq 1 1\". If we had 12 output files then we had to use \"-seq 1 12\".\n", "\n", "Our HOMO are orbitals 7 and 8, so the orbital range is 7 to 8. So we used \"-orb 7 8\" option.\n", "\n", "This will create a file named orbital_kp_0_0_0.dat Let us look into that file. " ] }, { "cell_type": "code", "execution_count": 13, "id": "6ca1e17d", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "#Orbital-7\t#Orbital-8\n", "-10.509136120898\t-10.509136120808\n", "-10.509182319751\t-10.509182319484\n", "-10.509182131230\t-10.509182130746\n", "-10.501317018104\t-10.501194144059\n", "-10.501317355303\t-10.501194482823\n", "-10.498513779430\t-10.497985889827\n", "-10.498513685829\t-10.497985796856\n", "-10.510094365923\t-10.508908852667\n", "-10.510094389441\t-10.508908878769\n", "-10.508022276177\t-10.507268484282\n", "-10.508021558974\t-10.507267763318\n", "-10.501391720266\t-10.494668036040\n", "-10.501391575875\t-10.494667892401\n", "-10.501391574934\t-10.494667891409\n", "-10.501391589185\t-10.494667905889\n", "-10.495537912275\t-10.495537911992\n", "-10.522408878497\t-10.522408878494\n", "-10.494621364128\t-10.494621364091\n", "-10.494629033591\t-10.494629033587\n" ] } ], "source": [ "%%bash\n", "cd ../2_normal_mode_phonon/\n", "cat orbital_kp_0_0_0_is_0.dat" ] }, { "cell_type": "markdown", "id": "90cb5d35", "metadata": {}, "source": [ "We see that the energies of orbitals 7 and 8 (in eV) are written. Now we will move this file to current directory and rename it homo.eigval.dat." ] }, { "cell_type": "code", "execution_count": 14, "id": "72dfb3a4", "metadata": {}, "outputs": [], "source": [ "%%bash\n", "mv ../2_normal_mode_phonon/orbital_kp_0_0_0_is_0.dat homo.eigval.dat" ] }, { "cell_type": "markdown", "id": "9d91589e", "metadata": {}, "source": [ "Similarly we will extract the LUMO orbital energies and copy it to the current directory.\n" ] }, { "cell_type": "code", "execution_count": 15, "id": "6b69f187", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Directory Eigenvalues exists\n", "File eigvals.enmfd-1 exists\n", "Skipping extracting eigenvalues from enmfd-1.r\n", "Directory Eigenvalues/Orbital_energy_time_evol_kp_0_0_0_is_0 exists\n" ] } ], "source": [ "%%bash\n", "source ../../../env.sh\n", "cd ../2_normal_mode_phonon/\n", "extract_eigval.sh -prefix enmfd -seq 1 1 -orb 9 9" ] }, { "cell_type": "markdown", "id": "bbe0101e", "metadata": {}, "source": [ "Just like before we move the orbital_kp_0_0_0.dat into current directory as lumo.eigval.dat\n" ] }, { "cell_type": "code", "execution_count": 16, "id": "62aacaae", "metadata": {}, "outputs": [], "source": [ "%%bash\n", "mv ../2_normal_mode_phonon/orbital_kp_0_0_0_is_0.dat lumo.eigval.dat" ] }, { "cell_type": "markdown", "id": "2dda08d2", "metadata": {}, "source": [ "We also need the restart/checkpoint file enmfdphonon.xml that we prepared in example 2.3. Lets copy it to the current directory." ] }, { "cell_type": "code", "execution_count": 17, "id": "14e293ec", "metadata": {}, "outputs": [], "source": [ "%%bash\n", "cp ../2_normal_mode_phonon/enmfdphonon.xml ." ] }, { "cell_type": "code", "execution_count": 18, "id": "2011b310", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1_epce_zpr.ipynb\n", "2_epce_zpr.ipynb\n", "calc_overlap.py\n", "enmfdphonon.xml\n", "epfd_out\n", "etotal.dat\n", "homo.eigval.dat\n", "lumo.eigval.dat\n", "orbital-0.overlap\n", "orbital-1.overlap\n" ] } ], "source": [ "%%bash\n", "ls" ] }, { "cell_type": "markdown", "id": "e28cbf92", "metadata": {}, "source": [ "We need the following files for EPCE and ZPR calculation. \n", "(1)etotal.dat --> Total electronic energies for all displaced configurations.\n", "(2)enmfdphonon.xml --> All information regarding the phonon calculation.\n", "(3)homo.eigval.dat --> HOMO/VBM (for CO2 2 fold degenerate, so band indices 7 & 8) energies for all displaced configurations.\n", "(4)lumo.eigval.dat --> LUMO/CBM energies for all displaced configurations.\n", "(5)orbital-0.overlap --> Overlap matrices for degenerate HOMO level.\n", "If LUMO were degenerate we would also need orbital-1.overlap.\n", "\n" ] }, { "cell_type": "markdown", "id": "518430cf", "metadata": {}, "source": [ "Next step would be to post-process these files that would be the subject of example 4.2." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.10" } }, "nbformat": 4, "nbformat_minor": 5 }