tightbinder.result.State#

class State(eigenvector, system)[source]#

Bases: object

The State class is defined to separate part of the functionality of the Spectrum class to the eigenstates themselves.

Parameters:
  • eigenvector (ndarray) – Array with coefficients of eigenvector.

  • system (System) – System object.

Methods

atomic_amplitude

Method to obtain the probability amplitude corresponding to each atom.

compute_ipr

Method to compute the inverse participation ratio (IPR) for the state.

compute_occupation

Method to compute which percentage of the atomic amplitude is located at the given list of atoms.

compute_spin_projection

TODO compute_spin_projection.

plot_amplitude

Method to plot the atomic amplitude of the state on top of the crystalline positions.

atomic_amplitude()[source]#

Method to obtain the probability amplitude corresponding to each atom. :rtype: None :return: Array with the probability of finding the electron on each atom (i.e. ordered by atoms like motif).

compute_ipr()[source]#

Method to compute the inverse participation ratio (IPR) for the state.

Return type:

float

Returns:

IPR of state.

compute_occupation(atoms_indices)[source]#

Method to compute which percentage of the atomic amplitude is located at the given list of atoms.

Parameters:

atom_indices – List of indices of atoms where we want to compute the occupation.

Return type:

float

compute_spin_projection(axis='z')[source]#

TODO compute_spin_projection. Method to compute the expected value of any of the three spin operators Sx, Sy or Sz. All calculations are done supposing that the original atomic basis for the tight-binding is written using the z projection of the spin (if the calculation is spinful).

Parameters:

axis (str) – ‘x’, ‘y’ or ‘z’.

Returns:

Expected value of spin along the given direction.

plot_amplitude(ax=None, title=None, linewidth=1, bonds=True, factor=200)[source]#

Method to plot the atomic amplitude of the state on top of the crystalline positions.

Parameters:
  • ax (Axes) – Axes object to plot the amplitude. Defaults to None.

  • title (str) – Plot title. Defaults to None.

  • linewidth (int) – Change width of bonds if present. Defaults to 1.

  • bonds (bool) – Toggle on/off bonds between atoms. Defaults to True.

  • factor (int) – To scale the amplitude up or down.