Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| documentation:language_reference:functions:calculateg [2024/11/14 16:50] – Aleksandrs Zacinskis | documentation:language_reference:functions:calculateg [2026/11/12 17:40] (current) – Maurits W. Haverkort | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ### | ### | ||
| - | Warning! Page is under development. | + | Function // |
| - | + | \begin{equation} | |
| - | Function // | + | G(\omega) = \frac{1}{N_k} \sum_{k} \left( \omega - H(k) - \Sigma(\omega) \right)^{-1} , |
| + | \end{equation} | ||
| + | with the sum over a regular mesh of $N_k$ points in the Brillouin zone. The result is a response function with its poles on an energy grid. | ||
| ### | ### | ||
| Line 10: | Line 12: | ||
| * //HTB// : Tight-binding object, which can be created using the function // | * //HTB// : Tight-binding object, which can be created using the function // | ||
| + | * //Sigma// : (optional) the self-energy. Either | ||
| + | * a response function of any type (ListOfPoles, | ||
| + | * a table with one entry per atom of the unit cell. Each entry is a response function with the dimension of that atom (all its shells), a table with one entry per shell of the atom, or the number 0 for no self-energy. All response functions have to be of the same type and have the same //mu//; they are put together into one self-energy that is block diagonal in the atoms and shells. | ||
| * Options : A table of options. Possible options are: | * Options : A table of options. Possible options are: | ||
| * //" | * //" | ||
| * //" | * //" | ||
| * //" | * //" | ||
| + | * //" | ||
| * //" | * //" | ||
| * //" | * //" | ||
| + | * //" | ||
| + | * //" | ||
| + | * //" | ||
| + | |||
| + | ### | ||
| + | The self-energy is added to $H(k)$ in the basis of Bloch sums in which the phase of an orbital depends only on its unit cell, $|k, i\rangle = N_k^{-1/2} \sum_{R} e^{\mathrm{i} k \cdot R} |R, i\rangle$ with $R$ the lattice vector of the cell and not the position of the atom within it. A self-energy that is block diagonal in the atoms, as the table form above always is, is the same in any choice of these phases. A response function //Sigma// can also couple orbitals of two different atoms. That coupling acts between the two atoms within the same unit cell $R$, and not between atoms of different cells. | ||
| + | ### | ||
| ===== Output ===== | ===== Output ===== | ||
| - | * G : Response Function in the Block List of Poles representation $\{\{A_0, a_1, a_2, | + | * G : Response Function in the Block List of Poles (If not chosen otherwise) |
| $$G(\omega) = A_0 + \sum_{k} \frac{B_k}{\omega-a_k+i\gamma/ | $$G(\omega) = A_0 + \sum_{k} \frac{B_k}{\omega-a_k+i\gamma/ | ||
| - | where $a_1, | + | where $a_1, |
| + | * Aug : (only with //" | ||
| + | |||
| + | ===== The poles on the energy grid ===== | ||
| + | |||
| + | ### | ||
| + | The poles $a_k$ of the result are the grid points $x_k$, $x_k = E_{\mathrm{min}} + k (E_{\mathrm{max}} - E_{\mathrm{min}}) / N_E$ or the points of //" | ||
| + | \begin{equation} | ||
| + | B_k = \int \mathrm{hat}_k(\omega) \, A(\omega) \, \mathrm{d}\omega , \qquad A(\omega) = -\frac{1}{\pi} \mathrm{Im} \, G(\omega + \mathrm{i} 0^{+}) , | ||
| + | \end{equation} | ||
| + | with $\mathrm{hat}_k$ the piecewise linear function that is one on $x_k$ and zero on $x_{k-1}$ and $x_{k+1}$. The zeroth and first moment of $G$ are therefore exact on any grid, and the grid spacing only sets the energy resolution. | ||
| + | ### | ||
| + | |||
| + | ### | ||
| + | By default the poles of $G$ are found by diagonalisation. For every $k$ the self-energy is written as a bath, $\Sigma(\omega) = A_0 + C (\omega - H_{\mathrm{bath}})^{-1} C^{\dagger}$, | ||
| + | ### | ||
| + | |||
| + | ### | ||
| + | With //" | ||
| + | \begin{equation} | ||
| + | B_k = - \int_0^{\infty} y \sum_{j = k-1}^{k+1} g_j \, A_y(x_j) \, \mathrm{d}y , \qquad A_y(x) = -\frac{1}{\pi} \mathrm{Im} \, G(x + \mathrm{i} y) , | ||
| + | \end{equation} | ||
| + | with $g = \left( 1/h_{-}, \, -(1/h_{-} + 1/h_{+}), \, 1/h_{+} \right)$ and $h_{\pm}$ the distances from $x_k$ to its neighbours. For a single pole this is the split described above exactly, for any distance of the pole to the grid, so there is no broadening to choose. The $y$ integral is done numerically up to $100$ times the largest energy of the grid and analytically beyond, from the first three moments of $G$. The result is the same as that of the default route on the same grid to about $10^{-6}$ of the largest residue. The self-energy enters only through $\Sigma(z)$, | ||
| + | ### | ||
| + | |||
| + | ### | ||
| + | With //" | ||
| + | ### | ||
| + | |||
| + | ===== The hybridization function ===== | ||
| + | |||
| + | ### | ||
| + | With //" | ||
| + | \begin{equation} | ||
| + | \widetilde{G}_a(\omega) = \frac{1}{N_k} \sum_{k} \left( \begin{array}{cc} R & R H \\ H R & H R H \end{array} \right)_{aa} , \qquad R = \left( \omega - H(k) - \Sigma(\omega) \right)^{-1} . | ||
| + | \end{equation} | ||
| + | Downfolding it onto its second block with // | ||
| + | \begin{equation} | ||
| + | \Delta_a(\omega) = \zeta_a(\omega) - G_{aa}^{-1}(\omega) - \epsilon_a , \qquad \zeta(\omega) = \omega - \Sigma(\omega) , | ||
| + | \end{equation} | ||
| + | with $\epsilon_a$ the onsite energies of the atom. The point of the construction is that $\zeta$ is never formed on its own and nothing is subtracted. Evaluating $\zeta - G^{-1}$ directly loses all accuracy where $\Sigma$ is large, which is what happens near the pole a Mott insulating self-energy has at the chemical potential. The identity holds for matrix valued self-energies as long as $\Sigma$ is block diagonal in the atoms, as the self-energy of single site DMFT is. Both methods return the augmented propagators. | ||
| + | ### | ||
| ===== Example ===== | ===== Example ===== | ||
| ### | ### | ||
| - | This example creates Tight-Binding model for 2D layer of CuO2 known also as the Emery model. // | + | This example creates Tight-Binding model for 2D layer of CuO2 also known as the Emery model. // |
| ### | ### | ||
| Line 33: | Line 88: | ||
| ed = -1 | ed = -1 | ||
| ep1 = -3 | ep1 = -3 | ||
| - | ep2 = ep1 | + | ep2 = ep1 |
| t = 1 -- tdp | t = 1 -- tdp | ||
| tdd = 0.1 | tdd = 0.1 | ||
| Line 97: | Line 152: | ||
| ==== Result ==== | ==== Result ==== | ||
| - | <file Quanty_Output> | + | Diagonal Elements of the plots below show Partial DOS of Cu,O1,O2. |
| - | I would like to upload an image but I don't have rights | + | {{ : |
| - | </ | + | |
| ==== Used functions ==== | ==== Used functions ==== | ||
| - | <code Quanty | + | <code Quanty |
| -- this function extracts G_ij response function of Block List of Poles Response Function object | -- this function extracts G_ij response function of Block List of Poles Response Function object | ||
| function ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0, | function ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0, | ||
| local G0T = ResponseFunction.ToTable(G0) | local G0T = ResponseFunction.ToTable(G0) | ||
| local k | local k | ||
| - | local A0_ij = G0T[1][1][i][j] | + | local A0_ij = G0T[1][1][i][j] |
| - | local ai = G0T[1] | + | local ai = G0T[1] |
| table.remove(ai, | table.remove(ai, | ||
| table.insert(ai, | table.insert(ai, | ||
| Line 118: | Line 174: | ||
| end | end | ||
| </ | </ | ||
| + | |||
| + | ===== Example with a self-energy ===== | ||
| + | |||
| + | ### | ||
| + | One band on a square lattice with $t = -1/4$, so that the band runs from $-1$ to $1$, and a local self-energy of $81$ poles that form two broad bands around $\pm 1.2$, as a self-energy of a DMFT loop has them. The lattice Green' | ||
| + | ### | ||
| + | |||
| + | ==== Input ==== | ||
| + | <code Quanty CalculateGMesh.Quanty> | ||
| + | HTB = NewTightBinding() | ||
| + | HTB.Name | ||
| + | HTB.Cell | ||
| + | HTB.Atoms = {{" | ||
| + | HTB.Hopping = {{" | ||
| + | | ||
| + | e, W = {0}, {} | ||
| + | for k = 0, 80 do | ||
| + | local x = -2 + 0.05*k | ||
| + | e[#e+1] = x | ||
| + | W[#W+1] = 0.05 * 0.3 / math.sqrt(math.pi*0.1) * (math.exp(-(x-1.2)^2/ | ||
| + | end | ||
| + | Sigma = ResponseFunction.New({e, | ||
| + | |||
| + | Opt = {{" | ||
| + | t0 = os.clock() | ||
| + | G = CalculateG(HTB, | ||
| + | t1 = os.clock() | ||
| + | GM = CalculateG(HTB, | ||
| + | t2 = os.clock() | ||
| + | print(string.format(" | ||
| + | print(" | ||
| + | for w = -2.5, 2.5, 0.5 do | ||
| + | print(string.format(" | ||
| + | end | ||
| + | |||
| + | -- the hybridization function of the atom, from the augmented propagator of (c, H c) | ||
| + | G, Aug = CalculateG(HTB, | ||
| + | | ||
| + | Delta = ResponseFunction.Downfold(Aug[1], | ||
| + | w = 0.3 | ||
| + | zeta = w + I*0.05 - Sigma(w, | ||
| + | print(string.format(" | ||
| + | Complex.Re(Delta(w, | ||
| + | Complex.Re(zeta - 1/ | ||
| + | </ | ||
| + | |||
| + | ==== Result ==== | ||
| + | < | ||
| + | default route 4.72 s, Method " | ||
| + | omega default | ||
| + | -2.50 0.00488 | ||
| + | -2.00 0.01957 | ||
| + | -1.50 0.27292 | ||
| + | -1.00 0.10403 | ||
| + | -0.50 0.31037 | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | Delta(0.3 + 0.05 i) = 0.122238 -0.406956 i zeta - 1/G = 0.121960 -0.407044 i | ||
| + | </ | ||
| + | |||
| + | ### | ||
| + | The two methods give the same Green' | ||
| + | ### | ||
| + | |||
| ===== Table of contents ===== | ===== Table of contents ===== | ||
| {{indexmenu> | {{indexmenu> | ||
| + | |||
| + | |||
| + | |||