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 14:35] – Aleksandrs Zacinskis | documentation:language_reference:functions:calculateg [2024/11/14 17:15] (current) – Aleksandrs Zacinskis | ||
---|---|---|---|
Line 2: | Line 2: | ||
### | ### | ||
- | Function // | + | Warning! Page is under development. |
+ | |||
+ | Function // | ||
### | ### | ||
===== Input ===== | ===== Input ===== | ||
- | * //HTB// : Tight-binding object | + | * //HTB// : Tight-binding object, which can be created using the function // |
* Options : A table of options. Possible options are: | * Options : A table of options. Possible options are: | ||
* //" | * //" | ||
Line 13: | Line 15: | ||
* //" | * //" | ||
* //" | * //" | ||
- | * //" | + | * //" |
===== Output ===== | ===== Output ===== | ||
- | * bla : real | + | * G : Response Function in the Block List of Poles (If not chosen otherwise) representation $\{\{A_0, a_1, a_2, |
+ | $$G(\omega) = A_0 + \sum_{k} \frac{B_k}{\omega-a_k+i\gamma/ | ||
+ | where $a_1, | ||
===== Example ===== | ===== Example ===== | ||
### | ### | ||
- | description text | + | This example creates Tight-Binding model for 2D layer of CuO2 also known as the Emery model. // |
### | ### | ||
==== Input ==== | ==== Input ==== | ||
<code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
- | -- some example code | + | -- define on-site energies and hopping parameters |
+ | ed = -1 | ||
+ | ep1 = -3 | ||
+ | ep2 = ep1 | ||
+ | t = 1 -- tdp | ||
+ | tdd = 0.1 | ||
+ | tpp = 0.3 | ||
+ | HTB = NewTightBinding() | ||
+ | HTB.Name = "Emery model" | ||
+ | |||
+ | HTB.Cell = {{1, | ||
+ | |||
+ | HTB.Atoms = {{" | ||
+ | | ||
+ | | ||
+ | |||
+ | HTB.Hopping = { {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | } | ||
+ | -- Calculate Block Greens Function | ||
+ | G0Block= CalculateG(HTB, | ||
+ | -- Extract single orbital Green' | ||
+ | G0_Cu = ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0Block, | ||
+ | G0_O1 = ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0Block, | ||
+ | G0_O2 = ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0Block, | ||
+ | G0_Cu_O1 = ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0Block, | ||
+ | G0_Cu_O2 = ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0Block, | ||
+ | G0_O1_O2 = ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0Block, | ||
+ | G0_O2_O1 = ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0Block, | ||
+ | G0_O1_Cu = ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0Block, | ||
+ | G0_O2_Cu = ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0Block, | ||
+ | -- Plot Green' | ||
+ | Emin=-12 | ||
+ | Emax=7 | ||
+ | Ymin=-4 | ||
+ | Ymax=3 | ||
+ | |||
+ | Pl = Graphics.Plot({G0_Cu, | ||
+ | PlSVG = Graphics.ToSVG(Pl) | ||
+ | file,err = io.open(" | ||
+ | file: | ||
+ | file: | ||
</ | </ | ||
==== Result ==== | ==== Result ==== | ||
- | <file Quanty_Output> | + | Diagonal Elements of the plots below show Partial DOS of Cu, |
- | text produced as output | + | {{ : |
- | </ | + | |
+ | ==== Used functions ==== | ||
+ | <code Quanty function.Quanty> | ||
+ | -- this function extracts G_ij response function of Block List of Poles Response Function object | ||
+ | function ScalarResponseFunctionFromBlockListOfPolesResponseFunction(G0, | ||
+ | local G0T = ResponseFunction.ToTable(G0) | ||
+ | local k | ||
+ | local A0_ij = G0T[1][1][i][j] | ||
+ | local ai = G0T[1] | ||
+ | table.remove(ai, | ||
+ | table.insert(ai, | ||
+ | local bw_ij = {} | ||
+ | for k=1,#G0T[2] do -- from k=1 to NE | ||
+ | bw_ij[# | ||
+ | end | ||
+ | G_ij = ResponseFunction.New( {ai, | ||
+ | return G_ij | ||
+ | end | ||
+ | </ | ||
===== Table of contents ===== | ===== Table of contents ===== | ||
{{indexmenu> | {{indexmenu> | ||