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:functions:newtightbinding [2024/08/29 18:03] Micheangelo Tagliavinidocumentation:language_reference:functions:newtightbinding [2025/01/21 08:28] (current) Maurits W. Haverkort
Line 5: Line 5:
  
   * Name: "" (empty string)   * Name: "" (empty string)
-  * Cell: {a,b,c} with a, b, c as random vectors.+  * Cell: {a,b,c} with a, b, c as zero vectors.
   * Atoms: {}   * Atoms: {}
   * Units: {"2Pi", "Angstrom", "Absolute"   * Units: {"2Pi", "Angstrom", "Absolute"
-  * NF`0` (number of orbitals defined in Atoms)+  * Hopping{}
  
-The //Units// property is a list of three strings with the following contributions: +  * The Name is a string one can choose for printing 
-  * Units[1]: Sets the scaling for the reciprocal lattice, e.g., $\vec{r}\cdot\vec{g}=2\pi$ for "2Pi" or $\vec{r}\cdot\vec{g}=1$ for "NoPi"+  * The Cell is the unit cell in real-space ($R$) used for the calculationThe units are defined in units and can be AngstromBohrRadius or nanometer. The Reciprocal cell ($G$) is calculated automatically from the real-space cell and we can define its units such that $R \cdot = 2 \pi$ or $\cdot = 1$. 
-  * Units[2]: Defines the unit of measurement as "Angstrom""Bohr", or "nanometer"+  * Atoms is a list defining the atom namespositionsshell names per atom and orbital names per shell. Atom positions can be given in absolute positions (same units as the Cell in Cartesian coordinates) or using the Cell parameters, as defined in units
-  * Units[3]: Selects "Absolute" or "Relative" for the definition of atom positions.+  * The Hopping contains a table defining the hopping between shells at different atoms and cells.
  
-Once a Tight Binding object is created, all properties can be assigned except //.NF//, which is determined by the number of orbitals defined in \\.Atoms\\.+//NewTightBinding()// defines an empty tight binding objectits properties can be set by setting the properties of the created object 
 +For more details see the [[documentation:language_reference:objects:tightbinding:properties:start|properties]] of tight-binding objects, or the example below.
  
-===== Input =====+Besides defining TightBinding objects by hand they can be generated from the output of DFT calculation (see, for example, //[[documentation:language_reference:functions:TightBindingDefFromDresdenFPLO|TightBindingDefFromDresdenFPLO()]]//).
  
-===== Output ===== 
- 
-  *  A Tight Binding Object  
  
 ===== Example ===== ===== Example =====
  
 +
 +The following example creates a minimal tight binding object for a Dichalcogenide lattice. The parameters are not set to represent a real material.
  
 ==== Input ==== ==== Input ====
 +
 <code Quanty Example.Quanty> <code Quanty Example.Quanty>
--- +-- set parameters 
-### Input +dAB = 0.2 
-```lua +tnn = 1.1 
--- Create the tight binding Hamiltonian+-- create the tight binding Hamiltonian
 HTB = NewTightBinding() HTB = NewTightBinding()
 +HTB.Name = "dichalcogenide tight binding"
 +HTB.Cell = {{sqrt(3),0,0},
 +            {sqrt(3/4),3/2,0},
 +            {0,0,1}}
 +HTB.Atoms = { {"A", {0,0,0},       {{"p", {"0"}}}},
 +                {"B", {sqrt(3),1,0}, {{"p", {"0"}}}}}
 +HTB.Hopping = {{"A.p","A.p",        0,   0,0},{{-dAB/2}}},
 +                {"B.p","B.p",        0,   0,0},{{ dAB/2}}},
 +                {"A.p","B.p",        0,   1,0},{{ tnn  }}},
 +                {"B.p","A.p",        0,  -1,0},{{ tnn  }}},
 +                {"A.p","B.p",{ sqrt(3/4),-1/2,0},{{ tnn  }}},
 +                {"B.p","A.p",{-sqrt(3/4), 1/2,0},{{ tnn  }}},
 +                {"A.p","B.p",{-sqrt(3/4),-1/2,0},{{ tnn  }}},
 +                {"B.p","A.p",{ sqrt(3/4), 1/2,0},{{ tnn  }}}
 +                }
  
-print("Printing the TB Object")+print("Tight-binding object:")
 print(HTB) print(HTB)
 + 
 +print("create a periodic cluster Hamiltonian with 4 unit-cells along the z-axis:")
 +HCl = CreateClusterHamiltonian(HTB, {"periodic", {{1,0,0},{0,1,0},{0,0,4}}})
 +print(HCl)
 +</code>
 +###
  
-print("Callable Properties:"+==== Output ====
-print("Cell:", HTB.Cell) +
-print("Units:", HTB.Units) +
-print("Atoms:", HTB.Atoms) +
-print("Hopping:", HTB.Hopping) +
-print("NF:", HTB.NF) +
- +
-t1 +
-t2 +
- +
-HTB.Name "My wishes for dinner" +
- +
-HTB.Units {"2Pi", "Bohr", "Relative"+
- +
-HTB.Cell +
-    {1, 0, 0}, +
-    {0, 1, 0}, +
-    {0, 0, 1} +
-+
- +
-HTB.Atoms +
-    {"pizza", {0, 0, 0}, {{"Margherita", {"0"}}}}, +
-    {"pasta", {0, 1, 0}, {{"Pesto", {"0"}}, {"Carbonara", {"0"}}}} +
-+
- +
-HTB.Hopping +
-    {"pizza.Margherita", "pasta.Pesto", {0, 1, 0}, {{t1}}}, +
-    {"pasta.Pesto", "pizza.Margherita", {0, -1, 0}, {{t1}}}, +
-    {"pizza.Margherita", "pasta.Carbonara", {0, 1, 0}, {{t2}}}, +
-    {"pasta.Carbonara", "pizza.Margherita", {0, -1, 0}, {{t2}}} +
-+
- +
-</code>+
  
-==== Result ==== 
 <file Quanty_Output> <file Quanty_Output>
-Printing the TB Object+Tight-binding object:
  
-Settings of a tight binding model: +Settings of a tight binding model: dichalcogenide tight binding
  
 printout of Crystal Structure printout of Crystal Structure
 Units: 2Pi (g.r=2Pi) Angstrom Absolute atom positions Units: 2Pi (g.r=2Pi) Angstrom Absolute atom positions
 Unit cell parameters: Unit cell parameters:
-a:       0.0000000       0.0000000       0.0000000 +a:       1.7320508       0.0000000       0.0000000 
-b:       0.0000000       0.0000000       0.0000000 +b:       0.8660254       1.5000000       0.0000000 
-c:       0.0000000       0.0000000       0.0000000+c:       0.0000000       0.0000000       1.0000000
 Reciprocal latice: Reciprocal latice:
-a:       0.0000000 30524692131128596033898117733842076213019192344605263171345790071216510328003874622266126017805876259535366806940969625873947115114721700264263639077479994600233826779136.0000000 1469218886842792161082556356812066608987064236852910356089627265978131596617755845105555332403223378390597352733941003451523713467849651601093598519555579669832275433929014952247745114139290238976.0000000 +a:       3.6275987      -2.0943951       0.0000000 
-b:       0.0000000       0.0000000 90960625277508849958397981692689239784491225441894123063561438202878853747680593734840616283814676646691536819002770131304362257795846217274641593397548217458628790833363103687190963464137327730221337512979694186028748242944.0000000 +b:       0.0000000       4.1887902       0.0000000 
-c:       0.0000000 14107223910934044308904371602649936698982067006821564283097987256794599528798179656616663629775957882874925536671725932884293417340363744679036673366848766811353566910460765161922523069153280.0000000 73429234843382957416571002197742812553809563142104530001750273049746504128625765208852406031284161247014915814559263665977548191119922018187373791315790938478048641072290406586019038135878180088386949792875281819263322554368.0000000 +c:       0.0000000       0.0000000       6.2831853 
-Number of atoms 0 +Number of atoms 
-Containing a total number of orbitals +#   0 | A ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 } 
-Hopping definitions ( 0 )+      | p shell with 1 orbitals { 0 } 
 +#   1 | B ( 5 ) at position {       1.7320508 ,       1.0000000 ,       0.0000000 } 
 +      | p shell with 1 orbitals { } 
 +Containing a total number of orbitals 
 +Hopping definitions ( 8 ) 
 +Hopping from : A - p to 0 : A - p 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-01 
  
 +Hopping from 1 : B - p to 1 : B - p 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-01 
  
-Callable Properties: +Hopping from 0 p to : B p with translation vector in unit cells: { -(0.00000000E+00  1.00000000E+00  0.00000000E+00 }) 
-Cell: { { 6.0134700169991e-154 , 1.0216608544487e-259 , 2.7856078039899e-91 } ,  +Matrix = 
-  4.4759381595362e-91 4.4759381595362e-91 4.4759381595362e-91 ,  +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
-  4.4759381595362e-91 , 4.4759381595362e-91 , 4.4759381595362e-91 } +                    0] 
-Units: { 2Pi , Angstrom , Absolute } +[     0]  1.10000000E+00 
-Atoms: } +
-Hopping: Hopping +
-NF: 0+
  
-Settings of a tight binding modelMy wishes for dinner+Hopping from 1 B - p to 0 : A - p with translation vector in unit cells: { 1 , 0 , 0 } ({ 0.00000000E+00 -1.00000000E+00  0.00000000E+00 }) 
 +Matrix = 
 +Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) 
 +          [           0] 
 +[     0]  1.10000000E+00 
  
-printout of Crystal Structure +Hopping from 0 : to 1 : with translation vector in unit cells: { 0 , -1 , 0 } ({ 8.66025404E-01 -5.00000000E-01  0.00000000E+00 })
-Units: 2Pi (g.r=2Pi) Bohr     Relative atom positions +
-Unit cell parameters: +
-a:       1.0000000       0.0000000       0.0000000 +
-b:       0.0000000       1.0000000       0.0000000 +
-c:       0.0000000       0.0000000       1.0000000 +
-Reciprocal latice: +
-a:       6.2831853       0.0000000       0.0000000 +
-b:       0.0000000       6.2831853       0.0000000 +
-c:       0.0000000       0.0000000       6.2831853 +
-Number of atoms 2 +
-#   0 | pizza ( 0 ) at position {       0.0000000 ,       0.0000000 ,       0.0000000 } +
-      | Margherita shell with 1 orbitals { 0 } +
-#   1 | pasta ( 0 ) at position {       0.0000000 ,       1.0000000 ,       0.0000000 } +
-      | Pesto shell with 1 orbitals { 0 } +
-      | Carbonara shell with 1 orbitals { 0 } +
-Containing a total number of 3 orbitals +
-Hopping definitions ( 4 ) +
-Hopping from 0 : pizza Margherita to 1 : pasta Pesto with translation vector in unit cells: { 0 , 1 , 0 } ({ 0.00000000E+00  1.00000000E+00  0.00000000E+00 })+
 Matrix = Matrix =
 Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums])
           [           0]           [           0]
-[     0]  1.00000000E+00 +[     0]  1.10000000E+00 
  
-Hopping from 1 : pasta Pesto to 0 : pizza Margherita with translation vector in unit cells: { 0 , -1 , 0 } ({ 0.00000000E+00 -1.00000000E+00  0.00000000E+00 })+Hopping from 1 : to 0 : with translation vector in unit cells: { 0 , 1 , 0 } ({-8.66025404E-01  5.00000000E-01  0.00000000E+00 })
 Matrix = Matrix =
 Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums])
           [           0]           [           0]
-[     0]  1.00000000E+00 +[     0]  1.10000000E+00 
  
-Hopping from 0 : pizza Margherita to 1 : pasta Carbonara with translation vector in unit cells: { , 1 , 0 } ({ 0.00000000E+00  1.00000000E+00  0.00000000E+00 })+Hopping from 0 : to 1 : with translation vector in unit cells: { -1 -1 , 0 } ({-8.66025404E-01 -5.00000000E-01  0.00000000E+00 })
 Matrix = Matrix =
 Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums])
           [           0]           [           0]
-[     0]  2.00000000E+00 +[     0]  1.10000000E+00 
  
-Hopping from 1 : pasta Carbonara to 0 : pizza Margherita with translation vector in unit cells: { -1 , 0 } ({ 0.00000000E+00 -1.00000000E+00  0.00000000E+00 })+Hopping from 1 : to 0 : with translation vector in unit cells: { , 1 , 0 } ({ 8.66025404E-01  5.00000000E-01  0.00000000E+00 })
 Matrix = Matrix =
 Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums])
           [           0]           [           0]
-[     0]  2.00000000E+00 +[     0]  1.10000000E+00  
 + 
 + 
 + 
 +create a periodic cluster Hamiltonian with 4 unit-cells along the z-axis: 
 + 
 +Operator: Operator 
 +QComplex                  0 (Real==0 or Complex==1 or Mixed==2
 +MaxLength        =          2 (largest number of product of lader operators) 
 +NFermionic modes =          8 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) 
 +NBosonic modes            0 (Number of bosonic modes (phonon modes, ...) in the one particle basis) 
 + 
 +Operator of Length   2 
 +QComplex      =          0 (Real==0 or Complex==1) 
 +N                     16 (number of operators of length   2) 
 +C  0 A  0 | -1.00000000000000E-01 
 +C  1 A  1 |  1.00000000000000E-01 
 +C  0 A  1 |  3.30000000000000E+00 
 +C  1 A  0 |  3.30000000000000E+00 
 +C  2 A  2 | -1.00000000000000E-01 
 +C  3 A  3 |  1.00000000000000E-01 
 +C  2 A  3 |  3.30000000000000E+00 
 +C  3 A  2 |  3.30000000000000E+00 
 +C  4 A  4 | -1.00000000000000E-01 
 +C  5 A  5 |  1.00000000000000E-01 
 +C  4 A  5 |  3.30000000000000E+00 
 +C  5 A  4 |  3.30000000000000E+00 
 +C  6 A  6 | -1.00000000000000E-01 
 +C  7 A  7 |  1.00000000000000E-01 
 +C  6 A  7 |  3.30000000000000E+00 
 +C  7 A  6 |  3.30000000000000E+00
 </file> </file>
  
Print/export