This is an old revision of the document!


NewTightBinding

# Tight Binding

## Overview Tight Binding objects in Quanty have the following Lua-accessible properties: - Name - Cell - Atoms - Units

You can either assign a new value to `HTBObject.property` or assign a variable to that value.

NewTightBinding() `NewTightBinding()` initiates a Tight Binding object with the following standard properties: - Name: `““` (empty string) - Cell: `{a,b,c}` with `a`, `b`, `c` as random vectors. - Atoms: `{}` - Units: `{“2Pi”, “Angstrom”, “Absolute”}` - NF: `0` (number of orbitals defined in Atoms)

Units Property The `Units` property has the following options: - `Units[1]`: Sets the scaling for the reciprocal lattice, e.g., `2Pi` for `”2Pi”` or `1` for `“NoPi”`. - `Units[2]`: Defines the unit of measurement as `“Angstrom”`, `“Bohr”`, or `“nanometer”`. - `Units[3]`: Selects `“Absolute”` or `“Relative”` for the definition of atom positions.

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`.

## Example

Input ```lua -- Create the tight binding Hamiltonian HTB = NewTightBinding()

print(“Printing the TB Object”) print(HTB)

print(“Callable Properties:”) print(“Cell:”, HTB.Cell) print(“Units:”, HTB.Units) print(“Atoms:”, HTB.Atoms) print(“Hopping:”, HTB.Hopping) print(“NF:”, HTB.NF)

t1 = 1 t2 = 2

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}}}

}

===== Input =====

  • bla : Integer
  • bla2 : Real

===== Output =====

  • bla : real

===== Example =====

description text ###

Input

Example.Quanty
-- some example code

Result

text produced as output

Table of contents

Print/export