Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:language_reference:objects:responsefunction:functions:totightbinding [2024/12/23 09:27] Maurits W. Haverkortdocumentation:language_reference:objects:responsefunction:functions:totightbinding [2024/12/23 18:02] (current) Maurits W. Haverkort
Line 23: Line 23:
 ====== Tri-diagonal representation ====== ====== Tri-diagonal representation ======
  
 +The Green's function in tri-diagonal representation is given as $$ G(\omega,\Gamma) = A_0 + B_0^* \frac{1}{\omega + \mathrm{i}\Gamma/2 - A_1 - B_{1}^{\phantom{\dagger}} \frac{1}{\omega + \mathrm{i}\Gamma/2 - A_2 - B_{2}^{\phantom{\dagger}} \frac{1}{\omega + \mathrm{i}\Gamma/2 - A_2 - B_{3}^{\phantom{\dagger}} \frac{...}{\omega + \mathrm{i}\Gamma/2 - A_{n-1} - B_{n-1}^{\phantom{\dagger}} \frac{1}{\omega + \mathrm{i}\Gamma/2 - A_n } B_{n-1}^{\dagger}} B_{3}^{\dagger} } B_{2}^{\dagger} } B_{1}^{\dagger} } B_0^T $$. This can be represented by a one dimensional chain tight binding Hamiltonian whereby the chain has site $i=1$ to $i=n$. The onsite energies of the sites are given by $A_i$. If $A_i$ is a matrix then this matrix defines the local //crystal fields//. The hopping between site $i$ and $i+1$ is given by $B_i$. If $B_i$ is a matrix then the matrix elements define the orbital dependent hopping between sites.
  
 +===== Example =====
 +
 +###
 +We here create a one dimensional tight binding model with a single $s$-orbital. We then create a //super-cell// with periodic boundary conditions and transform this into an operator. We solve the one particle vacuum Green's function for this system and finally change the one particle Green's function back into a tight binding Hamiltonian. The new Tight binding Hamiltonian is given by a unitary transformation of the old tight binding Hamiltonian with the same local Green's function. i.e. site $0$ is unchanged in the unitary transformation.
 +###
 +
 +==== Input ====
 +<code Quanty Example.Quanty>
 +-- Define a tight binding Hamiltonian for an infinite 1 dimensional chain
 +HTB = NewTightBinding()
 +HTB.Name = "1D tight binding"
 +HTB.Cell = {{1,0,0},
 +            {0,1,0},
 +            {0,0,1}}
 +HTB.Atoms = { {"A", {0,0,0},       {{"s", {"0"}}} } }
 +HTB.Hopping = { {"A.s","A.s",{ 0, 0, 1},{{1}} } ,
 +                {"A.s","A.s",{ 0, 0,-1},{{1}} } }
 +-- create an operator representing a 10 site supercell with periodic boundary conditions
 +HCl = CreateClusterHamiltonian(HTB, {"periodic",{{1,0,0},{0,1,0},{0,0,10}}})
 +-- calculate the vacuum one-particle Green's function for site 0
 +vacStr=""
 +for i=1,HCl.NF do
 +  vacStr=vacStr.."0"
 +end
 +psivac = NewWavefunction(HCl.NF,0,{{vacStr,1}})
 +a0Cr = NewOperator(HCl.NF,0,{{ 0,1}})
 +S, G = CreateSpectra(HCl,a0Cr,psivac,{{"Tensor",true}})
 +-- change the one-particle Green's function to different types
 +GTri = ResponseFunction.ChangeType(G,"Tri")
 +GTri.Chop(1E-12,{{"deflate",true}})
 +GTri.name = "G in Tridiagonal representation"
 +print("The one particle Green's function is")
 +print(GTri)
 +-- change the Green's function to a tight binding model
 +HTB2 = Chop( ResponseFunction.ToTightBinding(GTri) )
 +print("A tight binding Hamiltonian with the same one particle Green's function is given as")
 +print(HTB2)
 +</code>
 +
 +==== Result ====
 +<file Quanty_Output>
 +The one particle Green's function is
 +{ { { { 0 } } , 
 +  { { 0 } } , 
 +  { { 0 } } , 
 +  { { 0 } } , 
 +  { { 0 } } , 
 +  { { 0 } } , 
 +  { { 0 } } } , 
 +  { { { 1 } } , 
 +  { { 1.4142135623731 } } , 
 +  { { 1 } } , 
 +  { { 1 } } , 
 +  { { 1 } } , 
 +  { { 1.4142135623731 } } } ,
 +  type = Tri ,
 +  name = G in Tridiagonal representation ,
 +  BlockSize = { 1 , 1 , 1 , 1 , 1 , 1 , 1 } ,
 +  mu = 0 }
 +A tight binding Hamiltonian with the same one particle Green's function is given as
 +
 +Settings of a tight binding model: G in Tridiagonal representation
 +
 +printout of Crystal Structure
 +Units: NoPi (g.r=1)  Angstrom Absolute atom positions
 +Unit cell parameters:
 +a:             INF       0.0000000       0.0000000
 +b:       0.0000000             INF       0.0000000
 +c:       0.0000000       0.0000000             INF
 +Reciprocal latice:
 +a:       0.0000000       0.0000000       0.0000000
 +b:       0.0000000       0.0000000       0.0000000
 +c:       0.0000000       0.0000000       0.0000000
 +Number of atoms 6
 +#   0 | 0 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 }
 +      | x shell with 1 orbitals { 0 }
 +#   1 | 1 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 }
 +      | x shell with 1 orbitals { 0 }
 +#   2 | 2 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 }
 +      | x shell with 1 orbitals { 0 }
 +#   3 | 3 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 }
 +      | x shell with 1 orbitals { 0 }
 +#   4 | 4 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 }
 +      | x shell with 1 orbitals { 0 }
 +#   5 | 5 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 }
 +      | x shell with 1 orbitals { 0 }
 +Containing a total number of 6 orbitals
 +Hopping definitions ( 5 )
 +Hopping from 0 : 0 - x to 1 : 1 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 })
 +Matrix =
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums])
 +          [           0]
 +[     0]  1.41421356E+00 
 +
 +Hopping from 1 : 1 - x to 2 : 2 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 })
 +Matrix =
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums])
 +          [           0]
 +[     0]  1.00000000E+00 
 +
 +Hopping from 2 : 2 - x to 3 : 3 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 })
 +Matrix =
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums])
 +          [           0]
 +[     0]  1.00000000E+00 
 +
 +Hopping from 3 : 3 - x to 4 : 4 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 })
 +Matrix =
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums])
 +          [           0]
 +[     0]  1.00000000E+00 
 +
 +Hopping from 4 : 4 - x to 5 : 5 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 })
 +Matrix =
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums])
 +          [           0]
 +[     0]  1.41421356E+00 
 +
 +</file>
 +
 +
 +
 +
 +
 +====== Anderson representation ======
 +
 +The Green's function in Anderson representation is given as $$ G(\omega,\Gamma) = A_0 + B_0^* \frac{1}{\omega + \mathrm{i}\Gamma/2 - A_1 - \sum_{i=2}^{n} B_{i-1}^{\phantom{\dagger}} \frac{1}{\omega + \mathrm{i}\Gamma/2 - A_{i} } B_{i-1}^{\dagger} } B_0^T $$. This can be represented by a single site that can hop to $n-1$ bath sites. The onsite energy of the site where the particle is created is $A_{1}$. The bath sites have onsite energy $A_{2}$ to $A_{n}$. The hopping between the impurity site and the bath sites is given by $B_{i}$. If $A_i$ is a matrix then this matrix defines the local //crystal fields//. The hopping between the impurity site and the bath site with onsite energy $A_i$ is given by $B_{i-1}$. If $B_i$ is a matrix then the matrix elements define the orbital dependent hopping between sites.
  
 ===== Example ===== ===== Example =====
  
 ### ###
-description text+We here create a one dimensional tight binding model with a single $s$-orbital. We then create a //super-cell// with periodic boundary conditions and transform this into an operator. We solve the one particle vacuum Green's function for this system and finally change the one particle Green's function back into a tight binding Hamiltonian. The new Tight binding Hamiltonian is given by a unitary transformation of the old tight binding Hamiltonian with the same local Green's function. i.e. site $0$ is unchanged in the unitary transformation.
 ### ###
  
 ==== Input ==== ==== Input ====
 <code Quanty Example.Quanty> <code Quanty Example.Quanty>
--- some example code+-- Define a tight binding Hamiltonian for an infinite 1 dimensional chain 
 +HTB = NewTightBinding() 
 +HTB.Name = "1D tight binding" 
 +HTB.Cell = {{1,0,0}, 
 +            {0,1,0}, 
 +            {0,0,1}} 
 +HTB.Atoms = { {"A", {0,0,0},       {{"s", {"0"}}} } } 
 +HTB.Hopping = { {"A.s","A.s",{ 0, 0, 1},{{1}} } , 
 +                {"A.s","A.s",{ 0, 0,-1},{{1}} } } 
 +-- create an operator representing a 10 site supercell with periodic boundary conditions 
 +HCl = CreateClusterHamiltonian(HTB, {"periodic",{{1,0,0},{0,1,0},{0,0,10}}}) 
 +-- calculate the vacuum one-particle Green's function for site 0 
 +vacStr="" 
 +for i=1,HCl.NF do 
 +  vacStr=vacStr.."0" 
 +end 
 +psivac = NewWavefunction(HCl.NF,0,{{vacStr,1}}) 
 +a0Cr = NewOperator(HCl.NF,0,{{ 0,1}}) 
 +S, G = CreateSpectra(HCl,a0Cr,psivac,{{"Tensor",true}}) 
 +-- change the one-particle Green's function to different types 
 +GAnd = ResponseFunction.ChangeType(G,"And"
 +GAnd.Chop(1E-12,{{"deflate",true}}) 
 +GAnd.name = "G in Anderson representation" 
 +print("The one particle Green's function is") 
 +print(GAnd) 
 +-- change the Green's function to a tight binding model 
 +HTB2 = Chop( ResponseFunction.ToTightBinding(GAnd) ) 
 +print("A tight binding Hamiltonian with the same one particle Green's function is given as") 
 +print(HTB2)
 </code> </code>
  
 ==== Result ==== ==== Result ====
 <file Quanty_Output> <file Quanty_Output>
-text produced as output+The one particle Green's function is 
 +{ { { { 0 } } ,  
 +  { { 0 } } ,  
 +  { { -1.9021130325903 } } ,  
 +  { { -1.1755705045849 } } ,  
 +  { { 0 } } ,  
 +  { { 1.1755705045849 } } ,  
 +  { { 1.9021130325903 } } } ,  
 +  { { { 1 } } ,  
 +  { { 0.27639320225002 } } ,  
 +  { { -0.72360679774998 } } ,  
 +  { { -0.89442719099992 } } ,  
 +  { { -0.72360679774998 } } ,  
 +  { { 0.27639320225002 } } } , 
 +  name = G in Anderson representation , 
 +  mu = 0 , 
 +  type = And } 
 +A tight binding Hamiltonian with the same one particle Green's function is given as 
 + 
 +Settings of a tight binding model: G in Anderson representation 
 + 
 +printout of Crystal Structure 
 +Units: NoPi (g.r=1)  Angstrom Absolute atom positions 
 +Unit cell parameters: 
 +a:             INF       0.0000000       0.0000000 
 +b:       0.0000000             INF       0.0000000 
 +c:       0.0000000       0.0000000             INF 
 +Reciprocal latice: 
 +a:       0.0000000       0.0000000       0.0000000 
 +b:       0.0000000       0.0000000       0.0000000 
 +c:       0.0000000       0.0000000       0.0000000 
 +Number of atoms 6 
 +#   0 | 0 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 } 
 +      | x shell with 1 orbitals { 0 } 
 +#   1 | 1 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 } 
 +      | x shell with 1 orbitals { 0 } 
 +#   2 | 2 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 } 
 +      | x shell with 1 orbitals { 0 } 
 +#   3 | 3 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 } 
 +      | x shell with 1 orbitals { 0 } 
 +#   4 | 4 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 } 
 +      | x shell with 1 orbitals { 0 } 
 +#   5 | 5 ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 } 
 +      | x shell with 1 orbitals { 0 } 
 +Containing a total number of 6 orbitals 
 +Hopping definitions ( 9 ) 
 +Hopping from 1 : 1 - x to 1 : 1 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0] -1.90211303E+00  
 + 
 +Hopping from 2 : 2 - x to 2 : 2 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0] -1.17557050E+00  
 + 
 +Hopping from 4 : 4 - x to 4 : 4 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0]  1.17557050E+00  
 + 
 +Hopping from 5 : 5 - x to 5 : 5 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0]  1.90211303E+00  
 + 
 +Hopping from 0 : 0 - x to 1 : 1 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0]  2.76393202E-01  
 + 
 +Hopping from 0 : 0 - x to 2 : 2 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0] -7.23606798E-01  
 + 
 +Hopping from 0 : 0 - x to 3 : 3 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0] -8.94427191E-01  
 + 
 +Hopping from 0 : 0 - x to 4 : 4 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0] -7.23606798E-01  
 + 
 +Hopping from 0 : 0 - x to 5 : 5 - x with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00  0.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0]  2.76393202E-01 
 </file> </file>
 +
 +
 +
 +
 +
 +
 +
  
 ===== Table of contents ===== ===== Table of contents =====
 {{indexmenu>../#2|tsort}} {{indexmenu>../#2|tsort}}
  
Print/export