Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
documentation:language_reference:functions:createclusterhamiltonian [2016/10/06 21:48] – created Maurits W. Haverkort | documentation:language_reference:functions:createclusterhamiltonian [2024/09/18 14:23] (current) – old revision restored (2024/09/16 12:17) Sina Shokri | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== CreateClusterHamiltonian ====== | ||
+ | |||
+ | ### | ||
+ | The function // | ||
+ | See also // | ||
+ | ### | ||
+ | |||
+ | ===== Open Cluster ===== | ||
+ | |||
+ | //HCl, HClTB = CreateClusterHamiltonian(TB, | ||
+ | |||
+ | ===== Input ===== | ||
+ | |||
+ | * TB: tight-binding object | ||
+ | * AtomPos: list of atoms, their positions and (optionally) their spin-orbitals. AtomPos can have the format: {Atom.Name, Atom.Position, | ||
+ | |||
+ | ===== Output ===== | ||
+ | |||
+ | * HCl: Hamiltonian operator, corresponding to the input cluster, generated using the input tight-binding object. | ||
+ | * HClTB: tight-binding object, corresponding to the input cluster, generated using the input tight-binding object. | ||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | ### | ||
+ | A small example: | ||
+ | ### | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | -- set parameters | ||
+ | dAB = 0.2 | ||
+ | tnn = 1.1 | ||
+ | -- create the tight binding Hamiltonian | ||
+ | HTB = NewTightBinding() | ||
+ | HTB.Name = " | ||
+ | HTB.Cell = {{sqrt(3), | ||
+ | {sqrt(3/ | ||
+ | {0,0,1}} | ||
+ | HTB.Atoms = { {" | ||
+ | {" | ||
+ | HTB.Hopping = {{" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | -- create a list pf atoms (the cluster) | ||
+ | AtomPos = {{" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | print(" | ||
+ | HCl, HClTB = CreateClusterHamiltonian(HTB, | ||
+ | |||
+ | print(" | ||
+ | print(HCl) | ||
+ | |||
+ | print(" | ||
+ | print(HClTB) | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output> | ||
+ | create a cluster Hamiltonian | ||
+ | Output operator: | ||
+ | |||
+ | Operator: Operator | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 8 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 0 A 0 | -1.00000000000000E-01 | ||
+ | C 0 A 2 | 1.10000000000000E+00 | ||
+ | C 0 A 3 | 1.10000000000000E+00 | ||
+ | C 0 A 4 | 1.10000000000000E+00 | ||
+ | C 1 A 1 | 1.00000000000000E-01 | ||
+ | C 1 A 5 | 1.10000000000000E+00 | ||
+ | C 1 A 6 | 1.10000000000000E+00 | ||
+ | C 1 A 7 | 1.10000000000000E+00 | ||
+ | C 2 A 0 | 1.10000000000000E+00 | ||
+ | C 2 A 2 | 1.00000000000000E-01 | ||
+ | C 2 A 6 | 1.10000000000000E+00 | ||
+ | C 3 A 0 | 1.10000000000000E+00 | ||
+ | C 3 A 3 | 1.00000000000000E-01 | ||
+ | C 3 A 5 | 1.10000000000000E+00 | ||
+ | C 4 A 0 | 1.10000000000000E+00 | ||
+ | C 4 A 4 | 1.00000000000000E-01 | ||
+ | C 5 A 1 | 1.10000000000000E+00 | ||
+ | C 5 A 3 | 1.10000000000000E+00 | ||
+ | C 5 A 5 | -1.00000000000000E-01 | ||
+ | C 6 A 1 | 1.10000000000000E+00 | ||
+ | C 6 A 2 | 1.10000000000000E+00 | ||
+ | C 6 A 6 | -1.00000000000000E-01 | ||
+ | C 7 A 1 | 1.10000000000000E+00 | ||
+ | C 7 A 7 | -1.00000000000000E-01 | ||
+ | |||
+ | |||
+ | Output TB object: | ||
+ | |||
+ | Settings of a tight binding model: dichalcogenide tight binding | ||
+ | |||
+ | 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 8 | ||
+ | # 0 | A ( 0 ) at position { | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | # 1 | B ( 5 ) at position { | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | # 2 | B ( 5 ) at position { | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | # 3 | B ( 5 ) at position { | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | # 4 | B ( 5 ) at position { -0.8660254 , -0.5000000 , | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | # 5 | A ( 0 ) at position { | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | # 6 | A ( 0 ) at position { | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | # 7 | A ( 0 ) at position { | ||
+ | | p shell with 1 orbitals { 0 } | ||
+ | Containing a total number of 8 orbitals | ||
+ | Hopping definitions ( 24 ) | ||
+ | Hopping from 0 : A - p to 0 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ 0] -1.00000000E-01 | ||
+ | |||
+ | Hopping from 0 : A - p to 2 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 0 : A - p to 3 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 8.66025404E-01 -5.00000000E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 0 : A - p to 4 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({-8.66025404E-01 -5.00000000E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 1 : B - p to 1 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 1 : B - p to 5 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 -1.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 1 : B - p to 6 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({-8.66025404E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 1 : B - p to 7 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 8.66025404E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 2 : B - p to 0 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 -1.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 2 : B - p to 2 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 2 : B - p to 6 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 8.66025404E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 3 : B - p to 0 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({-8.66025404E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 3 : B - p to 3 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 3 : B - p to 5 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 8.66025404E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 4 : B - p to 0 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 8.66025404E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 4 : B - p to 4 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 5 : A - p to 1 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 5 : A - p to 3 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({-8.66025404E-01 -5.00000000E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 5 : A - p to 5 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ 0] -1.00000000E-01 | ||
+ | |||
+ | Hopping from 6 : A - p to 1 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 8.66025404E-01 -5.00000000E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 6 : A - p to 2 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({-8.66025404E-01 -5.00000000E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 6 : A - p to 6 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ 0] -1.00000000E-01 | ||
+ | |||
+ | Hopping from 7 : A - p to 1 : B - p with translation vector in unit cells: { 0 , 0 , 0 } ({-8.66025404E-01 -5.00000000E-01 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ | ||
+ | |||
+ | Hopping from 7 : A - p to 7 : A - p with translation vector in unit cells: { 0 , 0 , 0 } ({ 0.00000000E+00 | ||
+ | L^* A R^T A=(Matrix) = | ||
+ | Real Part of Matrix with dimensions [Ni=1][Nj=1] ([Rows][Collums]) | ||
+ | [ 0] | ||
+ | [ 0] -1.00000000E-01 | ||
+ | </ | ||
+ | |||
+ | ===== Periodic Cluster ===== | ||
+ | |||
+ | //HCl = CreateClusterHamiltonian(TB, | ||
+ | |||
+ | ===== Inputs ===== | ||
+ | |||
+ | * TB: tight-binding object | ||
+ | * SuperCell: an array of dimension 3x3 in the format {a,b,c} with the rows being the vectors of the super-cell. The super-cell is defined in the units of the unit cell defined in TB.Cell. | ||
+ | * U: Aditional Operator to add (optional). The operator must be defined within the unit cell defined in TB.Cell and will be copied to all unit cells within the super-cell and added to the output cluster Hamiltonian operator. | ||
+ | |||
+ | ===== Example ===== | ||
+ | |||
+ | ### | ||
+ | A small example: | ||
+ | ### | ||
+ | |||
+ | ==== Input ==== | ||
+ | <code Quanty Example.Quanty> | ||
+ | -- set parameters | ||
+ | dAB = 0.2 | ||
+ | tnn = 1.1 | ||
+ | -- create the tight binding Hamiltonian | ||
+ | HTB = NewTightBinding() | ||
+ | HTB.Name = " | ||
+ | HTB.Cell = {{sqrt(3), | ||
+ | {sqrt(3/ | ||
+ | {0,0,1}} | ||
+ | HTB.Atoms = { {" | ||
+ | {" | ||
+ | HTB.Hopping = {{" | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | print(" | ||
+ | HCl = CreateClusterHamiltonian(HTB, | ||
+ | |||
+ | print(" | ||
+ | print(HCl) | ||
+ | </ | ||
+ | |||
+ | ==== Result ==== | ||
+ | <file Quanty_Output> | ||
+ | create a cluster Hamiltonian | ||
+ | Output operator: | ||
+ | |||
+ | Operator: Operator | ||
+ | QComplex | ||
+ | MaxLength | ||
+ | NFermionic modes = 6 (Number of fermionic modes (site, spin, orbital, ...) in the one particle basis) | ||
+ | NBosonic modes | ||
+ | |||
+ | Operator of Length | ||
+ | QComplex | ||
+ | N | ||
+ | C 0 A 0 | -1.00000000000000E-01 | ||
+ | C 1 A 1 | 1.00000000000000E-01 | ||
+ | C 0 A 5 | 2.20000000000000E+00 | ||
+ | C 1 A 2 | 2.20000000000000E+00 | ||
+ | C 0 A 1 | 1.10000000000000E+00 | ||
+ | C 1 A 0 | 1.10000000000000E+00 | ||
+ | C 2 A 2 | -1.00000000000000E-01 | ||
+ | C 3 A 3 | 1.00000000000000E-01 | ||
+ | C 2 A 1 | 2.20000000000000E+00 | ||
+ | C 3 A 4 | 2.20000000000000E+00 | ||
+ | C 2 A 3 | 1.10000000000000E+00 | ||
+ | C 3 A 2 | 1.10000000000000E+00 | ||
+ | C 4 A 4 | -1.00000000000000E-01 | ||
+ | C 5 A 5 | 1.00000000000000E-01 | ||
+ | C 4 A 3 | 2.20000000000000E+00 | ||
+ | C 5 A 0 | 2.20000000000000E+00 | ||
+ | C 4 A 5 | 1.10000000000000E+00 | ||
+ | C 5 A 4 | 1.10000000000000E+00 | ||
+ | </ | ||
+ | |||
+ | ====== Options ====== | ||
+ | |||
+ | The last element of CreateClusterHamiltonian can be a table of options. Possible options are: | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | |||
+ | ===== Table of contents ===== | ||
+ | {{indexmenu> | ||