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 ofis_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
wfshave been flattened into a single index. Default is False. This option is only relevant whenspinfulis True.
Notes
This function sets the Bloch and cell-periodic eigenstates as class attributes when
wfsare defined on the a k-mesh. When the model is finite, only thewfsattribute is set andis_cell_periodicargument is ignored.