Core User Data (structs)

ThreeBodyTB.CrystalMod.crystalType
mutable struct crystal{T}

Holds basic crystal structure information, type T. Use makecrys to easily construct.

Note: you can create supercells like

julia> c = makecrys([5.0 0 0; 0 5.0 0; 0 0 5.0], [0.0 0.0 0.0], ["H"])
A1=     5.00000  0.00000  0.00000
A2=     0.00000  5.00000  0.00000
A3=     0.00000  0.00000  5.00000

H    0.00000  0.00000  0.00000


julia> c*[2,2,2]
A1=     10.00000  0.00000  0.00000
A2=     0.00000  10.00000  0.00000
A3=     0.00000  0.00000  10.00000

H    0.00000  0.00000  0.00000
H    0.00000  0.00000  0.50000
H    0.00000  0.50000  0.00000
H    0.00000  0.50000  0.50000
H    0.50000  0.00000  0.00000
H    0.50000  0.00000  0.50000
H    0.50000  0.50000  0.00000
H    0.50000  0.50000  0.50000

Holds

  • A::Array{T,2} 3 × 3 lattice vectors, Bohr (atomic units) internally.
  • coords::Array{T,2} num_atoms × 3 atomic positions, fractional units.
  • types::Array{String,1} atomic names, like "H" or "Zn".
  • types::Array{Symbol,1} atomic names, but julia Symbols like :H or :Zn, for nominally faster internal evaluation.
  • nat::Int64 number of atoms.
source
ThreeBodyTB.TB.tbType
mutable struct tb{T}

Holds key tight-binding information in real-space. Like _hr.dat file from Wannier90. Also part of the tb_crys object. Dense matrix version, see also tb_sparse

Holds

  • H::Array{Complex{T},4} Hamiltonian. nwan×nwan×nr×nspin
  • ind_array::Array{Int64,3} nr×3 , holds the r-space supercells of the TB object.
  • r_dict::Dict keys are three Ints like [0,0,0], returns the corresponding ind_array index.
  • nwan::Int Number of orbitals (generalized wannier functions).
  • nspin::Int Number of spins (2=magnetic)
  • nr::Int64 number of R-space supercells.
  • nonorth::Bool : true if non-orthogonal. Almost always true in this code.
  • S::Array{Complex{T},3} : Overlap matrix, organized like H
  • scf::Bool equal to true if requires self-consistency (usually true for fit tb, false for direct from DFT)
  • h1::Array{T,3} Has the term determined by scf calculations, if calculated already.
source
ThreeBodyTB.TB.tb_crysType
abstract type tb_crys end

Abstract supertype of objects that have a tight binding object and a crystal structure. There are tb_crys_dense and tb_crys_sparse implementations.

source

#tbsparse #tbcrysdense #tbcrys_sparse