wavefunction

sisl.physics.electron.wavefunction(v, grid, geometry=None, k=None, spinor=0, spin=None, eta=None)[source]

Add the wave-function (Orbital.psi) component of each orbital to the grid

This routine calculates the real-space wave-function components in the specified grid.

This is an in-place operation that adds to the current values in the grid.

It may be instructive to check that an eigenstate is normalized:

>>> grid = Grid(...)
>>> wavefunction(state, grid)
>>> (np.absolute(grid.grid) ** 2).sum() * grid.dvolume == 1.

Note: To calculate \(\psi(\mathbf r)\) in a unit-cell different from the originating geometry, simply pass a grid with a unit-cell smaller than the originating supercell.

The wavefunctions are calculated in real-space via:

\[\psi(\mathbf r) = \sum_i\phi_i(\mathbf r) |\psi\rangle_i \exp(i\mathbf k\cdot\mathbf R)\]

While for non-colinear/spin-orbit calculations the wavefunctions are determined from the spinor component (spinor)

\[\psi_{\alpha/\beta}(\mathbf r) = \sum_i\phi_i(\mathbf r) |\psi_{\alpha/\beta}\rangle_i \exp(i\mathbf k\cdot \mathbf R)\]

where spinor in [0, 1] determines \(\alpha\) or \(\beta\), respectively.

Notes

Currently this method only works for v being coefficients of the gauge=”cell” method. In case you are passing a v with the incorrect gauge you will find a phase-shift according to:

\[\tilde v_j = e^{i\mathbf k\cdot\mathbf r_j} v_j\]

where \(j\) is the orbital index and \(\mathbf r_j\) is the orbital position.

Parameters:
  • v (array_like) – coefficients for the orbital expansion on the real-space grid. If v is a complex array then the grid must be complex as well. The coefficients must be using the R gauge.

  • grid (Grid) – grid on which the wavefunction will be plotted. If multiple eigenstates are in this object, they will be summed.

  • geometry (Geometry, optional) – geometry where the orbitals are defined. This geometry’s orbital count must match the number of elements in v. If this is None the geometry associated with grid will be used instead.

  • k (array_like, optional) – k-point associated with wavefunction, by default the inherent k-point used to calculate the eigenstate will be used (generally shouldn’t be used unless the EigenstateElectron object has not been created via eigenstate).

  • spinor (int, optional) – the spinor for non-colinear/spin-orbit calculations. This is only used if the eigenstate object has been created from a parent object with a Spin object contained, and if the spin-configuration is non-colinear or spin-orbit coupling. Default to the first spinor component.

  • spin (Spin, optional) – specification of the spin configuration of the orbital coefficients. This only has influence for non-colinear wavefunctions where spinor choice is important.

  • eta (bool, optional) – Display a console progressbar.