Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:language_reference:functions:newtightbinding [2024/08/29 17:47] – Micheangelo Tagliavini | documentation:language_reference:functions:newtightbinding [2025/01/21 08:28] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== NewTightBinding ====== | ====== NewTightBinding ====== | ||
- | # Tight Binding | ||
- | ## Overview | + | // |
- | Tight Binding | + | |
- | - **Name** | + | |
- | - **Cell** | + | |
- | - **Atoms** | + | |
- | - **Units** | + | |
- | You can either assign | + | * Name: "" |
+ | * Cell: {a,b,c} with a, b, c as zero vectors. | ||
+ | * Atoms: {} | ||
+ | * Units: {" | ||
+ | * Hopping: {} | ||
- | ### NewTightBinding() | + | * The Name is a string one can choose for printing |
- | `NewTightBinding()` initiates a Tight Binding object with the following standard properties: | + | * The Cell is the unit cell in real-space |
- | - **Name**: `"" | + | * Atoms is a list defining the atom names, positions, shell 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. |
- | - **Cell**: `{a,b,c}` with `a`, `b`, `c` as random vectors. | + | * The Hopping contains a table defining the hopping between shells at different atoms and cells. |
- | - **Atoms**: `{}` | + | |
- | - **Units**: `{" | + | |
- | - **NF**: `0` (number of orbitals defined in Atoms) | + | |
- | ### Units Property | + | // |
- | The `Units` property has the following options: | + | For more details see the [[documentation: |
- | - `Units[1]`: Sets the scaling for the reciprocal lattice, e.g., `2Pi` for `" | + | |
- | - `Units[2]`: Defines the unit of measurement as `" | + | |
- | - `Units[3]`: Selects `" | + | |
- | Once a Tight Binding object is created, all properties | + | Besides defining TightBinding objects by hand they can be generated from the output |
- | ## Example | ||
- | ### Input | + | ===== Example ===== |
- | ```lua | + | |
- | -- Create | + | |
+ | The following example creates a minimal tight binding object for a Dichalcogenide lattice. The parameters are not set to represent a real material. | ||
+ | |||
+ | ==== Input ==== | ||
+ | |||
+ | <code Quanty Example.Quanty> | ||
+ | -- set parameters | ||
+ | dAB = 0.2 | ||
+ | tnn = 1.1 | ||
+ | -- create | ||
HTB = NewTightBinding() | HTB = NewTightBinding() | ||
+ | HTB.Name = " | ||
+ | HTB.Cell = {{sqrt(3), | ||
+ | {sqrt(3/ | ||
+ | {0,0,1}} | ||
+ | HTB.Atoms = { {" | ||
+ | {" | ||
+ | HTB.Hopping = {{" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | {" | ||
+ | } | ||
- | print(" | + | print(" |
print(HTB) | print(HTB) | ||
+ | |||
+ | print(" | ||
+ | HCl = CreateClusterHamiltonian(HTB, | ||
+ | print(HCl) | ||
+ | </ | ||
+ | ### | ||
- | print(" | + | ==== Output ==== |
- | print(" | + | |
- | print(" | + | |
- | print(" | + | |
- | print(" | + | |
- | print(" | + | |
- | t1 = 1 | + | <file Quanty_Output> |
- | t2 = 2 | + | Tight-binding object: |
- | HTB.Name = "My wishes for dinner" | + | Settings of a tight binding model: dichalcogenide tight binding |
- | HTB.Units = {"2Pi", " | + | printout of Crystal Structure |
+ | Units: 2Pi (g.r=2Pi) Angstrom Absolute atom positions | ||
+ | Unit cell parameters: | ||
+ | a: | ||
+ | b: | ||
+ | c: | ||
+ | Reciprocal latice: | ||
+ | a: | ||
+ | b: | ||
+ | c: | ||
+ | Number of atoms 2 | ||
+ | # 0 | A ( 0 ) at position { | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | # 1 | B ( 5 ) at position { | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | Containing a total number of 2 orbitals | ||
+ | Hopping definitions ( 8 ) | ||
+ | Hopping from 0 : A - p to 0 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | Matrix = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ 0] -1.00000000E-01 | ||
- | HTB.Cell = { | + | Hopping from 1 : B - p to 1 : B - p with translation vector in unit cells: |
- | {1, 0, 0}, | + | Matrix = |
- | | + | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) |
- | {0, 0, 1} | + | [ 0] |
- | } | + | [ 0] 1.00000000E-01 |
- | HTB.Atoms = { | + | Hopping from 0 : A - p to 1 : B - p with translation vector in unit cells: |
- | {" | + | Matrix = |
- | | + | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) |
- | } | + | [ 0] |
+ | [ | ||
- | HTB.Hopping | + | Hopping |
- | {" | + | Matrix = |
- | {" | + | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) |
- | | + | [ 0] |
- | | + | [ 0] |
- | } | + | |
+ | Hopping from 0 : A - p to 1 : B - p with translation vector in unit cells: { 0 , -1 , 0 } ({ 8.66025404E-01 -5.00000000E-01 | ||
+ | Matrix = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
- | ===== Input ===== | + | Hopping from 1 : B - p to 0 : A - p with translation vector in unit cells: { 0 , 1 , 0 } ({-8.66025404E-01 |
+ | Matrix | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
- | * bla : Integer | + | Hopping from 0 : A - p to 1 : B - p with translation vector in unit cells: { -1 , -1 , 0 } ({-8.66025404E-01 -5.00000000E-01 |
- | * bla2 : Real | + | Matrix = |
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
- | ===== Output ===== | + | Hopping from 1 : B - p to 0 : A - p with translation vector in unit cells: { 1 , 1 , 0 } ({ 8.66025404E-01 |
+ | Matrix | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
- | * bla : real | ||
- | ===== Example ===== | ||
- | ### | + | create a periodic cluster Hamiltonian with 4 unit-cells along the z-axis: |
- | description text | + | |
- | ### | + | |
- | ==== Input ==== | + | Operator: Operator |
- | <code Quanty Example.Quanty> | + | QComplex |
- | -- some example code | + | MaxLength |
- | </ | + | NFermionic modes = 8 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) |
+ | NBosonic modes | ||
- | ==== Result ==== | + | Operator of Length |
- | <file Quanty_Output> | + | QComplex |
- | text produced as output | + | N = 16 (number of operators of length |
+ | 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 | ||
</ | </ | ||