3. Settings

KITE uses the classes kite.Configuration and kite.Calculation to define the calculation settings.

The class kite.Configuration carries the following information:

The divisions is an integer number that defines the number of decomposition parts in each spatial direction. KITEx implements a domain decomposition technique to divide the lattice into various partitions that are computed in parallel. The domain decomposition is optimized at the design level and allows a substantial speed up of multithreaded calculations, it's usage is recommended.
To activate this feature, set a number of decomposition parts larger than one nx * ny * nz > 1.


The product nx * ny * nz equals the number of threads used by KITEx and thus must not exceed the number of available cores in the computer.


The length is an integer number of unit cells along the direction of lattice vectors lx, ly, lz = 256, 256, 256. The lateral size of the decomposed parts are given by lx/nx and ly/ny.


The laterial sizes lx/nx, ly/ny, lz/nz must be integers.

When using a 2D lattice, only lx, ly, nx, ny are needed.


The boundaries is a string, use 'periodic' for periodic boundary conditions and 'open' for open boundary conditions. Additionally, twisted and random twisted boundary conditions can be implemented using 'twisted' and 'random' respectively. If twisted boundary conditions are used, the twist angles must be included in radians. If open boundary conditions are used, the system has the geometry of the unit cell, which is replicated lx, ly, lz times in the directions of the unit vectors. It is possible to use open boundary conditions in one direction to build ribbons in 2D and slabs in 3D.


The usage of True or False for the boundaries is deprecated.

The is_complex is a boolean value. For optimisation purposes, KITEx only considers and stores complex data with the setting is_complex=True. False should be used for real symmetric Hamiltonians.
The precision is an integer identifier for the used data type. KITEx allows users to define the precision of the calculation. Use 0 for float, 1 for double, and 2 for long double.
Spectrum Range
The optional spectrum_range is an array of reals. By default, KITEx executes an automated rescaling of the Hamiltonian, see the Documentation. Advanced users should avoid the automated rescaling and override this feature using spectrum_range=[Emin,Emax], where Emin, Emax are the minimum, maximum eigenvalues of the TB matrix.

The kite.Configuration object for a 2D lattice is thus structured in the following way:

nx = ny = 2
lx = ly = 128
mode = 'periodic'
configuration = kite.Configuration(
  divisions=[nx, ny],
  length=[lx, ly],
  boundaries=[mode, mode],