pythtb.WFArray.set_states#

WFArray.set_states(wfs, is_cell_periodic=True, is_spin_axis_flat=False)[source]#

Populate the wavefunction array.

This method sets the wavefunctions stored in the WFArray. The input wavefunctions can be either the cell-periodic (Bloch) states or the full Bloch states, depending on the value of is_cell_periodic.

Added in version 2.0.0.

Parameters:
wfsnp.ndarray

Wavefunctions to populate the mesh with. The shape must match the expected shape shape.

is_cell_periodicbool, optional

If True, the wavefunctions are treated as cell-periodic (Bloch states). Default is True.

is_spin_axis_flatbool, optional

If True, the spin and orbital indices of wfs have been flattened into a single index. Default is False. This option is only relevant when spinful is True.

Notes

  • This function sets the Bloch and cell-periodic eigenstates as class attributes when wfs are defined on the a k-mesh. When the model is finite, only the wfs attribute is set and is_cell_periodic argument is ignored.

Warning

This function should be used carefully to ensure that the wavefunctions are consistent with the mesh and lattice.