Best report ever

Everything you see here is either markdown, LaTex, Python or BASH.

The spectral function

It looks like this: \begin{equation} A(\omega) = \mathrm{Im}|G(\omega)| \end{equation}

GW vs Cumulant

Mathematically very different:

\begin{equation} G^{GW} (\omega) = \frac1{ \omega - \epsilon - \Sigma (\omega) } \end{equation}
\begin{equation} G^C(t_1, t_2) = G^0(t_1, t_2) e^{ i \int_{t_1}^{t_2} \int_{t'}^{t_2} dt' dt'' W (t', t'') } \end{equation}

BUT they connect through $\mathrm{Im} W (\omega) = \frac1\pi \mathrm{Im} \Sigma ( \epsilon - \omega )$.

Implementation

Using a multi-pole representation for $\Sigma^{GW}$:

\begin{equation} \mathrm{Im} W (\omega) = \frac1\pi \mathrm{Im} \Sigma ( \epsilon - \omega ) \end{equation}\begin{equation} W (\tau) = - i \lambda \bigl[ e^{ i \omega_p \tau } \theta ( - \tau ) + e^{ - i \omega_p \tau } \theta ( \tau ) \bigr] \end{equation}

GW vs Cumulant

  • GW: \begin{equation} A(\omega) = \frac1\pi \frac{\mathrm{Im}\Sigma (\omega)} { [ \omega - \epsilon - \mathrm{Re}\Sigma (\omega) ]^2 + [ \mathrm{Im}\Sigma (\omega) ]^2} \end{equation}
  • Cumulant:
\begin{equation} A(\omega) = \frac1\pi \sum_{n=0}^{\infty} \frac{a^n}{n!} \frac{\Gamma}{ (\omega - \epsilon + n \omega_p)^2 + \Gamma^2 } \end{equation}

Now some executable code (Python)

I have implemented the formulas above in my Python code. I can just run it from here., but before let me check if my input file is correct...


In [ ]:
!gvim data/SF_Si_bulk/invar.in

Now I can run my script:


In [ ]:
%cd data/SF_Si_bulk/
%run ../../../../../Code/SF/sf.py

Not very elegant, I know. It's just for demo pourposes.


In [ ]:
cd ../../../

I have first to import a few modules/set up a few things:


In [ ]:
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
# plt.rcParams['figure.figsize'] = (9., 6.)
%matplotlib inline

Next I can read the data from a local folder:


In [ ]:
sf_c = np.genfromtxt(
    'data/SF_Si_bulk/Spfunctions/spftot_exp_kpt_1_19_bd_1_4_s1.0_p1.0_800ev_np1.dat')
sf_gw = np.genfromtxt(
    'data/SF_Si_bulk/Spfunctions/spftot_gw_s1.0_p1.0_800ev.dat')
#!gvim spftot_exp_kpt_1_19_bd_1_4_s1.0_p1.0_800ev_np1.dat

Now I can plot the stored arrays.


In [ ]:
plt.plot(sf_c[:,0], sf_c[:,1], label='1-pole cumulant')
plt.plot(sf_gw[:,0], sf_gw[:,1], label='GW')
plt.xlim(-50, 0)
plt.ylim(0, 300)
plt.title("Bulk Si - Spectral function - ib=1, ikpt=1")
plt.xlabel("Energy (eV)")
plt.grid(); plt.legend(loc='best')

Creating a PDF document

I can create a PDF version of this notebook from itself, using the command line:


In [ ]:
!jupyter-nbconvert --to pdf cumulant-to-pdf.ipynb

In [ ]:
pwd

In [ ]:
!xpdf cumulant-to-pdf.pdf

In [ ]: