From 4909b835a32ade41b70df72e77ddf942dc332267 Mon Sep 17 00:00:00 2001 From: Sunghyun Kim Date: Fri, 7 Feb 2020 14:20:25 +0000 Subject: [PATCH] update notebooks --- example/notebook/e-ph.ipynb | 18 +- example/notebook/for_YW.ipynb | 30994 -------------------------------- 2 files changed, 6 insertions(+), 31006 deletions(-) delete mode 100644 example/notebook/for_YW.ipynb diff --git a/example/notebook/e-ph.ipynb b/example/notebook/e-ph.ipynb index 46acaa3..a200622 100644 --- a/example/notebook/e-ph.ipynb +++ b/example/notebook/e-ph.ipynb @@ -12,6 +12,7 @@ "metadata": {}, "source": [ "First, we calculate the overlap `<ψ_i(0)|ψ_f(Q)>` and its derivative. \n", + "`ψ_i(0)` is a perturbed band-edge state, and `ψ_f(Q)` is a localized defect state at the configuration coordinate `Q` which can be calculated using `get_del_Q.py`.\n", "The electron-phonon coupling matrix element is given by \n", "`W_if = (ε_f - ε_i) d <ψ_i(0)|ψ_f(Q)> / dQ`.\n", "\n", @@ -36,7 +37,7 @@ "metadata": {}, "source": [ "```bash\n", - "$ python get_wf.py -d 288 -b 291 -D DISP_000 -i DISP_-02 DISP_-01 DISP_001 DISP_002\n", + "$ python get_wf.py -d -b -D -i [ ...]\n", "\n", "GRID ENCUT 918.2911873931497\n", "finished making projector list\n", @@ -68,14 +69,14 @@ "source": [ "## W_if calculation\n", "\n", - "Use `get_del_Q.py` to get a distance between structures (`ΔQ`).\n", + "Use `get_del_Q.py` to get a distance between structures (`ΔQ`) in `amu^0.5Å`. `ΔQ` is a collective variable of the mass-weighted deformation `ΔQ = ΣmΔ𝐑`.\n", "\n", - "`ϵ_i` and `ϵ_f` are KS eigenvalues of the initla and final states.\n" + "`ϵ_i` and `ϵ_f` are KS eigenvalues of the initial (`ψ_i(0)`) and final states (`ψ_f(Q_f)`).\n" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 1, "metadata": {}, "outputs": [ { @@ -89,7 +90,7 @@ "source": [ "# using Plots\n", "# \n", - "ΔQ = 0.18059526482789678 # ΔQ between DISP_000 and DISP_001\n", + "ΔQ = 0.18059526482789678 # ΔQ between DISP_000 and DISP_001 in [amu^0.5Å]\n", "ϵ_f = 5.405963 # unoccupied trap\n", "ϵ_i = 6.227692 # CBM\n", "\n", @@ -104,13 +105,6 @@ "println(\"W_if_n = \", W_if_n)\n", "# plot(overlap)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/example/notebook/for_YW.ipynb b/example/notebook/for_YW.ipynb deleted file mode 100644 index d075c5f..0000000 --- a/example/notebook/for_YW.ipynb +++ /dev/null @@ -1,30994 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "┌ Info: Recompiling stale cache file /Users/landau/.julia/compiled/v1.2/CarrierCapture/RUt0q.ji for CarrierCapture [05287f9a-33ab-11e9-31fb-01c88c8bf238]\n", - "└ @ Base loading.jl:1240\n" - ] - } - ], - "source": [ - "using CarrierCapture\n", - "using Plots, LaTeXStrings\n", - "using DataFrames" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Potentials" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "-3.0:0.001200240048009602:3.0" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Qmin = -3\n", - "Qmax = 3\n", - "NQ = 5000\n", - "Q = range(Qmin, stop=Qmax, length=NQ)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Potential fitting: d0+e+h\n", - "=========spline==========\n", - "\n", - "[0.01381488025015364, 0.0172380912571733, 0.0380801018267342, 0.05225628471888811, 0.07395606572930394, 0.09354851511415078, 0.1139718498716826, 0.13429168271731023, 0.15637866793723915, 0.17856661056383016, 0.2001070043351894, 0.22074040384354068, 0.24100725700092762, 0.26111562615424133, 0.28065526788273126, 0.2990988308124523, 0.31709298711272627, 0.3356358616589012, 0.3548747359019114, 0.3750352103516142]\n" - ] - } - ], - "source": [ - "# pot1\n", - "nev = 20\n", - "name = \"d0+e+h\"\n", - "Q1 = [-2.97E+00 -2.81E+00 -2.66E+00 -2.50E+00 -2.34E+00 -2.19E+00 -2.03E+00 -1.87E+00 -1.72E+00 -1.56E+00 -1.41E+00 -1.25E+00 -1.09E+00 -9.37E-01 -7.81E-01 -6.25E-01 -4.69E-01 -3.12E-01 -1.56E-01 0.00E+00 1.56E-01 3.12E-01 4.69E-01 6.25E-01 7.81E-01 9.37E-01 1.09E+00 1.25E+00 1.41E+00 1.56E+00 1.72E+00 1.87E+00 2.03E+00 2.19E+00 2.34E+00 2.50E+00 2.66E+00 2.81E+00 2.97E+00 3.12E+00]\n", - "E1 = [0.32796 0.33297 0.30314 0.28814 0.25888 0.22428 0.20472 0.15472 0.13763 0.09392 0.06213 0.05379 0.01976 0.00248 0 0.00781 0.00681 0.01157 0.02141 0.0343 0.0214 0.0116 0.00681 0.00781 0 0.00248 0.0198 0.0538 0.0621 0.0939 0.138 0.155 0.205 0.224 0.25888 0.28814 0.30314 0.33297 0.32796 0.34909]\n", - "\n", - "pot1 = potential(); pot1.name = name\n", - "pot1.nev = nev\n", - "pot1.Q0 = Q1[findmin(E1)[2]]; pot1.E0 = 0\n", - "pot1.QE_data = DataFrame(Q = Q1[:], E = E1[:])\n", - "pot1.QE_data.E .+= - minimum(pot1.QE_data.E) + pot1.E0\n", - "pot1.Q = Q\n", - "\n", - "\n", - "smoothness = 0.001\n", - "pot1.func_type = \"spline\"\n", - "params = Dict()\n", - "params[\"order\"] = 2\n", - "params[\"smoothness\"] = smoothness\n", - "fit_pot!(pot1, Q; params=params)\n", - "\n", - "\n", - "solve_pot!(pot1)\n", - "println(pot1.ϵ)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Potentials and associated wave functions " - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "data": { - "image/svg+xml": [ - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - " \n", - " \n", - " \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "-4\n", - "\n", - "\n", - "-2\n", - "\n", - "\n", - "0\n", - "\n", - "\n", - "2\n", - "\n", - "\n", - "4\n", - "\n", - "\n", - "0.0\n", - "\n", - "\n", - "0.1\n", - "\n", - "\n", - "0.2\n", - "\n", - "\n", - "0.3\n", - "\n", - "\n", - "0.4\n", - "\n", - "\n", - " Q (amu\n", - "\n", - "\n", - "1/2\n", - "\n", - "\n", - " Å) \n", - "\n", - "\n", - " Energy (eV) \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "d0+e+h\n", - "\n", - "\n" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "plt = Plotter.plot_pot!(pot1; lplt_wf = true, color = \"#b2182b\")\n", - "xlims!((-4, 4))\n", - "# ylims!((-0.2, 3.7))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Julia 1.2.0", - "language": "julia", - "name": "julia-1.2" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.2.0" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}