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:51] – Micheangelo Tagliavini | documentation:language_reference:functions:newtightbinding [2025/01/21 08:28] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 2: | Line 2: | ||
- | ### NewTightBinding() | + | //NewTightBinding()// initiates a Tight Binding object with the following standard properties: |
- | `NewTightBinding()` | + | |
- | *Name*: `"" | + | |
- | *Cell*: `{a,b,c}` with `a`, `b`, `c` as random vectors. | + | |
- | *Atoms*: `{}` | + | |
- | *Units*: `{" | + | |
- | *NF*: `0` (number of orbitals defined in Atoms) | + | |
- | ### Units Property | + | * Name: "" |
- | The `Units` property has the following options: | + | * Cell: {a,b,c} with a, b, c as zero vectors. |
- | - `Units[1]`: Sets the scaling for the reciprocal lattice, e.g., `2Pi` for `" | + | * Atoms: {} |
- | - `Units[2]`: Defines the unit of measurement as `"Angstrom"`, `"Bohr"`, or `"nanometer"`. | + | * Units: |
- | - `Units[3]`: Selects `" | + | * Hopping: {} |
- | Once a Tight Binding object | + | * The Name is a string one can choose for printing |
+ | * The Cell is the unit cell in real-space ($R$) used for the calculation. The units are defined in units and can be Angstrom, BohrRadius or nanometer. The Reciprocal cell ($G$) is calculated automatically from the real-space cell and we can define its units such that $R \cdot G = 2 \pi$ or $R \cdot G = 1$. | ||
+ | * 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. | ||
+ | * The Hopping contains a table defining the hopping between shells at different atoms and cells. | ||
- | ## Example | + | // |
+ | For more details see the [[documentation: | ||
- | ### Input | + | Besides defining TightBinding objects by hand they can be generated from the output of DFT calculation (see, for example, // |
- | ```lua | + | |
- | -- Create | + | |
+ | ===== 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 ==== | ||
+ | |||
+ | <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 | ||
</ | </ | ||